| @@ -1,80 +1,52 @@ | ||
| 1 | 1 | /*! For license information please see editor-no-post-editor.js.LICENSE.txt */ |
| 2 | -!function(){var e,t,n,r,o,a,i={60400:function(e,t,n){"use strict";n.d(t,{L:function(){return l}});var r=n(2615),o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const a="text/event-stream",i=1e3,s="last-event-id";function l(e,t){var{signal:n,headers:l,onopen:u,onmessage:p,onclose:d,onerror:m,openWhenHidden:h,fetch:f}=t,g=o(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,o)=>{const v=Object.assign({},l);let b;function k(){b.abort(),document.hidden||S()}v.accept||(v.accept=a),h||document.addEventListener("visibilitychange",k);let y=i,w=0;function E(){document.removeEventListener("visibilitychange",k),window.clearTimeout(w),b.abort()}null==n||n.addEventListener("abort",(()=>{E(),t()}));const _=null!=f?f:window.fetch,C=null!=u?u:c;async function S(){var n;b=new AbortController;try{const n=await _(e,Object.assign(Object.assign({},g),{headers:v,signal:b.signal}));await C(n),await(0,r.Pw)(n.body,(0,r.UM)((0,r._U)((e=>{e?v[s]=e:delete v[s]}),(e=>{y=e}),p))),null==d||d(),E(),t()}catch(e){if(!b.signal.aborted)try{const t=null!==(n=null==m?void 0:m(e))&&void 0!==n?n:y;window.clearTimeout(w),w=window.setTimeout(S,t)}catch(e){E(),o(e)}}}S()}))}function c(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(a)))throw new Error(`Expected content-type to be ${a}, Actual: ${t}`)}},2615:function(e,t,n){"use strict";async function r(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function o(e){let t,n,r,o=!1;return function(a){void 0===t?(t=a,n=0,r=-1):t=function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(t,a);const i=t.length;let s=0;for(;n<i;){o&&(10===t[n]&&(s=++n),o=!1);let a=-1;for(;n<i&&-1===a;++n)switch(t[n]){case 58:-1===r&&(r=n-s);break;case 13:o=!0;case 10:a=n}if(-1===a)break;e(t.subarray(s,a),r),s=n,r=-1}s===i?t=void 0:0!==s&&(t=t.subarray(s),n-=s)}}function a(e,t,n){let r=i();const o=new TextDecoder;return function(a,s){if(0===a.length)null==n||n(r),r=i();else if(s>0){const n=o.decode(a.subarray(0,s)),i=s+(32===a[s+1]?2:1),l=o.decode(a.subarray(i));switch(n){case"data":r.data=r.data?r.data+"\n"+l:l;break;case"event":r.event=l;break;case"id":e(r.id=l);break;case"retry":const n=parseInt(l,10);isNaN(n)||t(r.retry=n)}}}}function i(){return{data:"",event:"",id:"",retry:void 0}}n.d(t,{Pw:function(){return r},UM:function(){return o},_U:function(){return a}})},84788:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(2378);let o,a,i,s;const l=/<(\/)?(\w+)\s*(\/)?>/g;function c(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}const u=e=>{const t="object"==typeof e,n=t&&Object.values(e);return t&&n.length&&n.every((e=>(0,r.isValidElement)(e)))};function p(e){const t=function(){const e=l.exec(o);if(null===e)return["no-more-tokens"];const t=e.index,[n,r,a,i]=e,s=n.length;if(i)return["self-closed",a,t,s];if(r)return["closer",a,t,s];return["opener",a,t,s]}(),[n,u,p,h]=t,f=s.length,g=p>a?a:null;if(!e[u])return d(),!1;switch(n){case"no-more-tokens":if(0!==f){const{leadingTextStart:e,tokenStart:t}=s.pop();i.push(o.substr(e,t))}return d(),!1;case"self-closed":return 0===f?(null!==g&&i.push(o.substr(g,p-g)),i.push(e[u]),a=p+h,!0):(m(c(e[u],p,h)),a=p+h,!0);case"opener":return s.push(c(e[u],p,h,p+h,g)),a=p+h,!0;case"closer":if(1===f)return function(e){const{element:t,leadingTextStart:n,prevOffset:a,tokenStart:l,children:c}=s.pop(),u=e?o.substr(a,e-a):o.substr(a);u&&c.push(u);null!==n&&i.push(o.substr(n,l-n));i.push((0,r.cloneElement)(t,null,...c))}(p),a=p+h,!0;const t=s.pop(),n=o.substr(t.prevOffset,p-t.prevOffset);t.children.push(n),t.prevOffset=p+h;const l=c(t.element,t.tokenStart,t.tokenLength,p+h);return l.children=t.children,m(l),a=p+h,!0;default:return d(),!1}}function d(){const e=o.length-a;0!==e&&i.push(o.substr(a,e))}function m(e){const{element:t,tokenStart:n,tokenLength:a,prevOffset:i,children:l}=e,c=s[s.length-1],u=o.substr(c.prevOffset,n-c.prevOffset);u&&c.children.push(u),c.children.push((0,r.cloneElement)(t,null,...l)),c.prevOffset=i||n+a}var h=(e,t)=>{if(o=e,a=0,i=[],s=[],l.lastIndex=0,!u(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do{}while(p(t));return(0,r.createElement)(r.Fragment,null,...i)};t.default=h},51806:function(e,t,n){"use strict";var r=n(25877);Object.defineProperty(t,"__esModule",{value:!0});var o={createInterpolateElement:!0,Platform:!0,renderToString:!0,RawHTML:!0};Object.defineProperty(t,"Platform",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"RawHTML",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"createInterpolateElement",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"renderToString",{enumerable:!0,get:function(){return u.default}});var a=r(n(84788)),i=n(2378);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===i[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}}))}));var s=n(29115);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var l=n(82986);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(o,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var c=r(n(82912)),u=r(n(51962)),p=r(n(74745))},82912:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={OS:"web",select:e=>"web"in e?e.web:e.default,isWeb:!0};t.default=n},74745:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({children:e,...t}){let n="";return r.Children.toArray(e).forEach((e=>{"string"==typeof e&&""!==e.trim()&&(n+=e)})),(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:n},...t})};var r=n(2378)},29115:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createPortal",{enumerable:!0,get:function(){return r.createPortal}}),Object.defineProperty(t,"createRoot",{enumerable:!0,get:function(){return o.createRoot}}),Object.defineProperty(t,"findDOMNode",{enumerable:!0,get:function(){return r.findDOMNode}}),Object.defineProperty(t,"flushSync",{enumerable:!0,get:function(){return r.flushSync}}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return r.hydrate}}),Object.defineProperty(t,"hydrateRoot",{enumerable:!0,get:function(){return o.hydrateRoot}}),Object.defineProperty(t,"render",{enumerable:!0,get:function(){return r.render}}),Object.defineProperty(t,"unmountComponentAtNode",{enumerable:!0,get:function(){return r.unmountComponentAtNode}});var r=n(91850),o=n(51516)},2378:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Children",{enumerable:!0,get:function(){return r.Children}}),Object.defineProperty(t,"Component",{enumerable:!0,get:function(){return r.Component}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return r.Fragment}}),Object.defineProperty(t,"StrictMode",{enumerable:!0,get:function(){return r.StrictMode}}),Object.defineProperty(t,"Suspense",{enumerable:!0,get:function(){return r.Suspense}}),Object.defineProperty(t,"cloneElement",{enumerable:!0,get:function(){return r.cloneElement}}),t.concatChildren=function(...e){return e.reduce(((e,t,n)=>(r.Children.forEach(t,((t,o)=>{t&&"string"!=typeof t&&(t=(0,r.cloneElement)(t,{key:[n,o].join()})),e.push(t)})),e)),[])},Object.defineProperty(t,"createContext",{enumerable:!0,get:function(){return r.createContext}}),Object.defineProperty(t,"createElement",{enumerable:!0,get:function(){return r.createElement}}),Object.defineProperty(t,"createRef",{enumerable:!0,get:function(){return r.createRef}}),Object.defineProperty(t,"forwardRef",{enumerable:!0,get:function(){return r.forwardRef}}),Object.defineProperty(t,"isValidElement",{enumerable:!0,get:function(){return r.isValidElement}}),Object.defineProperty(t,"lazy",{enumerable:!0,get:function(){return r.lazy}}),Object.defineProperty(t,"memo",{enumerable:!0,get:function(){return r.memo}}),Object.defineProperty(t,"startTransition",{enumerable:!0,get:function(){return r.startTransition}}),t.switchChildrenNodeName=function(e,t){return e&&r.Children.map(e,((e,n)=>{if("string"==typeof e?.valueOf())return(0,r.createElement)(t,{key:n},e);const{children:o,...a}=e.props;return(0,r.createElement)(t,{key:n,...a},o)}))},Object.defineProperty(t,"useCallback",{enumerable:!0,get:function(){return r.useCallback}}),Object.defineProperty(t,"useContext",{enumerable:!0,get:function(){return r.useContext}}),Object.defineProperty(t,"useDebugValue",{enumerable:!0,get:function(){return r.useDebugValue}}),Object.defineProperty(t,"useDeferredValue",{enumerable:!0,get:function(){return r.useDeferredValue}}),Object.defineProperty(t,"useEffect",{enumerable:!0,get:function(){return r.useEffect}}),Object.defineProperty(t,"useId",{enumerable:!0,get:function(){return r.useId}}),Object.defineProperty(t,"useImperativeHandle",{enumerable:!0,get:function(){return r.useImperativeHandle}}),Object.defineProperty(t,"useInsertionEffect",{enumerable:!0,get:function(){return r.useInsertionEffect}}),Object.defineProperty(t,"useLayoutEffect",{enumerable:!0,get:function(){return r.useLayoutEffect}}),Object.defineProperty(t,"useMemo",{enumerable:!0,get:function(){return r.useMemo}}),Object.defineProperty(t,"useReducer",{enumerable:!0,get:function(){return r.useReducer}}),Object.defineProperty(t,"useRef",{enumerable:!0,get:function(){return r.useRef}}),Object.defineProperty(t,"useState",{enumerable:!0,get:function(){return r.useState}}),Object.defineProperty(t,"useSyncExternalStore",{enumerable:!0,get:function(){return r.useSyncExternalStore}}),Object.defineProperty(t,"useTransition",{enumerable:!0,get:function(){return r.useTransition}});var r=n(99196)},51962:function(e,t,n){"use strict";var r=n(25877);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.hasPrefix=v,t.renderAttributes=A,t.renderComponent=L,t.renderElement=x,t.renderNativeComponent=j,t.renderStyle=T;var o=n(62313),a=n(28132),i=n(81975),s=n(2378),l=r(n(74745));const{Provider:c,Consumer:u}=(0,s.createContext)(void 0),p=(0,s.forwardRef)((()=>null)),d=new Set(["string","boolean","number"]),m=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),h=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),f=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),g=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function v(e,t){return t.some((t=>0===e.indexOf(t)))}function b(e){return"key"===e||"children"===e}function k(e,t){return"style"===e?T(t):t}const y=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),w=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{}),E=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce(((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e)),{});function _(e){switch(e){case"htmlFor":return"for";case"className":return"class"}const t=e.toLowerCase();return w[t]?w[t]:y[t]?(0,a.paramCase)(y[t]):E[t]?E[t]:t}function C(e){return e.startsWith("--")?e:v(e,["ms","O","Moz","Webkit"])?"-"+(0,a.paramCase)(e):(0,a.paramCase)(e)}function S(e,t){return"number"!=typeof t||0===t||g.has(e)?t:t+"px"}function x(e,t,n={}){if(null==e||!1===e)return"";if(Array.isArray(e))return P(e,t,n);switch(typeof e){case"string":return(0,i.escapeHTML)(e);case"number":return e.toString()}const{type:r,props:o}=e;switch(r){case s.StrictMode:case s.Fragment:return P(o.children,t,n);case l.default:const{children:e,...r}=o;return j(Object.keys(r).length?"div":null,{...r,dangerouslySetInnerHTML:{__html:e}},t,n)}switch(typeof r){case"string":return j(r,o,t,n);case"function":return r.prototype&&"function"==typeof r.prototype.render?L(r,o,t,n):x(r(o,n),t,n)}switch(r&&r.$$typeof){case c.$$typeof:return P(o.children,o.value,n);case u.$$typeof:return x(o.children(t||r._currentValue),t,n);case p.$$typeof:return x(r.render(o),t,n)}return""}function j(e,t,n,r={}){let o="";if("textarea"===e&&t.hasOwnProperty("value")){o=P(t.value,n,r);const{value:e,...a}=t;t=a}else t.dangerouslySetInnerHTML&&"string"==typeof t.dangerouslySetInnerHTML.__html?o=t.dangerouslySetInnerHTML.__html:void 0!==t.children&&(o=P(t.children,n,r));if(!e)return o;const a=A(t);return m.has(e)?"<"+e+a+"/>":"<"+e+a+">"+o+"</"+e+">"}function L(e,t,n,r={}){const o=new e(t,r);"function"==typeof o.getChildContext&&Object.assign(r,o.getChildContext());return x(o.render(),n,r)}function P(e,t,n={}){let r="";e=Array.isArray(e)?e:[e];for(let o=0;o<e.length;o++){r+=x(e[o],t,n)}return r}function A(e){let t="";for(const n in e){const r=_(n);if(!(0,i.isValidAttributeName)(r))continue;let o=k(n,e[n]);if(!d.has(typeof o))continue;if(b(n))continue;const a=h.has(r);if(a&&!1===o)continue;const s=a||v(n,["data-","aria-"])||f.has(r);("boolean"!=typeof o||s)&&(t+=" "+r,a||("string"==typeof o&&(o=(0,i.escapeAttribute)(o)),t+='="'+o+'"'))}return t}function T(e){if(!(0,o.isPlainObject)(e))return e;let t;for(const n in e){const r=e[n];if(null==r)continue;t?t+=";":t="";t+=C(n)+":"+S(n,r)}return t}var N=x;t.default=N},82986:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyElement=void 0;t.isEmptyElement=e=>"number"!=typeof e&&("string"==typeof e?.valueOf()||Array.isArray(e)?!e.length:!e)},61074:function(e,t,n){"use strict";var r=n(69307);t.Z=(0,r.forwardRef)((function({icon:e,size:t=24,...n},o){return(0,r.cloneElement)(e,{width:t,height:t,...n,ref:o})}))},90986:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"}));t.Z=a},23435:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"}));t.Z=a},79201:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));t.Z=a},46936:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"}));t.Z=a},6163:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"}));t.Z=a},43618:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"}));t.Z=a},75022:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"}));t.Z=a},90496:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));t.Z=a},75365:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(o.Path,{d:"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z"}));t.Z=a},20843:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"m7 6.5 4 2.5-4 2.5z"}),(0,r.createElement)(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z"}));t.Z=a},77840:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"}));t.Z=a},58532:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"}));t.Z=a},92710:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M12.75 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.395.395 0 00.199-.166c.05-.083.114-.253.114-.584V7.2H8.8V4h3.95v5.333zM7.95 9.333c0 .521-.102.977-.327 1.354-.23.386-.555.628-.893.774-.545.234-1.183.227-1.544.222l-.12-.001v-1.5h.123c.414.001.715.002.948-.099a.394.394 0 00.198-.166c.05-.083.115-.253.115-.584V7.2H4V4h3.95v5.333zM13 20H4v-1.5h9V20zM20 16H4v-1.5h16V16z"}));t.Z=a},3639:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"}));t.Z=a},586:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"}));t.Z=a},32677:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"}));t.Z=a},48381:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"}));t.Z=a},47659:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{d:"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z"}));t.Z=a},30797:function(e,t,n){"use strict";var r=n(99196),o=n(70444);const a=(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,r.createElement)(o.Path,{d:"M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z"}));t.Z=a},59823:function(e,t,n){"use strict";n.d(t,{AG:function(){return i},Ti:function(){return a},eV:function(){return s}});var r=n(38697),o=n(72867);function a(e,t){return 0===t?e.toLowerCase():(0,o.By)(e,t)}function i(e,t){return 0===t?e.toLowerCase():(0,o.Pv)(e)}function s(e,t){return void 0===t&&(t={}),(0,o.Ho)(e,(0,r.pi)({transform:a},t))}},81338:function(e,t,n){"use strict";n.d(t,{I:function(){return s},w:function(){return i}});var r=n(38697),o=n(68308),a=n(83078);function i(e){return(0,a.l)(e.toLowerCase())}function s(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:" ",transform:i},t))}},28132:function(e,t,n){"use strict";n.r(t),n.d(t,{camelCase:function(){return r.eV},camelCaseTransform:function(){return r.Ti},camelCaseTransformMerge:function(){return r.AG},capitalCase:function(){return o.I},capitalCaseTransform:function(){return o.w},constantCase:function(){return a.c},dotCase:function(){return i.$},headerCase:function(){return s.e},noCase:function(){return l.B},paramCase:function(){return c.o},pascalCase:function(){return u.Ho},pascalCaseTransform:function(){return u.By},pascalCaseTransformMerge:function(){return u.Pv},pathCase:function(){return p.Y},sentenceCase:function(){return d.G},sentenceCaseTransform:function(){return d.a},snakeCase:function(){return m.f}});var r=n(59823),o=n(81338),a=n(56233),i=n(77352),s=n(20025),l=n(68308),c=n(76854),u=n(72867),p=n(76559),d=n(44434),m=n(59491)},73320:function(e,t){var n;!function(){"use strict";var r=function(){function e(){}function t(e,t){for(var n=t.length,r=0;r<n;++r)o(e,t[r])}e.prototype=Object.create(null);var n={}.hasOwnProperty;var r=/\s+/;function o(e,o){if(o){var a=typeof o;"string"===a?function(e,t){for(var n=t.split(r),o=n.length,a=0;a<o;++a)e[n[a]]=!0}(e,o):Array.isArray(o)?t(e,o):"object"===a?function(e,t){if(t.toString===Object.prototype.toString||t.toString.toString().includes("[native code]"))for(var r in t)n.call(t,r)&&(e[r]=!!t[r]);else e[t.toString()]=!0}(e,o):"number"===a&&function(e,t){e[t]=!0}(e,o)}}return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=new e;t(a,r);var i=[];for(var s in a)a[s]&&i.push(s);return i.join(" ")}}();e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},65235:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var i=o.apply(null,n);i&&e.push(i)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)r.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},56233:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=n(38697),o=n(68308),a=n(48936);function i(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:"_",transform:a.L},t))}},94273:function(e){!function(){"use strict";var t=[],n=3988292384;function r(e){var t,r,o,a,i=-1;for(t=0,o=e.length;t<o;t+=1){for(a=255&(i^e[t]),r=0;r<8;r+=1)1==(1&a)?a=a>>>1^n:a>>>=1;i=i>>>8^a}return-1^i}function o(e,n){var r,a,i;if(void 0!==o.crc&&n&&e||(o.crc=-1,e)){for(r=o.crc,a=0,i=e.length;a<i;a+=1)r=r>>>8^t[255&(r^e[a])];return o.crc=r,-1^r}}!function(){var e,r,o;for(r=0;r<256;r+=1){for(e=r,o=0;o<8;o+=1)1&e?e=n^e>>>1:e>>>=1;t[r]=e>>>0}}(),e.exports=function(e,t){var n;e="string"==typeof e?(n=e,Array.prototype.map.call(n,(function(e){return e.charCodeAt(0)}))):e;return((t?r(e):o(e))>>>0).toString(16)},e.exports.direct=r,e.exports.table=o}()},77352:function(e,t,n){"use strict";n.d(t,{$:function(){return a}});var r=n(38697),o=n(68308);function a(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:"."},t))}},92384:function(e,t){"use strict";var n=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.validate=function(e){if(!e)return!1;if(e.length>254)return!1;if(!n.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some((function(e){return e.length>63}))}},53184:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}f(e,t,a,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&f(e,"error",t,n)}(e,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var i=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var o,a,i,c;if(s(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),i=a[t]),void 0===i)i=a[t]=n,++e._eventsCount;else if("function"==typeof i?i=a[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(o=l(e))>0&&i.length>o&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,c=u,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function d(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):h(o,o.length)}function m(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(a){r.once&&e.removeEventListener(t,o),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,a=this._events;if(void 0!==a)o=o&&void 0===a.error;else if(!o)return!1;if(o){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=h(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return c(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return c(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,a,i;if(s(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){i=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(o=a[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return d(this,e,!0)},a.prototype.rawListeners=function(e){return d(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},90861:function(e){e.exports=function(){"use strict";var e=/^(b|B)$/,t={iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},n={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]},r={floor:Math.floor,ceil:Math.ceil};function o(o){var a,i,s,l,c,u,p,d,m,h,f,g,v,b,k,y,w,E,_,C,S,x=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},j=[],L=0;if(isNaN(o))throw new TypeError("Invalid number");if(s=!0===x.bits,k=!0===x.unix,g=!0===x.pad,i=x.base||10,v=void 0!==x.round?x.round:k?1:2,p=void 0!==x.locale?x.locale:"",d=x.localeOptions||{},y=void 0!==x.separator?x.separator:"",w=void 0!==x.spacer?x.spacer:k?"":" ",_=x.symbols||{},E=2===i?x.standard||"iec":"jedec",f=x.output||"string",c=!0===x.fullform,u=x.fullforms instanceof Array?x.fullforms:[],a=void 0!==x.exponent?x.exponent:-1,C=r[x.roundingMethod]||Math.round,m=(h=Number(o))<0,l=i>2?1e3:1024,S=!1===isNaN(x.precision)?parseInt(x.precision,10):0,m&&(h=-h),(-1===a||isNaN(a))&&(a=Math.floor(Math.log(h)/Math.log(l)))<0&&(a=0),a>8&&(S>0&&(S+=8-a),a=8),"exponent"===f)return a;if(0===h)j[0]=0,b=j[1]=k?"":t[E][s?"bits":"bytes"][a];else{L=h/(2===i?Math.pow(2,10*a):Math.pow(1e3,a)),s&&(L*=8)>=l&&a<8&&(L/=l,a++);var P=Math.pow(10,a>0?v:0);j[0]=C(L*P)/P,j[0]===l&&a<8&&void 0===x.exponent&&(j[0]=1,a++),b=j[1]=10===i&&1===a?s?"kbit":"kB":t[E][s?"bits":"bytes"][a],k&&(j[1]=j[1].charAt(0),e.test(j[1])&&(j[0]=Math.floor(j[0]),j[1]=""))}if(m&&(j[0]=-j[0]),S>0&&(j[0]=j[0].toPrecision(S)),j[1]=_[j[1]]||j[1],!0===p?j[0]=j[0].toLocaleString():p.length>0?j[0]=j[0].toLocaleString(p,d):y.length>0&&(j[0]=j[0].toString().replace(".",y)),g&&!1===Number.isInteger(j[0])&&v>0){var A=y||".",T=j[0].toString().split(A),N=T[1]||"",M=N.length,I=v-M;j[0]="".concat(T[0]).concat(A).concat(N.padEnd(M+I,"0"))}return c&&(j[1]=u[a]?u[a]:n[E][a]+(s?"bit":"byte")+(1===j[0]?"":"s")),"array"===f?j:"object"===f?{value:j[0],symbol:j[1],exponent:a,unit:b}:j.join(w)}return o.partial=function(e){return function(t){return o(t,e)}},o}()},20025:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var r=n(38697),o=n(81338);function a(e,t){return void 0===t&&(t={}),(0,o.I)(e,(0,r.pi)({delimiter:"-"},t))}},62313:function(e,t){"use strict";function n(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,r;return!1!==n(e)&&(void 0===(t=e.constructor)||!1!==n(r=t.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))}},84097:function(e,t){var n,r;r="undefined"!=typeof self?self:"undefined"!=typeof window||"undefined"!=typeof window?window:this,e.exports=function(r){"use strict";var o,a=(r=r||{}).Base64,i="2.6.4",s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(s),c=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,d=function(e){return e.replace(p,u)},m=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[s.charAt(n>>>18),s.charAt(n>>>12&63),t>=2?"=":s.charAt(n>>>6&63),t>=1?"=":s.charAt(63&n)].join("")},h=r.btoa&&"function"==typeof r.btoa?function(e){return r.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,m)},f=function(e){return h(d(String(e)))},g=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},v=function(e,t){return t?g(f(e)):f(e)},b=function(e){return v(e,!0)};r.Uint8Array&&(o=function(e,t){for(var n="",r=0,o=e.length;r<o;r+=3){var a=e[r],i=e[r+1],l=e[r+2],c=a<<16|i<<8|l;n+=s.charAt(c>>>18)+s.charAt(c>>>12&63)+(void 0!==i?s.charAt(c>>>6&63):"=")+(void 0!==l?s.charAt(63&c):"=")}return t?g(n):n});var k,y=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},E=function(e){return e.replace(y,w)},_=function(e){var t=e.length,n=t%4,r=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),o=[c(r>>>16),c(r>>>8&255),c(255&r)];return o.length-=[0,0,2,1][n],o.join("")},C=r.atob&&"function"==typeof r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/\S{1,4}/g,_)},S=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},x=function(e){return E(C(e))},j=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},L=function(e){return x(j(e))};r.Uint8Array&&(k=function(e){return Uint8Array.from(S(j(e)),(function(e){return e.charCodeAt(0)}))});var P=function(){var e=r.Base64;return r.Base64=a,e};if(r.Base64={VERSION:i,atob:S,btoa:h,fromBase64:L,toBase64:v,utob:d,encode:v,encodeURI:b,btou:E,decode:L,noConflict:P,fromUint8Array:o,toUint8Array:k},"function"==typeof Object.defineProperty){var A=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};r.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",A((function(){return L(this)}))),Object.defineProperty(String.prototype,"toBase64",A((function(e){return v(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",A((function(){return v(this,!0)})))}}return r.Meteor&&(Base64=r.Base64),e.exports?e.exports.Base64=r.Base64:void 0===(n=function(){return r.Base64}.apply(t,[]))||(e.exports=n),{Base64:r.Base64}}(r)},62232:function(e,t,n){"use strict";function r(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function o(e){return Object.prototype.toString.call(e)}function a(e){return"[object Function]"===o(e)}function i(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};var l={"http:":{validate:function(e,t,n){var r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function p(e){var t=e.re=n(95843)(e.__opts__),r=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push(c),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function u(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var r={validate:null,link:null};if(e.__compiled__[t]=r,"[object Object]"===o(n))return!function(e){return"[object RegExp]"===o(e)}(n.validate)?a(n.validate)?r.validate=n.validate:u(t,n):r.validate=function(e){return function(t,n){var r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}(n.validate),void(a(n.normalize)?r.normalize=n.normalize:n.normalize?u(t,n):r.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===o(e)}(n)?u(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var p=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(i).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+p+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+p+")","ig"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function d(e,t){var n=e.__index__,r=e.__last_index__,o=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=o,this.text=o,this.url=o}function m(e,t){var n=new d(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function h(e,t){if(!(this instanceof h))return new h(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=r({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=r({},l,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},p(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,p(this),this},h.prototype.set=function(e){return this.__opts__=r(this.__opts__,e),this},h.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,r,o,a,i,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(o=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(a=n.index+n[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(r=e.match(this.re.email_fuzzy))&&(a=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=i)),this.__index__>=0},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},h.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(m(this,t)),t=this.__last_index__);for(var r=t?e.slice(t):e;this.test(r);)n.push(m(this,t)),r=r.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},h.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),p(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,p(this),this)},h.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},h.prototype.onCompile=function(){},e.exports=h},95843:function(e,t,n){"use strict";e.exports=function(e){var t={};t.src_Any=n(44957).source,t.src_Cc=n(19590).source,t.src_Z=n(59939).source,t.src_P=n(95162).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");var r="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!-|_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-]).|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]).|"+(e&&e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+").|;(?!"+t.src_ZCc+").|\\!+(?!"+t.src_ZCc+"|[!]).|\\?(?!"+t.src_ZCc+"|[?]).)+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},97740:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});function r(e){return e.toLowerCase()}},82339:function(e){"use strict";function t(e,t,n,r){var o=Number(e[t].meta.id+1).toString(),a="";return"string"==typeof r.docId&&(a="-"+r.docId+"-"),a+o}function n(e,t){var n=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(n+=":"+e[t].meta.subId),"["+n+"]"}function r(e,t,n,r,o){var a=o.rules.footnote_anchor_name(e,t,n,r,o),i=o.rules.footnote_caption(e,t,n,r,o),s=a;return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),'<sup class="footnote-ref"><a href="#fn'+a+'" id="fnref'+s+'">'+i+"</a></sup>"}function o(e,t,n){return(n.xhtmlOut?'<hr class="footnotes-sep" />\n':'<hr class="footnotes-sep">\n')+'<section class="footnotes">\n<ol class="footnotes-list">\n'}function a(){return"</ol>\n</section>\n"}function i(e,t,n,r,o){var a=o.rules.footnote_anchor_name(e,t,n,r,o);return e[t].meta.subId>0&&(a+=":"+e[t].meta.subId),'<li id="fn'+a+'" class="footnote-item">'}function s(){return"</li>\n"}function l(e,t,n,r,o){var a=o.rules.footnote_anchor_name(e,t,n,r,o);return e[t].meta.subId>0&&(a+=":"+e[t].meta.subId),' <a href="#fnref'+a+'" class="footnote-backref">↩︎</a>'}e.exports=function(e){var c=e.helpers.parseLinkLabel,u=e.utils.isSpace;e.renderer.rules.footnote_ref=r,e.renderer.rules.footnote_block_open=o,e.renderer.rules.footnote_block_close=a,e.renderer.rules.footnote_open=i,e.renderer.rules.footnote_close=s,e.renderer.rules.footnote_anchor=l,e.renderer.rules.footnote_caption=n,e.renderer.rules.footnote_anchor_name=t,e.block.ruler.before("reference","footnote_def",(function(e,t,n,r){var o,a,i,s,l,c,p,d,m,h,f,g=e.bMarks[t]+e.tShift[t],v=e.eMarks[t];if(g+4>v)return!1;if(91!==e.src.charCodeAt(g))return!1;if(94!==e.src.charCodeAt(g+1))return!1;for(l=g+2;l<v;l++){if(32===e.src.charCodeAt(l))return!1;if(93===e.src.charCodeAt(l))break}if(l===g+2)return!1;if(l+1>=v||58!==e.src.charCodeAt(++l))return!1;if(r)return!0;for(l++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),c=e.src.slice(g+2,l-2),e.env.footnotes.refs[":"+c]=-1,(p=new e.Token("footnote_reference_open","",1)).meta={label:c},p.level=e.level++,e.tokens.push(p),o=e.bMarks[t],a=e.tShift[t],i=e.sCount[t],s=e.parentType,f=l,d=m=e.sCount[t]+l-(e.bMarks[t]+e.tShift[t]);l<v&&(h=e.src.charCodeAt(l),u(h));)9===h?m+=4-m%4:m++,l++;return e.tShift[t]=l-f,e.sCount[t]=m-d,e.bMarks[t]=f,e.blkIndent+=4,e.parentType="footnote",e.sCount[t]<e.blkIndent&&(e.sCount[t]+=e.blkIndent),e.md.block.tokenize(e,t,n,!0),e.parentType=s,e.blkIndent-=4,e.tShift[t]=a,e.sCount[t]=i,e.bMarks[t]=o,(p=new e.Token("footnote_reference_close","",-1)).level=--e.level,e.tokens.push(p),!0}),{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",(function(e,t){var n,r,o,a,i=e.posMax,s=e.pos;return!(s+2>=i)&&(94===e.src.charCodeAt(s)&&(91===e.src.charCodeAt(s+1)&&(n=s+2,!((r=c(e,s+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),o=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(n,r),e.md,e.env,a=[]),e.push("footnote_ref","",0).meta={id:o},e.env.footnotes.list[o]={content:e.src.slice(n,r),tokens:a}),e.pos=r+1,e.posMax=i,!0))))})),e.inline.ruler.after("footnote_inline","footnote_ref",(function(e,t){var n,r,o,a,i=e.posMax,s=e.pos;if(s+3>i)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(s))return!1;if(94!==e.src.charCodeAt(s+1))return!1;for(r=s+2;r<i;r++){if(32===e.src.charCodeAt(r))return!1;if(10===e.src.charCodeAt(r))return!1;if(93===e.src.charCodeAt(r))break}return r!==s+2&&(!(r>=i)&&(r++,n=e.src.slice(s+2,r-1),void 0!==e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(o=e.env.footnotes.list.length,e.env.footnotes.list[o]={label:n,count:0},e.env.footnotes.refs[":"+n]=o):o=e.env.footnotes.refs[":"+n],a=e.env.footnotes.list[o].count,e.env.footnotes.list[o].count++,e.push("footnote_ref","",0).meta={id:o,subId:a,label:n}),e.pos=r,e.posMax=i,!0)))})),e.core.ruler.after("inline","footnote_tail",(function(e){var t,n,r,o,a,i,s,l,c,u,p=!1,d={};if(e.env.footnotes&&(e.tokens=e.tokens.filter((function(e){return"footnote_reference_open"===e.type?(p=!0,c=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(p=!1,d[":"+u]=c,!1):(p&&c.push(e),!p)})),e.env.footnotes.list)){for(i=e.env.footnotes.list,s=new e.Token("footnote_block_open","",1),e.tokens.push(s),t=0,n=i.length;t<n;t++){for((s=new e.Token("footnote_open","",1)).meta={id:t,label:i[t].label},e.tokens.push(s),i[t].tokens?(l=[],(s=new e.Token("paragraph_open","p",1)).block=!0,l.push(s),(s=new e.Token("inline","",0)).children=i[t].tokens,s.content=i[t].content,l.push(s),(s=new e.Token("paragraph_close","p",-1)).block=!0,l.push(s)):i[t].label&&(l=d[":"+i[t].label]),l&&(e.tokens=e.tokens.concat(l)),a="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null,o=i[t].count>0?i[t].count:1,r=0;r<o;r++)(s=new e.Token("footnote_anchor","",0)).meta={id:t,subId:r,label:i[t].label},e.tokens.push(s);a&&e.tokens.push(a),s=new e.Token("footnote_close","",-1),e.tokens.push(s)}s=new e.Token("footnote_block_close","",-1),e.tokens.push(s)}}))}},10185:function(e,t,n){"use strict";e.exports=n(9702)},38337:function(e,t,n){"use strict";e.exports=n(84321)},43093:function(e){"use strict";e.exports=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},36570:function(e){"use strict";var t="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",n="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",r=new RegExp("^(?:"+t+"|"+n+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Z]+\\s+[^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),o=new RegExp("^(?:"+t+"|"+n+")");e.exports.n=r,e.exports.q=o},39615:function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function o(e,t){return r.call(e,t)}function a(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function i(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(38337);var p=/[&<>"]/,d=/[&<>"]/g,m={"&":"&","<":"<",">":">",'"':"""};function h(e){return m[e]}var f=/[.?*+^$[\]\\(){}|-]/g;var g=n(95162);t.lib={},t.lib.mdurl=n(49236),t.lib.ucmicro=n(84353),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=o,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return o(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&a(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?i(n):e}(e,n)}))},t.isValidEntityCode=a,t.fromCodePoint=i,t.escapeHtml=function(e){return p.test(e)?e.replace(d,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(f,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},57007:function(e,t,n){"use strict";t.parseLinkLabel=n(82174),t.parseLinkDestination=n(36990),t.parseLinkTitle=n(15336)},36990:function(e,t,n){"use strict";var r=n(39615).unescapeAll;e.exports=function(e,t,n){var o,a,i=t,s={ok:!1,pos:0,lines:0,str:""};if(60===e.charCodeAt(t)){for(t++;t<n;){if(10===(o=e.charCodeAt(t)))return s;if(60===o)return s;if(62===o)return s.pos=t+1,s.str=r(e.slice(i+1,t)),s.ok=!0,s;92===o&&t+1<n?t+=2:t++}return s}for(a=0;t<n&&32!==(o=e.charCodeAt(t))&&!(o<32||127===o);)if(92===o&&t+1<n){if(32===e.charCodeAt(t+1))break;t+=2}else{if(40===o&&++a>32)return s;if(41===o){if(0===a)break;a--}t++}return i===t||0!==a||(s.str=r(e.slice(i,t)),s.lines=0,s.pos=t,s.ok=!0),s}},82174:function(e){"use strict";e.exports=function(e,t,n){var r,o,a,i,s=-1,l=e.posMax,c=e.pos;for(e.pos=t+1,r=1;e.pos<l;){if(93===(a=e.src.charCodeAt(e.pos))&&0===--r){o=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===a)if(i===e.pos-1)r++;else if(n)return e.pos=c,-1}return o&&(s=e.pos),e.pos=c,s}},15336:function(e,t,n){"use strict";var r=n(39615).unescapeAll;e.exports=function(e,t,n){var o,a,i=0,s=t,l={ok:!1,pos:0,lines:0,str:""};if(t>=n)return l;if(34!==(a=e.charCodeAt(t))&&39!==a&&40!==a)return l;for(t++,40===a&&(a=41);t<n;){if((o=e.charCodeAt(t))===a)return l.pos=t+1,l.lines=i,l.str=r(e.slice(s+1,t)),l.ok=!0,l;if(40===o&&41===a)return l;10===o?i++:92===o&&t+1<n&&(t++,10===e.charCodeAt(t)&&i++),t++}return l}},9702:function(e,t,n){"use strict";var r=n(39615),o=n(57007),a=n(42403),i=n(17742),s=n(99575),l=n(37487),c=n(62232),u=n(49236),p=n(60300),d={default:n(66223),zero:n(11582),commonmark:n(9372)},m=/^(vbscript|javascript|file|data):/,h=/^data:image\/(gif|png|jpeg|webp);/;function f(e){var t=e.trim().toLowerCase();return!m.test(t)||!!h.test(t)}var g=["http:","https:","mailto:"];function v(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function b(e){var t=u.parse(e,!0);if(t.hostname&&(!t.protocol||g.indexOf(t.protocol)>=0))try{t.hostname=p.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function k(e,t){if(!(this instanceof k))return new k(e,t);t||r.isString(e)||(t=e||{},e="default"),this.inline=new l,this.block=new s,this.core=new i,this.renderer=new a,this.linkify=new c,this.validateLink=f,this.normalizeLink=v,this.normalizeLinkText=b,this.utils=r,this.helpers=r.assign({},o),this.options={},this.configure(e),t&&this.set(t)}k.prototype.set=function(e){return r.assign(this.options,e),this},k.prototype.configure=function(e){var t,n=this;if(r.isString(e)&&!(e=d[t=e]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name');if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&n.set(e.options),e.components&&Object.keys(e.components).forEach((function(t){e.components[t].rules&&n[t].ruler.enableOnly(e.components[t].rules),e.components[t].rules2&&n[t].ruler2.enableOnly(e.components[t].rules2)})),this},k.prototype.enable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.enable(e,!0))}),this),n=n.concat(this.inline.ruler2.enable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this},k.prototype.disable=function(e,t){var n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){n=n.concat(this[t].ruler.disable(e,!0))}),this),n=n.concat(this.inline.ruler2.disable(e,!0));var r=e.filter((function(e){return n.indexOf(e)<0}));if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this},k.prototype.use=function(e){var t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},k.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");var n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},k.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},k.prototype.parseInline=function(e,t){var n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},k.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=k},99575:function(e,t,n){"use strict";var r=n(81377),o=[["table",n(12592),["paragraph","reference"]],["code",n(99334)],["fence",n(79783),["paragraph","reference","blockquote","list"]],["blockquote",n(36901),["paragraph","reference","blockquote","list"]],["hr",n(68837),["paragraph","reference","blockquote","list"]],["list",n(46388),["paragraph","reference","blockquote"]],["reference",n(33765)],["html_block",n(33869),["paragraph","reference","blockquote"]],["heading",n(21127),["paragraph","reference","blockquote"]],["lheading",n(5393)],["paragraph",n(24934)]];function a(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1],{alt:(o[e][2]||[]).slice()})}a.prototype.tokenize=function(e,t,n){for(var r,o=this.ruler.getRules(""),a=o.length,i=t,s=!1,l=e.md.options.maxNesting;i<n&&(e.line=i=e.skipEmptyLines(i),!(i>=n))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=l){e.line=n;break}for(r=0;r<a&&!o[r](e,i,n,!1);r++);e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),(i=e.line)<n&&e.isEmpty(i)&&(s=!0,i++,e.line=i)}},a.prototype.parse=function(e,t,n,r){var o;e&&(o=new this.State(e,t,n,r),this.tokenize(o,o.line,o.lineMax))},a.prototype.State=n(75355),e.exports=a},17742:function(e,t,n){"use strict";var r=n(81377),o=[["normalize",n(13837)],["block",n(30884)],["inline",n(25334)],["linkify",n(64756)],["replacements",n(60555)],["smartquotes",n(28867)]];function a(){this.ruler=new r;for(var e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1])}a.prototype.process=function(e){var t,n,r;for(t=0,n=(r=this.ruler.getRules("")).length;t<n;t++)r[t](e)},a.prototype.State=n(30727),e.exports=a},37487:function(e,t,n){"use strict";var r=n(81377),o=[["text",n(10937)],["newline",n(62378)],["escape",n(8329)],["backticks",n(7912)],["strikethrough",n(54988).w],["emphasis",n(56141).w],["link",n(95028)],["image",n(92560)],["autolink",n(73273)],["html_inline",n(9955)],["entity",n(54408)]],a=[["balance_pairs",n(76399)],["strikethrough",n(54988).g],["emphasis",n(56141).g],["text_collapse",n(52406)]];function i(){var e;for(this.ruler=new r,e=0;e<o.length;e++)this.ruler.push(o[e][0],o[e][1]);for(this.ruler2=new r,e=0;e<a.length;e++)this.ruler2.push(a[e][0],a[e][1])}i.prototype.skipToken=function(e){var t,n,r=e.pos,o=this.ruler.getRules(""),a=o.length,i=e.md.options.maxNesting,s=e.cache;if(void 0===s[r]){if(e.level<i)for(n=0;n<a&&(e.level++,t=o[n](e,!0),e.level--,!t);n++);else e.pos=e.posMax;t||e.pos++,s[r]=e.pos}else e.pos=s[r]},i.prototype.tokenize=function(e){for(var t,n,r=this.ruler.getRules(""),o=r.length,a=e.posMax,i=e.md.options.maxNesting;e.pos<a;){if(e.level<i)for(n=0;n<o&&!(t=r[n](e,!1));n++);if(t){if(e.pos>=a)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},i.prototype.parse=function(e,t,n,r){var o,a,i,s=new this.State(e,t,n,r);for(this.tokenize(s),i=(a=this.ruler2.getRules("")).length,o=0;o<i;o++)a[o](s)},i.prototype.State=n(25240),e.exports=i},9372:function(e){"use strict";e.exports={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","text_collapse"]}}}},66223:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},11582:function(e){"use strict";e.exports={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","text_collapse"]}}}},42403:function(e,t,n){"use strict";var r=n(39615).assign,o=n(39615).unescapeAll,a=n(39615).escapeHtml,i={};function s(){this.rules=r({},i)}i.code_inline=function(e,t,n,r,o){var i=e[t];return"<code"+o.renderAttrs(i)+">"+a(e[t].content)+"</code>"},i.code_block=function(e,t,n,r,o){var i=e[t];return"<pre"+o.renderAttrs(i)+"><code>"+a(e[t].content)+"</code></pre>\n"},i.fence=function(e,t,n,r,i){var s,l,c,u,p,d=e[t],m=d.info?o(d.info).trim():"",h="",f="";return m&&(h=(c=m.split(/(\s+)/g))[0],f=c.slice(2).join("")),0===(s=n.highlight&&n.highlight(d.content,h,f)||a(d.content)).indexOf("<pre")?s+"\n":m?(l=d.attrIndex("class"),u=d.attrs?d.attrs.slice():[],l<0?u.push(["class",n.langPrefix+h]):(u[l]=u[l].slice(),u[l][1]+=" "+n.langPrefix+h),p={attrs:u},"<pre><code"+i.renderAttrs(p)+">"+s+"</code></pre>\n"):"<pre><code"+i.renderAttrs(d)+">"+s+"</code></pre>\n"},i.image=function(e,t,n,r,o){var a=e[t];return a.attrs[a.attrIndex("alt")][1]=o.renderInlineAsText(a.children,n,r),o.renderToken(e,t,n)},i.hardbreak=function(e,t,n){return n.xhtmlOut?"<br />\n":"<br>\n"},i.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"<br />\n":"<br>\n":"\n"},i.text=function(e,t){return a(e[t].content)},i.html_block=function(e,t){return e[t].content},i.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){var t,n,r;if(!e.attrs)return"";for(r="",t=0,n=e.attrs.length;t<n;t++)r+=" "+a(e.attrs[t][0])+'="'+a(e.attrs[t][1])+'"';return r},s.prototype.renderToken=function(e,t,n){var r,o="",a=!1,i=e[t];return i.hidden?"":(i.block&&-1!==i.nesting&&t&&e[t-1].hidden&&(o+="\n"),o+=(-1===i.nesting?"</":"<")+i.tag,o+=this.renderAttrs(i),0===i.nesting&&n.xhtmlOut&&(o+=" /"),i.block&&(a=!0,1===i.nesting&&t+1<e.length&&("inline"===(r=e[t+1]).type||r.hidden||-1===r.nesting&&r.tag===i.tag)&&(a=!1)),o+=a?">\n":">")},s.prototype.renderInline=function(e,t,n){for(var r,o="",a=this.rules,i=0,s=e.length;i<s;i++)void 0!==a[r=e[i].type]?o+=a[r](e,i,t,n,this):o+=this.renderToken(e,i,t);return o},s.prototype.renderInlineAsText=function(e,t,n){for(var r="",o=0,a=e.length;o<a;o++)"text"===e[o].type?r+=e[o].content:"image"===e[o].type?r+=this.renderInlineAsText(e[o].children,t,n):"softbreak"===e[o].type&&(r+="\n");return r},s.prototype.render=function(e,t,n){var r,o,a,i="",s=this.rules;for(r=0,o=e.length;r<o;r++)"inline"===(a=e[r].type)?i+=this.renderInline(e[r].children,t,n):void 0!==s[a]?i+=s[e[r].type](e,r,t,n,this):i+=this.renderToken(e,r,t,n);return i},e.exports=s},81377:function(e){"use strict";function t(){this.__rules__=[],this.__cache__=null}t.prototype.__find__=function(e){for(var t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},t.prototype.__compile__=function(){var e=this,t=[""];e.__rules__.forEach((function(e){e.enabled&&e.alt.forEach((function(e){t.indexOf(e)<0&&t.push(e)}))})),e.__cache__={},t.forEach((function(t){e.__cache__[t]=[],e.__rules__.forEach((function(n){n.enabled&&(t&&n.alt.indexOf(t)<0||e.__cache__[t].push(n.fn))}))}))},t.prototype.at=function(e,t,n){var r=this.__find__(e),o=n||{};if(-1===r)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=o.alt||[],this.__cache__=null},t.prototype.before=function(e,t,n,r){var o=this.__find__(e),a=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},t.prototype.after=function(e,t,n,r){var o=this.__find__(e),a=r||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:a.alt||[]}),this.__cache__=null},t.prototype.push=function(e,t,n){var r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null},t.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!0,n.push(e)}),this),this.__cache__=null,n},t.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach((function(e){e.enabled=!1})),this.enable(e,t)},t.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);var n=[];return e.forEach((function(e){var r=this.__find__(e);if(r<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[r].enabled=!1,n.push(e)}),this),this.__cache__=null,n},t.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]},e.exports=t},36901:function(e,t,n){"use strict";var r=n(39615).isSpace;e.exports=function(e,t,n,o){var a,i,s,l,c,u,p,d,m,h,f,g,v,b,k,y,w,E,_,C,S=e.lineMax,x=e.bMarks[t]+e.tShift[t],j=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(x++))return!1;if(o)return!0;for(l=m=e.sCount[t]+1,32===e.src.charCodeAt(x)?(x++,l++,m++,a=!1,y=!0):9===e.src.charCodeAt(x)?(y=!0,(e.bsCount[t]+m)%4==3?(x++,l++,m++,a=!1):a=!0):y=!1,h=[e.bMarks[t]],e.bMarks[t]=x;x<j&&(i=e.src.charCodeAt(x),r(i));)9===i?m+=4-(m+e.bsCount[t]+(a?1:0))%4:m++,x++;for(f=[e.bsCount[t]],e.bsCount[t]=e.sCount[t]+1+(y?1:0),u=x>=j,b=[e.sCount[t]],e.sCount[t]=m-l,k=[e.tShift[t]],e.tShift[t]=x-e.bMarks[t],E=e.md.block.ruler.getRules("blockquote"),v=e.parentType,e.parentType="blockquote",d=t+1;d<n&&(C=e.sCount[d]<e.blkIndent,!((x=e.bMarks[d]+e.tShift[d])>=(j=e.eMarks[d])));d++)if(62!==e.src.charCodeAt(x++)||C){if(u)break;for(w=!1,s=0,c=E.length;s<c;s++)if(E[s](e,d,n,!0)){w=!0;break}if(w){e.lineMax=d,0!==e.blkIndent&&(h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),b.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}h.push(e.bMarks[d]),f.push(e.bsCount[d]),k.push(e.tShift[d]),b.push(e.sCount[d]),e.sCount[d]=-1}else{for(l=m=e.sCount[d]+1,32===e.src.charCodeAt(x)?(x++,l++,m++,a=!1,y=!0):9===e.src.charCodeAt(x)?(y=!0,(e.bsCount[d]+m)%4==3?(x++,l++,m++,a=!1):a=!0):y=!1,h.push(e.bMarks[d]),e.bMarks[d]=x;x<j&&(i=e.src.charCodeAt(x),r(i));)9===i?m+=4-(m+e.bsCount[d]+(a?1:0))%4:m++,x++;u=x>=j,f.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(y?1:0),b.push(e.sCount[d]),e.sCount[d]=m-l,k.push(e.tShift[d]),e.tShift[d]=x-e.bMarks[d]}for(g=e.blkIndent,e.blkIndent=0,(_=e.push("blockquote_open","blockquote",1)).markup=">",_.map=p=[t,0],e.md.block.tokenize(e,t,d),(_=e.push("blockquote_close","blockquote",-1)).markup=">",e.lineMax=S,e.parentType=v,p[1]=e.line,s=0;s<k.length;s++)e.bMarks[s+t]=h[s],e.tShift[s+t]=k[s],e.sCount[s+t]=b[s],e.bsCount[s+t]=f[s];return e.blkIndent=g,!0}},99334:function(e){"use strict";e.exports=function(e,t,n){var r,o,a;if(e.sCount[t]-e.blkIndent<4)return!1;for(o=r=t+1;r<n;)if(e.isEmpty(r))r++;else{if(!(e.sCount[r]-e.blkIndent>=4))break;o=++r}return e.line=o,(a=e.push("code_block","code",0)).content=e.getLines(t,o,4+e.blkIndent,!1)+"\n",a.map=[t,e.line],!0}},79783:function(e){"use strict";e.exports=function(e,t,n,r){var o,a,i,s,l,c,u,p=!1,d=e.bMarks[t]+e.tShift[t],m=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(d+3>m)return!1;if(126!==(o=e.src.charCodeAt(d))&&96!==o)return!1;if(l=d,(a=(d=e.skipChars(d,o))-l)<3)return!1;if(u=e.src.slice(l,d),i=e.src.slice(d,m),96===o&&i.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;for(s=t;!(++s>=n)&&!((d=l=e.bMarks[s]+e.tShift[s])<(m=e.eMarks[s])&&e.sCount[s]<e.blkIndent);)if(e.src.charCodeAt(d)===o&&!(e.sCount[s]-e.blkIndent>=4||(d=e.skipChars(d,o))-l<a||(d=e.skipSpaces(d))<m)){p=!0;break}return a=e.sCount[t],e.line=s+(p?1:0),(c=e.push("fence","code",0)).info=i,c.content=e.getLines(t+1,s,a,!0),c.markup=u,c.map=[t,e.line],!0}},21127:function(e,t,n){"use strict";var r=n(39615).isSpace;e.exports=function(e,t,n,o){var a,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(35!==(a=e.src.charCodeAt(c))||c>=u)return!1;for(i=1,a=e.src.charCodeAt(++c);35===a&&c<u&&i<=6;)i++,a=e.src.charCodeAt(++c);return!(i>6||c<u&&!r(a))&&(o||(u=e.skipSpacesBack(u,c),(s=e.skipCharsBack(u,35,c))>c&&r(e.src.charCodeAt(s-1))&&(u=s),e.line=t+1,(l=e.push("heading_open","h"+String(i),1)).markup="########".slice(0,i),l.map=[t,e.line],(l=e.push("inline","",0)).content=e.src.slice(c,u).trim(),l.map=[t,e.line],l.children=[],(l=e.push("heading_close","h"+String(i),-1)).markup="########".slice(0,i)),!0)}},68837:function(e,t,n){"use strict";var r=n(39615).isSpace;e.exports=function(e,t,n,o){var a,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(42!==(a=e.src.charCodeAt(c++))&&45!==a&&95!==a)return!1;for(i=1;c<u;){if((s=e.src.charCodeAt(c++))!==a&&!r(s))return!1;s===a&&i++}return!(i<3)&&(o||(e.line=t+1,(l=e.push("hr","hr",0)).map=[t,e.line],l.markup=Array(i+1).join(String.fromCharCode(a))),!0)}},33869:function(e,t,n){"use strict";var r=n(43093),o=n(36570).q,a=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.source+"\\s*$"),/^$/,!1]];e.exports=function(e,t,n,r){var o,i,s,l,c=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(c))return!1;for(l=e.src.slice(c,u),o=0;o<a.length&&!a[o][0].test(l);o++);if(o===a.length)return!1;if(r)return a[o][2];if(i=t+1,!a[o][1].test(l))for(;i<n&&!(e.sCount[i]<e.blkIndent);i++)if(c=e.bMarks[i]+e.tShift[i],u=e.eMarks[i],l=e.src.slice(c,u),a[o][1].test(l)){0!==l.length&&i++;break}return e.line=i,(s=e.push("html_block","",0)).map=[t,i],s.content=e.getLines(t,i,e.blkIndent,!0),!0}},5393:function(e){"use strict";e.exports=function(e,t,n){var r,o,a,i,s,l,c,u,p,d,m=t+1,h=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;for(d=e.parentType,e.parentType="paragraph";m<n&&!e.isEmpty(m);m++)if(!(e.sCount[m]-e.blkIndent>3)){if(e.sCount[m]>=e.blkIndent&&(l=e.bMarks[m]+e.tShift[m])<(c=e.eMarks[m])&&(45===(p=e.src.charCodeAt(l))||61===p)&&(l=e.skipChars(l,p),(l=e.skipSpaces(l))>=c)){u=61===p?1:2;break}if(!(e.sCount[m]<0)){for(o=!1,a=0,i=h.length;a<i;a++)if(h[a](e,m,n,!0)){o=!0;break}if(o)break}}return!!u&&(r=e.getLines(t,m,e.blkIndent,!1).trim(),e.line=m+1,(s=e.push("heading_open","h"+String(u),1)).markup=String.fromCharCode(p),s.map=[t,e.line],(s=e.push("inline","",0)).content=r,s.map=[t,e.line-1],s.children=[],(s=e.push("heading_close","h"+String(u),-1)).markup=String.fromCharCode(p),e.parentType=d,!0)}},46388:function(e,t,n){"use strict";var r=n(39615).isSpace;function o(e,t){var n,o,a,i;return o=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],42!==(n=e.src.charCodeAt(o++))&&45!==n&&43!==n||o<a&&(i=e.src.charCodeAt(o),!r(i))?-1:o}function a(e,t){var n,o=e.bMarks[t]+e.tShift[t],a=o,i=e.eMarks[t];if(a+1>=i)return-1;if((n=e.src.charCodeAt(a++))<48||n>57)return-1;for(;;){if(a>=i)return-1;if(!((n=e.src.charCodeAt(a++))>=48&&n<=57)){if(41===n||46===n)break;return-1}if(a-o>=10)return-1}return a<i&&(n=e.src.charCodeAt(a),!r(n))?-1:a}e.exports=function(e,t,n,r){var i,s,l,c,u,p,d,m,h,f,g,v,b,k,y,w,E,_,C,S,x,j,L,P,A,T,N,M,I=!1,R=!0;if(e.sCount[t]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[t]-e.listIndent>=4&&e.sCount[t]<e.blkIndent)return!1;if(r&&"paragraph"===e.parentType&&e.sCount[t]>=e.blkIndent&&(I=!0),(L=a(e,t))>=0){if(d=!0,A=e.bMarks[t]+e.tShift[t],b=Number(e.src.slice(A,L-1)),I&&1!==b)return!1}else{if(!((L=o(e,t))>=0))return!1;d=!1}if(I&&e.skipSpaces(L)>=e.eMarks[t])return!1;if(v=e.src.charCodeAt(L-1),r)return!0;for(g=e.tokens.length,d?(M=e.push("ordered_list_open","ol",1),1!==b&&(M.attrs=[["start",b]])):M=e.push("bullet_list_open","ul",1),M.map=f=[t,0],M.markup=String.fromCharCode(v),y=t,P=!1,N=e.md.block.ruler.getRules("list"),_=e.parentType,e.parentType="list";y<n;){for(j=L,k=e.eMarks[y],p=w=e.sCount[y]+L-(e.bMarks[t]+e.tShift[t]);j<k;){if(9===(i=e.src.charCodeAt(j)))w+=4-(w+e.bsCount[y])%4;else{if(32!==i)break;w++}j++}if((u=(s=j)>=k?1:w-p)>4&&(u=1),c=p+u,(M=e.push("list_item_open","li",1)).markup=String.fromCharCode(v),M.map=m=[t,0],d&&(M.info=e.src.slice(A,L-1)),x=e.tight,S=e.tShift[t],C=e.sCount[t],E=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=c,e.tight=!0,e.tShift[t]=s-e.bMarks[t],e.sCount[t]=w,s>=k&&e.isEmpty(t+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,t,n,!0),e.tight&&!P||(R=!1),P=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=E,e.tShift[t]=S,e.sCount[t]=C,e.tight=x,(M=e.push("list_item_close","li",-1)).markup=String.fromCharCode(v),y=t=e.line,m[1]=y,s=e.bMarks[t],y>=n)break;if(e.sCount[y]<e.blkIndent)break;if(e.sCount[t]-e.blkIndent>=4)break;for(T=!1,l=0,h=N.length;l<h;l++)if(N[l](e,y,n,!0)){T=!0;break}if(T)break;if(d){if((L=a(e,y))<0)break;A=e.bMarks[y]+e.tShift[y]}else if((L=o(e,y))<0)break;if(v!==e.src.charCodeAt(L-1))break}return(M=d?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1)).markup=String.fromCharCode(v),f[1]=y,e.line=y,e.parentType=_,R&&function(e,t){var n,r,o=e.level+2;for(n=t+2,r=e.tokens.length-2;n<r;n++)e.tokens[n].level===o&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,g),!0}},24934:function(e){"use strict";e.exports=function(e,t){var n,r,o,a,i,s,l=t+1,c=e.md.block.ruler.getRules("paragraph"),u=e.lineMax;for(s=e.parentType,e.parentType="paragraph";l<u&&!e.isEmpty(l);l++)if(!(e.sCount[l]-e.blkIndent>3||e.sCount[l]<0)){for(r=!1,o=0,a=c.length;o<a;o++)if(c[o](e,l,u,!0)){r=!0;break}if(r)break}return n=e.getLines(t,l,e.blkIndent,!1).trim(),e.line=l,(i=e.push("paragraph_open","p",1)).map=[t,e.line],(i=e.push("inline","",0)).content=n,i.map=[t,e.line],i.children=[],i=e.push("paragraph_close","p",-1),e.parentType=s,!0}},33765:function(e,t,n){"use strict";var r=n(39615).normalizeReference,o=n(39615).isSpace;e.exports=function(e,t,n,a){var i,s,l,c,u,p,d,m,h,f,g,v,b,k,y,w,E=0,_=e.bMarks[t]+e.tShift[t],C=e.eMarks[t],S=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(_))return!1;for(;++_<C;)if(93===e.src.charCodeAt(_)&&92!==e.src.charCodeAt(_-1)){if(_+1===C)return!1;if(58!==e.src.charCodeAt(_+1))return!1;break}for(c=e.lineMax,y=e.md.block.ruler.getRules("reference"),f=e.parentType,e.parentType="reference";S<c&&!e.isEmpty(S);S++)if(!(e.sCount[S]-e.blkIndent>3||e.sCount[S]<0)){for(k=!1,p=0,d=y.length;p<d;p++)if(y[p](e,S,c,!0)){k=!0;break}if(k)break}for(C=(b=e.getLines(t,S,e.blkIndent,!1).trim()).length,_=1;_<C;_++){if(91===(i=b.charCodeAt(_)))return!1;if(93===i){h=_;break}(10===i||92===i&&++_<C&&10===b.charCodeAt(_))&&E++}if(h<0||58!==b.charCodeAt(h+1))return!1;for(_=h+2;_<C;_++)if(10===(i=b.charCodeAt(_)))E++;else if(!o(i))break;if(!(g=e.md.helpers.parseLinkDestination(b,_,C)).ok)return!1;if(u=e.md.normalizeLink(g.str),!e.md.validateLink(u))return!1;for(s=_=g.pos,l=E+=g.lines,v=_;_<C;_++)if(10===(i=b.charCodeAt(_)))E++;else if(!o(i))break;for(g=e.md.helpers.parseLinkTitle(b,_,C),_<C&&v!==_&&g.ok?(w=g.str,_=g.pos,E+=g.lines):(w="",_=s,E=l);_<C&&(i=b.charCodeAt(_),o(i));)_++;if(_<C&&10!==b.charCodeAt(_)&&w)for(w="",_=s,E=l;_<C&&(i=b.charCodeAt(_),o(i));)_++;return!(_<C&&10!==b.charCodeAt(_))&&(!!(m=r(b.slice(1,h)))&&(a||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[m]&&(e.env.references[m]={title:w,href:u}),e.parentType=f,e.line=t+E+1),!0))}},75355:function(e,t,n){"use strict";var r=n(71872),o=n(39615).isSpace;function a(e,t,n,r){var a,i,s,l,c,u,p,d;for(this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",d=!1,s=l=u=p=0,c=(i=this.src).length;l<c;l++){if(a=i.charCodeAt(l),!d){if(o(a)){u++,9===a?p+=4-p%4:p++;continue}d=!0}10!==a&&l!==c-1||(10!==a&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(u),this.sCount.push(p),this.bsCount.push(0),d=!1,u=0,p=0,s=l+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}a.prototype.push=function(e,t,n){var o=new r(e,t,n);return o.block=!0,n<0&&this.level--,o.level=this.level,n>0&&this.level++,this.tokens.push(o),o},a.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},a.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},a.prototype.skipSpaces=function(e){for(var t,n=this.src.length;e<n&&(t=this.src.charCodeAt(e),o(t));e++);return e},a.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!o(this.src.charCodeAt(--e)))return e+1;return e},a.prototype.skipChars=function(e,t){for(var n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},a.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},a.prototype.getLines=function(e,t,n,r){var a,i,s,l,c,u,p,d=e;if(e>=t)return"";for(u=new Array(t-e),a=0;d<t;d++,a++){for(i=0,p=l=this.bMarks[d],c=d+1<t||r?this.eMarks[d]+1:this.eMarks[d];l<c&&i<n;){if(s=this.src.charCodeAt(l),o(s))9===s?i+=4-(i+this.bsCount[d])%4:i++;else{if(!(l-p<this.tShift[d]))break;i++}l++}u[a]=i>n?new Array(i-n+1).join(" ")+this.src.slice(l,c):this.src.slice(l,c)}return u.join("")},a.prototype.Token=r,e.exports=a},12592:function(e,t,n){"use strict";var r=n(39615).isSpace;function o(e,t){var n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.substr(n,r-n)}function a(e){var t,n=[],r=0,o=e.length,a=!1,i=0,s="";for(t=e.charCodeAt(r);r<o;)124===t&&(a?(s+=e.substring(i,r-1),i=r):(n.push(s+e.substring(i,r)),s="",i=r+1)),a=92===t,r++,t=e.charCodeAt(r);return n.push(s+e.substring(i)),n}e.exports=function(e,t,n,i){var s,l,c,u,p,d,m,h,f,g,v,b,k,y,w,E,_,C;if(t+2>n)return!1;if(d=t+1,e.sCount[d]<e.blkIndent)return!1;if(e.sCount[d]-e.blkIndent>=4)return!1;if((c=e.bMarks[d]+e.tShift[d])>=e.eMarks[d])return!1;if(124!==(_=e.src.charCodeAt(c++))&&45!==_&&58!==_)return!1;if(c>=e.eMarks[d])return!1;if(124!==(C=e.src.charCodeAt(c++))&&45!==C&&58!==C&&!r(C))return!1;if(45===_&&r(C))return!1;for(;c<e.eMarks[d];){if(124!==(s=e.src.charCodeAt(c))&&45!==s&&58!==s&&!r(s))return!1;c++}for(m=(l=o(e,t+1)).split("|"),g=[],u=0;u<m.length;u++){if(!(v=m[u].trim())){if(0===u||u===m.length-1)continue;return!1}if(!/^:?-+:?$/.test(v))return!1;58===v.charCodeAt(v.length-1)?g.push(58===v.charCodeAt(0)?"center":"right"):58===v.charCodeAt(0)?g.push("left"):g.push("")}if(-1===(l=o(e,t).trim()).indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;if((m=a(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),0===(h=m.length)||h!==g.length)return!1;if(i)return!0;for(y=e.parentType,e.parentType="table",E=e.md.block.ruler.getRules("blockquote"),(f=e.push("table_open","table",1)).map=b=[t,0],(f=e.push("thead_open","thead",1)).map=[t,t+1],(f=e.push("tr_open","tr",1)).map=[t,t+1],u=0;u<m.length;u++)f=e.push("th_open","th",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u].trim(),f.children=[],f=e.push("th_close","th",-1);for(f=e.push("tr_close","tr",-1),f=e.push("thead_close","thead",-1),d=t+2;d<n&&!(e.sCount[d]<e.blkIndent);d++){for(w=!1,u=0,p=E.length;u<p;u++)if(E[u](e,d,n,!0)){w=!0;break}if(w)break;if(!(l=o(e,d).trim()))break;if(e.sCount[d]-e.blkIndent>=4)break;for((m=a(l)).length&&""===m[0]&&m.shift(),m.length&&""===m[m.length-1]&&m.pop(),d===t+2&&((f=e.push("tbody_open","tbody",1)).map=k=[t+2,0]),(f=e.push("tr_open","tr",1)).map=[d,d+1],u=0;u<h;u++)f=e.push("td_open","td",1),g[u]&&(f.attrs=[["style","text-align:"+g[u]]]),(f=e.push("inline","",0)).content=m[u]?m[u].trim():"",f.children=[],f=e.push("td_close","td",-1);f=e.push("tr_close","tr",-1)}return k&&(f=e.push("tbody_close","tbody",-1),k[1]=d),f=e.push("table_close","table",-1),b[1]=d,e.parentType=y,e.line=d,!0}},30884:function(e){"use strict";e.exports=function(e){var t;e.inlineMode?((t=new e.Token("inline","",0)).content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}},25334:function(e){"use strict";e.exports=function(e){var t,n,r,o=e.tokens;for(n=0,r=o.length;n<r;n++)"inline"===(t=o[n]).type&&e.md.inline.parse(t.content,e.md,e.env,t.children)}},64756:function(e,t,n){"use strict";var r=n(39615).arrayReplaceAt;function o(e){return/^<\/a\s*>/i.test(e)}e.exports=function(e){var t,n,a,i,s,l,c,u,p,d,m,h,f,g,v,b,k,y,w=e.tokens;if(e.md.options.linkify)for(n=0,a=w.length;n<a;n++)if("inline"===w[n].type&&e.md.linkify.pretest(w[n].content))for(f=0,t=(i=w[n].children).length-1;t>=0;t--)if("link_close"!==(l=i[t]).type){if("html_inline"===l.type&&(y=l.content,/^<a[>\s]/i.test(y)&&f>0&&f--,o(l.content)&&f++),!(f>0)&&"text"===l.type&&e.md.linkify.test(l.content)){for(p=l.content,k=e.md.linkify.match(p),c=[],h=l.level,m=0,u=0;u<k.length;u++)g=k[u].url,v=e.md.normalizeLink(g),e.md.validateLink(v)&&(b=k[u].text,b=k[u].schema?"mailto:"!==k[u].schema||/^mailto:/i.test(b)?e.md.normalizeLinkText(b):e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,""),(d=k[u].index)>m&&((s=new e.Token("text","",0)).content=p.slice(m,d),s.level=h,c.push(s)),(s=new e.Token("link_open","a",1)).attrs=[["href",v]],s.level=h++,s.markup="linkify",s.info="auto",c.push(s),(s=new e.Token("text","",0)).content=b,s.level=h,c.push(s),(s=new e.Token("link_close","a",-1)).level=--h,s.markup="linkify",s.info="auto",c.push(s),m=k[u].lastIndex);m<p.length&&((s=new e.Token("text","",0)).content=p.slice(m),s.level=h,c.push(s)),w[n].children=i=r(i,t,c)}}else for(t--;i[t].level!==l.level&&"link_open"!==i[t].type;)t--}},13837:function(e){"use strict";var t=/\r\n?|\n/g,n=/\0/g;e.exports=function(e){var r;r=(r=e.src.replace(t,"\n")).replace(n,"�"),e.src=r}},60555:function(e){"use strict";var t=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,n=/\((c|tm|r|p)\)/i,r=/\((c|tm|r|p)\)/gi,o={c:"©",r:"®",p:"§",tm:"™"};function a(e,t){return o[t.toLowerCase()]}function i(e){var t,n,o=0;for(t=e.length-1;t>=0;t--)"text"!==(n=e[t]).type||o||(n.content=n.content.replace(r,a)),"link_open"===n.type&&"auto"===n.info&&o--,"link_close"===n.type&&"auto"===n.info&&o++}function s(e){var n,r,o=0;for(n=e.length-1;n>=0;n--)"text"!==(r=e[n]).type||o||t.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===r.type&&"auto"===r.info&&o--,"link_close"===r.type&&"auto"===r.info&&o++}e.exports=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)"inline"===e.tokens[r].type&&(n.test(e.tokens[r].content)&&i(e.tokens[r].children),t.test(e.tokens[r].content)&&s(e.tokens[r].children))}},28867:function(e,t,n){"use strict";var r=n(39615).isWhiteSpace,o=n(39615).isPunctChar,a=n(39615).isMdAsciiPunct,i=/['"]/,s=/['"]/g;function l(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}function c(e,t){var n,i,c,u,p,d,m,h,f,g,v,b,k,y,w,E,_,C,S,x,j;for(S=[],n=0;n<e.length;n++){for(i=e[n],m=e[n].level,_=S.length-1;_>=0&&!(S[_].level<=m);_--);if(S.length=_+1,"text"===i.type){p=0,d=(c=i.content).length;e:for(;p<d&&(s.lastIndex=p,u=s.exec(c));){if(w=E=!0,p=u.index+1,C="'"===u[0],f=32,u.index-1>=0)f=c.charCodeAt(u.index-1);else for(_=n-1;_>=0&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_--)if(e[_].content){f=e[_].content.charCodeAt(e[_].content.length-1);break}if(g=32,p<d)g=c.charCodeAt(p);else for(_=n+1;_<e.length&&("softbreak"!==e[_].type&&"hardbreak"!==e[_].type);_++)if(e[_].content){g=e[_].content.charCodeAt(0);break}if(v=a(f)||o(String.fromCharCode(f)),b=a(g)||o(String.fromCharCode(g)),k=r(f),(y=r(g))?w=!1:b&&(k||v||(w=!1)),k?E=!1:v&&(y||b||(E=!1)),34===g&&'"'===u[0]&&f>=48&&f<=57&&(E=w=!1),w&&E&&(w=v,E=b),w||E){if(E)for(_=S.length-1;_>=0&&(h=S[_],!(S[_].level<m));_--)if(h.single===C&&S[_].level===m){h=S[_],C?(x=t.md.options.quotes[2],j=t.md.options.quotes[3]):(x=t.md.options.quotes[0],j=t.md.options.quotes[1]),i.content=l(i.content,u.index,j),e[h.token].content=l(e[h.token].content,h.pos,x),p+=j.length-1,h.token===n&&(p+=x.length-1),d=(c=i.content).length,S.length=_;continue e}w?S.push({token:n,pos:u.index,single:C,level:m}):E&&C&&(i.content=l(i.content,u.index,"’"))}else C&&(i.content=l(i.content,u.index,"’"))}}}}e.exports=function(e){var t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&i.test(e.tokens[t].content)&&c(e.tokens[t].children,e)}},30727:function(e,t,n){"use strict";var r=n(71872);function o(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}o.prototype.Token=r,e.exports=o},73273:function(e){"use strict";var t=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,n=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/;e.exports=function(e,r){var o,a,i,s,l,c,u=e.pos;if(60!==e.src.charCodeAt(u))return!1;for(l=e.pos,c=e.posMax;;){if(++u>=c)return!1;if(60===(s=e.src.charCodeAt(u)))return!1;if(62===s)break}return o=e.src.slice(l+1,u),n.test(o)?(a=e.md.normalizeLink(o),!!e.md.validateLink(a)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",a]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(o),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=o.length+2,!0)):!!t.test(o)&&(a=e.md.normalizeLink("mailto:"+o),!!e.md.validateLink(a)&&(r||((i=e.push("link_open","a",1)).attrs=[["href",a]],i.markup="autolink",i.info="auto",(i=e.push("text","",0)).content=e.md.normalizeLinkText(o),(i=e.push("link_close","a",-1)).markup="autolink",i.info="auto"),e.pos+=o.length+2,!0))}},7912:function(e){"use strict";e.exports=function(e,t){var n,r,o,a,i,s,l,c,u=e.pos;if(96!==e.src.charCodeAt(u))return!1;for(n=u,u++,r=e.posMax;u<r&&96===e.src.charCodeAt(u);)u++;if(l=(o=e.src.slice(n,u)).length,e.backticksScanned&&(e.backticks[l]||0)<=n)return t||(e.pending+=o),e.pos+=l,!0;for(i=s=u;-1!==(i=e.src.indexOf("`",s));){for(s=i+1;s<r&&96===e.src.charCodeAt(s);)s++;if((c=s-i)===l)return t||((a=e.push("code_inline","code",0)).markup=o,a.content=e.src.slice(u,i).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=s,!0;e.backticks[c]=i}return e.backticksScanned=!0,t||(e.pending+=o),e.pos+=l,!0}},76399:function(e){"use strict";function t(e,t){var n,r,o,a,i,s,l,c,u={},p=t.length;if(p){var d=0,m=-2,h=[];for(n=0;n<p;n++)if(o=t[n],h.push(0),t[d].marker===o.marker&&m===o.token-1||(d=n),m=o.token,o.length=o.length||0,o.close){for(u.hasOwnProperty(o.marker)||(u[o.marker]=[-1,-1,-1,-1,-1,-1]),i=u[o.marker][(o.open?3:0)+o.length%3],s=r=d-h[d]-1;r>i;r-=h[r]+1)if((a=t[r]).marker===o.marker&&a.open&&a.end<0&&(l=!1,(a.close||o.open)&&(a.length+o.length)%3==0&&(a.length%3==0&&o.length%3==0||(l=!0)),!l)){c=r>0&&!t[r-1].open?h[r-1]+1:0,h[n]=n-r+c,h[r]=c,o.open=!1,a.end=n,a.close=!1,s=-1,m=-2;break}-1!==s&&(u[o.marker][(o.open?3:0)+(o.length||0)%3]=s)}}}e.exports=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(t(0,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&t(0,r[n].delimiters)}},56141:function(e){"use strict";function t(e,t){var n,r,o,a,i,s;for(n=t.length-1;n>=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(o=t[r.end],s=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),(a=e.tokens[r.token]).type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?i+i:i,a.content="",(a=e.tokens[o.token]).type=s?"strong_close":"em_close",a.tag=s?"strong":"em",a.nesting=-1,a.markup=s?i+i:i,a.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.w=function(e,t){var n,r,o=e.pos,a=e.src.charCodeAt(o);if(t)return!1;if(95!==a&&42!==a)return!1;for(r=e.scanDelims(e.pos,42===a),n=0;n<r.length;n++)e.push("text","",0).content=String.fromCharCode(a),e.delimiters.push({marker:a,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},54408:function(e,t,n){"use strict";var r=n(38337),o=n(39615).has,a=n(39615).isValidEntityCode,i=n(39615).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,l=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,u=e.pos,p=e.posMax;if(38!==e.src.charCodeAt(u))return!1;if(u+1<p)if(35===e.src.charCodeAt(u+1)){if(c=e.src.slice(u).match(s))return t||(n="x"===c[1][0].toLowerCase()?parseInt(c[1].slice(1),16):parseInt(c[1],10),e.pending+=a(n)?i(n):i(65533)),e.pos+=c[0].length,!0}else if((c=e.src.slice(u).match(l))&&o(r,c[1]))return t||(e.pending+=r[c[1]]),e.pos+=c[0].length,!0;return t||(e.pending+="&"),e.pos++,!0}},8329:function(e,t,n){"use strict";for(var r=n(39615).isSpace,o=[],a=0;a<256;a++)o.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach((function(e){o[e.charCodeAt(0)]=1})),e.exports=function(e,t){var n,a=e.pos,i=e.posMax;if(92!==e.src.charCodeAt(a))return!1;if(++a<i){if((n=e.src.charCodeAt(a))<256&&0!==o[n])return t||(e.pending+=e.src[a]),e.pos+=2,!0;if(10===n){for(t||e.push("hardbreak","br",0),a++;a<i&&(n=e.src.charCodeAt(a),r(n));)a++;return e.pos=a,!0}}return t||(e.pending+="\\"),e.pos++,!0}},9955:function(e,t,n){"use strict";var r=n(36570).n;e.exports=function(e,t){var n,o,a,i=e.pos;return!!e.md.options.html&&(a=e.posMax,!(60!==e.src.charCodeAt(i)||i+2>=a)&&(!(33!==(n=e.src.charCodeAt(i+1))&&63!==n&&47!==n&&!function(e){var t=32|e;return t>=97&&t<=122}(n))&&(!!(o=e.src.slice(i).match(r))&&(t||(e.push("html_inline","",0).content=e.src.slice(i,i+o[0].length)),e.pos+=o[0].length,!0))))}},92560:function(e,t,n){"use strict";var r=n(39615).normalizeReference,o=n(39615).isSpace;e.exports=function(e,t){var n,a,i,s,l,c,u,p,d,m,h,f,g,v="",b=e.pos,k=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;if(c=e.pos+2,(l=e.md.helpers.parseLinkLabel(e,e.pos+1,!1))<0)return!1;if((u=l+1)<k&&40===e.src.charCodeAt(u)){for(u++;u<k&&(a=e.src.charCodeAt(u),o(a)||10===a);u++);if(u>=k)return!1;for(g=u,(d=e.md.helpers.parseLinkDestination(e.src,u,e.posMax)).ok&&(v=e.md.normalizeLink(d.str),e.md.validateLink(v)?u=d.pos:v=""),g=u;u<k&&(a=e.src.charCodeAt(u),o(a)||10===a);u++);if(d=e.md.helpers.parseLinkTitle(e.src,u,e.posMax),u<k&&g!==u&&d.ok)for(m=d.str,u=d.pos;u<k&&(a=e.src.charCodeAt(u),o(a)||10===a);u++);else m="";if(u>=k||41!==e.src.charCodeAt(u))return e.pos=b,!1;u++}else{if(void 0===e.env.references)return!1;if(u<k&&91===e.src.charCodeAt(u)?(g=u+1,(u=e.md.helpers.parseLinkLabel(e,u))>=0?s=e.src.slice(g,u++):u=l+1):u=l+1,s||(s=e.src.slice(c,l)),!(p=e.env.references[r(s)]))return e.pos=b,!1;v=p.href,m=p.title}return t||(i=e.src.slice(c,l),e.md.inline.parse(i,e.md,e.env,f=[]),(h=e.push("image","img",0)).attrs=n=[["src",v],["alt",""]],h.children=f,h.content=i,m&&n.push(["title",m])),e.pos=u,e.posMax=k,!0}},95028:function(e,t,n){"use strict";var r=n(39615).normalizeReference,o=n(39615).isSpace;e.exports=function(e,t){var n,a,i,s,l,c,u,p,d="",m="",h=e.pos,f=e.posMax,g=e.pos,v=!0;if(91!==e.src.charCodeAt(e.pos))return!1;if(l=e.pos+1,(s=e.md.helpers.parseLinkLabel(e,e.pos,!0))<0)return!1;if((c=s+1)<f&&40===e.src.charCodeAt(c)){for(v=!1,c++;c<f&&(a=e.src.charCodeAt(c),o(a)||10===a);c++);if(c>=f)return!1;if(g=c,(u=e.md.helpers.parseLinkDestination(e.src,c,e.posMax)).ok){for(d=e.md.normalizeLink(u.str),e.md.validateLink(d)?c=u.pos:d="",g=c;c<f&&(a=e.src.charCodeAt(c),o(a)||10===a);c++);if(u=e.md.helpers.parseLinkTitle(e.src,c,e.posMax),c<f&&g!==c&&u.ok)for(m=u.str,c=u.pos;c<f&&(a=e.src.charCodeAt(c),o(a)||10===a);c++);}(c>=f||41!==e.src.charCodeAt(c))&&(v=!0),c++}if(v){if(void 0===e.env.references)return!1;if(c<f&&91===e.src.charCodeAt(c)?(g=c+1,(c=e.md.helpers.parseLinkLabel(e,c))>=0?i=e.src.slice(g,c++):c=s+1):c=s+1,i||(i=e.src.slice(l,s)),!(p=e.env.references[r(i)]))return e.pos=h,!1;d=p.href,m=p.title}return t||(e.pos=l,e.posMax=s,e.push("link_open","a",1).attrs=n=[["href",d]],m&&n.push(["title",m]),e.md.inline.tokenize(e),e.push("link_close","a",-1)),e.pos=c,e.posMax=f,!0}},62378:function(e,t,n){"use strict";var r=n(39615).isSpace;e.exports=function(e,t){var n,o,a,i=e.pos;if(10!==e.src.charCodeAt(i))return!1;if(n=e.pending.length-1,o=e.posMax,!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(a=n-1;a>=1&&32===e.pending.charCodeAt(a-1);)a--;e.pending=e.pending.slice(0,a),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(i++;i<o&&r(e.src.charCodeAt(i));)i++;return e.pos=i,!0}},25240:function(e,t,n){"use strict";var r=n(71872),o=n(39615).isWhiteSpace,a=n(39615).isPunctChar,i=n(39615).isMdAsciiPunct;function s(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1}s.prototype.pushPending=function(){var e=new r("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,n){this.pending&&this.pushPending();var o=new r(e,t,n),a=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],a={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(a),o},s.prototype.scanDelims=function(e,t){var n,r,s,l,c,u,p,d,m,h=e,f=!0,g=!0,v=this.posMax,b=this.src.charCodeAt(e);for(n=e>0?this.src.charCodeAt(e-1):32;h<v&&this.src.charCodeAt(h)===b;)h++;return s=h-e,r=h<v?this.src.charCodeAt(h):32,p=i(n)||a(String.fromCharCode(n)),m=i(r)||a(String.fromCharCode(r)),u=o(n),(d=o(r))?f=!1:m&&(u||p||(f=!1)),u?g=!1:p&&(d||m||(g=!1)),t?(l=f,c=g):(l=f&&(!g||p),c=g&&(!f||m)),{can_open:l,can_close:c,length:s}},s.prototype.Token=r,e.exports=s},54988:function(e){"use strict";function t(e,t){var n,r,o,a,i,s=[],l=t.length;for(n=0;n<l;n++)126===(o=t[n]).marker&&-1!==o.end&&(a=t[o.end],(i=e.tokens[o.token]).type="s_open",i.tag="s",i.nesting=1,i.markup="~~",i.content="",(i=e.tokens[a.token]).type="s_close",i.tag="s",i.nesting=-1,i.markup="~~",i.content="","text"===e.tokens[a.token-1].type&&"~"===e.tokens[a.token-1].content&&s.push(a.token-1));for(;s.length;){for(r=(n=s.pop())+1;r<e.tokens.length&&"s_close"===e.tokens[r].type;)r++;n!==--r&&(i=e.tokens[r],e.tokens[r]=e.tokens[n],e.tokens[n]=i)}}e.exports.w=function(e,t){var n,r,o,a,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(126!==s)return!1;if(o=(r=e.scanDelims(e.pos,!0)).length,a=String.fromCharCode(s),o<2)return!1;for(o%2&&(e.push("text","",0).content=a,o--),n=0;n<o;n+=2)e.push("text","",0).content=a+a,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0},e.exports.g=function(e){var n,r=e.tokens_meta,o=e.tokens_meta.length;for(t(e,e.delimiters),n=0;n<o;n++)r[n]&&r[n].delimiters&&t(e,r[n].delimiters)}},10937:function(e){"use strict";function t(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}e.exports=function(e,n){for(var r=e.pos;r<e.posMax&&!t(e.src.charCodeAt(r));)r++;return r!==e.pos&&(n||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}},52406:function(e){"use strict";e.exports=function(e){var t,n,r=0,o=e.tokens,a=e.tokens.length;for(t=n=0;t<a;t++)o[t].nesting<0&&r--,o[t].level=r,o[t].nesting>0&&r++,"text"===o[t].type&&t+1<a&&"text"===o[t+1].type?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}},71872:function(e){"use strict";function t(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}t.prototype.attrIndex=function(e){var t,n,r;if(!this.attrs)return-1;for(n=0,r=(t=this.attrs).length;n<r;n++)if(t[n][0]===e)return n;return-1},t.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},t.prototype.attrSet=function(e,t){var n=this.attrIndex(e),r=[e,t];n<0?this.attrPush(r):this.attrs[n]=r},t.prototype.attrGet=function(e){var t=this.attrIndex(e),n=null;return t>=0&&(n=this.attrs[t][1]),n},t.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=t},64309:function(e){"use strict";var t={};function n(e,r){var o;return"string"!=typeof r&&(r=n.defaultChars),o=function(e){var n,r,o=t[e];if(o)return o;for(o=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),o.push(r);for(n=0;n<e.length;n++)o[r=e.charCodeAt(n)]="%"+("0"+r.toString(16).toUpperCase()).slice(-2);return o}(r),e.replace(/(%[a-f0-9]{2})+/gi,(function(e){var t,n,r,a,i,s,l,c="";for(t=0,n=e.length;t<n;t+=3)(r=parseInt(e.slice(t+1,t+3),16))<128?c+=o[r]:192==(224&r)&&t+3<n&&128==(192&(a=parseInt(e.slice(t+4,t+6),16)))?(c+=(l=r<<6&1984|63&a)<128?"��":String.fromCharCode(l),t+=3):224==(240&r)&&t+6<n&&(a=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),128==(192&a)&&128==(192&i))?(c+=(l=r<<12&61440|a<<6&4032|63&i)<2048||l>=55296&&l<=57343?"���":String.fromCharCode(l),t+=6):240==(248&r)&&t+9<n&&(a=parseInt(e.slice(t+4,t+6),16),i=parseInt(e.slice(t+7,t+9),16),s=parseInt(e.slice(t+10,t+12),16),128==(192&a)&&128==(192&i)&&128==(192&s))?((l=r<<18&1835008|a<<12&258048|i<<6&4032|63&s)<65536||l>1114111?c+="����":(l-=65536,c+=String.fromCharCode(55296+(l>>10),56320+(1023&l))),t+=9):c+="�";return c}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="",e.exports=n},16087:function(e){"use strict";var t={};function n(e,r,o){var a,i,s,l,c,u="";for("string"!=typeof r&&(o=r,r=n.defaultChars),void 0===o&&(o=!0),c=function(e){var n,r,o=t[e];if(o)return o;for(o=t[e]=[],n=0;n<128;n++)r=String.fromCharCode(n),/^[0-9a-z]$/i.test(r)?o.push(r):o.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2));for(n=0;n<e.length;n++)o[e.charCodeAt(n)]=e[n];return o}(r),a=0,i=e.length;a<i;a++)if(s=e.charCodeAt(a),o&&37===s&&a+2<i&&/^[0-9a-f]{2}$/i.test(e.slice(a+1,a+3)))u+=e.slice(a,a+3),a+=2;else if(s<128)u+=c[s];else if(s>=55296&&s<=57343){if(s>=55296&&s<=56319&&a+1<i&&(l=e.charCodeAt(a+1))>=56320&&l<=57343){u+=encodeURIComponent(e[a]+e[a+1]),a++;continue}u+="%EF%BF%BD"}else u+=encodeURIComponent(e[a]);return u}n.defaultChars=";/?:@&=+$,-_.!~*'()#",n.componentChars="-_.!~*'()",e.exports=n},46175:function(e){"use strict";e.exports=function(e){var t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||""}},49236:function(e,t,n){"use strict";e.exports.encode=n(16087),e.exports.decode=n(64309),e.exports.format=n(46175),e.exports.parse=n(57507)},57507:function(e){"use strict";function t(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}var n=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),i=["'"].concat(a),s=["%","/","?",";","#"].concat(i),l=["/","?","#"],c=/^[+a-z0-9A-Z_-]{0,63}$/,u=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},d={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};t.prototype.parse=function(e,t){var r,a,i,m,h,f=e;if(f=f.trim(),!t&&1===e.split("#").length){var g=o.exec(f);if(g)return this.pathname=g[1],g[2]&&(this.search=g[2]),this}var v=n.exec(f);if(v&&(i=(v=v[0]).toLowerCase(),this.protocol=v,f=f.substr(v.length)),(t||v||f.match(/^\/\/[^@\/]+@[^@\/]+/))&&(!(h="//"===f.substr(0,2))||v&&p[v]||(f=f.substr(2),this.slashes=!0)),!p[v]&&(h||v&&!d[v])){var b,k,y=-1;for(r=0;r<l.length;r++)-1!==(m=f.indexOf(l[r]))&&(-1===y||m<y)&&(y=m);for(-1!==(k=-1===y?f.lastIndexOf("@"):f.lastIndexOf("@",y))&&(b=f.slice(0,k),f=f.slice(k+1),this.auth=b),y=-1,r=0;r<s.length;r++)-1!==(m=f.indexOf(s[r]))&&(-1===y||m<y)&&(y=m);-1===y&&(y=f.length),":"===f[y-1]&&y--;var w=f.slice(0,y);f=f.slice(y),this.parseHost(w),this.hostname=this.hostname||"";var E="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!E){var _=this.hostname.split(/\./);for(r=0,a=_.length;r<a;r++){var C=_[r];if(C&&!C.match(c)){for(var S="",x=0,j=C.length;x<j;x++)C.charCodeAt(x)>127?S+="x":S+=C[x];if(!S.match(c)){var L=_.slice(0,r),P=_.slice(r+1),A=C.match(u);A&&(L.push(A[1]),P.unshift(A[2])),P.length&&(f=P.join(".")+f),this.hostname=L.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),E&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var T=f.indexOf("#");-1!==T&&(this.hash=f.substr(T),f=f.slice(0,T));var N=f.indexOf("?");return-1!==N&&(this.search=f.substr(N),f=f.slice(0,N)),f&&(this.pathname=f),d[i]&&this.hostname&&!this.pathname&&(this.pathname=""),this},t.prototype.parseHost=function(e){var t=r.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},e.exports=function(e,n){if(e&&e instanceof t)return e;var r=new t;return r.parse(e,n),r}},46409:function(e,t){"use strict";t.Z={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},48026:function(){},93468:function(e,t){"use strict";t.Z={global:"_fUXxnSp5pagKBp9gSN7"}},5743:function(e,t){"use strict";t.Z={wrapper:"h2NGkiVs1r1nf85LtJpF","conversion-notice":"k3Apzwo3v9n0IaHbB8tf"}},73171:function(e){var t=1e3,n=60*t,r=60*n,o=24*r,a=7*o,i=365.25*o;function s(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,l){l=l||{};var c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!s)return;var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return l*i;case"weeks":case"week":case"w":return l*a;case"days":case"day":case"d":return l*o;case"hours":case"hour":case"hrs":case"hr":case"h":return l*r;case"minutes":case"minute":case"mins":case"min":case"m":return l*n;case"seconds":case"second":case"secs":case"sec":case"s":return l*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}(e);if("number"===c&&isFinite(e))return l.long?function(e){var a=Math.abs(e);if(a>=o)return s(e,a,o,"day");if(a>=r)return s(e,a,r,"hour");if(a>=n)return s(e,a,n,"minute");if(a>=t)return s(e,a,t,"second");return e+" ms"}(e):function(e){var a=Math.abs(e);if(a>=o)return Math.round(e/o)+"d";if(a>=r)return Math.round(e/r)+"h";if(a>=n)return Math.round(e/n)+"m";if(a>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},68308:function(e,t,n){"use strict";n.d(t,{B:function(){return i}});var r=n(97740),o=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],a=/[^A-Z0-9]+/gi;function i(e,t){void 0===t&&(t={});for(var n=t.splitRegexp,i=void 0===n?o:n,l=t.stripRegexp,c=void 0===l?a:l,u=t.transform,p=void 0===u?r.U:u,d=t.delimiter,m=void 0===d?" ":d,h=s(s(e,i,"$1\0$2"),c,"\0"),f=0,g=h.length;"\0"===h.charAt(f);)f++;for(;"\0"===h.charAt(g-1);)g--;return h.slice(f,g).split("\0").map(p).join(m)}function s(e,t,n){return t instanceof RegExp?e.replace(t,n):t.reduce((function(e,t){return e.replace(t,n)}),e)}},76854:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var r=n(38697),o=n(77352);function a(e,t){return void 0===t&&(t={}),(0,o.$)(e,(0,r.pi)({delimiter:"-"},t))}},72867:function(e,t,n){"use strict";n.d(t,{By:function(){return a},Ho:function(){return s},Pv:function(){return i}});var r=n(38697),o=n(68308);function a(e,t){var n=e.charAt(0),r=e.substr(1).toLowerCase();return t>0&&n>="0"&&n<="9"?"_"+n+r:""+n.toUpperCase()+r}function i(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function s(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:"",transform:a},t))}},76559:function(e,t,n){"use strict";n.d(t,{Y:function(){return a}});var r=n(38697),o=n(77352);function a(e,t){return void 0===t&&(t={}),(0,o.$)(e,(0,r.pi)({delimiter:"/"},t))}},69424:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(94273),o=n.n(r),a=n(53191),i=n.n(a),s=n(51128),l=n.n(s)()("photon"),c={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},u="__domain__.invalid",p="http://".concat(u),d="https://i0.wp.com";function m(e,t){var n;try{n=new URL(e,p)}catch(e){return null}var r,a,s,m,h,f="https:"===n.protocol,g=new URL(d);if(h=n.host,/^i[0-2]\.wp\.com$/.test(h))g.pathname=n.pathname,g.hostname=n.hostname;else{if(n.search)return null;var v=n.href.replace("".concat(n.protocol,"/"),"");"blob:"===n.protocol&&(v=n.pathname.replace("://","//")),n.hostname===u&&(v=n.pathname),g.pathname=v,g.hostname=(r=v,a=o()(r),s=i()(a),m="i"+Math.floor(3*s()),l('determined server "%s" to use with "%s"',m,r),m+".wp.com"),f&&g.searchParams.set("ssl",1)}if(t)for(var b in t)"host"!==b&&"hostname"!==b?"secure"!==b||t[b]?g.searchParams.set(c[b]||b,t[b]):g.protocol="http:":g.hostname=t[b];return l("generated Photon URL: %s",g.href),g.href}},469:function(e,t,n){"use strict";var r=n(90758);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},25162:function(e,t,n){e.exports=n(469)()},90758:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},40142:function(e,t){"use strict";var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var r,a,i=[];for(a in"string"!=typeof t&&(t="?"),e)if(n.call(e,a)){if((r=e[a])||null!=r&&!isNaN(r)||(r=""),a=o(a),r=o(r),null===a||null===r)continue;i.push(a+"="+r)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,o={};t=n.exec(e);){var a=r(t[1]),i=r(t[2]);null===a||null===i||a in o||(o[a]=i)}return o}},51516:function(e,t,n){"use strict";var r=n(91850);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},82298:function(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},6209:function(e,t){"use strict";var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),a="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var i=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,o=0;function i(){n&&(n=!1,e()),r&&l()}function s(){a(i)}function l(){var e=Date.now();if(n){if(e-o<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);o=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;i.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},u=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},p=v(0,0,0,0);function d(e){return parseFloat(e)||0}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+d(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var r=u(e).getComputedStyle(e),o=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],a=e["padding-"+o];t[o]=d(a)}return t}(r),a=o.left+o.right,i=o.top+o.bottom,s=d(r.width),l=d(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==t&&(s-=m(r,"left","right")+a),Math.round(l+i)!==n&&(l-=m(r,"top","bottom")+i)),!function(e){return e===u(e).document.documentElement}(e)){var c=Math.round(s+a)-t,h=Math.round(l+i)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(h)&&(l-=h)}return v(o.left,o.top,s,l)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof u(e).SVGGraphicsElement}:function(e){return e instanceof u(e).SVGElement&&"function"==typeof e.getBBox};function g(e){return r?f(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):h(e):p}function v(e,t,n,r){return{x:e,y:t,width:n,height:r}}var b=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=g(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,r,o,a,i,s,l,u=(r=(n=t).x,o=n.y,a=n.width,i=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),c(l,{x:r,y:o,width:a,height:i,top:o,right:r+a,bottom:i+o,left:r}),l);c(this,{target:e,contentRect:u})},y=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new b(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof u(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,E=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),r=new y(t,n,this);w.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){E.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));var _=void 0!==o.ResizeObserver?o.ResizeObserver:E;t.Z=_},53191:function(e){"use strict";var t=256,n=[],r=window,o=Math.pow(t,6),a=Math.pow(2,52),i=2*a,s=255,l=Math.random;function c(e){var n,r=e.length,o=this,a=0,i=o.i=o.j=0,l=o.S=[];for(r||(e=[r++]);a<t;)l[a]=a++;for(a=0;a<t;a++)l[a]=l[i=s&i+e[a%r]+(n=l[a])],l[i]=n;(o.g=function(e){for(var n,r=0,a=o.i,i=o.j,l=o.S;e--;)n=l[a=s&a+1],r=r*t+l[s&(l[a]=l[i=s&i+n])+(l[i]=n)];return o.i=a,o.j=i,r})(t)}function u(e,t){var n,r=[],o=(typeof e)[0];if(t&&"o"==o)for(n in e)try{r.push(u(e[n],t-1))}catch(e){}return r.length?r:"s"==o?e:e+"\0"}function p(e,t){for(var n,r=e+"",o=0;o<r.length;)t[s&o]=s&(n^=19*t[s&o])+r.charCodeAt(o++);return d(t)}function d(e){return String.fromCharCode.apply(0,e)}e.exports=function(s,l){if(l&&!0===l.global)return l.global=!1,Math.random=e.exports(s,l),l.global=!0,Math.random;var m=[],h=(p(u(l&&l.entropy||!1?[s,d(n)]:0 in arguments?s:function(e){try{return r.crypto.getRandomValues(e=new Uint8Array(t)),d(e)}catch(e){return[+new Date,r,r.navigator&&r.navigator.plugins,r.screen,d(n)]}}(),3),m),new c(m));return p(d(h.S),n),function(){for(var e=h.g(6),n=o,r=0;e<a;)e=(e+r)*t,n*=t,r=h.g(1);for(;e>=i;)e/=2,n/=2,r>>>=1;return(e+r)/n}},e.exports.resetGlobal=function(){Math.random=l},p(Math.random(),n)},44434:function(e,t,n){"use strict";n.d(t,{G:function(){return s},a:function(){return i}});var r=n(38697),o=n(68308),a=n(83078);function i(e,t){var n=e.toLowerCase();return 0===t?(0,a.l)(n):n}function s(e,t){return void 0===t&&(t={}),(0,o.B)(e,(0,r.pi)({delimiter:" ",transform:i},t))}},59491:function(e,t,n){"use strict";n.d(t,{f:function(){return a}});var r=n(38697),o=n(77352);function a(e,t){return void 0===t&&(t={}),(0,o.$)(e,(0,r.pi)({delimiter:"_"},t))}},36222:function(e,t,n){"use strict";n.d(t,{$L:function(){return l.$L},X_:function(){return s.X_},jt:function(){return r.Z},oN:function(){return s.oN},pw:function(){return o.Z},tK:function(){return i.tK},u_:function(){return a.u_},v_:function(){return a.v_}});n(2890),n(56694);var r=n(67742),o=n(42194),a=(n(13109),n(59822)),i=n(58890),s=n(20281),l=n(16700)},67742:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51128),o=n.n(r),a=n(56694);const i=o()("jetpack-ai-client:ask-question");async function s(e){let{postId:t=null,fromCache:n=!1,feature:r,functions:o,model:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i("Asking question: %o. options: %o",e,{postId:t,fromCache:n,feature:r,functions:o,model:s}),new a.Z({question:e,options:{postId:t,feature:r,fromCache:n,functions:o,model:s}})}},4437:function(e,t,n){"use strict";var r=n(52175),o=n(55609),a=n(94333),i=n(69307),s=n(65736),l=n(6163),c=n(61074),u=n(90986),p=n(79201),d=n(65235),m=n.n(d),h=n(99196),f=n.n(h),g=n(11928),v=n(22291);const __=s.__,b=()=>{};t.Z=(0,i.forwardRef)((function(e,t){let{disabled:n=!1,value:s="",placeholder:d="",showAccept:h=!1,acceptLabel:k=__("Accept","jetpack"),showButtonLabels:y=!0,isTransparent:w=!1,state:E="init",showClearButton:_=!0,showGuideLine:C=!1,onChange:S=b,onSend:x=b,onStop:j=b,onAccept:L=b}=e;const P=(0,i.useRef)(null),A="requesting"===E||"suggesting"===E;(0,i.useImperativeHandle)(t,(()=>P.current)),(0,a.useKeyboardShortcut)("mod+enter",(()=>{h&&L?.()}),{target:P}),(0,a.useKeyboardShortcut)("enter",(e=>{e.preventDefault(),x?.(s)}),{target:P});const T=m()("jetpack-components-ai-control__controls-prompt_button",{"has-label":y});return f().createElement("div",{className:"jetpack-components-ai-control__container"},f().createElement("div",{className:m()("jetpack-components-ai-control__wrapper",{"is-transparent":w})},f().createElement(g.Z,{state:E}),f().createElement("div",{className:"jetpack-components-ai-control__input-wrapper"},f().createElement(r.PlainText,{value:s,onChange:S,placeholder:d,className:"jetpack-components-ai-control__input",disabled:A||n,ref:P})),s?.length>0&&_&&f().createElement(o.Button,{icon:l.Z,className:"jetpack-components-ai-control__clear",onClick:()=>S("")}),f().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},A?f().createElement(o.Button,{className:T,onClick:j,isSmall:!0,label:__("Stop request","jetpack")},f().createElement(c.Z,{icon:l.Z}),y&&__("Stop (ESC)","jetpack")):f().createElement(o.Button,{className:T,onClick:()=>x?.(s),isSmall:!0,disabled:!s?.length||n,label:__("Send request","jetpack")},f().createElement(c.Z,{icon:u.Z}),y&&__("Send","jetpack"))),h&&f().createElement("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper"},f().createElement(o.Button,{className:T,onClick:L,isSmall:!0,label:k},f().createElement(c.Z,{icon:p.Z}),y&&k))),C&&f().createElement(v.Eo,null))}))},22291:function(e,t,n){"use strict";n.d(t,{Eo:function(){return v}});var r=n(55609),o=n(69307),a=n(65736),i=n(30797),s=n(23435),l=n(79201),c=n(90496),u=n(61074);const __=a.__,p="warning",d="error",m="success",h="info",f={[p]:i.Z,[d]:s.Z,[m]:l.Z,[h]:c.Z};function g(e){let{severity:t=null,icon:n=null,children:r}=e;return React.createElement("div",{className:"jetpack-ai-assistant__message"},(t||n)&&React.createElement(u.Z,{icon:f[t]||n}),React.createElement("div",{className:"jetpack-ai-assistant__message-content"},r))}function v(){return React.createElement(g,{severity:h},(0,o.createInterpolateElement)(__("AI-generated content could be inaccurate or biased. <link>Learn more</link>","jetpack"),{link:React.createElement(r.ExternalLink,{href:"https://automattic.com/ai-guidelines"})}))}},11928:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(55609),o=n(65235),a=n.n(o),i=n(59822);function s(e){let{state:t,size:n=24}=e;return React.createElement("div",{className:a()("jetpack-ai-status-indicator__icon-wrapper",{[`is-${t}`]:!0})},React.createElement(r.Icon,{icon:i.u_,size:n}))}},590:function(e,t,n){"use strict";n(69307)},58890:function(e,t,n){"use strict";n.d(t,{tK:function(){return r.Z}});var r=n(4437);n(11928),n(590),n(22291)},62282:function(e,t,n){"use strict";n.d(t,{h:function(){return s},u:function(){return i}});var r=n(69307),o=n(99196),a=n.n(o);const i=(0,r.createContext)({}),s=e=>{let{value:t,children:n}=e;return a().createElement(i.Provider,{value:t,children:n})}},20281:function(e,t,n){"use strict";n.d(t,{X_:function(){return a.Z},hE:function(){return r.h},oN:function(){return o.Z},uE:function(){return r.u}});var r=n(62282),o=n(3669),a=n(79466)},79466:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(69307),o=n(16700),a=n(20281);function i(){let{onDone:e,onSuggestion:t,onError:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=(0,r.useContext)(a.uE),{eventSource:s}=i,l=(0,r.useCallback)((t=>e?.(t?.detail)),[e]),c=(0,r.useCallback)((e=>t?.(e?.detail)),[t]),u=(0,r.useCallback)((e=>{n?.(e?.detail)}),[]);return(0,r.useEffect)((()=>{if(s)return e&&s.addEventListener("done",l),t&&s.addEventListener("suggestion",c),n&&s.addEventListener(o.vF,u),()=>{s.removeEventListener("done",l),s.removeEventListener("suggestion",c),s.removeEventListener(o.vF,u)}}),[s]),i}},3669:function(e,t,n){"use strict";var r=n(94333),o=n(69307),a=n(99196),i=n.n(a),s=n(36222),l=n(20281);const c=(0,r.createHigherOrderComponent)((e=>t=>{const{suggestion:n,error:r,requestingState:a,request:c,stopSuggestion:u,eventSource:p}=(0,s.pw)(),d=(0,o.useMemo)((()=>({suggestion:n,requestingError:r,requestingState:a,eventSource:p,requestSuggestion:c,stopSuggestion:u})),[n,r,a,p,c,u]);return i().createElement(l.hE,{value:d},i().createElement(e,t))}),"withAiDataProvider");t.Z=c},42194:function(e,t,n){"use strict";n.d(t,{A:function(){return u},Z:function(){return p}});var r=n(69307),o=n(65736),a=n(51128),i=n.n(a),s=n(67742),l=n(16700);const __=o.__,c=i()("jetpack-ai-client:use-suggestion");function u(e){switch(e){case l.$L:return{code:l.$L,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};case l.bC:return{code:l.bC,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};case l.$u:return{code:l.$u,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};case l.q4:return{code:l.q4,message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),severity:"info"};case l.co:default:return{code:l.co,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}function p(){let{prompt:e,autoRequest:t=!1,askQuestionOptions:n={},onSuggestion:o,onDone:a,onError:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[p,d]=(0,r.useState)("init"),[m,h]=(0,r.useState)(""),[f,g]=(0,r.useState)(),v=(0,r.useRef)(void 0),b=(0,r.useCallback)((e=>{h(e?.detail),o?.(e?.detail)}),[o]),k=(0,r.useCallback)((e=>{a?.(e?.detail),d("done")}),[a]),y=(0,r.useCallback)((e=>{v?.current?.close(),d("error"),g(u(e)),i?.(u(e))}),[i]),w=(0,r.useCallback)((()=>y(l.$L)),[]),E=(0,r.useCallback)((()=>y(l.bC)),[]),_=(0,r.useCallback)((()=>y(l.$u)),[]),C=(0,r.useCallback)((()=>y(l.q4)),[]),S=(0,r.useCallback)((()=>y(l.co)),[]),x=(0,r.useCallback)((async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{...n};Array.isArray(e)&&e?.length?e.forEach(((t,n)=>{let{role:r,content:o}=t;return c("(%s/%s) %o\n%s",n+1,e.length,`[${r}]`,o)})):c("%o",e),d("requesting");try{if(v.current=await(0,s.Z)(e,t),!v?.current)return;const n=v.current;d("suggesting"),n.addEventListener("suggestion",b),n.addEventListener(l.$L,w),n.addEventListener(l.bC,E),n.addEventListener(l.$u,_),n.addEventListener(l.q4,C),n.addEventListener(l.co,S),n.addEventListener("done",k)}catch(e){console.error(e)}}),[k,w,E,_,C,S,b]),j=(0,r.useCallback)((()=>{d("init"),h(""),g(void 0)}),[]),L=(0,r.useCallback)((()=>{if(!v?.current)return;const e=v?.current;e.close(),e.removeEventListener("suggestion",b),e.removeEventListener(l.$L,w),e.removeEventListener(l.bC,E),e.removeEventListener(l.$u,_),e.removeEventListener(l.q4,C),e.removeEventListener(l.co,S),e.removeEventListener("done",k),d("done")}),[v,b,w,E,_,C,S,k]);return(0,r.useEffect)((()=>{if(e?.length)return t&&x(e,n),()=>{L()}}),[t,e,x,L]),{suggestion:m,error:f,requestingState:p,request:x,stopSuggestion:L,reset:j,eventSource:v.current}}},13109:function(e,t,n){"use strict";n(69307)},61317:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);const i=a().createElement(r.SVG,{viewBox:"0 0 32 32",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"ai-assistant-icon"},a().createElement(r.Path,{className:"spark-first",d:"M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z"}),a().createElement(r.Path,{className:"spark-second",d:"M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z"}),a().createElement(r.Path,{className:"spark-third",d:"M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z"}));t.Z=i},59822:function(e,t,n){"use strict";n.d(t,{u_:function(){return r.Z},v_:function(){return o.Z}});var r=n(61317),o=(n(81204),n(4454),n(71893),n(52887),n(96083),n(50500))},81204:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Rect,r.Line,r.Path},4454:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Path,r.Path},96083:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Path,r.Rect,r.Rect},71893:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Path,r.Path},52887:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);r.SVG,r.Path,r.Rect},50500:function(e,t,n){"use strict";var r=n(55609),o=n(99196),a=n.n(o);const i=a().createElement(r.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a().createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 10C12.5 11.3807 11.3807 12.5 10 12.5C8.61929 12.5 7.5 11.3807 7.5 10C7.5 8.61929 8.61929 7.5 10 7.5C11.3807 7.5 12.5 8.61929 12.5 10ZM14 10C14 12.2091 12.2091 14 10 14C7.79086 14 6 12.2091 6 10C6 7.79086 7.79086 6 10 6C12.2091 6 14 7.79086 14 10ZM16.75 21V19C16.75 17.4812 15.5188 16.25 14 16.25L6 16.25C4.48122 16.25 3.25 17.4812 3.25 19V21H4.75L4.75 19C4.75 18.3096 5.30964 17.75 6 17.75L14 17.75C14.6904 17.75 15.25 18.3096 15.25 19V21H16.75Z",fill:"currentColor"}),a().createElement(r.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.976 16.3599C21.2507 14.5642 22.0001 12.3695 22.0001 9.99969C22.0001 7.63128 21.2515 5.43769 19.9782 3.64258L18.754 4.50967C19.8537 6.05996 20.5001 7.95434 20.5001 9.99969C20.5001 12.0464 19.8528 13.9419 18.7519 15.4928L19.976 16.3599ZM17.3357 14.4897C18.2357 13.222 18.7648 11.6727 18.7648 9.99969C18.7648 8.32808 18.2365 6.77984 17.3379 5.51279L16.1137 6.37988C16.8387 7.4021 17.2648 8.65114 17.2648 9.99969C17.2648 11.3496 16.8378 12.5998 16.1116 13.6226L17.3357 14.4897Z",fill:"currentColor"}));t.Z=i},2890:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(13419),o=n(86989),a=n.n(o),i=n(51128);const s=n.n(i)()("jetpack-ai-client:jwt"),l="jetpack-ai-jwt",c=12e4;async function u(){let{apiNonce:e,siteId:t,expirationTime:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,n=n||c;const o=(0,r.Wp)(),i=localStorage.getItem(l);let u,p=null;if(i)try{p=JSON.parse(i)}catch(e){s("Error parsing token",e)}if(p&&p?.expire>Date.now())return s("Using cached token"),p;u=o?await a()({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await a()({path:"/jetpack/v4/jetpack-ai-jwt?_cacheBuster="+Date.now(),credentials:"same-origin",headers:{"X-WP-Nonce":e},method:"POST"});const d={token:u.token,blogId:o?t:u.blog_id,expire:Date.now()+n};return s("Storing new token"),localStorage.setItem(l,JSON.stringify(d)),d}},56694:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(60400),o=n(51128),a=n.n(o),i=n(42194),s=n(2890),l=n(16700);const c=a()("jetpack-ai-client:suggestions-event-source");class u extends EventTarget{constructor(e){super(),this.fullMessage="",this.fullFunctionCall={name:"",arguments:""},this.isPromptClear=!1,this.controller=new AbortController,this.initEventSource(e)}async initEventSource(e){let{url:t,question:n,token:o,options:a={}}=e;if(!o)try{c("Token was not provided, requesting one..."),o=(await(0,s.Z)()).token}catch(e){return void this.processErrorEvent(e)}const u={};if(a?.postId&&(u.post_id=a.postId),!t){const e=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");a?.fromCache&&e.searchParams.append("stream_cache","true"),t=e.toString(),c("URL not provided, using default: %o",t)}Array.isArray(n)?u.messages=n:u.question=n,a?.feature?.length&&(c("Feature: %o",a.feature),u.feature=a.feature),a?.functions?.length&&(c("Functions: %o",a.functions),u.functions=a.functions),a?.model?.length&&(c("Model: %o",a.model),u.model=a.model),await(0,r.L)(t,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+o},body:JSON.stringify(u),onclose:()=>{c("Stream closed")},onerror:e=>{throw this.processErrorEvent(e),e},onmessage:e=>{this.processEvent(e)},onopen:async e=>{if(e.ok)return;let t;throw e.status>=400&&e.status<=500&&![413,422,429].includes(e.status)&&this.processConnectionError(e),503===e.status&&(t=l.$u,this.dispatchEvent(new CustomEvent(l.$u))),413===e.status&&(t=l.cv,this.dispatchEvent(new CustomEvent(l.cv))),422===e.status&&(t=l.q4,this.dispatchEvent(new CustomEvent(l.q4))),429===e.status&&(t=l.$L,this.dispatchEvent(new CustomEvent(l.$L))),this.dispatchEvent(new CustomEvent(l.vF,{detail:(0,i.A)(t)})),new Error},signal:this.controller.signal})}checkForUnclearPrompt(){if(this.isPromptClear)return;const e=this.fullMessage.replace(/__|(\*\*)/g,"");e.startsWith("JETPACK_AI_ERROR")?(this.dispatchEvent(new CustomEvent(l.bC)),this.dispatchEvent(new CustomEvent(l.vF,{detail:(0,i.A)(l.bC)}))):"JETPACK_AI_ERROR".startsWith(e)?c(this.fullMessage):this.isPromptClear=!0}close(){this.controller.abort()}processEvent(e){if("[DONE]"===e.data){if(this.fullMessage.length)return this.dispatchEvent(new CustomEvent("done",{detail:this.fullMessage})),void c("Done: %o",this.fullMessage);if(this.fullFunctionCall.name.length)return this.dispatchEvent(new CustomEvent("function_done",{detail:this.fullFunctionCall})),void c("Done: %o",this.fullFunctionCall)}let t;try{t=JSON.parse(e.data)}catch(t){return void c("Error parsing JSON",e,t)}const{delta:n}=t?.choices?.[0]??{delta:{content:null,function_call:null}},r=n.content,o=n.function_call;r&&(this.fullMessage+=r,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:r})),c("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),o&&(null!=o.name&&(this.fullFunctionCall.name+=o.name),null!=o.arguments&&(this.fullFunctionCall.arguments+=o.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processConnectionError(e){c("Connection error: %o",e),this.dispatchEvent(new CustomEvent(l.co,{detail:e})),this.dispatchEvent(new CustomEvent(l.vF,{detail:(0,i.A)(l.co)}))}processErrorEvent(e){c("onerror: %o",e),this.dispatchEvent(new CustomEvent(l.co,{detail:e})),this.dispatchEvent(new CustomEvent(l.vF,{detail:(0,i.A)(l.co)}))}}},16700:function(e,t,n){"use strict";n.d(t,{$L:function(){return o},$u:function(){return r},bC:function(){return l},co:function(){return s},cv:function(){return i},q4:function(){return a},vF:function(){return c}});const r="error_service_unavailable",o="error_quota_exceeded",a="error_moderation",i="error_context_too_large",s="error_network",l="error_unclear_prompt",c="error_response"},6975:function(e,t,n){"use strict";var r=n(51128);const o=n.n(r)()("dops:analytics");let a,i;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const s={initialize:function(e,t,n){s.setUser(e,t),s.setSuperProps(n),s.identifyUser()},setGoogleAnalyticsEnabled:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){i={ID:e,username:t}},setSuperProps:function(e){a=e},assignSuperProps:function(e){a=Object.assign(a||{},e)},mc:{bumpStat:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);o("Bumping stats %o",e)}else n="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Bumping stat "%s" in group "%s"',t,e);return n}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+n+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const n=function(e,t){let n="";if("object"==typeof e){for(const t in e)n+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);o("Built stats %o",e)}else n="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Built stat "%s" in group "%s"',t,e);return n}(e,t);s.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+n+"&t="+Math.random())}},pageView:{record:function(e,t){s.tracks.recordPageView(e),s.ga.recordPageView(e,t)}},purchase:{record:function(e,t,n,r,o,a,i){s.ga.recordPurchase(e,t,n,r,o,a,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(a&&(o("- Super Props: %o",a),t=Object.assign(t,a)),o('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):o('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};s.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){s.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){o("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};s.ga.initialized||(i&&(e={userId:"u-"+i.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),s.ga.initialized=!0)},recordPageView:function(e,t){s.ga.initialize(),o("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,n,r){s.ga.initialize();let a="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==n&&(a+=" [Option Label: "+n+"]"),void 0!==r&&(a+=" [Option Value: "+r+"]"),o(a),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,n,r)},recordPurchase:function(e,t,n,r,o,a,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:r,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:n,price:o,quantity:a}),window.ga("ecommerce:send")}},identifyUser:function(){i&&window._tkq.push(["identifyUser",i.ID,i.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}};t.Z=s},64743:function(e,t,n){"use strict";var r=n(61132),o=n(96483);function a(e){class t extends Error{constructor(){super(...arguments),this.name=e}}return t}const i=a("JsonParseError"),s=a("JsonParseAfterRedirectError"),l=a("Api404Error"),c=a("Api404AfterRedirectError"),u=a("FetchNetworkError");const p=new function(e,t){let n=e,a=e,i={"X-WP-Nonce":t},s={credentials:"same-origin",headers:i},l={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})},c=function(e){const t=e.split("?"),n=t.length>1?t[1]:"",r=n.length?n.split("&"):[];return r.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+r.join("&")};const u={setApiRoot(e){n=e},setWpcomOriginApiUrl(e){a=e},setApiNonce(e){i={"X-WP-Nonce":e},s={credentials:"same-origin",headers:i},l={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{c=e},registerSite:(e,t)=>{const o={registration_nonce:e,no_iframe:!0};return(0,r.jetpackConfigHas)("consumer_slug")&&(o.plugin_slug=(0,r.jetpackConfigGet)("consumer_slug")),null!==t&&(o.redirect_uri=t),h(`${n}jetpack/v4/connection/register`,l,{body:JSON.stringify(o)}).then(d).then(m)},fetchAuthorizationUrl:e=>p((0,o.addQueryArgs)(`${n}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),s).then(d).then(m),fetchSiteConnectionData:()=>p(`${n}jetpack/v4/connection/data`,s).then(m),fetchSiteConnectionStatus:()=>p(`${n}jetpack/v4/connection`,s).then(m),fetchSiteConnectionTest:()=>p(`${n}jetpack/v4/connection/test`,s).then(d).then(m),fetchUserConnectionData:()=>p(`${n}jetpack/v4/connection/data`,s).then(m),fetchUserTrackingSettings:()=>p(`${n}jetpack/v4/tracking/settings`,s).then(d).then(m),updateUserTrackingSettings:e=>h(`${n}jetpack/v4/tracking/settings`,l,{body:JSON.stringify(e)}).then(d).then(m),disconnectSite:()=>h(`${n}jetpack/v4/connection`,l,{body:JSON.stringify({isActive:!1})}).then(d).then(m),fetchConnectUrl:()=>p(`${n}jetpack/v4/connection/url`,s).then(d).then(m),unlinkUser:()=>h(`${n}jetpack/v4/connection/user`,l,{body:JSON.stringify({linked:!1})}).then(d).then(m),reconnect:()=>h(`${n}jetpack/v4/connection/reconnect`,l).then(d).then(m),fetchConnectedPlugins:()=>p(`${n}jetpack/v4/connection/plugins`,s).then(d).then(m),setHasSeenWCConnectionModal:()=>h(`${n}jetpack/v4/seen-wc-connection-modal`,l).then(d).then(m),fetchModules:()=>p(`${n}jetpack/v4/module/all`,s).then(d).then(m),fetchModule:e=>p(`${n}jetpack/v4/module/${e}`,s).then(d).then(m),activateModule:e=>h(`${n}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!0})}).then(d).then(m),deactivateModule:e=>h(`${n}jetpack/v4/module/${e}/active`,l,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>h(`${n}jetpack/v4/module/${e}`,l,{body:JSON.stringify(t)}).then(d).then(m),updateSettings:e=>h(`${n}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(d).then(m),getProtectCount:()=>p(`${n}jetpack/v4/module/protect/data`,s).then(d).then(m),resetOptions:e=>h(`${n}jetpack/v4/options/${e}`,l,{body:JSON.stringify({reset:!0})}).then(d).then(m),activateVaultPress:()=>h(`${n}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(d).then(m),getVaultPressData:()=>p(`${n}jetpack/v4/module/vaultpress/data`,s).then(d).then(m),installPlugin:(e,t)=>{const r={slug:e,status:"active"};return t&&(r.source=t),h(`${n}jetpack/v4/plugins`,l,{body:JSON.stringify(r)}).then(d).then(m)},activateAkismet:()=>h(`${n}jetpack/v4/plugins`,l,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(d).then(m),getAkismetData:()=>p(`${n}jetpack/v4/module/akismet/data`,s).then(d).then(m),checkAkismetKey:()=>p(`${n}jetpack/v4/module/akismet/key/check`,s).then(d).then(m),checkAkismetKeyTyped:e=>h(`${n}jetpack/v4/module/akismet/key/check`,l,{body:JSON.stringify({api_key:e})}).then(d).then(m),fetchStatsData:e=>p(function(e){let t=`${n}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),s).then(d).then(m).then(g),getPluginUpdates:()=>p(`${n}jetpack/v4/updates/plugins`,s).then(d).then(m),getPlans:()=>p(`${n}jetpack/v4/plans`,s).then(d).then(m),fetchSettings:()=>p(`${n}jetpack/v4/settings`,s).then(d).then(m),updateSetting:e=>h(`${n}jetpack/v4/settings`,l,{body:JSON.stringify(e)}).then(d).then(m),fetchSiteData:()=>p(`${n}jetpack/v4/site`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteFeatures:()=>p(`${n}jetpack/v4/site/features`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteProducts:()=>p(`${n}jetpack/v4/site/products`,s).then(d).then(m),fetchSitePurchases:()=>p(`${n}jetpack/v4/site/purchases`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteBenefits:()=>p(`${n}jetpack/v4/site/benefits`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchSiteDiscount:()=>p(`${n}jetpack/v4/site/discount`,s).then(d).then(m).then((e=>e.data)),fetchSetupQuestionnaire:()=>p(`${n}jetpack/v4/setup/questionnaire`,s).then(d).then(m),fetchRecommendationsData:()=>p(`${n}jetpack/v4/recommendations/data`,s).then(d).then(m),fetchRecommendationsProductSuggestions:()=>p(`${n}jetpack/v4/recommendations/product-suggestions`,s).then(d).then(m),fetchRecommendationsUpsell:()=>p(`${n}jetpack/v4/recommendations/upsell`,s).then(d).then(m),fetchRecommendationsConditional:()=>p(`${n}jetpack/v4/recommendations/conditional`,s).then(d).then(m),saveRecommendationsData:e=>h(`${n}jetpack/v4/recommendations/data`,l,{body:JSON.stringify({data:e})}).then(d),fetchProducts:()=>p(`${n}jetpack/v4/products`,s).then(d).then(m),fetchRewindStatus:()=>p(`${n}jetpack/v4/rewind`,s).then(d).then(m).then((e=>JSON.parse(e.data))),fetchScanStatus:()=>p(`${n}jetpack/v4/scan`,s).then(d).then(m).then((e=>JSON.parse(e.data))),dismissJetpackNotice:e=>h(`${n}jetpack/v4/notice/${e}`,l,{body:JSON.stringify({dismissed:!0})}).then(d).then(m),fetchPluginsData:()=>p(`${n}jetpack/v4/plugins`,s).then(d).then(m),fetchIntroOffers:()=>p(`${n}jetpack/v4/intro-offers`,s).then(d).then(m),fetchVerifySiteGoogleStatus:e=>p(null!==e?`${n}jetpack/v4/verify-site/google/${e}`:`${n}jetpack/v4/verify-site/google`,s).then(d).then(m),verifySiteGoogle:e=>h(`${n}jetpack/v4/verify-site/google`,l,{body:JSON.stringify({keyring_id:e})}).then(d).then(m),submitSurvey:e=>h(`${n}jetpack/v4/marketing/survey`,l,{body:JSON.stringify(e)}).then(d).then(m),saveSetupQuestionnaire:e=>h(`${n}jetpack/v4/setup/questionnaire`,l,{body:JSON.stringify(e)}).then(d).then(m),updateLicensingError:e=>h(`${n}jetpack/v4/licensing/error`,l,{body:JSON.stringify(e)}).then(d).then(m),updateLicenseKey:e=>h(`${n}jetpack/v4/licensing/set-license`,l,{body:JSON.stringify({license:e})}).then(d).then(m),getUserLicensesCounts:()=>p(`${n}jetpack/v4/licensing/user/counts`,s).then(d).then(m),getUserLicenses:()=>p(`${n}jetpack/v4/licensing/user/licenses`,s).then(d).then(m),updateLicensingActivationNoticeDismiss:e=>h(`${n}jetpack/v4/licensing/user/activation-notice-dismiss`,l,{body:JSON.stringify({last_detached_count:e})}).then(d).then(m),updateRecommendationsStep:e=>h(`${n}jetpack/v4/recommendations/step`,l,{body:JSON.stringify({step:e})}).then(d),confirmIDCSafeMode:()=>h(`${n}jetpack/v4/identity-crisis/confirm-safe-mode`,l).then(d),startIDCFresh:e=>h(`${n}jetpack/v4/identity-crisis/start-fresh`,l,{body:JSON.stringify({redirect_uri:e})}).then(d).then(m),migrateIDC:()=>h(`${n}jetpack/v4/identity-crisis/migrate`,l).then(d),attachLicenses:e=>h(`${n}jetpack/v4/licensing/attach-licenses`,l,{body:JSON.stringify({licenses:e})}).then(d).then(m),fetchSearchPlanInfo:()=>p(`${a}jetpack/v4/search/plan`,s).then(d).then(m),fetchSearchSettings:()=>p(`${a}jetpack/v4/search/settings`,s).then(d).then(m),updateSearchSettings:e=>h(`${a}jetpack/v4/search/settings`,l,{body:JSON.stringify(e)}).then(d).then(m),fetchSearchStats:()=>p(`${a}jetpack/v4/search/stats`,s).then(d).then(m),fetchWafSettings:()=>p(`${n}jetpack/v4/waf`,s).then(d).then(m),updateWafSettings:e=>h(`${n}jetpack/v4/waf`,l,{body:JSON.stringify(e)}).then(d).then(m),fetchWordAdsSettings:()=>p(`${n}jetpack/v4/wordads/settings`,s).then(d).then(m),updateWordAdsSettings:e=>h(`${n}jetpack/v4/wordads/settings`,l,{body:JSON.stringify(e)}),fetchSearchPricing:()=>p(`${a}jetpack/v4/search/pricing`,s).then(d).then(m),fetchMigrationStatus:()=>p(`${n}jetpack/v4/migration/status`,s).then(d).then(m),fetchBackupUndoEvent:()=>p(`${n}jetpack/v4/site/backup/undo-event`,s).then(d).then(m)};function p(e,t){return fetch(c(e),t)}function h(e,t,n){return fetch(e,Object.assign({},t,n)).catch(f)}function g(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,u)};function d(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise((()=>{throw e.redirected?new c(e.redirected):new l})):e.json().catch((e=>h(e))).then((t=>{const n=new Error(`${t.message} (Status ${e.status})`);throw n.response=t,n.name="ApiError",n}))}function m(e){return e.json().catch((t=>h(t,e.redirected,e.url)))}function h(e,t,n){throw t?new s(n):new i}function f(){throw new u}t.ZP=p},22636:function(e,t,n){"use strict";var r=n(65235),o=n.n(r),a=n(99196),i=n.n(a),s=n(46409);t.Z=e=>{let{children:t=null,width:n=null,height:r=null,className:a=""}=e;return i().createElement("div",{className:o()(s.Z.placeholder,a),style:{width:n,height:r}},t)}},45033:function(e,t,n){"use strict";var r=n(25162),o=n.n(r),a=n(99196),i=n.n(a);n(48026);const s=e=>{const t=e.className+" jp-components-spinner",n={width:e.size,height:e.size,fontSize:e.size,borderTopColor:e.color},r={borderTopColor:e.color,borderRightColor:e.color};return i().createElement("div",{className:t},i().createElement("div",{className:"jp-components-spinner__outer",style:n},i().createElement("div",{className:"jp-components-spinner__inner",style:r})))};s.propTypes={color:o().string,className:o().string,size:o().number},s.defaultProps={color:"#FFFFFF",className:"",size:20},t.Z=s},88275:function(e,t,n){"use strict";var r=n(99196),o=n.n(r),a=n(93468);const i={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},s={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},l={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},c={"--spacing-base":"8px"},u={},p=(e,t,n)=>{const r={...i,...s,...l,...c};for(const t in r)e.style.setProperty(t,r[t]);n&&e.classList.add(a.Z.global),t&&(u[t]={provided:!0,root:e})};t.ZP=e=>{let{children:t=null,targetDom:n,id:a,withGlobalStyles:i=!0}=e;const s=(0,r.useRef)(),l=u?.[a]?.provided;return(0,r.useLayoutEffect)((()=>{if(!l)return n?p(n,a,i):void(s?.current&&p(s.current,a,i))}),[n,s,l,a,i]),n?t:o().createElement("div",{ref:s},t)}},6895:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={};let r;if("undefined"!=typeof window&&(r=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,n.url=encodeURIComponent(e)}else n.source=encodeURIComponent(e);for(const e in t)n[e]=encodeURIComponent(t[e]);!Object.keys(n).includes("site")&&"undefined"!=typeof jetpack_redirects&&jetpack_redirects.hasOwnProperty("currentSiteRawUrl")&&(n.site=jetpack_redirects.currentSiteRawUrl),r&&(n.calypso_env=r);return"https://jetpack.com/redirect/?"+Object.keys(n).map((e=>e+"="+n[e])).join("&")}n.d(t,{Z:function(){return r}})},61132:function(e,t,n){let r={};try{r=n(92787)}catch{console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),r={missingConfig:!0}}const o=e=>r.hasOwnProperty(e);e.exports={jetpackConfigHas:o,jetpackConfigGet:e=>{if(!o(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return r[e]}}},31294:function(e,t,n){"use strict";var r=n(64743),o=n(9818),a=n(99196),i=n(80428);const s=window?.JP_CONNECTION_INITIAL_STATE?window.JP_CONNECTION_INITIAL_STATE:{};t.Z=function(){let{registrationNonce:e=s.registrationNonce,apiRoot:t=s.apiRoot,apiNonce:n=s.apiNonce,redirectUri:l,autoTrigger:c,from:u,skipUserConnection:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{registerSite:d,connectUser:m,refreshConnectedPlugins:h}=(0,o.useDispatch)(i.t),f=(0,o.useSelect)((e=>e(i.t).getRegistrationError())),{siteIsRegistering:g,userIsConnecting:v,userConnectionData:b,connectedPlugins:k,connectionErrors:y,isRegistered:w,isUserConnected:E,hasConnectedOwner:_,isOfflineMode:C}=(0,o.useSelect)((e=>({siteIsRegistering:e(i.t).getSiteIsRegistering(),userIsConnecting:e(i.t).getUserIsConnecting(),userConnectionData:e(i.t).getUserConnectionData(),connectedPlugins:e(i.t).getConnectedPlugins(),connectionErrors:e(i.t).getConnectionErrors(),isOfflineMode:e(i.t).getIsOfflineMode(),...e(i.t).getConnectionStatus()}))),S=()=>p?l?(window.location=l,Promise.resolve(l)):Promise.resolve():m({from:u,redirectUri:l}),x=t=>(t&&t.preventDefault(),w?S():d({registrationNonce:e,redirectUri:l}).then((()=>S())));return(0,a.useEffect)((()=>{r.ZP.setApiRoot(t),r.ZP.setApiNonce(n)}),[t,n]),(0,a.useEffect)((()=>{!c||g||v||x()}),[]),{handleRegisterSite:x,handleConnectUser:S,refreshConnectedPlugins:h,isRegistered:w,isUserConnected:E,siteIsRegistering:g,userIsConnecting:v,registrationError:f,userConnectionData:b,hasConnectedOwner:_,connectedPlugins:k,connectionErrors:y,isOfflineMode:C}}},27523:function(e,t,n){"use strict";n.d(t,{LI:function(){return a},N4:function(){return s},Qo:function(){return p},T1:function(){return c},TS:function(){return u},ZP:function(){return E},b5:function(){return m},i6:function(){return o},qJ:function(){return h},qV:function(){return l},r7:function(){return i},wQ:function(){return d}});var r=n(64743);const o="SET_CONNECTION_STATUS",a="SET_CONNECTION_STATUS_IS_FETCHING",i="SET_SITE_IS_REGISTERING",s="SET_USER_IS_CONNECTING",l="SET_REGISTRATION_ERROR",c="CLEAR_REGISTRATION_ERROR",u="SET_AUTHORIZATION_URL",p="DISCONNECT_USER_SUCCESS",d="SET_CONNECTED_PLUGINS",m="SET_CONNECTION_ERRORS",h="SET_IS_OFFLINE_MODE",f=e=>({type:o,connectionStatus:e}),g=e=>({type:i,isRegistering:e}),v=e=>({type:s,isConnecting:e}),b=e=>({type:l,registrationError:e}),k=()=>({type:c}),y=e=>({type:u,authorizationUrl:e}),w=e=>({type:d,connectedPlugins:e});const E={setConnectionStatus:f,setConnectionStatusIsFetching:e=>({type:a,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:g,setUserIsConnecting:v,setRegistrationError:b,clearRegistrationError:k,setAuthorizationUrl:y,registerSite:function(e){let{registrationNonce:t,redirectUri:n}=e;return function*(){yield k(),yield g(!0);try{const e=yield{type:"REGISTER_SITE",registrationNonce:t,redirectUri:n};return yield f({isRegistered:!0}),yield y(e.authorizeUrl),yield g(!1),Promise.resolve(e)}catch(e){return yield b(e),yield g(!1),Promise.reject(e)}}()},connectUser:function(){let{from:e,redirectFunc:t,redirectUri:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){yield v(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:n}}()},disconnectUserSuccess:()=>({type:p}),setConnectedPlugins:w,refreshConnectedPlugins:()=>async e=>{let{dispatch:t}=e;return await new Promise((e=>r.ZP.fetchConnectedPlugins().then((n=>{t(w(n)),e(n)}))))},setConnectionErrors:e=>({type:m,connectionErrors:e}),setIsOfflineMode:e=>({type:h,isOfflineMode:e})}},31432:function(e,t,n){"use strict";var r=n(64743),o=n(9818),a=n(27057);const i=(0,o.createRegistryControl)((e=>{let{resolveSelect:t}=e;return function(){let{from:e,redirectFunc:n,redirectUri:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((o,i)=>{t(a.Z).getAuthorizationUrl(r).then((t=>{const r=n||(e=>window.location.assign(e)),a=new URL(t);e&&a.searchParams.set("from",encodeURIComponent(e));const i=a.toString();r(i),o(i)})).catch((e=>{i(e)}))}))}}));t.Z={FETCH_AUTHORIZATION_URL:e=>{let{redirectUri:t}=e;return r.ZP.fetchAuthorizationUrl(t)},REGISTER_SITE:e=>{let{registrationNonce:t,redirectUri:n}=e;return r.ZP.registerSite(t,n)},CONNECT_USER:i}},41479:function(e,t,n){"use strict";var r=n(9818),o=n(27523);const a=(0,r.combineReducers)({connectionStatus:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case o.i6:return{...e,...t.connectionStatus};case o.Qo:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.LI?t.isFetching:e},siteIsRegistering:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.r7?t.isRegistering:e},userIsConnecting:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.N4?t.isConnecting:e},registrationError:(e,t)=>{switch(t.type){case o.T1:return!1;case o.qV:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===o.TS?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===o.wQ?t.connectedPlugins:e},connectionErrors:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return t.type===o.b5?t.connectionErrors:e},isOfflineMode:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return t.type===o.qJ?t.isConnecting:e}});t.Z=a},77728:function(e,t,n){"use strict";var r=n(9818),o=n(27523),a=n(27057);const i={getAuthorizationUrl:{isFulfilled:function(e){const t=Boolean(e.authorizationUrl);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];const s=(0,r.select)(a.Z).hasFinishedResolution("getAuthorizationUrl",o);return t&&!s&&(0,r.dispatch)(a.Z).finishResolution("getAuthorizationUrl",o),t},*fulfill(e){const t=yield o.ZP.fetchAuthorizationUrl(e);yield o.ZP.setAuthorizationUrl(t.authorizeUrl)}}};t.Z={...i}},82725:function(e,t){"use strict";const n={...{getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[],getConnectionErrors:e=>e.connectionErrors||[],getIsOfflineMode:e=>e.isOfflineMode||!1,getWpcomUser:e=>e?.userConnectionData?.currentUser?.wpcomUser,getBlogId:e=>e?.userConnectionData?.currentUser?.blogId}};t.Z=n},13535:function(e,t,n){"use strict";var r=n(9818);class o{static store=null;static mayBeInit(e,t){null===o.store&&(o.store=(0,r.createReduxStore)(e,t),(0,r.register)(o.store))}}t.Z=o},27057:function(e,t){"use strict";t.Z="jetpack-connection"},80428:function(e,t,n){"use strict";n.d(t,{t:function(){return c.Z}});var r=n(27523),o=n(31432),a=n(41479),i=n(77728),s=n(82725),l=n(13535),c=n(27057);const u=window.JP_CONNECTION_INITIAL_STATE;u||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),l.Z.mayBeInit(c.Z,{__experimentalUseThunks:!0,reducer:a.Z,actions:r.ZP,selectors:s.Z,resolvers:i.Z,controls:o.Z,initialState:u||{}})},13419:function(e,t,n){"use strict";n.d(t,{Dp:function(){return c.Z},FK:function(){return l.FK},HD:function(){return l.HD},M6:function(){return a.M6},OZ:function(){return i.Z},Pb:function(){return r.Z},Qq:function(){return l.Qq},Rl:function(){return l.Rl},T:function(){return s.Z},Ug:function(){return a.Ug},Wp:function(){return a.Wp},X1:function(){return l.X1},_D:function(){return l._D},dM:function(){return d.d},el:function(){return p.Z},lQ:function(){return o.Z},lt:function(){return d.l},m3:function(){return l.m3},z$:function(){return u.Z}});var r=n(50148),o=n(35004),a=n(99505),i=n(48052),s=(n(76714),n(80354)),l=n(75404),c=n(68586),u=n(61053),p=n(11380),d=(n(6342),n(96959))},6342:function(e,t,n){"use strict";n(99196)},96959:function(e,t,n){"use strict";n.d(t,{d:function(){return a},l:function(){return i}});var r=n(69307),o=n(12953);function a(e){const t={};let n="span",o=e.icon;const a=document.createElement("div");a.innerHTML=e.icon;const i=a.querySelector("svg");return i&&(n="svg",o=i.innerHTML,Array.from(i.attributes).forEach((e=>{let{nodeName:n,nodeValue:r}=e;return t[n]=r}))),(0,r.createElement)(n,{...t,dangerouslySetInnerHTML:{__html:o||""}})}function i(e){return{src:a(e),foreground:(0,o.Z)()}}},12953:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(99505);const o="#069e08";function a(){return(0,r.Ug)()||(0,r.Wp)()?null:o}},50148:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});const r="Jetpack_Editor_Initial_State";function o(){return"object"==typeof window?window?.[r]??null:null}},48052:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(50148);function o(e){const t=(0,r.Z)(),n=t?.available_blocks?.[e]?.available??!1,o=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:n,...!n&&{details:t?.available_blocks?.[e]?.details??[],unavailableReason:o}}}},35004:function(e,t,n){"use strict";function r(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:null}n.d(t,{Z:function(){return r}})},61053:function(e,t,n){"use strict";var r=n(6975),o=n(31294),a=n(69307);const{tracks:i}=r.Z,{recordEvent:s}=i;t.Z=function(){let{pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:n="page_view",pageViewEventProperties:l={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[c,u]=(0,a.useState)(!1),{isUserConnected:p,isRegistered:d,userConnectionData:m={}}=(0,o.Z)(),{wpcomUser:{login:h,ID:f}={},blogId:g}=m.currentUser||{},v=(0,a.useCallback)((async function(e){p&&f&&h&&s(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}),[p,f,h]);return(0,a.useEffect)((()=>{p&&f&&h&&g&&r.Z.initialize(f,h,{blog_id:g})}),[g,f,h,p]),(0,a.useEffect)((()=>{const r=e?`${t}_${e}_${n}`:null;d&&r&&(c||(v(r,l),u(!0)))}),[c,t,e,n,d,l,v]),{recordEvent:v,tracks:i}}},11380:function(e,t,n){"use strict";var r=n(86989),o=n.n(r),a=n(69307),i=n(99505);async function s(e){if((0,i.Wp)())return!0;try{const t=await async function(){try{return await o()({path:"/jetpack/v4/module/all",method:"GET"})}catch(e){return e.message}}();return!(!t||!t.hasOwnProperty(e))&&!!t[e].activated}catch(e){return!1}}t.Z=e=>{const[t,n]=(0,a.useState)(Boolean(e)),[r,i]=(0,a.useState)(!1),[l,c]=(0,a.useState)(!1);(0,a.useEffect)((()=>{e&&(n(!0),s(e).then((e=>{c(e),n(!1)})))}),[e]);const u=(0,a.useCallback)((t=>{e&&l!==t&&(i(!0),async function(e,t){return await o()({path:`/jetpack/v4/module/${e}/active`,method:"POST",data:{active:t}})}(e,t).then((()=>{c(t),i(!1)})).catch((()=>{i(!1)})))}),[e,l]);return(0,a.useMemo)((()=>({isLoadingModules:t,isChangingStatus:r,isModuleActive:l,changeStatus:u})),[t,r,l,u])}},68586:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(50148);function o(){return(0,r.Z)()?.jetpack?.is_current_user_connected??!1}},75404:function(e,t,n){"use strict";n.d(t,{FK:function(){return f},HD:function(){return g},Qq:function(){return u},Rl:function(){return m},X1:function(){return p},_D:function(){return d},m3:function(){return v}});var r=n(65736),o=n(96483),a=n(92819),i=n(50148),s=n(48052),l=n(35004),c=n(99505);const __=r.__;function u(e){let{planSlug:t,plan:n,postId:r,postType:i}=e;const s=(0,a.startsWith)(t,"jetpack_")?t:(0,a.get)(n,["path_slug"]),u=(void 0===i?()=>{const e=new URLSearchParams(window.location.search);return(0,o.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(i)?"":"edit";return(0,c.Wp)()?(0,o.addQueryArgs)("/"+(0,a.compact)([e,i,(0,l.Z)(),r]).join("/"),{plan_upgraded:1}):(0,o.addQueryArgs)(window.location.protocol+`//${(0,l.Z)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:r,plan_upgraded:1})})();return(0,c.Ug)()?(0,o.addQueryArgs)(`https://wordpress.com/plans/${(0,l.Z)()}`,{redirect_to:u,customerType:"business"}):s&&(0,o.addQueryArgs)(`https://wordpress.com/checkout/${(0,l.Z)()}/${s}`,{redirect_to:u})}function p(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:n,unavailableReason:r}=(0,s.Z)(t);return!n&&"missing_plan"===r}function d(e,t){return"missing_plan"===e&&t.required_plan}function m(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:n,unavailableReason:r}=(0,s.Z)(t);return d(r,n)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function f(){return(0,a.get)((0,i.Z)(),"jetpack.enable_upgrade_nudge",!1)}const g=e=>(0,a.map)(h,"name").includes(e),v=e=>(0,a.head)((0,a.filter)(h,(t=>{let{name:n}=t;return n===e})))},76714:function(e,t,n){"use strict";n(98817)},99505:function(e,t,n){"use strict";n.d(t,{M6:function(){return s},Ug:function(){return i},Wp:function(){return a}});var r=n(50148);function o(){return"object"==typeof window&&"string"==typeof window._currentSiteType?window._currentSiteType:null}function a(){return"simple"===o()}function i(){return"atomic"===o()}function s(){const e=(0,r.Z)();return e?.jetpack?.is_private_site??!1}},80354:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(94333);t.Z=e=>(0,a.createHigherOrderComponent)((t=>n=>React.createElement(t,o()({},n,{className:n.name===e?"has-warning is-interactive":n.className}))),"withHasWarningIsInteractiveClassNames")},83059:function(e,t,n){"use strict";n.d(t,{ZP:function(){return C}});var r=n(51806),o=n(36222),a=n(13419),i=n(4981),s=n(55609),l=n(9818),c=n(69307),u=n(65736),p=n(586),d=n(3639),m=n(92710),h=n(58532),f=(n(99196),n(49259)),g=n(63634),v=n(854),b=n(6747),k=n(81612),y=n(27298);const __=u.__,w=[{name:__("Correct spelling and grammar","jetpack"),key:"correct-spelling",aiSuggestion:g.Hd,icon:p.Z},{name:__("Simplify","jetpack"),key:"simplify",aiSuggestion:g.hI,icon:d.Z},{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:g.Lq,icon:m.Z},{name:__("Expand","jetpack"),key:"make-longer",aiSuggestion:g.TV,icon:h.Z}];function E(e){return e.filter((e=>null!=e)).map((e=>(0,i.getBlockContent)(e))).join("\n\n")}function _(e){let{onClose:t,blockType:n}=e;const[i,u]=(0,c.useState)(!1),{getSelectedBlockClientIds:p,getBlocksByClientId:d}=(0,l.useSelect)("core/block-editor"),{removeBlocks:m,replaceBlock:h}=(0,l.useDispatch)("core/block-editor");(0,c.useEffect)((()=>{const e=p(),t=E(d(e)),n=(0,v.t$)(t);return u(!n.length)}),[d,p]);const{tracks:_}=(0,a.z$)(),C=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=p(),a=d(o),i=E(a);t(),_.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:e,block_type:n});const[s]=a,[l,...c]=o,u={...s?.attributes||{},content:i},g=(0,b.b)(n,u),v={clientId:l,type:e,options:{...r,contentType:"generated",fromExtension:!0}};localStorage.setItem((0,f.$M)(g.clientId),JSON.stringify(v)),h(l,g),m(c)};return(0,r.createElement)(r.Fragment,null,i&&(0,r.createElement)(s.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info"},__("Add content to activate the tools below","jetpack")),(0,r.createElement)(s.MenuGroup,null,(0,r.createElement)(s.MenuItem,{icon:o.u_,iconPosition:"left",key:"key-ai-assistant",onClick:()=>{const e=p(),t=d(e),r=E(t),[o,...a]=e,[i]=t,s={...i?.attributes||{},content:r};h(o,(0,b.b)(n,s)),m(a)},disabled:i},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},__("Ask AI Assistant","jetpack"))),w.map((e=>(0,r.createElement)(s.MenuItem,{icon:e?.icon,iconPosition:"left",key:`key-${e.key}`,onClick:()=>{C(e.aiSuggestion,{})},disabled:i},(0,r.createElement)("div",{className:"jetpack-ai-assistant__menu-item"},e.name)))),(0,r.createElement)(y.IP,{onChange:e=>{C(g.Lg,{tone:e})},disabled:i}),(0,r.createElement)(k.xK,{onChange:e=>{C(g.Nw,{language:e})},disabled:i})))}function C(e){let{blockType:t}=e;return(0,r.createElement)(s.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,r.createElement)(s.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:n,"aria-haspopup":"true","aria-expanded":t,label:__("AI Assistant","jetpack"),icon:o.u_})},renderContent:e=>{let{onClose:n}=e;return(0,r.createElement)(_,{onClose:n,blockType:t})}})}},3180:function(e,t,n){"use strict";var r=n(51806),o=n(65736),a=n(26546),i=n(46867);const __=o.__;t.Z=()=>{const e=`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/connection`,{autosaveAndRedirect:t,isRedirecting:n}=(0,i.Z)(e);return(0,r.createElement)(a.p,{buttonText:__("Reconnect Jetpack","jetpack"),checkoutUrl:e,className:"jetpack-ai-connect-banner",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:e=>{t(e)},isRedirecting:n,visible:!0,align:null,title:null,context:null})}},81612:function(e,t,n){"use strict";n.d(t,{ZP:function(){return f},xK:function(){return g}});var r=n(51806),o=n(55609),a=n(65736),i=n(61074),s=n(46936),l=n(43618);n(99196);const __=a.__,c=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],u=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,p=__("Translate","jetpack"),d=u?.split("-")[0]||"en",m=(u?.split("-"),{en:{label:__("English","jetpack")},es:{label:__("Spanish","jetpack")},fr:{label:__("French","jetpack")},de:{label:__("German","jetpack")},it:{label:__("Italian","jetpack")},pt:{label:__("Portuguese","jetpack")},ru:{label:__("Russian","jetpack")},zh:{label:__("Chinese","jetpack")},ja:{label:__("Japanese","jetpack")},ar:{label:__("Arabic","jetpack")},hi:{label:__("Hindi","jetpack")},ko:{label:__("Korean","jetpack")},id:{label:__("Indonesian","jetpack")},tl:{label:__("Filipino","jetpack")},vi:{label:__("Vietnamese","jetpack")}}),h=e=>{let{value:t,onChange:n}=e;const a=[...c.filter((e=>e!==d))];return c.includes(d)&&a.unshift(d),(0,r.createElement)(o.MenuGroup,{label:__("Select language","jetpack")},a.map((e=>(0,r.createElement)(o.MenuItem,{key:`key-${e}`,onClick:()=>n(e+" ("+m[e].label+")"),isSelected:t===e},m[e].label))))};function f(e){let{value:t=d,label:n=p,onChange:a,disabled:s=!1}=e;return s?(0,r.createElement)(o.Tooltip,{text:n},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(i.Z,{icon:l.Z}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:l.Z,label:n,popoverProps:{variant:"toolbar"}},(()=>(0,r.createElement)(h,{value:t,onChange:a})))}function g(e){let{value:t=d,label:n=p,onChange:a,disabled:c=!1}=e;return(0,r.createElement)(o.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:l.Z,label:n,toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__i18n-dropdown__toggle-label"},n),(0,r.createElement)(i.Z,{icon:s.Z})),disabled:c}},(e=>{let{onClose:n}=e;return(0,r.createElement)(h,{onChange:e=>{a(e),n()},value:t})}))}},50297:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(65736);const __=a.__;t.Z=e=>{let{image:t,inModal:n=!1,saveImage:a,setImageModal:i}=e;return(0,r.createElement)(o.Flex,{direction:"column"},n&&(0,r.createElement)(o.FlexItem,{style:{textAlign:"center"}},(0,r.createElement)(o.Button,{variant:"primary",onClick:()=>a(t)},__("Use this image","jetpack"))),(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)("input",{type:"image",className:"wp-block-ai-image-image",src:t,alt:"",onClick:()=>i(t)})),!n&&(0,r.createElement)(o.FlexBlock,null,(0,r.createElement)(o.Flex,{direction:"column",style:{alignItems:"center"}},(0,r.createElement)(o.FlexItem,null,(0,r.createElement)(o.Button,{variant:"primary",onClick:()=>a(t)},__("Use this image","jetpack"))))))}},24404:function(e,t,n){"use strict";n.d(t,{ZP:function(){return h}});var r=n(51806),o=n(55609),a=n(65736),i=n(77840);n(99196);const __=a.__,s="make-longer",l="makeLonger",c="make-shorter",u="makeShorter",p="summarize",d="summarize",m=[{name:__("Summarize","jetpack"),key:p,aiSuggestion:d},{name:__("Make longer","jetpack"),key:s,aiSuggestion:l},{name:__("Make shorter","jetpack"),key:c,aiSuggestion:u}];function h(e){let{key:t,label:n=__("Improve","jetpack"),exclude:a=[],onChange:s,disabled:l=!1}=e;return l?(0,r.createElement)(o.Tooltip,{text:n},(0,r.createElement)(o.Button,{disabled:!0},(0,r.createElement)(o.Icon,{icon:i.Z}))):(0,r.createElement)(o.ToolbarDropdownMenu,{icon:i.Z,label:n,popoverProps:{variant:"toolbar"}},(()=>{const e=m.filter((e=>!a.includes(e.key)));return(0,r.createElement)(o.MenuGroup,{label:n},e.map((e=>(0,r.createElement)(o.MenuItem,{key:`key-${e.key}`,onClick:()=>s(e.aiSuggestion,{contentType:"generated"}),isSelected:t===e.key},e.name))))}))}},85642:function(e,t,n){"use strict";n.d(t,{Ie:function(){return d},ZP:function(){return h}});var r=n(51806),o=n(55609),a=n(65736),i=n(77840),s=n(58532),l=n(586),c=n(3639),u=n(92710),p=n(32677);n(99196);const __=a.__,d=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about ","jetpack")}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining ","jetpack")}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on ","jetpack")}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on ","jetpack")}}],m=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that ","jetpack")}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about ","jetpack")}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about ","jetpack")}}];function h(e){let{hasContentBefore:t,hasContent:n,hasPostTitle:a,contentIsLoaded:h,onPromptSelect:f,onSuggestionSelect:g}=e;const v=__("Write with AI…","jetpack");return(0,r.createElement)(o.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:v,text:v},(e=>{let{onClose:v}=e;return h?(0,r.createElement)(o.MenuGroup,{label:__("Write…","jetpack")},m.map(((e,t)=>(0,r.createElement)(o.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{v(),f(e.description)}},e.label)))):(0,r.createElement)(r.Fragment,null,t&&(0,r.createElement)(o.MenuGroup,{label:__("Based on preceding content…","jetpack")},(0,r.createElement)(o.MenuItem,{icon:s.Z,iconPosition:"left",onClick:()=>g("continue")},__("Continue writing","jetpack")),(0,r.createElement)(o.MenuItem,{icon:l.Z,iconPosition:"left",onClick:()=>g("correctSpelling")},__("Correct spelling and grammar","jetpack")),(0,r.createElement)(o.MenuItem,{icon:c.Z,iconPosition:"left",onClick:()=>g("simplify")},__("Simplify","jetpack"))),n&&(0,r.createElement)(o.MenuGroup,{label:__("Based on entire content…","jetpack")},n&&(0,r.createElement)(o.MenuItem,{icon:u.Z,iconPosition:"left",onClick:()=>g("summarize")},__("Summarize","jetpack")),n&&(0,r.createElement)(o.MenuItem,{icon:p.Z,iconPosition:"left",onClick:()=>g("generateTitle")},__("Generate a post title","jetpack"))),(0,r.createElement)(o.MenuGroup,{label:__("Write…","jetpack")},a&&(0,r.createElement)(o.MenuItem,{icon:i.Z,iconPosition:"left",onClick:()=>g("titleSummary")},__("Summary based on title","jetpack")),d.map(((e,t)=>(0,r.createElement)(o.MenuItem,{icon:i.Z,iconPosition:"left",key:`key-${t}`,onClick:()=>{v(),f(e.description)}},e.label)))))}))}},27298:function(e,t,n){"use strict";n.d(t,{IP:function(){return d},Nj:function(){return c},ZP:function(){return m}});var r=n(51806),o=n(36222),a=n(55609),i=n(65736),s=n(46936);n(99196);const __=i.__,l=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],c="formal",u={formal:{label:__("Formal","jetpack"),emoji:"🎩"},informal:{label:__("Informal","jetpack"),emoji:"😊"},optimistic:{label:__("Optimistic","jetpack"),emoji:"😃"},humorous:{label:__("Humorous","jetpack"),emoji:"😂"},serious:{label:__("Serious","jetpack"),emoji:"😐"},skeptical:{label:__("Skeptical","jetpack"),emoji:"🤨"},empathetic:{label:__("Empathetic","jetpack"),emoji:"💗"},confident:{label:__("Confident","jetpack"),emoji:"😎"},passionate:{label:__("Passionate","jetpack"),emoji:"❤️"},provocative:{label:__("Provocative","jetpack"),emoji:"🔥"}},p=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(a.MenuGroup,{label:__("Select tone","jetpack")},l.map((e=>(0,r.createElement)(a.MenuItem,{key:`key-${e}`,onClick:()=>n(e),isSelected:t===e},`${u[e].emoji} ${u[e].label}`))))};function d(e){let{label:t=__("Change tone","jetpack"),value:n=c,onChange:i,disabled:l=!1}=e;return(0,r.createElement)(a.DropdownMenu,{icon:o.v_,label:t,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"ai-assistant__tone-dropdown__toggle-label"},t),(0,r.createElement)(a.Icon,{icon:s.Z})),disabled:l}},(e=>{let{onClose:t}=e;return(0,r.createElement)(p,{value:n,onChange:e=>{i(e),t()}})}))}function m(e){let{value:t=c,onChange:n,disabled:i=!1}=e;const s=__("Change tone","jetpack");return i?(0,r.createElement)(a.Tooltip,{text:s},(0,r.createElement)(a.Button,{disabled:!0},(0,r.createElement)(a.Icon,{icon:o.v_}))):(0,r.createElement)(a.ToolbarDropdownMenu,{icon:o.v_,label:s,popoverProps:{variant:"toolbar"},disabled:i},(()=>(0,r.createElement)(p,{value:t,onChange:n})))}},4965:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(79201),l=n(48381),c=(n(75022),n(63634)),u=n(81612),p=n(24404),d=n(85642),m=n(27298);const __=i.__;t.Z=e=>{let{contentIsLoaded:t,getSuggestionFromOpenAI:n,retryRequest:i,handleAcceptContent:h,handleImageRequest:f,handleTryAgain:g,showRetry:v,contentBefore:b,hasPostTitle:k,wholeContent:y,setUserPrompt:w,recordEvent:E,isGeneratingTitle:_}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,!v&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(d.ZP,{hasContentBefore:!!b?.length,hasContent:!!y?.length,hasPostTitle:k,contentIsLoaded:t,onPromptSelect:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),w(e.translated)},onSuggestionSelect:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),n(e)}})),(0,r.createElement)(o.BlockControls,{group:"block"},(0,r.createElement)(m.ZP,{value:"neutral",onChange:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Lg}),n(c.Lg,{tone:e,contentType:t?"generated":null})},disabled:!t&&!y?.length}),(0,r.createElement)(u.ZP,{value:"en",onChange:e=>{E("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:c.Nw}),n(c.Nw,{language:e,contentType:t?"generated":null})},disabled:!t&&!y?.length}),(0,r.createElement)(p.ZP,{onChange:n,exclude:_?["summarize"]:[],disabled:!t}))),(v||t)&&(0,r.createElement)(a.ToolbarGroup,null,!v&&t&&(0,r.createElement)(a.ToolbarButton,{onClick:g},__("Try Again","jetpack")),v&&t&&(0,r.createElement)(a.ToolbarButton,{icon:s.Z,onClick:h},__("Accept","jetpack")),v&&(0,r.createElement)(a.ToolbarButton,{icon:l.Z,onClick:i},__("Retry","jetpack"))),false))}},5246:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736),i=(n(99196),n(26546)),s=n(63206),l=n(18135),c=n(71449);const __=a.__;t.Z=()=>{const{upgradeType:e}=(0,l.ZP)();return"vip"===e?(0,r.createElement)(i.p,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null}):(()=>{const{checkoutUrl:e,autosaveAndRedirect:t,isRedirecting:n}=(0,s.Z)();return(0,c.d)()?(0,r.createElement)(i.p,{buttonText:"Upgrade",checkoutUrl:e,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit!<br /><strong>Upgrade now to keep using it.</strong>","jetpack"),{br:(0,r.createElement)("br",null),strong:(0,r.createElement)("strong",null)}),goToCheckoutPage:t,isRedirecting:n,visible:!0,align:null,title:null,context:null}):(0,r.createElement)(i.p,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:(0,o.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit!<br /><strong>Reach out to the site administrator to upgrade and keep using Jetpack AI.</strong>","jetpack"),{br:(0,r.createElement)("br",null),strong:(0,r.createElement)("strong",null)}),visible:!0,align:null,title:null,context:null})})()}},45624:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var r=n(82674),o=n.n(r),a=n(51806),i=n(36222),s=n(13419),l=n(52175),c=n(4981),u=n(55609),p=n(94333),d=n(9818),m=n(69307),h=n(65736),f=n(65235),g=n.n(f),v=n(10185),b=n.n(v),k=n(99196),y=n(3180),w=n(50297),E=n(85642),_=n(4965),C=n(5246),S=n(49259),x=n(18135),j=n(60751),L=n(71449),P=n(3687),A=n(63634);const __=h.__,T=new(b())({breaks:!0}),N="post"===window?.Jetpack_Editor_Initial_State?.screenBase,M=window?.Jetpack_Editor_Initial_State?.["ai-assistant"]?.["is-playground-visible"];function I(e){let{attributes:t,setAttributes:n,clientId:r}=e;const[h,f]=(0,m.useState)(),[v,b]=(0,m.useState)({}),[I,R]=(0,m.useState)(!1),[D,B]=(0,m.useState)([]),[Z,F]=(0,m.useState)(null),[O,U]=(0,m.useState)(null),{tracks:z}=(0,s.z$)(),$=(0,d.useSelect)((e=>e("core/editor").getCurrentPostId())),{getBlock:H}=(0,d.useSelect)("core/block-editor"),q=(0,k.useRef)(null),V=(0,k.useRef)(null),{replaceBlocks:G,replaceBlock:W,removeBlock:J}=(0,d.useDispatch)("core/block-editor"),{editPost:K}=(0,d.useDispatch)("core/editor"),{mediaUpload:Y}=(0,d.useSelect)((e=>{const{getSettings:t}=e("core/block-editor");return{mediaUpload:t().mediaUpload}}),[]),X=()=>{setTimeout((()=>{q.current?.focus?.()}),100)},Q=(0,p.useViewportMatch)("medium","<"),{requireUpgrade:ee,refresh:te}=(0,x.ZP)(),ne=ee||"error_quota_exceeded"===v?.code,{isLoadingCategories:re,isLoadingCompletion:oe,wasCompletionJustRequested:ae,getSuggestionFromOpenAI:ie,stopSuggestion:se,showRetry:le,contentBefore:ce,postTitle:ue,retryRequest:pe,wholeContent:de,requestingState:me}=(0,j.Z)({onSuggestionDone:X,onUnclearPrompt:X,onModeration:X,attributes:t,clientId:r,content:t.content,setError:b,tracks:z,userPrompt:h,refreshFeatureData:te,requireUpgrade:ne}),he=(0,L.b)(),fe=(0,S.$M)(r);(0,k.useEffect)((()=>{if(!fe)return;const e=JSON.parse(localStorage.getItem(fe));if(!e)return;const{type:t,options:n}=e;localStorage.removeItem(fe),ie(t,n)}),[fe,ie]),(0,k.useEffect)((()=>{v&&U(!1)}),[v]);const ge=(0,k.useRef)(t?.content);(0,k.useEffect)((()=>{if(!t?.useGutenbergSyntax)return;if(!ge?.current?.length)return;const e=H(r);if(e?.innerBlocks?.length)return;const n=(0,c.parse)(ge.current);n?.length&&G(r,n)}),[ge,r,G,H,t?.useGutenbergSyntax]);const[ve,be]=(0,m.useState)(""),[ke,ye]=(0,m.useState)(0);(0,k.useEffect)((()=>{const e=setInterval((()=>{ke<E.Ie.length?(be(E.Ie[ke].label),ye((e=>e+1))):(clearInterval(e),be(__("Ask Jetpack AI","jetpack")))}),1600);return()=>clearInterval(e)}),[ve,ke]);const we=async e=>{if(I)return;R(!0),b({});const n=await fetch(e),o=await n.blob(),a=new File([o],"jetpack_ai_image.png",{type:"image/png"});Y({filesList:[a],onFileChange:e=>{let[n]=e;n.id&&W(r,(0,c.createBlock)("core/image",{url:n.url,caption:t.requestedPrompt,alt:t.requestedPrompt}))},allowedTypes:["image"],onError:e=>{console.error(e),R(!1)}}),z.recordEvent("jetpack_ai_dalle_generation_upload",{post_id:$})},Ee=t?.useGutenbergSyntax,_e=oe||re,Ce=!!t.content,Se="generateTitle"===t.promptType,xe=__("Accept","jetpack"),je=__("Accept title","jetpack"),Le=Se?je:xe,Pe=function(){ie(...arguments),setTimeout((()=>{V.current?.focus?.()}),100)},Ae=async()=>{let e=[];if(Ee)e=H(r),e=e?.innerBlocks||[];else{const n=T.render(t.content).replace(/<li>\s+<p>/g,"<li>").replace(/<\/p>\s+<\/li>/g,"</li>");e=(0,c.rawHandler)({HTML:n})}await G(r,e);const n=(e=>{let t=null;return e.forEach((e=>{const n=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!n)return;"true"===n.contentEditable&&(t=n);const r=n.querySelectorAll("[contenteditable=true]");t=r.length?r[r.length-1]:t})),t})(e);n&&(e=>{const t=window.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(n)},Te=()=>{N?(K({title:t.content.trim()}),J(r)):Ae()},Ne=()=>{se(),X()},[Me,Ie]=(0,m.useState)(!1),Re=()=>{Ie(!Me)},De=(0,l.useBlockProps)({ref:V,className:g()({"is-waiting-response":ae})}),Be=(0,l.useInnerBlocksProps)(De);return(0,a.createElement)(u.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(me)&&Ne()}}},(0,a.createElement)("div",De,v?.message&&!O&&"error_quota_exceeded"!==v?.code&&(0,a.createElement)(u.Notice,{status:v.status,isDismissible:!1,className:"jetpack-ai-assistant__error"},v.message),Ce&&!Ee&&(0,a.createElement)("div",{className:"jetpack-ai-assistant__content"},(0,a.createElement)(m.RawHTML,null,T.render(t.content))),Ce&&Ee&&(0,a.createElement)("div",o()({className:"jetpack-ai-assistant__content is-layout-building-mode"},Be)),M&&(0,a.createElement)(l.InspectorControls,null,(0,a.createElement)(u.PanelBody,{title:__("AI Playground","jetpack"),initialOpen:!0},(0,a.createElement)(u.PanelRow,null,(0,a.createElement)(u.ToggleControl,{label:__("Gutenberg Syntax","jetpack"),onChange:e=>n({useGutenbergSyntax:e}),checked:t.useGutenbergSyntax})),(0,a.createElement)(u.PanelRow,null,(0,a.createElement)(u.ToggleControl,{label:__("GPT-4","jetpack"),onChange:e=>n({useGpt4:e}),checked:t.useGpt4})),(0,a.createElement)(u.PanelRow,null,Me&&(0,a.createElement)(u.Modal,{title:__("Custom System Prompt","jetpack"),onRequestClose:Re},(0,a.createElement)(u.TextareaControl,{rows:20,label:__("Set up the custom system prompt ","jetpack"),onChange:e=>n({customSystemPrompt:e}),className:"jetpack-ai-assistant__custom-prompt",value:t.customSystemPrompt||(0,A.t4)({useGutenbergSyntax:t.useGutenbergSyntax,useGpt4:t.useGpt4})?.content}),(0,a.createElement)("div",{className:"jetpack-ai-assistant__custom-prompt__footer"},(0,a.createElement)(u.Button,{onClick:()=>n({customSystemPrompt:""}),variant:"secondary"},__("Restore the prompt","jetpack")),(0,a.createElement)(u.Button,{onClick:Re,variant:"secondary"},__("Close","jetpack")))),(0,a.createElement)(u.Button,{onClick:Re,variant:"secondary"},__("Set system custom prompt","jetpack"))))),ne&&(0,a.createElement)(C.Z,null),!he&&(0,a.createElement)(y.Z,null),!_e&&he&&!ne&&(0,a.createElement)(_.Z,{isWaitingState:_e,contentIsLoaded:Ce,getSuggestionFromOpenAI:ie,retryRequest:pe,handleAcceptContent:Ae,handleAcceptTitle:Te,handleGetSuggestion:Pe,handleImageRequest:()=>{B([]),b({}),(0,P.b)(""===h.trim()?__("What would you like to see?","jetpack"):h,n,R,B,b,$),z.recordEvent("jetpack_ai_dalle_generation",{post_id:$})},handleTryAgain:()=>{n({content:t?.originalContent,promptType:void 0,messages:t?.originalMessages})},showRetry:le,contentBefore:ce,hasPostTitle:!!ue?.length,wholeContent:de,promptType:t.promptType,setUserPrompt:e=>{if(!q?.current)return;q.current.focus();for(let t=0;t<e.length;t++)setTimeout((()=>{f(e.slice(0,t+1))}),25*t)},recordEvent:z.recordEvent,isGeneratingTitle:Se}),(0,a.createElement)(i.tK,{ref:q,disabled:ne||!he,value:h,placeholder:ve||__("Ask Jetpack AI","jetpack"),onChange:e=>{U(!0),f(e)},onSend:()=>{Pe("userPrompt")},onStop:Ne,onAccept:()=>{Se?Te():Ae()},state:me,isTransparent:ne||!he,showButtonLabels:!Q,showAccept:Ce&&!_e,acceptLabel:Le,showClearButton:!_e,showGuideLine:Ce}),!I&&D.length>0&&(0,a.createElement)(u.Flex,{direction:"column",style:{width:"100%"}},(0,a.createElement)(u.FlexBlock,{style:{textAlign:"center",margin:"12px",fontStyle:"italic",width:"100%"}},t.requestedPrompt),(0,a.createElement)(u.FlexBlock,{style:{fontSize:"20px",lineHeight:"38px"}},__("Please choose your image","jetpack")),(0,a.createElement)(u.Flex,{direction:"row",wrap:!0},D.map((e=>(0,a.createElement)(w.Z,{setImageModal:F,saveImage:we,image:e,key:e}))))),!I&&Z&&(0,a.createElement)(u.Modal,{onRequestClose:()=>F(null)},(0,a.createElement)(w.Z,{saveImage:we,setImageModal:F,image:Z,inModal:!0}))))}},27559:function(e,t,n){"use strict";var r=n(31985),o=n(23536),a=n(45624),i=n(6747);n(81765),n(54765),n(94662);(0,r.S)(o,{edit:a.Z,save:()=>null,transforms:i.Z})},54765:function(e,t,n){"use strict";n.d(t,{J7:function(){return p},NP:function(){return c}});var r=n(4981),o=n(9818),a=n(92694),i=n(23536),s=n(18135),l=n(71449);const c=["core/paragraph","core/heading","core/list"],u=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-support"];function p(){if(!(0,r.getBlockType)(i.name))return!1;if(!u)return!1;if(!(0,l.b)())return!1;if(s.fb.errorCode)return!1;const{getHiddenBlockTypes:e}=(0,o.select)("core/edit-post")||{};return!(e?.()||[]).includes(i.name)}(0,a.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return c.includes(t)&&p()?{...e,supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e}),100)},49259:function(e,t,n){"use strict";n.d(t,{$M:function(){return s}});var r=n(51806),o=n(52175),a=n(94333),i=(n(99196),n(83059));function s(e){return`ai-assistant-block-${e}`}const l=(0,a.createHigherOrderComponent)((e=>t=>{const{name:n}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(o.BlockControls,{group:"block"},(0,r.createElement)(i.ZP,{blockType:n})))}),"withAIAssistant");t.ZP=l},79191:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var r=n(51806),o=n(36222),a=n(4981),i=n(55609),s=n(94333),l=n(9818),c=n(69307),u=n(65736),p=n(53961),d=n(65235),m=n.n(d),h=(n(99196),n(3180)),f=n(5246),g=n(18135),v=n(71449),b=n(63634),k=n(79817),y=n(44110);const __=u.__,w={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480};function E(e){if(!e?.length)return"";const t=(0,l.select)("core/block-editor").getBlock(e);if(!t)return"";const{innerBlocks:n}=t;return n?.length?n.reduce(((e,t)=>e+(0,a.serialize)(t)+"\n\n"),""):""}function _(e){let{clientId:t,className:n=""}=e;const a=(0,c.useRef)(null),u=(0,c.useRef)(null),d=(0,v.b)(),{inputValue:_,setInputValue:C,isVisible:S,assistantAnchor:x}=(0,c.useContext)(k.D),j=()=>{setTimeout((()=>{u.current?.focus?.()}),100)},{requestSuggestion:L,requestingState:P,stopSuggestion:A,requestingError:T}=(0,o.X_)({onDone:j}),{requireUpgrade:N}=(0,g.ZP)(),M=T?.code===o.$L||N,I="requesting"===P||"suggesting"===P,R="suggesting"===P||"done"===P,D=__("Ask Jetpack AI to create your form","jetpack"),B=__("Creating your form. Please wait a few moments.","jetpack"),{removeNotice:Z}=(0,l.useDispatch)(p.store),F=(0,c.useCallback)((()=>{if(!_?.length)return;Z(y.uu);const e=(0,b.r1)(b.Re,{request:_,content:E(t)});L(e,{feature:"jetpack-form-ai-extension"}),a?.current?.focus()}),[t,_,Z,L]),O=(0,c.useCallback)((()=>{A(),j()}),[A]),U=(0,s.useViewportMatch)("medium","<"),z=U&&x,$=(0,c.useRef)(null),H=(0,c.useRef)(U),[q,V]=(0,c.useState)(U);if((0,c.useEffect)((()=>{const e=a?.current;if(e)return $?.current||($.current=new ResizeObserver((e=>{if(!S)return;if(z)return;const t=e[0].contentRect.width<w.mobile;t!==H.current&&(H.current=t,V(t))}))),$.current.observe(e),()=>{$?.current?.disconnect()}}),[z,S]),(0,c.useEffect)((()=>{const e=setTimeout((()=>{S&&u?.current&&u.current.focus()}),300);return function(){clearTimeout(e)}}),[]),!S)return null;const G=(0,r.createElement)(i.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(P)&&O()}}},(0,r.createElement)("div",{ref:a,className:m()("jetpack-ai-assistant__bar",{[n]:n,"is-fixed":z,"is-mobile-mode":q}),tabIndex:-1},M&&(0,r.createElement)(f.Z,null),!d&&(0,r.createElement)(h.Z,null),(0,r.createElement)(o.tK,{ref:u,disabled:M||!d,value:I?void 0:_,placeholder:I?B:D,onChange:C,onSend:F,onStop:O,state:P,isTransparent:M||!d,showButtonLabels:!q,showGuideLine:R})));return z?(0,c.createPortal)(G,x):G}},81732:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),o=n(36222),a=n(55609),i=n(94333),s=n(69307),l=n(65736),c=n(99196),u=n(79817),p=n(44110);const __=l.__,d="jetpack-ai-assistant-bar__slot";function m(e){let{jetpackFormClientId:t}=e;const{isVisible:n,toggle:l,setAnchor:m,assistantAnchor:h}=(0,s.useContext)(u.D),{requestingState:f}=(0,o.X_)(),g=(0,s.useRef)(null),v=(0,i.useViewportMatch)("medium","<");(0,c.useEffect)((()=>{if(!g.current)return;const e=g.current.closest(".block-editor-block-contextual-toolbar");if(!e)return;let t=e.parentElement?.querySelector(`.${d}`);if(t)return m(t);t=document.createElement("div"),t.setAttribute("role","toolbar"),t.setAttribute("aria-label",__("AI Assistant","jetpack")),t.setAttribute("aria-orientation","horizontal"),t.className=d,e.after(t);const n=e.offsetHeight;t.style.top=`${n}px`,m(t)}),[m]),(0,c.useEffect)((()=>{v||h?.remove()}),[v,h]);const b=(0,s.useCallback)((()=>{if(!t)return l();(0,p.Vl)(t,l)}),[t,l]),k="requesting"===f||"suggesting"===f;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{"mod+/":l}}),(0,r.createElement)(a.ToolbarButton,{ref:g,showTooltip:!0,onClick:b,"aria-haspopup":"true","aria-expanded":n,label:__("Ask AI Assistant","jetpack"),icon:o.u_,disabled:k}))}},59090:function(e,t,n){"use strict";n.d(t,{aE:function(){return r},nB:function(){return o}});const r=window?.Jetpack_Editor_Initial_State?.available_blocks?.["ai-assistant-form-support"]?.available,o=["jetpack/field-name","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-checkbox","jetpack/field-date","jetpack/field-telephone","jetpack/field-url","jetpack/field-checkbox-multiple","jetpack/field-radio","jetpack/field-select","jetpack/field-consent","jetpack/button"]},94662:function(e,t,n){"use strict";n.d(t,{V:function(){return f}});var r=n(51806),o=n(36222),a=n(52175),i=n(4981),s=n(94333),l=n(9818),c=n(69307),u=n(92694),p=(n(99196),n(79191)),d=n(81732),m=n(59090),h=n(44110);function f(e){let{checkChildrenBlocks:t=!1,clientId:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{clientId:""};if(!(0,i.getBlockType)("jetpack/ai-assistant"))return!1;if("string"!=typeof e)return!1;if(!m.aE)return!1;if(!n?.length)return!1;if(t){if(!m.nB.includes(e))return!1}else if("jetpack/contact-form"!==e)return!1;const{getHiddenBlockTypes:r}=(0,l.select)("core/edit-post")||{};return!(r?.()||[]).includes(e)}const g=(0,s.createHigherOrderComponent)((e=>t=>{const{eventSource:n}=(0,o.X_)(),i=(0,c.useCallback)((()=>{n&&n?.close()}),[n]);if((0,c.useEffect)((()=>()=>{"jetpack/contact-form"===t?.name&&i()}),[i,t?.name]),!f(t?.name,{clientId:t.clientId}))return(0,r.createElement)(e,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(p.Z,{clientId:t.clientId}),(0,r.createElement)(a.BlockControls,{group:"block"},(0,r.createElement)(d.Z,null)))}),"jetpackFormEditWithAiComponents");(0,u.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return"jetpack/contact-form"!==t?e:{...e,edit:(0,o.oN)((0,h.ZP)(g(e.edit)))}}),100);const v=(0,s.createHigherOrderComponent)((e=>t=>{const n=(0,l.useSelect)((e=>{const n=e("core/block-editor"),{getBlockParentsByBlockName:r}=n;return r(t.clientId,"jetpack/contact-form")?.[0]}),[t.clientId]);if(!f(t?.name,{checkChildrenBlocks:!0,clientId:n}))return(0,r.createElement)(e,t);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(e,t),(0,r.createElement)(a.BlockControls,{group:"parent"},(0,r.createElement)(d.Z,{jetpackFormClientId:n})))}),"jetpackFormChildrenEditWithAiComponents");(0,u.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support",(function(e,t){return m.nB.includes(t)?{...e,edit:v(e.edit)}:e}))},79817:function(e,t,n){"use strict";n.d(t,{D:function(){return a},v:function(){return i}});var r=n(51806),o=n(69307);const a=(0,o.createContext)({}),i=e=>{let{value:t,children:n}=e;return(0,r.createElement)(a.Provider,{value:t,children:n})}},44110:function(e,t,n){"use strict";n.d(t,{Vl:function(){return v},uu:function(){return g}});var r=n(51806),o=n(36222),a=n(4981),i=n(55609),s=n(94333),l=n(9818),c=n(69307),u=n(65736),p=n(53961),d=(n(99196),n(94662)),m=n(5863),h=n(56359),f=n(79817);const __=u.__,g="ai-assistant";function v(e,t){(0,l.dispatch)("core/block-editor").selectBlock(e).then(t)}const b=(0,s.createHigherOrderComponent)((e=>t=>{const{clientId:n,isSelected:s}=t,{replaceInnerBlocks:u}=(0,l.useDispatch)("core/block-editor"),b=(0,l.useSelect)((e=>e("core/editor")),[]),k=(0,l.useSelect)((e=>e("core/block-editor")),[]),y=b.getCurrentPostId(),w=k.getBlock(n),[E,_]=(0,c.useState)(""),C="jetpack/contact-form"===w?.name&&0===w?.innerBlocks?.length,[S,x]=(0,c.useState)(C),[j,L]=(0,c.useState)(!1),[P,A]=(0,c.useState)(null),T=(0,c.useRef)([]),N=(0,c.useCallback)((()=>{x(!0)}),[]),M=(0,c.useCallback)((()=>{x(!1)}),[]),I=(0,c.useCallback)((()=>{x(!S)}),[S]),R=(0,c.useCallback)((e=>{A(e)}),[]),{createNotice:D}=(0,l.useDispatch)(p.store),B=(0,c.useCallback)((e=>{let{severity:t,message:n,code:r}=e;r!==o.$L&&D(t,n,{isDismissible:!0,id:g})}),[D]);(0,c.useEffect)((()=>{s||M()}),[s,M]);const Z=(0,c.useMemo)((()=>({inputValue:E,setInputValue:_,isVisible:S,show:N,hide:M,toggle:I,isFixed:j,setAssistantFixed:L,assistantAnchor:P,setAnchor:R})),[E,S,N,M,I,j,P,R]),F=(0,c.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=e.replace(/<!-- (\/)*wp:jetpack\/(contact-)*form ({[^}]*} )*(\/)*-->/g,""),o=(0,h.J)(r),i=(0,a.parse)(o).filter((e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name)));let s=!1;if(i.length<T.current.length)i.push(T.current[T.current.length-1]);else if(i.length===T.current.length&&i.length>0){const e=i[i.length-1],t=T.current[i.length-1];s=!(0,m.c)(e,t)}if(i.length>0&&(i.length!==T.current.length||s)&&(u(n,i),T.current=i),t){const e=i.filter((e=>"jetpack/button"===e.name));if(T.current=T.current||[],e.length>1){let t=0;T.current=T.current.filter((n=>"jetpack/button"!==n.name||(t++,t===e.length))),u(n,T.current)}else 0===e.length&&u(n,[...T.current,(0,a.createBlock)("jetpack/button",{label:__("Submit","jetpack"),element:"button",text:__("Submit","jetpack"),borderRadius:8,lock:{remove:!0}})]);T.current=[]}}),[n,u]);return(0,o.X_)({askQuestionOptions:{postId:y},onDone:e=>{F(e,!0),_("")},onSuggestion:F,onError:B}),(0,d.V)(t.name,{clientId:t.clientId})?(0,r.createElement)(f.v,{value:Z},(0,r.createElement)(i.KeyboardShortcuts,{shortcuts:{"mod+/":()=>v(n,N)}},(0,r.createElement)(e,t))):(0,r.createElement)(e,t)}),"withUiHandlerDataProvider");t.ZP=b},63206:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(6895),o=n(13419),a=n(46867);function i(){const e=(0,r.Z)("jetpack-ai-monthly-plan-ai-assistant-block-banner",{site:(0,o.lQ)()}),t=(0,o.Ug)()||(0,o.Wp)()?e:`${window?.Jetpack_Editor_Initial_State?.adminUrl}admin.php?page=my-jetpack#/add-jetpack-ai`,{autosaveAndRedirect:n,isRedirecting:i}=(0,a.Z)(t);return{checkoutUrl:t,autosaveAndRedirect:n,isRedirecting:i}}},18135:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},fb:function(){return s}});var r=n(86989),o=n.n(r),a=n(69307);const i=window?.Jetpack_Editor_Initial_State?.["ai-assistant"],s={hasFeature:!!i?.["has-feature"],isOverLimit:!!i?.["is-over-limit"],requestsCount:i?.["requests-count"]||0,requestsLimit:i?.["requests-limit"]||20,requireUpgrade:!!i?.["site-require-upgrade"],errorMessage:i?.["error-message"]||"",errorCode:i?.["error-code"],upgradeType:i?.["upgrade-type"]||"default",usagePeriod:{currentStart:i?.["usage-period"]?.["current-start"],nextStart:i?.["usage-period"]?.["next-start"],requestsCount:i?.["usage-period"]?.["requests-count"]||0},currentTier:{value:i?.["current-tier"]?.value||1}};async function l(){const e=await o()({path:"/wpcom/v2/jetpack-ai/ai-assistant-feature"});try{return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"],usagePeriod:{currentStart:e["usage-period"]?.["current-start"],nextStart:e["usage-period"]?.["next-start"],requestsCount:e["usage-period"]?.["requests-count"]||0},currentTier:{value:e["current-tier"]?.value||1}}}catch(e){console.error(e)}}function c(){const[e,t]=(0,a.useState)(s);return(0,a.useEffect)((()=>{l().then(t)}),[]),{...e,refresh:()=>l().then(t)}}},60751:function(e,t,n){"use strict";var r=n(36222),o=n(4981),a=n(9818),i=n(69307),s=n(65736),l=n(51128),c=n.n(l),u=n(27298),p=n(63634),d=n(854);const __=s.__,m=c()("jetpack-ai-assistant:event"),h=c()("jetpack-ai-assistant:prompt");t.Z=e=>{let{attributes:t,clientId:n,content:s,setError:l,tracks:c,userPrompt:f,onSuggestionDone:g,onUnclearPrompt:v,onModeration:b,refreshFeatureData:k,requireUpgrade:y}=e;const[w,E]=(0,i.useState)(!1),[_,C]=(0,i.useState)(!1),[S,x]=(0,i.useState)(!1),[j,L]=(0,i.useState)(!1),[P,A]=(0,i.useState)(""),{updateBlockAttributes:T}=(0,a.useDispatch)("core/block-editor"),[N,M]=(0,i.useState)("init"),I=(0,i.useRef)(),R=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("title")));let D=!1;const B=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("categories")))||[],Z=(0,a.useSelect)((e=>B.map((t=>{const n=e("core").getEntityRecord("taxonomy","category",t);if(n)return n;D=!0})).filter(Boolean)),[B]),F=(0,a.useSelect)((e=>e("core/editor").getEditedPostAttribute("tags")),[])||[],O=(0,a.useSelect)((e=>F.map((t=>{const n=e("core").getEntityRecord("taxonomy","post_tag",t);if(n)return n;D=!0})).filter(Boolean)),[F]);(0,i.useEffect)((()=>(E(D),()=>{I?.current&&(m("Cleaning things up..."),I?.current?.close())})),[D,I]);const U=(0,a.useSelect)((e=>e("core/editor").getCurrentPostId())),z=(Z.filter((e=>1!==e.id)).map((e=>{let{name:t}=e;return t})).join(", "),O.map((e=>{let{name:t}=e;return t})).join(", "),async function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const g=i?.functions?.reduce(((e,t)=>{let{name:n,implementation:r}=t;return{...e,[n]:r}}),{});if(y)return M("error"),C(!1),x(!1),L(!1),void l({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"});if(i={retryRequest:!1,tone:u.Nj,...i},_)return;L(!1),l({});let w=P;c.recordEvent("jetpack_ai_chat_completion",{post_id:U});const E=[...t.messages]??[];let S={};if(i.retryRequest)S=w[w.length-1];else{const r=t?.isLayoutBuldingModeEnable?(0,d.WN)(n):(0,d.xN)();w=(0,p.Iq)({generatedContent:s,allPostContent:r,postContentAbove:(0,d.h7)(n),currentPostTitle:R,options:i,userPrompt:f,type:e,isGeneratingTitle:"generateTitle"===t.promptType,useGutenbergSyntax:!!t?.useGutenbergSyntax,customSystemPrompt:t?.customSystemPrompt}),S=w.pop(),w=[...w,...E],w.push(S),A(w),"generateTitle"!==t.promptType&&T(n,{promptType:e})}try{C(!0),x(!0),w.forEach(((e,t)=>{let{role:n,content:r}=e;return h("(%s/%s) %o\n%s",t+1,w.length,`[${n}]`,r)})),M("requesting"),I.current=await(0,r.jt)(w,{postId:U,requireUpgrade:y,feature:t?.useGpt4?"ai-assistant-experimental":"ai-assistant",functions:i?.functions}),M("suggesting")}catch(e){e.message?l({message:e.message,code:e?.code||"unknown",status:"error"}):l({message:__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack"),code:"unknown",status:"error"}),L(!0),C(!1),x(!1)}const j=async e=>{const{detail:n}=e,o={role:"assistant",content:null,function_call:n},a=await(g[n.name]?.(JSON.parse(n.arguments))),s={role:"function",name:n?.name,content:JSON.stringify(a)};w=[...w,o,s],I?.current?.removeEventListener("function_done",j),I?.current?.removeEventListener("done",N),I?.current?.removeEventListener("error_unclear_prompt",D),I?.current?.removeEventListener("error_network",Z),I?.current?.removeEventListener("error_context_too_large",B),I?.current?.removeEventListener("error_service_unavailable",F),I?.current?.removeEventListener("error_quota_exceeded",O),I?.current?.removeEventListener("error_moderation",z),I?.current?.removeEventListener("suggestion",H),I.current=await(0,r.jt)(w,{postId:U,requireUpgrade:y,feature:t?.useGpt4?"ai-assistant-experimental":null,functions:i.functions}),I?.current?.addEventListener("function_done",j),I?.current?.addEventListener("done",N),I?.current?.addEventListener("error_unclear_prompt",D),I?.current?.addEventListener("error_network",Z),I?.current?.addEventListener("error_context_too_large",B),I?.current?.addEventListener("error_service_unavailable",F),I?.current?.addEventListener("error_quota_exceeded",O),I?.current?.addEventListener("error_moderation",z),I?.current?.addEventListener("suggestion",H)},N=e=>{const{detail:r}=e;M("done");const i=r.replaceAll(p._W,""),s={role:"assistant",content:i};E.push(S,s),h("Add %o\n%s",`[${S.role}]`,S.content),h("Add %o\n%s",`[${s.role}]`,s.content),E.length>20&&E.splice(0,E.length-20),$();const l=t?.useGutenbergSyntax;if(T(n,{content:i,messages:E}),!l)return;const{replaceInnerBlocks:c}=(0,a.dispatch)("core/block-editor"),u=(0,o.parse)(r).filter((e=>e.isValid));c(n,u),k()},D=()=>{M("error"),I?.current?.close(),C(!1),x(!1),l({code:"error_unclear_prompt",message:__("Your request was unclear. Mind trying again?","jetpack"),status:"info"}),v?.()},B=()=>{M("error"),I?.current?.close(),C(!1),x(!1),L(!1),l({code:"error_context_too_large",message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),status:"info"})},Z=r=>{let{detail:o}=r;M("error");const{name:a,message:c}=o;"TypeError"===a&&"Failed to fetch"===c&&(E.splice(0,8),T(n,{messages:E}),w=(0,p.Iq)({generatedContent:s,allPostContent:(0,d.xN)(),postContentAbove:(0,d.h7)(n),currentPostTitle:R,options:i,userPrompt:f,type:e,isGeneratingTitle:"generateTitle"===t.promptType,useGutenbergSyntax:!!t?.useGutenbergSyntax,customSystemPrompt:t?.customSystemPrompt}),A([...w,...E,S])),I?.current?.close(),C(!1),x(!1),L(!0),l({code:"error_network",message:__("It was not possible to process your request. Mind trying again?","jetpack"),status:"info"})},F=()=>{M("error"),I?.current?.close(),C(!1),x(!1),L(!0),l({code:"error_service_unavailable",message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),status:"info"})},O=()=>{M("error"),I?.current?.close(),C(!1),x(!1),L(!1),l({code:"error_quota_exceeded",message:__("You have reached the limit of requests for this site.","jetpack"),status:"info"})},z=()=>{M("error"),I?.current?.close(),C(!1),x(!1),L(!1),l({code:"error_moderation",message:__("This request has been flagged by our moderation system. Please try to rephrase it and try again.","jetpack"),status:"info"}),b?.()},H=e=>{x(!1),m("(suggestion)",e?.detail),T(n,{content:e?.detail?.replaceAll(p._W,"")})};return I?.current?.addEventListener("function_done",j),I?.current?.addEventListener("done",N),I?.current?.addEventListener("error_unclear_prompt",D),I?.current?.addEventListener("error_network",Z),I?.current?.addEventListener("error_context_too_large",B),I?.current?.addEventListener("error_service_unavailable",F),I?.current?.addEventListener("error_quota_exceeded",O),I?.current?.addEventListener("error_moderation",z),I?.current?.addEventListener("suggestion",H),I?.current});function $(){I?.current&&(I?.current?.close(),C(!1),x(!1),g?.(),M("done"))}return{isLoadingCategories:w,isLoadingCompletion:_,wasCompletionJustRequested:S,setIsLoadingCategories:E,setShowRetry:L,showRetry:j,postTitle:R,contentBefore:(0,d.h7)(n),wholeContent:(0,d.xN)(),requestingState:N,getSuggestionFromOpenAI:z,stopSuggestion:$,retryRequest:()=>z("",{retryRequest:!0})}}},71449:function(e,t,n){"use strict";n.d(t,{b:function(){return u},d:function(){return p}});var r=n(13419),o=n(51128),a=n.n(o);const i=window?.JP_CONNECTION_INITIAL_STATE,s=a()("jetpack-ai-assistant:connection");let l=!1;const c=e=>{l||(s(e),l=!0)};function u(){return(0,r.Wp)()?(c("Simple site connected ✅"),!0):(0,r.Ug)()?(c("Atomic site connected ✅"),!0):i?.connectionStatus?.isUserConnected?(c("Jetpack user is connected ✅"),!0):(c("User is not connected ❌"),!1)}function p(){if((0,r.Wp)())return!0;return!1==!(i?.userConnectionData?.currentUser?.permissions??{}).manage_options}},3687:function(e,t,n){"use strict";n.d(t,{b:function(){return i}});var r=n(86989),o=n.n(r),a=n(65736);const __=a.__;function i(e,t,n,r,a,i){n(!0),a(null),t({requestedPrompt:e}),o()({path:"/wpcom/v2/jetpack-ai/images/generations",method:"POST",data:{prompt:e,post_id:i}}).then((e=>{n(!1);const t=e.data.map((e=>"data:image/png;base64,"+e.b64_json));r(t)})).catch((e=>{e.message?a(e.message):a(__("Whoops, we have encountered an error. AI is like really, really hard and this is an experimental feature. Please try again later.","jetpack")),n(!1)}))}},57832:function(e,t,n){"use strict";n.d(t,{v_:function(){return s},x1:function(){return l}});var r=n(63634);const o="title",a="content",i=null;function s(e,t){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:u(e),...t?.length?{custom_system_prompt:t}:{}}}}function l(e){let{generatedContent:t,allPostContent:n,postContentAbove:o,currentPostTitle:a,options:i,type:s,userPrompt:l,isGeneratingTitle:u}=e;const p=[],d="generated"===i?.contentType;let m=null;switch(s){case r.qA:m=a;break;case r.sz:case r.hI:case r.Hd:m=o;break;case r.jf:m=n;break;case r.TV:case r.DR:m=t;break;case r.Lg:case r.Lq:case r.Nw:m=d?t:n;break;case r.Gh:m=t||n}const h=function(e,t){return!e&&t?.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(s===r.Gh?!!t?.length:d,m);return h&&p.push(h),p.push({role:"jetpack-ai",context:c({generatedContent:t,allPostContent:n,postContentAbove:o,currentPostTitle:a,options:i,type:s,userPrompt:l,isGeneratingTitle:u})}),p}function c(e){let{options:t,type:n,userPrompt:s,isGeneratingTitle:l}=e;const c=function(e,t,n){return e?o:!t||n?a:i}(l,"generated"===t?.contentType,t?.fromExtension||!1);return{type:u(n),...c?{subject:c}:{},...n===r.Lg&&t?.tone?{tone:t.tone}:{},...n===r.Nw&&t?.language?{language:t.language}:{},...n===r.Gh&&s?{request:s}:{}}}function u(e){return{[r.qA]:"ai-assistant-summary-by-title",[r.sz]:"ai-assistant-continue-writing",[r.hI]:"ai-assistant-simplify",[r.Hd]:"ai-assistant-correct-spelling",[r.jf]:"ai-assistant-generate-title",[r.TV]:"ai-assistant-make-longer",[r.DR]:"ai-assistant-make-shorter",[r.Lg]:"ai-assistant-change-tone",[r.Lq]:"ai-assistant-summarize",[r.Nw]:"ai-assistant-change-language",[r.Gh]:"ai-assistant-user-prompt"}[e]}},63634:function(e,t,n){"use strict";n.d(t,{DR:function(){return d},Gh:function(){return g},Hd:function(){return c},Iq:function(){return T},Lg:function(){return m},Lq:function(){return h},Nw:function(){return f},Re:function(){return v},SV:function(){return b},TV:function(){return p},_W:function(){return y},hI:function(){return l},jf:function(){return u},qA:function(){return i},r1:function(){return N},sz:function(){return s},t4:function(){return w}});var r=n(51128),o=n.n(r),a=n(57832);const i="titleSummary",s="continue",l="simplify",c="correctSpelling",u="generateTitle",p="makeLonger",d="makeShorter",m="changeTone",h="summarize",f="changeLanguage",g="userPrompt",v="jetpackFormCustomPrompt",b=!0,k=o()("jetpack-ai-assistant:prompt"),y="````";function w(e){let{context:t="You are an advanced polyglot ghostwriter. Your task is to generate and modify content based on user requests. This functionality is integrated into the Jetpack product developed by Automattic. Users interact with you through a Gutenberg block, you are inside the WordPress editor",rules:n,useGutenbergSyntax:r=!1,useMarkdown:o=!0,customSystemPrompt:a=null}=e,i="";n?.length&&(i=n.map((e=>`- ${e}.`)).join("\n")+"\n");let s=`${t}. Strictly follow these rules:\n\n${i}${o?"- Format your responses in Markdown syntax, ready to be published.":""}\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`;return r&&(s=`${t}. Strictly follow these rules:\n\t\n${i}- Format your responses in Gutenberg HTML format including HTML comments for WordPress blocks. All responses must be valid Gutenberg HTML.\n- Use only WordPress core blocks\n- Execute the request without any acknowledgement to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n`),a&&(s=a),{role:"system",content:s}}function E(e){return`${y}${e.replaceAll(y,"")}${y}`}function _(e){let{content:t,role:n="user"}=e;return[{role:n,content:`Repeat the text delimited with ${y}, without the delimiter, correcting any spelling and grammar mistakes directly in the text without providing feedback about the corrections, keeping the language of the text: ${E(t)}`}]}function C(e){let{content:t,role:n="user"}=e;return[{role:n,content:`Simplify the text delimited with ${y}, using words and phrases that are easier to understand and keeping the language of the text: ${E(t)}`}]}function S(e){let{content:t,role:n="user"}=e;return[{role:n,content:`Summarize the text delimited with ${y}, keeping the language of the text: ${E(t)}`}]}function x(e){let{content:t,role:n="user"}=e;return[{role:n,content:`Expand the text delimited with ${y} to about double its size, keeping the language of the text: ${E(t)}`}]}function j(e){let{content:t,language:n,role:r="user"}=e;return[{role:r,content:`Translate the text delimited with ${y} to ${n}, preserving the same core meaning and tone: ${E(t)}`}]}function L(e){let{content:t,tone:n,role:r="user"}=e;return[{role:r,content:`Rewrite the text delimited with ${y}, with a ${n} tone, keeping the language of the text: ${E(t)}`}]}function P(e){let{content:t,request:n}=e;if(!n)throw new Error("You must provide a custom prompt for the Jetpack Form Custom Prompt");return[{role:"jetpack-ai",context:{type:"form-ai-extension",content:t,request:n}}]}const A=e=>{let{rules:t=[],request:n=null,relevantContent:r=null,isContentGenerated:o=!1,isGeneratingTitle:a=!1,useGutenbergSyntax:i=!1,customSystemPrompt:s=null}=e;if(!n&&!r)throw new Error("You must provide either a request or content");const l=[w({rules:t,useGutenbergSyntax:i,customSystemPrompt:s})];if(null!=r&&r?.length){const e=r.replaceAll(y,"");o||l.push({role:"user",content:`The specific relevant content for this request, if necessary, delimited with ${y} characters: ${y}${e}${y}`})}const c={role:"user",content:n};return a&&(c.content+=" Only output a title, do not generate body content."),l.push(c),l.forEach((e=>{k(`Role: ${e?.role}.\nMessage: ${e?.content}\n---`)})),l};function T(e){let{generatedContent:t,allPostContent:n,postContentAbove:r,currentPostTitle:o,options:v,type:k,userPrompt:y,isGeneratingTitle:w,useGutenbergSyntax:E,customSystemPrompt:_}=e;if(b){return[(0,a.v_)(k,_),...(0,a.x1)({generatedContent:t,allPostContent:n,postContentAbove:r,currentPostTitle:o,options:v,type:k,userPrompt:y,isGeneratingTitle:w})]}const C="generated"===v?.contentType,S=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0;const r="generated"===n?.contentType;let o="the title";t||(o=r?"your last answer":"the content");const a=`. Do not switch to any language other than the language of ${o} in your response`;switch(e){case i:return{request:`Write a short piece for a blog post based on ${o}, keeping the same language`};case s:return{request:`Continue writing from ${o}${a}.`,rules:r?[]:["Only output the continuation of the content, without repeating it"]};case l:return{request:`Simplify ${o}${a}.`,rules:["Use words and phrases that are easier to understand for non-technical people","Use as much of the original language as possible"]};case c:return{request:`Repeat ${o}, correcting any spelling and grammar mistakes, and do not add new content${a}.`};case u:return{request:"Generate a new title for this blog post and only output the title.",rules:["Only output the raw title, without any prefix or quotes"]};case p:return{request:`Make ${o} longer${a}.`};case d:return{request:`Make ${o} shorter${a}.`};case m:return{request:`Rewrite ${o} with ${/^[aeiou]/i.test(n.tone)?"an":"a"} ${n.tone} tone${a}.`};case h:return{request:`Summarize ${o}${a}.`};case f:return{request:`Translate ${o} to the following language: ${n.language}.`};default:return null}}(k,w,v);if(k!==g){let e;switch(k){case i:e=o;break;case s:case l:case c:e=r;break;case u:e=n;break;case p:case d:e=t;break;case m:case h:case f:e=C?t:n}return A({...S,relevantContent:e,isContentGenerated:C,isGeneratingTitle:w,useGutenbergSyntax:E,customSystemPrompt:_})}return A({request:y,relevantContent:t||n,isContentGenerated:!!t?.length,isGeneratingTitle:w,useGutenbergSyntax:E,customSystemPrompt:_})}function N(e,t){k("Addressing prompt type: %o %o",e,t);const{prevMessages:n=[]}=t,r={role:"system",content:"You are an advanced polyglot ghostwriter. Your task is to help the user create and modify content based on their requests.\nWriting rules:\n- Execute the request without any acknowledgment or explanation to the user.\n- Avoid sensitive or controversial topics and ensure your responses are grammatically correct and coherent.\n- If you cannot generate a meaningful response to a user's request, reply with “__JETPACK_AI_ERROR__“. This term should only be used in this context, it is used to generate user facing errors.\n"},o=[...n];switch(o.push(r),e){case c:return[...o,..._(t)];case l:return[...o,...C(t)];case h:return[...o,...S(t)];case p:return[...o,...x(t)];case f:return[...o,...j(t)];case m:return[...o,...L(t)];case v:return[...n,...P(t)];default:throw new Error(`Unknown prompt type: ${e}`)}}},74359:function(e,t,n){"use strict";const r=new(n(92213).Z)({emDelimiter:"_",headingStyle:"atx"});r.addRule("strikethrough",{filter:["del","s","strike"],replacement:function(e){return"~~"+e+"~~"}}),t.Z=r},854:function(e,t,n){"use strict";n.d(t,{WN:function(){return l},h7:function(){return i},t$:function(){return c},xN:function(){return s}});var r=n(4981),o=n(9818),a=n(74359);function i(e){if(!e)return"";const t=(0,o.select)("core/block-editor"),n=t.getBlockIndex(e),i=t.getBlocks().slice(0,n)??[];return i?.length?a.Z.turndown((0,r.serialize)(i)):""}function s(){const e=(0,o.select)("core/block-editor").getBlocks();return e?.length?a.Z.turndown((0,r.serialize)(e)):""}function l(e){const t=(0,o.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?t.innerBlocks.filter((e=>null!=e)).map((e=>(0,r.getBlockContent)(e.clientId))).join("\n\n"):""}function c(e){if(!e?.replace(/\s+/,"").length)return"";const t=document.createElement("div");t.innerHTML=e;const{textContent:n,innerText:r}=t;return n&&!n.replace(/\s+/,"").length||r&&!r.replace(/\s+/,"").length?"":t.textContent||t.innerText||""}},5863:function(e,t,n){"use strict";n.d(t,{c:function(){return a}});const r=e=>{delete e.clientId;for(const t of e.innerBlocks??[])r(t);return e},o=e=>r((e=>JSON.parse(JSON.stringify(e)))(e));function a(e,t){const n=o(e),r=o(t);return JSON.stringify(n)===JSON.stringify(r)}},56359:function(e,t,n){"use strict";function r(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}n.d(t,{J:function(){return r}})},81765:function(e,t,n){"use strict";var r=n(4981),o=n(92694),a=n(54765),i=n(49259);(0,o.addFilter)("blocks.registerBlockType","jetpack/handle-jetpack-ai-supports",(function(e){const t=(0,r.getBlockSupport)(e,"jetpack/ai");return t&&t?.assistant&&(0,a.J7)()?{...e,edit:(0,i.ZP)(e.edit)}:e}),100)},6747:function(e,t,n){"use strict";n.d(t,{b:function(){return c}});var r=n(4981),o=n(23536),a=n(54765),i=n(63634),s=n(74359);const l=[];function c(e,t){const{content:n,...a}=t;let l=n;"core/heading"===e&&t?.level&&(l=l.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const c=s.Z.turndown(l),u=[];return i.SV?u.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:c}}):(u.push({role:"user",content:"Tell me some content for this block, please."}),u.push({role:"assistant",content:c})),(0,r.createBlock)(o.name,{...a,content:c,originalContent:c,messages:u,originalMessages:u})}for(const e of a.NP)l.push({type:"block",blocks:[e],isMatch:()=>(0,a.J7)(),transform:(t,n)=>{const o=(0,r.getSaveContent)(e,t,n);return c(e,{...t,content:o})}});t.Z={from:l}},50756:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(65235),l=n.n(s),c=n(92819);const __=i.__,u="09:00",p="17:00";class d extends a.Component{renderInterval=(e,t)=>{const{day:n}=this.props,{opening:i,closing:s}=e;return(0,r.createElement)(a.Fragment,{key:t},(0,r.createElement)("div",{className:"business-hours__row"},(0,r.createElement)("div",{className:l()(n.name,"business-hours__day")},0===t&&this.renderDayToggle()),(0,r.createElement)("div",{className:l()(n.name,"business-hours__hours")},(0,r.createElement)(o.TextControl,{type:"time",label:__("Opening","jetpack"),value:i,className:"business-hours__open",placeholder:u,onChange:e=>{this.setHour(e,"opening",t)}}),(0,r.createElement)(o.TextControl,{type:"time",label:__("Closing","jetpack"),value:s,className:"business-hours__close",placeholder:p,onChange:e=>{this.setHour(e,"closing",t)}})),(0,r.createElement)("div",{className:"business-hours__remove"},n.hours.length>1&&(0,r.createElement)(o.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}}))),t===n.hours.length-1&&(0,r.createElement)("div",{className:"business-hours__row business-hours-row__add"},(0,r.createElement)("div",{className:l()(n.name,"business-hours__day")}," "),(0,r.createElement)("div",{className:l()(n.name,"business-hours__hours")},(0,r.createElement)(o.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval},__("Add Hours","jetpack"))),(0,r.createElement)("div",{className:"business-hours__remove"}," ")))};setHour=(e,t,n)=>{const{day:r,attributes:o,setAttributes:a}=this.props,{days:i}=o;a({days:i.map((o=>o.name===r.name?{...o,hours:o.hours.map(((r,o)=>o===n?{...r,[t]:e}:r))}:o))})};toggleClosed=e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:o}=n;r({days:o.map((n=>{if(n.name===t.name){const t=e?[{opening:u,closing:p}]:[];return{...n,hours:t}}return n}))})};addInterval=()=>{const{day:e,attributes:t,setAttributes:n}=this.props,{days:r}=t;e.hours.push({opening:"",closing:""}),n({days:r.map((t=>t.name===e.name?{...t,hours:e.hours}:t))})};removeInterval=e=>{const{day:t,attributes:n,setAttributes:r}=this.props,{days:o}=n;r({days:o.map((n=>t.name===n.name?{...n,hours:n.hours.filter(((t,n)=>e!==n))}:n))})};isClosed(){const{day:e}=this.props;return(0,c.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,r.createElement)(a.Fragment,null,(0,r.createElement)("span",{className:"business-hours__day-name"},t.days[e.name]),(0,r.createElement)(o.ToggleControl,{label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed}))}renderClosed(){const{day:e}=this.props;return(0,r.createElement)("div",{className:"business-hours__row business-hours-row__closed"},(0,r.createElement)("div",{className:l()(e.name,"business-hours__day")},this.renderDayToggle()),(0,r.createElement)("div",{className:l()(e.name,"closed","business-hours__hours")}," "),(0,r.createElement)("div",{className:"business-hours__remove"}," "))}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}t.Z=d},80190:function(e,t,n){"use strict";var r=n(51806),o=n(69771),a=n(69307),i=n(65736),s=n(92819);const _x=i._x;class l extends a.Component{formatTime(e){const{timeFormat:t}=this.props,[n,r]=e.split(":"),a=new Date;return!(!n||!r)&&(a.setHours(n),a.setMinutes(r),(0,o.date)(t,a))}renderInterval=(e,t)=>{const{day:n}=this.props,o=n.hours;return(0,r.createElement)("span",{key:t},(0,i.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),o.length>1+t&&(0,r.createElement)("span",null,", "))};render(){const{day:e,localization:t}=this.props,n=e.hours.filter((e=>this.formatTime(e.opening)&&this.formatTime(e.closing)));return(0,r.createElement)("div",{className:"jetpack-business-hours__item"},(0,r.createElement)("dt",{className:e.name},t.days[e.name]),(0,r.createElement)("dd",null,(0,s.isEmpty)(n)?_x("Closed","business is closed on a full day","jetpack"):n.map(this.renderInterval),(0,r.createElement)("br",null)))}}t.Z=l},86162:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(13419),s=n(86989),l=n.n(s),c=n(55609),u=n(69771),p=n(69307),d=n(65736),m=n(65235),h=n.n(m),f=n(22023),g=n(50756),v=n(80190);const __=d.__,b=(0,i.dM)(f),k={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0};class y extends p.Component{state={localization:k,hasFetched:!1};componentDidMount(){this.apiFetch()}apiFetch(){this.setState({data:k},(()=>{l()({path:"/wpcom/v2/business-hours/localized-week"}).then((e=>{this.setState({localization:e,hasFetched:!0})}),(()=>{this.setState({localization:k,hasFetched:!0})}))}))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{days:r}=e,{localization:i,hasFetched:s}=this.state,{startOfWeek:l}=i,p=r.concat(r.slice(0,l)).slice(l);if(!s)return(0,a.createElement)(c.Placeholder,{icon:b,label:__("Loading business hours","jetpack")});if(!n){const e=(0,u.getSettings)(),{formats:{time:n}}=e;return(0,a.createElement)("dl",{className:h()(t,"jetpack-business-hours")},p.map(((e,t)=>(0,a.createElement)(v.Z,{key:t,day:e,localization:i,timeFormat:n}))))}return(0,a.createElement)("div",{className:h()(t,"is-edit")},p.map(((e,t)=>(0,a.createElement)(g.Z,o()({key:t,day:e,localization:i},this.props)))))}}t.Z=y},60866:function(e,t,n){"use strict";var r=n(51806),o=n(31985),a=n(22023),i=n(86162);(0,o.S)(a,{edit:e=>(0,r.createElement)(i.Z,e),save:()=>null})},98625:function(e,t,n){"use strict";var r=n(55609),o=n(92819);const a=(0,r.withFallbackStyles)(((e,t)=>{const{backgroundColor:n,textColor:r}=t,a=(0,o.get)(n,"color"),i=!(0,o.get)(r,"color")&&e?e.querySelector('[contenteditable="true"]'):null;return{fallbackBackgroundColor:a||!e?void 0:getComputedStyle(e).backgroundColor,fallbackTextColor:r||!i?void 0:getComputedStyle(i).color}}));t.Z=a},70424:function(e,t,n){"use strict";var r=n(24381);t.Z={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string"},placeholder:{type:"string"},url:{type:"string"},textColor:{type:"string"},customTextColor:{type:"string",validator:r.Z},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:r.Z},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"}}},43043:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(90446);const __=i.__;function l(e){let{borderRadius:t="",setAttributes:n}=e;const i=(0,a.useCallback)((e=>n({borderRadius:e})),[n]);return(0,r.createElement)(o.PanelBody,{title:__("Border Settings","jetpack")},(0,r.createElement)(o.RangeControl,{allowReset:!0,initialPosition:s.pg,label:__("Border radius","jetpack"),max:s.Gp,min:s.G0,onChange:i,value:t}))}},36953:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(52175),a=n(65736);const __=a.__;function i(e){let{isGradientAvailable:t,backgroundColor:n,fallbackBackgroundColor:a,fallbackTextColor:i,gradientValue:s,setBackgroundColor:l,setGradient:c,setTextColor:u,textColor:p}=e;const d=(0,r.createElement)(o.ContrastChecker,{backgroundColor:n.color,fallbackBackgroundColor:a,fallbackTextColor:i,isLargeText:!1,textColor:p.color});return t?(0,r.createElement)(o.__experimentalPanelColorGradientSettings,{settings:[{colorValue:p.color,label:__("Text Color","jetpack"),onColorChange:u},{colorValue:n.color,gradientValue:s,label:__("Background","jetpack"),onColorChange:l,onGradientChange:c}],title:__("Background & Text Color","jetpack")},d):(0,r.createElement)(o.PanelColorSettings,{colorSettings:[{value:p.color,onChange:u,label:__("Text Color","jetpack")},{value:n.color,onChange:l,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack")},d)}},90446:function(e,t,n){"use strict";n.d(t,{DA:function(){return o},G0:function(){return s},Gp:function(){return i},pg:function(){return a}});var r=n(52175);const o=!!r.__experimentalUseGradient,a=5,i=50,s=0},29343:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(9818),a=n(30429),i=n(43043),s=n(36953);function l(e){let{attributes:t,backgroundColor:n,clientId:l,context:c,fallbackBackgroundColor:u,fallbackTextColor:p,setAttributes:d,setBackgroundColor:m,setTextColor:h,textColor:f,gradientValue:g,setGradient:v,isGradientAvailable:b}=e;const{align:k,borderRadius:y}=t,w="jetpack/parentBlockWidth"in c,E=w?c["jetpack/parentBlockWidth"]:t.width,_=(0,o.useSelect)((e=>{const{getBlock:t,getBlockRootClientId:n}=e("core/block-editor");return t(n(l))})),{updateBlockAttributes:C}=(0,o.useDispatch)("core/block-editor");return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.Z,{backgroundColor:n,fallbackBackgroundColor:u,fallbackTextColor:p,gradientValue:g,setBackgroundColor:m,setGradient:v,setTextColor:h,textColor:f,isGradientAvailable:b}),(0,r.createElement)(i.Z,{borderRadius:y,setAttributes:d}),(0,r.createElement)(a.G,{align:k,width:E,onChange:e=>{w?C(_.clientId,{width:e}):d({width:e})}}))}},5501:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(52175),s=n(94333),l=n(65736),c=n(65235),u=n.n(c),p=n(81673),d=n(98625),m=n(90446),h=n(29343),f=n(16969);const __=l.__;t.Z=(0,s.compose)((0,i.withColors)({backgroundColor:"background-color"},{textColor:"color"}),d.Z)((function(e){const{attributes:t,backgroundColor:n,className:r,clientId:s,context:l,setAttributes:c,textColor:d}=e,{borderRadius:g,element:v,placeholder:b,text:k,width:y,fontSize:w}=t,E="jetpack/parentBlockWidth"in l;(0,f.Z)({attributes:t,clientId:s,setAttributes:c}),(0,p.Z)({attributes:t,disableEffects:E,setAttributes:c});const{gradientClass:_,gradientValue:C,setGradient:S}=m.DA?(0,i.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},x=u()("wp-block-button",r),j=u()("wp-block-button__link",{"has-background":n.color||C,[n.class]:!C&&n.class,"has-text-color":d.color,[d.class]:d.class,[_]:_,"no-border-radius":0===g,"has-custom-width":!!y,[`has-${w}-font-size`]:!!w,"has-custom-font-size":!!w}),L={...!n.color&&C?{background:C}:{backgroundColor:n.color},fontSize:t.style?.typography?.fontSize,color:d.color,borderRadius:g?g+"px":void 0,width:y};return(0,a.createElement)("div",{className:x},(0,a.createElement)(i.RichText,{allowedFormats:"input"===v?[]:void 0,className:j,disableLineBreaks:"input"===v,onChange:e=>c({text:e}),placeholder:b||__("Add text…","jetpack"),style:L,value:k,withoutInteractiveFormatting:!0}),(0,a.createElement)(i.InspectorControls,null,(0,a.createElement)(h.Z,o()({gradientValue:C,setGradient:S,isGradientAvailable:m.DA},e))))}))},48887:function(e,t,n){"use strict";var r=n(31985),o=n(77123);(0,r.Z)(o.u,o.X)},26361:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"}))},77123:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return c}});var r=n(65736),o=n(5820),a=n(70424),i=n(5501),s=n(26361),l=n(29586);const __=r.__,c="button",u={title:__("Button","jetpack"),icon:s.Z,category:(0,o.Z)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"],typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}}},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],attributes:a.Z,edit:i.Z,save:l.Z,usesContext:["jetpack/parentBlockWidth"]}},29586:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(52175),a=n(65235),i=n.n(a),s=n(90446);function l(e){let{attributes:t,blockName:n,uniqueId:a}=e;const{backgroundColor:l,borderRadius:c,className:u,customBackgroundColor:p,customGradient:d,customTextColor:m,gradient:h,saveInPostContent:f,text:g,textColor:v,url:b,width:k,fontSize:y}=t;if(!f)return null;const w=(0,o.getColorClassName)("background-color",l),E=s.DA?(0,o.__experimentalGetGradientClass)(h):void 0,_=(0,o.getColorClassName)("color",v),C=i()("wp-block-button","jetpack-submit-button",u,{[`wp-block-jetpack-${n}`]:n}),S=i()("wp-block-button__link",{"has-text-color":v||m,[_]:_,"has-background":l||h||p||d,[w]:w,[E]:E,"no-border-radius":0===c,"has-custom-width":!!k,[`has-${y}-font-size`]:!!y,"has-custom-font-size":!!y}),x={background:d||void 0,backgroundColor:w||d||h?void 0:p,fontSize:t.style?.typography?.fontSize,color:_?void 0:m,borderRadius:c?c+"px":void 0,width:k};return(0,r.createElement)("div",{className:C},(0,r.createElement)(o.RichText.Content,{className:S,"data-id-attr":a||"placeholder",href:b,id:a,rel:"noopener noreferrer",role:"button",style:x,tagName:"a",target:"_blank",value:g}))}},16969:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9818),o=n(69307),a=n(92819);function i(e){let{attributes:t,clientId:n,setAttributes:i}=e;const{passthroughAttributes:s}=t,{attributesToSync:l}=(0,r.useSelect)((e=>{const{getBlockAttributes:r,getBlockRootClientId:o}=e("core/block-editor"),i=r(o(n))||{},l=(0,a.mapValues)(s,(e=>i[e]));return{attributesToSync:(0,a.pickBy)(l,((e,n)=>e!==t[n]))}}));(0,o.useEffect)((()=>{(0,a.isEmpty)(l)||i(l)}),[l,i])}},39964:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});const r="https://calendly.com/wpcom/jetpack-block-example"},60153:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(65736),l=n(57538);const __=s.__,_x=s._x,c=e=>{let{onEditClick:t}=e;return(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarButton,{onClick:()=>t(!0)},__("Edit","jetpack")))},u=e=>{const{attributes:{hideEventTypeDetails:t,url:n},defaultClassName:a,embedCode:s,parseEmbedCode:l,setAttributes:c,setEmbedCode:u}=e;let p=null;return n&&(p=(0,o.Ug)()||(0,o.Wp)()?"https://wordpress.com/support/wordpress-editor/blocks/calendly-block/#customize-the-calendly-block":"https://jetpack.com/support/jetpack-blocks/calendly-block/#customizing-a-calendly-block"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:l,className:`${a}-embed-form-sidebar`},(0,r.createElement)("input",{type:"text",id:"embedCode",onChange:e=>u(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:s||"",className:"components-placeholder__input"}),(0,r.createElement)("div",null,(0,r.createElement)(i.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)(i.ToggleControl,{label:__("Hide event type details","jetpack"),checked:t,onChange:()=>c({hideEventTypeDetails:!t})})),p&&(0,r.createElement)(i.Notice,{className:`${a}-color-notice`,isDismissible:!1},(0,r.createElement)(i.ExternalLink,{href:p},__("Explore more customization options.","jetpack"))))};t.ZP=e=>{const{attributes:t,clientId:n,isEditingUrl:o,setAttributes:i,setIsEditingUrl:s}=e,{style:p,url:d}=t,m=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,r.createElement)(r.Fragment,null,d&&!o&&(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(c,{onEditClick:s})),d&&(0,r.createElement)(l.Z,{clientId:n,styleOptions:m,onSelectStyle:i,activeStyle:p,attributes:t,viewportWidth:500}),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(u,e)))}},83830:function(e,t,n){"use strict";var r=n(51806),o=n(4981),a=n(65736),i=n(24381);const __=a.__;t.Z={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:i.Z},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:i.Z},textColor:{type:"string",default:"4D5055",validator:i.Z},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:i.Z},customTextButtonColor:{type:"string",validator:i.Z}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:n,submitButtonBackgroundColor:r,submitButtonClasses:a,backgroundButtonColor:i,textButtonColor:s,customBackgroundButtonColor:l,customTextButtonColor:c,...u}=e,p={text:(d=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:d.submitButtonTextColor||d.textButtonColor,customTextColor:d.customTextButtonColor,backgroundColor:d.submitButtonBackgroundColor||d.backgroundButtonColor,customBackgroundColor:d.customBackgroundButtonColor,url:d.url};var d;return[u,[(0,o.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...p})]]},save:e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}}},29415:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(13419),s=n(52175),l=n(4981),c=n(55609),u=n(9818),p=n(69307),d=n(65736),m=n(92819),h=n(4554),f=n(23621),g=n(23329),v=n(39964),b=n(60153),k=n(4867);const __=d.__,_x=d._x,y="jetpack/button",w={element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:v.l},E=(0,i.dM)(g);t.Z=(0,c.withNotices)((function(e){const{attributes:t,className:n,clientId:r,name:i,noticeOperations:d,noticeUI:_,setAttributes:C}=e,S=(0,l.getBlockDefaultClassName)(i),x=(0,h.S)(g.attributes,t);(0,m.isEqual)(x,t)||C(x);const{backgroundColor:j,hideEventTypeDetails:L,primaryColor:P,textColor:A,style:T,url:N}=x,[M,I]=(0,p.useState)(N),[R,D]=(0,p.useState)(!1),[B,Z]=(0,p.useState)(!1),[F,O]=(0,p.useState)({}),U=()=>{d.removeAllNotices(),d.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,p.useEffect)((()=>{N&&v.l!==N&&"link"!==T&&(0,f.Z)(N,Z).catch((()=>{C({url:void 0}),U()}))}),[]);const z=e=>{if(!e)return void U();e.preventDefault();const t=(0,k.CC)(M);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,u.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach((e=>{(0,u.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)})),O(t.buttonAttributes)}(0,f.Z)(t.url,Z).then((()=>{const e=(0,h.S)(g.attributes,t);C(e),D(!1),d.removeAllNotices()})).catch((()=>{C({url:void 0}),U()}))}else U()},$=(0,a.createElement)("div",{className:"wp-block-embed is-loading"},(0,a.createElement)(c.Spinner,null),(0,a.createElement)("p",null,__("Embedding…","jetpack"))),H=(0,a.createElement)(c.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:E,notices:_},(0,a.createElement)("form",{onSubmit:z},(0,a.createElement)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:M||"",className:"components-placeholder__input"}),(0,a.createElement)("div",null,(0,a.createElement)(c.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,a.createElement)("div",{className:`${S}-learn-more`},(0,a.createElement)(c.ExternalLink,{href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview"},__("Need help finding your embed code?","jetpack")))),q=(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:`${S}-overlay`}),(0,a.createElement)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:L?1:0,background_color:j,primary_color:P,text_color:A});return`${N}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})),V=(0,a.createElement)(s.InnerBlocks,{template:[[y,{...w,...F,passthroughAttributes:{url:"url"}}]],templateLock:"all"});if(B)return $;let G=n;return N&&!R&&(G+=` calendly-style-${T}`),(0,a.createElement)("div",{className:G},(0,a.createElement)(b.ZP,o()({},e,{defaultClassName:S,embedCode:M,isEditingUrl:R,parseEmbedCode:z,setEmbedCode:I,setIsEditingUrl:D})),N&&!R?"inline"===T?q:V:H)}))},52020:function(e,t,n){"use strict";var r=n(4981),o=n(31985),a=n(23329),i=n(83830),s=n(29415),l=n(15816),c=n(4867);(0,o.S)(a,{edit:s.Z,save:l.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&c.mL.test(e.textContent),transform:e=>{const t=(0,c.CC)(e.textContent);return(0,r.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.Z]})},15816:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(52175);function a(){return(0,r.createElement)("div",null,(0,r.createElement)(o.InnerBlocks.Content,null))}},4867:function(e,t,n){"use strict";n.d(t,{CC:function(){return o},mL:function(){return r}});const r=/(^|\/\/)(calendly\.com[^"']*)/i,o=e=>{if(!e)return;const t=(e=>{const t=e.match(r);if(t)return"https://"+t[2]})(e);if(!t)return;const n=(e=>{const t={},n=new URL(e);if(t.url=n.origin+n.pathname,!n.search)return t;const r=new URLSearchParams(n.search),o=r.get("background_color"),a=r.get("primary_color"),i=r.get("text_color"),s=/^[A-Za-z0-9]{6}$/;return r.get("hide_event_type_details")&&(t.hideEventTypeDetails=r.get("hide_event_type_details")),o&&o.match(s)&&(t.backgroundColor=o),a&&a.match(s)&&(t.primaryColor=a),i&&i.match(s)&&(t.textColor=i),t})(t),o=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(o&&(n.style=o),"link"===o){n.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(n.buttonAttributes.text=t);const r=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);r&&(n.buttonAttributes.textColor=void 0,n.buttonAttributes.customTextColor=r);const o=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);o&&(n.buttonAttributes.backgroundColor=void 0,n.buttonAttributes.customBackgroundColor=o)}return n}},36553:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),l=n(65235),c=n.n(l),u=n(35208);const __=s.__;class p extends i.Component{constructor(){super(...arguments),this.preventEnterKey=this.preventEnterKey.bind(this)}preventEnterKey(e){"Enter"!==e.key||e.preventDefault()}render(){const{attributes:{address:e,addressLine2:t,addressLine3:n,city:s,region:l,postal:p,country:d,linkToGoogleMaps:m},isSelected:h,setAttributes:f}=this.props,g=[e,t,n,s,l,p,d].some((e=>""!==e)),v=c()({"jetpack-address-block":!0,"is-selected":h}),b=(0,r.createElement)(a.ToggleControl,{label:__("Link address to Google Maps","jetpack"),checked:m,onChange:e=>f({linkToGoogleMaps:e})});return(0,r.createElement)("div",{className:v},!h&&g&&(0,u.Z)(this.props),(h||!g)&&(0,r.createElement)(i.Fragment,null,(0,r.createElement)(o.PlainText,{value:e,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>f({address:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:t,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>f({addressLine2:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:n,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>f({addressLine3:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:s,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>f({city:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:l,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>f({region:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:p,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>f({postal:e}),onKeyDown:this.preventEnterKey}),(0,r.createElement)(o.PlainText,{value:d,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>f({country:e}),onKeyDown:this.preventEnterKey}),b))}}t.Z=p},11005:function(e,t,n){"use strict";n.d(t,{X:function(){return p},u:function(){return u}});var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(36598),l=n(36553),c=n(35208);const __=i.__,_x=i._x,u="address",p={title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,s.Z)((0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,r.createElement)(o.Circle,{cx:"12",cy:"9",r:"2.5"}))),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:l.Z,save:c.Z}},35208:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736);const __=a.__,i=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:a,city:i,region:s,postal:l,country:c}}=e;return(0,r.createElement)(o.Fragment,null,t&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address1"},t),n&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address2"},n),a&&(0,r.createElement)("div",{className:"jetpack-address__address jetpack-address__address3"},a),i&&!(s||l)&&(0,r.createElement)("div",{className:"jetpack-address__city"},i),i&&(s||l)&&(0,r.createElement)("div",null,(0,r.createElement)("span",{className:"jetpack-address__city"},i),", ",(0,r.createElement)("span",{className:"jetpack-address__region"},s)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},l)),!i&&(s||l)&&(0,r.createElement)("div",null,(0,r.createElement)("span",{className:"jetpack-address__region"},s)," ",(0,r.createElement)("span",{className:"jetpack-address__postal"},l)),c&&(0,r.createElement)("div",{className:"jetpack-address__country"},c))},s=e=>{let{attributes:{address:t,addressLine2:n,addressLine3:r,city:o,region:a,postal:i,country:s}}=e;let l=a?`+${a},`:"";l=i?`${l}+${i}`:l;return`https://www.google.com/maps/search/${t?`${t},`:""}${n?`${n},`:""}${r?`${r},`:""}${o?`+${o},`:""}${l}${s?`+${s}`:""}`.replace(" ","+")};t.Z=e=>(e=>{let{address:t,addressLine2:n,addressLine3:r,city:o,region:a,postal:i,country:s}=e;return[t,n,r,o,a,i,s].some((e=>""!==e))})(e.attributes)&&(0,r.createElement)("div",{className:e.className},e.attributes.linkToGoogleMaps&&(0,r.createElement)("a",{href:s(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack")},(0,r.createElement)(i,e)),!e.attributes.linkToGoogleMaps&&(0,r.createElement)(i,e))},83238:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(65235),i=n.n(a);const s=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],l=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]];t.Z=e=>{const{isSelected:t}=e;return(0,r.createElement)("div",{className:i()({"jetpack-contact-info-block":!0,"is-selected":t})},(0,r.createElement)(o.InnerBlocks,{allowedBlocks:s,templateLock:!1,template:l}))}},82566:function(e,t,n){"use strict";var r=n(4981),o=n(31985),a=n(11005),i=n(58891),s=n(83238),l=n(99804),c=n(52398),u=n(56162);(0,o.S)(i,{edit:s.Z,save:u.Z,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!!n?.raw&&"widget_contact_info"===t},transform:e=>{let{instance:t}=e,n=[(0,r.createBlock)("core/heading",{content:t.raw.title}),(0,r.createBlock)("jetpack/email",{email:t.raw.email}),(0,r.createBlock)("jetpack/phone",{phone:t.raw.phone}),(0,r.createBlock)("jetpack/address",{address:t.raw.address})];return t.raw.hours&&(n=[...n,(0,r.createBlock)("core/paragraph",{content:t.raw.hours})]),t.raw.showmap&&t.raw.address&&(n=[...n,(0,r.createBlock)("jetpack/map",{address:t.raw.address})]),(0,r.createBlock)("jetpack/contact-info",{},n)}}]}},[{name:a.u,settings:a.X},{name:l.u,settings:l.X},{name:c.u,settings:c.X}])},31336:function(e,t,n){"use strict";var r=n(65736),o=n(66425),a=n(90458);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,o.Z)("email",e,__("Email","jetpack"),a.Z,(e=>t({email:e})))}},99804:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return c}});var r=n(51806),o=n(55609),a=n(65736),i=n(36598),s=n(31336),l=n(90458);const __=a.__,_x=a._x,c="email",u={title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,i.Z)((0,r.createElement)(o.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})),category:"grow",attributes:{email:{type:"string",default:""}},edit:s.Z,save:l.Z,parent:["jetpack/contact-info"]}},90458:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(92384);t.Z=e=>{let{attributes:{email:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},t.split(/(\s+)/).map(((e,t)=>{const n=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&a.validate(n)?e===n?(0,r.createElement)("a",{href:`mailto:${e}`,key:t},e):(0,r.createElement)(o.Fragment,{key:t},(0,r.createElement)("a",{href:`mailto:${e}`,key:t},n),(0,r.createElement)(o.Fragment,null,e.slice(-(e.length-n.length)))):(0,r.createElement)(o.Fragment,{key:t},e)})))}},70835:function(e,t,n){"use strict";var r=n(65736),o=n(66425),a=n(21621);const __=r.__;t.Z=e=>{const{setAttributes:t}=e;return(0,o.Z)("phone",e,__("Phone number","jetpack"),a.Z,(e=>t({phone:e})))}},52398:function(e,t,n){"use strict";n.d(t,{X:function(){return u},u:function(){return c}});var r=n(51806),o=n(55609),a=n(65736),i=n(36598),s=n(70835),l=n(21621);const __=a.__,_x=a._x,c="phone",u={title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,i.Z)((0,r.createElement)(o.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:s.Z,save:l.Z}},21621:function(e,t,n){"use strict";var r=n(51806);t.Z=e=>{let{attributes:{phone:t},className:n}=e;return t&&(0,r.createElement)("div",{className:n},function(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const n=e.indexOf(t[0]);let o=n?e.substring(n-1):e,a=n?e.substring(0,n):"",i=o.replace(/\D/g,"");return/[0-9/+/(]/.test(o[0])?(a=a.slice(0,-1),"+"===o[0]&&(i="+"+i)):o=o.substring(1),[a.trim()?(0,r.createElement)("span",{key:"phonePrefix",className:"phone-prefix"},a):null,(0,r.createElement)("a",{key:"phoneNumber",href:`tel:${i}`},o)]}(t))}},56162:function(e,t,n){"use strict";var r=n(51806),o=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))}},10764:function(e,t,n){"use strict";var r=n(51806),o=n(25607),a=n(43317),i=n(52175),s=n(69307),l=n(65235),c=n.n(l),u=n(79162);t.Z=e=>{let{className:t=null,currency:n=null,defaultValue:l=null,disabled:p=!1,label:d="",onChange:m=null,value:h=""}=e;const[f,g]=(0,s.useState)((0,o.ZP)(h,n,{symbol:""})),[v,b]=(0,s.useState)(!1),[k,y]=(0,s.useState)(!1),w=(0,s.useRef)(null),E=(0,s.useCallback)((e=>{if(g(e),!m)return;const t=(0,u.Vm)(e,n);t&&t>=(0,u.hj)(n)?(m(t),y(!1)):y(!0)}),[n,m]),_=()=>{w.current&&(w.current.focus(),b(!0))};return(0,s.useEffect)((()=>{if(!w.current)return;const e=w.current,t=()=>{b(!1),f||E((0,o.ZP)(l,n,{symbol:""}))};return e.addEventListener("blur",t),()=>{e.removeEventListener("blur",t)}}),[n,l,f,w,E]),(0,s.useEffect)((()=>{v||k||g((0,o.ZP)(h,n,{symbol:""}))}),[n,v,k,E,h]),(0,s.useEffect)((()=>{E((0,o.ZP)(h,n,{symbol:""}))}),[h]),(0,r.createElement)("div",{className:c()("donations__amount",t,{"has-focus":v,"has-error":k}),role:"button",tabIndex:0,onClick:_,onKeyDown:_},a.M[n].symbol,p?(0,r.createElement)("div",{className:"donations__amount-value"},(0,o.ZP)(h||l,n,{symbol:""})):(0,r.createElement)(i.RichText,{allowedFormats:[],"aria-label":d,onChange:e=>E(e),placeholder:(0,o.ZP)(l,n,{symbol:""}),ref:w,value:f,withoutInteractiveFormatting:!0}))}},82275:function(e,t,n){"use strict";var r=n(51806),o=n(43317),a=n(13419),i=n(52175),s=n(55609),l=n(65736),c=n(39630),u=n(79162);const __=l.__;t.Z=e=>{const{attributes:t,setAttributes:n}=e,{currency:l,oneTimeDonation:p,monthlyDonation:d,annualDonation:m,showCustomAmount:h}=t,f=(e,r)=>{const o={"1 month":"monthlyDonation","1 year":"annualDonation"}[e],a=t[o];n({[o]:{...a,show:r}})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(s.ToolbarGroup,null,(0,r.createElement)(s.ToolbarItem,null,(()=>(0,r.createElement)(s.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(s.Button,{className:"jetpack-donations__currency-toggle",icon:(0,r.createElement)(r.Fragment,null,l+" - "+o.M[l].symbol,(0,r.createElement)(s.Dashicon,{icon:"arrow-down"})),label:__("Change currency","jetpack"),onClick:t,onKeyDown:e=>{n||e.keyCode!==c.DOWN||(e.preventDefault(),e.stopPropagation(),t())}})},renderContent:e=>{let{onClose:t}=e;return(0,r.createElement)(s.MenuGroup,null,Object.keys(u.ck).map((e=>(0,r.createElement)(s.MenuItem,{isSelected:e===l,icon:e===l?"yes":"",onClick:()=>{(e=>{const t=(0,u.li)(e);n({currency:e,oneTimeDonation:{...p,amounts:t},monthlyDonation:{...d,amounts:t},annualDonation:{...m,amounts:t}})})(e),t()},key:`jetpack-donations-currency-${e}`},e+" - "+o.M[e].symbol))))}}))))),(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(s.ToggleControl,{checked:d.show,onChange:e=>f("1 month",e),label:__("Show monthly donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:m.show,onChange:e=>f("1 year",e),label:__("Show annual donations","jetpack")}),(0,r.createElement)(s.ToggleControl,{checked:h,onChange:e=>n({showCustomAmount:e}),label:__("Show custom amount option","jetpack")}),(0,r.createElement)(s.ExternalLink,{href:`https://wordpress.com/earn/payments/${(0,a.lQ)()}`},__("View donation earnings","jetpack")))))}},853:function(e,t,n){"use strict";var r=n(51806),o=n(25607),a=n(43317),i=n(52175),s=n(65736),l=n(79162);const __=s.__;t.Z={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:e=>{let{attributes:t}=e;const{currency:n,oneTimeDonation:s,monthlyDonation:c,annualDonation:u,showCustomAmount:p,chooseAmountText:d,customAmountText:m}=t;if(!s||!s.show||-1===s.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...c.show&&{"1 month":{title:__("Monthly","jetpack")}},...u.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:"donations__container"},Object.keys(h).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(h).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:"donations__nav-item",key:`jetpack-donations-nav-item-${t} `,"data-interval":t},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:s.heading}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:c.heading}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:u.heading}),(0,r.createElement)(i.RichText.Content,{tagName:"p",value:d}),(0,r.createElement)("div",{className:"donations__amounts donations__one-time-item"},s.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,o.ZP)(e,n))))),c.show&&(0,r.createElement)("div",{className:"donations__amounts donations__monthly-item"},c.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,o.ZP)(e,n))))),u.show&&(0,r.createElement)("div",{className:"donations__amounts donations__annual-item"},u.amounts.map((e=>(0,r.createElement)("div",{className:"donations__amount","data-amount":e},(0,o.ZP)(e,n))))),p&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(i.RichText.Content,{tagName:"p",value:m}),(0,r.createElement)("div",{className:"donations__amount donations__custom-amount"},a.M[n].symbol,(0,r.createElement)("div",{className:"donations__amount-value","data-currency":n,"data-empty-text":(0,o.ZP)(100*(0,l.hj)(n),n,{symbol:""})}))),(0,r.createElement)("div",{className:"donations__separator"},"——"),(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:s.extraText}),c.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:c.extraText}),u.show&&(0,r.createElement)(i.RichText.Content,{tagName:"p",className:"donations__annual-item",value:u.extraText}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:s.buttonText})),c.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:c.buttonText})),u.show&&(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item"},(0,r.createElement)(i.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:u.buttonText}))))))}}},86245:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(45033),s=n(9818),l=n(69307),c=n(65736),u=n(79162),p=n(74251),d=n(23267),m=n(21789),h=n(85731),f=n(24177),g=n(72833);const __=c.__;t.Z=e=>{const{attributes:t,className:n,setAttributes:r}=e,{currency:c}=t,[v,b]=(0,l.useState)(""),[k,y]=(0,l.useState)([]),{lockPostSaving:w,unlockPostSaving:E}=(0,s.useDispatch)("core/editor"),_=(0,s.useSelect)((e=>e("core/editor").getCurrentPost()),[]),{setConnectUrl:C,setConnectedAccountDefaultCurrency:S}=(0,s.useDispatch)(d.G4);(0,l.useEffect)((()=>{r({fallbackLinkUrl:_.link})}),[_.link,r]);const x=(0,s.useSelect)((e=>e(d.G4).getConnectedAccountDefaultCurrency()));(0,l.useEffect)((()=>{if(!c&&x){const e=x.toUpperCase(),t=!!u.ck[e];r(t?{currency:e}:{currency:"USD"})}}),[c,x,r]);const j=e=>{b(e)};return(0,l.useEffect)((()=>{w("donations");const e=e=>e.reduce(((e,t)=>{let{id:n,currency:r,type:o,interval:a}=t;return r===c&&"donation"===o&&(e[a]=n),e}),{});(0,h.Z)("donation").then((t=>{if(!t&&"object"!=typeof t||t.errors)return E("donations"),void b(__("Could not load data from WordPress.com.","jetpack"));C((0,p.Z)(_.id,t.connect_url)),S(t?.connected_account_default_currency?.toUpperCase());const n=e(t.products);return(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(n)?(y(n),void E("donations")):t.connect_url?(y({"one-time":-1,"1 month":-1,"1 year":-1}),void E("donations")):void(c&&(0,m.Z)(c).then((t=>{y(e(t)),E("donations")}),j))}),j)}),[w,c,_.id,C,S,E]),v?(0,a.createElement)(f.Z,{className:n,error:v}):c?(0,a.createElement)(g.Z,o()({},e,{products:k})):(0,a.createElement)(i.Z,null)}},67140:function(e,t,n){"use strict";var r=n(31985),o=n(98826),a=n(853),i=n(86245),s=n(75314);(0,r.S)(o,{edit:i.Z,save:s.Z,deprecated:[a.Z]})},21789:function(e,t,n){"use strict";var r=n(86989),o=n.n(r);t.Z=async e=>{try{return await o()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e,is_editable:!1}})}catch(e){return Promise.reject(e.message)}}},85731:function(e,t,n){"use strict";var r=n(86989),o=n.n(r),a=n(96483);t.Z=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=new URLSearchParams(window.location.search),n=(0,a.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.get("origin")?"gutenberg-wpcom":"gutenberg",...e&&{type:e},is_editable:!1});try{return await o()({path:n,method:"GET"})}catch(e){return Promise.reject(e.message)}}},24177:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(65736);const __=a.__;t.Z=e=>{let{className:t,error:n}=e;return(0,r.createElement)(o.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:n,className:t})}},75314:function(e,t,n){"use strict";var r=n(51806),o=n(52175);t.Z=e=>{let{attributes:t}=e;const{fallbackLinkUrl:n,oneTimeDonation:a,monthlyDonation:i,annualDonation:s}=t;return a&&a.show&&a.planId&&-1!==a.planId?(0,r.createElement)("div",null,(0,r.createElement)(o.RichText.Content,{tagName:"h4",value:a.heading}),(0,r.createElement)(o.RichText.Content,{tagName:"p",value:a.extraText}),(0,r.createElement)(o.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:a.buttonText}),i.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(o.RichText.Content,{tagName:"h4",value:i.heading}),(0,r.createElement)(o.RichText.Content,{tagName:"p",value:i.extraText}),(0,r.createElement)(o.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.buttonText})),s.show&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(o.RichText.Content,{tagName:"h4",value:s.heading}),(0,r.createElement)(o.RichText.Content,{tagName:"p",value:s.extraText}),(0,r.createElement)(o.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:n,rel:"noopener noreferrer noamphtml",target:"_blank",value:s.buttonText}))):null}},91757:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(9818),i=n(65736),s=n(79162),l=n(10764);const __=i.__;t.Z=e=>{let{activeTab:t,attributes:n,setAttributes:c}=e;const{currency:u,oneTimeDonation:p,monthlyDonation:d,annualDonation:m,showCustomAmount:h,chooseAmountText:f,customAmountText:g}=n,v={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},b=e=>n[v[t]][e],k=(e,r)=>{const o=v[t],a=n[o];c({[o]:{...a,[e]:r}})},y=(0,s.li)(u),w=b("amounts"),E=(0,a.useSelect)((e=>e("core/rich-text").getFormatTypes()),[]).map((e=>e.name)).filter((e=>"core/link"!==e));return(0,r.createElement)("div",{className:"donations__tab"},(0,r.createElement)(o.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:b("heading"),onChange:e=>k("heading",e)}),(0,r.createElement)(o.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>c({chooseAmountText:e})}),(0,r.createElement)("div",{className:"donations__amounts"},w.map(((e,t)=>(0,r.createElement)(l.Z,{currency:u,defaultValue:y[t],label:(0,i.sprintf)( | |
| 2 | +(()=>{var e,t,r={7675(e,t,r){"use strict";r.d(t,{y:()=>a});var n=r(76416),o=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};const s="text/event-stream",i="last-event-id";function a(e,t){var{signal:r,headers:a,onopen:l,onmessage:u,onclose:d,onerror:p,openWhenHidden:h,fetch:m}=t,g=o(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((t,o)=>{const f=Object.assign({},a);let b;function v(){b.abort(),document.hidden||j()}f.accept||(f.accept=s),h||document.addEventListener("visibilitychange",v);let y=1e3,k=0;function w(){document.removeEventListener("visibilitychange",v),window.clearTimeout(k),b.abort()}null==r||r.addEventListener("abort",()=>{w(),t()});const _=null!=m?m:window.fetch,x=null!=l?l:c;async function j(){var r;b=new AbortController;try{const r=await _(e,Object.assign(Object.assign({},g),{headers:f,signal:b.signal}));await x(r),await(0,n.q5)(r.body,(0,n.iv)((0,n.VL)(e=>{e?f[i]=e:delete f[i]},e=>{y=e},u))),null==d||d(),w(),t()}catch(e){if(!b.signal.aborted)try{const t=null!==(r=null==p?void 0:p(e))&&void 0!==r?r:y;window.clearTimeout(k),k=window.setTimeout(j,t)}catch(e){w(),o(e)}}}j()})}function c(e){const t=e.headers.get("content-type");if(!(null==t?void 0:t.startsWith(s)))throw new Error(`Expected content-type to be ${s}, Actual: ${t}`)}},76416(e,t,r){"use strict";async function n(e,t){const r=e.getReader();let n;for(;!(n=await r.read()).done;)t(n.value)}function o(e){let t,r,n,o=!1;return function(s){void 0===t?(t=s,r=0,n=-1):t=function(e,t){const r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}(t,s);const i=t.length;let a=0;for(;r<i;){o&&(10===t[r]&&(a=++r),o=!1);let s=-1;for(;r<i&&-1===s;++r)switch(t[r]){case 58:-1===n&&(n=r-a);break;case 13:o=!0;case 10:s=r}if(-1===s)break;e(t.subarray(a,s),n),a=r,n=-1}a===i?t=void 0:0!==a&&(t=t.subarray(a),r-=a)}}function s(e,t,r){let n=i();const o=new TextDecoder;return function(s,a){if(0===s.length)null==r||r(n),n=i();else if(a>0){const r=o.decode(s.subarray(0,a)),i=a+(32===s[a+1]?2:1),c=o.decode(s.subarray(i));switch(r){case"data":n.data=n.data?n.data+"\n"+c:c;break;case"event":n.event=c;break;case"id":e(n.id=c);break;case"retry":const r=parseInt(c,10);isNaN(r)||t(n.retry=r)}}}}function i(){return{data:"",event:"",id:"",retry:void 0}}r.d(t,{VL:()=>s,iv:()=>o,q5:()=>n})},87399(e){!function(){"use strict";var t=[],r=3988292384;function n(e){var t,n,o,s,i=-1;for(t=0,o=e.length;t<o;t+=1){for(s=255&(i^e[t]),n=0;n<8;n+=1)1&~s?s>>>=1:s=s>>>1^r;i=i>>>8^s}return-1^i}function o(e,r){var n,s,i;if(void 0!==o.crc&&r&&e||(o.crc=~0,e)){for(n=o.crc,s=0,i=e.length;s<i;s+=1)n=n>>>8^t[255&(n^e[s])];return o.crc=n,-1^n}}!function(){var e,n,o;for(n=0;n<256;n+=1){for(e=n,o=0;o<8;o+=1)1&e?e=r^e>>>1:e>>>=1;t[n]=e>>>0}}(),e.exports=function(e,t){var r;e="string"==typeof e?(r=e,Array.prototype.map.call(r,function(e){return e.charCodeAt(0)})):e;return((t?n(e):o(e))>>>0).toString(16)},e.exports.direct=n,e.exports.table=o}()},39904(e,t){"use strict";var r=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;t.t=function(e){if(!e)return!1;if(e.length>254)return!1;if(!r.test(e))return!1;var t=e.split("@");return!(t[0].length>64)&&!t[1].split(".").some(function(e){return e.length>63})}},2467(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(r,n){function o(r){e.removeListener(t,s),n(r)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}g(e,t,s,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&g(e,"error",t,r)}(e,o,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var i=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var o,s,i,l;if(a(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),i=s[t]),void 0===i)i=s[t]=r,++e._eventsCount;else if("function"==typeof i?i=s[t]=n?[r,i]:[i,r]:n?i.unshift(r):i.push(r),(o=c(e))>0&&i.length>o&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=u.bind(n);return o.listener=r,n.wrapFn=o,o}function p(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):m(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function m(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function o(s){n.once&&e.removeEventListener(t,o),r(s)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var o="error"===e,s=this._events;if(void 0!==s)o=o&&void 0===s.error;else if(!o)return!1;if(o){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var l=c.length,u=m(c,l);for(r=0;r<l;++r)n(u[r],this,t)}return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,o,s,i;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){i=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,i||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,s=Object.keys(r);for(n=0;n<s.length;++n)"removeListener"!==(o=s[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},s.prototype.listenerCount=h,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},20305(e){"use strict";function t(e,t,r,n){var o=Number(e[t].meta.id+1).toString(),s="";return"string"==typeof n.docId&&(s="-"+n.docId+"-"),s+o}function r(e,t){var r=Number(e[t].meta.id+1).toString();return e[t].meta.subId>0&&(r+=":"+e[t].meta.subId),"["+r+"]"}function n(e,t,r,n,o){var s=o.rules.footnote_anchor_name(e,t,r,n,o),i=o.rules.footnote_caption(e,t,r,n,o),a=s;return e[t].meta.subId>0&&(a+=":"+e[t].meta.subId),'<sup class="footnote-ref"><a href="#fn'+s+'" id="fnref'+a+'">'+i+"</a></sup>"}function o(e,t,r){return(r.xhtmlOut?'<hr class="footnotes-sep" />\n':'<hr class="footnotes-sep">\n')+'<section class="footnotes">\n<ol class="footnotes-list">\n'}function s(){return"</ol>\n</section>\n"}function i(e,t,r,n,o){var s=o.rules.footnote_anchor_name(e,t,r,n,o);return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),'<li id="fn'+s+'" class="footnote-item">'}function a(){return"</li>\n"}function c(e,t,r,n,o){var s=o.rules.footnote_anchor_name(e,t,r,n,o);return e[t].meta.subId>0&&(s+=":"+e[t].meta.subId),' <a href="#fnref'+s+'" class="footnote-backref">↩︎</a>'}e.exports=function(e){var l=e.helpers.parseLinkLabel,u=e.utils.isSpace;e.renderer.rules.footnote_ref=n,e.renderer.rules.footnote_block_open=o,e.renderer.rules.footnote_block_close=s,e.renderer.rules.footnote_open=i,e.renderer.rules.footnote_close=a,e.renderer.rules.footnote_anchor=c,e.renderer.rules.footnote_caption=r,e.renderer.rules.footnote_anchor_name=t,e.block.ruler.before("reference","footnote_def",function(e,t,r,n){var o,s,i,a,c,l,d,p,h,m,g,f=e.bMarks[t]+e.tShift[t],b=e.eMarks[t];if(f+4>b)return!1;if(91!==e.src.charCodeAt(f))return!1;if(94!==e.src.charCodeAt(f+1))return!1;for(c=f+2;c<b;c++){if(32===e.src.charCodeAt(c))return!1;if(93===e.src.charCodeAt(c))break}if(c===f+2)return!1;if(c+1>=b||58!==e.src.charCodeAt(++c))return!1;if(n)return!0;for(c++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),l=e.src.slice(f+2,c-2),e.env.footnotes.refs[":"+l]=-1,(d=new e.Token("footnote_reference_open","",1)).meta={label:l},d.level=e.level++,e.tokens.push(d),o=e.bMarks[t],s=e.tShift[t],i=e.sCount[t],a=e.parentType,g=c,p=h=e.sCount[t]+c-(e.bMarks[t]+e.tShift[t]);c<b&&(m=e.src.charCodeAt(c),u(m));)9===m?h+=4-h%4:h++,c++;return e.tShift[t]=c-g,e.sCount[t]=h-p,e.bMarks[t]=g,e.blkIndent+=4,e.parentType="footnote",e.sCount[t]<e.blkIndent&&(e.sCount[t]+=e.blkIndent),e.md.block.tokenize(e,t,r,!0),e.parentType=a,e.blkIndent-=4,e.tShift[t]=s,e.sCount[t]=i,e.bMarks[t]=o,(d=new e.Token("footnote_reference_close","",-1)).level=--e.level,e.tokens.push(d),!0},{alt:["paragraph","reference"]}),e.inline.ruler.after("image","footnote_inline",function(e,t){var r,n,o,s,i=e.posMax,a=e.pos;return!(a+2>=i)&&(94===e.src.charCodeAt(a)&&(91===e.src.charCodeAt(a+1)&&(r=a+2,!((n=l(e,a+1))<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),o=e.env.footnotes.list.length,e.md.inline.parse(e.src.slice(r,n),e.md,e.env,s=[]),e.push("footnote_ref","",0).meta={id:o},e.env.footnotes.list[o]={content:e.src.slice(r,n),tokens:s}),e.pos=n+1,e.posMax=i,!0))))}),e.inline.ruler.after("footnote_inline","footnote_ref",function(e,t){var r,n,o,s,i=e.posMax,a=e.pos;if(a+3>i)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(a))return!1;if(94!==e.src.charCodeAt(a+1))return!1;for(n=a+2;n<i;n++){if(32===e.src.charCodeAt(n))return!1;if(10===e.src.charCodeAt(n))return!1;if(93===e.src.charCodeAt(n))break}return n!==a+2&&(!(n>=i)&&(n++,r=e.src.slice(a+2,n-1),void 0!==e.env.footnotes.refs[":"+r]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+r]<0?(o=e.env.footnotes.list.length,e.env.footnotes.list[o]={label:r,count:0},e.env.footnotes.refs[":"+r]=o):o=e.env.footnotes.refs[":"+r],s=e.env.footnotes.list[o].count,e.env.footnotes.list[o].count++,e.push("footnote_ref","",0).meta={id:o,subId:s,label:r}),e.pos=n,e.posMax=i,!0)))}),e.core.ruler.after("inline","footnote_tail",function(e){var t,r,n,o,s,i,a,c,l,u,d=!1,p={};if(e.env.footnotes&&(e.tokens=e.tokens.filter(function(e){return"footnote_reference_open"===e.type?(d=!0,l=[],u=e.meta.label,!1):"footnote_reference_close"===e.type?(d=!1,p[":"+u]=l,!1):(d&&l.push(e),!d)}),e.env.footnotes.list)){for(i=e.env.footnotes.list,a=new e.Token("footnote_block_open","",1),e.tokens.push(a),t=0,r=i.length;t<r;t++){for((a=new e.Token("footnote_open","",1)).meta={id:t,label:i[t].label},e.tokens.push(a),i[t].tokens?(c=[],(a=new e.Token("paragraph_open","p",1)).block=!0,c.push(a),(a=new e.Token("inline","",0)).children=i[t].tokens,a.content=i[t].content,c.push(a),(a=new e.Token("paragraph_close","p",-1)).block=!0,c.push(a)):i[t].label&&(c=p[":"+i[t].label]),c&&(e.tokens=e.tokens.concat(c)),s="paragraph_close"===e.tokens[e.tokens.length-1].type?e.tokens.pop():null,o=i[t].count>0?i[t].count:1,n=0;n<o;n++)(a=new e.Token("footnote_anchor","",0)).meta={id:t,subId:n,label:i[t].label},e.tokens.push(a);s&&e.tokens.push(s),a=new e.Token("footnote_close","",-1),e.tokens.push(a)}a=new e.Token("footnote_block_close","",-1),e.tokens.push(a)}})}},34657(){},57799(){},56239(){},23263(){},45349(){},45817(){},28151(){},44582(){},60802(){},1184(){},92051(){},33829(){},55307(){},68294(){},29900(){},8243(){},76391(){},94089(){},39769(){},87682(e,t,r){"use strict";r.d(t,{A:()=>n});const n={placeholder:"NisihrgiIKl_knpYJtfg",pulse:"R2i0K45dEF157drbVRPI"}},8706(e,t,r){"use strict";r.d(t,{A:()=>n});const n={global:"_fUXxnSp5pagKBp9gSN7"}},48297(){},75070(){},47621(){},13371(){},39169(){},37209(){},49663(){},97850(){},78518(){},84368(){},85808(){},49882(){},18681(){},82805(){},28769(){},78215(){},61095(){},75360(){},25378(){},45318(){},59357(){},88561(){},27453(){},14647(){},93726(){},31369(){},30938(){},50221(){},2753(){},52918(){},64525(){},1982(){},79935(){},45199(){},89399(){},73163(){},63036(){},88894(){},75646(){},89275(){},17309(){},17319(){},58203(){},80490(){},20744(){},591(){},86154(){},58227(){},89732(e,t,r){"use strict";r.d(t,{A:()=>n});const n={wrapper:"h2NGkiVs1r1nf85LtJpF","conversion-notice":"k3Apzwo3v9n0IaHbB8tf"}},60333(){},94533(){},42265(){},7504(){},22734(){},24920(){},72613(){},90698(){},42036(){},93571(){},94378(){},51082(){},51521(){},62653(){},44997(e){var t=1e3,r=60*t,n=60*r,o=24*n,s=7*o,i=365.25*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*i;case"weeks":case"week":case"w":return c*s;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var s=Math.abs(e);if(s>=o)return a(e,s,o,"day");if(s>=n)return a(e,s,n,"hour");if(s>=r)return a(e,s,r,"minute");if(s>=t)return a(e,s,t,"second");return e+" ms"}(e):function(e){var s=Math.abs(e);if(s>=o)return Math.round(e/o)+"d";if(s>=n)return Math.round(e/n)+"h";if(s>=r)return Math.round(e/r)+"m";if(s>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},14936(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r(87399),o=r.n(n),s=r(10067),i=r.n(s),a=r(11264),c=r.n(a);const l=i()("photon"),u={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},d="__domain__.invalid",p=`https://${d}`;function h(e,t){let r;try{r=new URL(e,p)}catch{return null}const n="https:"===r.protocol,s=new URL("https://i0.wp.com");if(i=r.host,/^i[0-2]\.wp\.com$/.test(i))s.pathname=r.pathname,s.hostname=n?"i0.wp.com":r.hostname;else{if(r.search)return null;let e=r.href.replace(`${r.protocol}/`,"");"blob:"===r.protocol&&(e=r.pathname.replace("://","//")),r.hostname===d&&(e=r.pathname),s.pathname=e,s.hostname=function(e,t){if(t)return"i0.wp.com";const r=o()(e),n=c()(r),s="i"+Math.floor(3*n());return l('determined server "%s" to use with "%s"',s,e),s+".wp.com"}(e,"https:"===s.protocol),n&&s.searchParams.set("ssl","1")}var i;if(t)for(const[e,r]of Object.entries(t))"host"!==e&&"hostname"!==e?"secure"!==e||r?s.searchParams.set(u[e]??e,r.toString()):s.protocol="http:":s.hostname=r;return l("generated Photon URL: %s",s.href),s.href}},87072(e,t,r){"use strict";r.d(t,{Ay:()=>y});const n=2147483647,o=36,s=/^xn--/,i=/[^\0-\x7F]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},l=Math.floor,u=String.fromCharCode;function d(e){throw new RangeError(c[e])}function p(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]);const o=function(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}((e=e.replace(a,".")).split("."),t).join(".");return n+o}function h(e){const t=[];let r=0;const n=e.length;for(;r<n;){const o=e.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){const n=e.charCodeAt(r++);56320==(64512&n)?t.push(((1023&o)<<10)+(1023&n)+65536):(t.push(o),r--)}else t.push(o)}return t}const m=function(e){return e>=48&&e<58?e-48+26:e>=65&&e<91?e-65:e>=97&&e<123?e-97:o},g=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},f=function(e,t,r){let n=0;for(e=r?l(e/700):e>>1,e+=l(e/t);e>455;n+=o)e=l(e/35);return l(n+36*e/(e+38))},b=function(e){const t=[],r=e.length;let s=0,i=128,a=72,c=e.lastIndexOf("-");c<0&&(c=0);for(let r=0;r<c;++r)e.charCodeAt(r)>=128&&d("not-basic"),t.push(e.charCodeAt(r));for(let u=c>0?c+1:0;u<r;){const c=s;for(let t=1,i=o;;i+=o){u>=r&&d("invalid-input");const c=m(e.charCodeAt(u++));c>=o&&d("invalid-input"),c>l((n-s)/t)&&d("overflow"),s+=c*t;const p=i<=a?1:i>=a+26?26:i-a;if(c<p)break;const h=o-p;t>l(n/h)&&d("overflow"),t*=h}const p=t.length+1;a=f(s-c,p,0==c),l(s/p)>n-i&&d("overflow"),i+=l(s/p),s%=p,t.splice(s++,0,i)}return String.fromCodePoint(...t)},v=function(e){const t=[],r=(e=h(e)).length;let s=128,i=0,a=72;for(const r of e)r<128&&t.push(u(r));const c=t.length;let p=c;for(c&&t.push("-");p<r;){let r=n;for(const t of e)t>=s&&t<r&&(r=t);const h=p+1;r-s>l((n-i)/h)&&d("overflow"),i+=(r-s)*h,s=r;for(const r of e)if(r<s&&++i>n&&d("overflow"),r===s){let e=i;for(let r=o;;r+=o){const n=r<=a?1:r>=a+26?26:r-a;if(e<n)break;const s=e-n,i=o-n;t.push(u(g(n+s%i,0))),e=l(s/i)}t.push(u(g(e,0))),a=f(i,h,p===c),i=0,++p}++i,++s}return t.join("")},y={version:"2.3.1",ucs2:{decode:h,encode:e=>String.fromCodePoint(...e)},decode:b,encode:v,toASCII:function(e){return p(e,function(e){return i.test(e)?"xn--"+v(e):e})},toUnicode:function(e){return p(e,function(e){return s.test(e)?b(e.slice(4).toLowerCase()):e})}}},24588(e,t){"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function o(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||"";var n,s,i=[];for(s in"string"!=typeof t&&(t="?"),e)if(r.call(e,s)){if((n=e[s])||null!=n&&!isNaN(n)||(n=""),s=o(s),n=o(n),null===s||null===n)continue;i.push(s+"="+n)}return i.length?t+i.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,o={};t=r.exec(e);){var s=n(t[1]),i=n(t[2]);null===s||null===i||s in o||(o[s]=i)}return o}},96811(e){"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},94107(e,t,r){"use strict";r.d(t,{A:()=>j});var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some(function(e,n){return e[0]===t&&(r=n,!0)}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r<n.length;r++){var o=n[r];e.call(t,o[1],o[0])}},t}()}(),o="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,s="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),i="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(s):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],c="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var r=!1,n=!1,o=0;function s(){r&&(r=!1,e()),n&&c()}function a(){i(s)}function c(){var e=Date.now();if(r){if(e-o<2)return;n=!0}else r=!0,n=!1,setTimeout(a,t);o=e}return c}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,r=t.indexOf(e);~r&&t.splice(r,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){o&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){o&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;a.some(function(e){return!!~r.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||s},p=v(0,0,0,0);function h(e){return parseFloat(e)||0}function m(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(t,r){return t+h(e["border-"+r+"-width"])},0)}function g(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return p;var n=d(e).getComputedStyle(e),o=function(e){for(var t={},r=0,n=["top","right","bottom","left"];r<n.length;r++){var o=n[r],s=e["padding-"+o];t[o]=h(s)}return t}(n),s=o.left+o.right,i=o.top+o.bottom,a=h(n.width),c=h(n.height);if("border-box"===n.boxSizing&&(Math.round(a+s)!==t&&(a-=m(n,"left","right")+s),Math.round(c+i)!==r&&(c-=m(n,"top","bottom")+i)),!function(e){return e===d(e).document.documentElement}(e)){var l=Math.round(a+s)-t,u=Math.round(c+i)-r;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return v(o.left,o.top,a,c)}var f="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&"function"==typeof e.getBBox};function b(e){return o?f(e)?function(e){var t=e.getBBox();return v(0,0,t.width,t.height)}(e):g(e):p}function v(e,t,r,n){return{x:e,y:t,width:r,height:n}}var y=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=b(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var r,n,o,s,i,a,c,l=(n=(r=t).x,o=r.y,s=r.width,i=r.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),u(c,{x:n,y:o,width:s,height:i,top:o,right:n+s,bottom:i+o,left:n}),c);u(this,{target:e,contentRect:l})},w=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new y(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new k(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),_="undefined"!=typeof WeakMap?new WeakMap:new n,x=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=l.getInstance(),n=new w(t,r,this);_.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){x.prototype[e]=function(){var t;return(t=_.get(this))[e].apply(t,arguments)}});const j=void 0!==s.ResizeObserver?s.ResizeObserver:x},11264(e){"use strict";var t=256,r=[],n=window,o=Math.pow(t,6),s=Math.pow(2,52),i=2*s,a=255,c=Math.random;function l(e){var r,n=e.length,o=this,s=0,i=o.i=o.j=0,c=o.S=[];for(n||(e=[n++]);s<t;)c[s]=s++;for(s=0;s<t;s++)c[s]=c[i=a&i+e[s%n]+(r=c[s])],c[i]=r;(o.g=function(e){for(var r,n=0,s=o.i,i=o.j,c=o.S;e--;)r=c[s=a&s+1],n=n*t+c[a&(c[s]=c[i=a&i+r])+(c[i]=r)];return o.i=s,o.j=i,n})(t)}function u(e,t){var r,n=[],o=(typeof e)[0];if(t&&"o"==o)for(r in e)try{n.push(u(e[r],t-1))}catch(e){}return n.length?n:"s"==o?e:e+"\0"}function d(e,t){for(var r,n=e+"",o=0;o<n.length;)t[a&o]=a&(r^=19*t[a&o])+n.charCodeAt(o++);return p(t)}function p(e){return String.fromCharCode.apply(0,e)}e.exports=function(a,c){if(c&&!0===c.global)return c.global=!1,Math.random=e.exports(a,c),c.global=!0,Math.random;var h=[],m=(d(u(c&&c.entropy||!1?[a,p(r)]:0 in arguments?a:function(e){try{return n.crypto.getRandomValues(e=new Uint8Array(t)),p(e)}catch(e){return[+new Date,n,n.navigator&&n.navigator.plugins,n.screen,p(r)]}}(),3),h),new l(h));return d(p(m.S),r),function(){for(var e=m.g(6),r=o,n=0;e<s;)e=(e+n)*t,r*=t,n=m.g(1);for(;e>=i;)e/=2,r/=2,n>>>=1;return(e+n)/r}},e.exports.resetGlobal=function(){Math.random=c},d(Math.random(),r)},48931(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(1455),o=r.n(n);const s="default"in o()?o().default:o()},87286(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(47143),o=r(10067),s=r.n(o),i=r(53664);const a=s()("jetpack-ai-client:ask-question");async function c(e,{postId:t=null,fromCache:r=!1,feature:o,functions:s,model:c,languageCode:l}={}){const u=l||(0,n.select)("core").getEntityRecord("root","site")?.language||"en_US";return a("Asking question: %o. options: %o",e,{postId:t,fromCache:r,feature:o,functions:s,model:c,languageCode:u}),new i.A({question:e,options:{postId:t,feature:o,fromCache:r,functions:s,model:c,languageCode:u}})}},31439(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(47143),o=r(10067),s=r.n(o),i=r(51391);const a=s()("jetpack-ai-client:ask-question-sync");async function c(e,t={}){t.languageCode=t.languageCode||(0,n.select)("core").getEntityRecord("root","site")?.language||"en_US",a("Asking question with no streaming: %o. options: %o",e,t);let r;try{r=(await(0,i.A)()).token}catch(e){return a("Error getting token: %o",e),Promise.reject(e)}const o=Array.isArray(e)?{messages:e}:{question:e},{languageCode:s,...c}=t,l={...o,...c,language_code:s,stream:!1},u={Authorization:`Bearer ${r}`,"Content-Type":"application/json"};try{const e=await fetch("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",{method:"POST",headers:u,body:JSON.stringify(l)}).then(e=>e.json());return e?.data?.status&&e?.data?.status>200?(a("Error generating prompt: %o",e),Promise.reject(e)):e.choices?.[0]?.message?.content}catch(e){return a("Error asking question: %o",e),Promise.reject(e)}}},57745(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(10067),o=r.n(n),s=r(51391);const i=o()("jetpack-ai-client:audio-transcription");async function a(e,t,r){let n;i("Transcribing audio: %o. Feature: %o",e,t);try{n=(await(0,s.A)()).token}catch(e){return i("Error getting token: %o",e),Promise.reject(e)}const o=new FormData;o.append("audio_file",e);try{const e={Authorization:`Bearer ${n}`},s="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-transcription"+(t?`?feature=${t}`:"");return fetch(s,{method:"POST",body:o,headers:e,signal:r??void 0}).then(e=>(i("Transcription response: %o",e),e.ok?e.json().then(e=>e?.text):e.json().then(e=>Promise.reject(e))))}catch(e){return i("Transcription error response: %o",e),Promise.reject(e)}}},70629(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(94715),o=r(13022),s=r(6754),i=(r(34657),r(10790));function a({className:e,disabled:t=!1,value:r="",placeholder:a="",isTransparent:c=!1,state:l="init",onChange:u,banner:d=null,error:p=null,actions:h=null,message:m=null,promptUserInputRef:g=null,wrapperRef:f=null}){return(0,i.jsxs)("div",{className:(0,o.A)("jetpack-components-ai-control__container-wrapper",e),ref:f,children:[p,(0,i.jsxs)("div",{className:"jetpack-components-ai-control__container",children:[d,(0,i.jsxs)("div",{className:(0,o.A)("jetpack-components-ai-control__wrapper",{"is-transparent":c}),children:[(0,i.jsx)(s.A,{state:l}),(0,i.jsx)("div",{className:"jetpack-components-ai-control__input-wrapper",children:(0,i.jsx)(n.PlainText,{value:r,onChange:u,placeholder:a,className:"jetpack-components-ai-control__input",disabled:t,ref:g})}),h]}),m]})]})}},71417(e,t,r){"use strict";r.d(t,{A:()=>w});var n=r(56427),o=r(29491),s=r(86087),i=r(27723),a=r(13109),c=r(87756),l=r(88901),u=r(65995),d=r(48568),p=r(57839),h=r(10067),m=r.n(h),g=r(51609),f=r(63098),b=r(70629),v=(r(34657),r(10790));const __=i.__,y=m()("jetpack-ai-client:block-ai-control");function k({disabled:e=!1,value:t="",placeholder:r="",showAccept:i=!1,acceptLabel:h=__("Accept","jetpack"),showButtonLabels:m=!0,isTransparent:g=!1,state:k="init",showGuideLine:w=!1,customFooter:_=null,onChange:x,onSend:j,onStop:C,onAccept:A,onDiscard:S,showRemove:E=!1,banner:T=null,error:N=null,lastAction:P},B){const R="requesting"===k||"suggesting"===k,[I,D]=(0,s.useState)(!1),[L,F]=(0,s.useState)(t||null),M=(0,s.useRef)(null);(0,s.useImperativeHandle)(B,()=>M.current),(0,s.useEffect)(()=>{I&&M?.current?.focus()},[I]);const O=(0,s.useCallback)(()=>{F(t),D(!1),j?.(t)},[t]),U=(0,s.useCallback)(e=>{x?.(e),"init"!==k&&D(L?e!==L:e.length>0)},[L,k]),z=(0,s.useCallback)(()=>{S?.()},[]),$=(0,s.useCallback)(()=>{y("cancelEdit, revert to last value",L),x?.(L||""),D(!1)},[L]);(0,o.useKeyboardShortcut)("mod+enter",()=>{i&&A?.()},{target:M}),(0,o.useKeyboardShortcut)("enter",e=>{e.preventDefault(),O()},{target:M});const q=(0,v.jsxs)(v.Fragment,{children:[(!i||I)&&(0,v.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:R?(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:C,variant:"secondary",label:__("Stop request","jetpack"),children:m?__("Stop","jetpack"):(0,v.jsx)(a.A,{icon:u.A})}):(0,v.jsxs)(v.Fragment,{children:[I&&(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:$,variant:"secondary",label:__("Cancel","jetpack"),children:m?__("Cancel","jetpack"):(0,v.jsx)(a.A,{icon:u.A})}),E&&!I&&!t?.length&&S&&(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:z,variant:"secondary",label:__("Cancel","jetpack"),children:m?__("Cancel","jetpack"):(0,v.jsx)(a.A,{icon:u.A})}),t?.length>0&&(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:O,variant:"primary",disabled:!t?.length||e,label:__("Send request","jetpack"),children:m?__("Generate","jetpack"):(0,v.jsx)(a.A,{icon:c.A})})]})}),i&&!I&&(0,v.jsxs)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:[(t?.length>0||null===L)&&(0,v.jsxs)(n.Flex,{gap:1,role:"group",className:"jetpack-components-ai-control__button-group",children:[(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Discard","jetpack"),onClick:z,tooltipPosition:"top",children:(0,v.jsx)(a.A,{icon:p.A})}),(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Regenerate","jetpack"),onClick:()=>j?.(t),tooltipPosition:"top",disabled:!t?.length||null===t||e,children:(0,v.jsx)(a.A,{icon:d.A})})]}),(0,v.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:A,variant:"primary",label:h,children:m?h:(0,v.jsx)(a.A,{icon:l.A})})]})]}),H=w&&!R&&!I&&(_||(0,v.jsx)(f.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:P,block:"ai-assistant"}}));return(0,v.jsx)(b.A,{disabled:e||R,value:t,placeholder:r,isTransparent:g,state:k,onChange:U,banner:T,error:N,actions:q,message:H,promptUserInputRef:M})}const w=(0,g.forwardRef)(k)},61(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(56427),o=r(29491),s=r(86087),i=r(27723),a=r(13109),c=r(87756),l=r(65995),u=r(84701),d=r(51609),p=r(63098),h=r(70629),m=(r(34657),r(10790));const __=i.__;function g({className:e,disabled:t=!1,value:r="",placeholder:i="",showButtonLabels:d=!0,isTransparent:g=!1,state:f="init",showGuideLine:b=!1,error:v,requestsRemaining:y,showUpgradeMessage:k=!1,showFairUsageMessage:w=!1,upgradeUrl:_,wrapperRef:x,onChange:j,onSend:C,onStop:A,onClose:S,onUndo:E,onUpgrade:T,onTryAgain:N,lastAction:P,blockType:B},R){const I="requesting"===f||"suggesting"===f,[D,L]=(0,s.useState)(!1),[F,M]=(0,s.useState)(r||null),O=(0,s.useRef)(null),U=r?.length<=0&&"done"===f;(0,s.useImperativeHandle)(R,()=>O.current),(0,s.useEffect)(()=>{D&&O?.current?.focus()},[D]);const z=(0,s.useCallback)(()=>{M(r),L(!1),C?.(r)},[C,r]),$=(0,s.useCallback)(e=>{j?.(e),"init"!==f&&L(F?e!==F:e.length>0)},[j,F,f]),q=(0,s.useCallback)(()=>{A?.()},[A]),H=(0,s.useCallback)(()=>{S?.()},[S]),V=(0,s.useCallback)(()=>{E?.()},[E]),G=(0,s.useCallback)(e=>{T?.(e)},[T]),W=(0,s.useCallback)(()=>{N?.()},[N]);(0,o.useKeyboardShortcut)("enter",e=>{e.preventDefault(),z()},{target:O});const Z=(0,m.jsx)(m.Fragment,{children:I?(0,m.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:q,variant:"secondary",label:__("Stop request","jetpack"),children:d?__("Stop","jetpack"):(0,m.jsx)(a.A,{icon:l.A})}):(0,m.jsxs)(m.Fragment,{children:[r?.length>0&&(0,m.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:(0,m.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",onClick:z,variant:"primary",disabled:!r?.length||t,label:__("Send request","jetpack"),children:d?__("Generate","jetpack"):(0,m.jsx)(a.A,{icon:c.A})})}),U&&(0,m.jsx)("div",{className:"jetpack-components-ai-control__controls-prompt_button_wrapper",children:(0,m.jsxs)(n.Flex,{gap:1,role:"group",className:"jetpack-components-ai-control__button-group",children:[(0,m.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Undo","jetpack"),onClick:V,tooltipPosition:"top",children:(0,m.jsx)(a.A,{icon:u.A})}),(0,m.jsx)(n.Button,{className:"jetpack-components-ai-control__controls-prompt_button",label:__("Close","jetpack"),onClick:H,variant:"tertiary",children:__("Close","jetpack")})]})})]})});let J=null;return v?.message?J=(0,m.jsx)(p.Kw,{error:v.message,code:v.code,onTryAgainClick:W,onUpgradeClick:G,upgradeUrl:_}):w?J=(0,m.jsx)(p.k9,{}):k?J=(0,m.jsx)(p.AK,{requestsRemaining:y,onUpgradeClick:G,upgradeUrl:_}):b&&(J=U?(0,m.jsx)(p.Yj,{aiFeedbackThumbsOptions:{showAIFeedbackThumbs:!0,ratedItem:"ai-assistant",prompt:P,block:B}}):(0,m.jsx)(p.Yj,{})),(0,m.jsx)(h.A,{className:e,disabled:t||I,value:r,placeholder:i,isTransparent:g,state:f,onChange:$,actions:Z,message:J,promptUserInputRef:O,wrapperRef:x})}const f=(0,d.forwardRef)(g)},42299(e,t,r){"use strict";r.d(t,{FC:()=>o.A,N0:()=>n.A});r(70629);var n=r(71417),o=r(61)},11497(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(85985),o=r(56427),s=r(86087),i=r(27723),a=r(57577),c=r(22201),l=r(13022),u=(r(57799),r(10790));const __=i.__;function d({disabled:e=!1,iconSize:t=24,ratedItem:r="",feature:i="",savedRatings:d={},options:p={},onRate:h}){if(!function(e){return!0===(0,n.FB)(e).available}("ai-response-feedback"))return null;const[m,g]=(0,s.useState)({}),{tracks:f}=(0,n.st)();(0,s.useEffect)(()=>{const e={...d,...m};JSON.stringify(e)!==JSON.stringify(m)&&g(e)},[d]);const b=e=>!!m[r]&&m[r]===e,v=e=>{const t=e?"thumbs-up":"thumbs-down";b(t)||(g({...m,[r]:t}),h?.(t),f.recordEvent("jetpack_ai_feedback",{type:i,rating:t,media_library_id:p.mediaLibraryId||null,prompt:p.prompt||null,revised_prompt:p.revisedPrompt||null,block:p.block||null}))};return(0,u.jsxs)("div",{className:"ai-assistant-feedback__selection",children:[(0,u.jsx)(o.Tooltip,{text:__("I like this","jetpack"),children:(0,u.jsx)(o.Button,{disabled:e,icon:c.A,onClick:()=>v(!0),iconSize:t,showTooltip:!1,className:(0,l.A)({"ai-assistant-feedback__thumb-selected":b("thumbs-up")})})}),(0,u.jsx)(o.Tooltip,{text:__("I don't find this useful","jetpack"),children:(0,u.jsx)(o.Button,{disabled:e,icon:a.A,onClick:()=>v(!1),iconSize:t,showTooltip:!1,className:(0,l.A)({"ai-assistant-feedback__thumb-selected":b("thumbs-down")})})})]})}},23059(e,t,r){"use strict";r(56427),r(5573),r(10790)},96390(e,t,r){"use strict";r(85985),r(56427),r(86087),r(27723);var n=r(10067),o=r.n(n);r(23101),r(46381),r(14016),r(57853),r(77990),r(47560),r(56239),r(10790);o()("jetpack-ai-client:ai-image-modal")},77990(e,t,r){"use strict";r(56427),r(86087),r(27723),r(11497),r(23059),r(23263),r(10790)},47560(e,t,r){"use strict";r(86087),r(27723),r(45349),r(10790)},89289(e,t,r){"use strict";r(85985),r(56427),r(47143),r(43656),r(86087),r(27723);var n=r(10067),o=r.n(n);r(45817),r(43984),r(72448),r(71508),r(62038),r(96390),r(3620),r(35918),r(10790);o()("jetpack-ai-client:featured-image")},83158(e,t,r){"use strict";r(85985),r(56427),r(86087),r(27723);var n=r(10067),o=r.n(n);r(45817),r(72448),r(71508),r(62038),r(96390),r(3620),r(35918),r(10790);o()("jetpack-ai:general-purpose-image")},3620(e,t,r){"use strict";r(47143),r(86087),r(27723),r(93832),r(31439),r(72448),r(62614),r(62038)},35918(e,t,r){"use strict";r(97999),r(86087)},77089(e,t,r){"use strict";r(89289),r(83158)},46381(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(56427),o=r(86087),s=r(27723),i=r(13109),a=r(28847),c=(r(28151),r(10790));const __=s.__;function l({onGuidelinesClick:e,onFeedbackClick:t}){const r=(0,o.useCallback)(()=>{e?.()},[e]),s=(0,o.useCallback)(()=>{t?.()},[t]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"ai-image-modal__footer-disclaimer",children:[(0,c.jsx)(i.A,{icon:a.A}),(0,c.jsx)("span",{children:__("Generated images could be inaccurate, biased or include text.","jetpack")}),(0,c.jsx)(n.Button,{variant:"link",className:"ai-image-modal__guidelines-button",href:"https://jetpack.com/redirect/?source=ai-guidelines",target:"_blank",onClick:r,children:(0,c.jsxs)("span",{children:[__("Guidelines","jetpack")," ↗"]})})]}),(0,c.jsx)(n.Button,{variant:"link",className:"ai-image-modal__feedback-button",href:"https://jetpack.com/redirect/?source=jetpack-ai-feedback",target:"_blank",onClick:s,children:(0,c.jsxs)("span",{children:[__("Give feedback","jetpack")," ↗"]})})]})}},6754(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(56427),o=r(13022),s=(r(44582),r(10790));function i({state:e}){return(0,s.jsx)("div",{className:(0,o.A)("jetpack-ai-status-indicator__icon-wrapper",{[`is-${e}`]:!0}),children:(0,s.jsx)(n.Spinner,{})})}},68203(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(32569),o=r(10790);function s({duration:e,className:t}){return(0,o.jsx)("span",{className:t,children:(0,n.f)(e,{addDecimalPart:!1})})}},32569(e,t,r){"use strict";function n(e,{addDecimalPart:t=!1,showMinutes:r=!0,showHours:n=!1}={}){const o=Math.floor(e/36e5),s=Math.floor(e/6e4)%60,i=Math.floor(e/1e3)%60,a=Math.floor(e/10)%100,c=[o>0||n?o.toString().padStart(2,"0")+":":"",o>0||s>0||r?s.toString().padStart(2,"0")+":":"",i.toString().padStart(2,"0")];return t&&c.push("."+a.toString().padStart(2,"0")),c.join("")}r.d(t,{f:()=>n})},27802(e,t,r){"use strict";r.d(t,{AK:()=>s.AK,FC:()=>n.FC,Hb:()=>i.A,N0:()=>n.N0,QA:()=>i.Q,z3:()=>o.A});var n=r(42299),o=(r(11497),r(23059),r(77089),r(6754),r(68203)),s=(r(46381),r(63098)),i=(r(14016),r(57853))},63098(e,t,r){"use strict";r.d(t,{AK:()=>x,Kw:()=>j,Yj:()=>w,k9:()=>_});var n=r(56427),o=r(86087),s=r(27723),i=r(13109),a=r(88901),c=r(79654),l=r(13022),u=(r(60802),r(42154)),d=r(78836),p=r(11497),h=r(10790);const __=s.__,m="warning",g="error",f="success",b="info",v={[b]:null,[m]:null,[g]:u.A,[f]:a.A};function y({severity:e=b,icon:t=null,aiFeedbackThumbsOptions:r={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}},children:n}){return(0,h.jsxs)("div",{className:(0,l.A)("jetpack-ai-assistant__message",`jetpack-ai-assistant__message-severity-${e}`),children:[(v[e]||t)&&(0,h.jsx)(i.A,{icon:v[e]||t}),(0,h.jsx)("div",{className:"jetpack-ai-assistant__message-content",children:n}),r.showAIFeedbackThumbs&&r.prompt&&(0,h.jsx)(p.A,{disabled:!1,ratedItem:r.ratedItem,feature:"ai-assistant",options:{prompt:r.prompt,block:r.block},onRate:r.onRate})]})}function k(){return(0,h.jsx)(c.N,{openInNewTab:!0,href:"https://jetpack.com/redirect/?source=ai-guidelines",children:__("Learn more","jetpack")})}function w({aiFeedbackThumbsOptions:e={showAIFeedbackThumbs:!1,ratedItem:"",prompt:"",block:null,onRate:()=>{}}}){return(0,h.jsxs)(y,{aiFeedbackThumbsOptions:e,children:[(0,h.jsx)("span",{children:__("AI-generated content could be inaccurate or biased.","jetpack")}),(0,h.jsx)(k,{})]})}function _(){const e=__("You've reached this month's request limit, per our <link>fair usage policy</link>","jetpack"),t=(0,o.createInterpolateElement)(e,{link:(0,h.jsx)(c.N,{openInNewTab:!0,href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",children:null})});return(0,h.jsx)(y,{severity:m,children:t})}function x({requestsRemaining:e,severity:t,onUpgradeClick:r,upgradeUrl:o}){let i=t;return null==i&&(i=e>0?b:m),(0,h.jsxs)(y,{severity:i,children:[(0,h.jsx)("span",{children:(0,s.sprintf)( | |
| 3 | +// translators: %1$d: number of requests remaining | |
| 4 | +__("You have %1$d requests remaining.","jetpack"),e)}),(0,h.jsx)(n.Button,{variant:"link",onClick:r,href:o,target:o?"_blank":null,children:(0,h.jsx)("span",{children:__("Upgrade now","jetpack")})})]})}function j({error:e,code:t,onTryAgainClick:r,onUpgradeClick:o,upgradeUrl:i}){const a=e||__("Something went wrong","jetpack");return(0,h.jsxs)(y,{severity:g,children:[(0,h.jsx)("span",{children:(0,s.sprintf)( | |
| 5 | +// translators: %1$d: A dynamic error message | |
| 6 | +__("Error: %1$s","jetpack"),a)}),t===d.Or?(0,h.jsx)(n.Button,{variant:"link",onClick:o,href:i,target:i?"_blank":null,children:(0,h.jsx)("span",{children:__("Upgrade now","jetpack")})}):(0,h.jsx)(n.Button,{variant:"link",onClick:r,children:(0,h.jsx)("span",{children:__("Try again","jetpack")})})]})}},14016(e,t,r){"use strict";r(56427),r(27723),r(6754),r(1184),r(10790)},57853(e,t,r){"use strict";r.d(t,{A:()=>b,Q:()=>f});var n=r(3924),o=r(85985),s=r(82201),i=r(56427),a=r(86087),c=r(27723),l=r(10067),u=r.n(l),d=r(42694),p=r(72448),h=r(71567),m=(r(92051),r(10790));const __=c.__,g=u()("jetpack-ai-client:upgrade-prompt"),f=({variant:e="error"})=>{const t=(()=>{const{usagePeriod:e}=(0,p.A)(),t=(e=>{const t=__("You've reached this month's request limit, per our <link><span>fair usage policy</span></link>.","jetpack");if(!e)return t; | |
| 7 | +// Translators: %s is the date when the requests will reset. | |
| 8 | +const r=__("Requests will reset on %s.","jetpack");return`${t} ${(0,c.sprintf)(r,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e));return(0,a.createInterpolateElement)(t,{link:(0,m.jsx)("a",{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",target:"_blank",rel:"noreferrer"}),span:(0,m.jsx)("span",{})})})();return"muted"===e?(0,m.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,m.jsx)(i.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null},b=e=>{const{upgradeType:t,currentTier:r}=(0,p.A)();return 1===r?.value?(0,m.jsx)(f,{}):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{const r=t?h.U:s.cb,n=(0,a.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack"),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(r,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||n,goToCheckoutPage:null,isRedirecting:null,visible:!0,align:null,title:null,context:null})})({description:e.description,useLightNudge:e?.useLightNudge}):(({placement:e=null,description:t=null,useLightNudge:r=!1})=>{const i=r?h.U:s.cb,{checkoutUrl:l}=(0,d.A)(),u=(0,o.CP)(),{nextTier:f,tierPlansEnabled:b,currentTier:v,requestsCount:y}=(0,p.A)(),{tracks:k}=(0,o.st)(),w=(0,a.useCallback)(()=>{g("upgrade",e),k.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:v?.slug,requests_count:y,placement:e})},[v,y,k,e]),_=(0,a.useCallback)(()=>{g("contact us",e),k.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})},[k,e]);if(!u){const e=(0,a.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! <strong>Reach out to the site administrator to upgrade and keep using Jetpack AI.</strong>","jetpack"),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(i,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:t||e,visible:!0,align:null,title:null,context:null})}if(b){if(!f){const e=(0,n.A)("jetpack-ai-tiers-more-requests-contact"),r=__("You have reached the request limit for your current plan.","jetpack");return(0,m.jsx)(i,{buttonText:__("Contact Us","jetpack"),description:t||r,className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:_,target:"_blank"})}const e=(0,a.createInterpolateElement)((0,c.sprintf)(/* Translators: %d: the number of requests allowed */ | |
| 9 | +__("You have reached the requests limit for your current plan. <strong>Upgrade now to increase your requests limit to %d.</strong>","jetpack"),f.limit),{strong:(0,m.jsx)("strong",{})});return(0,m.jsx)(i,{buttonText:(0,c.sprintf)(/* Translators: %d: the number of requests */ | |
| 10 | +__("Upgrade to %d requests","jetpack"),f.limit),checkoutUrl:l,className:"jetpack-ai-upgrade-banner",description:t||e,goToCheckoutPage:w,visible:!0,align:"center",title:null,context:null,target:"_blank"})}return(0,m.jsx)(i,{buttonText:__("Upgrade","jetpack"),checkoutUrl:l,className:"jetpack-ai-upgrade-banner",description:(0,a.createInterpolateElement)(__("Congratulations on exploring Jetpack AI and reaching the free requests limit! <strong>Upgrade now to keep using it.</strong>","jetpack"),{strong:(0,m.jsx)("strong",{})}),goToCheckoutPage:w,visible:!0,align:null,title:null,context:null,target:"_blank"})})(e)}},71567(e,t,r){"use strict";r.d(t,{U:()=>i});var n=r(56427),o=r(27723),s=(r(92051),r(10790));const __=o.__,i=({title:e,description:t,buttonText:r=null,checkoutUrl:o=null,goToCheckoutPage:i=null,isRedirecting:a=!1,showButton:c=!0,target:l="_top"})=>{const u=__("Redirecting…","jetpack");return(0,s.jsx)("div",{className:"jetpack-upgrade-plan-banner-light",children:(0,s.jsx)(n.Notice,{status:"error",isDismissible:!1,children:(0,s.jsxs)("p",{children:[e&&(0,s.jsx)("strong",{children:e}),t," ",c&&(0,s.jsx)(n.Button,{href:a?null:o,onClick:i,variant:"link",target:l,children:(0,s.jsx)("span",{children:a?u:r})})]})})})}},43984(e,t,r){"use strict";r.d(t,{A4:()=>c,DD:()=>w,DT:()=>N,Gm:()=>g,HM:()=>_,JR:()=>x,K2:()=>C,Rq:()=>T,UA:()=>m,UD:()=>j,br:()=>d,d5:()=>b,eJ:()=>h,fD:()=>p,fv:()=>v,im:()=>i,mI:()=>A,mT:()=>E,oZ:()=>s,pE:()=>f,sn:()=>a,so:()=>o,u0:()=>y,uQ:()=>k,vE:()=>u,yQ:()=>S,yy:()=>l});var n=r(27723);const __=n.__,o={en:{label:__("English","jetpack")},es:{label:__("Spanish","jetpack")},fr:{label:__("French","jetpack")},de:{label:__("German","jetpack")},it:{label:__("Italian","jetpack")},pt:{label:__("Portuguese","jetpack")},ru:{label:__("Russian","jetpack")},zh:{label:__("Chinese","jetpack")},ja:{label:__("Japanese","jetpack")},ar:{label:__("Arabic","jetpack")},hi:{label:__("Hindi","jetpack")},ko:{label:__("Korean","jetpack")}},s={formal:{label:__("Formal","jetpack"),emoji:"🎩"},informal:{label:__("Informal","jetpack"),emoji:"😊"},optimistic:{label:__("Optimistic","jetpack"),emoji:"😃"},humorous:{label:__("Humorous","jetpack"),emoji:"😂"},serious:{label:__("Serious","jetpack"),emoji:"😐"},skeptical:{label:__("Skeptical","jetpack"),emoji:"🤨"},empathetic:{label:__("Empathetic","jetpack"),emoji:"💗"},confident:{label:__("Confident","jetpack"),emoji:"😎"},passionate:{label:__("Passionate","jetpack"),emoji:"❤️"},provocative:{label:__("Provocative","jetpack"),emoji:"🔥"}},i="titleSummary",a="continue",c="simplify",l="correctSpelling",u="generateTitle",d="makeLonger",p="makeShorter",h="changeTone",m="summarize",g="changeLanguage",f="userPrompt",b="transformListToTable",v="writePostFromList",y=__("Translate","jetpack"),k=__("Change tone","jetpack"),w=__("Correct spelling and grammar","jetpack"),_=__("Simplify","jetpack"),x=__("Summarize","jetpack"),j=__("Make shorter","jetpack"),C=__("Expand","jetpack"),A=__("Turn list into a table","jetpack"),S=__("Write a post from this list","jetpack"),E=__("Generate a post title","jetpack"),T=__("Summary based on title","jetpack"),N=__("Continue writing","jetpack")},2166(e,t,r){"use strict";r.d(t,{R:()=>i});var n=r(51609),o=r(10790);const s=(0,n.createContext)({}),i=({value:e,children:t})=>(0,o.jsx)(s.Provider,{value:e,children:t})},13965(e,t,r){"use strict";r.d(t,{Rb:()=>n.R});var n=r(2166);r(59886),r(53471)},53471(e,t,r){"use strict";r(51609),r(78836),r(13965)},59886(e,t,r){"use strict";var n=r(29491),o=r(86087),s=r(46219),i=r(13965),a=r(10790);(0,n.createHigherOrderComponent)(e=>t=>{const{suggestion:r,error:n,requestingState:c,request:l,stopSuggestion:u,eventSource:d}=(0,s.Ay)(),p=(0,o.useMemo)(()=>({suggestion:r,requestingError:n,requestingState:c,eventSource:d,requestSuggestion:l,stopSuggestion:u}),[r,n,c,d,l,u]);return(0,a.jsx)(i.Rb,{value:p,children:(0,a.jsx)(e,{...t})})},"withAiDataProvider")},42694(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(3924),o=r(97999),s=r(85985),i=r(72448);function a(){const{nextTier:e,tierPlansEnabled:t}=(0,i.A)(),r=(()=>{const e=new URLSearchParams(window.location.search),t=(0,s.GE)();return(0,o.isSimpleSite)()&&e.has("post")?`https://wordpress.com/post/${t}/${e.get("post")}`:`https://wordpress.com/home/${t}`})(),a=(0,n.A)("jetpack-ai-yearly-tier-upgrade-nudge",{site:(0,s.GE)(),path:t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly",query:`redirect_to=${encodeURIComponent(r)}`}),c=(0,n.A)("jetpack-ai-upgrade-url-for-jetpack-sites",{site:(0,s.GE)(),path:"jetpack_ai_yearly"}),l=(0,o.isWpcomPlatformSite)()?a:c,{autosaveAndRedirect:u,isRedirecting:d}=(0,s.ZR)(l);return{checkoutUrl:l,autosaveAndRedirect:u,isRedirecting:d}}},72448(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(85985),o=r(47143),s=r(86087);function i(){const e=(0,o.useSelect)(e=>e("wordpress-com/plans").getAiAssistantFeature(),[]),t=(0,o.useSelect)(e=>e("wordpress-com/plans").getIsRequestingAiAssistantFeature(),[]),{fetchAiAssistantFeature:r,increaseAiAssistantRequestsCount:i,dequeueAiAssistantFeatureAsyncRequest:a}=(0,o.useDispatch)("wordpress-com/plans");return(0,s.useMemo)(()=>{const o=(0,n.Bd)(e?.currentTier),s=e?.currentTier?.limit||e?.requestsLimit,c=o===n._X?e?.requestsCount:e?.usagePeriod?.requestsCount,l=o===n._X?e?.requestsLimit:s;return{...e,requestsCount:c,requestsLimit:l,loading:t,error:null,refresh:r,increaseRequestsCount:i,dequeueAsyncRequest:a}},[e,t,r,i,a])}},46219(e,t,r){"use strict";r.d(t,{Ay:()=>p,fC:()=>u});var n=r(86087),o=r(27723),s=r(10067),i=r.n(s),a=r(87286),c=r(78836);const __=o.__,l=i()("ai-client:use-ai-suggestions");function u(e){switch(e){case c.Or:return{code:c.Or,message:__("You have reached the limit of requests for this site.","jetpack"),severity:"info"};case c.L9:return{code:c.L9,message:__("Your request was unclear. Mind trying again?","jetpack"),severity:"info"};case c.AZ:return{code:c.AZ,message:__("Jetpack AI services are currently unavailable. Sorry for the inconvenience.","jetpack"),severity:"info"};case c.ud:return{code:c.ud,message:__("Our service provider OpenAI could not process your prompt due to a moderation system. Please try to rephrase it changing potentially problematic words and try again.","jetpack"),severity:"info"};case c.cT:return{code:c.cT,message:__("The content is too large to be processed all at once. Please try to shorten it or divide it into smaller parts.","jetpack"),severity:"info"};case c.mA:default:return{code:c.mA,message:__("It was not possible to process your request. Mind trying again?","jetpack"),severity:"info"}}}function d(e){return e.replace(/^<\|start_header_id\|>assistant<\|end_header_id\|>[\n]+/,"")}function p({prompt:e,autoRequest:t=!1,askQuestionOptions:r={},initialRequestingState:o="init",onSuggestion:s,onDone:i,onStop:p,onError:h,onAllErrors:m}={}){const[g,f]=(0,n.useState)(o),[b,v]=(0,n.useState)(""),[y,k]=(0,n.useState)(c.Np),w=(0,n.useRef)(c.Np),[_,x]=(0,n.useState)(),j=(0,n.useRef)(void 0),C=(0,n.useCallback)(e=>{l("handleSuggestion",e);const t=d(e?.detail);t?(v(t),s?.(t)):l("no partial suggestion")},[s]),A=(0,n.useCallback)(e=>{L();const t=d(e?.detail?.message??e?.detail);i?.(t,w.current),f("done")},[i]),S=(0,n.useCallback)(e=>{m?.(e?.detail)},[m]),E=(0,n.useCallback)(e=>{j?.current?.close(),f("error"),x(u(e)),h?.(u(e))},[h]),T=(0,n.useCallback)(()=>E(c.Or),[]),N=(0,n.useCallback)(()=>E(c.L9),[]),P=(0,n.useCallback)(()=>E(c.AZ),[]),B=(0,n.useCallback)(()=>E(c.ud),[]),R=(0,n.useCallback)(()=>E(c.mA),[]),I=(0,n.useCallback)(async(e,t={...r})=>{var n;if(x(void 0),f("requesting"),n=c.Np,k(n),w.current=n,j.current=await(0,a.A)(e,t),!j?.current)return void l("no event source");const o=j.current;f("suggesting"),o.addEventListener("suggestion",C),o.addEventListener(c.Or,T),o.addEventListener(c.L9,N),o.addEventListener(c.AZ,P),o.addEventListener(c.ud,B),o.addEventListener(c.mA,R),o.addEventListener(c.zn,S),o.addEventListener("done",A)},[A,T,N,P,B,R,C]),D=(0,n.useCallback)(()=>{f("init"),v(""),x(void 0)},[]),L=(0,n.useCallback)(()=>{if(!j?.current)return;const e=j?.current;e.close(),e.removeEventListener("suggestion",C),e.removeEventListener(c.Or,T),e.removeEventListener(c.L9,N),e.removeEventListener(c.AZ,P),e.removeEventListener(c.ud,B),e.removeEventListener(c.mA,R),e.removeEventListener("done",A)},[j,C,T,N,P,B,R,A]),F=(0,n.useCallback)(()=>{L(),p?.(),f("done")},[p]);return(0,n.useEffect)(()=>{if(e?.length)return t&&I(e,r),()=>{F()}},[t,e,I,F]),{suggestion:b,model:y,error:_,requestingState:g,request:I,stopSuggestion:F,reset:D,handleErrorQuotaExceededError:T,eventSource:j.current}}},7804(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(86087),o=r(27723),s=r(10067),i=r.n(s),a=r(57745);const __=o.__,c=i()("jetpack-ai-client:use-audio-transcription");function l({feature:e,onReady:t,onError:r}){const[o,s]=(0,n.useState)(""),[i,l]=(0,n.useState)(""),[u,d]=(0,n.useState)(!1),p=(0,n.useRef)(null);return{transcriptionResult:o,isTranscribingAudio:u,transcriptionError:i,transcribeAudio:(0,n.useCallback)(n=>{c("Transcribing audio"),s(""),l(""),d(!0);const o=new AbortController;p.current=o,(0,a.A)(n,e,o.signal).then(e=>{s(e),t?.(e)}).catch(e=>{o.signal.aborted||(l(e.message),r?.((e=>{if("string"==typeof e)return e;if("code"in e)switch(e.code){case"error_quota_exceeded":return __("You exceeded your current quota, please check your plan details.","jetpack");case"jetpack_ai_missing_audio_param":return __("The audio_file is required to perform a transcription.","jetpack");case"jetpack_ai_service_unavailable":return __("The Jetpack AI service is temporarily unavailable.","jetpack");case"file_size_not_supported":return __("The provided audio file is too big.","jetpack");case"file_type_not_supported":return __("The provided audio file type is not supported.","jetpack");case"jetpack_ai_error":return __("There was an error processing the transcription request.","jetpack");default:return e.message}return"message"in e?e.message:__("There was an error processing the transcription request.","jetpack")})(e)))}).finally(()=>d(!1))},[a.A,s,l,d]),cancelTranscription:(0,n.useCallback)(()=>{p.current?.abort(),s(""),l(""),d(!1)},[p,s,l,d])}}},66859(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(86087),o=r(27723);const __=o.__,s=["audio/mpeg","audio/mp3","audio/ogg","audio/flac","audio/x-flac","audio/m4a","audio/x-m4a","audio/mp4","audio/wav","audio/wave","audio/x-wav","audio/webm"];function i(){const[e,t]=(0,n.useState)(!1);return{isValidatingAudio:e,validateAudio:(0,n.useCallback)((e,r,n)=>{if(t(!0),e?.size>25e6)return t(!1),n(__("The audio file is too large. The maximum file size is 25MB.","jetpack"));const o=e instanceof File;if(o&&!s.includes(e.type))return t(!1),n(__("The audio file type is not supported. Please use a supported audio file type.","jetpack"));const i=new AudioContext;e.arrayBuffer().then(s=>{i.decodeAudioData(s,function(s){const i=Math.ceil(s.duration);return i>1500?(t(!1),n(__("The audio file is too long. The maximum recording time is 25 minutes.","jetpack"))):(t(!1),r({duration:i,isFile:o,size:e?.size}))})})},[t])}}},66223(e,t,r){"use strict";r.d(t,{Hu:()=>o,Wp:()=>n});const n="auto",o="none"},62614(e,t,r){"use strict";r.d(t,{Ay:()=>u});var n=r(10067),o=r.n(n),s=r(31439),i=r(51391);const a=o()("ai-client:use-image-generator"),c=(e,t)=>{const r=4e3-t;return e.length>r?e.substring(0,r-6)+" [...]":e},l=async(e,t,r)=>{const n=((e,t)=>{if(t){const r=`I need a Stable Diffusion prompt to generate a featured image for a blog post based on this user-provided image description:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nThe image should be a photo. Make sure you highlight the main suject of the image description, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments.\n\nFor additional context, this is the post content:\n\n`;return r+c(e,r.length)}return"I need a Stable Diffusion prompt to generate a featured image for a blog post with the following content.\nThe image should be a photo. Make sure you highlight the main suject of the content, and include brief details about the light and style of the image.\nInclude a request to use high resolution and produce a highly detailed image, with sharp focus.\nReturn just the prompt, without comments. The content is:\n\n"+c(e,412)})(e,t);return await(0,s.A)(n,{feature:r})},u=()=>{const e=async function(e){let t;try{t=(await(0,i.A)()).token}catch(e){return a("Error getting token: %o",e),Promise.reject(e)}try{const r="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-image",n={Authorization:`Bearer ${t}`,"Content-Type":"application/json"},o=await fetch(r,{method:"POST",headers:n,body:JSON.stringify(e)}).then(e=>e.json());return o?.data?.status&&o?.data?.status>200?(a("Error generating image: %o",o),Promise.reject(o)):o}catch(e){return a("Error generating image: %o",e),Promise.reject(e)}};return{generateImage:async function({feature:t,postContent:r,responseFormat:n="url",userPrompt:o}){try{a("Generating image");const s=((e,t)=>{if(t){const r=`I need a cover image for a blog post based on this user prompt:\n\n${t.length>1e3?t.substring(0,1e3):t}\n\nBefore creating the image, identify the main topic of the user prompt and relate it to the post content.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nFor additional context, this is the post content:\n\n`;return r+c(e,r.length)}const r="I need a cover image for a blog post.\nBefore creating the image, identify the main topic of the content and only represent it.\nDo not represent the whole content in one image, keep it simple and just represent one single idea.\nDo not add details, detailed explanations or highlights from the content, just represent the main idea as if it was a photograph.\nDo not use collages or compositions with multiple elements or scenes. Stick to one single scene. Do not compose unrealistic scenes.\nIf the content describes facts, objects or concepts from the real world, represent them on a realistic style and do not make unreal compositions.\nIf the content is more abstract, use a more abstract style to represent the main idea.\nMake sure the light and the style are visually appealing.\nDo not add text to the image.\n\nThis is the post content:\n\n";return r+c(e,838)})(r,o),i={prompt:s,response_format:n,feature:t,size:"1792x1024"};return await e(i)}catch(e){return a("Error generating image: %o",e),Promise.reject(e)}},generateImageWithStableDiffusion:async function({feature:t,postContent:r,userPrompt:n}){try{a("Generating image with Stable Diffusion");const o={prompt:await l(r,n,t),feature:t,model:"stable-diffusion"};return await e(o)}catch(e){return a("Error generating image: %o",e),Promise.reject(e)}},generateImageWithParameters:e}}},96657(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(86087);const o="audio/mp4;codecs=mp4a",s="audio/webm";function i({onDone:e}={}){const t=(0,n.useRef)(null),[r,i]=(0,n.useState)("inactive"),a=(0,n.useRef)(!1),c=(0,n.useRef)(0),[l,u]=(0,n.useState)(0),d=(0,n.useRef)(null),[p,h]=(0,n.useState)(null),m=(0,n.useRef)([]).current,[g,f]=(0,n.useState)(null),b=(0,n.useRef)(null);function v(){return MediaRecorder.isTypeSupported(o)?new Blob(m,{type:"audio/mp4"}):new Blob(m,{type:s})}const y=(0,n.useCallback)(e=>{if(x(),!e)return t?.current?.start();e<100&&(e=100),c.current=Date.now(),t?.current?.start(e)},[]),k=(0,n.useCallback)(()=>{a.current=!0,t?.current?.pause(),u(e=>e+Date.now()-c.current)},[]),w=(0,n.useCallback)(()=>{a.current=!1,t?.current?.resume(),c.current=Date.now()},[]),_=(0,n.useCallback)(()=>{t?.current?.stop(),"recording"===r&&u(e=>e+Date.now()-c.current)},[]),x=(0,n.useCallback)(()=>{m.length=0,h(null),f(null),u(0),a.current=!1,c.current=0},[]),j=(0,n.useCallback)(()=>{t?.current&&(t.current.removeEventListener("start",S),t.current.removeEventListener("stop",E),t.current.removeEventListener("pause",T),t.current.removeEventListener("resume",N),t.current.removeEventListener("dataavailable",P),t.current=null)},[]),C=(0,n.useCallback)(()=>{if(i("inactive"),x(),j(),!navigator.mediaDevices?.getUserMedia)return;const e=new AudioContext;b.current=e.createAnalyser();navigator.mediaDevices.getUserMedia({audio:!0}).then(r=>{d.current=r;e.createMediaStreamSource(r).connect(b.current),MediaRecorder.isTypeSupported(o)?t.current=new MediaRecorder(r,{mimeType:o}):t.current=new MediaRecorder(r,{mimeType:s}),t.current.addEventListener("start",S),t.current.addEventListener("stop",E),t.current.addEventListener("pause",T),t.current.addEventListener("resume",N),t.current.addEventListener("dataavailable",P)}).catch(e=>{throw e})},[]),A=(0,n.useCallback)(e=>{_(),f("string"==typeof e?e:e.message),i("error")},[]);function S(){i("recording")}function E(){const t=v();e?.(t),m.length=0}function T(){i("paused")}function N(){i("recording")}function P(e){const{data:t}=e;t?.size&&(m.push(t),h(v()),a.current||u(e=>{const t=Date.now(),r=t-c.current;return c.current=t,e+r}))}return(0,n.useEffect)(()=>(C(),()=>{d.current&&d.current.getTracks().forEach(e=>e.stop()),j()}),[]),{state:r,blob:p,error:g,duration:l,analyser:b.current,onError:A,controls:{start:y,pause:k,resume:w,stop:_,reset:C}}}},71508(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(74997),o=r(47143),s=r(43656),i=r(86087),a=r(55166);const c=()=>{const{getBlocks:e,isEditedPostEmpty:t}=(0,o.useSelect)(e=>{const t=e("core/block-editor"),r=e(s.store);return{getBlocks:t.getBlocks,isEditedPostEmpty:r.isEditedPostEmpty}},[]),r=(0,i.useCallback)(()=>{const t=e();return 0===t.length?"":(0,n.serialize)(t)},[e]);return{getPostContent:(0,i.useCallback)(e=>{let t=r();return t?(e&&"function"==typeof e&&(t=e(t)),t?(0,a.rh)({content:t}):""):""},[e]),isEditedPostEmpty:t,getSerializedPostContent:r}}},62038(e,t,r){"use strict";r(63162),r(47143),r(86087);var n=r(10067);r.n(n)()("jetpack-ai-client:save-to-media-library")},93869(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(63162),o=r(47143),s=r(86087),i=r(10067);const a=r.n(i)()("ai-client:save-to-media-library");function c(){const[e,t]=(0,s.useState)(!1),{getSettings:r}=(0,o.useSelect)(e=>e("core/block-editor"),[]);return{isLoading:e,saveToMediaLibrary:(e,o)=>{const s=r();return new Promise((r,i)=>{t(!0),a("Fetching image from URL"),fetch(e).then(e=>{a("Transforming response to blob"),e.blob().then(e=>{a("Uploading blob to media library");const c=Array();o?c.push(new File([e],o)):c.push(e),s.mediaUpload({allowedTypes:["image"],filesList:c,onFileChange([e]){(0,n.isBlobURL)(e?.url)||(e&&(a("Image uploaded to media library",e),r(e)),t(!1))},onError(e){a("Error uploading image to media library:",e),i(e),t(!1)}})}).catch(e=>{a("Error transforming response to blob:",e?.message),i(e?.message),t(!1)})}).catch(e=>{a("Error fetching image from URL:",e?.message),i(e?.message),t(!1)})})}}}},97784(e,t,r){"use strict";r.d(t,{A:()=>l,u:()=>c});var n=r(86087),o=r(10067),s=r.n(o),i=r(46219);const a=s()("jetpack-ai-client:use-transcription-post-processing"),c="voice-to-content-simple-draft";function l({feature:e,onReady:t,onError:r,onUpdate:o}){const[s,c]=(0,n.useState)(""),[l,u]=(0,n.useState)(""),[d,p]=(0,n.useState)(!1),h=(0,n.useCallback)(e=>{c(e),o?.(e)},[c,o]),m=(0,n.useCallback)(e=>{c(e),o?.(e),t?.(e)},[c,o,t]),g=(0,n.useCallback)(e=>{u(e.message),r?.(e.message)},[u,r]),{request:f,stopSuggestion:b}=(0,i.Ay)({onSuggestion:h,onDone:m,onError:g});return{postProcessingResult:s,isProcessingTranscription:d,postProcessingError:l,processTranscription:(0,n.useCallback)((t,r)=>{a("Post-processing transcription"),c(""),u(""),p(!0);f([{role:"jetpack-ai",context:{type:t,content:r}}],{feature:e})},[c,u,p,f,e]),cancelTranscriptionProcessing:(0,n.useCallback)(()=>{b(),p(!1)},[b,p])}}},30151(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=(0,o.jsxs)(n.SVG,{viewBox:"0 0 32 32",width:"32",height:"32",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:"ai-assistant-icon",children:[(0,o.jsx)(n.Path,{className:"spark-first",d:"M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z"}),(0,o.jsx)(n.Path,{className:"spark-second",d:"M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z"}),(0,o.jsx)(n.Path,{className:"spark-third",d:"M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z"})]})},42154(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=(0,o.jsxs)(n.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M10 3.95833C6.66328 3.95833 3.95833 6.66327 3.95833 9.99999C3.95833 13.3367 6.66328 16.0417 10 16.0417C13.3367 16.0417 16.0417 13.3367 16.0417 9.99999C16.0417 6.66327 13.3367 3.95833 10 3.95833ZM2.70833 9.99999C2.70833 5.97292 5.97292 2.70833 10 2.70833C14.0271 2.70833 17.2917 5.97292 17.2917 9.99999C17.2917 14.0271 14.0271 17.2917 10 17.2917C5.97292 17.2917 2.70833 14.0271 2.70833 9.99999Z"}),(0,o.jsx)(n.Path,{d:"M10.8333 5.83333H9.16667V10.8333H10.8333V5.83333Z"}),(0,o.jsx)(n.Path,{d:"M10.8333 12.5H9.16667V14.1667H10.8333V12.5Z"})]})},91396(e,t,r){"use strict";r.d(t,{Qr:()=>i.A,Vo:()=>o.A,cj:()=>n.A,ni:()=>s.A});var n=r(30151),o=r(81353),s=(r(95007),r(96626),r(4416),r(25680)),i=r(67205)},81353(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=(0,o.jsxs)(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG",children:[(0,o.jsx)(n.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),(0,o.jsx)(n.Rect,{x:"10.5",y:"8.25",width:"3",height:"4.875",rx:"1.5",fill:"#008710"}),(0,o.jsx)(n.Path,{d:"M15 11.25C15 11.644 14.9224 12.0341 14.7716 12.3981C14.6209 12.762 14.3999 13.0927 14.1213 13.3713C13.8427 13.6499 13.512 13.8709 13.1481 14.0216C12.7841 14.1724 12.394 14.25 12 14.25C11.606 14.25 11.2159 14.1724 10.8519 14.0216C10.488 13.8709 10.1573 13.6499 9.87868 13.3713C9.6001 13.0927 9.37913 12.762 9.22836 12.3981C9.0776 12.0341 9 11.644 9 11.25",stroke:"#008710",strokeWidth:"1.125",strokeLinecap:"round"}),(0,o.jsx)(n.Path,{d:"M11.4375 15.75C11.4375 16.0607 11.6893 16.3125 12 16.3125C12.3107 16.3125 12.5625 16.0607 12.5625 15.75L11.4375 15.75ZM11.4375 14.25L11.4375 15.75L12.5625 15.75L12.5625 14.25L11.4375 14.25Z",fill:"#008710"})]})},95007(e,t,r){"use strict";r(56427),r(10790)},25680(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=(0,o.jsxs)(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/SVG",children:[(0,o.jsx)(n.Path,{d:"M12 4.75C11.0479 4.75 10.1052 4.93753 9.22554 5.30187C8.34593 5.66622 7.5467 6.20025 6.87348 6.87348C6.20025 7.5467 5.66622 8.34593 5.30187 9.22554C4.93753 10.1052 4.75 11.0479 4.75 12C4.75 12.9521 4.93753 13.8948 5.30187 14.7745C5.66622 15.6541 6.20025 16.4533 6.87348 17.1265C7.5467 17.7997 8.34593 18.3338 9.22554 18.6981C10.1052 19.0625 11.0479 19.25 12 19.25C13.9228 19.25 15.7669 18.4862 17.1265 17.1265C18.4862 15.7669 19.25 13.9228 19.25 12C19.25 10.0772 18.4862 8.23312 17.1265 6.87348C15.7669 5.51384 13.9228 4.75 12 4.75ZM3.25 12C3.25 9.67936 4.17187 7.45376 5.81282 5.81282C7.45376 4.17187 9.67936 3.25 12 3.25C14.3206 3.25 16.5462 4.17187 18.1872 5.81282C19.8281 7.45376 20.75 9.67936 20.75 12C20.75 14.3206 19.8281 16.5462 18.1872 18.1872C16.5462 19.8281 14.3206 20.75 12 20.75C9.67936 20.75 7.45376 19.8281 5.81282 18.1872C4.17187 16.5462 3.25 14.3206 3.25 12Z",fill:"#008710"}),(0,o.jsx)(n.Rect,{x:"12.75",y:"9",width:"2.25",height:"6",fill:"#008710"}),(0,o.jsx)(n.Rect,{x:"9",y:"9",width:"2.25",height:"6",fill:"#008710"})]})},96626(e,t,r){"use strict";r(56427),r(10790)},4416(e,t,r){"use strict";r(56427),r(10790)},67205(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=(0,o.jsxs)(n.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5 10C12.5 11.3807 11.3807 12.5 10 12.5C8.61929 12.5 7.5 11.3807 7.5 10C7.5 8.61929 8.61929 7.5 10 7.5C11.3807 7.5 12.5 8.61929 12.5 10ZM14 10C14 12.2091 12.2091 14 10 14C7.79086 14 6 12.2091 6 10C6 7.79086 7.79086 6 10 6C12.2091 6 14 7.79086 14 10ZM16.75 21V19C16.75 17.4812 15.5188 16.25 14 16.25L6 16.25C4.48122 16.25 3.25 17.4812 3.25 19V21H4.75L4.75 19C4.75 18.3096 5.30964 17.75 6 17.75L14 17.75C14.6904 17.75 15.25 18.3096 15.25 19V21H16.75Z",fill:"currentColor"}),(0,o.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M19.976 16.3599C21.2507 14.5642 22.0001 12.3695 22.0001 9.99969C22.0001 7.63128 21.2515 5.43769 19.9782 3.64258L18.754 4.50967C19.8537 6.05996 20.5001 7.95434 20.5001 9.99969C20.5001 12.0464 19.8528 13.9419 18.7519 15.4928L19.976 16.3599ZM17.3357 14.4897C18.2357 13.222 18.7648 11.6727 18.7648 9.99969C18.7648 8.32808 18.2365 6.77984 17.3379 5.51279L16.1137 6.37988C16.8387 7.4021 17.2648 8.65114 17.2648 9.99969C17.2648 11.3496 16.8378 12.5998 16.1116 13.6226L17.3357 14.4897Z",fill:"currentColor"})]})},96865(e,t,r){"use strict";r.d(t,{A4:()=>f.A4,AK:()=>h.AK,AZ:()=>m.AZ,DD:()=>f.DD,DT:()=>f.DT,E0:()=>c.A,FC:()=>h.FC,Fs:()=>g.Fs,Gm:()=>f.Gm,HM:()=>f.HM,Hb:()=>h.Hb,JR:()=>f.JR,K2:()=>f.K2,L9:()=>m.L9,MB:()=>g.MB,N0:()=>h.N0,ON:()=>o.A,OO:()=>g.OO,Or:()=>m.Or,QA:()=>h.QA,Qr:()=>p.Qr,R0:()=>n.A,Rq:()=>f.Rq,Tg:()=>b.T,UA:()=>f.UA,UD:()=>f.UD,Vo:()=>p.Vo,Zo:()=>g.Zo,_E:()=>g.Hh,_G:()=>g._G,be:()=>a.A,br:()=>f.br,cT:()=>m.cT,cj:()=>p.cj,d5:()=>f.d5,dh:()=>d.A,eJ:()=>f.eJ,fD:()=>f.fD,im:()=>f.im,in:()=>g.in,mA:()=>m.mA,mI:()=>f.mI,mT:()=>f.mT,ni:()=>p.ni,o2:()=>i.Ay,oZ:()=>f.oZ,pE:()=>f.pE,rh:()=>g.rh,rr:()=>u.A,sn:()=>f.sn,so:()=>f.so,u0:()=>f.u0,uH:()=>m.uH,uQ:()=>f.uQ,ud:()=>m.ud,vE:()=>f.vE,xA:()=>l.A,yM:()=>s.A,yQ:()=>f.yQ,yy:()=>f.yy,z3:()=>h.z3});r(51391),r(53664),r(87286);var n=r(31439),o=(r(57745),r(42694)),s=r(72448),i=r(46219),a=r(96657),c=r(7804),l=r(97784),u=r(66859),d=(r(62614),r(71508)),p=r(91396),h=r(27802),m=(r(13965),r(78836)),g=r(72586),f=r(43984),b=r(23101)},51391(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(97999),o=r(10067),s=r.n(o),i=r(48931);const a=s()("jetpack-ai-client:jwt"),c="jetpack-ai-jwt";async function l({apiNonce:e,siteId:t,expirationTime:r}={}){e=e||window.JP_CONNECTION_INITIAL_STATE.apiNonce,t=t||window.JP_CONNECTION_INITIAL_STATE.siteSuffix,r=r||12e4;const o=localStorage.getItem(c);let s,l=null;if(o)try{l=JSON.parse(o)}catch(e){a("Error parsing token",e)}if(l&&l?.expire>Date.now())return a("Using cached token"),l;const u=(0,n.isSimpleSite)();s=u?await(0,i.A)({path:"/wpcom/v2/sites/"+t+"/jetpack-openai-query/jwt",method:"POST"}):await(0,i.A)({path:"/jetpack/v4/jetpack-ai-jwt?_cacheBuster="+Date.now(),credentials:"same-origin",headers:{"X-WP-Nonce":e},method:"POST"});const d={token:s.token,blogId:u?t:s.blog_id,expire:Date.now()+r};return a("Storing new token"),localStorage.setItem(c,JSON.stringify(d)),d}},20231(e,t,r){"use strict";r.d(t,{_:()=>o});var n=r(47143);const o=()=>{const e=(0,n.select)("core/block-editor").getBlocks(),t=[],r=e=>{t.push(e),e.innerBlocks?.length&&e.innerBlocks.forEach(r)};return e.forEach(r),t}},40464(e,t,r){"use strict";r.d(t,{Z:()=>n});const n=async e=>{try{const t=await fetch(e),r=await t.arrayBuffer();return`data:image/png;base64,${btoa(new Uint8Array(r).reduce((e,t)=>e+String.fromCharCode(t),""))}`}catch{return e}}},72586(e,t,r){"use strict";r.d(t,{Fs:()=>i.F,Hh:()=>n.Hh,MB:()=>o.M,OO:()=>n.OO,Zo:()=>c.Z,_G:()=>a._,in:()=>s.i,rh:()=>n.rh});var n=r(55166),o=r(84861),s=r(61269),i=r(1811),a=r(20231),c=r(40464)},84861(e,t,r){"use strict";r.d(t,{M:()=>o});var n=r(43984);function o(e,t={}){const{language:r,tone:o}=t,s=r?.split(" (")[0];switch(e){case n.Gm:return`${n.u0}: ${n.so[s].label}`;case n.eJ:return`${n.uQ}: ${n.oZ[o].label}`;case n.yy:return n.DD;case n.A4:return n.HM;case n.UA:return n.JR;case n.br:return n.K2;case n.fD:return n.UD;case n.d5:return n.mI;case n.fv:return n.yQ;case n.vE:return n.mT;case n.im:return n.Rq;case n.sn:return n.DT;default:return null}}},68641(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(21147);const o={paragraph:e=>e.replaceAll("\n","<br />")},s={emDelimiter:"_",headingStyle:"atx"},i={strikethrough:{filter:["del","s"],replacement:function(e){return"~~"+e+"~~"}}};class a{turndownService;fixes;constructor({options:e={},rules:t={},keep:r=[],remove:o=[],fixes:a=[]}={}){this.fixes=a,this.turndownService=new n.A({...s,...e}),this.turndownService.keep(r),this.turndownService.remove(o);const c={...i,...t};for(const e in c)this.turndownService.addRule(e,c[e])}render({content:e}){const t=this.turndownService.turndown(e);return this.fixes.reduce((e,t)=>o[t](e),t)}}},55166(e,t,r){"use strict";r.d(t,{Hh:()=>i,OO:()=>n.A,rh:()=>a});var n=r(68641);const o=new(r(31737).A),s=new n.A,i=({content:e,rules:t,extension:r})=>o.render({content:e,rules:t,extension:r}),a=({content:e})=>s.render({content:e})},31737(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(97158);const o=e=>e.replaceAll("\x3c!-- wp:list-item --\x3e","").replaceAll("\x3c!-- /wp:list-item --\x3e","").replaceAll("\x3c!-- wp:list --\x3e","").replaceAll("\x3c!-- /wp:list --\x3e","").replaceAll("<li>","\x3c!-- wp:list-item --\x3e<li>").replaceAll("</li>","</li>\x3c!-- /wp:list-item --\x3e").replaceAll("<ol>",'\x3c!-- wp:list {"ordered":true} --\x3e<ol>').replaceAll("</ol>","</ol>\x3c!-- /wp:list --\x3e").replaceAll("<ul>","\x3c!-- wp:list --\x3e<ul>").replaceAll("</ul>","</ul>\x3c!-- /wp:list --\x3e"),s={list:(e,t=!1)=>{const r=e.replace(/<li>\s+<p>/g,"<li>").replace(/<\/p>\s+<\/li>/g,"</li>");return t?o(r):r},listItem:(e,t=!1)=>t?o(e.replace(/^<[ou]l>\s*/g,"").replace(/\s*<\/[ou]l>\s*$/g,"")):e,paragraph:(e,t=!1)=>t?e.split("<br />").map((e,t,r)=>(t<r.length-1&&(e=e.trimEnd()),t>0&&(e=e.trimStart()),e)).join("<br />"):e,table:(e,t=!1,{hasFixedLayout:r=!1})=>t?e.startsWith("\x3c!-- wp:table")?e:`\x3c!-- wp:table { "hasFixedLayout":${r?"true":"false"} } --\x3e${e}\x3c!-- /wp:table --\x3e`:e},i={breaks:!0},a=["list"];class c{markdownConverter;constructor(e=i){this.markdownConverter=new n.A(e)}render({content:e,rules:t=a,extension:r=!1}){const n=this.markdownConverter.render(e);return t.reduce((e,t)=>s[t](e,r),n)}}},61269(e,t,r){"use strict";r.d(t,{i:()=>s});var n=r(94715),o=r(47143);function s(e){if(!e)return;const{selectBlock:t}=(0,o.dispatch)(n.store),{enableComplementaryArea:r}=(0,o.dispatch)("core/interface");t(e),r("core/edit-post","edit-post/block")}},1811(e,t,r){"use strict";r.d(t,{F:()=>o});var n=r(47143);const o=async()=>{const{clearSelectedBlock:e}=(0,n.dispatch)("core/block-editor"),{enableComplementaryArea:t}=(0,n.dispatch)("core/interface");e(),await t("core/edit-post","jetpack-sidebar/jetpack");const r=document.querySelector(".jetpack-ai-assistant-panel"),o=r?.classList.contains("is-opened"),s=r?.querySelector("h2 button");o&&s?.click(),setTimeout(()=>{s?.click()},50)}},21902(e,t,r){"use strict";r.d(t,{A:()=>o});r(33829);var n=r(10790);const o=()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:[(0,n.jsx)("path",{d:"M6.99976 3.99994L7.84828 6.15141L9.99976 6.99994L7.84828 7.84847L6.99976 9.99994L6.15123 7.84847L3.99976 6.99994L6.15123 6.15141L6.99976 3.99994Z"}),(0,n.jsx)("path",{d:"M16 4L17.1314 6.86863L20 8L17.1314 9.13137L16 12L14.8686 9.13137L12 8L14.8686 6.86863L16 4Z"}),(0,n.jsx)("path",{d:"M11 10L12.4142 13.5858L16 15L12.4142 16.4142L11 20L9.58579 16.4142L6 15L9.58579 13.5858L11 10Z"})]});r.dn(o)},11574(e,t,r){"use strict";r.d(t,{A:()=>o});r(33829);var n=r(10790);const o=()=>(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.9291 7.96836L10.7308 17.6492L6.2145 14.2911L7.10952 13.0873L10.4221 15.5504L16.7253 7.07333L17.9291 7.96836Z"})});r.dn(o)},70002(e,t,r){"use strict";r.d(t,{A:()=>o});r(33829);var n=r(10790);const o=()=>(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.2927 13.7485C18.5014 17.0423 15.5366 19.4901 12 19.4901C8.92508 19.4901 6.28236 17.6396 5.12469 14.9915L8.79556 12.8139L12.2508 14.0309C12.482 14.1123 12.7383 14.0756 12.9374 13.9327L15.8243 11.8601L15.9039 11.8992C16.1998 12.0451 16.6072 12.249 17.0533 12.4807C17.8331 12.8857 18.6946 13.3572 19.2927 13.7485ZM19.499 12.1129C18.9341 11.7788 18.3001 11.4379 17.7447 11.1495C17.287 10.9118 16.8698 10.7031 16.5672 10.5539C16.4158 10.4792 16.2928 10.4193 16.2074 10.378L16.1085 10.3303L16.0824 10.3177L16.0729 10.3132C15.8261 10.1954 15.5347 10.2214 15.3126 10.3809L12.3802 12.4861L8.9634 11.2827C8.75395 11.2089 8.52258 11.2318 8.3316 11.3451L4.65716 13.5248C4.55414 13.0294 4.5 12.5161 4.5 11.9901C4.5 7.84798 7.85786 4.49011 12 4.49011C16.1421 4.49011 19.5 7.84798 19.5 11.9901C19.5 12.0311 19.4997 12.072 19.499 12.1129ZM21 11.9901C21 16.9607 16.9706 20.9901 12 20.9901C7.02944 20.9901 3 16.9607 3 11.9901C3 7.01955 7.02944 2.99011 12 2.99011C16.9706 2.99011 21 7.01955 21 11.9901Z"})});r.dn(o)},97034(e,t,r){"use strict";r.d(t,{A:()=>o});r(33829);var n=r(10790);const o=()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"jetpack-ai-logo-generator-icon",children:[(0,n.jsx)("path",{d:"M7 6.49011L11 8.99011L7 11.4901V6.49011Z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2.99011C3.89543 2.99011 3 3.88554 3 4.99011V18.9901C3 20.0947 3.89543 20.9901 5 20.9901H19C20.1046 20.9901 21 20.0947 21 18.9901V4.99011C21 3.88554 20.1046 2.99011 19 2.99011H5ZM19 4.49011H5C4.72386 4.49011 4.5 4.71397 4.5 4.99011V15.6973L8.12953 13.0508C8.38061 12.8677 8.71858 12.8584 8.97934 13.0274L11.906 14.9243L15.4772 11.4524C15.7683 11.1694 16.2317 11.1694 16.5228 11.4524L19.5 14.3469V4.99011C19.5 4.71397 19.2761 4.49011 19 4.49011ZM4.5 18.9901V17.5537L8.59643 14.5667L11.5921 16.5084C11.8857 16.6987 12.2719 16.6607 12.5228 16.4167L16 13.0361L19.4772 16.4167L19.5 16.3933V18.9901C19.5 19.2663 19.2761 19.4901 19 19.4901H5C4.72386 19.4901 4.5 19.2663 4.5 18.9901Z"})]});r.dn(o)},6019(e,t,r){"use strict";r.d(t,{Q:()=>i});var n=r(56427),o=r(78867),s=r(10790);const i=({variant:e="error"})=>{const t=(0,o.A)();return"muted"===e?(0,s.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,s.jsx)(n.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null}},95933(e,t,r){"use strict";r.d(t,{x:()=>i});var n=r(56427),o=r(27723),s=r(10790);const __=o.__,i=({onCancel:e,onRetry:t})=>{const r=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, try again.","jetpack"),o=__("We are sorry. There was an error loading your Jetpack AI plan data. Please, reload the page and try again.","jetpack");return(0,s.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper",children:[(0,s.jsx)("div",{className:"jetpack-ai-logo-generator-modal__notice-message",children:(0,s.jsx)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:t?r:o})}),(0,s.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-actions",children:[(0,s.jsx)(n.Button,{variant:"tertiary",onClick:e,children:__("Cancel","jetpack")}),t&&(0,s.jsx)(n.Button,{variant:"primary",onClick:t,children:__("Try again","jetpack")})]})]})}},76194(e,t,r){"use strict";r.d(t,{N:()=>i});var n=r(27723),o=r(42669),s=(r(55307),r(10790));const __=n.__,i=({state:e="loadingFeature"})=>{const t=__("Loading…","jetpack"),r=__("Analyzing your site to create the perfect logo…","jetpack"),n=__("Generating logo…","jetpack");return(0,s.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__loading-wrapper",children:[(0,s.jsx)(o.$,{}),(0,s.jsxs)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:["loadingFeature"===e&&t,"analyzing"===e&&r,"generating"===e&&n]})]})}},64537(e,t,r){"use strict";r.d(t,{T:()=>S});var n=r(85985),o=r(56427),s=r(47143),i=r(27723),a=r(13022),c=r(10067),l=r.n(c),u=r(51609),d=r(46381),p=r(61356),h=r(60674),m=r(88725),g=r(44461),f=r(19362),b=r(74423),v=r(95933),y=r(76194),k=r(32623),w=r(34706),_=r(11114),x=r(35421),j=r(48204),C=(r(68294),r(10790));const __=i.__,A=l()("jetpack-ai-calypso:generator-modal"),S=({isOpen:e,onClose:t,onApplyLogo:r,onReload:i=null,siteDetails:c,context:l,placement:S})=>{const{tracks:E}=(0,n.st)(),{recordEvent:T}=E,{setSiteDetails:N,fetchAiAssistantFeature:P,loadLogoHistory:B,setIsLoadingHistory:R}=(0,s.useDispatch)(b.E),{getIsRequestingAiAssistantFeature:I}=(0,s.select)(b.E),[D,L]=(0,u.useState)(null),[F,M]=(0,u.useState)(),O=(0,u.useRef)(!0),U=(0,u.useRef)(!1),[z,$]=(0,u.useState)(!1),[q,H]=(0,u.useState)(!1),{selectedLogo:V,getAiAssistantFeature:G,generateFirstPrompt:W,generateLogo:Z,setContext:J,tierPlansEnabled:K,site:Y,requireUpgrade:Q}=(0,m.A)(),{featureFetchError:X,setFeatureFetchError:ee,firstLogoPromptFetchError:te,clearErrors:re}=(0,g.A)(),ne=c?.ID,[oe,se]=(0,u.useState)(!1),{nextTierCheckoutURL:ie}=(0,h.Q)(),ae=G(),ce=(0,u.useCallback)(async()=>{try{L("analyzing"),T(p.vm,{context:l,tool:"first-prompt"});const e=await W();M(e),L("generating"),await Z({prompt:e,style:"none"}),L(null)}catch(e){A("Error generating first logo",e),L(null)}},[l,W,Z]),le=(0,u.useCallback)(async()=>{try{if(!ne)throw new Error("Site ID is missing");if(!ae?.featuresControl?.["logo-generator"]?.enabled)throw ee("Failed to fetch feature data"),new Error("Failed to fetch feature data");const e=!(0,f.NP)(String(ne)),t=ae?.costs?.["jetpack-ai-logo-generator"]?.logo??p._S,r=1,n=ae?.currentTier?.limit||0,o=ae?.currentTier?.value||0,s=ae?.usagePeriod?.requestsCount||0,i=!(K?1===o:o>0)&&!!ae?.nextTier&&!e&&(K?n-s<t+r:n<s);if($(0===o),H(i),0===o||i)return void L(null);if(R(!0),await(0,f.Pv)(String(ne)),B(ne),e)return L(null),void R(!1);if(Q)return L(null),void R(!1);Y&&Y.name&&Y.description&&Y.name!==__("Site Title","jetpack")?ce():(L(null),R(!1))}catch(e){A("Error fetching feature",e),L(null),R(!1)}},[ae,ce,B,f.Pv,f.NP,ne,Q,ee]),ue=(0,u.useCallback)(async()=>{J(l),T(p.iz,{context:l,placement:S}),le()},[J,l,S,le]),de=()=>{O.current=!0,t(),L(null),$(!1),H(!1),re(),se(!1),R(!1),T(p.ub,{context:l,placement:S})},pe=(0,u.useCallback)(()=>{i&&(de(),U.current=!1,i())},[i,de]),he=e=>{se(!0),r?.(e)},me=()=>{T(p.$i,{context:l})};let ge;return(0,u.useEffect)(()=>{if(ne&&N(c),!U.current){I()||(U.current=!0,P())}},[ne,c,N,I]),(0,u.useEffect)(()=>{e&&O.current&&(O.current=!1,ue())},[e,ue]),ge=D?(0,C.jsx)(y.N,{state:D}):X||te?(0,C.jsx)(v.x,{onCancel:de,onRetry:i?pe:null}):z||q?(0,C.jsx)(x.R,{onCancel:de,upgradeURL:ie,reason:z?"feature":"requests"}):(0,C.jsxs)(C.Fragment,{children:[!oe&&(0,C.jsx)(_.X,{initialPrompt:F}),(0,C.jsx)(w.s,{logo:V,onApplyLogo:he,logoAccepted:oe,siteId:String(ne)}),oe?(0,C.jsxs)("div",{className:"jetpack-ai-logo-generator__accept",children:[(0,C.jsx)(j.H,{}),(0,C.jsx)("div",{className:"jetpack-ai-logo-generator__accept-actions",children:(0,C.jsx)(o.Button,{variant:"primary",onClick:de,children:__("Close","jetpack")})})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(k.N,{}),(0,C.jsx)("div",{className:"jetpack-ai-logo-generator__footer",children:(0,C.jsx)(d.A,{onFeedbackClick:me})})]})]}),(0,C.jsx)(C.Fragment,{children:e&&(0,C.jsx)(o.Modal,{className:"jetpack-ai-logo-generator-modal",onRequestClose:de,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,title:__("Jetpack AI Logo Generator","jetpack"),children:(0,C.jsx)("div",{className:(0,a.A)("jetpack-ai-logo-generator-modal__body",{"notice-modal":z||q||X||te}),children:ge})})})}},32623(e,t,r){"use strict";r.d(t,{N:()=>u});var n=r(85985),o=r(56427),s=r(13022),i=r(26076),a=r(61356),c=r(88725),l=(r(29900),r(10790));const u=()=>{const{tracks:e}=(0,n.st)(),{recordEvent:t}=e,{logos:r,selectedLogo:u,setSelectedLogoIndex:d,context:p,isLoadingHistory:h}=(0,c.A)(),m=e=>{const t=new URL(e);return t.searchParams.has("resize")||t.searchParams.append("resize","48,48"),t.toString()};return(0,l.jsxs)("div",{className:"jetpack-ai-logo-generator__carousel",children:[!r.length&&h&&(0,l.jsx)(o.Button,{disabled:!0,className:(0,s.A)("jetpack-ai-logo-generator__carousel-logo"),children:(0,l.jsx)("img",{height:"48",width:"48",src:i,alt:"loading"})}),!r.length&&!h&&(0,l.jsx)("div",{children:" "}),r.map((e,n)=>(0,l.jsx)(o.Button,{className:(0,s.A)("jetpack-ai-logo-generator__carousel-logo",{"is-selected":e.url===u.url}),onClick:()=>(e=>{t(a.Nt,{context:p,logos_count:r.length,selected_logo:e+1}),d(e)})(n),children:(0,l.jsx)("img",{src:m(e.url),alt:e.description})},e.url))]})}},42669(e,t,r){"use strict";r.d(t,{$:()=>i});var n=r(13022),o=r(26076),s=r(10790);const i=({className:e=null})=>(0,s.jsx)("img",{src:o,alt:"Loading",className:(0,n.A)("jetpack-ai-logo-generator-modal__loader",e)})},34706(e,t,r){"use strict";r.d(t,{s:()=>T});var n=r(85985),o=r(56427),s=r(47143),i=r(27723),a=r(10067),c=r.n(a),l=r(11497),u=r(11574),d=r(70002),p=r(97034),h=r(61356),m=r(88725),g=r(44461),f=r(19362),b=r(74423),v=r(42669),y=(r(8243),r(10790));const __=i.__,_x=i._x,k=c()("jetpack-ai-calypso:logo-presenter"),w=({siteId:e})=>{const{tracks:t}=(0,n.st)(),{recordEvent:r}=t,{saveLogo:i,selectedLogo:a,isSavingLogoToLibrary:c,logos:l,selectedLogoIndex:d,context:g}=(0,m.A)(),v=!!a?.mediaId,{loadLogoHistory:w}=(0,s.useDispatch)(b.E),_=_x("Saving…","Logo save button","jetpack"),x=__("Saved","jetpack");return c||v?(0,y.jsxs)(o.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",children:[(0,y.jsx)(o.Icon,{icon:c?(0,y.jsx)(p.A,{}):(0,y.jsx)(u.A,{})}),(0,y.jsx)("span",{className:"action-text",children:c?_:x})]}):(0,y.jsxs)(o.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{if(!v&&!c){r(h.h4,{context:g,logos_count:l.length,selected_logo:d?d+1:0});try{const t=await i(a);(0,f.H)({siteId:e,url:a.url,newUrl:t.mediaURL,mediaId:t.mediaId}),w(e)}catch(e){k("Error saving logo",e)}}},children:[(0,y.jsx)(o.Icon,{icon:(0,y.jsx)(p.A,{})}),(0,y.jsx)("span",{className:"action-text",children:__("Save in Library","jetpack")})]})},_=({onApplyLogo:e})=>{const{tracks:t}=(0,n.st)(),{recordEvent:r}=t,{isSavingLogoToLibrary:s,selectedLogo:i,logos:a,selectedLogoIndex:c,context:l}=(0,m.A)();return(0,y.jsxs)(o.Button,{className:"jetpack-ai-logo-generator-modal-presenter__action",onClick:async()=>{s||(r(h.Zb,{context:l,logos_count:a.length,selected_logo:null!=c?c+1:0}),e?.(i?.mediaId))},disabled:s||!i?.mediaId,variant:"secondary",children:[(0,y.jsx)(o.Icon,{icon:(0,y.jsx)(d.A,{})}),(0,y.jsx)("span",{className:"action-text",children:__("Use on block","jetpack")})]})},x=()=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(v.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,y.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text",children:__("Generating new logo…","jetpack")})]}),j=()=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(v.$,{className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,y.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text",children:__("Fetching previous logos…","jetpack")})]}),C=()=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{style:{width:0,height:"229px"}}),(0,y.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__loading-text",children:__("Once you generate a logo, it will show up here","jetpack")})]}),A=({disabled:e,ratedItem:t,onRate:r})=>{const{logos:n,selectedLogo:o}=(0,m.A)(),s=n.filter(e=>e.rating).reduce((e,t)=>(e[t.url]=t.rating,e),{});return(0,y.jsx)(l.A,{disabled:e,ratedItem:t,feature:"logo-generator",savedRatings:s,options:{mediaLibraryId:o.mediaId,prompt:o.description},onRate:r})},S=({siteId:e,logo:t,onApplyLogo:r})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("img",{src:t.url,alt:t.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__action-wrapper",children:[(0,y.jsx)("span",{className:"jetpack-ai-logo-generator-modal-presenter__description",children:t.description}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__actions",children:[(0,y.jsx)(w,{siteId:e}),(0,y.jsx)(_,{onApplyLogo:r}),(0,y.jsx)(A,{ratedItem:t.url,disabled:!1,onRate:r=>{(0,f.H)({siteId:e,url:t.url,newUrl:t.url,mediaId:t.mediaId,rating:r})}})]})]})]}),E=({logo:e})=>(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("img",{src:e.url,alt:e.description,className:"jetpack-ai-logo-generator-modal-presenter__logo"}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__success-wrapper",children:[(0,y.jsx)(o.Icon,{icon:(0,y.jsx)(u.A,{})}),(0,y.jsx)("span",{children:__("Your new logo was set to the block!","jetpack")})]})]}),T=({logo:e=null,loading:t=!1,onApplyLogo:r,logoAccepted:n=!1,siteId:o})=>{const{isRequestingImage:s}=(0,m.A)(),{saveToLibraryError:i,logoUpdateError:a}=(0,g.A)();let c;return e||s?e?c=t||s?(0,y.jsx)(x,{}):n?(0,y.jsx)(E,{logo:e}):(0,y.jsx)(S,{siteId:String(o),logo:e,onApplyLogo:r}):(k("No logo provided, history still loading or logo being generated"),c=(0,y.jsx)(j,{})):c=(0,y.jsx)(C,{}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter__wrapper",children:[(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-presenter",children:[(0,y.jsx)("div",{className:"jetpack-ai-logo-generator-modal-presenter__content",children:c}),!n&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator-modal-presenter__rectangle"})]}),i&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error saving the logo to your library. Please try again.","jetpack")}),a&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error applying the logo to your site. Please try again.","jetpack")})]})}},11114(e,t,r){"use strict";r.d(t,{X:()=>_});var n=r(85985),o=r(56427),s=r(27723),i=r(13109),a=r(28847),c=r(10067),l=r.n(c),u=r(51609),d=r(66223),p=r(21902),h=r(61356),m=r(60674),g=r(88725),f=r(44461),b=r(6019),v=r(64024),y=(r(76391),r(10790));const __=s.__,k=l()("jetpack-ai-calypso:prompt-box"),w=({prompt:e="",setPrompt:t=()=>{},disabled:r=!1,actionDisabled:n=!1,generateHandler:s=()=>{},placeholder:i="",buttonLabel:a=""})=>{const c=(0,u.useRef)(null);(0,u.useEffect)(()=>{c.current&&c.current.textContent!==e&&(c.current.textContent=e)},[e]);return(0,y.jsxs)("div",{className:"jetpack-ai-image-generator__prompt-query",children:[(0,y.jsx)("div",{role:"textbox",tabIndex:0,ref:c,contentEditable:!r,suppressContentEditableWarning:!0,className:"prompt-query__input",onInput:e=>{t(e.target.textContent||"")},onPaste:e=>{e.preventDefault();const r=e.currentTarget.ownerDocument.getSelection();if(!r||!r.rangeCount)return;const n=e.clipboardData.getData("text/plain");r.deleteFromDocument();r.getRangeAt(0).insertNode(document.createTextNode(n)),r.collapseToEnd(),t(c.current?.textContent||"")},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),s()),e.stopPropagation()},onKeyUp:()=>{""===c.current?.textContent&&(c.current.innerHTML="")},"data-placeholder":i}),(0,y.jsx)(o.Button,{variant:"primary",className:"jetpack-ai-image-generator__prompt-submit",onClick:s,disabled:n,children:a||__("Generate","jetpack")})]})},_=({initialPrompt:e=""})=>{const{tracks:t}=(0,n.st)(),{recordEvent:r}=t,[c,l]=(0,u.useState)(e),[_,x]=(0,u.useState)(0),{enhancePromptFetchError:j,logoFetchError:C}=(0,f.A)(),{nextTierCheckoutURL:A,hasNextTier:S}=(0,m.Q)(),E=c?.length>=h.N3,[T,N]=(0,u.useState)(!1),[P,B]=(0,u.useState)(null),[R,I]=(0,u.useState)([]),{generateLogo:D,enhancePrompt:L,setIsEnhancingPrompt:F,isBusy:M,isEnhancingPrompt:O,site:U,getAiAssistantFeature:z,requireUpgrade:$,context:q,tierPlansEnabled:H,imageStyles:V,guessStyle:G}=(0,g.A)(),W=__("Enhancing…","jetpack"),Z=__("Enhance prompt","jetpack"),J=O?W:Z,K=(0,u.useRef)(null),Y=(0,u.useCallback)(async()=>{k("Enhancing prompt",c),F(!0),r(h.vm,{context:q,tool:"enhance-prompt"});try{const e=await L({prompt:c});l(e),F(!1)}catch(e){k("Error enhancing prompt",e),F(!1)}},[q,L,c,F]),Q=z(String(U?.id||"")),X=Q?.currentTier?.value||0,ee=Q?.usagePeriod?.requestsCount||0,te=1===X;(0,u.useEffect)(()=>{x(X-ee<=0?0:X-ee)},[X,ee]),(0,u.useEffect)(()=>{K.current&&K.current.textContent!==c&&(K.current.textContent=c)},[c]),(0,u.useEffect)(()=>{V&&V.length>0?(I([V.find(({value:e})=>e===d.Hu),V.find(({value:e})=>e===d.Wp),...V.filter(({value:e})=>![d.Hu,d.Wp].includes(e))].filter(e=>e)),N(!0),B(d.Hu)):(I([]),N(!1),B(null))},[V]);const re=(0,u.useCallback)(async()=>{if(k(q),P===d.Wp){F(!0),r(h.Tk,{context:q,tool:"image"});const e=await G(c)||d.Hu;B(e),r(h.vm,{context:q,tool:"image",style:e}),F(!1),D({prompt:c,style:e})}else r(h.vm,{context:q,tool:"image",style:P}),D({prompt:c,style:P})},[q,D,c,P]),ne=(0,u.useCallback)(e=>{k("change style",e),B(e),r(h.UO,{context:q,style:e})},[q,B,r]);return(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt",children:[(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt-header",children:[(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-label",children:__("Describe your site:","jetpack")}),(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-actions",children:(0,y.jsxs)(o.Button,{variant:"link",disabled:M||$||!E,onClick:Y,children:[(0,y.jsx)(p.A,{}),J]})}),T&&(0,y.jsx)(o.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,value:P,options:R,onChange:ne,disabled:M||$})]}),(0,y.jsx)(w,{prompt:c,setPrompt:l,generateHandler:re,disabled:M||$,actionDisabled:M||$||!E,placeholder:__("Describe your site or simply ask for a logo specifying some details about it","jetpack")}),(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt-footer",children:[!te&&!$&&(0,y.jsxs)("div",{className:"jetpack-ai-logo-generator__prompt-requests",children:[(0,y.jsx)("div",{children:(0,s.sprintf)( | |
| 11 | +// translators: %d is the number of requests | |
| 12 | +__("%d requests remaining.","jetpack"),_)}),S&&(0,y.jsxs)(y.Fragment,{children:[" ",(0,y.jsx)(o.Button,{variant:"link",href:A,target:"_blank",onClick:()=>{r(h.AN,{context:q,placement:h.Cn})},children:(0,y.jsx)("span",{children:__("Upgrade","jetpack")})})]})," ",(0,y.jsx)(o.Tooltip,{text:__("Logo generation costs 10 requests; prompt enhancement costs 1 request each","jetpack"),placement:"bottom",children:(0,y.jsx)(i.A,{className:"prompt-footer__icon",icon:a.A})})]}),$&&H&&(0,y.jsx)(v.G,{}),$&&!H&&(0,y.jsx)(b.Q,{}),j&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error enhancing prompt. Please try again.","jetpack")}),C&&(0,y.jsx)("div",{className:"jetpack-ai-logo-generator__prompt-error",children:__("Error generating logo. Please try again.","jetpack")})]})]})}},64024(e,t,r){"use strict";r.d(t,{G:()=>h});var n=r(85985),o=r(56427),s=r(86087),i=r(27723),a=r(13109),c=r(84699),l=r(61356),u=r(60674),d=r(88725),p=(r(94089),r(10790));const __=i.__,h=()=>{const{tracks:e}=(0,n.st)(),{recordEvent:t}=e,r=__("Upgrade","jetpack"),i=(0,s.createInterpolateElement)(__("Not enough requests left to generate a logo. <strong>Upgrade now to increase it.</strong>","jetpack"),{strong:(0,p.jsx)("strong",{})}),{nextTierCheckoutURL:h}=(0,u.Q)(),{context:m}=(0,d.A)();return(0,p.jsx)("div",{className:"jetpack-upgrade-plan-banner",children:(0,p.jsxs)("div",{className:"jetpack-upgrade-plan-banner__wrapper",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(a.A,{className:"jetpack-upgrade-plan-banner__icon",icon:c.A}),(0,p.jsx)("span",{className:"jetpack-upgrade-plan-banner__banner-description",children:i})]}),(0,p.jsx)(o.Button,{href:h,target:"_blank",className:"is-primary",onClick:()=>{t(l.AN,{context:m,placement:l.tF})},children:(0,p.jsx)("span",{children:r})})]})})}},35421(e,t,r){"use strict";r.d(t,{R:()=>u});var n=r(3924),o=r(85985),s=r(56427),i=r(27723),a=r(61356),c=r(88725),l=r(10790);const __=i.__,u=({onCancel:e,upgradeURL:t,reason:r})=>{const{tracks:i}=(0,o.st)(),{recordEvent:u}=i,d=__("Upgrade your Jetpack AI for access to logo generation. This upgrade will also increase the amount of monthly requests you can use in for all AI-powered features.","jetpack"),p=__("Not enough requests left to generate a logo. Upgrade your Jetpack AI to increase the amount of requests you can use in all AI-powered features.","jetpack"),h=(0,n.A)("ai-logo-generator-fair-usage-policy",{anchor:"usage-limitations-and-upgrades"}),{context:m}=(0,c.A)();return(0,l.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message-wrapper",children:[(0,l.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-message",children:[(0,l.jsx)("span",{className:"jetpack-ai-logo-generator-modal__loading-message",children:"feature"===r?d:p})," ",(0,l.jsx)(s.Button,{variant:"link",href:h,target:"_blank",children:(0,l.jsx)("span",{children:__("Learn more about Jetpack AI.","jetpack")})})]}),(0,l.jsxs)("div",{className:"jetpack-ai-logo-generator-modal__notice-actions",children:[(0,l.jsx)(s.Button,{variant:"tertiary",onClick:e,children:(0,l.jsx)("span",{children:__("Cancel","jetpack")})}),(0,l.jsx)(s.Button,{variant:"primary",href:t,target:"_blank",onClick:()=>{u(a.AN,{context:m,placement:a.Tz}),e()},children:(0,l.jsx)("span",{children:__("Upgrade","jetpack")})})]})]})}},48204(e,t,r){"use strict";r.d(t,{H:()=>l});var n=r(56427),o=r(27723),s=r(1866),i=r(13022),a=r(36791),c=(r(39769),r(10790));const __=o.__,l=({className:e=null,onVisitBlankTarget:t})=>(0,c.jsxs)("div",{className:(0,i.A)("jetpack-ai-logo-generator-modal-visit-site-banner",e),children:[(0,c.jsx)("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__jetpack-logo",children:(0,c.jsx)("img",{src:a,alt:"Jetpack"})}),(0,c.jsxs)("div",{className:"jetpack-ai-logo-generator-modal-visit-site-banner__content",children:[(0,c.jsx)("strong",{children:__("Do you want to know all the amazing things you can do with Jetpack AI?","jetpack")}),(0,c.jsx)("span",{children:__("Generate and tweak content, create forms, get feedback and much more.","jetpack")}),(0,c.jsx)("div",{children:(0,c.jsxs)(n.Button,{variant:"link",href:"https://jetpack.com/redirect/?source=logo_generator_learn_more_about_jetpack_ai",target:"_blank",onClick:t||null,children:[(0,c.jsx)("span",{children:__("Learn more about Jetpack AI","jetpack")}),(0,c.jsx)(n.Icon,{icon:s.A,size:20})]})})]})]})},61356(e,t,r){"use strict";r.d(t,{$i:()=>l,AN:()=>u,Cn:()=>h,N3:()=>f,Nt:()=>c,Tk:()=>p,Tz:()=>m,UO:()=>d,Zb:()=>a,_S:()=>b,h4:()=>i,iz:()=>n,tF:()=>g,ub:()=>o,vm:()=>s});const n="jetpack_ai_logo_generator_modal_open",o="jetpack_ai_logo_generator_modal_close",s="jetpack_ai_logo_generator_generate",i="jetpack_ai_logo_generator_save",a="jetpack_ai_logo_generator_use",c="jetpack_ai_logo_generator_navigate",l="jetpack_ai_logo_generator_feedback",u="jetpack_ai_upgrade_button",d="jetpack_ai_logo_generator_switch_style",p="jetpack_ai_logo_generator_guess_style",h="input_footer",m="free_user_screen",g="upgrade_prompt",f=3,b=10},60674(e,t,r){"use strict";r.d(t,{Q:()=>a});var n=r(97999),o=r(85985),s=r(47143),i=r(74423);const a=()=>{const{nextTier:e,tierPlansEnabled:t}=(0,s.useSelect)(e=>{const t=e(i.E);return{nextTier:t.getAiAssistantFeature().nextTier,tierPlansEnabled:t.getAiAssistantFeature().tierPlansEnabled}},[]),r=!(0,n.isWpcomPlatformSite)(),a=r?"jetpack-ai-upgrade-url-for-jetpack-sites":"jetpack-ai-yearly-tier-upgrade-nudge",c=(0,o.GE)(),l=`https://wordpress.com/home/${c}`,u=new URL("https://jetpack.com/redirect/");u.searchParams.set("source",a),u.searchParams.set("site",c),u.searchParams.set("path",t?`jetpack_ai_yearly:-q-${e?.limit}`:"jetpack_ai_yearly"),r||u.searchParams.set("query",`redirect_to=${encodeURIComponent(l)}`);return{nextTierCheckoutURL:u.toString(),hasNextTier:!!e}}},78867(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(3924),o=r(47143),s=r(86087),i=r(27723),a=r(74423),c=r(10790);const __=i.__,l=()=>{const{usagePeriod:e}=(0,o.useSelect)(e=>({usagePeriod:e(a.E).getAiAssistantFeature().nextTier}),[]),t=(e=>{const t=__("You've reached this month's request limit, per our <link><span>fair usage policy</span></link>.","jetpack");if(!e)return t; | |
| 13 | +// Translators: %s is the date when the requests will reset. | |
| 14 | +const r=__("Requests will reset on %s.","jetpack");return`${t} ${(0,i.sprintf)(r,e)}`})((e=>{if(!e?.nextStart)return null;const t=new Date(e.nextStart);return t.toLocaleString("default",{month:"long"})+" "+t.getDate()})(e)),r=(0,n.A)("ai-logo-generator-fair-usage-policy",{anchor:"jetpack-ai-usage-limit"});return(0,s.createInterpolateElement)(t,{link:(0,c.jsx)("a",{href:r,target:"_blank",rel:"noreferrer"}),span:(0,c.jsx)("span",{})})}},88725(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(47143),o=r(10067),s=r.n(o),i=r(51609),a=r(31439),c=r(62614),l=r(93869),u=r(51391),d=r(19362),p=r(28229),h=r(74423),m=r(44461);const g=s()("jetpack-ai-calypso:use-logo-generator"),f=()=>{const{setSelectedLogoIndex:e,setIsSavingLogoToLibrary:t,setIsApplyingLogo:r,setIsRequestingImage:o,setIsEnhancingPrompt:s,increaseAiAssistantRequestsCount:f,addLogoToHistory:b,setContext:v,setIsLoadingHistory:y}=(0,n.useDispatch)(h.E),{logos:k,selectedLogoIndex:w,selectedLogo:_,siteDetails:x,isSavingLogoToLibrary:j,isApplyingLogo:C,isEnhancingPrompt:A,isBusy:S,isRequestingImage:E,getAiAssistantFeature:T,requireUpgrade:N,context:P,tierPlansEnabled:B,isLoadingHistory:R}=(0,n.useSelect)(e=>{const t=e(h.E);return{logos:t.getLogos(),selectedLogoIndex:t.getSelectedLogoIndex(),selectedLogo:t.getSelectedLogo(),siteDetails:t.getSiteDetails(),isSavingLogoToLibrary:t.getIsSavingLogoToLibrary(),isApplyingLogo:t.getIsApplyingLogo(),isRequestingImage:t.getIsRequestingImage(),isEnhancingPrompt:t.getIsEnhancingPrompt(),isBusy:t.getIsBusy(),getAiAssistantFeature:t.getAiAssistantFeature,requireUpgrade:t.getRequireUpgrade(),context:t.getContext(),tierPlansEnabled:t.getTierPlansEnabled(),isLoadingHistory:t.getIsLoadingHistory()}},[]),{setFirstLogoPromptFetchError:I,setEnhancePromptFetchError:D,setLogoFetchError:L,setSaveToLibraryError:F,setLogoUpdateError:M}=(0,m.A)(),{generateImageWithParameters:O}=(0,c.Ay)(),{saveToMediaLibrary:U}=(0,l.A)(),{ID:z=null,name:$=null,description:q=null}=x||{},H=z?String(z):null,V=T(H),G=V?.costs?.["jetpack-ai-logo-generator"]?.logo,W=V?.featuresControl?.["logo-generator"],Z=W?.styles||[],J=(0,i.useCallback)(async function(){I(null),f();try{const e=await(0,u.A)();if(!e||!e.token)throw new Error("No token provided");g("Generating first prompt for site");const t={question:`Generate a simple and short prompt asking for a logo based on the site's name and description, keeping the same language.\nExample for a site named "The minimalist fashion blog", described as "Daily inspiration for all things fashion": A logo for a minimalist fashion site focused on daily sartorial inspiration with a clean and modern aesthetic that is sleek and sophisticated.\nAnother example, now for a site called "El observatorio de aves", described as "Un sitio dedicado a nuestros compañeros y compañeras entusiastas de la observación de aves.": Un logo para un sitio web dedicado a la observación de aves, capturando la esencia de la naturaleza y la pasión por la avifauna en un diseño elegante y representativo, reflejando una estética natural y apasionada por la vida silvestre.\n\nSite name: ${$}\nSite description: ${q}`,feature:"jetpack-ai-logo-generator",stream:!1},r="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",n={Authorization:`Bearer ${e.token}`,"Content-Type":"application/json"},o=await fetch(r,{method:"POST",headers:n,body:JSON.stringify(t)}).then(e=>e.json());return o?.choices?.[0]?.message?.content}catch(e){throw f(-1),I(e),e}},[I,f,$,q]),K=(0,i.useCallback)(async function(e){if(L(null),!Z||!Z.length)return null;const t=[{role:"jetpack-ai",context:{type:"ai-assistant-guess-logo-style",request:e,name:$,description:q}}];try{const e=await(0,a.A)(t,{feature:"jetpack-ai-logo-generator"});if(!e)return null;const r=Z.find(({value:t})=>t===e);return r?r.value:null}catch(e){g("Error guessing style",e),Promise.reject(e)}},[Z,$,q]),Y=(0,i.useCallback)(async function({prompt:e,style:t=null}){L(null);try{const r=await(0,u.A)();if(!r||!r.token)throw new Error("No token provided");if("auto"===t)throw new Error("Auto style is not supported");g("Generating image with prompt",e);const n={prompt:`I NEED to test how the tool works with extremely simple prompts. DO NOT add any detail, just use it AS-IS:\nCreate a single text-free iconic vector logo that symbolically represents the user request, using abstract or symbolic imagery.\nThe design should be modern, with either a vivid color scheme full of gradients or a color scheme that's monochromatic. Use any of those styles based on the user request mood.\nEnsure the logo is set against a clean solid background.\nEnsure the logo works in small sizes.\nThe imagery in the logo should subtly hint at the mood of the user request but DO NOT use any text, letters, or the name of the site on the imagery.\nThe image should contain a single icon, without variations, color palettes or different versions.\n\nUser request:${e}`,messages:t?[{role:"jetpack-ai",context:{type:"ai-assistant-generate-logo",request:e,name:$,description:q,style:t}}]:[],feature:"jetpack-ai-logo-generator",response_format:"b64_json",style:t||""};return await O(n)}catch(e){throw L(e),e}},[$,q]),Q=(0,i.useCallback)(async e=>{F(null);try{if(g("Saving logo for site"),e.mediaId)return{mediaId:e.mediaId,mediaURL:e.url};const r={mediaId:0,mediaURL:""};t(!0);const{id:n,url:o}=await U(e.url,"site-logo.png");return r.mediaId=parseInt(n),r.mediaURL=o,r}catch(e){throw F(e),e}finally{t(!1)}},[t,F]),X=(0,i.useCallback)(async()=>{M(null);try{if(!H||!_)throw new Error("Missing siteId or logo");g("Applying logo for site",H),r(!0);const{mediaId:e}=_;if(!e)throw new Error("Missing mediaId");await(0,p.Z)({siteId:H,imageId:String(e)})}catch(e){throw M(e),e}finally{r(!1)}},[_,r,M,H]),ee=(0,i.useCallback)(e=>{b(e),(0,d.hm)({...e,siteId:String(H)})},[H,b,d.hm]),te=(0,i.useCallback)(async function({prompt:e,style:t}){g("Generating logo for site"),o(!0);try{if(!G)throw new Error("Missing cost information");let r;f(G);try{if(r=await Y({prompt:e,style:t}),!r||!r.data.length)throw new Error("No image returned")}catch(e){throw f(-G),e}const n=r.data[0].revised_prompt||null,o={url:"data:image/png;base64,"+r.data[0].b64_json,description:e,revisedPrompt:n};try{const t=await Q(o);ee({url:t.mediaURL,description:e,mediaId:t.mediaId,revisedPrompt:n})}catch(e){throw ee(o),e}}finally{o(!1)}},[G,f,Q,ee,Y]);return{logos:k,selectedLogoIndex:w,selectedLogo:_,setSelectedLogoIndex:e,site:{id:H,name:$,description:q},generateFirstPrompt:J,saveLogo:Q,applyLogo:X,generateImage:Y,enhancePrompt:async function({prompt:e}){D(null),f();try{const t=await(0,u.A)();if(!t||!t.token)throw new Error("No token provided");g("Enhancing prompt",e);const r={messages:[{role:"system",content:"Enhance the prompt you receive.\nThe prompt is meant for generating a logo. Return the same prompt enhanced, and make each enhancement wrapped in brackets.\nDo not add any mention to text, letters, typography or the name of the site in the prompt.\nFor example: user's prompt: A logo for an ice cream shop. Returned prompt: A logo for an ice cream shop [that is pink] [and vibrant]."},{role:"user",content:e}],feature:"jetpack-ai-logo-generator",stream:!1},n="https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query",o={Authorization:`Bearer ${t.token}`,"Content-Type":"application/json"},s=await fetch(n,{method:"POST",headers:o,body:JSON.stringify(r)}).then(e=>e.json());return s?.choices?.[0]?.message?.content}catch(e){throw f(-1),D(e),e}},storeLogo:ee,generateLogo:te,setIsEnhancingPrompt:s,setIsRequestingImage:o,setIsSavingLogoToLibrary:t,setIsApplyingLogo:r,setContext:v,isEnhancingPrompt:A,isRequestingImage:E,isSavingLogoToLibrary:j,isApplyingLogo:C,isBusy:S,getAiAssistantFeature:T,requireUpgrade:N,context:P,tierPlansEnabled:B,isLoadingHistory:R,setIsLoadingHistory:y,imageStyles:Z,guessStyle:K}}},44461(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(47143),o=r(74423);const s=()=>{const{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:r,setLogoFetchError:s,setSaveToLibraryError:i,setLogoUpdateError:a}=(0,n.useDispatch)(o.E),{featureFetchError:c,firstLogoPromptFetchError:l,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:h}=(0,n.useSelect)(e=>{const t=e(o.E);return{featureFetchError:t.getFeatureFetchError(),firstLogoPromptFetchError:t.getFirstLogoPromptFetchError(),enhancePromptFetchError:t.getEnhancePromptFetchError(),logoFetchError:t.getLogoFetchError(),saveToLibraryError:t.getSaveToLibraryError(),logoUpdateError:t.getLogoUpdateError()}},[]);return{setFeatureFetchError:e,setFirstLogoPromptFetchError:t,setEnhancePromptFetchError:r,setLogoFetchError:s,setSaveToLibraryError:i,setLogoUpdateError:a,clearErrors:()=>{e(null),t(null),r(null),s(null),i(null),a(null)},featureFetchError:c,firstLogoPromptFetchError:l,enhancePromptFetchError:u,logoFetchError:d,saveToLibraryError:p,logoUpdateError:h}}},23101(e,t,r){"use strict";r.d(t,{T:()=>n.T});var n=r(64537);r(11114)},19362(e,t,r){"use strict";r.d(t,{$t:()=>i,H:()=>s,NP:()=>a,Pv:()=>c,hm:()=>o});var n=r(13858);function o({siteId:e,url:t,description:r,mediaId:n,revisedPrompt:o}){const s=i(e),a={url:t,description:r,mediaId:n,revisedPrompt:o};return s.push(a),localStorage.setItem(`logo-history-${e}`,JSON.stringify(s.slice(-10))),a}function s({siteId:e,url:t,newUrl:r,mediaId:n,rating:o}){const s=i(e),a=s.findIndex(e=>e.url===t);return a>-1&&(s[a].url=r,s[a].mediaId=n,s[a].rating=o),localStorage.setItem(`logo-history-${e}`,JSON.stringify(s.slice(-10))),s[a]}function i(e){const t=localStorage.getItem(`logo-history-${e}`);let r=t?JSON.parse(t):[];return Array.isArray(r)||(r=[]),r=r.slice(-10),r=r.filter(e=>"object"==typeof e&&"string"==typeof e.url&&"string"==typeof e.description).map(e=>({url:e.url,description:e.description,mediaId:e.mediaId,rating:e.rating})),r}function a(e){return 0===i(e).length}async function c(e){const t=i(e).filter(({mediaId:e})=>void 0!==e).map(({mediaId:t})=>new Promise((r,o)=>{(0,n.T)({siteId:e,mediaId:t}).then(e=>r({mediaId:t,exists:e})).catch(e=>o(e))}));try{(await Promise.all(t)).filter(({exists:e})=>!e).forEach(({mediaId:t})=>function({siteId:e,mediaId:t}){const r=i(e),n=r.findIndex(e=>e.mediaId===t);-1!==n&&(r.splice(n,1),localStorage.setItem(`logo-history-${e}`,JSON.stringify(r)))}({siteId:e,mediaId:t}))}catch{}}},13858(e,t,r){"use strict";r.d(t,{T:()=>o});var n=r(48931);async function o({mediaId:e}){const t=Number(e);if(Number.isNaN(t))return!1;try{return await(0,n.A)({path:`/wp/v2/media/${Number(e)}`,method:"GET"}),!0}catch(e){const t=e?.data?.status;if(404===t)return!1;throw e}}},28229(e,t,r){"use strict";r.d(t,{Z:()=>o});var n=r(22746);async function o({siteId:e,imageId:t}){const r={site_logo:t,site_icon:t};return(0,n.A)({path:`/sites/${String(e)}/settings`,apiVersion:"v2",apiNamespace:"wp/v2",body:r,query:"source=jetpack-ai",method:"POST"})}},22746(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(48931);let o=0;async function s(e){if(o+=1,o>5)throw o-=1,new Error("Too many requests");return(0,n.A)(e).finally(()=>{o-=1})}},9624(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(19362),o=r(22746),s=r(9938);const i={storeAiAssistantFeature:e=>({type:s.UU,feature:e}),fetchAiAssistantFeature:()=>async({dispatch:e})=>{e({type:s.ql});try{const t=await(0,o.A)({path:"/wpcom/v2/jetpack-ai/ai-assistant-feature",query:"force=wpcom"});if(t.data)throw new Error("Failed to fetch");e(i.storeAiAssistantFeature(function(e){return{hasFeature:!!e["has-feature"],isOverLimit:!!e["is-over-limit"],requestsCount:e["requests-count"],requestsLimit:e["requests-limit"],requireUpgrade:!!e["site-require-upgrade"],errorMessage:e["error-message"],errorCode:e["error-code"],upgradeType:e["upgrade-type"],usagePeriod:{currentStart:e["usage-period"]?.["current-start"],nextStart:e["usage-period"]?.["next-start"],requestsCount:e["usage-period"]?.["requests-count"]||0},currentTier:e["current-tier"],nextTier:e["next-tier"],tierPlansEnabled:!!e["tier-plans-enabled"],costs:e.costs,featuresControl:e["features-control"]}}(t)))}catch(t){e({type:s.Rx,error:t})}},increaseAiAssistantRequestsCount:(e=1)=>({dispatch:t})=>{t({type:s.Lg,count:e})},setAiAssistantFeatureRequireUpgrade:(e=!0)=>({type:s.Kt,requireUpgrade:e}),setTierPlansEnabled:(e=!0)=>({type:s.c1,tierPlansEnabled:e}),setSiteDetails:e=>({type:s.Bz,siteDetails:e}),setSelectedLogoIndex:e=>({type:s.BG,selectedLogoIndex:e}),addLogoToHistory:e=>({type:s.sG,logo:e}),setIsSavingLogoToLibrary:e=>({type:s.E6,isSavingLogoToLibrary:e}),setIsApplyingLogo:e=>({type:s.Ep,isApplyingLogo:e}),updateSelectedLogo:(e,t)=>({type:s.r_,mediaId:e,url:t}),setIsRequestingImage:e=>({type:s.vk,isRequestingImage:e}),setIsEnhancingPrompt:e=>({type:s.O5,isEnhancingPrompt:e}),loadLogoHistory(e){const t=(0,n.$t)(e);return{type:s.ZI,history:t}},setFeatureFetchError:e=>({type:s.Rx,error:e}),setFirstLogoPromptFetchError:e=>({type:s.MQ,error:e}),setEnhancePromptFetchError:e=>({type:s.gG,error:e}),setLogoFetchError:e=>({type:s.q_,error:e}),setSaveToLibraryError:e=>({type:s.x0,error:e}),setLogoUpdateError:e=>({type:s.FN,error:e}),setContext:e=>({type:s.kZ,context:e}),setIsLoadingHistory:e=>({type:s.hY,isLoadingHistory:e})},a=i},9938(e,t,r){"use strict";r.d(t,{BG:()=>h,Bz:()=>c,E6:()=>g,Ep:()=>f,FN:()=>S,GB:()=>l,Kt:()=>i,Lg:()=>s,MQ:()=>x,O5:()=>y,Rx:()=>_,UU:()=>n,ZI:()=>k,c1:()=>a,gG:()=>j,hY:()=>w,kZ:()=>p,mx:()=>d,nb:()=>u,q_:()=>C,ql:()=>o,r_:()=>b,sG:()=>m,vk:()=>v,x0:()=>A});const n="STORE_AI_ASSISTANT_FEATURE",o="REQUEST_AI_ASSISTANT_FEATURE",s="INCREASE_AI_ASSISTANT_REQUESTS_COUNT",i="SET_AI_ASSISTANT_FEATURE_REQUIRE_UPGRADE",a="SET_TIER_PLANS_ENABLED",c="SET_SITE_DETAILS",l=20,u=3e3,d=3,p="SET_CONTEXT",h="SET_SELECTED_LOGO_INDEX",m="ADD_LOGO_TO_HISTORY",g="SET_IS_SAVING_LOGO_TO_LIBRARY",f="SET_IS_APPLYING_LOGO",b="SAVE_SELECTED_LOGO",v="SET_IS_REQUESTING_IMAGE",y="SET_IS_ENHANCING_PROMPT",k="SET_SITE_HISTORY",w="SET_IS_LOADING_HISTORY",_="SET_FEATURE_FETCH_ERROR",x="SET_FIRST_LOGO_PROMPT_FETCH_ERROR",j="SET_ENHANCE_PROMPT_FETCH_ERROR",C="SET_LOGO_FETCH_ERROR",A="SET_SAVE_TO_LIBRARY_ERROR",S="SET_LOGO_UPDATE_ERROR"},74423(e,t,r){"use strict";r.d(t,{E:()=>a});var n=r(47143),o=r(9624),s=r(23695),i=r(80037);const a="jetpack-ai/logo-generator",c=(0,n.createReduxStore)(a,{__experimentalUseThunks:!0,actions:o.A,reducer:s.A,selectors:i.A});(0,n.register)(c)},94891(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(9938);const o={siteDetails:{},features:{aiAssistantFeature:{hasFeature:!0,isOverLimit:!1,requestsCount:0,requestsLimit:n.GB,requireUpgrade:!1,errorMessage:"",errorCode:"",upgradeType:"default",currentTier:{slug:"ai-assistant-tier-free",value:0,limit:20},usagePeriod:{currentStart:"",nextStart:"",requestsCount:0},nextTier:null,tierPlansEnabled:!1,_meta:{isRequesting:!1,asyncRequestCountdown:n.mx,asyncRequestTimerId:0,isRequestingImage:!1},featuresControl:{"logo-generator":{enabled:!1,styles:[]}}}},history:[],selectedLogoIndex:0}},23695(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(61356),o=r(9938),s=r(94891);function i(e=s.A,t){switch(t.type){case o.ql:return{...e,_meta:{...e._meta??{},featureFetchError:null},features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!0,asyncRequestCountdown:o.mx,asyncRequestTimerId:0}}}};case o.UU:{const r={"jetpack-ai-logo-generator":{logo:n._S}};return{...e,features:{...e.features,aiAssistantFeature:{costs:r,...t.feature,requireUpgrade:t.feature?.requireUpgrade||0===t.feature?.currentTier?.value,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}}}}case o.Lg:{const r=e?.features?.aiAssistantFeature?.usagePeriod||{requestsCount:0},n=(e?.features?.aiAssistantFeature?.requestsCount||0)+(t.count??1);r.requestsCount+=t.count??1;const s=e?.features?.aiAssistantFeature?.currentTier?.value,i=void 0===s&&!e?.features?.aiAssistantFeature?.hasFeature||0===s,a=void 0===s&&e?.features?.aiAssistantFeature?.hasFeature||1===s;let c=e?.features?.aiAssistantFeature?.currentTier?.limit||o.GB;a?c=o.nb:i&&(c=e?.features?.aiAssistantFeature?.requestsLimit);const l=(a||i?n:e?.features?.aiAssistantFeature?.usagePeriod?.requestsCount||0)>=c,u=i||l&&null!==e?.features?.aiAssistantFeature?.nextTier;return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,isOverLimit:l,requestsCount:n,requireUpgrade:u,usagePeriod:{...r}}}}}case o.Kt:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,requireUpgrade:t.requireUpgrade,...t.requireUpgrade?{isOverLimit:!0}:{}}}};case o.c1:return{...e,features:{...e.features,aiAssistantFeature:{...e.features.aiAssistantFeature,tierPlansEnabled:t.tierPlansEnabled}}};case o.Bz:return{...e,siteDetails:t.siteDetails};case o.BG:return{...e,selectedLogoIndex:t.selectedLogoIndex};case o.sG:{const r=[...e.history,t.logo];return{...e,history:r,selectedLogoIndex:r.length-1}}case o.E6:return{...e,_meta:{...e._meta??{},isSavingLogoToLibrary:t.isSavingLogoToLibrary}};case o.Ep:return{...e,_meta:{...e._meta??{},isApplyingLogo:t.isApplyingLogo}};case o.r_:{const r=e.history?.[e.selectedLogoIndex];return{...e,history:[...e.history.slice(0,e.selectedLogoIndex),{...r,mediaId:t.mediaId,url:t.url},...e.history.slice(e.selectedLogoIndex+1)]}}case o.vk:return{...e,_meta:{...e._meta??{},isRequestingImage:t.isRequestingImage}};case o.O5:return{...e,_meta:{...e._meta??{},isEnhancingPrompt:t.isEnhancingPrompt}};case o.ZI:return{...e,history:t.history,selectedLogoIndex:t.history?.length?t.history.length-1:0};case o.Rx:return{...e,features:{...e.features,aiAssistantFeature:{...e?.features?.aiAssistantFeature,_meta:{...e?.features?.aiAssistantFeature?._meta,isRequesting:!1}}},_meta:{...e._meta??{},featureFetchError:t.error}};case o.MQ:return{...e,_meta:{...e._meta??{},firstLogoPromptFetchError:t.error}};case o.gG:return{...e,_meta:{...e._meta??{},enhancePromptFetchError:t.error}};case o.q_:return{...e,_meta:{...e._meta??{},logoFetchError:t.error}};case o.x0:return{...e,_meta:{...e._meta??{},saveToLibraryError:t.error}};case o.FN:return{...e,_meta:{...e._meta??{},logoUpdateError:t.error}};case o.kZ:return{...e,_meta:{...e._meta??{},context:t.context}};case o.hY:return{...e,_meta:{...e._meta??{},isLoadingHistory:t.isLoadingHistory}}}return e}},80037(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(61356);const o={getAiAssistantFeature(e){const t={...e.features.aiAssistantFeature};return delete t._meta,t},getSiteDetails:e=>e.siteDetails,getIsRequestingAiAssistantFeature:e=>e.features.aiAssistantFeature?._meta?.isRequesting??!1,getLogos:e=>e.history??[],getSelectedLogoIndex:e=>e.selectedLogoIndex??null,getSelectedLogo:e=>e.history?.[e.selectedLogoIndex]??null,getIsSavingLogoToLibrary:e=>e._meta?.isSavingLogoToLibrary??!1,getIsApplyingLogo:e=>e._meta?.isApplyingLogo??!1,getIsEnhancingPrompt:e=>e._meta?.isEnhancingPrompt??!1,getIsRequestingImage:e=>e._meta?.isRequestingImage??!1,getIsBusy:e=>o.getIsApplyingLogo(e)||o.getIsSavingLogoToLibrary(e)||o.getIsRequestingImage(e)||o.getIsEnhancingPrompt(e),getRequireUpgrade(e){const t=e.features.aiAssistantFeature;if(!t?.tierPlansEnabled)return t?.requireUpgrade;const r=t?.costs?.["jetpack-ai-logo-generator"]?.logo??n._S,o=t?.currentTier?.value||0,s=t?.usagePeriod?.requestsCount||0,i=1===o,a=!t?.nextTier;return e.features.aiAssistantFeature?.requireUpgrade||!i&&!a&&o-s<r},getFeatureFetchError:e=>e._meta?.featureFetchError??null,getFirstLogoPromptFetchError:e=>e._meta?.firstLogoPromptFetchError??null,getEnhancePromptFetchError:e=>e._meta?.enhancePromptFetchError??null,getLogoFetchError:e=>e._meta?.logoFetchError??null,getSaveToLibraryError:e=>e._meta?.saveToLibraryError??null,getLogoUpdateError:e=>e._meta?.logoUpdateError??null,getContext:e=>e._meta?.context??"",getTierPlansEnabled:e=>e.features.aiAssistantFeature?.tierPlansEnabled??!1,getIsLoadingHistory:e=>e._meta?.isLoadingHistory??!1},s=o},53664(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(7675),o=r(10067),s=r.n(o),i=r(46219),a=r(51391),c=r(78836);const l=s()("jetpack-ai-client:suggestions-event-source");class u extends EventTarget{fullMessage;fullFunctionCall;isPromptClear;controller;errorUnclearPromptTriggered;constructor(e){super(),this.fullMessage="",this.fullFunctionCall={name:"",arguments:""},this.isPromptClear=!1,this.controller=new AbortController,this.initEventSource(e)}async initEventSource({url:e,question:t,token:r,options:o={}}){if(!r)try{l("Token was not provided, requesting one..."),r=(await(0,a.A)()).token}catch(e){return void this.processErrorEvent(e)}const s={};if(Number.isInteger(parseInt(o.postId))&&(s.post_id=+o.postId),!e){const t=new URL("https://public-api.wordpress.com/wpcom/v2/jetpack-ai-query");o?.fromCache&&t.searchParams.append("stream_cache","true"),e=t.toString(),l("URL not provided, using default: %o",e)}Array.isArray(t)?s.messages=t:s.question=t,o?.feature?.length&&(l("Feature: %o",o.feature),s.feature=o.feature),o?.functions?.length&&(l("Functions: %o",o.functions),s.functions=o.functions),o?.model?.length&&(l("Model: %o",o.model),s.model=o.model),o?.languageCode?.length&&(l("Language: %o",o.languageCode),s.language_code=o.languageCode),this.errorUnclearPromptTriggered=!1,await(0,n.y)(e,{openWhenHidden:!0,method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer "+r},body:JSON.stringify(s),onclose:()=>{l("Stream closed")},onerror:e=>{throw this.processErrorEvent(e),e},onmessage:e=>{this.processEvent(e)},onopen:async e=>{if(e.ok)return;let t;throw e.status>=400&&e.status<=500&&![413,422,429].includes(e.status)&&(l("Connection error: %o",e),t=c.mA,this.dispatchEvent(new CustomEvent(c.mA,{detail:e}))),503===e.status&&(t=c.AZ,this.dispatchEvent(new CustomEvent(c.AZ))),413===e.status&&(t=c.cT,this.dispatchEvent(new CustomEvent(c.cT))),422===e.status&&(t=c.ud,this.dispatchEvent(new CustomEvent(c.ud))),429===e.status&&(t=c.Or,this.dispatchEvent(new CustomEvent(c.Or))),this.dispatchEvent(new CustomEvent(c.zn,{detail:(0,i.fC)(t)})),new Error},signal:this.controller.signal})}checkForUnclearPrompt(){if(this.isPromptClear)return;const e=this.fullMessage.replace(/__|(\*\*)/g,"");if(e.startsWith("JETPACK_AI_ERROR")){if(this.errorUnclearPromptTriggered)return;this.errorUnclearPromptTriggered=!0,this.dispatchEvent(new CustomEvent(c.L9)),l("Unclear error prompt dispatched"),this.dispatchEvent(new CustomEvent(c.zn,{detail:(0,i.fC)(c.L9)}))}else"JETPACK_AI_ERROR".startsWith(e)?l(this.fullMessage):this.isPromptClear=!0}close(){this.controller.abort()}processEvent(e){if("[DONE]"===e.data){if(this.errorUnclearPromptTriggered)return;if(this.fullMessage.length)return this.dispatchEvent(new CustomEvent("done",{detail:this.fullMessage})),void l("Done: %o",this.fullMessage);if(this.fullFunctionCall.name.length)return this.dispatchEvent(new CustomEvent("function_done",{detail:this.fullFunctionCall})),void l("Done: %o",this.fullFunctionCall)}let t;try{t=JSON.parse(e.data)}catch(t){return void l("Error parsing JSON",e,t)}const{delta:r}=t?.choices?.[0]??{delta:{content:null,function_call:null}},n=r.content,o=r.function_call;n&&(this.fullMessage+=n,this.checkForUnclearPrompt(),this.isPromptClear&&(this.dispatchEvent(new CustomEvent("chunk",{detail:n})),l("suggestion: %o",this.fullMessage),this.dispatchEvent(new CustomEvent("suggestion",{detail:this.fullMessage})))),o&&(null!=o.name&&(this.fullFunctionCall.name+=o.name),null!=o.arguments&&(this.fullFunctionCall.arguments+=o.arguments),this.dispatchEvent(new CustomEvent("functionCallChunk",{detail:this.fullFunctionCall})))}processErrorEvent(e){l("onerror: %o",e),this.dispatchEvent(new CustomEvent(c.mA,{detail:e})),this.dispatchEvent(new CustomEvent(c.zn,{detail:(0,i.fC)(c.mA)}))}}},78836(e,t,r){"use strict";r.d(t,{AZ:()=>o,L9:()=>l,Np:()=>d,Or:()=>s,cT:()=>a,mA:()=>c,uH:()=>n.u,ud:()=>i,zn:()=>u});var n=r(97784);const o="error_service_unavailable",s="error_quota_exceeded",i="error_moderation",a="error_context_too_large",c="error_network",l="error_unclear_prompt",u="error_response",d="default"},90372(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(10067);const o=r.n(n)()("dops:analytics");let s,i;window._tkq=window._tkq||[],window.ga=window.ga||function(){(window.ga.q=window.ga.q||[]).push(arguments)},window.ga.l=+new Date;const a={initialize:function(e,t,r){a.setUser(e,t),a.setSuperProps(r),a.identifyUser()},setGoogleAnalyticsEnabled:function(e,t=null){this.googleAnalyticsEnabled=e,this.googleAnalyticsKey=t},setMcAnalyticsEnabled:function(e){this.mcAnalyticsEnabled=e},setUser:function(e,t){i={ID:e,username:t}},setSuperProps:function(e){s=e},assignSuperProps:function(e){s=Object.assign(s||{},e)},mc:{bumpStat:function(e,t){const r=function(e,t){let r="";if("object"==typeof e){for(const t in e)r+="&x_"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);o("Bumping stats %o",e)}else r="&x_"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Bumping stat "%s" in group "%s"',t,e);return r}(e,t);a.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv"+r+"&t="+Math.random())},bumpStatWithPageView:function(e,t){const r=function(e,t){let r="";if("object"==typeof e){for(const t in e)r+="&"+encodeURIComponent(t)+"="+encodeURIComponent(e[t]);o("Built stats %o",e)}else r="&"+encodeURIComponent(e)+"="+encodeURIComponent(t),o('Built stat "%s" in group "%s"',t,e);return r}(e,t);a.mcAnalyticsEnabled&&((new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom"+r+"&t="+Math.random())}},pageView:{record:function(e,t){a.tracks.recordPageView(e),a.ga.recordPageView(e,t)}},purchase:{record:function(e,t,r,n,o,s,i){a.ga.recordPurchase(e,t,r,n,o,s,i)}},tracks:{recordEvent:function(e,t){t=t||{},0===e.indexOf("akismet_")||0===e.indexOf("jetpack_")?(!t.blog_id&&"object"==typeof window.jpTracksContext&&window.jpTracksContext.blog_id&&(t.blog_id=window.jpTracksContext.blog_id),s&&(o("- Super Props: %o",s),t=Object.assign(t,s)),o('Record event "%s" called with props %s',e,JSON.stringify(t)),window._tkq.push(["recordEvent",e,t])):o('- Event name must be prefixed by "akismet_" or "jetpack_"')},recordJetpackClick:function(e){const t="object"==typeof e?e:{target:e};a.tracks.recordEvent("jetpack_wpa_click",t)},recordPageView:function(e){a.tracks.recordEvent("akismet_page_view",{path:e})},setOptOut:function(e){o("Pushing setOptOut: %o",e),window._tkq.push(["setOptOut",e])}},ga:{initialized:!1,initialize:function(){let e={};a.ga.initialized||(i&&(e={userId:"u-"+i.ID}),window.ga("create",this.googleAnalyticsKey,"auto",e),a.ga.initialized=!0)},recordPageView:function(e,t){a.ga.initialize(),o("Recording Page View ~ [URL: "+e+"] [Title: "+t+"]"),this.googleAnalyticsEnabled&&(window.ga("set","page",e),window.ga("send",{hitType:"pageview",page:e,title:t}))},recordEvent:function(e,t,r,n){a.ga.initialize();let s="Recording Event ~ [Category: "+e+"] [Action: "+t+"]";void 0!==r&&(s+=" [Option Label: "+r+"]"),void 0!==n&&(s+=" [Option Value: "+n+"]"),o(s),this.googleAnalyticsEnabled&&window.ga("send","event",e,t,r,n)},recordPurchase:function(e,t,r,n,o,s,i){window.ga("require","ecommerce"),window.ga("ecommerce:addTransaction",{id:e,revenue:n,currency:i}),window.ga("ecommerce:addItem",{id:e,name:t,sku:r,price:o,quantity:s}),window.ga("ecommerce:send")}},identifyUser:function(){i&&window._tkq.push(["identifyUser",i.ID,i.username])},setProperties:function(e){window._tkq.push(["setProperties",e])},clearedIdentity:function(){window._tkq.push(["clearIdentity"])}},c=a},5932(e,t,r){"use strict";r.d(t,{Ay:()=>d});var n=r(56439),o=r(93832);function s(e){class t extends Error{constructor(...t){super(...t),this.name=e}}return t}const i=s("JsonParseError"),a=s("JsonParseAfterRedirectError"),c=s("Api404Error"),l=s("Api404AfterRedirectError"),u=s("FetchNetworkError");const d=new function(e,t){let r=e,s=e,i={"X-WP-Nonce":t},a={credentials:"same-origin",headers:i},c={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})},l=function(e){const t=e.split("?"),r=t.length>1?t[1]:"",n=r.length?r.split("&"):[];return n.push("_cacheBuster="+(new Date).getTime()),t[0]+"?"+n.join("&")};const u={setApiRoot(e){r=e},setWpcomOriginApiUrl(e){s=e},setApiNonce(e){i={"X-WP-Nonce":e},a={credentials:"same-origin",headers:i},c={method:"post",credentials:"same-origin",headers:Object.assign({},i,{"Content-type":"application/json"})}},setCacheBusterCallback:e=>{l=e},registerSite:(e,t,o)=>{const s={};return(0,n.jetpackConfigHas)("consumer_slug")&&(s.plugin_slug=(0,n.jetpackConfigGet)("consumer_slug")),null!==t&&(s.redirect_uri=t),o&&(s.from=o),m(`${r}jetpack/v4/connection/register`,c,{body:JSON.stringify(s)}).then(p).then(h)},fetchAuthorizationUrl:e=>d((0,o.addQueryArgs)(`${r}jetpack/v4/connection/authorize_url`,{no_iframe:"1",redirect_uri:e}),a).then(p).then(h),fetchSiteConnectionData:()=>d(`${r}jetpack/v4/connection/data`,a).then(h),fetchSiteConnectionStatus:()=>d(`${r}jetpack/v4/connection`,a).then(h),fetchSiteConnectionTest:()=>d(`${r}jetpack/v4/connection/test`,a).then(p).then(h),fetchUserConnectionData:()=>d(`${r}jetpack/v4/connection/data`,a).then(h),fetchUserTrackingSettings:()=>d(`${r}jetpack/v4/tracking/settings`,a).then(p).then(h),updateUserTrackingSettings:e=>m(`${r}jetpack/v4/tracking/settings`,c,{body:JSON.stringify(e)}).then(p).then(h),disconnectSite:()=>m(`${r}jetpack/v4/connection`,c,{body:JSON.stringify({isActive:!1})}).then(p).then(h),fetchConnectUrl:()=>d(`${r}jetpack/v4/connection/url`,a).then(p).then(h),unlinkUser:(e=!1,t={})=>{const n={linked:!1,force:!!e};return t.disconnectAllUsers&&(n["disconnect-all-users"]=!0),m(`${r}jetpack/v4/connection/user`,c,{body:JSON.stringify(n)}).then(p).then(h)},reconnect:()=>m(`${r}jetpack/v4/connection/reconnect`,c).then(p).then(h),fetchConnectedPlugins:()=>d(`${r}jetpack/v4/connection/plugins`,a).then(p).then(h),fetchModules:()=>d(`${r}jetpack/v4/module/all`,a).then(p).then(h),fetchModule:e=>d(`${r}jetpack/v4/module/${e}`,a).then(p).then(h),activateModule:e=>m(`${r}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!0})}).then(p).then(h),deactivateModule:e=>m(`${r}jetpack/v4/module/${e}/active`,c,{body:JSON.stringify({active:!1})}),updateModuleOptions:(e,t)=>m(`${r}jetpack/v4/module/${e}`,c,{body:JSON.stringify(t)}).then(p).then(h),updateSettings:e=>m(`${r}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(p).then(h),getProtectCount:()=>d(`${r}jetpack/v4/module/protect/data`,a).then(p).then(h),resetOptions:e=>m(`${r}jetpack/v4/options/${e}`,c,{body:JSON.stringify({reset:!0})}).then(p).then(h),activateVaultPress:()=>m(`${r}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"vaultpress",status:"active"})}).then(p).then(h),getVaultPressData:()=>d(`${r}jetpack/v4/module/vaultpress/data`,a).then(p).then(h),installPlugin:(e,t)=>{const n={slug:e,status:"active"};return t&&(n.source=t),m(`${r}jetpack/v4/plugins`,c,{body:JSON.stringify(n)}).then(p).then(h)},activateAkismet:()=>m(`${r}jetpack/v4/plugins`,c,{body:JSON.stringify({slug:"akismet",status:"active"})}).then(p).then(h),getAkismetData:()=>d(`${r}jetpack/v4/module/akismet/data`,a).then(p).then(h),checkAkismetKey:()=>d(`${r}jetpack/v4/module/akismet/key/check`,a).then(p).then(h),checkAkismetKeyTyped:e=>m(`${r}jetpack/v4/module/akismet/key/check`,c,{body:JSON.stringify({api_key:e})}).then(p).then(h),getFeatureTypeStatus:e=>d(`${r}jetpack/v4/feature/${e}`,a).then(p).then(h),fetchStatsData:e=>d(function(e){let t=`${r}jetpack/v4/module/stats/data`;-1!==t.indexOf("?")?t+=`&range=${encodeURIComponent(e)}`:t+=`?range=${encodeURIComponent(e)}`;return t}(e),a).then(p).then(h).then(f),getPluginUpdates:()=>d(`${r}jetpack/v4/updates/plugins`,a).then(p).then(h),getPlans:()=>d(`${r}jetpack/v4/plans`,a).then(p).then(h),fetchSettings:()=>d(`${r}jetpack/v4/settings`,a).then(p).then(h),updateSetting:e=>m(`${r}jetpack/v4/settings`,c,{body:JSON.stringify(e)}).then(p).then(h),fetchSiteData:()=>d(`${r}jetpack/v4/site`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteFeatures:()=>d(`${r}jetpack/v4/site/features`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSitePurchases:()=>d(`${r}jetpack/v4/site/purchases`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSiteBenefits:()=>d(`${r}jetpack/v4/site/benefits`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchSetupQuestionnaire:()=>d(`${r}jetpack/v4/setup/questionnaire`,a).then(p).then(h),fetchRewindStatus:()=>d(`${r}jetpack/v4/rewind`,a).then(p).then(h).then(e=>JSON.parse(e.data)),fetchScanStatus:()=>d(`${r}jetpack/v4/scan`,a).then(p).then(h).then(e=>JSON.parse(e.data)),dismissJetpackNotice:e=>m(`${r}jetpack/v4/notice/${e}`,c,{body:JSON.stringify({dismissed:!0})}).then(p).then(h),fetchPluginsData:()=>d(`${r}jetpack/v4/plugins`,a).then(p).then(h),fetchVerifySiteGoogleStatus:e=>d(null!==e?`${r}jetpack/v4/verify-site/google/${e}`:`${r}jetpack/v4/verify-site/google`,a).then(p).then(h),verifySiteGoogle:e=>m(`${r}jetpack/v4/verify-site/google`,c,{body:JSON.stringify({keyring_id:e})}).then(p).then(h),submitSurvey:e=>m(`${r}jetpack/v4/marketing/survey`,c,{body:JSON.stringify(e)}).then(p).then(h),saveSetupQuestionnaire:e=>m(`${r}jetpack/v4/setup/questionnaire`,c,{body:JSON.stringify(e)}).then(p).then(h),updateLicensingError:e=>m(`${r}jetpack/v4/licensing/error`,c,{body:JSON.stringify(e)}).then(p).then(h),updateLicenseKey:e=>m(`${r}jetpack/v4/licensing/set-license`,c,{body:JSON.stringify({license:e})}).then(p).then(h),getUserLicensesCounts:()=>d(`${r}jetpack/v4/licensing/user/counts`,a).then(p).then(h),getUserLicenses:()=>d(`${r}jetpack/v4/licensing/user/licenses`,a).then(p).then(h),updateLicensingActivationNoticeDismiss:e=>m(`${r}jetpack/v4/licensing/user/activation-notice-dismiss`,c,{body:JSON.stringify({last_detached_count:e})}).then(p).then(h),confirmIDCSafeMode:()=>m(`${r}jetpack/v4/identity-crisis/confirm-safe-mode`,c).then(p),startIDCFresh:e=>m(`${r}jetpack/v4/identity-crisis/start-fresh`,c,{body:JSON.stringify({redirect_uri:e})}).then(p).then(h),migrateIDC:()=>m(`${r}jetpack/v4/identity-crisis/migrate`,c).then(p),attachLicenses:e=>m(`${r}jetpack/v4/licensing/attach-licenses`,c,{body:JSON.stringify({licenses:e})}).then(p).then(h),fetchSearchPlanInfo:()=>d(`${s}jetpack/v4/search/plan`,a).then(p).then(h),fetchSearchSettings:()=>d(`${s}jetpack/v4/search/settings`,a).then(p).then(h),updateSearchSettings:e=>m(`${s}jetpack/v4/search/settings`,c,{body:JSON.stringify(e)}).then(p).then(h),fetchSearchStats:()=>d(`${s}jetpack/v4/search/stats`,a).then(p).then(h),fetchWafSettings:()=>d(`${r}jetpack/v4/waf`,a).then(p).then(h),updateWafSettings:e=>m(`${r}jetpack/v4/waf`,c,{body:JSON.stringify(e)}).then(p).then(h),fetchWordAdsSettings:()=>d(`${r}jetpack/v4/wordads/settings`,a).then(p).then(h),updateWordAdsSettings:e=>m(`${r}jetpack/v4/wordads/settings`,c,{body:JSON.stringify(e)}),fetchSearchPricing:()=>d(`${s}jetpack/v4/search/pricing`,a).then(p).then(h),fetchMigrationStatus:()=>d(`${r}jetpack/v4/migration/status`,a).then(p).then(h),fetchBackupUndoEvent:()=>d(`${r}jetpack/v4/site/backup/undo-event`,a).then(p).then(h),fetchBackupPreflightStatus:()=>d(`${r}jetpack/v4/site/backup/preflight`,a).then(p).then(h)};function d(e,t){return fetch(l(e),t)}function m(e,t,r){return fetch(e,Object.assign({},t,r)).catch(g)}function f(e){return e.general&&void 0===e.general.response||e.week&&void 0===e.week.response||e.month&&void 0===e.month.response?e:{}}Object.assign(this,u)};function p(e){return e.status>=200&&e.status<300?e:404===e.status?new Promise(()=>{throw e.redirected?new l(e.redirected):new c}):e.json().catch(e=>m(e)).then(t=>{const r=new Error(`${t.message} (Status ${e.status})`);throw r.response=t,r.name="ApiError",r})}function h(e){return e.json().catch(t=>m(t,e.redirected,e.url))}function m(e,t,r){throw t?new a(r):new i}function g(){throw new u}},11876(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(13022),o=r(87682),s=r(10790);const i=({children:e=null,width:t=null,height:r=null,className:i=""})=>(0,s.jsx)("div",{className:(0,n.A)(o.A.placeholder,i),style:{width:t,height:r},children:e})},50723(e,t,r){"use strict";r.d(t,{Ay:()=>p});var n=r(51609),o=r(8706),s=r(10790);const i={"--font-headline-medium":"48px","--font-headline-small":"36px","--font-title-medium":"24px","--font-title-small":"20px","--font-body":"16px","--font-body-small":"14px","--font-body-extra-small":"12px","--font-title-large":"var(--font-headline-small)","--font-label":"var(--font-body-extra-small)"},a={"--jp-black":"#000000","--jp-black-80":"#2c3338","--jp-white":"#ffffff","--jp-white-off":"#f9f9f6","--jp-gray":"#dcdcde","--jp-gray-0":"#F6F7F7","--jp-gray-5":"var(--jp-gray)","--jp-gray-10":"#C3C4C7","--jp-gray-20":"#A7AAAD","--jp-gray-40":"#787C82","--jp-gray-50":"#646970","--jp-gray-60":"#50575E","--jp-gray-70":"#3C434A","--jp-gray-80":"#2C3338","--jp-gray-90":"#1d2327","--jp-gray-off":"#e2e2df","--jp-red-0":"#F7EBEC","--jp-red-5":"#FACFD2","--jp-red-40":"#E65054","--jp-red-50":"#D63638","--jp-red-60":"#B32D2E","--jp-red-70":"#8A2424","--jp-red-80":"#691C1C","--jp-red":"#d63639","--jp-yellow-5":"#F5E6B3","--jp-yellow-10":"#F2CF75","--jp-yellow-20":"#F0C930","--jp-yellow-30":"#DEB100","--jp-yellow-40":"#C08C00","--jp-yellow-50":"#9D6E00","--jp-yellow-60":"#7D5600","--jp-blue-20":"#68B3E8","--jp-blue-40":"#1689DB","--jp-pink":"#C9356E","--jp-green-0":"#f0f2eb","--jp-green-5":"#d0e6b8","--jp-green-10":"#9dd977","--jp-green-20":"#64ca43","--jp-green-30":"#2fb41f","--jp-green-40":"#069e08","--jp-green-50":"#008710","--jp-green-60":"#007117","--jp-green-70":"#005b18","--jp-green-80":"#004515","--jp-green-90":"#003010","--jp-green-100":"#001c09","--jp-green":"#069e08","--jp-green-primary":"var( --jp-green-40 )","--jp-green-secondary":"var( --jp-green-30 )"},c={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},l={"--spacing-base":"8px"},u={},d=(e,t,r)=>{const n={...i,...a,...c,...l};for(const t in n)e.style.setProperty(t,n[t]);r&&e.classList.add(o.A.global),t&&(u[t]={provided:!0,root:e})},p=({children:e=null,targetDom:t,id:r,withGlobalStyles:o=!0})=>{const i=(0,n.useRef)(),a=u?.[r]?.provided;return(0,n.useLayoutEffect)(()=>{if(!a)return t?d(t,r,o):void(i?.current&&d(i.current,r,o))},[t,i,a,r,o]),t?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)("div",{ref:i,children:e})}},3924(e,t,r){"use strict";function n(e,t={}){const r={};let n;if("undefined"!=typeof window&&(n=window?.JP_CONNECTION_INITIAL_STATE?.calypsoEnv),0===e.search("https://")){const t=new URL(e);e=`https://${t.host}${t.pathname}`,r.url=encodeURIComponent(e)}else r.source=encodeURIComponent(e);for(const e in t)r[e]=encodeURIComponent(t[e]);!Object.keys(r).includes("site")&&"undefined"!=typeof jetpack_redirects&&Object.hasOwn(jetpack_redirects,"currentSiteRawUrl")&&(r.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),n&&(r.calypso_env=n);return"https://jetpack.com/redirect/?"+Object.keys(r).map(e=>e+"="+r[e]).join("&")}r.d(t,{A:()=>n})},56439(e,t,r){let n={};try{n=r(74277)}catch{globalThis.jetpackConfig?n=globalThis.jetpackConfig:(console.error("jetpackConfig is missing in your webpack config file. See @automattic/jetpack-config"),n={missingConfig:!0})}const o=e=>Object.hasOwn(n,e);e.exports={jetpackConfigHas:o,jetpackConfigGet:e=>{if(!o(e))throw'This app requires the "'+e+'" Jetpack Config to be defined in your webpack configuration file. See details in @automattic/jetpack-config package docs.';return n[e]}}},14882(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(5932),o=r(97999),s=r(47143),i=r(51609),a=r(34293);const c={},l={},u=window?.JP_CONNECTION_INITIAL_STATE||(0,o.getScriptData)()?.connection||{};function d({registrationNonce:e=u.registrationNonce,apiRoot:t=u.apiRoot,apiNonce:r=u.apiNonce,redirectUri:o,autoTrigger:d,from:p,skipUserConnection:h,skipPricingPage:m}={}){const{registerSite:g,connectUser:f,refreshConnectedPlugins:b}=(0,s.useDispatch)(a.a),v=(0,s.useSelect)(e=>e(a.a).getRegistrationError(),[]),{siteIsRegistering:y,userIsConnecting:k,userConnectionData:w,connectedPlugins:_,connectionOwner:x,connectionErrors:j,connectionHealthErrors:C,isRegistered:A,isUserConnected:S,hasConnectedOwner:E,isOfflineMode:T}=(0,s.useSelect)(e=>{const t=e(a.a).getConnectionStatus(),r=e(a.a).getConnectionOwner?.();return{siteIsRegistering:e(a.a).getSiteIsRegistering(),userIsConnecting:e(a.a).getUserIsConnecting(),userConnectionData:e(a.a).getUserConnectionData()||c,connectedPlugins:e(a.a).getConnectedPlugins(),connectionOwner:(n=r,n&&"object"==typeof n&&"id"in n&&"number"==typeof n.id&&"displayName"in n&&"string"==typeof n.displayName?r:null),connectionErrors:e(a.a).getConnectionErrors(),connectionHealthErrors:e(a.a).getConnectionHealthErrors?.()??l,isOfflineMode:e(a.a).getIsOfflineMode(),isRegistered:t.isRegistered??!1,isUserConnected:t.isUserConnected??!1,hasConnectedOwner:t.hasConnectedOwner??!1};var n},[]),N=()=>h?o?(window.location.href=o,Promise.resolve(o)):Promise.resolve():f({from:p,redirectUri:o,skipPricingPage:m}),P=t=>(t&&t.preventDefault(),A?N():g({registrationNonce:e,redirectUri:o,from:p}).then(()=>N()));return(0,i.useEffect)(()=>{n.Ay.setApiRoot(t),n.Ay.setApiNonce(r)},[t,r]),(0,i.useEffect)(()=>{!d||y||k||P()},[]),{handleRegisterSite:P,handleConnectUser:N,refreshConnectedPlugins:b,isRegistered:A,isUserConnected:S,siteIsRegistering:y,userIsConnecting:k,registrationError:v,userConnectionData:w,connectionOwner:x,hasConnectedOwner:E,connectedPlugins:_,connectionErrors:j,connectionHealthErrors:C,isOfflineMode:T}}},14750(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(27723);const __=n.__;function o(e){if(!e||"string"!=typeof e)return{};const t=e.indexOf(" :");if(-1===t)return{};const r=e.slice(0,t).trim(),n=e.slice(t+2).trim(),o={};return n&&(o.action_url=n),r&&(o.action_label=r),o}function s(e){const t={};for(const r of function(e){if(!e||"object"!=typeof e)return[];const t=e;return t.code?[{code:t.code,message:t.message??"",data:t.data||{}},...(Array.isArray(t.additional_errors)?t.additional_errors:[]).map(e=>({code:e.code??"",message:e.message??"",data:e.data||{}}))]:[]}(e))r.code.startsWith("failed_")&&(t[r.code]={0:{error_code:r.code,error_message:r.message||__("A connection check failed.","jetpack"),error_type:"connection_health",error_data:o(r.data.resolution)}});return t}},33935(e,t,r){"use strict";r.d(t,{A1:()=>d,Ay:()=>S,DO:()=>u,Ij:()=>l,Kl:()=>f,LW:()=>p,MU:()=>v,XY:()=>h,ZO:()=>c,dz:()=>m,gH:()=>g,j4:()=>b,v_:()=>a});var n=r(5932),o=r(1455),s=r.n(o),i=r(14750);const a="SET_CONNECTION_STATUS",c="SET_CONNECTION_STATUS_IS_FETCHING",l="SET_SITE_IS_REGISTERING",u="SET_USER_IS_CONNECTING",d="SET_REGISTRATION_ERROR",p="CLEAR_REGISTRATION_ERROR",h="SET_AUTHORIZATION_URL",m="DISCONNECT_USER_SUCCESS",g="SET_CONNECTED_PLUGINS",f="SET_CONNECTION_ERRORS",b="SET_CONNECTION_HEALTH_ERRORS",v="SET_IS_OFFLINE_MODE",y=e=>({type:a,connectionStatus:e}),k=e=>({type:l,isRegistering:e}),w=e=>({type:u,isConnecting:e}),_=e=>({type:d,registrationError:e}),x=()=>({type:p}),j=e=>({type:h,authorizationUrl:e}),C=e=>({type:g,connectedPlugins:e}),A=e=>({type:b,connectionHealthErrors:e});const S={setConnectionStatus:y,setConnectionStatusIsFetching:e=>({type:c,isFetching:e}),fetchConnectionStatus:()=>({type:"FETCH_CONNECTION_STATUS"}),fetchAuthorizationUrl:e=>({type:"FETCH_AUTHORIZATION_URL",redirectUri:e}),setSiteIsRegistering:k,setUserIsConnecting:w,setRegistrationError:_,clearRegistrationError:x,setAuthorizationUrl:j,registerSite:function*({registrationNonce:e,redirectUri:t,from:r=""}){yield x(),yield k(!0);try{const n=yield{type:"REGISTER_SITE",registrationNonce:e,redirectUri:t,from:r};return yield y({isRegistered:!0}),yield j(n.authorizeUrl),yield k(!1),Promise.resolve(n)}catch(e){return yield _(e),yield k(!1),Promise.reject(e)}},connectUser:function*({from:e,redirectFunc:t,redirectUri:r,skipPricingPage:n}={}){yield w(!0),yield{type:"CONNECT_USER",from:e,redirectFunc:t,redirectUri:r,skipPricingPage:n}},disconnectUserSuccess:()=>({type:m}),setConnectedPlugins:C,refreshConnectedPlugins:()=>async({dispatch:e})=>await new Promise(t=>n.Ay.fetchConnectedPlugins().then(r=>{e(C(r)),t(r)})),setConnectionErrors:e=>({type:f,connectionErrors:e}),setConnectionHealthErrors:A,runConnectionHealthCheck:()=>async({dispatch:e})=>{try{return await s()({path:"/jetpack/v4/connection/test"}),e(A({})),{}}catch(t){const r=(0,i.A)(t);return e(A(r)),r}},setIsOfflineMode:e=>({type:v,isOfflineMode:e})}},27938(e,t,r){"use strict";function n(e){return window.location.assign(e)}r.d(t,{d:()=>n})},22494(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(5932),o=r(47143),s=r(27938),i=r(32279);const a={FETCH_AUTHORIZATION_URL:({redirectUri:e})=>n.Ay.fetchAuthorizationUrl(e),REGISTER_SITE:({redirectUri:e,from:t})=>n.Ay.registerSite(null,e,t),CONNECT_USER:(0,o.createRegistryControl)(({resolveSelect:e})=>({from:t,redirectFunc:r,redirectUri:n,skipPricingPage:o}={})=>new Promise((a,c)=>{e(i.A).getAuthorizationUrl(n).then(e=>{const n=r||(e=>(0,s.d)(e)),i=new URL(e);o&&i.searchParams.set("skip_pricing","true"),t&&i.searchParams.set("from",encodeURIComponent(t));const c=i.toString();n(c),a(c)}).catch(e=>{c(e)})}))}},5051(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(47143),o=r(33935);const s=(0,n.combineReducers)({connectionStatus:(e={},t)=>{switch(t.type){case o.v_:return{...e,...t.connectionStatus};case o.dz:return{...e,isUserConnected:!1}}return e},connectionStatusIsFetching:(e=!1,t)=>t.type===o.ZO?t.isFetching:e,siteIsRegistering:(e=!1,t)=>t.type===o.Ij?t.isRegistering:e,userIsConnecting:(e=!1,t)=>t.type===o.DO?t.isConnecting:e,registrationError:(e,t)=>{switch(t.type){case o.LW:return!1;case o.A1:return t.registrationError;default:return e}},authorizationUrl:(e,t)=>t.type===o.XY?t.authorizationUrl:e,userConnectionData:(e,t)=>(t.type,e),connectedPlugins:(e={},t)=>t.type===o.gH?t.connectedPlugins:e,connectionOwner:(e=null,t)=>(t.type,e),connectionErrors:(e={},t)=>t.type===o.Kl?t.connectionErrors:e,connectionHealthErrors:(e={},t)=>t.type===o.j4?t.connectionHealthErrors:e,isOfflineMode:(e=!1,t)=>t.type===o.MU?t.isConnecting:e})},58019(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(47143),o=r(33935),s=r(32279);const i={...{getAuthorizationUrl:{isFulfilled:(e,...t)=>{const r=Boolean(e.authorizationUrl),o=(0,n.select)(s.A).hasFinishedResolution("getAuthorizationUrl",t);return r&&!o&&(0,n.dispatch)(s.A).finishResolution("getAuthorizationUrl",t),r},*fulfill(e){const t=yield o.Ay.fetchAuthorizationUrl(e);yield o.Ay.setAuthorizationUrl(t.authorizeUrl)}}}}},52676(e,t,r){"use strict";r.d(t,{A:()=>n});const n={...{getConnectionStatus:e=>e.connectionStatus||{},getConnectionStatusIsFetching:()=>!1,getSiteIsRegistering:e=>e.siteIsRegistering||!1,getUserIsConnecting:e=>e.userIsConnecting||!1,getRegistrationError:e=>e.registrationError||!1,getAuthorizationUrl:e=>e.authorizationUrl||!1,getUserConnectionData:e=>e.userConnectionData||!1,getConnectedPlugins:e=>e.connectedPlugins||[],getConnectionOwner:e=>e.connectionOwner||null,getConnectionErrors:e=>e.connectionErrors||[],getConnectionHealthErrors:e=>e.connectionHealthErrors||{},getIsOfflineMode:e=>e.isOfflineMode||!1,getWpcomUser:e=>e?.userConnectionData?.currentUser?.wpcomUser,getBlogId:e=>e?.userConnectionData?.currentUser?.blogId}}},18734(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(47143);class o{static store=null;static mayBeInit(e,t){if(null===o.store){if((0,n.select)(e))return console.error(function(e){return[`Jetpack Connection: the "${e}" store was already registered by another script on this page, so this copy was skipped.`,"","Nothing is broken — the first registration is used — but two scripts on this page have each bundled their own copy of @automattic/jetpack-connection, so the package ships to visitors more than once.","","The usual cause is a subpath import. The webpack externals map matches the package root only, so:"," import { useConnection } from '@automattic/jetpack-connection'; // shared, loaded once"," import useConnection from '@automattic/jetpack-connection/use-connection'; // bundled into this script","","To fix: import from the package root, then rebuild. If the symbol is not exported there, add it to the package index rather than reaching for the subpath.","See defaultRequestMap in js-packages/webpack-config/src/webpack.js for the mapping."].join("\n")}(e)),void(o.store=(0,n.createReduxStore)(e,t));o.store=(0,n.createReduxStore)(e,t),(0,n.register)(o.store)}}}const s=o},32279(e,t,r){"use strict";r.d(t,{A:()=>n});const n="jetpack-connection"},34293(e,t,r){"use strict";r.d(t,{a:()=>u.A});var n=r(97999),o=r(33935),s=r(22494),i=r(5051),a=r(58019),c=r(52676),l=r(18734),u=r(32279);const d=window.JP_CONNECTION_INITIAL_STATE||(0,n.getScriptData)()?.connection;d||console.error("Jetpack Connection package: Initial state is missing. Check documentation to see how to use the Connection composer package to set up the initial state."),l.A.mayBeInit(u.A,{__experimentalUseThunks:!0,reducer:i.A,actions:o.Ay,selectors:c.A,resolvers:a.A,controls:s.A,initialState:d||{}})},63673(e,t,r){"use strict";r.d(t,{$:()=>o,M:()=>n});r(38443);const n="en",o="USD"},11452(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(63673),o=r(49980),s=r(91167);const i=function(){let e,t,r;const i=()=>{const t="undefined"!=typeof window?window.wp?.date?.getSettings?.()?.l10n?.locale:void 0,r="undefined"!=typeof window?window?.navigator?.language:void 0;return(e??(t||r)??n.M).split("_")[0]};return{setLocale:t=>{e=t},setGeoLocation:e=>{t=e},setCurrencyOverrides:e=>{r=e},formatNumber:(e,{decimals:t=0,forceLatin:r=!0,numberFormatOptions:n={}}={})=>{try{return(0,s.j)({browserSafeLocale:i(),decimals:t,forceLatin:r,numberFormatOptions:n}).format(e)}catch{return String(e)}},formatNumberCompact:(e,{decimals:t=0,forceLatin:r=!0,numberFormatOptions:n={}}={})=>{try{return(0,s.c)({browserSafeLocale:i(),decimals:t,forceLatin:r,numberFormatOptions:n}).format(e)}catch{return String(e)}},formatCurrency:(e,n,{stripZeros:s=!1,isSmallestUnit:a=!1,signForPositive:c=!1,forceLatin:l=!0}={})=>(0,o.u)({number:e,currency:n,browserSafeLocale:i(),stripZeros:s,isSmallestUnit:a,signForPositive:c,geoLocation:t,forceLatin:l,currencyOverrides:r}),getCurrencyObject:(e,n,{stripZeros:s=!1,isSmallestUnit:a=!1,signForPositive:c=!1,forceLatin:l=!0}={})=>(0,o.v)({number:e,currency:n,browserSafeLocale:i(),stripZeros:s,isSmallestUnit:a,signForPositive:c,geoLocation:t,forceLatin:l,currencyOverrides:r})}}},3328(e,t,r){"use strict";r.d(t,{J:()=>c});var n=r(10067),o=r.n(n),s=r(63673);const i=o()("number-formatters:get-cached-formatter"),a=new Map;function c({locale:e,fallbackLocale:t=s.M,options:r,retries:n=1}){const o=JSON.stringify([e,r]);try{return a.get(o)??a.set(o,new Intl.NumberFormat(e,r)).get(o)}catch(o){if(i(`Intl.NumberFormat was called with a non-existent locale "${e}"; falling back to ${t}`),n)return c({locale:t,options:r,retries:n-1});throw o}}},54268(e,t,r){"use strict";r.d(t,{vv:()=>l});const n=(0,r(11452).A)(),{setLocale:o,setGeoLocation:s,setCurrencyOverrides:i,formatNumber:a,formatNumberCompact:c,formatCurrency:l,getCurrencyObject:u}=n},76673(e,t,r){"use strict";r.d(t,{a:()=>n});const n={AED:{symbol:"د.إ."},AFN:{symbol:"؋"},ALL:{symbol:"Lek"},AMD:{symbol:"֏"},ANG:{symbol:"ƒ"},AOA:{symbol:"Kz"},ARS:{symbol:"$"},AUD:{symbol:"A$"},AWG:{symbol:"ƒ"},AZN:{symbol:"₼"},BAM:{symbol:"КМ"},BBD:{symbol:"Bds$"},BDT:{symbol:"৳"},BGN:{symbol:"лв."},BHD:{symbol:"د.ب."},BIF:{symbol:"FBu"},BMD:{symbol:"$"},BND:{symbol:"$"},BOB:{symbol:"Bs"},BRL:{symbol:"R$"},BSD:{symbol:"$"},BTC:{symbol:"Ƀ"},BTN:{symbol:"Nu."},BWP:{symbol:"P"},BYR:{symbol:"р."},BZD:{symbol:"BZ$"},CAD:{symbol:"C$"},CDF:{symbol:"FC"},CHF:{symbol:"CHF"},CLP:{symbol:"$"},CNY:{symbol:"¥"},COP:{symbol:"$"},CRC:{symbol:"₡"},CUC:{symbol:"CUC"},CUP:{symbol:"$MN"},CVE:{symbol:"$"},CZK:{symbol:"Kč"},DJF:{symbol:"Fdj"},DKK:{symbol:"kr."},DOP:{symbol:"RD$"},DZD:{symbol:"د.ج."},EGP:{symbol:"ج.م."},ERN:{symbol:"Nfk"},ETB:{symbol:"ETB"},EUR:{symbol:"€"},FJD:{symbol:"FJ$"},FKP:{symbol:"£"},GBP:{symbol:"£"},GEL:{symbol:"Lari"},GHS:{symbol:"₵"},GIP:{symbol:"£"},GMD:{symbol:"D"},GNF:{symbol:"FG"},GTQ:{symbol:"Q"},GYD:{symbol:"G$"},HKD:{symbol:"HK$"},HNL:{symbol:"L."},HRK:{symbol:"kn"},HTG:{symbol:"G"},HUF:{symbol:"Ft"},IDR:{symbol:"Rp"},ILS:{symbol:"₪"},INR:{symbol:"₹"},IQD:{symbol:"د.ع."},IRR:{symbol:"﷼"},ISK:{symbol:"kr."},JMD:{symbol:"J$"},JOD:{symbol:"د.ا."},JPY:{symbol:"¥"},KES:{symbol:"S"},KGS:{symbol:"сом"},KHR:{symbol:"៛"},KMF:{symbol:"CF"},KPW:{symbol:"₩"},KRW:{symbol:"₩"},KWD:{symbol:"د.ك."},KYD:{symbol:"$"},KZT:{symbol:"₸"},LAK:{symbol:"₭"},LBP:{symbol:"ل.ل."},LKR:{symbol:"₨"},LRD:{symbol:"L$"},LSL:{symbol:"M"},LYD:{symbol:"د.ل."},MAD:{symbol:"د.م."},MDL:{symbol:"lei"},MGA:{symbol:"Ar"},MKD:{symbol:"ден."},MMK:{symbol:"K"},MNT:{symbol:"₮"},MOP:{symbol:"MOP$"},MRO:{symbol:"UM"},MTL:{symbol:"₤"},MUR:{symbol:"₨"},MVR:{symbol:"MVR"},MWK:{symbol:"MK"},MXN:{symbol:"MX$"},MYR:{symbol:"RM"},MZN:{symbol:"MT"},NAD:{symbol:"N$"},NGN:{symbol:"₦"},NIO:{symbol:"C$"},NOK:{symbol:"kr"},NPR:{symbol:"₨"},NZD:{symbol:"NZ$"},OMR:{symbol:"﷼"},PAB:{symbol:"B/."},PEN:{symbol:"S/."},PGK:{symbol:"K"},PHP:{symbol:"₱"},PKR:{symbol:"₨"},PLN:{symbol:"zł"},PYG:{symbol:"₲"},QAR:{symbol:"﷼"},RON:{symbol:"lei"},RSD:{symbol:"Дин."},RUB:{symbol:"₽"},RWF:{symbol:"RWF"},SAR:{symbol:"﷼"},SBD:{symbol:"S$"},SCR:{symbol:"₨"},SDD:{symbol:"LSd"},SDG:{symbol:"£"},SEK:{symbol:"kr"},SGD:{symbol:"S$"},SHP:{symbol:"£"},SLL:{symbol:"Le"},SOS:{symbol:"S"},SRD:{symbol:"$"},STD:{symbol:"Db"},SVC:{symbol:"₡"},SYP:{symbol:"£"},SZL:{symbol:"E"},THB:{symbol:"฿"},TJS:{symbol:"TJS"},TMT:{symbol:"m"},TND:{symbol:"د.ت."},TOP:{symbol:"T$"},TRY:{symbol:"TL"},TTD:{symbol:"TT$"},TVD:{symbol:"$T"},TWD:{symbol:"NT$"},TZS:{symbol:"TSh"},UAH:{symbol:"₴"},UGX:{symbol:"USh"},USD:{},UYU:{symbol:"$U"},UZS:{symbol:"сўм"},VEB:{symbol:"Bs."},VEF:{symbol:"Bs. F."},VND:{symbol:"₫"},VUV:{symbol:"VT"},WST:{symbol:"WS$"},XAF:{symbol:"F"},XCD:{symbol:"$"},XOF:{symbol:"F"},XPF:{symbol:"F"},YER:{symbol:"﷼"},ZAR:{symbol:"R"},ZMW:{symbol:"ZK"},WON:{symbol:"₩"}}},49980(e,t,r){"use strict";r.d(t,{u:()=>f,v:()=>b});var n=r(10067),o=r.n(n),s=r(63673),i=r(3328),a=r(76673);const c=o()("number-formatters:number-format-currency");function l(e,t,r){if("USD"===e&&t&&""!==t&&"US"!==t)return{symbol:"US$",...r?.USD};const n=a.a[e],o=r?.[e];return n||o?{...n,...o}:void 0}function u(e,t,r){return l(e,t,r)?e:(c(`getValidCurrency was called with a non-existent currency "${e}"; falling back to ${s.$}`),s.$)}function d({number:e,currency:t,browserSafeLocale:r,forceLatin:n=!0,stripZeros:o,signForPositive:s}){const a=`${r}${n?"-u-nu-latn":""}`,c={style:"currency",currency:t,...o&&Number.isInteger(e)&&{maximumFractionDigits:0,minimumFractionDigits:0},...s&&{signDisplay:"exceptZero"}};return(0,i.J)({locale:a,options:c})}const p={IDR:2,HUF:2};function h(e,t,r){return d({number:0,currency:t,browserSafeLocale:e,forceLatin:r}).resolvedOptions().maximumFractionDigits}function m(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}function g(e,t,r,n,o){if(isNaN(e))return c("formatCurrency was called with NaN"),0;if(n){Number.isInteger(e)||c("formatCurrency was called with isSmallestUnit and a float which will be rounded",e);const n=10**function(e,t,r){const n=r?.[e]?.decimal;return"number"==typeof n?n:p[e]??t}(r,t,o);return m(Math.round(e)/n,t)}return m(e,t)}const f=({number:e,browserSafeLocale:t,currency:r,stripZeros:n,isSmallestUnit:o,signForPositive:s,geoLocation:i,forceLatin:a,currencyOverrides:c})=>{const p=u(r,i,c),m=l(p,i,c),f=h(t,p,a);if(o&&void 0===f)throw new Error(`Could not determine currency precision for ${p} in ${t}`);const b=g(e,f??0,p,o,c);return d({number:b,currency:p,browserSafeLocale:t,forceLatin:a,stripZeros:n,signForPositive:s}).formatToParts(b).reduce((e,t)=>"currency"===t.type&&m?.symbol?e+m.symbol:e+t.value,"")},b=({number:e,browserSafeLocale:t,currency:r,stripZeros:n,isSmallestUnit:o,signForPositive:s,geoLocation:i,forceLatin:a,currencyOverrides:c})=>{const p=u(r,i,c),m=l(p,i,c),f=g(e,h(t,p,a)??0,p,o,c),b=d({number:f,currency:p,browserSafeLocale:t,forceLatin:a,stripZeros:n,signForPositive:s}).formatToParts(f);let v="",y="$",k="before",w=!1,_=!1,x="",j="";b.forEach(e=>{switch(e.type){case"currency":return y=m?.symbol??e.value,void(w&&(k="after"));case"group":case"integer":return x+=e.value,void(w=!0);case"decimal":case"fraction":return j+=e.value,w=!0,void(_=!0);case"minusSign":return void(v="-");case"plusSign":v="+"}});const C=!Number.isInteger(f)&&_;return{sign:v,symbol:y,symbolPosition:k,integer:x,fraction:j,hasNonZeroFraction:C,floatValue:f}}},91167(e,t,r){"use strict";r.d(t,{c:()=>s,j:()=>o});var n=r(3328);const o=({browserSafeLocale:e,decimals:t=0,forceLatin:r=!0,numberFormatOptions:o={}})=>{const s=`${e}${r?"-u-nu-latn":""}`,i={minimumFractionDigits:t,maximumFractionDigits:t,...o};return(0,n.J)({locale:s,options:i})},s=({numberFormatOptions:e={},...t})=>o({...t,numberFormatOptions:{notation:"compact",maximumFractionDigits:1,...e}})},85985(e,t,r){"use strict";r.d(t,{$i:()=>n.A,BT:()=>a.A,Bd:()=>p.Bd,CP:()=>b.C,Cq:()=>m.C,Dk:()=>c.Dk,FB:()=>i.A,GE:()=>o.A,GT:()=>c.GT,M_:()=>g.store,Mm:()=>f.A,Ti:()=>p.Ti,W4:()=>c.W4,ZR:()=>d.A,_6:()=>v.A,_X:()=>p._X,aq:()=>c.aq,ds:()=>p.ds,gB:()=>l.A,pP:()=>s.p,q7:()=>h.A,sH:()=>c.sH,sh:()=>m.s,st:()=>u.A,tu:()=>c.tu,xI:()=>b.x});var n=r(34972),o=r(54815),s=(r(41409),r(62634)),i=r(8573),a=(r(82034),r(65595)),c=r(53265),l=r(49354),u=r(73489),d=r(89581),p=r(20710),h=(r(58406),r(76923)),m=r(30335),g=r(87687),f=r(44360),b=r(9061),v=r(25929);r(5765)},5765(e,t,r){"use strict";r(98490)},82201(e,t,r){"use strict";r.d(t,{cb:()=>n.c});r(15877);var n=r(30984);r(82308)},15877(e,t,r){"use strict";r(97999),r(27723),r(48297),r(10790)},30984(e,t,r){"use strict";r.d(t,{c:()=>a});var n=r(56427),o=r(27723),s=r(13022),i=(r(75070),r(10790));const __=o.__,a=({className:e,description:t,align:r=null,title:o=null,buttonText:a=null,visible:c=!0,context:l=null,checkoutUrl:u=null,goToCheckoutPage:d=null,isRedirecting:p=!1,showButton:h=!0,target:m="_top"})=>{const g=(0,s.A)(e,"jetpack-upgrade-plan-banner",{"jetpack-nudge-canvas":"editor-canvas"===l,"block-editor-block-list__block":"editor-canvas"===l,"jetpack-upgrade-plan__hidden":!c}),f=__("Redirecting…","jetpack");return(0,i.jsx)("div",{className:g,"data-align":r,children:(0,i.jsxs)("div",{className:"jetpack-upgrade-plan-banner__wrapper",children:[o&&(0,i.jsx)("strong",{className:(0,s.A)("banner-title",{[`${e}__title`]:e}),children:o}),t&&(0,i.jsx)("span",{className:(0,s.A)("banner-description",{[`${e}__description`]:e}),children:t}),h&&(0,i.jsx)(n.Button,{href:p?null:u,onClick:d,target:m,className:(0,s.A)("is-primary",{"jetpack-upgrade-plan__hidden":!u}),isBusy:p,children:(0,i.jsx)("span",{children:p?f:a})})]})})}},82308(e,t,r){"use strict";r(47143),r(51609),r(10790)},30335(e,t,r){"use strict";r.d(t,{C:()=>s,s:()=>o});var n=r(86087);function o(e){const t={};let r="span",o=e.icon;const s=document.createElement("div");s.innerHTML=e.icon;const i=s.querySelector("svg");return i&&(r="svg",o=i.innerHTML,Array.from(i.attributes).forEach(({nodeName:e,nodeValue:r})=>t[e]=r)),(0,n.createElement)(r,{...t,dangerouslySetInnerHTML:{__html:o||""}})}function s(e){return{src:o(e)}}},34972(e,t,r){"use strict";r.d(t,{A:()=>n});function n(){return"object"==typeof window?window?.Jetpack_Editor_Initial_State??null:null}},8573(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(34972);function o(e){const t=(0,n.A)(),r=t?.available_blocks?.[e]?.available??!1,o=t?.available_blocks?.[e]?.unavailable_reason??"unknown";return{available:r,...!r&&{details:t?.available_blocks?.[e]?.details??{},unavailableReason:o}}}},54815(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(97999);function o(){return window&&window.Jetpack_Editor_Initial_State&&window.Jetpack_Editor_Initial_State.siteFragment?window.Jetpack_Editor_Initial_State.siteFragment:(0,n.getScriptData)()?.site?.suffix??null}},73489(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(90372),o=r(14882),s=r(86087);const{tracks:i}=n.A,{recordEvent:a}=i,c=({pageViewEventName:e=null,pageViewNamespace:t="jetpack",pageViewSuffix:r="page_view",pageViewEventProperties:c={}}={})=>{const[l,u]=(0,s.useState)(!1),{isUserConnected:d,isRegistered:p,userConnectionData:h={}}=(0,o.A)(),{wpcomUser:{login:m,ID:g}={},blogId:f}=h.currentUser||{},b=(0,s.useCallback)(async(e,t={})=>{d&&g&&m&&a(e,t)},[d,g,m]);return(0,s.useEffect)(()=>{d&&g&&m&&f&&n.A.initialize(g,m,{blog_id:f})},[f,g,m,d]),(0,s.useEffect)(()=>{const n=e?`${t}_${e}_${r}`:null;p&&n&&(l||(b(n,c),u(!0)))},[l,t,e,r,p,c,b]),{recordEvent:b,tracks:i}}},89581(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(47143),o=r(86087);const s=()=>{};function i(e=null,t=s){const[r,i]=(0,o.useState)(!1),{isAutosaveablePost:a,isDirtyPost:c,currentPost:l}=(0,n.useSelect)(e=>{const t=e("core/editor");return{isAutosaveablePost:t.isEditedPostAutosaveable(),isDirtyPost:t.isEditedPostDirty(),currentPost:t.getCurrentPost()}},[]),u=Object.keys(l).length>0,d=(0,n.useSelect)(e=>!!window.wp?.customize||!!e("core/edit-widgets")),p=(0,n.dispatch)("core/editor").savePost,h=(0,n.useSelect)(e=>e("core").__experimentalGetDirtyEntityRecords()),m=async e=>{e?.preventDefault(),u?c&&a&&await p(e):await(async()=>{for(let e=0;e<h.length;e++)await(0,n.dispatch)("core").saveEditedEntityRecord(h[e].kind,h[e].name,h[e].key)})()};return{autosave:m,autosaveAndRedirect:async n=>{n?.preventDefault(),r||(i(!0),m(n).then(()=>{e&&function(e,t,r=!1){t&&t(e),r?window.open(e,"_blank"):window.top.location.href=e}(e,t,d)}))},isRedirecting:r}}},76923(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(87687),o=r(47143),s=r(86087);const i=e=>{const{isModuleActive:t,isChangingStatus:r,isLoadingModules:i}=(0,o.useSelect)(t=>{const r=t(n.store);return{isModuleActive:r.isModuleActive(e),isChangingStatus:r.isModuleUpdating(e),isLoadingModules:r.areModulesLoading(e)}},[e]),{updateJetpackModuleStatus:a}=(0,o.useDispatch)(n.store),c=(0,s.useCallback)(t=>a({name:e,active:t}),[e,a]);return(0,s.useMemo)(()=>({isLoadingModules:i,isChangingStatus:r,isModuleActive:t,changeStatus:c}),[i,r,t,c])}},20710(e,t,r){"use strict";r.d(t,{Bd:()=>i,Ti:()=>s,_X:()=>n,ds:()=>o});const n="free",o="tiered",s="unlimited",i=e=>e?0===e?.value?n:1===e?.value?s:o:null},58406(e,t,r){"use strict";r(86087)},25929(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(47143),o=r(52619),s=r(53265),i=r(89581);const a=()=>{},c="a8c.wpcom-block-editor.openCheckoutModal";function l(e,t=a){const{checkoutUrl:r,planData:l}=(0,n.useSelect)(t=>{const r=t("core/editor"),n=t("wordpress-com/plans"),{id:o,type:i}=r.getCurrentPost(),a=n&&n.getPlan(e);return{checkoutUrl:(0,s.Q4)({plan:a,planSlug:e,postId:o,postType:i}),planData:a}},[e]),{autosave:u,autosaveAndRedirect:d,isRedirecting:p}=(0,i.A)(r,t);return[r,async e=>{if(e.preventDefault(),(0,o.hasAction)(c))return e.preventDefault(),u(e),void(0,o.doAction)(c,{products:[l]});d(e)},p,l]}},35750(e,t,r){"use strict";r.d(t,{KZ:()=>p,M4:()=>u,QB:()=>d,T3:()=>l,ik:()=>m,oW:()=>g,ud:()=>h,ux:()=>c});var n=r(38377),o=r(56427),s=r(13022),i=(r(39169),r(47621),r(10790));const a=n.T["Jetpack Green 40"],c=({size:e=24,border:t=0,className:r="",color:n=a})=>{const c=t?-t/e*32:0;return(0,i.jsxs)(o.SVG,{className:(0,s.A)("jetpack-logo",r),width:e,height:e,viewBox:`${c} ${c} ${32-2*c} ${32-2*c}`,children:[(0,i.jsx)(o.Path,{className:"jetpack-logo__icon-circle",fill:n,stroke:t?"#fff":"transparent",strokeWidth:t,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),(0,i.jsx)(o.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*c},19 15,${3-c}`}),(0,i.jsx)(o.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`17,${29+c} 17,13 ${25+.5*c},13`})]})},l={src:(0,i.jsx)(o.SVG,{viewBox:"0 0 100 100",children:(0,i.jsx)(o.Path,{d:"M100,44H72.4l23.9-13.8l-6-10.4L66.4,33.6L80.2,9.7l-10.4-6L56,27.59V0H44v27.6L30.2,3.7l-10.4,6l13.8,23.9 L9.7,19.8l-6,10.4L27.6,44H0V56h27.6L3.7,69.8l6,10.4l23.9-13.8L19.8,90.3l10.4,6L44,72.4V100H56V72.41l13.8,23.9l10.4-6L66.4,66.4 l23.9,13.8l6-10.4L72.4,56H100V44z M50,65.23c-8.41,0-15.23-6.82-15.23-15.23c0-8.41,6.82-15.23,15.23-15.23S65.23,41.59,65.23,50 C65.23,58.41,58.41,65.23,50,65.23z"})})},u={src:(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve",children:(0,i.jsx)(o.Path,{d:"m20.7 12.9-.9-11c0-.5-.2-.9-.5-1.3-.3-.3-.8-.5-1.3-.5L1.9 0h-.1c-.2 0-.5 0-.7.1C.9.2.7.4.5.5.4.7.2.9.1 1.1c-.1.2-.1.5-.1.7v.1l.9 13.4c0 .5.2.9.5 1.3.3.2.8.4 1.3.4H3l16.1-2c.4 0 .9-.3 1.1-.6.3-.3.5-.8.5-1.2v-.3zm-3.1.8L4.2 15.3H4c-.4 0-.8-.1-1-.4-.3-.3-.4-.6-.5-1L1.7 3.2v-.1c0-.4.2-.8.5-1 .3-.3.7-.4 1-.4h.1l13.5.1c.4 0 .8.1 1 .4.3.3.4.6.5 1L19 12v.3c0 .4-.2.7-.4 1-.3.2-.6.4-1 .4z"})})},d={src:(0,i.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve",children:(0,i.jsx)(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 31.908c0 1.376.893 2.268 2.27 2.268h6.63c3.956 0 7.192-1.337 9.392-3.68H12v1.412zM20.901 9H14.27C12.893 9 12 9.893 12 11.269v1.411h18.294C28.093 10.338 24.857 9 20.9 9zm5.787 16.176c0 1.113.726 1.835 1.845 1.835h3.973c.45-1.117.753-2.345.894-3.671h-4.867c-1.119 0-1.845.722-1.845 1.836zm-5.507-7.166c0 1.113.725 1.836 1.844 1.836H33.4a13.644 13.644 0 0 0-.894-3.672h-9.481c-1.119 0-1.844.723-1.844 1.836zm1.843 7.166c0-1.114-.726-1.836-1.845-1.836H12v3.671h9.18c1.118 0 1.843-.722 1.843-1.835zm-5.508-7.166c0-1.113-.726-1.836-1.844-1.836H12v3.672h3.672c1.118 0 1.844-.723 1.844-1.836zm41.151 3.199"})})},p=(0,i.jsx)(o.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(o.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.79037 0.59375C4.0363 0.59375 5.13102 1.41658 5.47215 2.60947L8.8452 14.4044C8.8486 14.4164 8.85411 14.4273 8.86124 14.4368L12.8572 0.59375H15.0927H21.2721C25.6033 0.59375 28.5066 3.39892 28.5066 7.64565C28.5066 11.9411 25.5272 14.6196 21.0818 14.6196H18.1499H14.3719L13.6379 16.8813C12.9796 18.9095 11.0827 20.2839 8.94152 20.2839C6.80035 20.2839 4.90341 18.9095 4.24517 16.8813L0.137069 4.22276C-0.444671 2.43022 0.898038 0.59375 2.79037 0.59375ZM15.7374 10.4119H20.0156C21.8718 10.4119 22.9856 9.35018 22.9856 7.64565C22.9856 5.93137 21.8718 4.91839 20.0156 4.91839H17.5202L15.7374 10.4119Z",fill:"#000000"})}),h=(0,i.jsx)(o.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(o.Path,{d:"M4.75725 2.075C4.60279 1.97745 4.41041 1.97489 4.25365 2.06832C4.09689 2.16174 4 2.3367 4 2.52632V21.4737C4 21.6633 4.09689 21.8383 4.25365 21.9317C4.41041 22.0251 4.60279 22.0226 4.75725 21.925L19.7573 12.4513C19.9079 12.3562 20 12.1849 20 12C20 11.8151 19.9079 11.6438 19.7573 11.5487L4.75725 2.075Z",fill:"white"})}),m=(0,i.jsx)(o.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(o.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"})}),g=(0,i.jsx)(o.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(o.G,{children:(0,i.jsx)(o.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})})})},49354(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(34972);function o(){return!(!(0,n.A)()?.jetpack?.is_current_user_connected&&!window?.JP_CONNECTION_INITIAL_STATE?.connectionStatus?.isUserConnected)}},44360(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(34972);function o(){return!0===(0,n.A)()?.jetpack?.is_my_jetpack_available}},9520(e,t,r){"use strict";r.d(t,{C:()=>d,x:()=>u});var n=r(97999),o=r(10067),s=r.n(o);const i=window?.JP_CONNECTION_INITIAL_STATE,a=s()("shared-extension-utils:connection");let c=!1;const l=e=>{c||(a(e),c=!0)};function u(){return(0,n.isSimpleSite)()?(l("Simple site connected ✅"),!0):(0,n.isWoASite)()?(l("Atomic site connected ✅"),!0):i?.connectionStatus?.isUserConnected?(l("Jetpack user is connected ✅"),!0):(l("User is not connected ❌"),!1)}function d(){if((0,n.isSimpleSite)())return!0;return!1==!(i?.userConnectionData?.currentUser?.permissions??{}).manage_options}},9061(e,t,r){"use strict";r.d(t,{C:()=>n.C,x:()=>n.x});var n=r(9520)},53265(e,t,r){"use strict";r.d(t,{Dk:()=>m,GT:()=>f,Q4:()=>l,W4:()=>u,aq:()=>d,sH:()=>g,tu:()=>p});var n=r(97999),o=r(27723),s=r(93832),i=r(34972),a=r(8573),c=r(54815);const __=o.__;function l({planSlug:e,plan:t,postId:r,postType:o}){const i=e.startsWith("jetpack_")?e:t?.path_slug,a=(void 0===o?()=>{const e=new URLSearchParams(window.location.search);return(0,s.addQueryArgs)(window.location.protocol+`//${(0,c.A)().replace("::","/")}/wp-admin/site-editor.php`,{postId:e.get("postId"),postType:e.get("postType"),plan_upgraded:1})}:()=>{const e=["page","post"].includes(o)?"":"edit";return(0,n.isSimpleSite)()?(0,s.addQueryArgs)("/"+[e,o,(0,c.A)(),r].filter(Boolean).join("/"),{plan_upgraded:1}):(0,s.addQueryArgs)(window.location.protocol+`//${(0,c.A)().replace("::","/")}/wp-admin/post.php`,{action:"edit",post:r,plan_upgraded:1})})();return(0,n.isWoASite)()?(0,s.addQueryArgs)(`https://wordpress.com/plans/${(0,c.A)()}`,{redirect_to:a,customerType:"business"}):i&&(0,s.addQueryArgs)(`https://wordpress.com/checkout/${(0,c.A)()}/${i}`,{redirect_to:a})}function u(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{available:r,unavailableReason:n}=(0,a.A)(t);return!r&&"missing_plan"===n}function d(e,t){return"missing_plan"===e&&t.required_plan}function p(e){if(!e)return!1;const t=/^jetpack\//.test(e)?e.substr(8,e.length):e,{details:r,unavailableReason:n}=(0,a.A)(t);return d(n,r)}const h=[{name:"core/cover",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"video",description:__("Upgrade your plan to use video covers","jetpack")},{name:"core/audio",mediaPlaceholder:!0,mediaReplaceFlow:!0,fileType:"audio",description:__("Upgrade your plan to upload audio","jetpack")}];function m(){return(0,i.A)()?.jetpack?.enable_upgrade_nudge??!1}const g=e=>h.some(t=>t.name===e),f=e=>h.filter(({name:t})=>t===e)[0]},82034(e,t,r){"use strict";r(92279)},41409(e,t,r){"use strict";r(97999)},62634(e,t,r){"use strict";r.d(t,{p:()=>o});var n=r(34972);function o(){const e=(0,n.A)();return e?.jetpack?.is_private_site??!1}},65595(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(29491),o=(r(13371),r(10790));const s=e=>(0,n.createHigherOrderComponent)(t=>r=>(0,o.jsx)(t,{...r,className:r.name===e?"has-warning is-interactive":r.className}),"withHasWarningIsInteractiveClassNames");r.dn(s)},52068(e,t,r){"use strict";r.d(t,{Ay:()=>_});var n=r(96865),o=r(56427),s=r(47143),i=r(27723),a=r(55565),c=r(73493),l=r(93761),u=r(90437),d=r(80224),p=r(27571),h=r(48499),m=r(2162),g=r(62402),f=(r(37209),r(10790));const __=i.__,b="correct-spelling",v="simplify",y="make-longer",k="make-shorter",w={default:[{name:n.DD,key:b,aiSuggestion:n.yy,icon:d.A}],"core/paragraph":[{name:n.HM,key:v,aiSuggestion:n.A4,icon:u.A},{name:n.JR,key:"summarize",aiSuggestion:n.UA,icon:l.A},{name:n.K2,key:y,aiSuggestion:n.br,icon:c.A},{name:n.UD,key:k,aiSuggestion:n.fD,icon:c.A}],"core/list-item":[{name:n.HM,key:v,aiSuggestion:n.A4,icon:u.A},{name:n.K2,key:y,aiSuggestion:n.br,icon:c.A},{name:n.UD,key:k,aiSuggestion:n.fD,icon:c.A}],"core/list":p.L.includes("core/list")?[{name:n.HM,key:v,aiSuggestion:n.A4,icon:u.A},{name:n.K2,key:y,aiSuggestion:n.br,icon:c.A},{name:n.UD,key:k,aiSuggestion:n.fD,icon:c.A},{name:n.mI,key:"turn-list-into-table",aiSuggestion:n.d5,icon:a.A,options:{alwaysTransformToAIAssistant:!0,rootParentOnly:!0}}]:[{name:n.yQ,key:"write-post-from-list",aiSuggestion:n.pE,icon:u.A,options:{userPrompt:"Write a post based on the list items. Include a title as first order heading and try to use secondary headings for each entry"}}]};function _({blockType:e,clientId:t,disabled:r=!1,onAskAiAssistant:i,onRequestSuggestion:a}){const c=(0,h.C)("ai-correct-spelling"),l=w[e]??[],{getBlockParents:u}=(0,s.select)("core/block-editor"),d=u(t);return(0,f.jsxs)(f.Fragment,{children:[r&&(0,f.jsx)(o.Notice,{status:"warning",isDismissible:!1,className:"jetpack-ai-assistant__info",children:__("Add content to activate the tools below","jetpack")}),(0,f.jsxs)(o.MenuGroup,{children:[(0,f.jsx)(o.MenuItem,{icon:n.cj,iconPosition:"left",onClick:i,disabled:r,children:(0,f.jsx)("div",{className:"jetpack-ai-assistant__menu-item",children:__("Ask AI Assistant","jetpack")})},"key-ai-assistant"),[...w.default,...l].filter(e=>!(e.options?.rootParentOnly&&d.length>0||e.key===b&&!c)).map(e=>(0,f.jsx)(o.MenuItem,{icon:e?.icon,iconPosition:"left",onClick:()=>{a(e.aiSuggestion,{...e.options??{}})},disabled:r,children:(0,f.jsx)("div",{className:"jetpack-ai-assistant__menu-item",children:e.name})},`key-${e.key}`)),(0,f.jsx)(g.hN,{onChange:e=>{a(n.eJ,{tone:e})},disabled:r}),(0,f.jsx)(m.HU,{onChange:e=>{a(n.Gm,{language:e})},disabled:r})]})]})}},32249(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(3924),o=r(56427),s=r(27723),i=r(57273),a=(r(49663),r(10790));const __=s.__;const c=function(){const e=(0,n.A)("jetpack-ai-feedback");return(0,a.jsx)("div",{className:"jetpack-ai-feedback-control",children:(0,a.jsxs)(o.BaseControl,{children:[(0,a.jsx)(o.BaseControl.VisualLabel,{children:__("Feedback","jetpack")}),(0,a.jsx)("p",{children:__("Your feedback is valuable in our commitment to refine and improve this feature.","jetpack")}),(0,a.jsx)(i.N,{openInNewTab:!0,href:e,children:__("Share your feedback","jetpack")})]})})}},2162(e,t,r){"use strict";r.d(t,{Ay:()=>g,HU:()=>f});var n=r(96865),o=r(85985),s=r(56427),i=r(27723),a=r(13109),c=r(48329),l=r(41490),u=(r(97850),r(10790));const __=i.__,d=["en","es","fr","de","it","pt","ru","zh","ja","ar","hi","ko"],p=window?.Jetpack_Editor_Initial_State?.siteLocale||navigator?.language,h=p?.split("-")[0]||"en",m=(p?.split("-"),({value:e,onChange:t})=>{const r=[...d.filter(e=>e!==h)];return d.includes(h)&&r.unshift(h),(0,u.jsx)(s.MenuGroup,{label:__("Select language","jetpack"),children:r.map(r=>(0,u.jsx)(s.MenuItem,{onClick:()=>t(r+" ("+n.so[r].label+")"),isSelected:e===r,children:n.so[r].label},`key-${r}`))})});function g({value:e=h,label:t=n.u0,onChange:r,disabled:i=!1}){const{tracks:c}=(0,o.st)();return i?(0,u.jsx)(s.Tooltip,{text:t,children:(0,u.jsx)(s.Button,{disabled:!0,children:(0,u.jsx)(a.A,{icon:l.A})})}):(0,u.jsx)(s.ToolbarDropdownMenu,{icon:l.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&c.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"i18n"})},children:()=>(0,u.jsx)(m,{value:e,onChange:r})})}function f({value:e=h,label:t=n.u0,onChange:r,disabled:o=!1}){return(0,u.jsx)(s.DropdownMenu,{className:"ai-assistant__i18n-dropdown",icon:l.A,label:t,toggleProps:{children:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"ai-assistant__i18n-dropdown__toggle-label",children:t}),(0,u.jsx)(a.A,{icon:c.A})]}),disabled:o},children:({onClose:t})=>(0,u.jsx)(m,{onChange:(...e)=>{r(...e),t()},value:e})})}},99050(e,t,r){"use strict";r.d(t,{Ay:()=>u});var n=r(96865),o=r(85985),s=r(56427),i=r(27723),a=r(33196),c=r(10790);const __=i.__,l=[{name:__("Summarize","jetpack"),key:"summarize",aiSuggestion:n.UA},{name:__("Make longer","jetpack"),key:"make-longer",aiSuggestion:n.br},{name:__("Make shorter","jetpack"),key:"make-shorter",aiSuggestion:n.fD}];function u({key:e,label:t=__("Improve","jetpack"),exclude:r=[],onChange:n,disabled:i=!1}){const{tracks:u}=(0,o.st)();return i?(0,c.jsx)(s.Tooltip,{text:t,children:(0,c.jsx)(s.Button,{disabled:!0,children:(0,c.jsx)(s.Icon,{icon:a.A})})}):(0,c.jsx)(s.ToolbarDropdownMenu,{icon:a.A,label:t,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&u.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"improve"})},children:()=>{const o=l.filter(e=>!r.includes(e.key));return(0,c.jsx)(s.MenuGroup,{label:t,children:o.map(t=>(0,c.jsx)(s.MenuItem,{onClick:()=>n(t.aiSuggestion,{contentType:"generated"}),isSelected:e===t.key,children:t.name},`key-${t.key}`))})}})}},33468(e,t,r){"use strict";r.d(t,{Ay:()=>b});var n=r(96865),o=r(85985),s=r(56427),i=r(27723),a=r(33196),c=r(73493),l=r(93761),u=r(90437),d=r(80224),p=r(55507),h=r(48499),m=r(10790);const __=i.__,g=[{label:__("Post about…","jetpack"),description:{original:"Write a post about ",translated:__("Write a post about","jetpack")+" "}},{label:__("Informative article on…","jetpack"),description:{original:"Craft an informative article explaining ",translated:__("Craft an informative article explaining","jetpack")+" "}},{label:__("Step-by-step tutorial on…","jetpack"),description:{original:"Write a step-by-step tutorial on ",translated:__("Write a step-by-step tutorial on","jetpack")+" "}},{label:__("Motivational post on…","jetpack"),description:{original:"Create a motivational post on ",translated:__("Create a motivational post on","jetpack")+" "}}],f=[{label:__("Say it differently…","jetpack"),description:{original:"Rewrite it in a way that ",translated:__("Rewrite it in a way that","jetpack")+" "}},{label:__("Add…","jetpack"),description:{original:"Add more details about ",translated:__("Add more details about","jetpack")+" "}},{label:__("Remove…","jetpack"),description:{original:"Remove unnecessary details about ",translated:__("Remove unnecessary details about","jetpack")+" "}}];function b({hasContentBefore:e,hasContent:t,hasPostTitle:r,contentIsLoaded:i,onPromptSelect:b,onSuggestionSelect:v}){const y=__("Write with AI…","jetpack"),k=(0,h.C)("ai-correct-spelling"),{tracks:w}=(0,o.st)();return(0,m.jsx)(s.ToolbarDropdownMenu,{className:"jetpack-ai-assistant__templates-control",icon:null,label:y,text:y,onToggle:e=>{e&&w.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"write-with-ai"})},children:({onClose:o})=>i?(0,m.jsx)(s.MenuGroup,{label:__("Write…","jetpack"),children:f.map((e,t)=>(0,m.jsx)(s.MenuItem,{icon:a.A,iconPosition:"left",onClick:()=>{o(),b(e.description)},children:e.label},`key-${t}`))}):(0,m.jsxs)(m.Fragment,{children:[e&&(0,m.jsxs)(s.MenuGroup,{label:__("Based on preceding content…","jetpack"),children:[(0,m.jsx)(s.MenuItem,{icon:c.A,iconPosition:"left",onClick:()=>v(n.sn),children:n.DT}),k&&(0,m.jsx)(s.MenuItem,{icon:d.A,iconPosition:"left",onClick:()=>v(n.yy),children:n.DD}),(0,m.jsx)(s.MenuItem,{icon:u.A,iconPosition:"left",onClick:()=>v(n.A4),children:n.HM})]}),t&&(0,m.jsxs)(s.MenuGroup,{label:__("Based on entire content…","jetpack"),children:[t&&(0,m.jsx)(s.MenuItem,{icon:l.A,iconPosition:"left",onClick:()=>v(n.UA),children:n.JR}),t&&(0,m.jsx)(s.MenuItem,{icon:p.A,iconPosition:"left",onClick:()=>v(n.vE),children:n.mT})]}),(0,m.jsxs)(s.MenuGroup,{label:__("Write…","jetpack"),children:[r&&(0,m.jsx)(s.MenuItem,{icon:a.A,iconPosition:"left",onClick:()=>v(n.im),children:n.Rq}),g.map((e,t)=>(0,m.jsx)(s.MenuItem,{icon:a.A,iconPosition:"left",onClick:()=>{o(),b(e.description)},children:e.label},`key-${t}`))]})]})})}},62402(e,t,r){"use strict";r.d(t,{Ay:()=>h,US:()=>u,hN:()=>p});var n=r(96865),o=r(85985),s=r(56427),i=r(27723),a=r(48329),c=(r(78518),r(10790));const __=i.__,l=["formal","informal","optimistic","humorous","serious","skeptical","empathetic","confident","passionate","provocative"],u="formal",d=({value:e,onChange:t})=>(0,c.jsx)(s.MenuGroup,{label:__("Select tone","jetpack"),children:l.map(r=>(0,c.jsx)(s.MenuItem,{onClick:()=>t(r),isSelected:e===r,children:`${n.oZ[r].emoji} ${n.oZ[r].label}`},`key-${r}`))});function p({label:e=n.uQ,value:t=u,onChange:r,disabled:o=!1}){return(0,c.jsx)(s.DropdownMenu,{icon:n.Qr,label:e,className:"ai-assistant__tone-dropdown",popoverProps:{variant:"toolbar"},toggleProps:{children:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"ai-assistant__tone-dropdown__toggle-label",children:e}),(0,c.jsx)(s.Icon,{icon:a.A})]}),disabled:o},children:({onClose:e})=>(0,c.jsx)(d,{value:t,onChange:t=>{r(t),e()}})})}function h({value:e=u,onChange:t,disabled:r=!1}){const{tracks:i}=(0,o.st)();return r?(0,c.jsx)(s.Tooltip,{text:n.uQ,children:(0,c.jsx)(s.Button,{disabled:!0,children:(0,c.jsx)(s.Icon,{icon:n.Qr})})}):(0,c.jsx)(s.ToolbarDropdownMenu,{icon:n.Qr,label:n.uQ,popoverProps:{variant:"toolbar"},onToggle:e=>{e&&i.recordEvent("jetpack_ai_assistant_block_toolbar_menu_show",{tool:"tone"})},children:()=>(0,c.jsx)(d,{value:e,onChange:t})})}},35182(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r(96865),o=r(94715),s=r(56427),i=r(27723),a=r(88901),c=r(60484),l=r(2162),u=r(99050),d=r(33468),p=r(62402),h=r(10790);const __=i.__,m=({contentIsLoaded:e,getSuggestionFromOpenAI:t,retryRequest:r,handleAcceptContent:i,handleTryAgain:m,showRetry:g,contentBefore:f,hasPostTitle:b,wholeContent:v,setUserPrompt:y,recordEvent:k,isGeneratingTitle:w})=>(0,h.jsx)(h.Fragment,{children:(0,h.jsxs)(o.BlockControls,{children:[!g&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s.ToolbarGroup,{children:(0,h.jsx)(d.Ay,{hasContentBefore:!!f?.length,hasContent:!!v?.length,hasPostTitle:b,contentIsLoaded:e,onPromptSelect:e=>{k("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"prompt-template",prompt:e.original}),y(e.translated)},onSuggestionSelect:e=>{k("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:e}),t(e)}})}),(0,h.jsxs)(o.BlockControls,{group:"block",children:[(0,h.jsx)(p.Ay,{value:"neutral",onChange:r=>{k("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:n.eJ}),t(n.eJ,{tone:r,contentType:e?"generated":null})},disabled:!e&&!v?.length}),(0,h.jsx)(l.Ay,{value:"en",onChange:r=>{k("jetpack_editor_ai_assistant_block_toolbar_button_click",{type:"suggestion",suggestion:n.Gm}),t(n.Gm,{language:r,contentType:e?"generated":null})},disabled:!e&&!v?.length}),(0,h.jsx)(u.Ay,{onChange:t,exclude:w?["summarize"]:[],disabled:!e})]})]}),(g||m)&&(0,h.jsxs)(s.ToolbarGroup,{children:[!g&&e&&m&&(0,h.jsx)(s.ToolbarButton,{onClick:m,children:__("Try Again","jetpack")}),g&&e&&(0,h.jsx)(s.ToolbarButton,{icon:a.A,onClick:i,children:__("Accept","jetpack")}),g&&(0,h.jsx)(s.ToolbarButton,{icon:c.A,onClick:r,children:__("Retry","jetpack")})]})]})})},19422(e,t,r){"use strict";r.d(t,{A:()=>j});var n=r(96865),o=r(85985),s=r(94715),i=r(74997),a=r(56427),c=r(29491),l=r(47143),u=r(86087),d=r(27723),p=r(57273),h=r(13022),m=r(27970),g=r(56199),f=r(2274),b=r(32249),v=r(35182),y=r(4393),k=r(44732),w=r(76695),_=(r(84368),r(10790));const __=d.__,x="post"===window?.Jetpack_Editor_Initial_State?.screenBase;function j({attributes:e,setAttributes:t,clientId:r,isSelected:d}){const[j,C]=(0,u.useState)(null),{tracks:A}=(0,o.st)(),{getBlock:S}=(0,l.useSelect)("core/block-editor"),E=(0,u.useRef)(null),T=(0,u.useRef)(null),{replaceBlocks:N,removeBlock:P}=(0,l.useDispatch)("core/block-editor"),{editPost:B}=(0,l.useDispatch)("core/editor"),[R,I]=(0,u.useState)((0,n.MB)(e.preTransformAction)),{isOverLimit:D,requireUpgrade:L,increaseRequestsCount:F,requestsCount:M,requestsLimit:O,currentTier:U,loading:z,tierPlansEnabled:$}=(0,n.yM)(),q=Math.max(O-M,0),{autosaveAndRedirect:H}=(0,n.ON)(),V=(0,o.Bd)(U),G=()=>{setTimeout(()=>{E.current?.focus?.()},100)},W=()=>{setTimeout(()=>{T.current?.focus?.()},100)},Z=(0,c.useViewportMatch)("medium","<"),J=(0,u.useRef)(null),{getSuggestionFromOpenAI:K,stopSuggestion:Y,showRetry:Q,contentBefore:X,postTitle:ee,retryRequest:te,wholeContent:re,requestingState:ne,error:oe}=(0,y.A)({onSuggestionDone:(0,u.useCallback)(()=>{G(),F()},[F]),onUnclearPrompt:(0,u.useCallback)(()=>{W(),F()},[F]),onModeration:G,attributes:e,clientId:r,content:e.content,tracks:A,userPrompt:e.userPrompt,requireUpgrade:L,initialRequestingState:e.requestingState,contentRef:J,blockRef:T}),se="requesting"===ne,ie=["requesting","suggesting"].includes(ne),ae=(0,o.xI)(),{productPageUrl:ce}=(0,k.A)(),le=(0,w.y)(r);(0,u.useEffect)(()=>{if(!le)return;const e=JSON.parse(localStorage.getItem(le));if(!e)return;const{type:t,options:r}=e;localStorage.removeItem(le),K(t,r)},[le,K]),(0,u.useEffect)(()=>{oe&&C(!1)},[oe]),(0,u.useEffect)(()=>{["init","done"].includes(ne)&&t({requestingState:ne})},[ne,t]);const ue=!!e.content,de=e.promptType===n.vE,pe=__("Accept","jetpack"),he=__("Accept title","jetpack"),me=de?he:pe,ge=async()=>{let t=(0,n._E)({content:e.content||""});if(t?.split("\n").length>1&&t?.split("\n")?.[0]?.match(/^<h1>.*<\/h1>$/)&&!ee){const e=t.split("\n"),r=e.shift();t=e.join("\n"),B({title:r.replace(/<[^>]*>/g,"")})}const o=(0,i.rawHandler)({HTML:t});await N(r,o);const s=(e=>{let t=null;return e.forEach(e=>{const r=document.querySelector(`.wp-block[data-block="${e.clientId}"]`);if(!r)return;"true"===r.contentEditable&&(t=r);const n=r.querySelectorAll("[contenteditable=true]");t=n.length?n[n.length-1]:t}),t})(o);s&&(e=>{const t=e.ownerDocument.getSelection();t.selectAllChildren(e),t.collapseToEnd(),e.focus()})(s)},fe=()=>{ge(),A.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})},be=()=>{x?(B({title:e.content?e.content.trim():""}),P(r),A.recordEvent("jetpack_ai_assistant_block_accept",{feature:"ai-assistant"})):fe()},ve=()=>{Y(),G(),A.recordEvent("jetpack_ai_assistant_block_stop",{feature:"ai-assistant"})},ye=(0,s.useBlockProps)({ref:T,className:(0,h.A)({"is-waiting-response":se})}),ke=__("Ask Jetpack AI…","jetpack"),we=__("Write about… Make a table for…","jetpack"),_e=(0,_.jsxs)(_.Fragment,{children:[D&&d&&(0,_.jsx)(n.Hb,{placement:"ai-assistant-block"}),!ae&&(0,_.jsx)(f.A,{block:"AI Assistant"})]}),xe=(0,_.jsx)(_.Fragment,{children:oe?.message&&!j&&"error_quota_exceeded"!==oe?.code&&(0,_.jsx)(a.Notice,{status:oe.status,isDismissible:!1,className:"jetpack-ai-assistant__error",children:oe.message})}),je=D&&V===o.Ti?(0,_.jsx)(n.QA,{variant:"muted"}):null,Ce=(0,u.useCallback)(e=>{e.preventDefault(),A.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:U?.slug,requests_count:M,placement:"jetpack_ai_assistant_block"}),H(e)},[A,U,M,H]);return(0,_.jsx)(a.KeyboardShortcuts,{bindGlobal:!0,shortcuts:{esc:()=>{["requesting","suggesting"].includes(ne)&&ve()}},children:(0,_.jsxs)("div",{...ye,children:[ue&&(0,_.jsx)("div",{ref:J,className:"jetpack-ai-assistant__content",children:(0,_.jsx)(u.RawHTML,{children:(0,n._E)({content:e.content||""})})}),(0,_.jsxs)(s.InspectorControls,{children:[je&&(0,_.jsxs)("div",{className:"block-editor-block-card",style:{paddingTop:0},children:[(0,_.jsx)("span",{className:"block-editor-block-icon"}),je]}),(0,_.jsxs)("div",{className:"block-editor-block-card",style:{paddingTop:0},children:[(0,_.jsx)("span",{className:"block-editor-block-icon"}),(0,_.jsx)(p.N,{openInNewTab:!0,href:ce,children:__("Discover all features","jetpack")})]}),(V===o._X||$&&V!==o.Ti)&&(0,_.jsx)(a.PanelBody,{initialOpen:!0,children:(0,_.jsx)(a.PanelRow,{children:(0,_.jsx)(m.A,{placement:g.k})})}),(0,_.jsx)(a.PanelBody,{initialOpen:!0,children:(0,_.jsx)(a.PanelRow,{children:(0,_.jsx)(b.A,{})})})]}),!ie&&ae&&!L&&(0,_.jsx)(v.A,{isWaitingState:ie,contentIsLoaded:ue,getSuggestionFromOpenAI:(e,t)=>{const r=(0,n.MB)(e,t);I(r),K(e,t)},retryRequest:te,handleAcceptContent:fe,handleAcceptTitle:be,handleTryAgain:null,showRetry:Q,contentBefore:X,hasPostTitle:!!ee?.length,wholeContent:re,promptType:e.promptType,setUserPrompt:e=>{if(!E?.current)return;E.current.focus(),t({userPrompt:e})},recordEvent:A.recordEvent,isGeneratingTitle:de}),(0,_.jsx)(n.N0,{ref:E,disabled:L||!ae,value:e.userPrompt,placeholder:e?.content?ke:we,onChange:e=>{C(!0),t({userPrompt:e})},onSend:()=>{I(e.userPrompt),((...e)=>{K(...e),W()})("userPrompt"),A.recordEvent("jetpack_ai_assistant_block_generate",{feature:"ai-assistant"})},onStop:ve,onAccept:()=>{de?be():fe()},onDiscard:()=>{const n=e?.content===S(r).attributes?.content;t({content:e?.originalContent,promptType:void 0,messages:e?.originalMessages}),ge(),n?A.recordEvent("jetpack_ai_assistant_block_dismiss"):A.recordEvent("jetpack_ai_assistant_block_discard",{feature:"ai-assistant"})},state:ne,isTransparent:L||!ae,showButtonLabels:!Z,showAccept:"init"!==ne&&ue&&!ie,acceptLabel:me,showGuideLine:ue,showRemove:e?.content?.length>0,banner:_e,error:xe,customFooter:q%5!=0&&1!==M||z||V!==o._X?null:(0,_.jsx)(n.AK,{requestsRemaining:q,onUpgradeClick:Ce}),lastAction:R})]})})}},61351(e,t,r){"use strict";var n=r(94375),o=r(54681),s=r(19422),i=r(13802);r(84368),r(50797),r(78118);(0,n.M)(o,{edit:s.A,save:()=>null,transforms:i.Ay})},31124(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(96865),o=r(56427),s=r(27723),i=r(10790);const __=s.__;function a({label:e=__("AI Assistant","jetpack"),behavior:t,onAction:r,onDropdownToggle:s,renderContent:a,behaviorContext:c,disabled:l}){return(0,i.jsx)(o.Dropdown,{popoverProps:{variant:"toolbar"},renderToggle:({isOpen:s,onToggle:a})=>(0,i.jsx)(o.ToolbarButton,{className:"jetpack-ai-assistant__button",showTooltip:!0,onClick:()=>{if("function"!=typeof t)switch(t){case"action":r?.();break;case"dropdown":a()}else t({context:c})},"aria-haspopup":"true","aria-expanded":s,label:e,icon:n.cj,disabled:l}),onToggle:s,renderContent:a})}},9731(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r(96865),o=r(85985),s=r(56427),i=r(86087),a=r(27723),c=r(83147),l=r(28755),u=r(10067),d=r.n(u),p=r(31124),h=r(89872),m=(r(85808),r(10790));const __=a.__,g=d()("jetpack-ai:image-extension-toolbar-dropdown"),f=(0,i.forwardRef)(({onClose:e,onRequestAltText:t,onRequestCaption:r,loadingAltText:o,loadingCaption:a},u)=>{const{requireUpgrade:d}=(0,n.yM)(),p=(0,i.useCallback)(async n=>{try{n===h.X?await(t?.()):await(r?.()),e?.()}catch(e){g("Error generating %s",n,e)}},[t,r,e]);return(0,m.jsx)("div",{className:"jetpack-ai-assistant-image-toolbar-dropdown-wrapper",tabIndex:-1,ref:u,children:(0,m.jsxs)(s.MenuGroup,{children:[(0,m.jsx)(s.MenuItem,{icon:o?(0,m.jsx)(s.Spinner,{}):l.A,iconPosition:"left",onClick:()=>{p(h.X)},disabled:!!o||d,children:__("Generate alt text","jetpack")},"key-ai-assistant-alt-text"),(0,m.jsx)(s.MenuItem,{icon:a?(0,m.jsx)(s.Spinner,{}):c.A,iconPosition:"left",onClick:()=>{p(h.Q)},disabled:!!a||d,children:__("Generate caption","jetpack")},"key-ai-assistant-caption")]})})});function b({label:e=__("AI Assistant","jetpack"),onRequestAltText:t,onRequestCaption:r,loadingAltText:s=!1,loadingCaption:a=!1,disabled:c=!1,wrapperRef:l}){const{requireUpgrade:u}=(0,n.yM)(),{tracks:d}=(0,o.st)(),h=(0,i.useCallback)(e=>{e&&(d.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:"core/image"}),u&&(0,n.Fs)())},[u,d]),g=(0,i.useCallback)(()=>(d.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:"alt-text",block_type:"core/image"}),t?.()),[t,d]),b=(0,i.useCallback)(()=>(d.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:"caption",block_type:"core/image"}),r?.()),[r,d]);return(0,m.jsx)(p.A,{label:e,behavior:"dropdown",onDropdownToggle:h,disabled:c,renderContent:({onClose:e})=>(0,m.jsx)(f,{ref:l,onClose:e,onRequestAltText:g,onRequestCaption:b,loadingAltText:s,loadingCaption:a})})}},78118(e,t,r){"use strict";var n=r(96865),o=r(94715),s=r(29491),i=r(47143),a=r(43656),c=r(86087),l=r(52619),u=r(10067),d=r.n(u),p=r(16204),h=r(35317),m=r(48499),g=r(10821),f=r(4647),b=r(89872),v=r(9731),y=r(10790);const k=d()("jetpack-ai:image-extension"),w=(0,m.C)("ai-assistant-image-extension"),_={group:"block"};const x=(0,s.createHigherOrderComponent)(e=>{function t(t){const{increaseRequestsCount:r,dequeueAsyncRequest:s,requireUpgrade:l}=(0,n.yM)(),{getCurrentPostId:u,isImageBusy:d}=(0,i.useSelect)(e=>{const{getCurrentPostId:r}=e(a.store);return{getCurrentPostId:r,isImageBusy:e(p.M)?.isImageBusy(t.clientId)??!1}},[t.clientId]),{getPostContent:h}=(0,n.dh)(),[m,w]=(0,c.useState)(d),[x,j]=(0,c.useState)(!1),{updateBlockAttributes:C}=(0,i.useDispatch)(a.store),{createNotice:A}=(0,i.useDispatch)("core/notices"),S=(0,c.useRef)(null),E=!!t.attributes.url,T=m||x;(0,c.useEffect)(()=>{w(d)},[d]);const N=(e,t)=>{e===b.X?w(t):e===b.Q&&j(t)},P=(0,c.useCallback)(e=>{S.current&&(S.current.setAttribute("tabindex","0"),S.current.focus()),N(e,!0)},[]),B=(0,c.useCallback)(e=>{A("error",e,{isDismissible:!0})},[A]);(0,c.useEffect)(()=>{T||S.current&&S.current.setAttribute("tabindex","-1")},[T]);const R=(0,c.useCallback)(async(e,o=!1)=>{if(!l){P(e);try{const i={};e===b.X&&(0,n.in)(t.clientId),e===b.Q&&(i.positions=[t.clientId]),s();const a=await(0,n.R0)([{role:"jetpack-ai",context:{type:e,content:h(f.P),...i,images:[{url:o?await(0,n.Zo)(t.attributes.url):t.attributes.url}]}}],{postId:u(),feature:"jetpack-ai-image-extension"});r();const c=JSON.parse(a?.replace?.(/^```json\s*/,"")?.replace(/```$/,""));if(e===b.X){const e=c.texts?.[0];C(t.clientId,{alt:e})}else if(e===b.Q){const e=c.captions?.[0];C(t.clientId,{caption:e})}N(e,!1)}catch(t){if(t?.message.includes("The image URL is invalid")&&!o)return k("Retrying with base64 image"),R(e,!0);k(`Error generating ${e}`,t),t?.message&&B(`Image ${e===b.X?"alt text":"caption"} generation failed: ${t.message}`),N(e,!1)}}},[s,u,h,r,t.attributes.url,t.clientId,l,B,P,C]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(e,{...t}),!g.TL&&(0,y.jsx)(o.BlockControls,{..._,children:(0,y.jsx)(v.A,{onRequestAltText:()=>R(b.X),onRequestCaption:()=>R(b.Q),loadingAltText:m,loadingCaption:x,disabled:!E,wrapperRef:S})})]})}return r=>(0,h.A)(r.name)?(0,y.jsx)(t,{...r}):(0,y.jsx)(e,{...r})},"blockEditWithAiComponents");(0,l.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support/with-ai-image-extension",function(e,t){var r;return(r=t,!!(0,g.Bi)()&&!!w&&"core/image"===r)?{...e,edit:x(e.edit),supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e},100)},10821(e,t,r){"use strict";r.d(t,{Bi:()=>l,TL:()=>c});var n=r(85985),o=r(74997),s=r(47143),i=r(48499);const a=(0,i.C)("ai-assistant-support"),c=(0,i.C)("ai-sidebar-toolbar-button");function l(){if(!(0,o.getBlockType)("jetpack/ai-assistant"))return!1;if(!a)return!1;if(!(0,n.xI)())return!1;return!((0,s.select)("core/edit-post")?.getHiddenBlockTypes?.()??[]).includes("jetpack/ai-assistant")}},4647(e,t,r){"use strict";r.d(t,{P:()=>o});var n=r(96865);const o=e=>{const t=(0,n._G)().filter(e=>"core/image"===e.name);let r=0;return e=(e=e.replace(/<figcaption[^>]*>.*?<\/figcaption>/g,"")).replace(/<!-- wp:image[^>]*>.*?<img[^>]*>.*?<!-- \/wp:image -->/gs,()=>{const e=t[r];return r++,e?`<img src="${e.clientId}">`:""})}},52998(e,t,r){"use strict";r.d(t,{mt:()=>i});var n=r(96865),o=r(74997),s=r(47143);class i{clientId;renderRules=[];firstUpdate=!0;behavior="dropdown";isChildBlock=!1;feature="ai-assistant";adjustPosition=!0;startOpen=!1;hideOnBlockFocus=!0;supports={};constructor(e,t=[]){this.clientId=e,this.renderRules=t}getBlock(){const{getBlock:e}=(0,s.select)("core/block-editor");return e(this.clientId)}getContent(){const e=this.getBlock();return t=(0,o.getBlockContent)(e),(0,n.rh)({content:t});var t}renderContent(e){return function(e,t=[]){return(0,n._E)({content:e,rules:t,extension:!0})}(e,this.renderRules)}onSuggestion(e){if(!e)return;const t=this.renderContent(e);this.replaceBlockContent(t)}onDone(e){this.firstUpdate=!0}replaceBlockContent(e){const[t]=(0,o.rawHandler)({HTML:e});if(!t)return;const{updateBlockAttributes:r,replaceInnerBlocks:n,__unstableMarkNextChangeAsNotPersistent:i}=(0,s.dispatch)("core/block-editor");this.firstUpdate?this.firstUpdate=!1:i(),r(this.clientId,t.attributes),i(),n(this.clientId,t.innerBlocks)}getExtensionInputPlaceholder(){return null}}},96306(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(96865),o=r(85985),s=r(86087),i=r(27723),a=r(13022),c=(r(49882),r(10790));const __=i.__,l=(0,a.A)("jetpack-ai-assistant-extension-ai-input","wp-block");function u({customPlaceholder:e,className:t,requestingState:r,requestingError:i,inputRef:u,wrapperRef:d,action:p,blockType:h,feature:m,request:g,stopSuggestion:f,close:b,undo:v,tryAgain:y,lastAction:k}){const w=e||__("Ask Jetpack AI to edit…","jetpack"),[_,x]=(0,s.useState)(""),[j,C]=(0,s.useState)(w),{checkoutUrl:A}=(0,n.ON)(),{tracks:S}=(0,o.st)(),[E,T]=(0,s.useState)(0),[N,P]=(0,s.useState)(!1),{requireUpgrade:B,requestsCount:R,requestsLimit:I,loading:D,nextTier:L,currentTier:F}=(0,n.yM)(),M=(0,s.useMemo)(()=>B||["requesting","suggesting"].includes(r),[B,r]),O=(0,s.useMemo)(()=>B&&1===F?.value,[B,F]),U=(0,s.useCallback)(()=>{S.recordEvent("jetpack_ai_assistant_extension_generate",{block_type:h,feature:m}),g?.(_)},[h,m,g,S,_]),z=(0,s.useCallback)(()=>{S.recordEvent("jetpack_ai_assistant_extension_stop",{block_type:h}),C(w),f?.()},[h,w,f,S]);const $=(0,s.useCallback)(()=>{S.recordEvent("jetpack_ai_assistant_undo",{block_type:h,prompt:k||null}),v?.()},[h,k,S,v]),q=(0,s.useCallback)(()=>{S.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:F?.slug,requests_count:R,placement:"jetpack_ai_assistant_extension"})},[F?.slug,R,S]),H=(0,s.useCallback)(()=>{S.recordEvent("jetpack_ai_assistant_try_again",{block_type:h}),y?.()},[h,S,y]);return(0,s.useEffect)(()=>{["init","done"].includes(r)&&x("")},[r]),(0,s.useEffect)(()=>{C(p||w),p&&x("")},[p,w]),(0,s.useEffect)(()=>{P(!D&&!!L&&0===_.length)},[D,L,_]),(0,s.useEffect)(()=>{const e=Math.max(I-R,0);T(e)},[I,R]),(0,c.jsx)(n.FC,{className:(0,a.A)(l,t),placeholder:j,disabled:M,value:_,state:r,showGuideLine:!0,error:i,requestsRemaining:E,showUpgradeMessage:N,showFairUsageMessage:O,upgradeUrl:A,onChange:x,onSend:U,onStop:z,onClose:function(){b?.()},onUndo:$,onUpgrade:q,onTryAgain:H,wrapperRef:d,ref:u,lastAction:k,blockType:h})}},37931(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(85985),o=r(86087),s=r(27723),i=r(52068),a=r(76695),c=r(31124),l=r(21785),u=r(10790);const __=s.__;function d({blockType:e,onClose:t,onAskAiAssistant:r,onRequestSuggestion:n}){const{canTransformToAIAssistant:s,transformToAIAssistant:c,getSelectedBlockClientIds:l}=(0,a.A)(),d=(0,o.useCallback)(o=>{const i=l(),[a]=i,u=o?.options?.alwaysTransformToAIAssistant||!1;!(i.length<2)&&s({clientId:a,blockName:e})||u?c({request:o}):(o?n?.(o.promptType,o.options):r?.(),t?.())},[e,s,l,r,t,n,c]),[p]=l();return(0,u.jsx)(i.Ay,{blockType:e,clientId:p,onRequestSuggestion:(e,t)=>{d({promptType:e,options:t})},onAskAiAssistant:async()=>{d()},disabled:!1})}function p({behavior:e,blockType:t,label:r=__("AI Assistant","jetpack"),onAskAiAssistant:s,onRequestSuggestion:i}){const{tracks:a}=(0,n.st)(),p=(0,o.useContext)(l.B),h=(0,o.useCallback)(e=>{e&&a.recordEvent("jetpack_ai_assistant_extension_toolbar_menu_show",{block_type:t})},[t,a]),m=(0,o.useCallback)(()=>{a.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_prompt_show",{block_type:t}),s?.()},[t,s,a]),g=(0,o.useCallback)((e,r)=>{a.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:e,block_type:t}),i?.(e,r)},[t,i,a]);return(0,u.jsx)(c.A,{label:r,behavior:e,onAction:m,onDropdownToggle:h,renderContent:({onClose:e})=>(0,u.jsx)(d,{blockType:t,onClose:e,onAskAiAssistant:m,onRequestSuggestion:g}),behaviorContext:p})}},27571(e,t,r){"use strict";r.d(t,{L:()=>o,l:()=>n});const n=["jetpack/field-name","jetpack/field-number","jetpack/field-email","jetpack/field-text","jetpack/field-textarea","jetpack/field-time","jetpack/field-checkbox","jetpack/field-date","jetpack/field-telephone","jetpack/field-url","jetpack/field-checkbox-multiple","jetpack/field-radio","jetpack/field-select","jetpack/field-consent","jetpack/button"],o=["core/heading","core/paragraph","core/list-item","core/list","jetpack/contact-form",...n]},21785(e,t,r){"use strict";r.d(t,{B:()=>g,Q:()=>f});var n=r(86087),o=r(10067),s=r.n(o),i=r(52998),a=r(27571),c=r(50161),l=r(22352),u=r(53269),d=r(94987),p=r(125);const h=s()("jetpack-ai-assistant:extensions:get-block-handler"),m={"core/heading":c.T,"core/paragraph":p.d,"core/list-item":d.g,"core/list":u.b,"jetpack/contact-form":l.p,...a.l.reduce((e,t)=>({...e,[t]:l.g}),{})},g=(0,n.createContext)({});function f(e,t){let r=m[e];r||(h(`No handler found for block type: ${e}. Using default handler.`),r=i.mt);const n=new r(t);return{onSuggestion:n.onSuggestion.bind(n),onDone:n.onDone.bind(n),getContent:n.getContent.bind(n),getExtensionInputPlaceholder:n.getExtensionInputPlaceholder.bind(n),behavior:n.behavior,isChildBlock:n.isChildBlock,feature:n.feature,adjustPosition:n.adjustPosition,startOpen:n.startOpen,hideOnBlockFocus:n.hideOnBlockFocus,supports:n.supports}}},50161(e,t,r){"use strict";r.d(t,{T:()=>o});var n=r(52998);class o extends n.mt{constructor(e){super(e,[])}onSuggestion(e){const t=this.getBlock();if(e.startsWith("#")||(e=`${"#".repeat(t?.attributes?.level||1)} ${e}`),e.match(/^#*\s*$/))return;const r=this.renderContent(e);this.replaceBlockContent(r)}}},8663(e,t,r){"use strict";r.d(t,{g:()=>s});var n=r(47143),o=r(52998);class s extends o.mt{jetpackFormBlockName="jetpack/contact-form";constructor(e){super(e,[]),this.behavior=this.handleBehavior,this.isChildBlock=!0,this.hideOnBlockFocus=!1}handleBehavior=({context:e})=>{const t=(0,n.dispatch)("core/block-editor"),{getBlockParentsByBlockName:r}=(0,n.select)("core/block-editor"),o=r(this.clientId,this.jetpackFormBlockName)?.[0];t.selectBlock(o),e?.[this.jetpackFormBlockName]?.handleAskAiAssistant?.()}}},22352(e,t,r){"use strict";r.d(t,{g:()=>l.g,p:()=>u});var n=r(74997),o=r(47143),s=r(27723),i=r(62514),a=r(96568),c=r(52998),l=r(8663);const __=s.__;class u extends c.mt{currentListOfValidBlocks=[];originalVariationName=null;constructor(e){super(e,[]),this.behavior="action",this.feature="jetpack-form-ai-extension",this.startOpen=!0,this.hideOnBlockFocus=!1,this.adjustPosition=!1,this.supports={file_upload_field:1}}setContent(e,t=!1){const{replaceInnerBlocks:r,updateBlockAttributes:s}=(0,o.dispatch)("core/block-editor"),c=(0,n.parse)(e).find(e=>"jetpack/contact-form"===e.name);c&&c.attributes?.variationName&&(this.originalVariationName=c.attributes.variationName);const l=e.replace(/<!-- (\/)*wp:jetpack\/(contact-)*form ({[^}]*} )*(\/)*-->/g,""),u=(0,a.d)(l),d=(0,n.parse)(u).filter(e=>e.isValid&&!["core/freeform","core/missing","core/html"].includes(e.name));let p=!1;if(d.length<this.currentListOfValidBlocks.length)d.push(this.currentListOfValidBlocks[this.currentListOfValidBlocks.length-1]);else if(d.length===this.currentListOfValidBlocks.length&&d.length>0){const e=d[d.length-1],t=this.currentListOfValidBlocks[d.length-1];p=!(0,i.w)(e,t)}if(d.length>0&&(d.length!==this.currentListOfValidBlocks.length||p)&&(r(this.clientId,d),this.currentListOfValidBlocks=d),t){if(this.originalVariationName){const e=this.getBlock();e&&e.attributes.variationName!==this.originalVariationName&&s(this.clientId,{variationName:this.originalVariationName})}const e=e=>"jetpack/button"===e.name||"core/button"===e.name&&"button"===e.attributes?.tagName,t=d.filter(e),o=d.some(e=>"jetpack/form-step-navigation"===e.name);if(this.currentListOfValidBlocks=this.currentListOfValidBlocks||[],t.length>1){let n=0;this.currentListOfValidBlocks=this.currentListOfValidBlocks.filter(r=>!e(r)||(n++,n===t.length)),r(this.clientId,this.currentListOfValidBlocks)}else 0!==t.length||o||r(this.clientId,[...this.currentListOfValidBlocks,(0,n.createBlock)("core/button",{tagName:"button",type:"submit",text:__("Submit","jetpack"),lock:{remove:!0}})]);this.currentListOfValidBlocks=[]}}getExtensionInputPlaceholder(){if(!this.getContent()){const e=[__("Example: a contact form with name, email, and message fields","jetpack"),__("Example: a pizza ordering form with name, address, phone number and toppings","jetpack"),__("Example: a survey form with multiple choice questions","jetpack")];return e[Math.floor(Math.random()*e.length)]}const e=[__("Example: remove email field","jetpack"),__("Example: make email optional","jetpack"),__("Example: add message field and make it required","jetpack")];return e[Math.floor(Math.random()*e.length)]}getContent(){const e=this.getBlock();if(!e)return"";const{innerBlocks:t}=e;return t?.length?t.reduce((e,t)=>e+(0,n.serialize)(t)+"\n\n",""):""}onSuggestion(e){this.setContent(e)}onDone(e){this.setContent(e,!0)}}},71295(e,t,r){"use strict";r.d(t,{j:()=>s});var n=r(10821),o=r(27571);function s(e){return!!(0,n.Bi)()&&!!o.L.includes(e)}},94987(e,t,r){"use strict";r.d(t,{g:()=>o});var n=r(52998);class o extends n.mt{constructor(e){super(e,["listItem"]),this.isChildBlock=!0}}},53269(e,t,r){"use strict";r.d(t,{b:()=>o});var n=r(52998);class o extends n.mt{constructor(e){super(e,["list"])}}},125(e,t,r){"use strict";r.d(t,{d:()=>a});var n=r(96865),o=r(74997),s=r(52998);const i=new n.OO({fixes:["paragraph"]});class a extends s.mt{constructor(e){super(e,["paragraph"])}getContent(){const e=this.getBlock();return t=(0,o.getBlockContent)(e),i.render({content:t});var t}}},50797(e,t,r){"use strict";var n=r(96865),o=r(85985),s=r(94715),i=r(29491),a=r(47143),c=r(86087),l=r(52619),u=r(13022),d=r(10067),p=r.n(d),h=r(32735),m=r(35317),g=r(4e4),f=r(10821),b=r(96306),v=r(37931),y=r(21785),k=r(71295),w=r(10790);const _=p()("jetpack-ai-assistant:extensions:with-ai-extension"),x={"core/heading":"heading","core/paragraph":"paragraph","core/list-item":"list-item","core/list":"list","jetpack/contact-form":"form-ai"},j={group:"block"},C=(0,i.createHigherOrderComponent)(e=>{function t(t){const{clientId:r,isSelected:i,name:d,isSelectionEnabled:p}=t,m=(0,c.useRef)(null),k=(0,c.useRef)(0),C=(0,c.useRef)(null),A=(0,c.useRef)(""),S=(0,c.useRef)(null),E=(0,c.useRef)(document),T=(0,c.useRef)([]),[N,P]=(0,c.useState)(""),[B,R]=(0,c.useState)(null),I=(0,c.useRef)(null),D=(0,c.useRef)(null),L=(0,c.useRef)(null),F=(0,c.useRef)(null),{undo:M}=(0,a.useDispatch)("core/editor"),{postId:O}=(0,a.useSelect)(e=>{const{getCurrentPostId:t}=e("core/editor");return{postId:t()}},[]),{id:U,className:z}=(0,s.useBlockProps)({className:(0,u.A)({[d?.replace?.("/","-")]:!0})}),$=(0,a.useRegistry)(),{increaseRequestsCount:q,dequeueAsyncRequest:H,requireUpgrade:V}=(0,n.yM)(),{snapToBottom:G,enableAutoScroll:W,disableAutoScroll:Z}=(0,h.A)({current:E?.current?.getElementById(U)},void 0,!0),J=(0,c.useCallback)(()=>{S.current?.focus()},[]),{tracks:K}=(0,o.st)(),{onSuggestion:Y,onDone:Q,getContent:X,getExtensionInputPlaceholder:ee,behavior:te,isChildBlock:re,feature:ne,adjustPosition:oe,startOpen:se,hideOnBlockFocus:ie,supports:ae}=(0,c.useMemo)(()=>(0,y.Q)(d,r),[d,r]),ce=ee(),[le,ue]=(0,c.useState)(se),de=(0,c.useCallback)(()=>{ue(e=>!e)},[]),pe=(0,c.useCallback)(({promptType:e,options:t})=>{const r=X(),n=x[d];return[...T.current,{role:"jetpack-ai",context:{type:(0,g.p$)(e,n),content:r,request:t?.userPrompt,tone:t?.tone,language:t?.language,is_follow_up:T.current.length>0,supports:ae}}]},[d,X,ae]),he=(0,c.useCallback)(e=>{const t=e||E.current.getElementById(U);t&&m.current&&t.style.setProperty("padding-bottom",`calc(${k.current+16}px + ${A.current||"0px"} )`,"important")},[U]),me=(0,c.useCallback)(e=>{Y(e),oe&&he(),G()},[Y,oe,G,he]),ge=(0,c.useCallback)((e,t)=>{if(Z(),Q(e),q(),P(""),K.recordEvent("jetpack_ai_assistant_toolbar_extension_generate",{prompt_type:I.current,model:t,generation_time:null!==F.current?window?.performance?.now?.()-F.current:null}),D.current?.message){const e={role:"assistant",content:X()};if(T.current.push(D.current.message,e),T.current.length>20){T.current.splice(0,T.current.length-20);const e=T.current.findIndex(e=>"jetpack-ai"===e.role);-1!==e&&(T.current=T.current.slice(e),T.current[0].context={...T.current[0].context,is_follow_up:!1})}}D.current=null,setTimeout(()=>{oe&&he(),J()},100),(0,l.doAction)("jetpack_ai_assistant_generation_complete",r,d)},[Z,Q,q,X,oe,J,he,K,I,r,d]),fe=(0,c.useCallback)(e=>{Z(),P(""),_("Request error",e),e.code!==n.mA&&e.code!==n.Or&&q()},[Z,q]),{request:be,stopSuggestion:ve,requestingState:ye,model:ke,error:we,reset:_e}=(0,n.o2)({onSuggestion:me,onDone:ge,onError:fe,askQuestionOptions:{postId:O,feature:ne}});(0,c.useEffect)(()=>{L.current=ye},[ye]);const xe=(0,c.useCallback)((e,t)=>{if(ue(!0),V)return;I.current=e;const r=(0,n.MB)(e,t);r&&(P(r),R(r));const o=pe({promptType:e,options:t});_("Request suggestion",e,t);const s=o[o.length-1];D.current={promptType:e,options:t,humanText:r,message:s},H(),W(),F.current=window?.performance?.now?.()||null,be(o)},[H,W,pe,be,V]),je=(0,c.useCallback)(e=>{const t={userPrompt:e};R(e),W(),xe("userPrompt",t)},[W,xe]),Ce=(0,c.useCallback)(()=>{Z(),ve(),J()},[Z,ve,J]),Ae=(0,c.useCallback)(()=>{D.current&&xe(D.current.promptType,D.current.options)},[D,xe]),Se=(0,c.useCallback)(()=>{ue(!1),_e(),P(""),D.current=null,T.current=[]},[_e]),Ee=(0,c.useCallback)(async()=>{K.recordEvent("jetpack_ai_assistant_toolbar_extension_undo",{prompt_type:I.current,model:ke}),await M(),Se()},[M,Se,K,ke,I]);(0,c.useEffect)(()=>{i||Se()},[i,Se]),(0,c.useEffect)(()=>{S.current&&p&&(E.current=S.current.ownerDocument,J())},[le,J,p]),(0,c.useEffect)(()=>{const e=m.current;if(oe||!e||!i)return;const t=$.select(s.store),{wasBlockJustInserted:n}=t;if(!n(r)||0===t.getBlockCount(r))return;const o=e.ownerDocument.getElementById(U),a=e.ownerDocument.defaultView;if(!o||!a)return;const c=e.getBoundingClientRect();if(o.getBoundingClientRect().bottom<=c.top)return;const l=()=>{const{bottom:t}=a.getComputedStyle(e),r=e.style.position,n=e.style.scrollMarginBottom;e.style.position="static",e.style.scrollMarginBottom=t,e.scrollIntoView({block:"end"}),e.style.position=r,e.style.scrollMarginBottom=n};l(),a.requestAnimationFrame(l)},[]),(0,c.useEffect)(()=>{let e=E.current.getElementById(U);if(e&&oe)return le&&!C.current&&m.current?(A.current=e.style.paddingBottom,C.current=new ResizeObserver(([t])=>{if(e=E.current.getElementById(U),k.current=t.contentRect.height,e&&m.current&&k.current>0){he(e);const{marginBottom:t}=getComputedStyle(e),r=parseFloat(t);m.current.style.setProperty("margin-top",`-${k.current+r}px`,"important"),m.current.style.setProperty("margin-bottom",`${r+16}px`,"important")}}),C.current.observe(m.current)):C.current&&(e.style.paddingBottom=A.current,C.current.disconnect(),C.current=null,k.current=0),()=>{C.current&&C.current.disconnect()}},[he,oe,r,C,U,le]),(0,c.useEffect)(()=>{if(ie&&le){const e=E.current.getElementById(U),t=()=>{["requesting","suggesting"].includes(L.current)||(ue(!1),e?.removeEventListener("focusin",t))};return e?.addEventListener("focusin",t),()=>{e?.removeEventListener("focusin",t)}}},[ie,le,U]);const Te=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(e,{...t}),le&&(0,w.jsx)(b.A,{customPlaceholder:ce||null,className:z,requestingState:ye,requestingError:we,wrapperRef:m,inputRef:S,action:N,blockType:d,feature:ne,request:je,stopSuggestion:Ce,close:Se,undo:Ee,tryAgain:Ae,lastAction:B}),!f.TL&&(0,w.jsx)(s.BlockControls,{...j,children:(0,w.jsx)(v.A,{blockType:d,onAskAiAssistant:de,onRequestSuggestion:xe,behavior:te})})]});if(re)return Te;const Ne={value:{[d]:{handleAskAiAssistant:de,handleRequestSuggestion:xe}}};return(0,w.jsx)(y.B.Provider,{...Ne,children:Te})}return r=>{const n=(0,m.A)(r.name);return r.clientId&&r.attributes&&n?(0,w.jsx)(t,{...r}):(0,w.jsx)(e,{...r})}},"blockEditWithAiComponents");(0,l.addFilter)("blocks.registerBlockType","jetpack/ai-assistant-support/with-ai-text-extension",function(e,t){return(0,k.j)(t)?{...e,edit:C(e.edit),supports:{...e.supports,"jetpack/ai":{assistant:!0}}}:e},100)},89872(e,t,r){"use strict";r.d(t,{Q:()=>o,X:()=>n});const n="images-alt-text",o="images-caption"},4393(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r(96865),o=r(47143),s=r(86087),i=r(10067),a=r.n(i),c=r(62402),l=r(64425),u=r(16597),d=r(32735);const p=a()("jetpack-ai-assistant:error"),h=({attributes:e,clientId:t,content:r,tracks:i,userPrompt:a,onSuggestionDone:h,onUnclearPrompt:m,onModeration:g,requireUpgrade:f,initialRequestingState:b,contentRef:v,blockRef:y})=>{const[k,w]=(0,s.useState)(!1),[_,x]=(0,s.useState)(""),{updateBlockAttributes:j}=(0,o.useDispatch)("core/block-editor"),{dequeueAiAssistantFeatureAsyncRequest:C,setAiAssistantFeatureRequireUpgrade:A}=(0,o.useDispatch)("wordpress-com/plans"),{snapToBottom:S,enableAutoScroll:E,disableAutoScroll:T}=(0,d.A)(y,v),N=(0,o.useSelect)(e=>e("core/editor").getEditedPostAttribute("title")),P=(0,o.useSelect)(e=>e("core/editor").getCurrentPostId()),B=(0,s.useRef)([]),R=(0,s.useRef)(void 0),{request:I,stopSuggestion:D,handleErrorQuotaExceededError:L,requestingState:F,error:M}=(0,n.o2)({onSuggestion:e=>{j(t,{content:e?.replaceAll(l.uV,"")}),S()},onDone:e=>{const r=e.replaceAll(l.uV,""),n={role:"assistant",content:r};B.current.push(R.current,n),B.current.length>20&&B.current.splice(0,B.current.length-20),j(t,{content:r,messages:B.current}),S(),T(),h?.()},onStop:()=>{S(),T(),h?.()},onError:e=>{switch(e?.code){case n.cT:w(!1);break;case n.ud:w(!1),g?.();break;case n.mA:case n.AZ:w(!0);break;case n.Or:w(!1),A(!0);break;case n.L9:m?.()}},onAllErrors:e=>{p(e)},initialRequestingState:b,askQuestionOptions:{postId:P,feature:"ai-assistant",functions:{}}}),O=["requesting","suggesting"].includes(F),U=async(o,s={})=>{if(C(),f)return L(),void w(!1);if(s={retryRequest:!1,tone:c.US,...s},O)return;w(!1);let d=_;if(i.recordEvent("jetpack_ai_chat_completion",{post_id:P}),B.current=[...e.messages],R.current={},s.retryRequest)R.current=d[d.length-1];else{const i=e?.isLayoutBuldingModeEnable?(0,u.rJ)(t):(0,u.aB)();d=(0,l.jf)({generatedContent:r,allPostContent:i,postContentAbove:(0,u.b$)(t),currentPostTitle:N,options:s,userPrompt:s?.userPrompt||a,type:o,isGeneratingTitle:e.promptType===n.vE}),R.current=d.pop(),d=[...d,...B.current],d.push(R.current),x(d),e.promptType!==n.vE&&j(t,{promptType:o})}try{E(),await I(d)}catch(e){p(e),w(!0),T()}};return{setShowRetry:w,showRetry:k,postTitle:N,contentBefore:(0,u.b$)(t),wholeContent:(0,u.aB)(),requestingState:F,error:M,getSuggestionFromOpenAI:U,stopSuggestion:D,retryRequest:()=>U("",{retryRequest:!0})}}},44732(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(3924),o=r(97999),s=r(85985);function i(){const e=(0,s.Mm)()&&!(0,o.isSimpleSite)(),t=e?(0,o.getMyJetpackUrl)("#/jetpack-ai"):(0,n.A)("org-ai"),{autosaveAndRedirect:r,isRedirecting:i}=(0,s.ZR)(t);return{productPageUrl:t,autosaveAndRedirect:r,isRedirecting:i,isMyJetpackAvailable:e}}},75956(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(90372),o=r(86087);const s=window?.Jetpack_Editor_Initial_State?.tracksUserData||null,i=parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0,a=()=>((0,o.useEffect)(()=>{s&&n.A.initialize(s?.userid,s?.username,i?{blog_id:i}:{})},[]),n.A)},32735(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(86087),o=r(10067);const s=r.n(o)()("jetpack-ai-assistant:use-auto-scroll"),i=(e,t,r=!1)=>{const o=(0,n.useRef)(null),i=(0,n.useRef)(null),a=(0,n.useRef)(!1),c=(0,n.useRef)(!1),l=(0,n.useRef)(!1),u=(0,n.useRef)(!1),d=(0,n.useRef)({scrollPadding:"",scrollMargin:""}),p=(0,n.useCallback)(()=>{s("enabling ignore scroll"),c.current=!0},[]),h=(0,n.useCallback)(()=>{a.current&&l.current&&!c.current&&p()},[p]),m=(0,n.useCallback)(()=>{a.current=!0,c.current=!1,l.current=!1,u.current=!1,o.current?.addEventListener("scroll",h),s("enabling auto scroll")},[h]),g=(0,n.useCallback)(()=>{a.current=!1,c.current=!1,l.current=!1,u.current=!1,o.current?.removeEventListener("scroll",h),i.current?.style&&(i.current.style.scrollPadding=d.current.scrollPadding,i.current.style.scrollMargin=d.current.scrollMargin),o.current=null,s("disabling auto scroll")},[h]),f=(0,n.useCallback)(()=>{if(!a.current||c.current)return;const n=r?e?.current:t?.current?.firstElementChild?.lastElementChild;n&&!u.current&&(l.current=!0,u.current=!0,o?.current?.removeEventListener?.("scroll",h),n?.scrollIntoView({block:"end",inline:"end"}),setTimeout(()=>{u.current=!1,o?.current?.addEventListener?.("scroll",h)},200))},[e,t,r,h]),b=(0,n.useCallback)(e=>{if(null==e)return null;if("BODY"===e?.nodeName)return e;if(e?.ownerDocument!==document)return e.ownerDocument;const{overflow:t}=window.getComputedStyle(e);return t.split(" ").every(e=>"auto"===e||"scroll"===e)?e:e?.parentElement?b(e?.parentElement):e},[]);return(0,n.useEffect)(()=>{const t=b(e?.current?.parentElement);!o.current&&t&&(o.current=t,i.current=t instanceof HTMLElement?t:t.documentElement,d.current={scrollPadding:i.current.style.scrollPadding,scrollMargin:i.current.style.scrollMargin},a.current&&(i.current.style.scrollPadding="80px",i.current.style.scrollMargin="10px"))},[e,b]),{snapToBottom:f,enableAutoScroll:m,disableAutoScroll:g}}},35317(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(85985);const o={"jetpack/contact-form":"contact-form"};function s(e){const t=o[e],{isModuleActive:r}=(0,n.q7)(t);return!t||r}},76695(e,t,r){"use strict";r.d(t,{A:()=>l,y:()=>c});var n=r(85985),o=r(47143),s=r(51609),i=r(16597),a=r(13802);function c(e){return`ai-assistant-block-${e}`}const l=()=>{const{replaceBlock:e,removeBlocks:t}=(0,o.useDispatch)("core/block-editor"),r=(0,o.useSelect)(e=>e("core/block-editor"),[]),{getSelectedBlockClientIds:l,getBlocksByClientId:u,getBlock:d,getBlockParents:p}=r,{tracks:h}=(0,n.st)();return{canTransformToAIAssistant:(0,s.useCallback)(({clientId:e,blockName:t})=>{if(!d(e))return!1;if(!a.y7.includes(t))return!1;const r=p(e);if(0===r.length)return!0;const n=d(r[r.length-1]);return!["core/list","core/list-item"].includes(n.name)},[d,p]),transformToAIAssistant:(0,s.useCallback)(({request:r}={})=>{const n=l(),o=u(n),s=(0,i.Sb)(o),[d]=o,[p,...m]=n,g={...d?.attributes||{},content:s,preTransformAction:r?.promptType},f=(0,a.rr)(d.name,g);if(r?.promptType){h.recordEvent("jetpack_editor_ai_assistant_extension_toolbar_button_click",{suggestion:r.promptType,block_type:d.name});const e={clientId:p,type:r.promptType,options:{...r.options,contentType:"generated",fromExtension:!0}};localStorage.setItem(c(f.clientId),JSON.stringify(e))}else h.recordEvent("jetpack_ai_assistant_prompt_show",{block_type:d.name});e(p,f),t(m)},[u,l,t,e,h]),getSelectedBlockClientIds:l}}},4e4(e,t,r){"use strict";r.d(t,{J1:()=>o,K6:()=>s,p$:()=>a});var n=r(96865);function o(e){return{role:"jetpack-ai",context:{type:"ai-assistant-initial-prompt",for:a(e)}}}function s({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:o,options:s,type:a,userPrompt:c,isGeneratingTitle:l}){const u=[],d="generated"===s?.contentType;let p=null;switch(a){case n.im:p=o;break;case n.sn:case n.A4:case n.yy:p=r;break;case n.vE:p=t;break;case n.br:case n.fD:p=e;break;case n.eJ:case n.UA:case n.Gm:p=d?e:t;break;case n.d5:p=r;break;case n.pE:p=e||t}const h=function(e,t){return!e&&t&&t.length>0?{role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:t}}:null}(a===n.pE?!!e?.length:d,p);return h&&u.push(h),u.push({role:"jetpack-ai",context:i({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:o,options:s,type:a,userPrompt:c,isGeneratingTitle:l})}),u}function i({options:e,type:t,userPrompt:r,isGeneratingTitle:o}){const s=function(e,t,r){return e?"title":!t||r?"content":null}(o,"generated"===e?.contentType,e?.fromExtension||!1);return{type:a(t),...s?{subject:s}:{},...t===n.eJ&&e?.tone?{tone:e.tone}:{},...t===n.Gm&&e?.language?{language:e.language}:{},...t===n.pE&&r?{request:r}:{}}}function a(e,t){const r={[n.im]:"ai-assistant-summary-by-title",[n.sn]:"ai-assistant-continue-writing",[n.A4]:"ai-assistant-simplify",[n.yy]:"ai-assistant-correct-spelling",[n.vE]:"ai-assistant-generate-title",[n.br]:"ai-assistant-make-longer",[n.fD]:"ai-assistant-make-shorter",[n.eJ]:"ai-assistant-change-tone",[n.UA]:"ai-assistant-summarize",[n.Gm]:"ai-assistant-change-language",[n.pE]:"ai-assistant-user-prompt",[n.d5]:"ai-assistant-transform-list-to-table"};return"form-ai"===t?"form-ai-extension":t?`${r[e]}-${t}-extension`:r[e]}},64425(e,t,r){"use strict";r.d(t,{jf:()=>s,uV:()=>o});r(96865);var n=r(4e4);const o="````";function s({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:o,options:s,type:i,userPrompt:a,isGeneratingTitle:c}){return[(0,n.J1)(i),...(0,n.K6)({generatedContent:e,allPostContent:t,postContentAbove:r,currentPostTitle:o,options:s,type:i,userPrompt:a,isGeneratingTitle:c})]}},16597(e,t,r){"use strict";r.d(t,{Sb:()=>c,aB:()=>a,b$:()=>i,rJ:()=>l});var n=r(96865),o=r(74997),s=r(47143);function i(e){if(!e)return"";const t=(0,s.select)("core/block-editor"),r=t.getBlockIndex(e),i=t.getBlocks().slice(0,r)??[];return i?.length?(0,n.rh)({content:(0,o.serialize)(i)}):""}function a(){const e=(0,s.select)("core/block-editor").getBlocks();return e?.length?(0,n.rh)({content:(0,o.serialize)(e)}):""}function c(e){return e.filter(e=>null!=e).map(e=>(0,o.getBlockContent)(e)).join("\n\n")}function l(e){const t=(0,s.select)("core/block-editor").getBlock(e);return t?.innerBlocks?.length?c(t.innerBlocks):""}},62514(e,t,r){"use strict";r.d(t,{w:()=>s});const n=e=>{delete e.clientId;for(const t of e.innerBlocks??[])n(t);return e},o=e=>n((e=>JSON.parse(JSON.stringify(e)))(e));function s(e,t){const r=o(e),n=o(t);return JSON.stringify(r)===JSON.stringify(n)}},96568(e,t,r){"use strict";function n(e){const t=document.createElement("div");return t.innerHTML=e,t.innerHTML}r.d(t,{d:()=>n})},48499(e,t,r){"use strict";r.d(t,{C:()=>o});var n=r(85985);function o(e){return!0===(0,n.FB)(e).available}},13802(e,t,r){"use strict";r.d(t,{Ay:()=>l,rr:()=>c,y7:()=>i});var n=r(96865),o=r(74997),s=r(54681);const i=["core/heading","core/paragraph","core/list"],a=[];function c(e,t){const{content:r,...i}=t;let a=r;"core/heading"===e&&t?.level&&(a=a.replace(/<(\/?)h\d([^>]*)>/g,`<$1h${t.level}$2>`));const c=(0,n.rh)({content:a}),l=[];return l.push({role:"jetpack-ai",context:{type:"ai-assistant-relevant-content",content:c}}),(0,o.createBlock)(s.name,{...i,content:c,originalContent:c,messages:l,originalMessages:l})}for(const e of i)a.push({type:"block",blocks:[e],isMatch:()=>i.includes(e),transform:(t,r)=>{const n=(0,o.getSaveContent)(e,t,r);return c(e,{...t,content:n})}});const l={from:a}},98765(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(56427),o=r(86087),s=r(27723),i=r(13022),a=r(66087),c=r(10790);const __=s.__,l="09:00",u="17:00";class d extends o.Component{renderInterval=(e,t)=>{const{day:r}=this.props,{opening:s,closing:a}=e;return(0,c.jsxs)(o.Fragment,{children:[(0,c.jsxs)("div",{className:"business-hours__row",children:[(0,c.jsx)("div",{className:(0,i.A)(r.name,"business-hours__day"),children:0===t&&this.renderDayToggle()}),(0,c.jsxs)("div",{className:(0,i.A)(r.name,"business-hours__hours"),children:[(0,c.jsx)(n.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Opening","jetpack"),value:s,className:"business-hours__open",placeholder:l,onChange:e=>{this.setHour(e,"opening",t)}}),(0,c.jsx)(n.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,type:"time",label:__("Closing","jetpack"),value:a,className:"business-hours__close",placeholder:u,onChange:e=>{this.setHour(e,"closing",t)}})]}),(0,c.jsx)("div",{className:"business-hours__remove",children:r.hours.length>1&&(0,c.jsx)(n.Button,{isSmall:!0,variant:"link",icon:"trash",label:__("Remove Hours","jetpack"),onClick:()=>{this.removeInterval(t)}})})]}),t===r.hours.length-1&&(0,c.jsxs)("div",{className:"business-hours__row business-hours-row__add",children:[(0,c.jsx)("div",{className:(0,i.A)(r.name,"business-hours__day"),children:" "}),(0,c.jsx)("div",{className:(0,i.A)(r.name,"business-hours__hours"),children:(0,c.jsx)(n.Button,{variant:"link",label:__("Add Hours","jetpack"),onClick:this.addInterval,children:__("Add Hours","jetpack")})}),(0,c.jsx)("div",{className:"business-hours__remove",children:" "})]})]},t)};setHour=(e,t,r)=>{const{day:n,attributes:o,setAttributes:s}=this.props,{days:i}=o;s({days:i.map(o=>o.name===n.name?{...o,hours:o.hours.map((n,o)=>o===r?{...n,[t]:e}:n)}:o)})};toggleClosed=e=>{const{day:t,attributes:r,setAttributes:n}=this.props,{days:o}=r;n({days:o.map(r=>{if(r.name===t.name){const t=e?[{opening:l,closing:u}]:[];return{...r,hours:t}}return r})})};addInterval=()=>{const{day:e,attributes:t,setAttributes:r}=this.props,{days:n}=t;e.hours.push({opening:"",closing:""}),r({days:n.map(t=>t.name===e.name?{...t,hours:e.hours}:t)})};removeInterval=e=>{const{day:t,attributes:r,setAttributes:n}=this.props,{days:o}=r;n({days:o.map(r=>t.name===r.name?{...r,hours:r.hours.filter((t,r)=>e!==r)}:r)})};isClosed(){const{day:e}=this.props;return(0,a.isEmpty)(e.hours)}renderDayToggle(){const{day:e,localization:t}=this.props;return(0,c.jsxs)(o.Fragment,{children:[(0,c.jsx)("span",{className:"business-hours__day-name",children:t.days[e.name]}),(0,c.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:this.isClosed()?__("Closed","jetpack"):__("Open","jetpack"),checked:!this.isClosed(),onChange:this.toggleClosed})]})}renderClosed(){const{day:e}=this.props;return(0,c.jsxs)("div",{className:"business-hours__row business-hours-row__closed",children:[(0,c.jsx)("div",{className:(0,i.A)(e.name,"business-hours__day"),children:this.renderDayToggle()}),(0,c.jsx)("div",{className:(0,i.A)(e.name,"closed","business-hours__hours"),children:" "}),(0,c.jsx)("div",{className:"business-hours__remove",children:" "})]})}render(){const{day:e}=this.props;return this.isClosed()?this.renderClosed():e.hours.map(this.renderInterval)}}const p=d},32557(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(86087),o=r(27723),s=r(66087),i=r(10790);const _x=o._x,a="undefined"!=typeof window&&window.navigator?.language||"en",c=Intl?.DateTimeFormat?new Intl.DateTimeFormat(a,{hour:"numeric",minute:"numeric",hour12:!0}):null;class l extends n.Component{formatTime(e){const[t,r]=e.split(":");if(!t||!r)return!1;const n=new Date;return n.setHours(t),n.setMinutes(r),c?c.format(n):e}renderInterval=(e,t)=>{const{day:r}=this.props,n=r.hours;return(0,i.jsxs)("span",{children:[(0,o.sprintf)("%1$s - %2$s",this.formatTime(e.opening),this.formatTime(e.closing)),n.length>1+t&&(0,i.jsx)("span",{children:", "})]},t)};render(){const{day:e,localization:t}=this.props,r=e.hours.filter(e=>this.formatTime(e.opening)&&this.formatTime(e.closing));return(0,i.jsxs)("div",{className:"jetpack-business-hours__item",children:[(0,i.jsx)("dt",{className:e.name,children:t.days[e.name]}),(0,i.jsxs)("dd",{children:[(0,s.isEmpty)(r)?_x("Closed","business is closed on a full day","jetpack"):r.map(this.renderInterval),(0,i.jsx)("br",{})]})]})}}const u=l},52097(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r(85985),o=r(1455),s=r.n(o),i=r(94715),a=r(56427),c=r(38443),l=r(86087),u=r(27723),d=r(9050),p=r(98765),h=r(32557),m=r(10790);const __=u.__,g=(0,n.sh)(d),f={days:{Sun:__("Sunday","jetpack"),Mon:__("Monday","jetpack"),Tue:__("Tuesday","jetpack"),Wed:__("Wednesday","jetpack"),Thu:__("Thursday","jetpack"),Fri:__("Friday","jetpack"),Sat:__("Saturday","jetpack")},startOfWeek:0},b=e=>{const{attributes:t,isSelected:r}=e,n=(0,i.useBlockProps)(),[o,u]=(0,l.useState)(f),[d,b]=(0,l.useState)(!1),{days:v}=t,{startOfWeek:y}=o,k=v.concat(v.slice(0,y)).slice(y);let w;if((0,l.useEffect)(()=>{s()({path:"/wpcom/v2/business-hours/localized-week"}).then(e=>{u(e),b(!0)},()=>{u(f),b(!0)})},[]),d)if(r)w=(0,m.jsx)("div",{className:"is-edit",children:k.map((t,r)=>(0,m.jsx)(p.A,{day:t,localization:o,...e},r))});else{const e=(0,c.getSettings)(),{formats:{time:t}}=e;w=(0,m.jsx)("dl",{className:"jetpack-business-hours",children:k.map((e,r)=>(0,m.jsx)(h.A,{day:e,localization:o,timeFormat:t},r))})}else w=(0,m.jsx)(a.Placeholder,{icon:g,label:__("Loading business hours","jetpack")});return(0,m.jsx)("div",{...n,children:w})}},14990(e,t,r){"use strict";var n=r(94375),o=r(9050),s=r(52097),i=(r(18681),r(82805),r(10790));(0,n.M)(o,{edit:e=>(0,i.jsx)(s.A,{...e}),save:()=>null})},28310(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(98329);const o={element:{type:"string",enum:["a","button","input"]},saveInPostContent:{type:"boolean",default:!1},uniqueId:{type:"string"},passthroughAttributes:{type:"object"},text:{type:"string",role:"content"},placeholder:{type:"string",role:"content"},url:{type:"string",role:"content"},textColor:{type:"string"},customTextColor:{type:"string",validator:n.A},backgroundColor:{type:"string"},customBackgroundColor:{type:"string",validator:n.A},gradient:{type:"string"},customGradient:{type:"string"},borderRadius:{type:"number"},width:{type:"string"},customVariant:{type:"string"},metaName:{type:"string"}}},41695(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(56427),o=r(86087),s=r(27723),i=r(8746),a=r(10790);const __=s.__;function c({borderRadius:e="",setAttributes:t}){const r=(0,o.useCallback)(e=>t({borderRadius:e}),[t]);return(0,a.jsx)(n.PanelBody,{title:__("Border Settings","jetpack"),children:(0,a.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,allowReset:!0,initialPosition:i.hc,label:__("Border radius","jetpack"),max:i.Bs,min:i.rG,onChange:r,value:e})})}},42929(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(94715),o=r(27723),s=r(10790);const __=o.__;function i({isGradientAvailable:e,backgroundColor:t,fallbackBackgroundColor:r,fallbackTextColor:o,gradientValue:i,setBackgroundColor:a,setGradient:c,setTextColor:l,textColor:u}){const d=(0,s.jsx)(n.ContrastChecker,{backgroundColor:t.color,fallbackBackgroundColor:r,fallbackTextColor:o,isLargeText:!1,textColor:u.color});return e?(0,s.jsx)(n.__experimentalPanelColorGradientSettings,{settings:[{colorValue:u.color,label:__("Text Color","jetpack"),onColorChange:l},{colorValue:t.color,gradientValue:i,label:__("Background","jetpack"),onColorChange:a,onGradientChange:c}],title:__("Background & Text Color","jetpack"),children:d}):(0,s.jsx)(n.PanelColorSettings,{colorSettings:[{value:u.color,onChange:l,label:__("Text Color","jetpack")},{value:t.color,onChange:a,label:__("Background","jetpack")}],title:__("Background & Text Color","jetpack"),children:d})}},8746(e,t,r){"use strict";r.d(t,{Bs:()=>i,Uc:()=>o,hc:()=>s,rG:()=>a});var n=r(94715);const o=!!n.__experimentalUseGradient,s=5,i=50,a=0},57667(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(47143),o=r(68210),s=r(41695),i=r(42929),a=r(10790);function c({attributes:e,backgroundColor:t,clientId:r,context:c,fallbackBackgroundColor:l,fallbackTextColor:u,setAttributes:d,setBackgroundColor:p,setTextColor:h,textColor:m,gradientValue:g,setGradient:f,isGradientAvailable:b}){const{align:v,borderRadius:y}=e,k="jetpack/parentBlockWidth"in c,w=k?c["jetpack/parentBlockWidth"]:e.width,_=(0,n.useSelect)(e=>{const{getBlock:t,getBlockRootClientId:n}=e("core/block-editor");return t(n(r))}),{updateBlockAttributes:x}=(0,n.useDispatch)("core/block-editor");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.A,{backgroundColor:t,fallbackBackgroundColor:l,fallbackTextColor:u,gradientValue:g,setBackgroundColor:p,setGradient:f,setTextColor:h,textColor:m,isGradientAvailable:b}),(0,a.jsx)(s.A,{borderRadius:y,setAttributes:d}),(0,a.jsx)(o.D,{align:v,width:w,onChange:e=>{k?x(_.clientId,{width:e}):d({width:e})}})]})}},49061(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r(94715),o=r(29491),s=r(47143),i=r(86087),a=r(27723),c=r(13022),l=r(8746),u=r(57667),d=r(7528),p=r(81177),h=(r(28769),r(10790));const __=a.__;const m=(0,o.compose)((0,n.withColors)({backgroundColor:"background-color"},{textColor:"color"}))(function(e){const{attributes:t,backgroundColor:r,className:o,clientId:a,setAttributes:m,textColor:g}=e,{borderRadius:f,element:b,placeholder:v,text:y,width:k,fontSize:w,customVariant:_,metaName:x}=t;(0,p.A)({attributes:t,clientId:a,setAttributes:m});const{metadata:j}=(0,s.useSelect)(e=>{const{getBlockAttributes:t}=e(n.store);return{metadata:t(a)?.metadata}},[a]),{updateBlockAttributes:C,__unstableMarkNextChangeAsNotPersistent:A}=(0,s.useDispatch)("core/block-editor"),{gradientClass:S,gradientValue:E,setGradient:T}=l.Uc?(0,n.__experimentalUseGradient)({gradientAttribute:"gradient",customGradientAttribute:"customGradient"}):{},N=(0,n.useBlockProps)({className:(0,c.A)("wp-block-button",o),style:{width:k}}),[P,B]=(0,d.A)(),R=(0,n.__experimentalUseBorderProps)(t),I=(0,c.A)("wp-block-button__link",R.className,{"has-background":r.color||E,[r.class]:!E&&r.class,"has-text-color":g.color,[g.class]:g.class,[S]:S,"no-border-radius":0===f,[`has-${w}-font-size`]:!!w,"has-custom-font-size":!!w,[`is-${_}`]:!!_});(0,i.useEffect)(()=>{a&&x&&j?.name!==x&&(A(),C(a,{metadata:{...j,name:x}}))},[x,j,C,a,A]);const D={...!r.color&&E?{background:E}:{backgroundColor:r.color},fontSize:t.style?.typography?.fontSize,color:g.color,borderRadius:f?f+"px":void 0,...R.style};return(0,h.jsxs)("div",{...N,children:[(0,h.jsx)(n.RichText,{allowedFormats:"input"===b?[]:void 0,className:I,disableLineBreaks:"input"===b,onChange:e=>m({text:e}),placeholder:v||__("Add text…","jetpack"),ref:B,style:D,value:y,withoutInteractiveFormatting:!0}),(0,h.jsx)(n.InspectorControls,{children:(0,h.jsx)(u.A,{gradientValue:E,setGradient:T,isGradientAvailable:l.Uc,...P,...e})})]})})},45878(e,t,r){"use strict";var n=r(94375),o=r(5383);(0,n.A)(o.U,o.W)},61138(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=(0,o.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(n.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 13h8v-1.5H8V13z"})})},5383(e,t,r){"use strict";r.d(t,{U:()=>l,W:()=>u});var n=r(27723),o=r(97969),s=r(28310),i=r(49061),a=r(61138),c=r(62270);const __=n.__,l="button",u={apiVersion:3,title:__("Button","jetpack"),icon:a.A,category:(0,o.A)("design","layout"),keywords:[],supports:{html:!1,inserter:!1,align:["left","center","right"],typography:{fontSize:!0,__experimentalFontFamily:!0,__experimentalTextTransform:!0,__experimentalDefaultControls:{fontSize:!0}},__experimentalBorder:{color:!0,style:!0,width:!0,__experimentalSkipSerialization:!0,__experimentalDefaultControls:{color:!0,style:!0,width:!0}}},styles:[{name:"fill",label:__("Fill","jetpack"),isDefault:!0},{name:"outline",label:__("Outline","jetpack")}],selectors:{border:".wp-block-jetpack-button .wp-block-button__link"},attributes:s.A,edit:i.A,save:c.A,usesContext:["jetpack/parentBlockWidth"]}},62270(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(94715),o=r(13022),s=r(8746),i=r(10790);function a({attributes:e,blockName:t,uniqueId:r}){const{backgroundColor:a,borderRadius:c,className:l,customBackgroundColor:u,customGradient:d,customTextColor:p,gradient:h,saveInPostContent:m,text:g,textColor:f,url:b,width:v,fontSize:y}=e;if(!m)return null;const k=n.useBlockProps.save(),w=(0,n.__experimentalGetBorderClassesAndStyles)(e),_=(0,n.getColorClassName)("background-color",a),x=s.Uc?(0,n.__experimentalGetGradientClass)(h):void 0,j=(0,n.getColorClassName)("color",f),C=(0,o.A)("wp-block-button","jetpack-submit-button",l,k?.className,w.className,{[`wp-block-jetpack-${t}`]:t}),A=(0,o.A)("wp-block-button__link",{"has-text-color":f||p,[j]:j,"has-background":a||h||u||d,[_]:_,[x]:x,"no-border-radius":0===c,"has-custom-width":!!v,[`has-${y}-font-size`]:!!y,"has-custom-font-size":!!y}),S={background:d||void 0,backgroundColor:_||d||h?void 0:u,fontSize:e.style?.typography?.fontSize,color:j?void 0:p,borderRadius:c?c+"px":void 0,width:v,...w.style};return(0,i.jsx)("div",{...k,className:C,children:(0,i.jsx)(n.RichText.Content,{className:A,"data-id-attr":r||"placeholder",href:b,id:r,rel:"noopener noreferrer",role:"button",style:S,tagName:"a",target:"_blank",value:g})})}},7528(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(29491),o=r(86087);function s(){const[e,t]=(0,o.useState)(),r=(0,n.useRefEffect)(r=>{const n=()=>{const n=getComputedStyle(r),o=n.backgroundColor,s=n.color;o===e?.fallbackBackgroundColor&&s===e?.fallbackTextColor||t({fallbackBackgroundColor:o,fallbackTextColor:s})},o=new MutationObserver(n);return o.observe(r,{attributeFilter:["style","class"]}),n(),()=>{o.disconnect()}},[]);return[e,r]}},81177(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(47143),o=r(86087),s=r(66087);function i({attributes:e,clientId:t,setAttributes:r}){const{passthroughAttributes:i}=e,a=(0,n.useSelect)(r=>{const n=r("core/block-editor"),o=n.getBlockRootClientId(t),s=n.getBlockAttributes(o)||{};if(!o||!i)return{};let a=!1;const c={};return Object.entries(i).forEach(([t,r])=>{const n=s[r];n!==e[t]&&(a=!0,c[t]=n)}),a?c:{}},[t,i,e]);(0,o.useEffect)(()=>{(0,s.isEmpty)(a)||r(a)},[a,r])}},95816(e,t,r){"use strict";r.d(t,{a:()=>n});const n="https://calendly.com/wpcom/jetpack-block-example"},10137(e,t,r){"use strict";r.d(t,{Ay:()=>p});var n=r(97999),o=r(94715),s=r(56427),i=r(27723),a=r(57273),c=r(24971),l=r(10790);const __=i.__,_x=i._x,u=({onEditClick:e})=>(0,l.jsx)(s.ToolbarGroup,{children:(0,l.jsx)(s.ToolbarButton,{onClick:()=>e(!0),children:__("Edit","jetpack")})}),d=e=>{const{attributes:{hideEventTypeDetails:t,url:r},defaultClassName:o,embedCode:i,parseEmbedCode:c,setAttributes:u,setEmbedCode:d}=e;let p=null;return r&&(p=(0,n.isWpcomPlatformSite)()?"https://wordpress.com/support/wordpress-editor/blocks/calendly-block/#customize-the-calendly-block":"https://jetpack.com/support/jetpack-blocks/calendly-block/#customizing-a-calendly-block"),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(s.PanelBody,{PanelBody:!0,title:__("Calendar settings","jetpack"),initialOpen:!1,children:[(0,l.jsxs)("form",{onSubmit:c,className:`${o}-embed-form-sidebar`,children:[(0,l.jsx)("input",{type:"text",id:"embedCode",onChange:e=>d(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:i||"",className:"components-placeholder__input"}),(0,l.jsx)("div",{children:(0,l.jsx)(s.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})})]}),(0,l.jsx)(s.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Hide event type details","jetpack"),checked:t,onChange:()=>u({hideEventTypeDetails:!t})})]}),p&&(0,l.jsx)(s.Notice,{className:`${o}-color-notice`,isDismissible:!1,children:(0,l.jsx)(a.N,{openInNewTab:!0,href:p,children:__("Explore more customization options.","jetpack")})})]})},p=e=>{const{attributes:t,clientId:r,isEditingUrl:n,setAttributes:s,setIsEditingUrl:i}=e,{style:a,url:p}=t,h=[{value:"inline",label:__("Inline","jetpack")},{value:"link",label:__("Link","jetpack")}];return(0,l.jsxs)(l.Fragment,{children:[p&&!n&&(0,l.jsx)(o.BlockControls,{children:(0,l.jsx)(u,{onEditClick:i})}),p&&(0,l.jsx)(c.A,{clientId:r,styleOptions:h,onSelectStyle:s,activeStyle:a,attributes:t,viewportWidth:500}),(0,l.jsx)(o.InspectorControls,{children:(0,l.jsx)(d,{...e})})]})}},88471(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(74997),o=r(27723),s=r(98329),i=r(10790);const __=o.__,a={attributes:{backgroundColor:{type:"string",default:"ffffff",validator:s.A},submitButtonText:{type:"string",default:__("Schedule time with me","jetpack")},submitButtonTextColor:{type:"string"},submitButtonBackgroundColor:{type:"string"},submitButtonClasses:{type:"string"},hideEventTypeDetails:{type:"boolean",default:!1},primaryColor:{type:"string",default:"00A2FF",validator:s.A},textColor:{type:"string",default:"4D5055",validator:s.A},style:{type:"string",default:"inline",validValues:["inline","link"]},url:{type:"string",validator:e=>!e||e.startsWith("https://calendly.com/")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},customBackgroundButtonColor:{type:"string",validator:s.A},customTextButtonColor:{type:"string",validator:s.A}},migrate:e=>{const{submitButtonText:t,submitButtonTextColor:r,submitButtonBackgroundColor:o,submitButtonClasses:s,backgroundButtonColor:i,textButtonColor:a,customBackgroundButtonColor:c,customTextButtonColor:l,...u}=e,d={text:(p=e).submitButtonText||__("Schedule time with me","jetpack"),textColor:p.submitButtonTextColor||p.textButtonColor,customTextColor:p.customTextButtonColor,backgroundColor:p.submitButtonBackgroundColor||p.backgroundButtonColor,customBackgroundColor:p.customBackgroundButtonColor,url:p.url};var p;return[u,[(0,n.createBlock)("jetpack/button",{element:"a",uniqueId:"calendly-widget-id",...d})]]},save:({attributes:{url:e}})=>(0,i.jsx)("a",{href:e,children:e})}},9659(e,t,r){"use strict";r.d(t,{A:()=>x});var n=r(85985),o=r(94715),s=r(74997),i=r(56427),a=r(47143),c=r(86087),l=r(27723),u=r(57273),d=r(13022),p=r(66087),h=r(78218),m=r(56145),g=r(13248),f=r(95816),b=r(10137),v=r(38028),y=(r(78215),r(61095),r(10790));const __=l.__,_x=l._x,k="jetpack/button",w={element:"a",text:__("Schedule time with me","jetpack"),uniqueId:"calendly-widget-id",url:f.a},_=(0,n.sh)(g);const x=(0,i.withNotices)(function(e){const{attributes:t,clientId:r,name:n,noticeOperations:l,noticeUI:x,setAttributes:j}=e,C=(0,s.getBlockDefaultClassName)(n),A=(0,h.y)(g.attributes,t);(0,p.isEqual)(A,t)||j(A);const{backgroundColor:S,hideEventTypeDetails:E,primaryColor:T,textColor:N,style:P,url:B}=A,[R,I]=(0,c.useState)(B),[D,L]=(0,c.useState)(!1),[F,M]=(0,c.useState)(!1),[O,U]=(0,c.useState)({}),z=(0,o.useBlockProps)(),$=()=>{l.removeAllNotices(),l.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or code.","jetpack"))};(0,c.useEffect)(()=>{B&&f.a!==B&&"link"!==P&&(0,m.A)(B,M).catch(()=>{j({url:void 0}),$()})},[]);const q=e=>{if(!e)return void $();e.preventDefault();const t=(0,v.a9)(R);if(t){if(t.buttonAttributes&&"link"===t.style){const e=(0,a.select)("core/editor").getBlocksByClientId(r);e.length&&e[0].innerBlocks.forEach(e=>{(0,a.dispatch)("core/editor").updateBlockAttributes(e.clientId,t.buttonAttributes)}),U(t.buttonAttributes)}(0,m.A)(t.url,M).then(()=>{const e=(0,h.y)(g.attributes,t);j(e),L(!1),l.removeAllNotices()}).catch(()=>{j({url:void 0}),$()})}else $()},H=(0,y.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,y.jsx)(i.Spinner,{}),(0,y.jsx)("p",{children:__("Embedding…","jetpack")})]}),V=(0,y.jsxs)(i.Placeholder,{label:__("Calendly","jetpack"),instructions:__("Enter your Calendly web address or embed code below.","jetpack"),icon:_,notices:x,children:[(0,y.jsxs)("form",{onSubmit:q,children:[(0,y.jsx)("input",{type:"text",id:"embedCode",onChange:e=>I(e.target.value),placeholder:__("Calendly web address or embed code…","jetpack"),value:R||"",className:"components-placeholder__input"}),(0,y.jsx)("div",{children:(0,y.jsx)(i.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})})]}),(0,y.jsx)("div",{className:`${C}-learn-more`,children:(0,y.jsx)(u.N,{openInNewTab:!0,href:"https://help.calendly.com/hc/en-us/articles/223147027-Embed-options-overview",children:__("Need help finding your embed code?","jetpack")})})]}),G=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{className:`${C}-overlay`}),(0,y.jsx)("iframe",{src:(()=>{const e=new URLSearchParams({embed_domain:"wordpress.com",embed_type:"Inline",hide_event_type_details:E?1:0,background_color:S,primary_color:T,text_color:N});return`${B}?${e}`})(),width:"100%",height:"100%",frameBorder:"0","data-origwidth":"100%","data-origheight":"100%",title:"Calendly"})]}),W=(0,y.jsx)(o.InnerBlocks,{template:[[k,{...w,...O,passthroughAttributes:{url:"url"}}]],templateLock:"all"});return F?H:(0,y.jsxs)("div",{...z,className:(0,d.A)(z.className,{[`calendly-style-${P}`]:B&&!D}),children:[(0,y.jsx)(b.Ay,{...e,defaultClassName:C,embedCode:R,isEditingUrl:D,parseEmbedCode:q,setEmbedCode:I,setIsEditingUrl:L}),B&&!D?(Z=P,"inline"===Z?G:W):V]});var Z})},60312(e,t,r){"use strict";var n=r(74997),o=r(94375),s=r(13248),i=r(88471),a=r(9659),c=r(34844),l=r(38028);r(78215);(0,o.M)(s,{edit:a.A,save:c.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&l.QL.test(e.textContent),transform:e=>{const t=(0,l.a9)(e.textContent);return(0,n.createBlock)("jetpack/calendly",t)}}]},deprecated:[i.A]})},34844(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);function s(){const e=n.useBlockProps.save();return(0,o.jsx)("div",{...e,children:(0,o.jsx)(n.InnerBlocks.Content,{})})}},38028(e,t,r){"use strict";r.d(t,{QL:()=>n,a9:()=>o});const n=/(^|\/\/)(calendly\.com[^"']*)/i,o=e=>{if(!e)return;const t=(e=>{const t=e.match(n);if(t)return"https://"+t[2]})(e);if(!t)return;const r=(e=>{const t={},r=new URL(e);if(t.url=r.origin+r.pathname,!r.search)return t;const n=new URLSearchParams(r.search),o=n.get("background_color"),s=n.get("primary_color"),i=n.get("text_color"),a=/^[A-Za-z0-9]{6}$/;return n.get("hide_event_type_details")&&(t.hideEventTypeDetails=n.get("hide_event_type_details")),o&&o.match(a)&&(t.backgroundColor=o),s&&s.match(a)&&(t.primaryColor=s),i&&i.match(a)&&(t.textColor=i),t})(t),o=(e=>e.indexOf("data-url")>0?"inline":e.indexOf("initPopupWidget")>0||e.indexOf("initBadgeWidget")>0?"link":void 0)(e);if(o&&(r.style=o),"link"===o){r.buttonAttributes={};const t=(e=>{let t=e.match(/false;">([^<]+)<\//);return t?t[1]:(t=e.match(/text: '([^']*?)'/),t?t[1]:void 0)})(e);t&&(r.buttonAttributes.text=t);const n=(e=>{const t=e.match(/textColor: '([^']*?)'/);if(t)return t[1]})(e);n&&(r.buttonAttributes.textColor=void 0,r.buttonAttributes.customTextColor=n);const o=(e=>{const t=e.match(/color: '([^']*?)'/);if(t)return t[1]})(e);o&&(r.buttonAttributes.backgroundColor=void 0,r.buttonAttributes.customBackgroundColor=o)}return r}},98169(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(56427),s=r(86087),i=r(27723),a=r(13022),c=r(58842),l=r(10790);const __=i.__,u=e=>{const{attributes:{address:t,addressLine2:r,addressLine3:i,city:u,region:d,postal:p,country:h,linkToGoogleMaps:m},isSelected:g,setAttributes:f}=e,b=[t,r,i,u,d,p,h].some(e=>""!==e),v=(0,a.A)({"jetpack-address-block":!0,"is-selected":g}),y=(0,s.useCallback)(e=>{"Enter"===e.key&&e.preventDefault()},[]),k=(0,n.useBlockProps)({className:v}),w=(0,l.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Link address to Google Maps","jetpack"),checked:m,onChange:e=>f({linkToGoogleMaps:e})});return(0,l.jsxs)("div",{...k,children:[!g&&b&&(0,c.A)(e),(g||!b)&&(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)(n.PlainText,{value:t,placeholder:__("Street Address","jetpack"),"aria-label":__("Street Address","jetpack"),onChange:e=>f({address:e}),onKeyDown:y}),(0,l.jsx)(n.PlainText,{value:r,placeholder:__("Address Line 2","jetpack"),"aria-label":__("Address Line 2","jetpack"),onChange:e=>f({addressLine2:e}),onKeyDown:y}),(0,l.jsx)(n.PlainText,{value:i,placeholder:__("Address Line 3","jetpack"),"aria-label":__("Address Line 3","jetpack"),onChange:e=>f({addressLine3:e}),onKeyDown:y}),(0,l.jsx)(n.PlainText,{value:u,placeholder:__("City","jetpack"),"aria-label":__("City","jetpack"),onChange:e=>f({city:e}),onKeyDown:y}),(0,l.jsx)(n.PlainText,{value:d,placeholder:__("State/Province/Region","jetpack"),"aria-label":__("State/Province/Region","jetpack"),onChange:e=>f({region:e}),onKeyDown:y}),(0,l.jsx)(n.PlainText,{value:p,placeholder:__("Postal/Zip Code","jetpack"),"aria-label":__("Postal/Zip Code","jetpack"),onChange:e=>f({postal:e}),onKeyDown:y}),(0,l.jsx)(n.PlainText,{value:h,placeholder:__("Country","jetpack"),"aria-label":__("Country","jetpack"),onChange:e=>f({country:e}),onKeyDown:y}),w]})]})}},36569(e,t,r){"use strict";r.d(t,{U:()=>c,W:()=>l});var n=r(27723),o=r(5573),s=r(98169),i=r(58842),a=r(10790);const __=n.__,_x=n._x,c="address",l={apiVersion:3,title:__("Address","jetpack"),description:__("Lets you add a physical address with Schema markup.","jetpack"),keywords:[_x("location","block search term","jetpack"),_x("direction","block search term","jetpack"),_x("place","block search term","jetpack")],icon:(0,a.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,a.jsx)(o.Path,{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zM7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 2.88-2.88 7.19-5 9.88C9.92 16.21 7 11.85 7 9z"}),(0,a.jsx)(o.Circle,{cx:"12",cy:"9",r:"2.5"})]}),category:"grow",attributes:{address:{type:"string",default:""},addressLine2:{type:"string",default:""},addressLine3:{type:"string",default:""},city:{type:"string",default:""},region:{type:"string",default:""},postal:{type:"string",default:""},country:{type:"string",default:""},linkToGoogleMaps:{type:"boolean",default:!1}},parent:["jetpack/contact-info"],edit:s.A,save:i.A}},58842(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(94715),o=r(86087),s=r(27723),i=r(10790);const __=s.__,a=({attributes:{address:e,addressLine2:t,addressLine3:r,city:n,region:s,postal:a,country:c}})=>(0,i.jsxs)(o.Fragment,{children:[e&&(0,i.jsx)("div",{className:"jetpack-address__address jetpack-address__address1",children:e}),t&&(0,i.jsx)("div",{className:"jetpack-address__address jetpack-address__address2",children:t}),r&&(0,i.jsx)("div",{className:"jetpack-address__address jetpack-address__address3",children:r}),n&&!(s||a)&&(0,i.jsx)("div",{className:"jetpack-address__city",children:n}),n&&(s||a)&&(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{className:"jetpack-address__city",children:n}),", ",(0,i.jsx)("span",{className:"jetpack-address__region",children:s})," ",(0,i.jsx)("span",{className:"jetpack-address__postal",children:a})]}),!n&&(s||a)&&(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{className:"jetpack-address__region",children:s})," ",(0,i.jsx)("span",{className:"jetpack-address__postal",children:a})]}),c&&(0,i.jsx)("div",{className:"jetpack-address__country",children:c})]}),c=({attributes:{address:e,addressLine2:t,addressLine3:r,city:n,region:o,postal:s,country:i}})=>{let a=o?`+${o},`:"";a=s?`${a}+${s}`:a;return`https://www.google.com/maps/search/${e?`${e},`:""}${t?`${t},`:""}${r?`${r},`:""}${n?`+${n},`:""}${a}${i?`+${i}`:""}`.replace(" ","+")},l=e=>{if(!(({address:e,addressLine2:t,addressLine3:r,city:n,region:o,postal:s,country:i})=>[e,t,r,n,o,s,i].some(e=>""!==e))(e.attributes))return null;const t=n.useBlockProps.save();return(0,i.jsxs)("div",{...t,children:[e.attributes.linkToGoogleMaps&&(0,i.jsx)("a",{href:c(e),target:"_blank",rel:"noopener noreferrer",title:__("Open address in Google Maps","jetpack"),children:(0,i.jsx)(a,{...e})}),!e.attributes.linkToGoogleMaps&&(0,i.jsx)(a,{...e})]})}},74842(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(94715),o=r(13022),s=r(10790);const i=["jetpack/markdown","jetpack/address","jetpack/email","jetpack/phone","jetpack/map","jetpack/business-hours","core/paragraph","core/image","core/heading","core/gallery","core/list","core/quote","core/shortcode","core/audio","core/code","core/cover","core/html","core/separator","core/spacer","core/subhead","core/video"],a=[["jetpack/email"],["jetpack/phone"],["jetpack/address"]],c=e=>{const{className:t,isSelected:r}=e,c=(0,n.useBlockProps)({className:(0,o.A)(t,{"jetpack-contact-info-block":!0,"is-selected":r})});return(0,s.jsx)("div",{...c,children:(0,s.jsx)(n.InnerBlocks,{allowedBlocks:i,templateLock:!1,template:a})})}},25907(e,t,r){"use strict";var n=r(74997),o=r(94375),s=r(36569),i=r(75173),a=r(74842),c=r(69933),l=r(77909),u=r(47377);r(75360),r(25378);(0,o.M)(i,{edit:a.A,save:u.A,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"widget_contact_info"===e,transform:({instance:e})=>{let t=[(0,n.createBlock)("core/heading",{content:e.raw.title}),(0,n.createBlock)("jetpack/email",{email:e.raw.email}),(0,n.createBlock)("jetpack/phone",{phone:e.raw.phone}),(0,n.createBlock)("jetpack/address",{address:e.raw.address})];return e.raw.hours&&(t=[...t,(0,n.createBlock)("core/paragraph",{content:e.raw.hours})]),e.raw.showmap&&e.raw.address&&(t=[...t,(0,n.createBlock)("jetpack/map",{address:e.raw.address})]),(0,n.createBlock)("jetpack/contact-info",{},t)}}]}},[{name:s.U,settings:s.W},{name:c.U,settings:c.W},{name:l.U,settings:l.W}])},43167(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(94715),o=r(27723),s=r(45838),i=r(19038);const __=o.__,a=e=>{const t=(0,n.useBlockProps)(),{setAttributes:r}=e;return(0,s.A)("email",e,__("Email","jetpack"),i.A,e=>r({email:e}),t)}},69933(e,t,r){"use strict";r.d(t,{U:()=>c,W:()=>l});var n=r(27723),o=r(5573),s=r(43167),i=r(19038),a=r(10790);const __=n.__,_x=n._x,c="email",l={apiVersion:3,title:__("Email Address","jetpack"),description:__("Lets you add an email address with an automatically generated click-to-email link.","jetpack"),keywords:["e-mail","email",_x("message","block search term","jetpack")],icon:(0,a.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(o.Path,{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"})}),category:"grow",attributes:{email:{type:"string",default:""}},edit:s.A,save:i.A,parent:["jetpack/contact-info"]}},19038(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(94715),o=r(86087),s=r(39904),i=r(10790);const a=({attributes:{email:e}})=>{if(!e)return null;const t=n.useBlockProps.save();return(0,i.jsx)("div",{...t,children:(r=e,r.split(/(\s+)/).map((e,t)=>{const r=e.replace(/([.,/#!$%^&*;:{}=\-_`~()\][])+$/g,"");return e.indexOf("@")&&(0,s.t)(r)?e===r?(0,i.jsx)("a",{href:`mailto:${e}`,children:e},t):(0,i.jsxs)(o.Fragment,{children:[(0,i.jsx)("a",{href:`mailto:${e}`,children:r},t),(0,i.jsx)(o.Fragment,{children:e.slice(-(e.length-r.length))})]},t):(0,i.jsx)(o.Fragment,{children:e},t)}))});var r}},42711(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(94715),o=r(27723),s=r(45838),i=r(5926);const __=o.__,a=e=>{const t=(0,n.useBlockProps)(),{setAttributes:r}=e;return(0,s.A)("phone",e,__("Phone number","jetpack"),i.A,e=>r({phone:e}),t)}},77909(e,t,r){"use strict";r.d(t,{U:()=>c,W:()=>l});var n=r(27723),o=r(5573),s=r(42711),i=r(5926),a=r(10790);const __=n.__,_x=n._x,c="phone",l={apiVersion:3,title:__("Phone Number","jetpack"),description:__("Lets you add a phone number with an automatically generated click-to-call link.","jetpack"),keywords:[_x("mobile","block search term","jetpack"),_x("telephone","block search term","jetpack"),_x("cell","block search term","jetpack")],icon:(0,a.jsx)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(o.Path,{d:"M6.54 5c.06.89.21 1.76.45 2.59l-1.2 1.2c-.41-1.2-.67-2.47-.76-3.79h1.51m9.86 12.02c.85.24 1.72.39 2.6.45v1.49c-1.32-.09-2.59-.35-3.8-.75l1.2-1.19M7.5 3H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.49c0-.55-.45-1-1-1-1.24 0-2.45-.2-3.57-.57-.1-.04-.21-.05-.31-.05-.26 0-.51.1-.71.29l-2.2 2.2c-2.83-1.45-5.15-3.76-6.59-6.59l2.2-2.2c.28-.28.36-.67.25-1.02C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1z"})}),category:"grow",attributes:{phone:{type:"string",default:""}},parent:["jetpack/contact-info"],edit:s.A,save:i.A}},5926(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(94715),o=r(10790);function s(e){const t=e.match(/\d+\.\d+|\d+\b|\d+(?=\w)/g);if(!t)return e;const r=e.indexOf(t[0]);let n=r?e.substring(r-1):e,s=r?e.substring(0,r):"",i=n.replace(/\D/g,"");/[0-9/+/(]/.test(n[0])?(s=s.slice(0,-1),"+"===n[0]&&(i="+"+i)):n=n.substring(1);return[s.trim()?(0,o.jsx)("span",{className:"phone-prefix",children:s},"phonePrefix"):null,(0,o.jsx)("a",{href:`tel:${i}`,children:n},"phoneNumber")]}const i=({attributes:{phone:e}})=>{if(!e)return null;const t=n.useBlockProps.save();return(0,o.jsx)("div",{...t,children:s(e)})}},47377(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);const s=()=>{const e=n.useBlockProps.save();return(0,o.jsx)("div",{...e,children:(0,o.jsx)(n.InnerBlocks.Content,{})})};r.dn(s)},91376(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(4567),o=r(26356),s=r(94715),i=r(86087),a=r(13022),c=r(72730),l=r(10790);const u=({className:e=null,currency:t=null,defaultValue:r=null,disabled:u=!1,label:d="",onChange:p=null,value:h=""})=>{const[m,g]=(0,i.useState)((0,n.Ay)(h,t,{symbol:""})),[f,b]=(0,i.useState)(!1),[v,y]=(0,i.useState)(!1),k=(0,i.useRef)(null),w=(0,i.useCallback)((e,r)=>{g(n=>{if(e!==n){const n=(0,c.C_)(e,t);n&&n>=(0,c.dv)(t)?(y(!1),r&&p?.(n)):y(!0)}return e})},[t,p]),_=()=>{k.current&&(k.current.focus(),b(!0))};return(0,i.useEffect)(()=>{if(!k.current)return;const e=k.current,o=()=>{b(!1),m||w((0,n.Ay)(r,t,{symbol:""}))};return e.addEventListener("blur",o),()=>{e.removeEventListener("blur",o)}},[t,r,m,k,w]),(0,i.useEffect)(()=>{f||v||g((0,n.Ay)(h,t,{symbol:""}))},[t,f,v,h]),(0,i.useEffect)(()=>{w((0,n.Ay)(h,t,{symbol:""}))},[t,h]),(0,l.jsxs)("div",{className:(0,a.A)("donations__amount",e,{"has-focus":f,"has-error":v}),role:"button",tabIndex:0,onClick:_,onKeyDown:_,children:[o.y[t].symbol,u?(0,l.jsx)("div",{className:"donations__amount-value",children:(0,n.Ay)(h||r,t,{symbol:""})}):(0,l.jsx)(s.RichText,{allowedFormats:[],"aria-label":d,onChange:e=>w(e,!0),placeholder:(0,n.Ay)(r,t,{symbol:""}),ref:k,value:m,withoutInteractiveFormatting:!0})]})}},22883(e,t,r){"use strict";r.d(t,{A:()=>i});const n=["left","center","right","full"],o=(e,t="border")=>{if(!e||"object"!=typeof e)return[];const r=[],n=["top","right","bottom","left"];return n.some(t=>e[t])?n.forEach(n=>{const o=e[n];o&&(o.color&&r.push(`${t}-${n}-color:${o.color}`),o.style&&r.push(`${t}-${n}-style:${o.style}`),o.width&&r.push(`${t}-${n}-width:${o.width}`))}):(e.color&&r.push(`${t}-color:${e.color}`),e.style&&r.push(`${t}-style:${e.style}`),e.width&&r.push(`${t}-width:${e.width}`)),r},s=e=>{if(!e)return[];if("string"==typeof e)return[`border-radius:${e}`];if("object"==typeof e){const t={topLeft:"border-top-left-radius",topRight:"border-top-right-radius",bottomRight:"border-bottom-right-radius",bottomLeft:"border-bottom-left-radius"};return Object.entries(t).filter(([t])=>e[t]).map(([t,r])=>`${r}:${e[t]}`)}return[]},i=(e,t)=>{const{activeTabBackgroundColor:r,activeTabTextColor:i,inactiveTabBackgroundColor:a,inactiveTabTextColor:c,selectedAmountBackgroundColor:l,selectedAmountTextColor:u,selectedAmountOutlineColor:d,tabBorderColor:p,tabFontSize:h,tabPadding:m,amountFontSize:g,amountBorder:f,amountBorderRadius:b,buttonFontSize:v,buttonPadding:y,buttonAlignment:k,buttonBorderRadius:w,contentAlignment:_,blockBorder:x,blockBorderRadius:j,displayMode:C}=e,A=[];if(["left","center","right"].includes(_)){A.push(`${t} .donations__content{text-align:${_}}`);const e={left:"flex-start",center:"center",right:"flex-end"};A.push(`${t} .donations__amounts{justify-content:${e[_]}}`)}if(p&&A.push(`${t} .donations__nav,${t} .donations__nav-item,${t} .donations__nav-item.is-active{border-color:${p}}`),w){const e=s(w);e.length&&A.push(`${t} .donations__donate-button{${e.join(";")}}`)}const S=[];g&&S.push(`font-size:${g}`),S.push(...o(f)),S.push(...s(b)),S.length&&A.push(`${t} .donations__amount{${S.join(";")}}`);const E=[];h&&E.push(`font-size:${h}`),m&&["top","right","bottom","left"].forEach(e=>{m[e]&&E.push(`padding-${e}:${m[e]}`)}),E.length&&A.push(`${t} .donations__nav-item{${E.join(";")}}`);const T=[];r&&T.push(`background:${r}`),i&&T.push(`color:${i}`),T.length&&A.push(`${t} .donations__nav-item.is-active{${T.join(";")}}`);const N=[];a&&N.push(`background:${a}`),c&&N.push(`color:${c}`),N.length&&A.push(`${t} .donations__nav-item:not(.is-active){${N.join(";")}}`);const P=[];l&&P.push(`background-color:${l}`),u&&P.push(`color:${u}`),d&&P.push(`box-shadow:0 0 0 1px #fff,0 0 0 3px ${d}`),P.length&&A.push(`${t} .donations__amount.is-selected{${P.join(";")}}`);const B=[];if(v&&B.push(`font-size:${v}`),y&&["top","right","bottom","left"].forEach(e=>{y[e]&&B.push(`padding-${e}:${y[e]}`)}),B.length&&A.push(`${t} .donations__donate-button{${B.join(";")}}`),n.includes(k)&&("full"===k?A.push(`${t} .donations__donate-button-wrapper{display:block;width:100%}${t} .donations__donate-button{display:block;width:100%;box-sizing:border-box;text-align:center}`):A.push(`${t} .donations__donate-button-wrapper{text-align:${k}}`)),"modal"!==C){const e=[...o(x),...s(j)];e.length&&A.push(`.wp-block-jetpack-donations${t}{${e.join(";")}}`)}return"modal"===C&&["left","center","right"].includes(_)&&A.push(`${t}{text-align:${_}}`),A.join("")}},54806(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r(4567),o=r(26356),s=r(3924),i=r(85985),a=r(94715),c=r(56427),l=r(47143),u=r(86087),d=r(27723),p=r(48558),h=r(72730),m=r(16521),g=r(62060),f=r(75703),b=r(10790);const __=d.__,v={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"},y=e=>{const{attributes:t,setAttributes:r,clientId:y}=e,{tracks:k}=(0,i.st)(),w=(0,u.useRef)({}),_=!(0,l.useSelect)(e=>e(m.M).getConnectUrl()||"",[]),x=(0,u.useCallback)((e,t)=>{k.recordEvent("jetpack_donations_setting_changed",{feature:"donations",surface:"block_editor",setting_name:e,setting_value:t,stripe_connected:_})},[k,_]),j=(0,u.useCallback)((e,t)=>{w.current[e]&&clearTimeout(w.current[e]),w.current[e]=setTimeout(()=>{x(e,t),delete w.current[e]},800)},[x]),{currency:C,oneTimeDonation:A,monthlyDonation:S,annualDonation:E,showCustomAmount:T,contentAlignment:N,defaultInterval:P,customAmountPlaceholder:B,minimumAmount:R,maximumAmount:I,displayMode:D,triggerButtonText:L,triggerIcon:F,triggerSticky:M,blockBorder:O,blockBorderRadius:U}=t,z=(0,h.dv)(C),$=B??100*z,q=!1!==A.show,H=!!S.show,V=!!E.show,G=(q?1:0)+(H?1:0)+(V?1:0),W=__("At least one frequency must be enabled.","jetpack"),Z=(0,f.fq)(q,H,V)??"one-time",J="one-time"===P&&q||"1 month"===P&&H||"1 year"===P&&V?P:Z,K={"one-time":"show_one_time","1 month":"show_monthly","1 year":"show_yearly"},Y=(e,n)=>{const o=v[e],s=t[o],i={[o]:{...s,show:n}};if(!n&&J===e){const t={oneTime:"one-time"!==e&&q,monthly:"1 month"!==e&&H,annual:"1 year"!==e&&V},r=(0,f.fq)(t.oneTime,t.monthly,t.annual);r&&(i.defaultInterval=r)}r(i),x(K[e],n)},Q={"one-time":__("One-Time","jetpack"),"1 month":__("Monthly","jetpack"),"1 year":__("Yearly","jetpack")},X=[...q?[{value:"one-time",label:Q["one-time"]}]:[],...H?[{value:"1 month",label:Q["1 month"]}]:[],...V?[{value:"1 year",label:Q["1 year"]}]:[]],ee=e=>[{value:"",label:__("None","jetpack")},...(e||[]).map((e,t)=>({value:String(t),label:(0,n.Ay)(e,C)}))],te=e=>void 0!==e.defaultAmountIndex?String(e.defaultAmountIndex):"",re={"one-time":"default_amount_one_time","1 month":"default_amount_monthly","1 year":"default_amount_yearly"},ne=e=>n=>{const o=""===n?void 0:parseInt(n,10);((e,n,o)=>{const s=v[e];r({[s]:{...t[s],[n]:o}})})(e,"defaultAmountIndex",o),x(re[e],o??null)},oe=(0,u.useCallback)(e=>r({contentAlignment:e||""}),[r]);let se;void 0!==R&&void 0!==I&&I<R?se=__("Maximum must be greater than the minimum amount.","jetpack"):void 0!==I&&I<z&&(se=(0,d.sprintf)(/* translators: %s: minimum donation amount formatted with currency symbol */ | |
| 15 | +__("Maximum must be at least %s, the minimum amount Stripe can process.","jetpack"),(0,n.Ay)(z,C)));return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(a.BlockControls,{children:[(0,b.jsx)(a.AlignmentControl,{value:N,onChange:oe}),(0,b.jsx)(c.ToolbarGroup,{children:(0,b.jsx)(c.ToolbarItem,{children:()=>(0,b.jsx)(c.Dropdown,{contentClassName:"jetpack-donations__currency-popover",renderToggle:({onToggle:e,isOpen:t})=>(0,b.jsx)(c.ToolbarButton,{className:"jetpack-donations__currency-toggle",icon:(0,b.jsxs)(b.Fragment,{children:[C+" - "+o.y[C].symbol,(0,b.jsx)(c.Dashicon,{icon:"arrow-down"})]}),label:__("Change currency","jetpack"),onClick:e,onKeyDown:r=>{t||r.keyCode!==p.DOWN||(r.preventDefault(),r.stopPropagation(),e())}}),renderContent:({onClose:e})=>(0,b.jsx)(c.MenuGroup,{children:Object.keys(h.VK).map(t=>(0,b.jsx)(c.MenuItem,{isSelected:t===C,icon:t===C?"yes":"",onClick:()=>{(e=>{const t=(0,h.Xj)(e);r({currency:e,oneTimeDonation:{...A,amounts:t},monthlyDonation:{...S,amounts:t},annualDonation:{...E,amounts:t},customAmountPlaceholder:void 0}),x("currency",e)})(t),e()},children:t+" - "+o.y[t].symbol},`jetpack-donations-currency-${t}`))})})})})]}),(0,b.jsxs)(a.InspectorControls,{children:[(0,b.jsxs)(c.PanelBody,{title:__("Display","jetpack"),children:[(0,b.jsxs)(c.__experimentalToggleGroupControl,{label:__("Display mode","jetpack"),value:D,onChange:e=>r({displayMode:e}),isBlock:!0,__nextHasNoMarginBottom:!0,children:[(0,b.jsx)(c.__experimentalToggleGroupControlOption,{value:"inline",label:__("In-page","jetpack")}),(0,b.jsx)(c.__experimentalToggleGroupControlOption,{value:"modal",label:__("Pop-up","jetpack")})]}),"modal"===D&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c.ToggleControl,{label:__("Sticky","jetpack"),help:__("Fix the button to the bottom right corner of the page.","jetpack"),checked:!!M,onChange:e=>r({triggerSticky:e}),style:{marginTop:16},__nextHasNoMarginBottom:!0}),(0,b.jsx)(c.TextControl,{label:__("Button text","jetpack"),value:L??"",placeholder:__("Donate","jetpack"),onChange:e=>r({triggerButtonText:e||void 0}),__nextHasNoMarginBottom:!0}),(0,b.jsx)(c.ToggleControl,{label:__("Show icon","jetpack"),checked:"none"!==F,onChange:e=>r({triggerIcon:e?"heart":"none"}),style:{marginTop:16},__nextHasNoMarginBottom:!0}),"none"!==F&&(0,b.jsx)("div",{className:"jetpack-donations__icon-picker",children:g.Sh.map(({key:e,label:t,icon:n})=>(0,b.jsx)(c.Tooltip,{text:t,children:(0,b.jsx)(c.Button,{className:"jetpack-donations__icon-option",onClick:()=>r({triggerIcon:e}),"aria-label":t,isPressed:F===e,children:(0,b.jsx)(c.Icon,{icon:n,size:20})})},e))})]})]}),(0,b.jsxs)(c.PanelBody,{title:__("Settings","jetpack"),children:[(0,b.jsx)(c.ToggleControl,{checked:q,onChange:e=>Y("one-time",e),disabled:q&&1===G,help:q&&1===G?W:void 0,label:__("Show one-time donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,b.jsx)(c.ToggleControl,{checked:H,onChange:e=>Y("1 month",e),disabled:H&&1===G,help:H&&1===G?W:void 0,label:__("Show monthly donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,b.jsx)(c.ToggleControl,{checked:V,onChange:e=>Y("1 year",e),disabled:V&&1===G,help:V&&1===G?W:void 0,label:__("Show annual donations","jetpack"),__nextHasNoMarginBottom:!0}),(0,b.jsx)(c.ToggleControl,{checked:T,onChange:e=>{r({showCustomAmount:e}),x("show_custom_amount",e)},label:__("Show custom amount option","jetpack"),__nextHasNoMarginBottom:!0}),(0,b.jsx)("h3",{className:"jp-donations-defaults-heading",style:{margin:"24px 0 8px",fontSize:13,fontWeight:600,textTransform:"none"},children:__("Defaults","jetpack")}),(0,b.jsx)(c.SelectControl,{label:__("Frequency","jetpack"),value:J,options:X,onChange:e=>{r({defaultInterval:e}),x("default_frequency",e)},__nextHasNoMarginBottom:!0}),(0,b.jsx)("h4",{className:"jp-donations-defaults-subheading",style:{margin:"16px 0 8px",fontSize:11,fontWeight:500,textTransform:"uppercase"},children:__("Amounts","jetpack")}),q&&(0,b.jsxs)(c.Flex,{justify:"space-between",align:"center",style:{marginBottom:8},children:[(0,b.jsx)(c.FlexItem,{style:{minWidth:80},children:__("One-Time","jetpack")}),(0,b.jsx)(c.FlexBlock,{children:(0,b.jsx)(c.SelectControl,{hideLabelFromVision:!0,label:__("Default amount for One-Time","jetpack"),value:te(A),options:ee(A.amounts),onChange:ne("one-time"),__nextHasNoMarginBottom:!0})})]}),H&&(0,b.jsxs)(c.Flex,{justify:"space-between",align:"center",style:{marginBottom:8},children:[(0,b.jsx)(c.FlexItem,{style:{minWidth:80},children:__("Monthly","jetpack")}),(0,b.jsx)(c.FlexBlock,{children:(0,b.jsx)(c.SelectControl,{hideLabelFromVision:!0,label:__("Default amount for Monthly","jetpack"),value:te(S),options:ee(S.amounts),onChange:ne("1 month"),__nextHasNoMarginBottom:!0})})]}),V&&(0,b.jsxs)(c.Flex,{justify:"space-between",align:"center",style:{marginBottom:8},children:[(0,b.jsx)(c.FlexItem,{style:{minWidth:80},children:__("Annual","jetpack")}),(0,b.jsx)(c.FlexBlock,{children:(0,b.jsx)(c.SelectControl,{hideLabelFromVision:!0,label:__("Default amount for Annual","jetpack"),value:te(E),options:ee(E.amounts),onChange:ne("1 year"),__nextHasNoMarginBottom:!0})})]}),T&&(0,b.jsxs)(c.Flex,{justify:"space-between",align:"center",style:{marginBottom:8},children:[(0,b.jsx)(c.FlexItem,{style:{minWidth:80},children:__("Custom","jetpack")}),(0,b.jsx)(c.FlexBlock,{children:(0,b.jsx)(c.TextControl,{type:"number",hideLabelFromVision:!0,label:__("Suggested custom amount","jetpack"),value:$,onChange:e=>{const t=""===e||void 0===e?void 0:Number(e);r({customAmountPlaceholder:t}),j("custom_amount_placeholder",t??null)},min:(0,h.dv)(C),step:.01,__nextHasNoMarginBottom:!0})})]}),(0,b.jsx)("p",{style:{marginTop:24},children:(0,b.jsx)(c.ExternalLink,{href:`https://wordpress.com/earn/${(0,i.GE)()}`,children:__("View donation earnings","jetpack")})}),(0,b.jsx)("p",{children:(0,b.jsx)(c.ExternalLink,{href:(0,s.A)("jetpack-support-donation-block-stripe-reqs"),children:__("View Stripe requirements","jetpack")})})]}),(0,b.jsxs)(c.PanelBody,{title:__("Security","jetpack"),initialOpen:!1,children:[(0,b.jsx)("p",{style:{marginTop:0,marginBottom:16,fontSize:13},children:__("Setting minimum and maximum donation amounts can help prevent fraudulent transactions.","jetpack")}),(0,b.jsx)(c.TextControl,{type:"number",label:__("Minimum amount","jetpack"),value:R??"",onChange:e=>{const t=""===e?void 0:Number(e);r({minimumAmount:t}),j("minimum_amount",t??null)},min:z,step:.01,__nextHasNoMarginBottom:!0}),(0,b.jsx)(c.TextControl,{type:"number",label:__("Maximum amount","jetpack"),value:I??"",onChange:e=>{const t=""===e?void 0:Number(e);r({maximumAmount:t}),j("maximum_amount",t??null)},min:R??z,step:.01,help:se,__nextHasNoMarginBottom:!0})]})]}),"modal"!==D&&(0,b.jsx)(a.InspectorControls,{group:"border",children:(0,b.jsxs)(c.__experimentalToolsPanel,{label:__("Border","jetpack"),resetAll:()=>r({blockBorder:void 0,blockBorderRadius:void 0}),panelId:y,children:[(0,b.jsx)(c.__experimentalToolsPanelItem,{label:__("Border","jetpack"),hasValue:()=>!!O,onDeselect:()=>r({blockBorder:void 0}),isShownByDefault:!0,panelId:y,children:(0,b.jsx)(c.BorderBoxControl,{label:__("Border","jetpack"),value:O,onChange:e=>r({blockBorder:e}),enableAlpha:!0,enableStyle:!0,__next40pxDefaultSize:!0})}),(0,b.jsx)(c.__experimentalToolsPanelItem,{label:__("Radius","jetpack"),hasValue:()=>!!U,onDeselect:()=>r({blockBorderRadius:void 0}),isShownByDefault:!0,panelId:y,children:(0,b.jsx)(a.__experimentalBorderRadiusControl,{values:U,onChange:e=>r({blockBorderRadius:e})})})]})})]})}},77994(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(4567),o=r(26356),s=r(94715),i=r(27723),a=r(72730),c=r(10790);const __=i.__,l={attributes:{currency:{type:"string",default:"USD"},oneTimeDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a one-time donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate","jetpack")}},monthlyDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a monthly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate monthly","jetpack")}},annualDonation:{type:"object",default:{show:!0,planId:null,amounts:[5,15,100],heading:__("Make a yearly donation","jetpack"),extraText:__("Your contribution is appreciated.","jetpack"),buttonText:__("Donate yearly","jetpack")}},showCustomAmount:{type:"boolean",default:!0},chooseAmountText:{type:"string",default:__("Choose an amount","jetpack")},customAmountText:{type:"string",default:__("Or enter a custom amount","jetpack")}},supports:{html:!1},save:({attributes:e})=>{const{currency:t,oneTimeDonation:r,monthlyDonation:i,annualDonation:l,showCustomAmount:u,chooseAmountText:d,customAmountText:p}=e;if(!r||!r.show||-1===r.planId)return null;const h={"one-time":{title:__("One-Time","jetpack")},...i.show&&{"1 month":{title:__("Monthly","jetpack")}},...l.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,c.jsx)("div",{children:(0,c.jsxs)("div",{className:"donations__container",children:[Object.keys(h).length>1&&(0,c.jsx)("div",{className:"donations__nav",children:Object.entries(h).map(([e,{title:t}])=>(0,c.jsx)("div",{role:"button",tabIndex:0,className:"donations__nav-item","data-interval":e,children:t},`jetpack-donations-nav-item-${e} `))}),(0,c.jsx)("div",{className:"donations__content",children:(0,c.jsxs)("div",{className:"donations__tab",children:[(0,c.jsx)(s.RichText.Content,{tagName:"h4",className:"donations__one-time-item",value:r.heading}),i.show&&(0,c.jsx)(s.RichText.Content,{tagName:"h4",className:"donations__monthly-item",value:i.heading}),l.show&&(0,c.jsx)(s.RichText.Content,{tagName:"h4",className:"donations__annual-item",value:l.heading}),(0,c.jsx)(s.RichText.Content,{tagName:"p",value:d}),(0,c.jsx)("div",{className:"donations__amounts donations__one-time-item",children:r.amounts.map(e=>(0,c.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,n.Ay)(e,t)},e))}),i.show&&(0,c.jsx)("div",{className:"donations__amounts donations__monthly-item",children:i.amounts.map(e=>(0,c.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,n.Ay)(e,t)},e))}),l.show&&(0,c.jsx)("div",{className:"donations__amounts donations__annual-item",children:l.amounts.map(e=>(0,c.jsx)("div",{className:"donations__amount","data-amount":e,children:(0,n.Ay)(e,t)},e))}),u&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(s.RichText.Content,{tagName:"p",value:p}),(0,c.jsxs)("div",{className:"donations__amount donations__custom-amount",children:[o.y[t].symbol,(0,c.jsx)("div",{className:"donations__amount-value","data-currency":t,"data-empty-text":(0,n.Ay)(100*(0,a.dv)(t),t,{symbol:""})})]})]}),(0,c.jsx)("div",{className:"donations__separator",children:"——"}),(0,c.jsx)(s.RichText.Content,{tagName:"p",className:"donations__one-time-item",value:r.extraText}),i.show&&(0,c.jsx)(s.RichText.Content,{tagName:"p",className:"donations__monthly-item",value:i.extraText}),l.show&&(0,c.jsx)(s.RichText.Content,{tagName:"p",className:"donations__annual-item",value:l.extraText}),(0,c.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper donations__one-time-item",children:(0,c.jsx)(s.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__one-time-item",value:r.buttonText})}),i.show&&(0,c.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper donations__monthly-item",children:(0,c.jsx)(s.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__monthly-item",value:i.buttonText})}),l.show&&(0,c.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper donations__annual-item",children:(0,c.jsx)(s.RichText.Content,{tagName:"a",className:"wp-block-button__link donations__donate-button donations__annual-item",value:l.buttonText})})]})})]})})}}},97448(e,t,r){"use strict";r.d(t,{A:()=>E});var n=r(85985),o=r(94715),s=r(56427),i=r(29491),a=r(47143),c=r(86087),l=r(27723),u=r(2274),d=r(53796),p=r(72730),h=r(27574),m=r(26247),g=r(16521),f=r(3696),b=r(22883),v=r(54806),y=r(70975),k=r(93033),w=r(62060),_=r(79551),x=r(26334),j=r(52244),C=r(10790);const __=l.__,A=new Set,S=e=>{const{attributes:t,setAttributes:r,clientId:l}=e,{currency:E,tabsAppearance:T,className:N,displayMode:P,triggerButtonText:B,triggerIcon:R,triggerSticky:I}=t,{tracks:D}=(0,n.st)();(0,c.useEffect)(()=>{if("string"==typeof N&&N.split(" ").includes("is-style-buttons")){const e=N.split(" ").filter(e=>"is-style-buttons"!==e).join(" ").trim();r({tabsAppearance:"buttons",className:e||void 0})}},[N,r]);const L=(0,i.useInstanceId)(S,"jp-donations"),F=(0,b.A)(t,`.${L}`),M=[L,"buttons"===T&&"is-style-buttons","modal"===P&&"is-display-modal","modal"===P&&I&&"is-sticky"].filter(Boolean).join(" "),O=(0,o.useBlockProps)({className:M}),[U,z]=(0,c.useState)(""),[$,q]=(0,c.useState)([]),H=(0,m.A)(),V=(0,a.useSelect)(e=>e(o.store).getSettings().isPreviewMode,[]),{lockPostSaving:G,unlockPostSaving:W}=(0,a.useDispatch)("core/editor"),Z=(0,a.useSelect)(e=>e("core/editor").getCurrentPost(),[]),J=(0,a.useSelect)(e=>e("core/editor").isPostSavingLocked(),[]),K=(0,a.useSelect)(e=>e(g.M).getConnectUrl()||"",[]),{setConnectUrl:Y,setConnectedAccountDefaultCurrency:Q}=(0,a.useDispatch)(f.EF),X=(0,a.useSelect)(e=>e(f.EF).getConnectedAccountDefaultCurrency());(0,c.useEffect)(()=>{if(V||!l||A.has(l))return;H&&!K&&!X||(A.add(l),D.recordEvent("jetpack_donations_block_loaded",{feature:"donations",surface:"block_editor",is_user_connected:!!H,stripe_connected:H?!K:null}))},[l,H,K,X,D,V]),(0,c.useEffect)(()=>{if(!E&&X&&!J){const e=X.toUpperCase(),t=!!p.VK[e];r(t?{currency:e}:{currency:"USD"})}},[E,X,J,r]);const ee=e=>{z(e)};(0,c.useEffect)(()=>{if(V)return;G("donations");const e=e=>e.reduce((e,{id:t,currency:r,type:n,interval:o})=>(r===E&&"donation"===n&&(e[o]=t),e),{});(0,k.A)("donation").then(t=>{if(!t&&"object"!=typeof t||t.errors)return W("donations"),void z(__("Could not load data from WordPress.com.","jetpack"));Y((0,h.A)(Z.id,t.connect_url)),Q(t?.connected_account_default_currency?.toUpperCase());const r=e(t.products);return(e=>{const t=Object.keys(e);return t.includes("one-time")&&t.includes("1 month")&&t.includes("1 year")})(r)?(q(r),void W("donations")):t.connect_url?(q({"one-time":-1,"1 month":-1,"1 year":-1}),void W("donations")):(E&&(0,y.A)(E).then(t=>{q(e(t)),W("donations")},ee),void W("donations"))},ee)},[G,E,Z.id,Y,Q,W,V]);const te=V?{"one-time":-1,"1 month":-1,"1 year":-1}:$,re=V&&!E?{...e,attributes:{...t,currency:"USD"}}:e;let ne;if(V||H)if(!V&&U)ne=(0,C.jsx)(_.A,{error:U});else if(!V&&K)ne=(0,C.jsx)(d.V,{blockName:"donations"});else if(V||E)if("modal"===P){const t=w.Sh.find(({key:e})=>e===R),r=B||__("Donate","jetpack");ne=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(v.A,{...e}),(0,C.jsxs)("button",{className:"donations__trigger-button wp-block-button__link",tabIndex:-1,"aria-hidden":"true",children:[t&&"none"!==R&&(0,C.jsx)(s.Icon,{className:"donations__trigger-icon",icon:t.icon,size:20}),r]})]})}else ne=(0,C.jsx)(j.A,{...re,products:te});else ne=(0,C.jsx)(s.Spinner,{});else ne=(0,C.jsx)(u.A,{block:"Donations Form",explanation:__("Connect your WordPress.com account to enable donations.","jetpack")});return(0,C.jsxs)("div",{...O,children:[(0,C.jsx)(x.A,{attributes:t,setAttributes:r}),F&&(0,C.jsx)("style",{children:F}),ne]})},E=S},46197(e,t,r){"use strict";var n=r(74997),o=r(94375),s=r(87325),i=r(77994),a=r(97448),c=r(75743),l=r(30746);r(45318);(0,o.M)(s,{edit:a.A,save:c.A,deprecated:[i.A]}),(0,n.registerBlockVariation)("jetpack/donations",l.Ay)},70975(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(1455),o=r.n(n);const s=async e=>{try{return await o()({path:"/wpcom/v2/memberships/products",method:"POST",data:{type:"donation",currency:e,is_editable:!1}})}catch(e){return Promise.reject(e.message)}}},93033(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(1455),o=r.n(n),s=r(93832);const i=async(e=null)=>{const t=new URLSearchParams(window.location.search),r=(0,s.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===t.get("origin")?"gutenberg-wpcom":"gutenberg",...e&&{type:e},is_editable:!1});try{return await o()({path:r,method:"GET"})}catch(e){return Promise.reject(e.message)}}},62060(e,t,r){"use strict";r.d(t,{$f:()=>l,Sh:()=>u});var n=r(27723),o=r(42005),s=r(5573),i=r(10790);const __=n.__,a=(0,i.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.Path,{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})}),c=(0,i.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.Path,{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5 14.67 11 15.5 11zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"})}),l=(0,i.jsx)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 5h11v3.25h1a2 2 0 010 4H17.5v1.25a3 3 0 01-3 3H9.5a3 3 0 01-3-3V5zm1.5 1.5v7.25a1.5 1.5 0 001.5 1.5h5a1.5 1.5 0 001.5-1.5V6.5h-8zm10 2.5H17.5v2h.5a1 1 0 000-2zM5 20h14V18.5H5z"})}),u=[{key:"heart",label:__("Heart","jetpack"),icon:a},{key:"gift",label:__("Gift","jetpack"),icon:o.A},{key:"smiley",label:__("Smiley","jetpack"),icon:c},{key:"coffee",label:__("Cup","jetpack"),icon:l}]},79551(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(56427),o=r(27723),s=r(10790);const __=o.__,i=({error:e})=>(0,s.jsx)(n.Placeholder,{icon:"lock",label:__("Donations","jetpack"),instructions:e})},75743(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(94715),o=r(75703),s=r(10790);const i=(0,o.OI)(),a=({attributes:e})=>{const{fallbackLinkUrl:t,oneTimeDonation:r,monthlyDonation:o,annualDonation:a}=e;if(!r||!r.show||!r.planId||-1===r.planId)return null;const c=n.useBlockProps.save();return(0,s.jsxs)("div",{...c,children:[(0,s.jsx)(n.RichText.Content,{tagName:"h4",value:i.oneTimeDonation?.heading}),(0,s.jsx)(n.RichText.Content,{tagName:"p",value:r.extraText??i.extraText}),(0,s.jsx)(n.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.oneTimeDonation?.buttonText}),o.show&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("hr",{className:"donations__separator"}),(0,s.jsx)(n.RichText.Content,{tagName:"h4",value:i.monthlyDonation?.heading}),(0,s.jsx)(n.RichText.Content,{tagName:"p",value:o.extraText??i.extraText}),(0,s.jsx)(n.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.monthlyDonation?.buttonText})]}),a.show&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("hr",{className:"donations__separator"}),(0,s.jsx)(n.RichText.Content,{tagName:"h4",value:i.annualDonation?.heading}),(0,s.jsx)(n.RichText.Content,{tagName:"p",value:a.extraText??i.extraText}),(0,s.jsx)(n.RichText.Content,{tagName:"a",className:"jetpack-donations-fallback-link",href:t,rel:"noopener noreferrer noamphtml",target:"_blank",value:i.annualDonation?.buttonText})]})]})}},26334(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(56427),s=r(86087),i=r(27723),a=r(10790);const __=i.__,c={placement:"left-start",offset:36},l=({label:e,settings:t})=>{const r=(0,s.useCallback)(()=>t.some(e=>!!e.value),[t]),i=(0,s.useCallback)(()=>t.forEach(e=>e.onChange()),[t]),l=(0,s.useCallback)(({isOpen:r,onToggle:n})=>(0,a.jsx)(o.Button,{onClick:n,"aria-expanded":r,"aria-label":e,__next40pxDefaultSize:!0,children:(0,a.jsxs)(o.__experimentalHStack,{justify:"flex-start",children:[(0,a.jsx)(o.__experimentalZStack,{isLayered:!1,offset:-8,children:t.map((e,t)=>(0,a.jsx)(o.Flex,{expanded:!1,children:(0,a.jsx)(o.ColorIndicator,{colorValue:e.value})},t))}),(0,a.jsx)(o.FlexItem,{className:"block-editor-panel-color-gradient-settings__color-name",children:e})]})}),[e,t]),u=(0,s.useCallback)(()=>{if(1===t.length)return(0,a.jsx)(o.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,a.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,a.jsx)(n.__experimentalColorGradientControl,{label:t[0].label,colorValue:t[0].value,onColorChange:t[0].onChange})})});const e=t.map(e=>({name:e.label.toLowerCase().replace(/\s+/g,"-"),title:e.label}));return(0,a.jsx)(o.__experimentalDropdownContentWrapper,{paddingSize:"none",children:(0,a.jsx)("div",{className:"block-editor-panel-color-gradient-settings__dropdown-content",children:(0,a.jsx)(o.TabPanel,{tabs:e,children:e=>{const r=t.find(t=>t.label.toLowerCase().replace(/\s+/g,"-")===e.name);return(0,a.jsx)(n.__experimentalColorGradientControl,{label:r.label,colorValue:r.value,onColorChange:r.onChange,showTitle:!1})}})})})},[t]);return(0,a.jsx)(o.__experimentalToolsPanelItem,{className:"block-editor-tools-panel-color-gradient-settings__item",label:e,hasValue:r,onDeselect:i,isShownByDefault:!0,children:(0,a.jsx)(o.Dropdown,{popoverProps:c,className:"block-editor-tools-panel-color-gradient-settings__dropdown",renderToggle:l,renderContent:u})})},u=({attributes:e,setAttributes:t})=>{const{activeTabBackgroundColor:r,activeTabTextColor:i,inactiveTabBackgroundColor:c,inactiveTabTextColor:u,selectedAmountBackgroundColor:d,selectedAmountTextColor:p,selectedAmountOutlineColor:h,tabsAppearance:m,tabBorderColor:g,tabFontSize:f,tabPadding:b,buttonFontSize:v,buttonPadding:y,buttonAlignment:k,buttonBorderRadius:w,amountFontSize:_,amountBorder:x,amountBorderRadius:j}=e,C=(0,s.useMemo)(()=>{const e=e=>r=>t({[e]:r});return{tabsAppearance:e("tabsAppearance"),activeTabBackgroundColor:e("activeTabBackgroundColor"),activeTabTextColor:e("activeTabTextColor"),inactiveTabBackgroundColor:e("inactiveTabBackgroundColor"),inactiveTabTextColor:e("inactiveTabTextColor"),tabBorderColor:e("tabBorderColor"),tabFontSize:e("tabFontSize"),tabPadding:e("tabPadding"),selectedAmountBackgroundColor:e("selectedAmountBackgroundColor"),selectedAmountTextColor:e("selectedAmountTextColor"),selectedAmountOutlineColor:e("selectedAmountOutlineColor"),amountFontSize:e("amountFontSize"),amountBorder:e("amountBorder"),amountBorderRadius:e("amountBorderRadius"),buttonFontSize:e("buttonFontSize"),buttonPadding:e("buttonPadding"),buttonAlignment:e=>t({buttonAlignment:e||""}),buttonBorderRadius:e("buttonBorderRadius")}},[t]),A=(0,s.useMemo)(()=>[{label:__("Text","jetpack"),value:i,onChange:C.activeTabTextColor},{label:__("Background","jetpack"),value:r,onChange:C.activeTabBackgroundColor}],[r,i,C]),S=(0,s.useMemo)(()=>[{label:__("Text","jetpack"),value:u,onChange:C.inactiveTabTextColor},{label:__("Background","jetpack"),value:c,onChange:C.inactiveTabBackgroundColor}],[c,u,C]),E=(0,s.useMemo)(()=>[{label:__("Tab border","jetpack"),value:g,onChange:C.tabBorderColor}],[g,C]),T=(0,s.useMemo)(()=>[{label:__("Text","jetpack"),value:p,onChange:C.selectedAmountTextColor},{label:__("Background","jetpack"),value:d,onChange:C.selectedAmountBackgroundColor},{label:__("Outline","jetpack"),value:h,onChange:C.selectedAmountOutlineColor}],[d,p,h,C]),N=(0,s.useCallback)(()=>{},[]),P=(0,s.useCallback)(()=>{C.tabsAppearance("tabs"),C.activeTabBackgroundColor(),C.activeTabTextColor(),C.inactiveTabBackgroundColor(),C.inactiveTabTextColor(),C.tabBorderColor(),C.tabFontSize(),C.tabPadding()},[C]),B=(0,s.useCallback)(()=>{C.selectedAmountBackgroundColor(),C.selectedAmountTextColor(),C.selectedAmountOutlineColor(),C.amountFontSize(),C.amountBorder(),C.amountBorderRadius()},[C]),R=(0,s.useCallback)(()=>{C.buttonFontSize(),C.buttonPadding(),C.buttonBorderRadius(),C.buttonAlignment("")},[C]),I=(0,s.useMemo)(()=>({tabsAppearance:()=>"buttons"===m,tabFontSize:()=>!!f,tabPadding:()=>!!b,amountFontSize:()=>!!_,amountBorder:()=>!!x,amountBorderRadius:()=>!!j,buttonFontSize:()=>!!v,buttonPadding:()=>!!y,buttonAlignment:()=>!!k,buttonBorderRadius:()=>!!w}),[m,f,b,_,x,j,v,y,k,w]),D=(0,s.useMemo)(()=>({tabsAppearance:()=>C.tabsAppearance("tabs"),buttonAlignment:()=>C.buttonAlignment("")}),[C]);return(0,a.jsxs)(n.InspectorControls,{group:"styles",children:[(0,a.jsxs)(o.PanelBody,{title:__("Tabs","jetpack"),initialOpen:!1,className:"jp-donations-style-panel",children:[(0,a.jsx)(o.__experimentalToolsPanel,{label:__("Tab appearance","jetpack"),resetAll:N,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Appearance","jetpack"),hasValue:I.tabsAppearance,onDeselect:D.tabsAppearance,isShownByDefault:!0,children:(0,a.jsxs)(o.__experimentalToggleGroupControl,{label:__("Appearance","jetpack"),value:m||"tabs",onChange:C.tabsAppearance,isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[(0,a.jsx)(o.__experimentalToggleGroupControlOption,{value:"tabs",label:__("Tabs","jetpack")}),(0,a.jsx)(o.__experimentalToggleGroupControlOption,{value:"buttons",label:__("Buttons","jetpack")})]})})}),(0,a.jsx)(o.__experimentalToolsPanel,{className:"color-block-support-panel",label:__("Colors","jetpack"),resetAll:N,hasInnerWrapper:!0,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:(0,a.jsxs)("div",{className:"color-block-support-panel__inner-wrapper",children:[(0,a.jsx)(l,{label:__("Active Tab","jetpack"),settings:A}),(0,a.jsx)(l,{label:__("Inactive Tab","jetpack"),settings:S}),(0,a.jsx)(l,{label:__("Tab Border","jetpack"),settings:E})]})}),(0,a.jsx)(n.ContrastChecker,{backgroundColor:r,textColor:i}),(0,a.jsx)(n.ContrastChecker,{backgroundColor:c,textColor:u}),(0,a.jsxs)(o.__experimentalToolsPanel,{label:__("Tab dimensions","jetpack"),resetAll:N,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Font size","jetpack"),hasValue:I.tabFontSize,onDeselect:C.tabFontSize,isShownByDefault:!0,children:(0,a.jsx)(n.FontSizePicker,{value:f,onChange:C.tabFontSize,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Padding","jetpack"),hasValue:I.tabPadding,onDeselect:C.tabPadding,isShownByDefault:!0,children:(0,a.jsx)(o.BoxControl,{label:__("Padding","jetpack"),values:b,onChange:C.tabPadding,allowReset:!1,__next40pxDefaultSize:!0})})]}),(0,a.jsx)(o.PanelRow,{children:(0,a.jsx)(o.Button,{variant:"secondary",onClick:P,children:__("Reset","jetpack")})})]}),(0,a.jsxs)(o.PanelBody,{title:__("Amounts","jetpack"),initialOpen:!1,className:"jp-donations-style-panel",children:[(0,a.jsx)(o.__experimentalToolsPanel,{className:"color-block-support-panel",label:__("Colors","jetpack"),resetAll:N,hasInnerWrapper:!0,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:(0,a.jsx)("div",{className:"color-block-support-panel__inner-wrapper",children:(0,a.jsx)(l,{label:__("Selected Amount","jetpack"),settings:T})})}),(0,a.jsx)(n.ContrastChecker,{backgroundColor:d,textColor:p}),(0,a.jsxs)(o.__experimentalToolsPanel,{label:__("Amount settings","jetpack"),resetAll:N,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Font size","jetpack"),hasValue:I.amountFontSize,onDeselect:C.amountFontSize,isShownByDefault:!0,children:(0,a.jsx)(n.FontSizePicker,{value:_,onChange:C.amountFontSize,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Border","jetpack"),hasValue:I.amountBorder,onDeselect:C.amountBorder,isShownByDefault:!0,children:(0,a.jsx)(o.BorderBoxControl,{label:__("Border","jetpack"),value:x,onChange:C.amountBorder,enableAlpha:!0,enableStyle:!0,__next40pxDefaultSize:!0})}),(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Border radius","jetpack"),hasValue:I.amountBorderRadius,onDeselect:C.amountBorderRadius,isShownByDefault:!0,children:(0,a.jsx)(n.__experimentalBorderRadiusControl,{values:j,onChange:C.amountBorderRadius})})]}),(0,a.jsx)(o.PanelRow,{children:(0,a.jsx)(o.Button,{variant:"secondary",onClick:B,children:__("Reset","jetpack")})})]}),(0,a.jsxs)(o.PanelBody,{title:__("Donate button","jetpack"),initialOpen:!1,className:"jp-donations-style-panel",children:[(0,a.jsxs)(o.__experimentalToolsPanel,{label:__("Button settings","jetpack"),resetAll:N,headingLevel:3,__experimentalFirstVisibleItemClass:"first",__experimentalLastVisibleItemClass:"last",children:[(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Font size","jetpack"),hasValue:I.buttonFontSize,onDeselect:C.buttonFontSize,isShownByDefault:!0,children:(0,a.jsx)(n.FontSizePicker,{value:v,onChange:C.buttonFontSize,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Padding","jetpack"),hasValue:I.buttonPadding,onDeselect:C.buttonPadding,isShownByDefault:!0,children:(0,a.jsx)(o.BoxControl,{label:__("Padding","jetpack"),values:y,onChange:C.buttonPadding,allowReset:!1,__next40pxDefaultSize:!0})}),(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Radius","jetpack"),hasValue:I.buttonBorderRadius,onDeselect:C.buttonBorderRadius,isShownByDefault:!0,children:(0,a.jsx)(n.__experimentalBorderRadiusControl,{values:w,onChange:C.buttonBorderRadius})}),(0,a.jsx)(o.__experimentalToolsPanelItem,{label:__("Alignment","jetpack"),hasValue:I.buttonAlignment,onDeselect:D.buttonAlignment,isShownByDefault:!0,children:(0,a.jsxs)(o.__experimentalToggleGroupControl,{label:__("Alignment","jetpack"),value:k||"",onChange:C.buttonAlignment,isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[(0,a.jsx)(o.__experimentalToggleGroupControlOption,{value:"left",label:__("Left","jetpack")}),(0,a.jsx)(o.__experimentalToggleGroupControlOption,{value:"center",label:__("Center","jetpack")}),(0,a.jsx)(o.__experimentalToggleGroupControlOption,{value:"right",label:__("Right","jetpack")}),(0,a.jsx)(o.__experimentalToggleGroupControlOption,{value:"full",label:__("Full width","jetpack")})]})})]}),(0,a.jsx)(o.PanelRow,{children:(0,a.jsx)(o.Button,{variant:"secondary",onClick:R,children:__("Reset","jetpack")})})]})]})}},32299(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(94715),o=r(47143),s=r(27723),i=r(72730),a=r(91376),c=r(75703),l=r(10790);const __=s.__,u=(0,c.OI)(),d=({activeTab:e,attributes:t,setAttributes:r})=>{const{currency:c,oneTimeDonation:d,monthlyDonation:p,annualDonation:h,showCustomAmount:m,customAmountPlaceholder:g,chooseAmountText:f=u.chooseAmountText,customAmountText:b=u.customAmountText}=t,v={"one-time":"oneTimeDonation","1 month":"monthlyDonation","1 year":"annualDonation"}[e],y=e=>t[v][e],k=(e,n)=>{const o=t[v];r({[v]:{...o,[e]:n}})},w=(0,i.Xj)(c),_=y("amounts"),x=(0,o.useSelect)(e=>e("core/rich-text").getFormatTypes(),[]).map(e=>e.name).filter(e=>"core/link"!==e);return(0,l.jsxs)("div",{className:"donations__tab",children:[(0,l.jsx)(n.RichText,{tagName:"h4",placeholder:__("Write a message…","jetpack"),value:y("heading")??u[v]?.heading,onChange:e=>k("heading",e)}),(0,l.jsx)(n.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:f,onChange:e=>r({chooseAmountText:e})}),(0,l.jsx)("div",{className:"donations__amounts",children:_.map((e,t)=>(0,l.jsx)(a.A,{currency:c,defaultValue:w[t],label:(0,s.sprintf)( | |
| 3 | 16 | // translators: %d: Tier level e.g: "1", "2", "3" |
| 4 | -__("Tier %d","jetpack"),t+1),key:`jetpack-donations-amount-${t}`,onChange:e=>((e,t)=>{const n=[...w];n[t]=e,k("amounts",n)})(e,t),value:e})))),h&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:g,onChange:e=>c({customAmountText:e})}),(0,r.createElement)(l.Z,{currency:u,label:__("Custom amount","jetpack"),defaultValue:100*(0,s.hj)(u),className:"donations__custom-amount",disabled:!0})),(0,r.createElement)("hr",{className:"donations__separator"}),(0,r.createElement)(o.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:b("extraText"),onChange:e=>k("extraText",e)}),(0,r.createElement)("div",{className:"wp-block-button donations__donate-button-wrapper"},(0,r.createElement)(o.RichText,{className:"wp-block-button__link donations__donate-button",placeholder:__("Write a message…","jetpack"),value:b("buttonText"),onChange:e=>{return t=e,void c({oneTimeDonation:{...p,buttonText:t},monthlyDonation:{...d,buttonText:t},annualDonation:{...m,buttonText:t}});var t},allowedFormats:E})))}},72833:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),l=n(16367),c=n(82275),u=n(91757);const __=a.__;t.Z=e=>{const{attributes:t,className:n,products:a,setAttributes:i}=e,{oneTimeDonation:p,monthlyDonation:d,annualDonation:m}=t,[h,f]=(0,o.useState)("one-time"),g=(0,o.useCallback)((e=>h===e),[h]),v={"one-time":{title:__("One-Time","jetpack")},...d.show&&{"1 month":{title:__("Monthly","jetpack")}},...m.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,o.useEffect)((()=>{p.planId===a["one-time"]&&d.planId===a["1 month"]&&m.planId===a["1 year"]||i({...a["one-time"]&&{oneTimeDonation:{...p,planId:a["one-time"]}},...a["1 month"]&&{monthlyDonation:{...d,planId:a["1 month"]}},...a["1 year"]&&{annualDonation:{...m,planId:a["1 year"]}}})}),[p,d,m,i,a]),(0,o.useEffect)((()=>{!d.show&&g("1 month")&&f("one-time"),!m.show&&g("1 year")&&f("one-time")}),[d,m,f,g]),(0,r.createElement)("div",{className:n},(0,r.createElement)(l.U,{blockName:"donations"}),(0,r.createElement)("div",{className:"donations__container"},Object.keys(v).length>1&&(0,r.createElement)("div",{className:"donations__nav"},Object.entries(v).map((e=>{let[t,{title:n}]=e;return(0,r.createElement)("div",{role:"button",tabIndex:0,className:s()("donations__nav-item",{"is-active":g(t)}),onClick:()=>f(t),onKeyDown:()=>f(t),key:`jetpack-donations-nav-item-${t} `},n)}))),(0,r.createElement)("div",{className:"donations__content"},(0,r.createElement)(u.Z,{activeTab:h,attributes:t,setAttributes:i}))),(0,r.createElement)(c.Z,e))}},92868:function(e,t,n){"use strict";n.d(t,{IJ:function(){return o},Q7:function(){return a},Wh:function(){return r}});const r=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,o=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,a="https://www.eventbrite.com/e/test-event-tickets-123456789"},6949:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__,i=e=>{let{setEditingUrl:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},1344:function(e,t,n){"use strict";var r=n(24717);t.Z=[r.Z]},24717:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(4981),i=n(65736),s=n(65235),l=n.n(s),c=n(92819);const _x=i._x,u=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];t.Z={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:n}=e;let r=n;r||(r=e.useModal?"modal":"inline");const o={...(0,c.omit)(e,["useModal",...u]),className:t&&t.replace("is-style-outline",""),style:r},i=(0,c.pick)(e,u);return[o,[(0,a.createBlock)("jetpack/button",{element:"a",text:i.text||_x("Register","verb: e.g. register for an event.","jetpack"),...i,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function(e){let{attributes:t}=e;const{eventId:n,useModal:a,url:i,style:s}=t;if(n)return a||"modal"===s?function(e){const{backgroundColor:t,borderRadius:n,customBackgroundColor:a,customTextColor:i,eventId:s,text:c,textColor:u,url:p}=e,d=(0,o.getColorClassName)("color",u),m=(0,o.getColorClassName)("background-color",t),h=l()("wp-block-button__link",{"has-text-color":u||i,[d]:d,"has-background":t||a,[m]:m,"no-border-radius":0===n}),f={backgroundColor:m?void 0:a,color:d?void 0:i,borderRadius:n?n+"px":void 0};return(0,r.createElement)("div",{className:"wp-block-button"},(0,r.createElement)(o.RichText.Content,{className:h,href:p,id:`eventbrite-widget-${s}`,rel:"noopener noreferrer",role:"button",style:f,tagName:"a",target:"_blank",value:c}))}(t):i&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:i},i)},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,c.isEmpty)(t)||(0,c.some)((0,c.pick)(e,u),Boolean))}},16078:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(69307),l=n(65736),c=n(57538),u=n(4554),p=n(23621),d=n(33711),m=n(92868),h=n(6949),f=n(8964),g=n(77825);const __=l.__,_x=l._x,v=(0,o.dM)(d),b={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}};class k extends s.Component{state={editedUrl:this.props.attributes.url||"",editingUrl:!1,isResolvingUrl:!1};componentDidMount(){const{url:e}=this.props.attributes;this.setUrl(e)}setUrl=e=>{const{attributes:t,noticeOperations:n,setAttributes:r}=this.props,{style:o}=t;if(!e||m.Q7===e||"modal"===o)return;const a=(0,g.Ve)(e);if(a){const t={eventId:a,url:e};(0,p.Z)(t.url,this.setIsResolvingUrl).then((e=>{const o=(0,u.S)(d.attributes,{...t,url:e});r(o),this.setState({editedUrl:e}),n.removeAllNotices()})).catch((()=>{r({eventId:void 0,url:void 0}),this.setErrorNotice()}))}else this.setErrorNotice()};setIsResolvingUrl=e=>this.setState({isResolvingUrl:e});setEditingUrl=e=>this.setState({editingUrl:e});setErrorNotice=()=>{const{noticeOperations:e,onReplace:t}=this.props,{editedUrl:n}=this.state;e.removeAllNotices(),e.createErrorNotice((0,r.createElement)(r.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,r.createElement)(i.Button,{variant:"link",onClick:()=>(0,g.N3)(n,t)},_x("Convert block to link","button label","jetpack"))))};submitForm=e=>{e&&e.preventDefault(),this.setUrl((0,g.qq)(this.state.editedUrl)),this.setState({editingUrl:!1})};cannotEmbed=()=>{const{url:e}=this.props.attributes,{isResolvingUrl:t}=this.state;return!t&&e&&!m.Wh.test(e)};renderLoading(){return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(i.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack")))}renderInspectorControls(){const{style:e}=this.props.attributes,{attributes:t,clientId:n,setAttributes:o}=this.props,a=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,r.createElement)("div",{className:"block-editor-block-preview__container"},(0,r.createElement)("img",{src:f,alt:__("In page Eventbrite checkout example","jetpack")}))},{value:"modal",label:__("Button & Modal","jetpack")}];return(0,r.createElement)(c.Z,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:n,styleOptions:a,onSelectStyle:o,activeStyle:e,attributes:t,viewportWidth:130})}renderEditEmbed(){const{className:e,noticeUI:t}=this.props,{editedUrl:n}=this.state,a=(0,o.Wp)()||(0,o.Ug)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,r.createElement)("div",{className:e},(0,r.createElement)(i.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:v,notices:t},(0,r.createElement)("form",{onSubmit:this.submitForm},(0,r.createElement)("input",{type:"url",value:n,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:e=>this.setState({editedUrl:e.target.value})}),(0,r.createElement)(i.Button,{variant:"secondary",type:"submit"},_x("Embed","submit button label","jetpack"))),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(i.ExternalLink,{href:a},__("Learn more about Eventbrite embeds","jetpack")))))}renderInlinePreview(){const{className:e}=this.props,{eventId:t}=this.props.attributes;if(!t)return;const n=`eventbrite-widget-${t}`,o=`\n\t\t\t<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"><\/script>\n\t\t\t<style>\n\t\t\t\t/* Prevent scrollbar on the embed preview */\n\t\t\t\tbody {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t/* Eventbrite embeds have a CSS height transition on loading, which causes <Sandbox>\n\t\t\t\tto not recognise the resizing. We need to disable that transition. */\n\t\t\t\t* {\n\t\t\t\t\ttransition: none !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\twindow.EBWidgets.createWidget({\n\t\t\t\t\twidgetType: 'checkout',\n\t\t\t\t\teventId: ${t},\n\t\t\t\t\tiframeContainerId: '${n}',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id="${n}"></div>\n\t\t`;return(0,r.createElement)("div",{className:e},(0,r.createElement)(i.SandBox,{html:o}),(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay"}))}render(){const{attributes:e}=this.props,{url:t,style:n}=e,{editingUrl:o,isResolvingUrl:i}=this.state;return i?this.renderLoading():o||!t||this.cannotEmbed()?this.renderEditEmbed():(0,r.createElement)(r.Fragment,null,this.renderInspectorControls(),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(h.J,{setEditingUrl:this.setEditingUrl})),"modal"===n?(0,r.createElement)(a.InnerBlocks,{template:[[b.name,b.attributes]],templateLock:"all"}):this.renderInlinePreview())}}t.Z=(0,i.withNotices)(k)},83772:function(e,t,n){"use strict";var r=n(4981),o=n(31985),a=n(33711),i=n(92868),s=n(1344),l=n(16078),c=n(86435);(0,o.S)(a,{edit:l.Z,save:c.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(i.Wh.test(e.textContent)||i.IJ.test(e.textContent)),transform:e=>(0,r.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},deprecated:s.Z})},86435:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(52175);function a(e){let{attributes:t}=e;const{eventId:n,style:a,url:i}=t;if(n)return"modal"===a?(0,r.createElement)("div",null,(0,r.createElement)(o.InnerBlocks.Content,null)):i&&(0,r.createElement)("a",{className:"eventbrite__direct-link",href:i},i)}},77825:function(e,t,n){"use strict";n.d(t,{N3:function(){return i},Ve:function(){return s},qq:function(){return l}});var r=n(51806),o=n(4981),a=n(69307);function i(e,t){const n=(0,r.createElement)("a",{href:e},e);t((0,o.createBlock)("core/paragraph",{content:(0,a.renderToString)(n)}))}function s(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^\/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e&&"string"==typeof e?e.trim():null}},12084:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736);const __=i.__;t.Z=(0,a.forwardRef)((function(e,t){let{onSubmit:n,onChange:a,value:i=""}=e;return(0,r.createElement)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:n},(0,r.createElement)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:i,onChange:a,ref:t,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,r.createElement)(o.Button,{id:"wp-block-jetpack-gif_search-button",variant:"secondary",type:"submit"},__("Search","jetpack")))}))},72844:function(e,t,n){"use strict";n.d(t,{U:function(){return r}});const r="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW"},57852:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(52175),a=n(55609);function i(){return(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{className:"components-panel__body-gif-branding"},(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22"},(0,r.createElement)(a.Path,{d:"M4.6 5.9H0v10h1.6v-3.1h3c4.8 0 4.8-6.9 0-6.9zm0 5.4h-3v-4h3c2.6.1 2.6 4 0 4zM51.2 12.3c2-.3 2.7-1.7 2.7-3.1 0-1.7-1.2-3.3-3.5-3.3h-4.6v10h1.6v-3.4h2.1l3 3.4h1.9l-.2-.3-3-3.3zM47.4 11V7.4h3c1.3 0 1.9.9 1.9 1.8s-.6 1.8-1.9 1.8h-3zM30.6 13.6L28 5.9h-1.1l-2.5 7.7-2.6-7.7H20l3.7 10H25l1.4-3.5L27.5 9l1.1 3.4 1.3 3.5h1.4l3.5-10h-1.7z"}),(0,r.createElement)(a.Path,{d:"M14.4 5.7c-3 0-5.1 2.2-5.1 5.2 0 2.6 1.6 5.1 5.1 5.1 3.5 0 5.1-2.5 5.1-5.2-.1-2.6-1.7-5.1-5.1-5.1zm-.1 8.9c-2.5 0-3.5-1.9-3.5-3.7 0-2.2 1.2-3.8 3.5-3.8 2.4 0 3.5 2 3.5 3.8.1 2-1 3.7-3.5 3.7zM57.7 11.6h5.5v-1.5h-5.5V7.4h5.7V5.9h-7.3v10h7.3v-1.6h-5.7zM38 14.3v-2.7h5.5v-1.5H38V7.4h5.7V5.9h-7.3v10h7.3v-1.6zM93 10.3l-2.7-4.4h-1.9V6l3.8 5.8v4.1h1.6v-4.1l4-5.8v-.1h-2zM69.3 5.9h-3.8v10h3.8c3.5 0 5.1-2.5 5-5.1-.1-2.5-1.6-4.9-5-4.9zm0 8.4h-2.2V7.4h2.2c2.3 0 3.4 1.7 3.4 3.4s-1 3.5-3.4 3.5zM86.3 10.7c.9-.4 1.4-1.1 1.4-2 0-2-1.5-2.8-3.4-2.8h-4.6v10h4.6c2 0 3.7-.7 3.7-2.8 0-.8-.5-2-1.7-2.4zm-5-3.4h3c1.2 0 1.8.7 1.8 1.4 0 .8-.6 1.3-1.8 1.3h-3V7.3zm3 7.1h-3v-2.9h3c.9 0 2.1.5 2.1 1.6 0 1-1.2 1.3-2.1 1.3zM113.9 13.3h5.3V16c-1.2.9-2.9 1.1-4 1.1-4.2 0-5.6-3.3-5.6-6 0-4.1 2.2-6.1 5.6-6.1 1.4 0 3.2.4 4.8 1.8l3.4-3.4C120.7.6 118.1 0 115.2 0c-7.8 0-11.4 5.6-11.4 11s3.1 10.9 11.4 10.9c4 0 7.6-1.4 8.9-4.1V8.6h-10.2v4.7zM171.9 8.5h-7.4V.6h-5.9v20.8h5.9v-7.8h7.4v7.8h5.9V.6h-5.9zM195.1.6l-4.5 7.1-4.3-7.1h-6.6v.2l7.9 12.3v8.3h5.9v-8.3L201.8.9V.6zM127.4.6h5.9v20.8h-5.9zM147.6.6h-10.1v20.8h5.9v-5.6h4.2c5.6-.1 8.3-3.4 8.3-7.6.1-4.1-2.7-7.6-8.3-7.6zm0 10.2h-4.2V5.6h4.2c1.6 0 2.5 1.2 2.5 2.6 0 1.4-.9 2.6-2.5 2.6z"}))))}},61266:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(69307),l=n(65736),c=n(65235),u=n.n(c),p=n(13625),d=n(12084),m=n(57852),h=n(27147),f=n(80163);const __=l.__,g=(0,o.dM)(p);t.Z=function(e){let{attributes:t,setAttributes:n,className:o,isSelected:l}=e;const{align:c,caption:v,giphyUrl:b,searchText:k,paddingTop:y}=t,w=u()(o,`align${c}`),[E,_]=(0,s.useState)(!1),C=(0,s.createRef)(),{isFetching:S,giphyData:x,fetchGiphyData:j}=(0,h.Z)(),L=()=>{C.current.focus(),_(!1)};(0,s.useEffect)((()=>{x&&x[0]&&n((0,f.ix)(x[0]))}),[x,n]);const P=e=>{e.preventDefault(),t.searchText&&!S&&j((0,f.Gr)(t.searchText))},A=e=>n({searchText:e.target.value});return(0,r.createElement)("div",{className:w},(0,r.createElement)(m.Z,null),b?(0,r.createElement)("figure",null,l&&(0,r.createElement)(d.Z,{onSubmit:P,onChange:A,value:k,ref:C}),l&&x&&x.length>1&&(0,r.createElement)("div",{className:"wp-block-jetpack-gif_thumbnails-container"},x.map((e=>{const t={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,r.createElement)("button",{className:"wp-block-jetpack-gif_thumbnail-container",key:e.id,onClick:t=>{t.preventDefault(),(e=>{n((0,f.ix)(e))})(e)},style:t})}))),(0,r.createElement)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:y}},(0,r.createElement)("div",{className:"wp-block-jetpack-gif_cover",onClick:L,onKeyDown:L,role:"button",tabIndex:"0"}),(0,r.createElement)("iframe",{src:b,title:k})),(!a.RichText.isEmpty(v)||l)&&!!b&&(0,r.createElement)(a.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:E,onFocus:()=>_(!1),onChange:e=>n({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:v})):(0,r.createElement)(i.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:g,label:p.title,instructions:__("Search for a term or paste a Giphy URL","jetpack")},(0,r.createElement)(d.Z,{onSubmit:P,onChange:A,value:k,ref:C})))}},63139:function(e,t,n){"use strict";var r=n(31985),o=n(13625),a=n(61266);(0,r.S)(o,{edit:a.Z,save:()=>null})},27147:function(e,t,n){"use strict";var r=n(69307);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const[t,n]=(0,r.useState)(!1),[o,a]=(0,r.useState)(e),[i,s]=(0,r.useState)("");return(0,r.useEffect)((()=>{if(!i)return;(async()=>{n(!0);const e=await fetch(i).then((e=>!!e.ok&&e)).catch((()=>!1));if(e){const t=await e.json(),n=void 0!==t.data.images?[t.data]:t.data;n[0].images&&a(n)}n(!1)})()}),[i]),{isFetching:t,giphyData:o,fetchGiphyData:s}}},80163:function(e,t,n){"use strict";n.d(t,{Gr:function(){return o},ix:function(){return s}});var r=n(72844);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=null;e=e.trim();const n=e.match(/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/);return n&&n[3]&&(t=function(){let e=arguments.length>1?arguments[1]:void 0;const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(e);return t[t.length-1]}(n[3],"-")),t?`https://api.giphy.com/v1/gifs/${encodeURIComponent(t)}?api_key=${encodeURIComponent(r.U)}`:(e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(r.U)}&limit=10`)(e)},a=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,i=e=>e?.embed_url,s=e=>({giphyUrl:i(e),paddingTop:a(e)})},4966:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(65736);const __=a.__,_x=a._x;t.Z=e=>{const{className:t,embedValue:n,onChange:a,onSubmit:i}=e;return(0,r.createElement)(o.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1},(0,r.createElement)("form",{onSubmit:i,className:t},(0,r.createElement)("textarea",{type:"text",value:n,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:a}),(0,r.createElement)(o.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack"))))}},81907:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(4981),s=n(55609),l=n(94333),c=n(69307),u=n(65736),p=n(90162),d=n(5416),m=n(4966),h=n(4525);const __=u.__,_x=u._x,f=(0,o.dM)(d);t.Z=(0,l.compose)(s.withNotices,(0,p.withViewportMatch)({isMobile:"< small"}))((function(e){const{attributes:{url:t,height:n},className:l,isMobile:u,isSelected:p,name:d,noticeOperations:g,noticeUI:v,setAttributes:b}=e,[k,y]=(0,c.useState)(t||""),[w,E]=(0,c.useState)(!1),[_,C]=(0,c.useState)(!1);(0,c.useEffect)((()=>{!p&&_&&C(!1)}),[p,_]);const S=()=>{C(!0)},x=e=>{e&&e.preventDefault();const t=(0,h.L7)(k.trim());if(!h.Wh.test(t.url))return g.removeAllNotices(),void g.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or Embed Code. Please note, you need to use the 'Public URL' or 'Embed Code', the 'Shareable Link' will not work.","jetpack"));b(t),E(!1),g.removeAllNotices()},j=(0,i.getBlockDefaultClassName)(d),L=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${u?"300":n}"></iframe>`,P=(0,r.createElement)(s.ExternalLink,{href:"https://en.support.wordpress.com/google-calendar/"},__("Enable Permissions for the calendar you want to share","jetpack")),A=(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(m.Z,{className:`${j}-embed-form-sidebar`,embedValue:k,onChange:e=>y(e.target.value),onSubmit:x}));if(w||!t){const e=(0,o.Wp)()||(0,o.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";return(0,r.createElement)("div",{className:l},A,(0,r.createElement)(s.Placeholder,{className:l,label:__("Google Calendar","jetpack"),icon:f,notices:v},(0,r.createElement)("ol",{className:`${j}-placeholder-instructions`},(0,r.createElement)("li",null,P),(0,r.createElement)("li",null,__("Paste the embed code you copied from your Google Calendar below","jetpack"))),(T=`${j}-embed-form-editor`,(0,r.createElement)("form",{onSubmit:x,className:T},(0,r.createElement)("textarea",{type:"text",value:k,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:e=>y(e.target.value)}),(0,r.createElement)(s.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))),(0,r.createElement)("div",{className:`${j}-placeholder-links`},(0,r.createElement)(s.ExternalLink,{href:e},__("Learn more","jetpack")))))}var T;return(0,r.createElement)("div",{className:l},A,(0,r.createElement)("div",null,(0,r.createElement)(s.SandBox,{html:L,onFocus:S}),!_&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:S})))}))},58710:function(e,t,n){"use strict";var r=n(4981),o=n(31985),a=n(5416),i=n(81907),s=n(77724),l=n(4525);(0,o.S)(a,{edit:i.Z,save:s.Z,transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:e=>{let{named:{domain:t,dir:n,query:r}}=e;return`https://${t}.google.com/${n}?${r}`}}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&l.Wh.test(e.textContent),transform:e=>(0,r.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})},{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&l.E6.test(e.innerHTML),transform:e=>{const{url:t,height:n}=(0,l.jj)(e.innerHTML.trim());return(0,r.createBlock)("jetpack/google-calendar",{url:t,height:n})}}]}})},77724:function(e,t,n){"use strict";var r=n(51806);t.Z=e=>{let{attributes:{url:t}}=e;return(0,r.createElement)("a",{href:t},t)}},4525:function(e,t,n){"use strict";n.d(t,{E6:function(){return a},L7:function(){return u},Wh:function(){return o},jj:function(){return c}});const r="s*https?://calendar.google.com/calendar",o=new RegExp(`^${r}`,"i"),a=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${r}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),i=new RegExp(`${r}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),s=/\s+(\w+)=(["'])(.*?)\2/gi;function l(e){const t=i.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function c(e){const t=a.exec(e);if(!t)return;const n={};return t.forEach(((e,t)=>{if(0===t)return;if(o.test(e))return void(n.url=e);let r;for(;null!==(r=s.exec(e));)n[r[1]]=r[3]})),{url:n.url,width:n.width,height:n.height}}function u(e){return a.test(e)?c(e):i.test(e)?{url:l(e)}:{url:e}}},8979:function(e,t){"use strict";t.Z={accessToken:{type:"string"},instagramUser:{type:"string"},columns:{type:"number",default:3,min:1,max:6},count:{type:"number",default:9,min:1,max:30},spacing:{type:"number",default:10,min:0,max:50},isStackedOnMobile:{type:"boolean",default:!0}}},696:function(e,t,n){"use strict";n.d(t,{D:function(){return o},u:function(){return r}});const r=30,o="jetpack-new-instagram-connection"},64129:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(55609),a=n(65736),i=n(696);const __=a.__,_n=a._n;function s(e){let{accountImageTotal:t,attributes:n,currentUserConnected:s,disconnectFromService:l,shouldRenderSidebarNotice:c,setAttributes:u}=e;const{accessToken:p,columns:d,count:m,instagramUser:h,isStackedOnMobile:f,spacing:g}=n;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Account Settings","jetpack")},(0,r.createElement)(o.PanelRow,null,(0,r.createElement)("span",null,__("Account","jetpack")),(0,r.createElement)(o.ExternalLink,{href:`https://www.instagram.com/${h}/`},"@",h)),s&&(0,r.createElement)(o.PanelRow,null,(0,r.createElement)(o.Button,{isDestructive:!0,variant:"link",onClick:()=>l(p)},__("Disconnect your account","jetpack")))),(0,r.createElement)(o.PanelBody,{title:__("Display Settings","jetpack")},c?(()=>{const e=t?(0,a.sprintf)(/* translators: placeholder is a number. */ | |
| 5 | -_n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",t,"jetpack"),t):__("There are currently no posts in your Instagram account.","jetpack");return(0,r.createElement)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice"},(0,r.createElement)(o.Notice,{isDismissible:!1,status:"info"},e))})():null,(0,r.createElement)(o.RangeControl,{label:__("Number of Posts","jetpack"),value:m,onChange:e=>u({count:e}),min:1,max:i.u}),(0,r.createElement)(o.RangeControl,{label:__("Number of Columns","jetpack"),value:d,onChange:e=>u({columns:e}),min:1,max:6}),(0,r.createElement)(o.RangeControl,{label:__("Image Spacing (px)","jetpack"),value:g,onChange:e=>u({spacing:e}),min:0,max:50}),(0,r.createElement)(o.ToggleControl,{label:__("Stack on mobile","jetpack"),checked:f,onChange:()=>u({isStackedOnMobile:!f})})))}},36420:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(69307),l=n(65736),c=n(65235),u=n.n(c),p=n(92819),d=n(4554),m=n(8979),h=n(696),f=n(64129),g=n(44961),v=n(79236),b=n(2681),k=n(75412);const __=l.__;t.Z=(0,i.withNotices)((e=>{const{attributes:t,className:n,isSelected:l,noticeOperations:c,noticeUI:y,setAttributes:w}=e,{accessToken:E,align:_,columns:C,count:S,isStackedOnMobile:x,spacing:j}=t;(0,s.useEffect)((()=>{const e=(0,d.S)(m.Z,t);(0,p.isEqual)(e,t)||w(e)}),[t,w]);const[L,P]=(0,s.useState)(E),{isRequestingWpcomConnectUrl:A,wpcomConnectUrl:T}=(0,b.Z)(),{images:N,isLoadingGallery:M,setImages:I}=(0,k.Z)({accessToken:E,noticeOperations:c,setAttributes:w,setSelectedAccount:P}),{connectToService:R,disconnectFromService:D,isConnecting:B,isRequestingUserConnections:Z,userConnections:F}=(0,v.Z)({accessToken:E,noticeOperations:c,selectedAccount:L,setAttributes:w,setImages:I,setSelectedAccount:P}),O=(0,o.Dp)(),U=S>N.length?N.length:S,z=!M&&(!E||(0,p.isEmpty)(N)),$=!z,H=E&&M&&(0,p.isEmpty)(N),q=!z&&!H,V=u()(n,{[`align${_}`]:_}),G=u()("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${C}`,{"is-stacked-on-mobile":x}),W={gridGap:j,"--latest-instagram-posts-spacing":j?`${j}px`:void 0},J={padding:j},K=()=>{L&&h.D!==L?w({accessToken:L,instagramUser:(0,p.find)(F,{token:L}).username}):R()};return(0,r.createElement)("div",{className:V},z&&(0,r.createElement)(i.Placeholder,{icon:"instagram",instructions:O?Z||F.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:y},O?(()=>{const e=F.length>0,t=[...(0,p.map)(F,(e=>({label:`@${e.username}`,value:e.token}))),{label:__("Add a new account","jetpack"),value:h.D}],n=B||Z||e&&!L;return(0,r.createElement)("div",null,e&&(0,r.createElement)(i.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>P(e),options:t,selected:L}),h.D===L&&(0,r.createElement)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions"},__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")),(0,r.createElement)(i.Button,{disabled:n,variant:"primary",onClick:K},B&&__("Connecting…","jetpack"),Z&&__("Loading your connections…","jetpack"),!B&&!Z&&__("Connect to Instagram","jetpack")))})():(0,r.createElement)(i.Button,{disabled:A||!T,href:T,variant:"secondary"},__("Connect to WordPress.com","jetpack"))),H&&(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(i.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack"))),q&&(0,r.createElement)("div",{className:G,style:W},(0,p.times)(l?S:U,(e=>(0,r.createElement)("span",{className:u()("wp-block-jetpack-instagram-gallery__grid-post"),key:e,style:J},(e=>{if(N[e]){const n=N[e];return(0,r.createElement)(g.Z,{alt:n.title||n.url,src:n.url,attributes:t,spacing:j})}return(0,r.createElement)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})})(e))))),$&&(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(f.Z,{accountImageTotal:N.length,attributes:t,currentUserConnected:O,disconnectFromService:D,shouldRenderSidebarNotice:$&&!H&&N.length<S,setAttributes:w})))}))},34575:function(e,t,n){"use strict";var r=n(31985),o=n(78544);(0,r.Z)(o.u,o.X)},44961:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(69307),a=n(65235),i=n.n(a);function s(e){let{src:t,alt:n,spacing:a}=e;const[s,l]=(0,o.useState)(!1),[c,u]=(0,o.useState)("auto"),p=(0,o.useRef)(),d=()=>{l(!0),u("auto")};(0,o.useEffect)((()=>{const e=t;if(e){const t=new window.Image;t.src=e,t.onload=d}p.current&&u(p.current.parentNode.getBoundingClientRect().width)}),[t]);const m=-1*a,h=i()("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":s}),f=s?{margin:m}:{margin:m,height:c},g=i()({"is-loaded":s});return(0,r.createElement)("span",{style:f,className:h},(0,r.createElement)("img",{alt:n,className:g,ref:p,src:t}))}},78544:function(e,t,n){"use strict";n.d(t,{X:function(){return p},u:function(){return u}});var r=n(51806),o=n(4981),a=n(65736),i=n(70355),s=n(81427),l=n(8979),c=n(36420);const __=a.__,_x=a._x,u="instagram-gallery",p={title:__("Latest Instagram Posts","jetpack"),description:__("Display an automatically updating list of the latest posts from your Instagram feed.","jetpack"),icon:{src:s.yu,foreground:(0,i.m)()},category:"embed",keywords:[_x("images","block search term","jetpack"),_x("photos","block search term","jetpack"),_x("pictures","block search term","jetpack")],supports:{align:!0,html:!1},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!!n?.raw&&"wpcom_instagram_widget"===t},transform:e=>{let{instance:t}=e;return(0,o.createBlock)("jetpack/instagram-gallery",{columns:t.raw.columns,count:t.raw.count,accessToken:t.raw.token_id})}}]},attributes:l.Z,edit:c.Z,save:e=>{let{attributes:{instagramUser:t}}=e;return t&&(0,r.createElement)("div",null,(0,r.createElement)("a",{href:`https://www.instagram.com/${t}/`,rel:"noopener noreferrer",target:"_blank"},`https://www.instagram.com/${t}/`))}}},79236:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(13419),o=n(7211),a=n(86989),i=n.n(a),s=n(69307),l=n(65736),c=n(92819),u=n(696);const __=l.__;function p(e){let{accessToken:t,noticeOperations:n,selectedAccount:a,setAttributes:l,setImages:p,setSelectedAccount:d}=e;const[m,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[v,b]=(0,s.useState)([]),k=(0,r.Dp)();(0,s.useEffect)((()=>{!t&&k&&(g(!0),i()({path:"/wpcom/v2/instagram-gallery/connections"}).then((e=>{g(!1),b(e)})).catch((()=>{g(!1),b([])})))}),[t,k]),(0,s.useEffect)((()=>{u.D===a||(0,c.find)(v,{token:a})||d(void 0)}),[a,d,v]);return{connectToService:()=>{n.removeAllNotices(),h(!0),i()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then((e=>{const t=new o.Z;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",(e=>{let{keyring_id:t}=e;if(h(!1),t){const e=t.toString();l({accessToken:e}),d(e)}})),t.on("close",(e=>{"connect-to-instagram-popup"===e&&h(!1)}))})).catch((()=>{n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),h(!1)}))},disconnectFromService:()=>{n.removeAllNotices(),l({accessToken:void 0,instagramUser:void 0}),p([])},isConnecting:m,isRequestingUserConnections:f,userConnections:v}}},2681:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(13419),o=n(86989),a=n.n(o),i=n(9818),s=n(69307),l=n(96483);function c(){const{isAutoDraft:e}=(0,i.useSelect)((e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}})),{savePost:t}=(0,i.useDispatch)("core/editor"),[n,o]=(0,s.useState)(),[c,u]=(0,s.useState)(!1),p=(0,r.Dp)();return(0,s.useEffect)((()=>{p||n||c||(e?t():(u(!0),a()({path:(0,l.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((e=>{o(e),u(!1)}))))}),[p,e,c,t,n]),{isRequestingWpcomConnectUrl:c,wpcomConnectUrl:n}}},75412:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(86989),o=n.n(r),a=n(69307),i=n(65736),s=n(96483),l=n(92819),c=n(696);const __=i.__;function u(e){let{accessToken:t,noticeOperations:n,setAttributes:r,setSelectedAccount:i}=e;const[u,p]=(0,a.useState)([]),[d,m]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{t&&(n.removeAllNotices(),m(!0),o()({path:(0,s.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:t,count:c.u})}).then((e=>{let{external_name:t,images:o}=e;if(m(!1),!o||!(0,l.isArray)(o))return n.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),p([]),r({accessToken:void 0,instagramUser:void 0}),void i(void 0);(0,l.isEmpty)(o)&&n.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),r({instagramUser:t}),p(o)})).catch((()=>{m(!1),p([]),r({accessToken:void 0,instagramUser:void 0}),i(void 0)})))}),[t,r,i]),{images:u,isLoadingGallery:d,setImages:p}}},64968:function(e,t,n){"use strict";n.d(t,{Cw:function(){return a},N3:function(){return r},sf:function(){return o}});const r="processing",o="success",a="error"},84038:function(e,t,n){"use strict";n.d(t,{Q:function(){return l}});var r=n(51806),o=n(55609),a=n(65736),i=n(64968),s=n(24535);const __=a.__;function l(e){let{auditionNotification:t,clearAudition:n,setAttributes:a,emailPlaceholder:l,processingLabel:c,successLabel:u,errorLabel:p,interests:d,signupFieldTag:m,signupFieldValue:h,connectURL:f}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Text Elements","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Email Placeholder","jetpack"),value:l,onChange:e=>{a({emailPlaceholder:e}),n()}})),(0,r.createElement)(o.PanelBody,{title:__("Notifications","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Processing text","jetpack"),value:c,onChange:e=>{a({processingLabel:e}),t(i.N3)}}),(0,r.createElement)(o.TextControl,{label:__("Success text","jetpack"),value:u,onChange:e=>{a({successLabel:e}),t(i.sf)}}),(0,r.createElement)(o.TextControl,{label:__("Error text","jetpack"),value:p,onChange:e=>{a({errorLabel:e}),t(i.Cw)}})),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Groups","jetpack")},(0,r.createElement)(s.Z,{interests:d,onChange:(e,t)=>{const n=[...new Set([...d,e])].filter((n=>!(n===e&&!t)&&n));a({interests:n})}}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/send-groups-audience/"},__("Learn about groups","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Signup Location Tracking","jetpack")},(0,r.createElement)(o.TextControl,{label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:m,onChange:e=>a({signupFieldTag:e})}),(0,r.createElement)(o.TextControl,{label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:h,onChange:e=>a({signupFieldValue:e})}),(0,r.createElement)(o.ExternalLink,{href:"https://mailchimp.com/help/determine-webpage-signup-location/"},__("Learn about signup location tracking","jetpack"))),(0,r.createElement)(o.PanelBody,{title:__("Mailchimp Connection","jetpack")},(0,r.createElement)(o.ExternalLink,{href:f},__("Manage Connection","jetpack"))))}},748:function(e,t,n){"use strict";var r=n(4981),o=n(65736),a=n(92819);const __=o.__,i=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"];t.Z={attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},submitButtonText:{type:"string",default:__("Join my email list","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},submitButtonClasses:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},migrate:e=>{const t=(0,a.omit)(e,i),n={text:(o=e).submitButtonText||__("Join my email list","jetpack"),textColor:o.textButtonColor,customTextColor:o.customTextButtonColor,backgroundColor:o.backgroundButtonColor,customBackgroundColor:o.customBackgroundButtonColor};var o;return[t,[(0,r.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...n})]]},isEligible:(e,t)=>(0,a.isEmpty)(t)||(0,a.some)((0,a.pick)(e,i),Boolean),save:()=>null}},43818:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(86989),i=n.n(a),s=n(52175),l=n(55609),c=n(69307),u=n(65736),p=n(96483),d=n(65235),m=n.n(d),h=n(88322),f=n(64968),g=n(84038);const __=u.__,v=(0,o.dM)(h),b={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}};class k extends c.Component{constructor(){super(...arguments),this.state={audition:null,connected:0,connectURL:null,currentUserConnected:null},this.timeout=null}componentDidMount=()=>{this.apiCall()};onError=e=>{const{noticeOperations:t}=this.props;t.removeAllNotices(),t.createErrorNotice(e)};apiCall=()=>{const e=(0,o.Dp)();if(e){const t={path:"/wpcom/v2/mailchimp",method:"GET"};i()(t).then((t=>{const n=t.connect_url,r="connected"===t.code?1:2;this.setState({currentUserConnected:e,connected:r,connectURL:n})}),(t=>{this.setState({currentUserConnected:e,connected:2,connectURL:null}),this.onError(t.message)}))}else i()({path:(0,p.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then((t=>{const n=t;this.setState({currentUserConnected:e,connected:2,connectURL:n})}))};auditionNotification=e=>{this.setState({audition:e}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(this.clearAudition,3e3)};clearAudition=()=>{this.setState({audition:null})};labelForAuditionType=e=>{const{attributes:t}=this.props,{processingLabel:n,successLabel:r,errorLabel:o}=t;return e===f.N3?n:e===f.sf?r:e===f.Cw?o:null};roleForAuditionType=e=>e===f.Cw?"alert":"status";render=()=>{const{attributes:e,className:t,notices:n,noticeUI:o,setAttributes:a}=this.props,{audition:i,connected:u,connectURL:p,currentUserConnected:d}=this.state,{emailPlaceholder:h,consentText:f,interests:k,processingLabel:y,successLabel:w,errorLabel:E,preview:_,signupFieldTag:C,signupFieldValue:S}=e,x="wp-block-jetpack-mailchimp",j=(0,r.createElement)(l.Placeholder,{icon:v,notices:n,className:"wp-block-jetpack-mailchimp",label:__("Mailchimp","jetpack")},(0,r.createElement)("div",{className:"align-center"},(0,r.createElement)(l.Spinner,null))),L=(0,r.createElement)(l.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:v,label:__("Mailchimp","jetpack"),notices:n,instructions:__("You need to connect your Mailchimp account and choose an audience in order to start collecting Email subscribers.","jetpack")},(0,r.createElement)(l.Button,{variant:"secondary",href:p,target:"_blank"},__("Set up Mailchimp form","jetpack")),(0,r.createElement)("div",{className:`${x}-recheck`},(0,r.createElement)(l.Button,{variant:"link",onClick:this.apiCall},__("Re-check Connection","jetpack")))),P=(0,r.createElement)(l.Placeholder,{className:"wp-block-jetpack-mailchimp",icon:v,label:__("Mailchimp","jetpack"),notices:n,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack")},(0,r.createElement)(l.Button,{variant:"secondary",href:p},__("Connect to WordPress.com","jetpack"))),A=(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(g.Q,{auditionNotification:this.auditionNotification,clearAudition:this.clearAudition,emailPlaceholder:h,processingLabel:y,successLabel:w,errorLabel:E,interests:k,setAttributes:this.props.setAttributes,signupFieldTag:C,signupFieldValue:S,connectURL:p})),T=m()(t,{[`${x}_notication-audition`]:i}),N=(0,r.createElement)("div",{className:T},(0,r.createElement)(l.TextControl,{"aria-label":h,className:"wp-block-jetpack-mailchimp_text-input",disabled:!0,onChange:()=>!1,placeholder:h,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,r.createElement)(s.InnerBlocks,{template:[[b.name,b.attributes]],templateLock:"all"}),(0,r.createElement)(s.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:f,onChange:e=>a({consentText:e}),inlineToolbar:!0}),i&&(0,r.createElement)("div",{className:`${x}_notification ${x}_${i}`,role:this.roleForAuditionType(i)},this.labelForAuditionType(i))),M=N;return(0,r.createElement)(c.Fragment,null,o,_&&M,!_&&0===u&&j,!_&&2===u&&d&&L,!_&&2===u&&!d&&P,!_&&1===u&&A,!_&&1===u&&N)}}t.Z=(0,l.withNotices)(k)},61204:function(e,t,n){"use strict";var r=n(31985),o=n(88322),a=n(748),i=n(43818),s=n(31745),l=n(84197);(0,r.S)(o,{edit:i.Z,save:s.Z,deprecated:[a.Z],transforms:l.Z})},24535:function(e,t,n){"use strict";var r=n(51806),o=n(86989),a=n.n(o),i=n(55609),s=n(69307);class l extends s.Component{state={interest_categories:[]};componentDidMount(){this.retrieveGroups()}retrieveGroups=()=>{a()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then((e=>{const{interest_categories:t}=e;this.setState({interest_categories:t})}))};render=()=>{const{interest_categories:e}=this.state,{interests:t,onChange:n}=this.props;return(0,r.createElement)(s.Fragment,null,e&&(e||[]).map((e=>e.interests.map((e=>(0,r.createElement)(i.CheckboxControl,{label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>n(e.id,t),key:e.id}))))))}}t.Z=l,l.defaultProps={interests:[],onChange:()=>null}},31745:function(e,t,n){"use strict";var r=n(51806),o=n(52175);t.Z=()=>(0,r.createElement)(o.InnerBlocks.Content,null)},84197:function(e,t,n){"use strict";var r=n(4981);t.Z={to:[{type:"block",blocks:["jetpack/subscriptions"],transform:()=>(0,r.createBlock)("jetpack/subscriptions")}]}},2944:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(31852);const __=i.__;class l extends a.Component{render(){const{onClose:e,onAddPoint:t,onError:n,apiKey:a,mapProvider:i}=this.props;return(0,r.createElement)(o.Button,{className:"component__add-point"},__("Add marker","jetpack"),(0,r.createElement)(o.Popover,{className:"component__add-point__popover",position:"bottom center"},(0,r.createElement)(o.Button,{className:"component__add-point__close",onClick:e},(0,r.createElement)(o.Dashicon,{icon:"no"})),(0,r.createElement)(s.Z,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:a,onError:n,mapProvider:i})))}}l.defaultProps={onAddPoint:()=>{},onClose:()=>{},onError:()=>{},mapProvider:"mapbox"},t.Z=l},75890:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(69307),s=n(21035),l=n(99128);const c=(0,i.forwardRef)(((e,t)=>{if("mapkit"===e.mapProvider){const n={...e,ref:null};return(0,a.createElement)(l.Z,o()({},n,{ref:t}))}return(0,a.createElement)(s.Z,o()({},e,{ref:t}))}));t.Z=c},75385:function(e,t,n){"use strict";var r=n(51806),o=n(61323),a=n(82891);t.Z=e=>"mapkit"===e.mapProvider?(0,r.createElement)(a.Z,e):(0,r.createElement)(o.Z,e)},61323:function(e,t,n){"use strict";var r=n(69307),o=n(84634);class a extends r.Component{componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=(0,o.xt)(e),this.infowindow.setDOMContent(this.el),this.infowindow.on("close",this.closeClick)}componentDidUpdate(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}render(){return this.el?(0,r.createPortal)(this.props.children,this.el):null}closeClick=()=>{this.props.unsetActiveMarker()};openWindow(){const{map:e,activeMarker:t}=this.props;this.infowindow.setLngLat(t.getPoint()).addTo(e)}closeWindow(){this.infowindow.remove()}}a.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null},t.Z=a},82891:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(72672);const __=i.__,l=()=>{const{activeMarker:e,setActiveMarker:t,calloutReference:n,admin:i,points:l,setPoints:c}=(0,s.qw)(),[u,p]=(0,a.useState)(l),[d,m]=(0,a.useState)(!1),{title:h,caption:f}=u.find((t=>t.id===e?.id))||{},g=t=>{const n=l.map((n=>n.id===e.id?{...n,...t}:n));p(n),m(!0)};return(0,a.useEffect)((()=>{!e&&d&&c(u)}),[e,d,u,c]),(0,a.useEffect)((()=>{p(l),m(!1)}),[l]),e&&n?(0,a.createPortal)((0,r.createElement)(a.Fragment,null,i&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.TextControl,{label:__("Marker Title","jetpack"),value:h,onChange:e=>g({title:e})}),(0,r.createElement)(o.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:f,rows:"2",tag:"textarea",onChange:e=>g({caption:e})}),(0,r.createElement)(o.Button,{onClick:()=>{const n=l.filter((t=>t.id!==e.id));p(n),m(!0),t(null)},className:"wp-block-jetpack-map__delete-btn"},(0,r.createElement)(o.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),!i&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)("h3",null,h),(0,r.createElement)("p",null,f))),n):null};l.defaultProps={},t.Z=l},32333:function(e,t,n){"use strict";var r=n(69307),o=n(85007),a=n(84634);class i extends r.Component{componentDidMount(){this.renderMarker()}componentWillUnmount(){this.marker&&this.marker.remove()}componentDidUpdate(){this.renderMarker()}handleClick=()=>{const{onClick:e}=this.props;e(this)};getPoint=()=>{const{point:e}=this.props;return[e.coordinates.longitude,e.coordinates.latitude]};renderMarker(){const{map:e,point:t,mapboxgl:n,markerColor:r,mapRef:i}=this.props,{handleClick:s}=this,l=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:c}=(0,o.bL)(i.current),u=this.marker?this.marker.getElement():c.createElement("div");this.marker?this.marker.setLngLat(l):(u.className="wp-block-jetpack-map-marker",this.marker=new n.Marker(u).setLngLat(l).setOffset([0,-19]).addTo(e),this.marker.getElement().addEventListener("click",s)),(0,a.zb)(u,r)}render(){return null}}i.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}},t.Z=i},21035:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(92819),l=n(85007),c=n(45388),u=n(90055),p=n(84634),d=n(51321),m=n(75385),h=n(32333);const __=i.__;class f extends a.Component{constructor(){super(...arguments),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,a.createRef)(),this.debouncedSizeMap=(0,s.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:n,markerColor:i}=this.props,{map:l,activeMarker:c,mapboxgl:u}=this.state,{onMarkerClick:p,deleteActiveMarker:d,updateActiveMarker:f}=this,g=(0,s.get)(c,"props.point")||{},{title:v,caption:b}=g,k=a.Children.map(n,(e=>{if("AddPoint"===(0,s.get)(e,"props.tagName"))return e})),y=l&&u&&e.map(((e,t)=>(0,r.createElement)(h.Z,{mapRef:this.mapRef,key:t,point:e,index:t,map:l,mapboxgl:u,markerColor:i,onClick:p}))),w=u&&(0,r.createElement)(m.Z,{activeMarker:c,map:l,mapboxgl:u,unsetActiveMarker:()=>this.setState({activeMarker:null})},c&&t&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.TextControl,{label:__("Marker Title","jetpack"),value:v,onChange:e=>f({title:e})}),(0,r.createElement)(o.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:b,rows:"2",tag:"textarea",onChange:e=>f({caption:e})}),(0,r.createElement)(o.Button,{onClick:d,className:"wp-block-jetpack-map__delete-btn"},(0,r.createElement)(o.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack"))),c&&!t&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)("h3",null,v),(0,r.createElement)("p",null,b)));return(0,r.createElement)(a.Fragment,null,(0,r.createElement)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef},y),w,k)}componentDidMount(){const{apiKey:e}=this.props;e&&this.loadMapLibraries()}componentWillUnmount(){this.debouncedSizeMap.cancel(),window.removeEventListener("resize",this.debouncedSizeMap)}componentDidUpdate(e){const{admin:t,apiKey:n,children:r,points:o,mapStyle:a,mapDetails:i,scrollToZoom:s,showFullscreenButton:l}=this.props,{map:c,fullscreenControl:u}=this.state;n&&n.length>0&&n!==e.apiKey&&this.loadMapLibraries(),r!==e.children&&!1!==r&&this.clearCurrentMarker(),o!==e.points&&this.setBoundsByMarkers(),o.length!==e.points.length&&this.clearCurrentMarker(),a===e.mapStyle&&i===e.mapDetails||c.setStyle(this.getMapStyle()),s!==e.scrollToZoom&&(s?c.scrollZoom.enable():c.scrollZoom.disable()),l!==e.showFullscreenButton&&(l?(c.addControl(u),t&&u._fullscreenButton&&(u._fullscreenButton.disabled=!0)):c.removeControl(u))}onMarkerClick=e=>{const{onMarkerClick:t}=this.props;this.setState({activeMarker:e}),t()};onMapClick=()=>{this.setState({activeMarker:null})};clearCurrentMarker=()=>{this.setState({activeMarker:null})};updateActiveMarker=e=>{const{points:t}=this.props,{activeMarker:n}=this.state,{index:r}=n.props,o=t.slice(0);(0,s.assign)(o[r],e),this.props.onSetPoints(o)};deleteActiveMarker=()=>{const{points:e}=this.props,{activeMarker:t}=this.state,{index:n}=t.props,r=e.slice(0);r.splice(n,1),this.props.onSetPoints(r),this.setState({activeMarker:null})};sizeMap=()=>{const{mapHeight:e}=this.props,{map:t}=this.state,n=this.mapRef.current;(0,d.Z)(n,e),t.resize(),this.setBoundsByMarkers()};updateZoom=()=>{const{zoom:e}=this.props,{map:t}=this.state;t.setZoom(e)};setBoundsByMarkers=()=>{const{admin:e,onSetMapCenter:t,onSetZoom:n,points:r,zoom:o}=this.props,{map:a,activeMarker:i,mapboxgl:s,zoomControl:l,boundsSetProgrammatically:c}=this.state;if(!a)return;if(r.length&&e?a.dragPan.disable():a.dragPan.enable(),!r.length)return;if(i)return;const u=(0,p.YB)(s,r);if(t(u.getCenter()),r.length>1){(0,p.k)(a,u),this.setState({boundsSetProgrammatically:!0});try{a.removeControl(l)}catch(e){}}else{if(a.setCenter(u.getCenter()),c){const e=12;a.setZoom(e),n(e)}else a.setZoom(parseInt(o,10));a.addControl(l),this.setState({boundsSetProgrammatically:!1})}};getMapStyle(){const{mapStyle:e,mapDetails:t}=this.props;return(0,u.h)(e,t)}getMapType(){const{mapStyle:e}=this.props;switch(e){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";default:return"ROADMAP"}}scriptsLoaded=()=>{const{mapCenter:e,points:t}=this.props;this.setState({loaded:!0}),t.length,this.initMap(e)};loadMapLibraries(){const{apiKey:e}=this.props,{currentWindow:t}=(0,l.bL)(this.mapRef.current),n={"mapbox-gl-js":()=>{(0,l.Dz)(t,"mapboxgl").then((t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)}))}};(0,l.Pp)(c,n,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:n,onMapLoaded:r,onError:o,scrollToZoom:a,showFullscreenButton:i,admin:s}=this.props;let l=null;try{l=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:(0,p.b2)(e),zoom:parseInt(n,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void o("mapbox_error",e.message)}a||l.scrollZoom.disable();const c=new t.FullscreenControl;l.on("error",(e=>{o("mapbox_error",e.error.message)}));const u=new t.NavigationControl({showCompass:!1,showZoom:!0});l.on("zoomend",(()=>{this.props.onSetZoom(l.getZoom())})),l.on("moveend",(()=>{const{onSetMapCenter:e,points:t}=this.props;t.length<1&&e(l.getCenter())})),l.getCanvas().addEventListener("click",this.onMapClick),this.setState({map:l,zoomControl:u,fullscreenControl:c},(()=>{this.debouncedSizeMap(),l.addControl(u),i&&(l.addControl(c),s&&c._fullscreenButton&&(c._fullscreenButton.disabled=!0)),this.mapRef.current.addEventListener("alignmentChanged",this.debouncedSizeMap),l.resize(),r(),this.setState({loaded:!0}),window.addEventListener("resize",this.debouncedSizeMap)}))}}f.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{},address:null},t.Z=f},99128:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(92819),i=n(32037),s=n(72672),l=n(96442),c=n(75385);const u=(0,o.forwardRef)(((e,t)=>{const{admin:n,points:l,onError:u,onSetPoints:d}=e,{loaded:m,error:h,mapkit:f,currentDoc:g,currentWindow:v}=(0,s.eV)(t),{map:b}=(0,s.$M)(f,m,t),k=o.Children.map(e.children,(e=>{if("AddPoint"===(0,a.get)(e,"props.tagName"))return e}));return(0,o.useEffect)((()=>{h&&u("mapkit_error",h)}),[h,u]),(0,r.createElement)(i.c,{value:{mapkit:f,map:b,loaded:m,currentDoc:g,currentWindow:v,admin:n,points:l,setPoints:d}},m&&f&&b?(0,r.createElement)(p,e):null,(0,r.createElement)("div",{style:{height:e.mapHeight?`${e.mapHeight}px`:"400px"},className:"wp-block-jetpack-map__gm-container",ref:t}),k,(0,r.createElement)(c.Z,{mapProvider:"mapkit"}))})),p=(0,o.memo)((e=>{let{address:t,mapCenter:n,mapStyle:r,zoom:a,onSetMapCenter:i,onSetZoom:c,onSetPoints:u,points:p,markerColor:d,onMarkerClick:m,onMapLoaded:h}=e;const{map:f,mapkit:g,setActiveMarker:v,setPreviousCenter:b,setCalloutReference:k,currentDoc:y}=(0,s.qw)(),w=(0,o.useRef)(m),E=(0,o.useRef)(u),_=(0,o.useCallback)((e=>{v(e),b(f.center),w.current&&w.current(e),f.setCenterAnimated(new g.Coordinate(e.coordinates.latitude,e.coordinates.longitude))}),[f,g,v,b,w]);return(0,s.LO)(n,i),(0,s.Xj)(r),(0,s.zZ)(a,c),(0,s.J2)(p,d,(0,l.eR)(y,k),_),(0,s.jo)(h),(0,s.mk)((e=>{v(null),e&&f.setCenterAnimated(e)})),(0,s.wd)(t,E),null}));u.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",mapCenter:{},address:null},t.Z=u},53036:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(57897);const __=i.__,l=(0,r.createElement)(a.SVG,{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(a.G,{id:"Page-1",fill:"none",fillRule:"evenodd"},(0,r.createElement)(a.G,{id:"outline-add_location-24px",transform:"translate(-5 -2)"},(0,r.createElement)(a.Polygon,{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,r.createElement)(a.Path,{d:"M12,2 C8.14,2 5,5.14 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9 C19,5.14 15.86,2 12,2 Z M7,9 C7,6.24 9.24,4 12,4 C14.76,4 17,6.24 17,9 C17,11.88 14.12,16.19 12,18.88 C9.92,16.21 7,11.85 7,9 Z M13,6 L11,6 L11,8 L9,8 L9,10 L11,10 L11,12 L13,12 L13,10 L15,10 L15,8 L13,8 L13,6 Z",id:"Shape",fill:"#000",fillRule:"nonzero"}))));t.Z=e=>{let{attributes:t,setAttributes:n,state:i,setState:c,context:u,mapRef:p,instanceId:d,minHeight:m,removeAPIKey:h,updateAPIKey:f,setPointVisibility:g,mapProvider:v}=e;const b=e=>{n({align:e}),p.current?.sizeMap&&setTimeout(p.current.sizeMap,0)};return"toolbar"===u?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockAlignmentToolbar,{value:t.align,onChange:b,controls:["center","wide","full"]}),(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarButton,{icon:l,label:__("Add a marker","jetpack"),onClick:g}))):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:t.markerColor,onChange:e=>n({markerColor:e}),label:__("Marker Color","jetpack")}]}),(0,r.createElement)(a.PanelBody,{title:__("Map Settings","jetpack")},(0,r.createElement)(a.BaseControl,{label:__("Height in pixels","jetpack"),id:`block-jetpack-map-height-input-${d}`},(0,r.createElement)("input",{type:"number",id:`block-jetpack-map-height-input-${d}`,className:"wp-block-jetpack-map__height_input",onChange:e=>{n({mapHeight:e.target.value}),e.target!==document.activeElement&&p.current&&setTimeout(p.current.sizeMap,0)},onBlur:e=>{const{mapHeight:r}=t;let o=parseInt(e.target.value,10);if(isNaN(o))o=null;else if(null==r){const e=p?.current?.mapRef??p;o=e?.current.offsetHeight}else o<m&&(o=m);n({mapHeight:o}),p.current.sizeMap&&setTimeout(p.current.sizeMap,0)},value:t.mapHeight||"",min:m,step:"10"})),(0,r.createElement)(a.RangeControl,{label:__("Zoom level","jetpack"),help:t.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:t.points.length>1,value:Math.round(t.zoom),onChange:e=>{n({zoom:e}),p.current&&p.current.updateZoom&&setTimeout(p.current.updateZoom,0)},min:0,max:22}),"mapbox"===v?(0,r.createElement)(a.ToggleControl,{label:__("Show street names","jetpack"),checked:t.mapDetails,onChange:e=>n({mapDetails:e})}):null,(0,r.createElement)(a.ToggleControl,{label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:t.scrollToZoom,onChange:e=>n({scrollToZoom:e})}),"mapbox"===v?(0,r.createElement)(a.ToggleControl,{label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:t.showFullscreenButton,onChange:e=>n({showFullscreenButton:e})}):null),t.points.length?(0,r.createElement)(a.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1},(0,r.createElement)(s.Z,{points:t.points,onChange:e=>{n({points:e})}})):null,"mapbox"===v?(0,r.createElement)(a.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1},(0,r.createElement)(a.TextControl,{help:"wpcom"===i.apiKeySource&&(0,r.createElement)(r.Fragment,null,__("You can optionally enter your own access token.","jetpack")," ",(0,r.createElement)(a.ExternalLink,{href:"https://account.mapbox.com/access-tokens/"},__("Find it on Mapbox","jetpack"))),label:__("Mapbox Access Token","jetpack"),value:i.apiKeyControl,onChange:e=>c({apiKeyControl:e})}),(0,r.createElement)(a.ButtonGroup,null,(0,r.createElement)(a.Button,{type:"button",onClick:f,disabled:!i.apiKeyControl||i.apiKeyControl===i.apiKey},__("Update Token","jetpack")),(0,r.createElement)(a.Button,{type:"button",onClick:h,disabled:"wpcom"===i.apiKeySource,variant:"secondary"},__("Remove Token","jetpack")))):null)}},55109:function(e,t,n){"use strict";var r=n(85888);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,showFullscreenButton:!0,className:t}},save:r.Z}},85888:function(e,t,n){"use strict";var r=n(51806),o=n(69307);class a extends o.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:o,points:a,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u}=e,p=a.map(((e,t)=>{const{longitude:n,latitude:o}=e.coordinates,a="https://www.google.com/maps/search/?api=1&query="+o+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:a},e.title))})),d=t?`align${t}`:null;return(0,r.createElement)("div",{className:d,"data-map-style":n,"data-map-details":o,"data-points":JSON.stringify(a),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null},a.length>0&&(0,r.createElement)("ul",null,p))}}t.Z=a},45051:function(e,t,n){"use strict";var r=n(95382);t.Z={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},preview:{type:"boolean",default:!1},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:n,...r}=e;return{...r,className:t}},save:r.Z}},95382:function(e,t,n){"use strict";var r=n(51806),o=n(69307);class a extends o.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:n,mapDetails:o,points:a,zoom:i,mapCenter:s,markerColor:l,scrollToZoom:c,mapHeight:u,showFullscreenButton:p}=e,d=a.map(((e,t)=>{const{longitude:n,latitude:o}=e.coordinates,a="https://www.google.com/maps/search/?api=1&query="+o+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:a},e.title))})),m=t?`align${t}`:null;return(0,r.createElement)("div",{className:m,"data-map-style":n,"data-map-details":o,"data-points":JSON.stringify(a),"data-zoom":i,"data-map-center":JSON.stringify(s),"data-marker-color":l,"data-scroll-to-zoom":c||null,"data-map-height":u||null,"data-show-fullscreen-button":p||null},a.length>0&&(0,r.createElement)("ul",null,d))}}t.Z=a},740:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(86989),i=n.n(a),s=n(52175),l=n(55609),c=n(94333),u=n(9818),p=n(69307),d=n(65736),m=n(81518),h=n(2944),f=n(32334),g=n(75890),v=n(53036),b=n(1555),k=n(96406),y=n(53289),w=n(32566);const __=d.__,E=(0,o.dM)(f),_={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1};class C extends p.Component{constructor(){super(...arguments),this.state={addPointVisibility:!1,apiState:0},this.mapRef=(0,p.createRef)()}geoCodeAddress=(e,t)=>{t&&"mapkit"!==this.getMapProvider()&&(0,b.P)(e,t).then((e=>{if(e.features?.length){const t=e.features[0],n=[{title:t.text,placeTitle:t.text,caption:t.place_name,id:t.id,coordinates:{latitude:t.center[1],longitude:t.center[0]}}];this.props.setAttributes({points:n})}else this.onError(null,__("Could not find the coordinates of the provided address. Displaying default location. Feel free to add the location manually.","jetpack"))})).catch((e=>this.onError(null,e.message)))};componentDidUpdate=e=>{const t=this.props.attributes?.address,n=e.attributes?.address,r=this.props.attributes?.className,o=e.attributes?.className;t&&n!==t&&this.geoCodeAddress(t,this.state.apiKey),r&&o!==r&&!this.state.apiKey&&(this.setState({apiState:0}),this.apiCall())};addPoint=e=>{const{attributes:t,setAttributes:n}=this.props,{points:r}=t,o=r.slice(0);let a=!1;r.map((t=>{t.id===e.id&&(a=!0)})),a||(o.push(e),n({points:o}),this.setState({addPointVisibility:!1}))};setPointVisibility=()=>{this.setState({addPointVisibility:!0})};updateAPIKeyControl=e=>{this.setState({apiKeyControl:e.target.value})};updateAPIKey=()=>{const{noticeOperations:e}=this.props,{apiKeyControl:t}=this.state;e.removeAllNotices(),t&&this.apiCall(t,"POST")};removeAPIKey=()=>{this.apiCall(null,"DELETE")};apiCall(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET";return new Promise(((n,r)=>{const{noticeOperations:o}=this.props,a="/wpcom/v2/service-api-keys/mapbox",s=e?{path:a,method:t,data:{service_api_key:e}}:{path:a,method:t};this.setState({apiRequestOutstanding:!0},(()=>{i()(s).then((e=>{let{service_api_key:t,service_api_key_source:r}=e;o.removeAllNotices();const a=t?2:1,i="wpcom"===r?"":t;this.setState({apiState:a,apiKey:t,apiKeyControl:i,apiKeySource:r,apiRequestOutstanding:!1}),n()}),(e=>{let{message:t}=e;this.onError(null,t),this.setState({apiState:1,apiRequestOutstanding:!1}),r()}))}))}))}getMapProvider=()=>{const e=(0,m.t)(y.Z,this.props?.attributes?.className);return(0,w.Z)({mapStyle:e})};componentDidMount(){"mapbox"===this.getMapProvider()?this.apiCall().then((()=>{this.props.attributes?.address&&this.geoCodeAddress(this.props.attributes?.address,this.state.apiKey)})):this.setState({apiState:2})}onError=(e,t)=>{const{noticeOperations:n}=this.props;n.removeAllNotices(),n.createErrorNotice(t)};onMapResize=(e,t,n,r)=>{const{onResizeStop:o,setAttributes:a}=this.props;o();const i=this.mapRef?.current?.mapRef??this.mapRef;if(i){a({mapHeight:parseInt(i.current.offsetHeight+r.height,10)}),i.current.sizeMap&&setTimeout(i.current.sizeMap,0)}};render(){const{className:e,setAttributes:t,attributes:n,noticeUI:o,notices:a,isSelected:i,instanceId:c,onResizeStart:u}=this.props,{address:d,mapDetails:f,points:b,zoom:w,mapCenter:C,markerColor:S,preview:x,mapHeight:j,showFullscreenButton:L}=n,{addPointVisibility:P,apiKey:A,apiKeyControl:T,apiState:N,apiRequestOutstanding:M}=this.state,I=this.getMapProvider(),R=(0,r.createElement)(p.Fragment,null,(0,r.createElement)(s.BlockControls,null,(0,r.createElement)(v.Z,{attributes:n,setAttributes:t,state:this.state,setPointVisibility:this.setPointVisibility,context:"toolbar",mapRef:this.mapRef,mapProvider:I})),(0,r.createElement)(s.InspectorControls,null,(0,r.createElement)(v.Z,{attributes:n,setAttributes:t,state:this.state,setState:this.setState,mapRef:this.mapRef,instanceId:c,minHeight:400,removeAPIKey:this.removeAPIKey,updateAPIKey:this.updateAPIKey,mapProvider:I}))),D=(0,r.createElement)(l.Placeholder,{icon:E},(0,r.createElement)(l.Spinner,null)),B=(0,r.createElement)("p",{className:"components-placeholder__instructions"},__("To use the map block, you need an Access Token.","jetpack"),(0,r.createElement)("br",null),(0,r.createElement)(l.ExternalLink,{href:"https://www.mapbox.com"},__("Create an account or log in to Mapbox.","jetpack")),(0,r.createElement)("br",null),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")),Z=(0,r.createElement)(l.Placeholder,{icon:E,label:__("Map","jetpack"),notices:a},(0,r.createElement)(p.Fragment,null,B,(0,r.createElement)("form",null,(0,r.createElement)("input",{type:"text",className:"components-placeholder__input",disabled:M,placeholder:__("Paste Token Here","jetpack"),value:T,onChange:this.updateAPIKeyControl}),(0,r.createElement)(l.Button,{variant:"secondary",disabled:M||!T||T.length<1,onClick:this.updateAPIKey},__("Set Token","jetpack"))))),F=i&&b.length<=1,O=(0,m.t)(y.Z,n.className),U=(0,r.createElement)(p.Fragment,null,R,(0,r.createElement)("div",{className:e},(0,r.createElement)(l.ResizableBox,{size:{height:j||"auto",width:"100%"},grid:[10,10],showHandle:i,minHeight:400,enable:_,onResizeStart:u,onResizeStop:this.onMapResize},(0,r.createElement)("div",{className:"wp-block-jetpack-map__map_wrapper"},(0,r.createElement)(g.Z,{ref:this.mapRef,address:d,scrollToZoom:F,showFullscreenButton:L,mapStyle:O||"default",mapDetails:f,mapHeight:j,points:b,zoom:w,mapCenter:C,markerColor:S,onSetZoom:e=>{t({zoom:e})},admin:!0,apiKey:A,onSetPoints:e=>t({points:e}),onSetMapCenter:e=>t({mapCenter:e}),onMapLoaded:()=>this.setState({addPointVisibility:!b.length}),onMarkerClick:()=>this.setState({addPointVisibility:!1}),onError:this.onError,mapProvider:I},i&&P&&(0,r.createElement)(h.Z,{onAddPoint:this.addPoint,onClose:()=>this.setState({addPointVisibility:!1}),apiKey:A,onError:this.onError,tagName:"AddPoint",mapProvider:I})))))),z=y.Z.find((e=>e.name===O)),$=(0,r.createElement)("div",null,(0,r.createElement)("img",{alt:__("Map Preview","jetpack"),src:z?z.preview:k}));return(0,r.createElement)(p.Fragment,null,o,x&&$,!x&&0===N&&D,!x&&1===N&&Z,!x&&2===N&&U)}}t.Z=(0,c.compose)([l.withNotices,(0,u.withDispatch)((e=>{const{toggleSelection:t}=e("core/block-editor");return{onResizeStart:()=>t(!1),onResizeStop:()=>t(!0)}}))])(C)},22055:function(e,t,n){"use strict";var r=n(31985),o=n(32334),a=n(55109),i=n(45051),s=n(740),l=n(19496),c=n(53289);(0,r.S)(o,{edit:s.Z,save:l.Z,styles:c.Z,deprecated:[i.Z,a.Z]})},1555:function(e,t,n){"use strict";function r(e,t){return fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(e)}.json?access_token=${encodeURIComponent(t)}`).then((e=>e.json()))}n.d(t,{P:function(){return r}})},31852:function(e,t,n){"use strict";var r=n(51806),o=n(3142),a=n(3156);t.Z=e=>{const t="mapbox"===e.mapProvider?o.Z:a.Z;return(0,r.createElement)(t,e)}},3142:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(96881);const l=(0,i.__)("Add a marker…","jetpack");class c extends a.Component{constructor(){super(...arguments),this.textRef=(0,a.createRef)(),this.containerRef=(0,a.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,r.createElement)("span",null,e.place_name),getOptionKeywords:e=>[e.place_name],getOptionCompletion:this.getOptionCompletion}}componentDidMount(){setTimeout((()=>{this.containerRef.current.querySelector("input").focus()}),50)}getOptionCompletion=e=>{const{value:t}=e,n={placeTitle:t.text,title:t.text,caption:t.place_name,id:t.id,coordinates:{longitude:t.geometry.coordinates[0],latitude:t.geometry.coordinates[1]}};return this.props.onAddPoint(n),t.text};search=e=>{const{apiKey:t,onError:n}=this.props,r="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(e)+".json?access_token="+t;return new Promise((function(e,t){const o=new XMLHttpRequest;o.open("GET",r),o.onload=function(){if(200===o.status){const t=JSON.parse(o.responseText);e(t.features)}else{const e=JSON.parse(o.responseText);n(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},o.send()}))};onReset=()=>{this.textRef.current.value=null};render(){const{label:e}=this.props;return(0,r.createElement)("div",{ref:this.containerRef},(0,r.createElement)(o.BaseControl,{label:e,className:"components-location-search"},(0,r.createElement)(s.Z,{completer:this.autocompleter,onReset:this.onReset},(e=>{let{isExpanded:t,listBoxId:n,activeId:a,onChange:i,onKeyDown:s}=e;return(0,r.createElement)(o.TextControl,{placeholder:l,ref:this.textRef,onChange:i,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":a,onKeyDown:s})}))))}}c.defaultProps={onError:()=>{}},t.Z=c},3156:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(96881),l=n(72672);const c=(0,i.__)("Add a marker…","jetpack");t.Z=e=>{let{label:t,onAddPoint:n}=e;const i=(0,a.useRef)(),u=(0,a.useRef)(),{mapkit:p}=(0,l.qw)(),d={name:"placeSearch",options:async e=>new Promise((function(t,n){new p.Search({includePointsOfInterest:!1}).autocomplete(e,((e,r)=>{if(e)return void n(e);const o=(r?.results.filter((e=>e.coordinate))??[]).map((e=>({...e,placeName:e.displayLines?.join(", ")})));t(o)}))})),isDebounced:!0,getOptionLabel:e=>(0,r.createElement)("span",null,e.placeName),getOptionKeywords:e=>[e.placeName],getOptionCompletion:e=>{const{value:t}=e,r={placeTitle:t.placeName,title:t.placeName,caption:t.placeName,coordinates:{longitude:t.coordinate.longitude,latitude:t.coordinate.latitude},id:`${t.placeName} ${Number(t.coordinate.latitude).toFixed(2)} ${Number(t.coordinate.longitude).toFixed(2)}`};return n(r),t.placeName}};return(0,a.useEffect)((()=>{setTimeout((()=>{i.current.querySelector("input").focus()}),50)}),[]),(0,r.createElement)("div",{ref:i},(0,r.createElement)(o.BaseControl,{label:t,className:"components-location-search"},(0,r.createElement)(s.Z,{completer:d,onReset:()=>{u.current.value=""}},(e=>{let{isExpanded:t,listBoxId:n,activeId:a,onChange:i,onKeyDown:s}=e;return(0,r.createElement)(o.TextControl,{placeholder:c,ref:u,onChange:i,"aria-expanded":t,"aria-owns":n,"aria-activedescendant":a,onKeyDown:s})}))))}},57897:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307);class i extends a.Component{constructor(){super(...arguments),this.state={selectedCell:null}}onDeletePoint=e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:n,onChange:r}=this.props,o=n.slice(0);o.splice(t,1),r(o)};setMarkerField(e,t,n){const{points:r,onChange:o}=this.props,a=r.slice(0);a[n][e]=t,o(a)}render(){const{points:e}=this.props,t=e.map(((e,t)=>(0,r.createElement)(o.PanelBody,{title:e.placeTitle,key:e.id,initialOpen:!1},(0,r.createElement)(o.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t)}),(0,r.createElement)(o.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t)}),(0,r.createElement)(o.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn"},(0,r.createElement)(o.Dashicon,{icon:"trash",size:"15"})," Delete Marker"))));return(0,r.createElement)("div",{className:"component__locations"},(0,r.createElement)(o.Panel,{className:"component__locations__panel"},t))}}i.defaultProps={points:Object.freeze([]),onChange:()=>{}},t.Z=i},96881:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(94333),i=n(69307),s=n(65736),l=n(39630),c=n(65235),u=n.n(c),p=n(92819);const __=s.__,_n=s._n;function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=[];for(let r=0;r<e.length;r++){const o=e[r];let{keywords:a=[]}=o;if("string"==typeof o.label&&(a=[...a,o.label]),n.push(o),n.length===t)break}return n}class m extends i.Component{static getInitialState(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}constructor(){super(...arguments),this.debouncedLoadOptions=(0,p.debounce)(this.loadOptions,250),this.state=this.constructor.getInitialState()}componentWillUnmount(){this.debouncedLoadOptions.cancel()}select=e=>{const{completer:t}=this.props;(t.getOptionCompletion||{})(e),this.reset()};reset=()=>{this.setState(this.constructor.getInitialState())};handleFocusOutside(){this.reset()}loadOptions(e,t){const{options:n}=e,r=this.activePromise=Promise.resolve("function"==typeof n?n(t):n).then((t=>{if(r!==this.activePromise)return;const n=t.map(((t,n)=>({key:`${n}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]}))),o=d(n),a=o.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:n,filteredOptions:o,selectedIndex:a,isOpen:o.length>0}),this.announce(o)}))}onChange=e=>{const{completer:t}=this.props,{options:n}=this.state;if(!e)return void this.reset();t&&(t.isDebounced?this.debouncedLoadOptions(t,e):this.loadOptions(t,e));const r=t?d(n):[];t&&this.setState({selectedIndex:0,filteredOptions:r,query:e})};onKeyDown=e=>{const{isOpen:t,selectedIndex:n,filteredOptions:r}=this.state;if(!t)return;let o;switch(e.keyCode){case l.UP:o=(0===n?r.length:n)-1,this.setState({selectedIndex:o});break;case l.DOWN:o=(n+1)%r.length,this.setState({selectedIndex:o});break;case l.ENTER:this.select(r[n]);break;case l.LEFT:case l.RIGHT:case l.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()};announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,s.sprintf)(/* translators: placeholder is a number. */ | |
| 6 | -_n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:n,instanceId:a,completer:i}=this.props,{selectedIndex:s,filteredOptions:l}=this.state,{key:c=""}=l[s]||{},{className:d}=i,m=l.length>0,h=m?`components-autocomplete-listbox-${a}`:null,f=m?`components-autocomplete-item-${a}-${c}`:null;return(0,r.createElement)("div",{className:"components-autocomplete"},n({isExpanded:m,listBoxId:h,activeId:f,onChange:e,onKeyDown:t}),m&&(0,r.createElement)(o.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0},(0,r.createElement)("div",{id:h,role:"listbox",className:"components-autocomplete__results"},(0,p.map)(l,((e,t)=>(0,r.createElement)(o.Button,{key:e.key,id:`components-autocomplete-item-${a}-${e.key}`,role:"option","aria-selected":t===s,disabled:e.isDisabled,className:u()("components-autocomplete__result",d,{"is-selected":t===s}),onClick:()=>this.select(e)},e.label))))))}}t.Z=(0,a.compose)([o.withSpokenMessages,a.withInstanceId,o.withFocusOutside])(m)},90055:function(e,t,n){"use strict";function r(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}n.d(t,{h:function(){return r}})},84634:function(e,t,n){"use strict";n.d(t,{YB:function(){return o},b2:function(){return r},k:function(){return a},xt:function(){return s},zb:function(){return i}});const r=e=>e.hasOwnProperty("lat")&&e.hasOwnProperty("lng")?e:{lat:e.latitude||0,lng:e.longitude||0};function o(e,t){const n=new e.LngLatBounds;return t.forEach((e=>{n.extend([e.coordinates.longitude,e.coordinates.latitude])})),n}function a(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}function i(e,t){e.innerHTML=`\n\t\t<?xml version="1.0" encoding="UTF-8"?>\n\t\t<svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n\t\t\t<g fill-rule="evenodd">\n\t\t\t\t<path id="d" d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z" fill="${t}"/>\n\t\t\t</g>\n\t\t</svg>\n\t`}function s(e){return new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},96442:function(e,t,n){"use strict";n.d(t,{E0:function(){return p},E_:function(){return s},F7:function(){return l},eR:function(){return c},ot:function(){return i},rZ:function(){return u}});var r=n(85007);const o=6371e3;function a(e){return Math.abs(o*Math.cos(e*Math.PI/180)*2*Math.PI/256)}function i(e,t){return 512/Math.pow(2,e)*.5*a(t)}function s(e,t){const n=e/a(t);return Math.log2(512/(n/.5))}function l(e,t){if(0===t.length)return null;const n=new e.Coordinate(-90,180),r=new e.Coordinate(90,-180);t.forEach((e=>{n.latitude=Math.max(n.latitude,e.coordinates.latitude),n.longitude=Math.min(n.longitude,e.coordinates.longitude),r.latitude=Math.min(r.latitude,e.coordinates.latitude),r.longitude=Math.max(r.longitude,e.coordinates.longitude)}));const o=new e.Coordinate(n.latitude-.5*(n.latitude-r.latitude),n.longitude+.5*(r.longitude-n.longitude)),a=new e.CoordinateSpan(1.3*Math.abs(n.latitude-r.latitude),1.3*Math.abs(r.longitude-n.longitude));return new e.CoordinateRegion(o,a)}function c(e,t){return()=>{const n=e.createElement("div");return n.classList.add("mapkit-popup-content"),t(n),n}}function u(e,t){return new Promise((n=>{if(t.mapkitScriptIsLoading)(0,r.Dz)(t,"mapkit").then((e=>{n(e)}));else{t.mapkitScriptIsLoading=!0;const o=e.createElement("script");o.addEventListener("load",(async()=>{const e=await(0,r.Dz)(t,"mapkit");t.mapkitScriptIsLoading=!1,n(e)}),{once:!0}),o.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",o.crossOrigin="anonymous",e.head.appendChild(o)}}))}function p(e,t,n){return new Promise(((t,r)=>{n.mapkitIsInitialized?t():n.mapkitIsInitializing?function(e){return new Promise(((t,n)=>{const r=()=>{void 0===e.mapkitIsInitializing?n():!1===e.mapkitIsInitializing?t():e.requestAnimationFrame(r)};r()}))}(n).then((()=>{t()})):(n.mapkitIsInitializing=!0,n.mapkitIsInitialized=!1,e.init({authorizationCallback:async e=>{try{const o=await fetch("https://public-api.wordpress.com/wpcom/v2/mapkit");if(200===o.status){e((await o.json()).wpcom_mapkit_access_token)}else r();n.mapkitIsInitializing=!1,n.mapkitIsInitialized=!0,t()}catch(e){r()}}}))}))}},32037:function(e,t,n){"use strict";n.d(t,{L:function(){return a},c:function(){return i}});var r=n(51806),o=n(69307);const a=(0,o.createContext)({map:null,mapkit:null,loaded:!1,activeMarker:null,calloutReference:null,currentDoc:null,currentWindow:null,admin:!1,setPoints:()=>{},points:[],previousCenter:null}),i=e=>{let{value:t,children:n}=e;const[i,s]=(0,o.useState)(null),[l,c]=(0,o.useState)(null),[u,p]=(0,o.useState)(null);return(0,r.createElement)(a.Provider,{value:{...t,activeMarker:i,setActiveMarker:s,calloutReference:l,setCalloutReference:c,previousCenter:u,setPreviousCenter:p}},n)}},72672:function(e,t,n){"use strict";n.d(t,{$M:function(){return m},J2:function(){return v},LO:function(){return h},Xj:function(){return f},eV:function(){return d},jo:function(){return b},mk:function(){return k},qw:function(){return p},wd:function(){return y},zZ:function(){return g}});var r=n(80428),o=n(9818),a=n(69307),i=n(65736),s=n(92819),l=n(85007),c=n(96442),u=n(32037);const __=i.__,p=()=>(0,a.useContext)(u.L),d=e=>{const[t,n]=(0,a.useState)(!1),[i,s]=(0,a.useState)(!1),[u,p]=(0,a.useState)(null),[d,m]=(0,a.useState)(null),[h,f]=(0,a.useState)(null);return(0,a.useEffect)((()=>{const t=(0,o.select)(r.t).getBlogId(),{currentDoc:a,currentWindow:i}=(0,l.bL)(e.current);if(e.current){m(i),f(a);const e=__("Failed to retrieve a Mapkit API token. Please try refreshing.","jetpack");i.mapkit?(p(i.mapkit),(0,c.E0)(i.mapkit,t,i).then((()=>{n(!0)}),(()=>{s(e)}))):(0,c.rZ)(a,i).then((r=>{p(r),(0,c.E0)(r,t,i).then((()=>{n(!0)}),(()=>{s(e)}))}))}}),[e]),{loaded:t,error:i,mapkit:u,currentDoc:h,currentWindow:d}},m=(e,t,n)=>{const[r,o]=(0,a.useState)(null);return(0,a.useEffect)((()=>{e&&t&&o(new e.Map(n.current,{showsMapTypeControl:!1}))}),[e,t,n]),{map:r}},h=(e,t)=>{const{mapkit:n,map:r}=p(),o=(0,a.useRef)(e),i=(0,a.useRef)(t);(0,a.useEffect)((()=>{if(!n||!r||!o.current)return;const e=o.current?.lat??o.current?.latitude,t=o.current?.lng??o.current?.longitude;"number"==typeof e&&"number"==typeof t&&(r.center=new n.Coordinate(e,t))}),[n,r,o]),(0,a.useEffect)((()=>{if(!n||!r)return;const e=()=>{if(r.center){const{latitude:e,longitude:t}=r.center;i.current({lat:e,lng:t})}};return r.addEventListener("region-change-end",(0,s.debounce)(e,1e3)),()=>{r.removeEventListener("region-change-end",e)}}),[n,r,i])},f=e=>{const{mapkit:t,map:n}=p();(0,a.useEffect)((()=>{t&&n&&(n.mapType=(()=>{switch(e){case"satellite":return t.Map.MapTypes.Satellite;case"black_and_white":return t.Map.MapTypes.MutedStandard;case"hybrid":return t.Map.MapTypes.Hybrid;default:return t.Map.MapTypes.Standard}})())}),[t,n,e])},g=(e,t)=>{const{mapkit:n,map:r,points:o}=p();(0,a.useEffect)((()=>{if(n&&r)if(o&&o.length<=1){const t=(0,c.ot)(13,r.center.latitude);if(e){const t=(0,c.ot)(e,r.center.latitude);t!==r.cameraDistance&&(r.cameraDistance=t)}else t!==r.cameraDistance&&(r.cameraDistance=t);r.isZoomEnabled=!0,r.isScrollEnabled=!0}else r.region=(0,c.F7)(n,o),r.isZoomEnabled=!1,r.isScrollEnabled=!1}),[n,r,e,o]),(0,a.useEffect)((()=>{const e=()=>{t((0,c.E_)(r.cameraDistance,r.center.latitude))};return r.addEventListener("zoom-end",e),()=>{r.removeEventListener("zoom-end",e)}}),[n,r,t])},v=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const{mapkit:o,map:i,loaded:s}=p(),l=(0,a.useRef)(n),c=(0,a.useRef)(r);(0,a.useEffect)((()=>{if(s){i.annotations.filter((t=>!e.find((e=>e.id===t.data.id)))).forEach((e=>i.removeAnnotation(e)));const n=e.map((e=>{const n=i.annotations.find((t=>t.data.id===e.id));if(n)return n.title=e.title,n.color=t,n;const r=new o.MarkerAnnotation(new o.Coordinate(e.coordinates.latitude,e.coordinates.longitude),{color:t,data:{id:e.id}});return r.calloutEnabled=!0,r.title=e.title,l.current&&(r.callout={calloutElementForAnnotation:l.current}),c.current&&r.addEventListener("select",(()=>c.current(e,i))),r}));i.annotations.length!==n.length&&i.showItems(n)}}),[e,s,i,o,t,l,c])},b=e=>{const{map:t,loaded:n}=p(),r=(0,a.useRef)(e);(0,a.useEffect)((()=>{n&&r.current(t)}),[n,t,r])},k=e=>{const{map:t,previousCenter:n,loaded:r}=p(),o=(0,a.useRef)(e);(0,a.useEffect)((()=>{r&&t.addEventListener("single-tap",(()=>{o.current(n)}))}),[r,t,n,o])},y=(e,t)=>{const{mapkit:n,map:r}=p();(0,a.useEffect)((()=>{if(n&&r&&e?.length){(new n.Geocoder).lookup(e,((e,n)=>{if(n?.results?.length){const e=n.results[0],r=e.formattedAddress,o={placeTitle:r,title:r,caption:r,coordinates:{longitude:e.coordinate.longitude,latitude:e.coordinate.latitude},id:`${r} ${Number(e.coordinate.latitude).toFixed(2)} ${Number(e.coordinate.longitude).toFixed(2)}`};t.current([o])}}))}}),[n,r,e,t])}},19496:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(81518),i=n(53289);class s extends o.Component{render(){const{attributes:e}=this.props,{align:t,className:n,mapDetails:o,points:s,zoom:l,mapCenter:c,markerColor:u,scrollToZoom:p,mapHeight:d,showFullscreenButton:m}=e,h=(0,a.t)(i.Z,n),f=s.map(((e,t)=>{const{longitude:n,latitude:o}=e.coordinates,a="https://www.google.com/maps/search/?api=1&query="+o+","+n;return(0,r.createElement)("li",{key:t},(0,r.createElement)("a",{href:a},e.title))})),g=t?`align${t}`:null;return(0,r.createElement)("div",{className:g,"data-map-style":h,"data-map-details":o,"data-points":JSON.stringify(s),"data-zoom":l,"data-map-center":JSON.stringify(c),"data-marker-color":u,"data-scroll-to-zoom":p||null,"data-map-height":d||null,"data-show-fullscreen-button":m||null},s.length>0&&(0,r.createElement)("ul",null,f))}}t.Z=s},53289:function(e,t,n){"use strict";var r=n(65736),o=n(80469),a=n(7247),i=n(13925),s=n(24873),l=n(25685),c=n(81667),u=n(15387),p=n(32566);const __=r.__,d=(0,p.Z)();t.Z=[{name:"default",label:__("Basic","jetpack"),preview:"mapkit"===d?s:i,isDefault:!0},{name:"black_and_white",label:"mapkit"===d?__("Muted","jetpack",0):__("Black & White","jetpack"),preview:"mapkit"===d?a:o},{name:"satellite",label:__("Satellite","jetpack"),preview:"mapkit"===d?c:l},{name:"terrain",label:__("Terrain","jetpack"),preview:u}]},32566:function(e,t){"use strict";t.Z=e=>{if(e?.mapStyle&&["terrain"].includes(e.mapStyle))return"mapbox";const t=function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()}("map_provider");return t||(window&&"string"==typeof window.Jetpack_Maps?.provider&&["mapbox","mapkit"].includes(window.Jetpack_Maps?.provider)?window.Jetpack_Maps?.provider:"mapbox")}},51321:function(e,t){"use strict";t.Z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)e.style.height=t+"px";else{const t=e.offsetWidth,n=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,r=Math.min(t*(3/4),n);e.style.height=r+"px"}}},461:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(94333),i=n(9818),s=n(69307),l=n(65736),c=n(65235),u=n.n(c),p=n(69283);const __=l.__,d="editor",m="preview";class h extends s.Component{input=null;state={activePanel:d};bindInput=e=>{this.input=e};componentDidUpdate(e){e.isSelected&&!this.props.isSelected&&this.state.activePanel===m&&this.toggleMode(d)(),!e.isSelected&&this.props.isSelected&&this.state.activePanel===d&&this.input&&this.input.focus()}isEmpty(){const e=this.props.attributes.source;return!e||""===e.trim()}updateSource=e=>this.props.setAttributes({source:e});handleKeyDown=e=>{const{attributes:t,removeBlock:n}=this.props,{source:r}=t;8===e.keyCode&&""===r&&(n(),e.preventDefault())};toggleMode=e=>()=>this.setState({activePanel:e});renderToolbarButton(e,t){const{activePanel:n}=this.state,{className:o}=this.props,a=u()(o,"components-button components-tab-button",{"is-pressed":n===e});return(0,r.createElement)("button",{className:a,onClick:this.toggleMode(e)},(0,r.createElement)("span",null,t))}render(){const{attributes:e,className:t,isSelected:n}=this.props,{source:a}=e,{activePanel:i}=this.state;return!n&&this.isEmpty()?(0,r.createElement)("p",{className:`${t}__placeholder`},__("Write your _Markdown_ **here**…","jetpack")):(0,r.createElement)("div",{className:t},(0,r.createElement)(o.BlockControls,null,(0,r.createElement)("div",{className:"components-toolbar"},this.renderToolbarButton(d,__("Markdown","jetpack")),this.renderToolbarButton(m,__("Preview","jetpack")))),i!==m&&n?(0,r.createElement)(o.PlainText,{className:`${t}__editor`,onChange:this.updateSource,onKeyDown:this.handleKeyDown,"aria-label":__("Markdown","jetpack"),innerRef:this.bindInput,value:a}):(0,r.createElement)(p.Z,{className:`${t}__preview`,source:a}))}}t.Z=(0,a.compose)([(0,i.withSelect)((e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()}))),(0,i.withDispatch)(((e,t)=>{let{currentBlockId:n}=t;return{removeBlock:()=>e("core/block-editor").removeBlocks(n)}}))])(h)},49702:function(e,t,n){"use strict";var r=n(31985),o=n(41549),a=n(461),i=n(2683);(0,r.S)(o,{edit:a.Z,save:i.Z})},69283:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(69307),i=n(65736),s=n(10185),l=n.n(s),c=n(82339),u=n.n(c);const __=i.__,p=new(l())({typographer:!0}).use(u()),d=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,o.__experimentalGetSpacingClassesAndStyles)?.(e);return t?.style?t.style:{}};t.Z=e=>{let{className:t,source:n="",attributes:o}=e;return(0,r.createElement)(a.RawHTML,{className:t,onClick:d,style:m(o)},n.length?p.render(n):"")}},2683:function(e,t,n){"use strict";var r=n(51806),o=n(69283);t.Z=e=>{let{attributes:t,className:n}=e;return(0,r.createElement)(o.Z,{className:n,source:t.source,attributes:t})}},80452:function(e,t,n){"use strict";var r=n(51806),o=n(46385);t.Z={attributes:o.attributes,supports:{align:!0,html:!1},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)(r.Fragment,null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},70398:function(e,t,n){"use strict";var r=n(51806),o=n(46385);t.Z={attributes:o.attributes,migrate:e=>{const{style:t,className:n}=e,r="standard"===t?"":`is-style-${t}`;return{...e,className:n?`${n} ${r}`:r}},isEligible:e=>{let{style:t,className:n}=e;return!(!t||"standard"===t)&&(!n||-1===n.indexOf("is-style-"))},save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t.map((e=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`},`https://www.opentable.com/restref/client/?rid=${e}`))))}}},76851:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(4981),s=n(55609),l=n(69307),c=n(65736),u=n(65235),p=n.n(u),d=n(92819),m=n(81518),h=n(4554),f=n(46385),g=n(47144),v=n(57087),b=n(14680),k=n(41007),y=n(48769);const __=c.__,w=(0,o.dM)(f);t.Z=(0,s.withNotices)((function(e){let{attributes:t,className:n,clientId:u,isSelected:E,name:_,noticeOperations:C,noticeUI:S,setAttributes:x}=e;const j=(0,i.getBlockDefaultClassName)(_),L=(0,h.S)(f.attributes,t);(0,d.isEqual)(L,t)||x(L);const{align:P,rid:A,iframe:T,domain:N,lang:M,newtab:I,negativeMargin:R}=t,D=(0,d.isEmpty)(A),B=(0,m.t)((0,b.Eo)(),t.className),Z=(0,m.t)((0,b.Eo)(A),t.className),F=(0,k.Z)(Z),O=(0,d.isEqual)(A,["1"]);(0,l.useEffect)((()=>{if(C.removeAllNotices(),!D&&!O&&"wide"===Z&&"wide"!==P&&"full"!==P){const e=(0,r.createElement)(r.Fragment,null,__('With the OpenTable block you may encounter display issues if you use its "wide" style with anything other than "wide" or "full" alignment. The wide display style may also not work well on smaller screens.',"jetpack"));C.createNotice({status:"warning",content:e})}}),[O,P,D,A,Z]),(0,l.useEffect)((()=>{"button"===B&&Array.isArray(A)&&A?.length>1&&x({className:"",style:""})}),[A,B,x]),(0,l.useEffect)((()=>{E&&(Array.isArray(A)&&A?.length>1?(0,i.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,i.registerBlockStyle)("jetpack/opentable",b.jn))}),[E,A]),(0,l.useEffect)((()=>{"wide"===F&&"wide"===P&&x({align:""}),"wide"===Z&&F&&Z!==F&&x({align:"wide"}),x({style:Z})}),[Z]);const U=(0,b.fL)(A),z=e=>A?.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],$=e=>{Array.isArray(e)?x({rid:e,style:e.length>1&&"button"===Z?"standard":Z}):(e=>{const t=(0,y.CC)(e);t||(C.removeAllNotices(),C.createErrorNotice((0,r.createElement)(r.Fragment,null,(0,r.createElement)("strong",null,__("We ran into an issue","jetpack")),(0,r.createElement)("br",null),__("Please ensure this embed matches the one from your OpenTable account","jetpack"))));const n=(0,h.S)(f.attributes,t);x(n),C.removeAllNotices()})(e)},H=(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorAdvancedControls,null,(0,r.createElement)(s.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:T,onChange:()=>x({iframe:!T}),className:"is-opentable"}),"button"===Z&&(0,r.createElement)(s.ToggleControl,{label:__("Remove button margin","jetpack"),checked:R,onChange:()=>x({negativeMargin:!R})})),(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(s.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(v.Z,{rids:A,onChange:$}),(0,r.createElement)(s.SelectControl,{label:__("Language","jetpack"),value:M,onChange:e=>x({lang:e}),options:g.V}),(0,r.createElement)(s.ToggleControl,{label:__("Open in a new window","jetpack"),checked:I,onChange:()=>x({newtab:!I})})))),q=(0,o.Wp)()||(0,o.Ug)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",V=(0,r.createElement)(s.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:w,instructions:__("Enter your restaurant name, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:S},(0,r.createElement)(v.Z,{rids:A,onSubmit:$}),(0,r.createElement)("div",{className:`${j}-placeholder-links`},(0,r.createElement)(s.ExternalLink,{href:"https://restaurant.opentable.com/get-started/"},__("Sign up for OpenTable","jetpack")),(0,r.createElement)(s.ExternalLink,{href:q},__("Learn more","jetpack")))),G=p()(n,{[`is-style-${Z}`]:!D&&U.includes(Z)&&-1===n.indexOf("is-style"),"is-placeholder":D,"is-multi":"multi"===z(Z)[0],[`align${P}`]:P,"has-no-margin":R});return(0,r.createElement)(r.Fragment,null,S,(0,r.createElement)("div",{className:G},!D&&H,D?V:(e=>{const[t,n]=z(e||Z);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:`${j}-overlay`}),(0,r.createElement)("iframe",{title:(0,c.sprintf)(/* translators: Placeholder is a unique ID. */ | |
| 7 | -__("Open Table Preview %s","jetpack"),u),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${(0,d.join)(A,"%2C")}&type=${t}&theme=${n}&overlay=false&domain=${N}&lang=${M&&g.v.includes(M)?M:"en-US"}&newtab=${I}&disablega=true`}))})()))}))},92482:function(e,t,n){"use strict";var r=n(51806),o=n(4981),a=n(31985),i=n(46385),s=n(80452),l=n(70398),c=n(76851),u=n(14680),p=n(48769);(0,a.S)(i,{edit:c.Z,save:e=>{let{attributes:{rid:t}}=e;return(0,r.createElement)("div",null,t?.map(((e,t)=>(0,r.createElement)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,key:`${e}-${t}`},`https://www.opentable.com/restref/client/?rid=${e}`))))},attributes:i.attributes,styles:(0,u.Eo)(),transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(p.pU.test(e.textContent)||p.tC.test(e.textContent)),transform:e=>{const t=(0,p.CC)(e.textContent);return(0,o.createBlock)("jetpack/opentable",t)}}]},deprecated:[s.Z,l.Z]})},47144:function(e,t,n){"use strict";n.d(t,{V:function(){return r},v:function(){return o}});const r=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],o=r.map((e=>e.value))},57087:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(82674),o=n.n(r),a=n(51806),i=n(55609),s=n(69307),l=n(65736),c=n(92819),u=n(25392);const __=l.__,_n=l._n,p=20;function d(e){const[t,n]=(0,s.useState)(""),r=(0,u.Z)(t,p),[l,d]=(0,s.useState)(e.rids||[]),m=/^(\d+)$|\(\#(\d+)\)$/,h=r.filter((e=>l.indexOf(e.rid.toString())<0)).map((e=>e.name+` (#${e.rid})`)),f=(0,a.createElement)(i.FormTokenField,o()({value:l,suggestions:h,saveTransform:e=>u.$.test(e)?"":e.trim(),onInputChange:n,maxSuggestions:p,label:_n("Restaurant","Restaurants",l.length,"jetpack")},e,{onChange:t=>{const n=t.map((e=>{const t=m.exec(e);return t[1]||t[2]}));d(n),e.onChange&&e.onChange(n)}}));return(0,a.createElement)("div",{className:"wp-block-jetpack-opentable-restaurant-picker"},e.onSubmit?(0,a.createElement)("form",{onSubmit:n=>{n.preventDefault(),e.onSubmit((0,c.isEmpty)(l)?t:l)}},f,(0,a.createElement)(i.Button,{variant:"secondary",type:"submit"},__("Embed","jetpack"))):f)}},14680:function(e,t,n){"use strict";n.d(t,{Eo:function(){return i},fL:function(){return s},jn:function(){return a}});var r=n(65736),o=n(92819);const __=r.__,a={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},i=e=>(0,o.compact)([{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&a]),s=e=>i(e).map((e=>e.name))},41007:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(69307);function o(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}},25392:function(e,t,n){"use strict";n.d(t,{$:function(){return a},Z:function(){return i}});var r=n(69307),o=n(92819);const a=/^\s*(http[s]?:\/\/|\<script)/;function i(e,t){const[n,i]=(0,r.useState)([]),s=(0,r.useCallback)((0,o.throttle)((function(){fetch("https://www.opentable.com/widget/reservation/restaurant-search?pageSize="+t+"&query="+encodeURIComponent(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")).then((e=>e.json())).then((e=>i((0,o.unionBy)(n,e.items,"rid"))))}),500),[n]);return(0,r.useEffect)((()=>{(0,o.isEmpty)(e)||a.test(e)||s(e)}),[e]),n}},48769:function(e,t,n){"use strict";n.d(t,{CC:function(){return i},pU:function(){return a},tC:function(){return o}});const r=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,o=/restref=([0-9]+)&/,a=/rid=([0-9]+)&/,i=e=>{if(e)return(e=>{if(!e)return;let t="";if(t=0===e.indexOf("http")?new URL(e):new URL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;const n=new URLSearchParams(t.search);let r=n.get("theme");"button"===n.get("type")&&(r=n.get("type"));let o=n.getAll("rid");if(o&&0!==o.length||(o=n.getAll("restref")),!o||0===o.length)return;const a={};o&&(a.rid=o);const i=n.get("domain");i&&(a.domain=i);const s=n.get("iframe");s&&(a.iframe=s);const l=n.get("lang");l&&(a.lang=l);const c=n.get("newtab");return c&&(a.newtab=c),r&&(a.style=r),a})((e=>{const t=e.match(r);return t&&t[1]?t[1]:o.test(e)||a.test(e)?e:void 0})(e))}},15774:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(13419),a=n(55609),i=n(65736),s=n(55388);const __=i.__,_x=i._x,l=(0,o.dM)(s);function c(e){let{className:t,onSubmit:n,noticeUI:o,url:i,setUrl:s}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(a.Placeholder,{label:__("Pinterest","jetpack"),icon:l,notices:o},(0,r.createElement)("form",{onSubmit:e=>{e.preventDefault(),n()}},(0,r.createElement)("input",{type:"url",value:i,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>s(e.target.value)}),(0,r.createElement)(a.Button,{variant:"secondary",type:"submit"},_x("Embed","button label","jetpack")))))}},89488:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(4981),a=n(55609),i=n(69307),s=n(65736);const __=s.__,_x=s._x;function l(e){let{fallbackUrl:t,onClick:n}=e;return(0,r.createElement)(r.Fragment,null,__("Sorry, this content could not be embedded.","jetpack")," ",(0,r.createElement)(a.Button,{variant:"link",onClick:()=>{const e=(0,r.createElement)("a",{href:t},t);n((0,o.createBlock)("core/paragraph",{content:(0,i.renderToString)(e)}))}},_x("Convert block to link","button label","jetpack")))}},13647:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__;function i(){return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("p",null,__("Embedding…","jetpack")))}},85777:function(e,t,n){"use strict";n.d(t,{W:function(){return o},a:function(){return r}});const r="https://pinterest.com/anapinskywalker/",o=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i},89852:function(e,t,n){"use strict";n.d(t,{C:function(){return i}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__;function i(e){let{setEditingState:t}=e;return(0,r.createElement)(o.ToolbarGroup,null,(0,r.createElement)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>t(!0)}))}},15479:function(e,t,n){"use strict";var r=n(51806),o=n(34098);t.Z={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:e=>{let{attributes:t,className:n}=e;const{url:a}=t;return(0,o.t)(a)?(0,r.createElement)("div",{className:n},(0,r.createElement)("a",{"data-pin-do":(0,o.t)(a),href:a})):null}}},43529:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(15774),l=n(89488),c=n(13647),u=n(89852),p=n(18867),d=n(34098);t.Z=(0,a.withNotices)((function(e){let{attributes:t,isSelected:n,className:m,noticeOperations:h,noticeUI:f,setAttributes:g,onReplace:v}=e;const{url:b}=t,{isFetching:k,pinterestUrl:y,testUrl:w,hasTestUrlError:E}=(0,p.Z)(),[_,C]=(0,i.useState)(!1),[S,x]=(0,i.useState)(""),[j,L]=(0,i.useState)(!1),P=(0,i.useCallback)((()=>(0,r.createElement)(l.Z,{fallbackUrl:S,onClick:v})),[E]),A=()=>{k||(w(S),L(!1))},T=()=>{C(!0)};if((0,i.useEffect)((()=>{b&&w(b)}),[]),(0,i.useEffect)((()=>{!n&&_&&C(!1)}),[n,_]),(0,i.useEffect)((()=>{g({url:y}),h.removeAllNotices(),y&&x(y),E&&h.createErrorNotice(P())}),[y,E,g,P]),k)return(0,r.createElement)(c.Z,null);const N=(0,d.t)(b);if(j||!b||b&&!N)return(0,r.createElement)(s.Z,{className:m,onSubmit:A,noticeUI:f,url:S,setUrl:x});const M=`<a data-pin-do='${N}' href='${b}'></a>`;return(0,r.createElement)("div",{className:m},(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(u.C,{setEditingState:L})),(0,r.createElement)("div",null,(0,r.createElement)(a.SandBox,{html:M,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:T}),!_&&(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:T})))}))},7414:function(e,t,n){"use strict";var r=n(4981),o=n(31985),a=n(55388),i=n(85777),s=n(15479),l=n(43529),c=n(54709);(0,o.S)(a,{edit:l.Z,save:c.Z,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&i.W.test(e.textContent),transform:e=>(0,r.createBlock)("jetpack/pinterest",{url:e.textContent.trim()})}]},deprecated:[s.Z]})},18867:function(e,t,n){"use strict";var r=n(69307),o=n(23621),a=n(85777);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const[t,n]=(0,r.useState)(!1),[i,s]=(0,r.useState)(e),[l,c]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i&&i!==a.a&&(n(!0),(0,o.Z)(i).then((e=>{n(!1),s(e),c(!1)})).catch((()=>{n(!1),s(i||void 0),c(!0)})))}),[i]),{isFetching:t,pinterestUrl:i,hasTestUrlError:l,testUrl:s}}},54709:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{attributes:t}=e;const{url:n}=t;return(0,r.createElement)("a",{href:n},n)}},34098:function(e,t,n){"use strict";n.d(t,{t:function(){return a}});var r=n(96483),o=n(85777);function a(e){if(!o.W.test(e))return"";const t=(0,r.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},10799:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(92819);const __=i.__,l=e=>{let{id:t,setRating:n,children:o}=e;return(0,r.createElement)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(a=t,e=>{let{code:t}=e;return"Enter"===t?n(a):null}),onClick:(e=>()=>n(e))(t)},o);var a};t.Z=e=>function(t){let{className:n,setAttributes:i,attributes:{align:c,color:u,rating:p,maxRating:d}}=t;const m=e=>{e===p?Math.ceil(p)===p&&(e-=.5):.5===p&&1===e&&(e=0),i({rating:e})};return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(o.AlignmentToolbar,{value:c,onChange:e=>i({align:e})})),(0,r.createElement)("div",{className:n,style:{textAlign:c}},(0,s.range)(1,d+1).map((t=>(0,r.createElement)(l,{key:t,id:t,setRating:m},(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t-.5?null:"is-rating-unfilled",color:u})),(0,r.createElement)("span",null,(0,r.createElement)(e,{className:p>=t?null:"is-rating-unfilled",color:u})))))),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(a.PanelBody,{title:__("Settings","jetpack")},(0,r.createElement)(a.RangeControl,{label:__("Highest rating","jetpack"),value:d,onChange:e=>i({maxRating:e}),min:2,max:10}),(0,r.createElement)(o.PanelColorSettings,{title:__("Color Settings","jetpack"),initialOpen:!0,colorSettings:[{value:u,onChange:e=>i({color:e}),label:__("Color","jetpack")}]}))))}},36836:function(e,t,n){"use strict";var r=n(31985),o=n(98477),a=n(10799),i=n(5056),s=n(78403);(0,r.S)(o,{edit:(0,a.Z)(i.r),save:(0,s.Z)("★")})},5056:function(e,t,n){"use strict";n.d(t,{r:function(){return a}});var r=n(51806),o=n(55609);const a=e=>{const t=(e=>e&&e.color?e.color:"currentColor")(e),n=(e=>e&&e.className?e.className:"")(e);return(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t},(0,r.createElement)(o.Path,{className:n,fill:t,stroke:t,d:"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z"}))}},78403:function(e,t,n){"use strict";var r=n(51806),o=n(92819);t.Z=e=>function(t){let{className:n,attributes:{align:a,rating:i,color:s}}=t;return(0,r.createElement)("figure",{className:n,style:{textAlign:a}},(0,o.range)(1,i+1).map((t=>(0,r.createElement)("span",{key:t,style:{color:s}},e))))}},53296:function(e,t,n){"use strict";n.d(t,{AP:function(){return l},Hj:function(){return s}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__,i=6;function s(e){let{attributes:t,setAttributes:n}=e;const{displayAuthor:a,displayContext:s,displayDate:l,displayHeadline:c,displayThumbnails:u,headline:p,postsToShow:d}=t;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.PanelBody,{title:__("Layout settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Display headline","jetpack"),checked:c,onChange:e=>n({displayHeadline:e})}),c&&(0,r.createElement)(o.TextControl,{value:p,onChange:e=>n({headline:e}),label:__("Headline","jetpack")}),(0,r.createElement)(o.RangeControl,{label:__("Number of posts","jetpack"),value:d,onChange:e=>n({postsToShow:Math.min(e,i)}),min:1,max:i})),(0,r.createElement)(o.PanelBody,{title:__("Metadata settings","jetpack")},(0,r.createElement)(o.ToggleControl,{label:__("Display date","jetpack"),checked:l,onChange:e=>n({displayDate:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display author","jetpack"),checked:a,onChange:e=>n({displayAuthor:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display context (category or tag)","jetpack"),checked:s,onChange:e=>n({displayContext:e})}),(0,r.createElement)(o.ToggleControl,{label:__("Display thumbnail","jetpack"),checked:u,onChange:e=>n({displayThumbnails:e})})))}function l(e){let{attributes:t,setAttributes:n}=e;const{postLayout:a}=t,i=[{icon:"grid-view",title:__("Grid view","jetpack"),onClick:()=>n({postLayout:"grid"}),isActive:"grid"===a},{icon:"list-view",title:__("List view","jetpack"),onClick:()=>n({postLayout:"list"}),isActive:"list"===a}];return(0,r.createElement)(o.ToolbarGroup,{controls:i})}},86434:function(e,t,n){"use strict";n.d(t,{Z:function(){return y}});var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(94333),l=n(9818),c=n(12238),u=n(65736),p=n(25411),d=n(53296),m=n(54797),h=n(17778),f=n(26700);const __=u.__,g=p.name.replace("jetpack/","");function v(e){return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("strong",{id:e.id+"-heading",className:"jp-related-posts-i2__post-link"},e.isInSiteEditor?__("Preview unavailable in site editor.","jetpack"):__("Preview unavailable: you haven't published enough posts with similar content.","jetpack")),e.displayThumbnails&&(0,r.createElement)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":__("Placeholder image","jetpack")},(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-square",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 350 200"},(0,r.createElement)("title",null,__("Grey square","jetpack")),(0,r.createElement)(i.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96","fill-opacity":".1"})),(0,r.createElement)(i.SVG,{className:"jp-related-posts-i2__post-image-placeholder-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)("title",null,__("Icon for image","jetpack")),(0,r.createElement)(i.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(i.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}))),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},__("August 3, 2018","jetpack")),e.displayAuthor&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-author has-small-font-size"},__("by John Doe","jetpack")),e.displayContext&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},__("In “Uncategorized”","jetpack")))}function b(e){const t=e.post?.block_context?.text||"",n=e.post?.block_context?.link||"",o=""!==t,a=""!==n;return(0,r.createElement)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading"},(0,r.createElement)("a",{className:"jp-related-posts-i2__post-link",id:e.id+"-heading",href:e.post.url,rel:"nofollow noopener noreferrer",target:"_blank"},e.post.title),e.displayThumbnails&&e.post.img&&e.post.img.src&&(0,r.createElement)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url},(0,r.createElement)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title,rel:"nofollow noopener noreferrer",target:"_blank"})),e.displayDate&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-date has-small-font-size"},e.post.date),e.displayAuthor&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-author has-small-font-size"},e.post.author),e.displayContext&&o&&(0,r.createElement)("div",{className:"jp-related-posts-i2__post-context has-small-font-size"},a&&(0,r.createElement)("a",{href:n},t),!1===a&&t))}function k(e){const t="jp-related-posts-i2__row";let n=0;const o=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:n=2;break;default:n=3}return(0,r.createElement)("div",null,(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(0,n).length},e.posts.slice(0,n)),o&&(0,r.createElement)("div",{className:t,"data-post-count":e.posts.slice(n).length},e.posts.slice(n)))}function y(e){const{isLoadingModules:t,isChangingStatus:n,isModuleActive:i,changeStatus:u}=(0,o.el)(g),{isEnabled:p,enable:w,isFetchingStatus:E,isUpdatingStatus:_}=(0,m._)(),C=n||_,{posts:S,isInSiteEditor:x}=(0,l.useSelect)((e=>{const t=e(c.store).getCurrentPost();return{posts:t?.["jetpack-related-posts"]??[],isInSiteEditor:!t||0===Object.keys(t).length}})),{instanceId:j}=(0,s.useInstanceId)(y),{attributes:L,className:P,setAttributes:A}=e;if(t||E)return(0,r.createElement)(f.o,null);if(!i||!p)return(0,r.createElement)(h.v,{className:P,changeStatus:u,isLoading:C,enable:w});const{displayAuthor:T,displayContext:N,displayDate:M,displayHeadline:I,displayThumbnails:R,headline:D,postLayout:B,postsToShow:Z}=L,F="jp-relatedposts-i2",O=[];for(let e=0;e<Z;e++)S[e]?O.push((0,r.createElement)(b,{id:`related-posts-${j}-post-${e}`,key:F+"-"+e,post:S[e],displayThumbnails:R,displayDate:M,displayContext:N,displayAuthor:T})):O.push((0,r.createElement)(v,{id:`related-posts-${j}-post-${e}`,key:"related-post-placeholder-"+e,displayThumbnails:R,displayDate:M,displayContext:N,isInSiteEditor:x,displayAuthor:T}));return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(d.Hj,{attributes:L,setAttributes:A})),(0,r.createElement)(a.BlockControls,null,(0,r.createElement)(d.AP,{attributes:L,setAttributes:A})),(0,r.createElement)("div",{className:P,id:`related-posts-${j}`},I&&(0,r.createElement)("h3",null,D),(0,r.createElement)("div",{className:F,"data-layout":B},(0,r.createElement)(k,{posts:O}))))}},89517:function(e,t,n){"use strict";var r=n(31985),o=n(25411),a=n(86434);(0,r.S)(o,{edit:a.Z,save:()=>null,transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]}})},54797:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var r=n(86989),o=n.n(r),a=n(69307);const i=()=>{const[e,t]=(0,a.useState)(!1),[n,r]=(0,a.useState)(!1),[i,s]=(0,a.useState)(!1);(0,a.useEffect)((()=>{t(!0),async function(){try{const e=await o()({path:"/wpcom/v2/related-posts"});return e?.enabled??!1}catch(e){return!1}}().then((e=>{s(e),t(!1)})).catch((()=>{t(!1)}))}),[]);const l=(0,a.useCallback)((()=>{r(!0),async function(){try{return await o()({path:"/wpcom/v2/related-posts/enable",method:"POST"})}catch(e){return!1}}().then((e=>{s(e),r(!1)})).catch((()=>{r(!1)}))}),[]);return(0,a.useMemo)((()=>({isEnabled:i,enable:l,isFetchingStatus:e,isUpdatingStatus:n})),[i,l,e,n])}},17778:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(51806),o=n(6895),a=n(13419),i=n(55609),s=n(69307),l=n(65736),c=n(25411);const __=l.__,u=(0,a.dM)(c),p=e=>{let{className:t,changeStatus:n,isLoading:l,enable:p}=e;const{tracks:d}=(0,a.z$)();(0,s.useEffect)((()=>{d.recordEvent("jetpack_editor_related_posts_placeholder_view")}),[d]);const m=(0,a.Wp)()||(0,a.Ug)()?"https://wordpress.com/support/related-posts/":(0,o.Z)("jetpack-support-related-posts");return(0,r.createElement)("div",{className:t},(0,r.createElement)(i.Placeholder,{icon:u,instructions:__("You'll need to activate the Related Posts feature to use this block.","jetpack"),label:c.title},(0,r.createElement)(i.Button,{disabled:l,isBusy:l,onClick:()=>{let e=!1;return d.recordEvent("jetpack_editor_related_posts_enable"),(0,a.Wp)()||(e=n(!0)),e=p(),e},variant:"secondary"},l?__("Activating Related Posts","jetpack"):__("Activate Related Posts","jetpack",0)),(0,r.createElement)("div",{className:"components-placeholder__learn-more"},(0,r.createElement)(i.ExternalLink,{href:m},__("Learn more about the Related Posts feature.","jetpack")))))}},26700:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});var r=n(51806),o=n(88275),a=n(22636),i=n(55609);const s=()=>(0,r.createElement)(o.ZP,null,(0,r.createElement)(i.Placeholder,null,(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:90}))),(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:90}))),(0,r.createElement)(i.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"}},(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:30})),(0,r.createElement)(i.FlexItem,null,(0,r.createElement)(a.Z,{width:"100%",height:90})))))},4498:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(9818),l=n(69307),c=n(65736),u=n(65235),p=n.n(u),d=n(18962),m=n(51100);const __=c.__,_n=c._n,h=[{value:m.FV,label:__("Show after threshold","jetpack")},{value:m.Am,label:__("Show before threshold","jetpack")}],f=(0,o.dM)(d);class g extends l.Component{state={isThresholdValid:!0};setCriteria=e=>this.props.setAttributes({criteria:e});setThreshold=e=>{if(/^\d+$/.test(e)&&+e>0)return this.props.setAttributes({threshold:+e}),void this.setState({isThresholdValid:!0});this.setState({isThresholdValid:!1})};getNoticeLabel(){return this.props.attributes.criteria===m.FV?1===this.props.attributes.threshold?__("This block will only appear to people who have visited this page more than once.","jetpack"):(0,c.sprintf)(/* translators: placeholder is a number. */ | |
| 8 | -_n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold):1===this.props.attributes.threshold?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,c.sprintf)(/* translators: placeholder is a number. */ | |
| 9 | -_n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+this.props.attributes.threshold,"jetpack"),this.props.attributes.threshold)}render(){return(0,r.createElement)("div",{className:p()(this.props.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!this.props.isSelected})},(0,r.createElement)(i.Placeholder,{icon:f,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder"},(0,r.createElement)(i.TextControl,{className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:this.props.attributes.threshold,help:this.state.isThresholdValid?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:this.setThreshold,pattern:"[0-9]",type:"number"}),(0,r.createElement)(i.RadioControl,{label:__("Visibility","jetpack"),selected:this.props.attributes.criteria,options:h,onChange:this.setCriteria})),(0,r.createElement)(i.Notice,{status:"info",isDismissible:!1},this.getNoticeLabel()),(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(a.InnerBlocks,null)))}}t.Z=(0,s.withSelect)(((e,t)=>{const{isBlockSelected:n,hasSelectedInnerBlock:r}=e("core/block-editor");return{isSelected:n(t.clientId)||r(t.clientId)}}))(g)},48516:function(e,t,n){"use strict";var r=n(51806),o=n(52175);t.Z=e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container"},(0,r.createElement)(o.InnerBlocks.Content,null)))}},51100:function(e,t,n){"use strict";n.d(t,{Am:function(){return o},FV:function(){return r},Kv:function(){return a}});const r="after-visits",o="before-visits",a=3},35983:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(51100);t.Z={attributes:{criteria:{type:"string",default:a.FV},threshold:{type:"number",default:a.Kv}},supports:{html:!1},save:e=>{let{className:t}=e;return(0,r.createElement)("div",{className:t},(0,r.createElement)(o.InnerBlocks.Content,null))}}},50323:function(e,t,n){"use strict";var r=n(31985),o=n(18962),a=n(4498),i=n(48516),s=n(35983);(0,r.S)(o,{edit:a.Z,save:i.Z,deprecated:[s.Z]})},36825:function(e,t,n){"use strict";n.d(t,{LC:function(){return r},Rh:function(){return a},a7:function(){return o}});const r="jp_pay_product",o="USD",a=[o,"EUR","AUD","BRL","CAD","CZK","DKK","HKD","HUF","ILS","JPY","MYR","MXN","TWD","NZD","NOK","PHP","PLN","GBP","RUB","SGD","SEK","CHF","THB"]},65093:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__;function i(e){let{setAttributes:t,postLinkText:n}=e;return(0,r.createElement)(o.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(o.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,r.createElement)(o.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>t({postLinkText:e}),value:n})))}},66763:function(e,t,n){"use strict";var r=n(51806),o=n(69307);t.Z={attributes:{currency:{type:"string",default:"USD"},content:{type:"string",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",default:null},featuredMediaTitle:{type:"string",default:null},multiple:{type:"boolean",default:!1},price:{type:"number"},productId:{type:"number"},title:{type:"string",default:""}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},save:e=>{let{attributes:t}=e;const{productId:n}=t;return n?(0,r.createElement)(o.RawHTML,null,`[simple-payment id="${n}"]`):null}}},21559:function(e,t,n){"use strict";var r=n(51806),o=n(43317),a=n(52175),i=n(55609),s=n(94333),l=n(9818),c=n(69307),u=n(65736),p=n(65235),d=n.n(p),m=n(92384),h=n(92819),f=n(59809),g=n(36825),v=n(39416),b=n(72802),k=n(96059);const __=u.__,_n=u._n;class y extends c.Component{state={fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1};shouldInjectPaymentAttributes=!!this.props.attributes.productId;componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:n,setAttributes:r}=this.props,{productId:o}=e;!o&&t&&this.saveProduct();const a=n&&n!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(a||i)&&r({...a&&{postLinkUrl:n},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:o}=this.props;(0,h.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),!e.isSaving&&this.props.isSaving&&t&&this.validateAttributes()?this.saveProduct():e.isSelected&&!n&&this.validateAttributes();const a=r&&r!==this.props.attributes.postLinkUrl,i=!this.props.attributes.postLinkText;(a||i)&&o({...a&&{postLinkUrl:r},...i&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,h.isEmpty)(e))return;const{attributes:n,setAttributes:r}=this.props,{content:o,currency:a,email:i,featuredMediaId:s,featuredMediaUrl:l,featuredMediaTitle:c,multiple:u,price:p,title:d}=n;r({content:(0,h.get)(e,["content","raw"],o),currency:(0,h.get)(e,["meta","spay_currency"],a),email:(0,h.get)(e,["meta","spay_email"],i),featuredMediaId:(0,h.get)(e,["featured_media"],s),featuredMediaUrl:(0,h.get)(t,"url",l),featuredMediaTitle:(0,h.get)(t,"title",c),multiple:Boolean((0,h.get)(e,["meta","spay_multiple"],Boolean(u))),price:(0,h.get)(e,["meta","spay_price"],p||void 0),title:(0,h.get)(e,["title","raw"],d)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:n,email:r,featuredMediaId:o,multiple:a,price:i,productId:s,title:l}=e;return{id:s,content:t,featured_media:o,meta:{spay_currency:n,spay_email:r,spay_multiple:a,spay_price:i},status:s?"publish":"draft",title:l}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:n}=e,{saveEntityRecord:r}=(0,l.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{r("postType",g.LC,this.toApi()).then((e=>(e&&t({productId:e.id}),e))).catch((e=>{if(!e||!e.data)return;const{data:{key:t}}=e;this.setState({fieldEmailError:"spay_email"===t?(0,u.sprintf)(/* translators: placeholder is an email address. */ | |
| 10 | -__("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}validateAttributes=()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;return g.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,o.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,k.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,u.sprintf)(/* translators: Placeholder is a number of decimals in a number. */ | |
| 11 | -_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",n,"jetpack"),n)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)};validateEmail=()=>{const{email:e}=this.props.attributes;return e?m.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,u.sprintf)(/* translators: placeholder is an email address. */ | |
| 12 | -__("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)};validateTitle=()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack")}),!1)};handleEmailChange=e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})};handleContentChange=e=>{this.props.setAttributes({content:e})};handlePriceChange=e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})};handleCurrencyChange=e=>{this.props.setAttributes({currency:e})};handleMultipleChange=e=>{this.props.setAttributes({multiple:!!e})};handleTitleChange=e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})};getCurrencyList=g.Rh.map((e=>{const{symbol:t}=(0,o.X)(e);return{value:e,label:t===e?e:`${e} ${(0,h.trimEnd)(t,".")}`}}));renderSettings=()=>(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Settings","jetpack"),initialOpen:!1},(0,r.createElement)(i.BaseControl,{label:__("Purchase link text","jetpack"),help:__("Enter the text you want to display on a purchase link used as fallback when the PayPal button cannot be used (e.g. emails, AMP, etc.)","jetpack"),className:"jetpack-simple-payments__purchase-link-text"},(0,r.createElement)(i.TextControl,{placeholder:__("Click here to purchase","jetpack"),onChange:e=>this.props.setAttributes({postLinkText:e}),value:this.props.attributes.postLinkText}))));render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:o,instanceId:a,isSelected:s,setAttributes:l,simplePayment:c}=this.props,{content:u,currency:p,email:m,featuredMediaId:g,featuredMediaUrl:y,featuredMediaTitle:w,multiple:E,price:_,productId:C,title:S}=o,x=C&&(0,h.isEmpty)(c);if(!s&&x)return(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(b.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!s&&m&&_&&S&&!e&&!t&&!n)return(0,r.createElement)(b.Z,{"aria-busy":"false",content:u,featuredMediaUrl:y,featuredMediaTitle:w,formattedPrice:(0,k.w)(_,p),multiple:E,title:S});const j=x?i.Disabled:"div";return(0,r.createElement)(j,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,r.createElement)(v.Z,{featuredMediaId:g,featuredMediaUrl:y,featuredMediaTitle:w,setAttributes:l}),(0,r.createElement)("div",null,(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-title-error`,className:d()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:S}),(0,r.createElement)(f.Z,{id:`${a}-title-error`,isError:!0},n),(0,r.createElement)(i.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),value:u}),(0,r.createElement)("div",{className:"simple-payments__price-container"},(0,r.createElement)(i.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:p}),(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-price-error`,className:d()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,k.w)(0,p,!1),required:!0,step:"1",type:"number",value:_||""}),(0,r.createElement)(f.Z,{id:`${a}-price-error`,isError:!0},t)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.createElement)(i.ToggleControl,{checked:Boolean(E),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-email-${e?"error":"help"}`,className:d()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetpack"),onChange:this.handleEmailChange,placeholder:__("Email","jetpack"),required:!0,type:"text",value:m}),(0,r.createElement)(f.Z,{id:`${a}-email-error`,isError:!0},e),(0,r.createElement)(f.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,r.createElement)(i.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const w=(0,l.withSelect)(((e,t)=>{const{getEntityRecord:n,getMedia:r}=e("core"),{isSavingPost:o,getCurrentPost:a}=e("core/editor"),{productId:i,featuredMediaId:s}=t.attributes,l=i?(0,h.pick)(n("postType",g.LC,i),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,c=a();return{hasPublishAction:!!(0,h.get)(c,["_links","wp:action-publish"]),isSaving:!!o(),simplePayment:l,featuredMedia:s?r(s):null,postLinkUrl:c.link}}));t.Z=(0,s.compose)(w,s.withInstanceId)(y)},24097:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(55609),i=n(69307),s=n(65736),l=n(70355),c=n(36825),u=n(21559),p=n(83080);const __=s.__,_x=s._x,d=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),m=(0,o.Wp)()||(0,o.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",h={title:__("Pay with PayPal","jetpack"),description:(0,r.createElement)(i.Fragment,null,(0,r.createElement)("p",null,__("Lets you add credit and debit card payment buttons with minimal setup.","jetpack")),(0,r.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)(a.ExternalLink,{href:m},__("Support reference","jetpack"))),icon:{src:d,foreground:(0,l.m)()},category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),_x("simple","block search term","jetpack"),_x("payments","block search term","jetpack"),"PayPal"],attributes:{currency:{type:"string",default:c.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const n=parseInt(t,10);return n||void 0}}}}]},edit:u.Z,save:p.Z,supports:{className:!1,customClassName:!1,html:!1,reusable:!1}};t.Z=h},83080:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(96059);function a(e){let{attributes:t}=e;const{content:n,currency:a,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:l,postLinkText:c,price:u,productId:p,title:d}=t;return p?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${p}`},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},i&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("div",{className:"jetpack-simple-payments-image"},(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:i,alt:s})))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,d)),(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,(0,o.w)(u,a))),(0,r.createElement)("a",{className:"jetpack-simple-payments-purchase",href:l,target:"_blank",rel:"noopener noreferrer"},c)))):null}},36239:function(e,t,n){"use strict";var r=n(51806),o=n(43317),a=n(52175),i=n(55609),s=n(94333),l=n(9818),c=n(69307),u=n(65736),p=n(6551),d=n(65235),m=n.n(d),h=n(92384),f=n(92819),g=n(59809),v=n(36825),b=n(65093),k=n(39416),y=n(72802),w=n(96059);const __=u.__,_n=u._n;class E extends c.Component{state={fieldEmailError:null,fieldPriceError:null,fieldTitleError:null,isSavingProduct:!1};shouldInjectPaymentAttributes=!!this.props.attributes.productId;componentDidMount(){this.injectPaymentAttributes();const{attributes:e,hasPublishAction:t,postLinkUrl:n,setAttributes:r,isPostEditor:o}=this.props,{productId:a}=e;(!a&&t||!o)&&this.saveProduct();const i=n&&n!==this.props.attributes.postLinkUrl,s=!this.props.attributes.postLinkText;(i||s)&&r({...i&&{postLinkUrl:n},...s&&{postLinkText:__("Click here to purchase.","jetpack")}}),window.wp?.customize?.bind("change",(e=>{let t;const n=e.id.match(/^widget_(.+)(?:\[(\d+)\])$/);if(n){t=`${n[1]}-${parseInt(n[2],10)}`}else t=e.id;t===(0,p.getWidgetIdFromBlock)(this.props.block)&&this.validateAttributes()&&this.saveProduct()}))}componentDidUpdate(e){const{hasPublishAction:t,isSelected:n,postLinkUrl:r,setAttributes:o,isPostEditor:a}=this.props;(0,f.isEqual)(e.simplePayment,this.props.simplePayment)||this.injectPaymentAttributes(),e.isSaving||!this.props.isSaving||!t&&a||!this.validateAttributes()?e.isSelected&&!n&&this.validateAttributes():this.saveProduct();const i=r&&r!==this.props.attributes.postLinkUrl,s=!this.props.attributes.postLinkText;(i||s)&&o({...i&&{postLinkUrl:r},...s&&{postLinkText:__("Click here to purchase.","jetpack")}})}injectPaymentAttributes(){const{simplePayment:e,featuredMedia:t}=this.props;if(!this.shouldInjectPaymentAttributes||(0,f.isEmpty)(e))return;const{attributes:n,setAttributes:r}=this.props,{content:o,currency:a,email:i,featuredMediaId:s,featuredMediaUrl:l,featuredMediaTitle:c,multiple:u,price:p,title:d}=n;r({content:(0,f.get)(e,["content","raw"],o),currency:(0,f.get)(e,["meta","spay_currency"],a),email:(0,f.get)(e,["meta","spay_email"],i),featuredMediaId:(0,f.get)(e,["featured_media"],s),featuredMediaUrl:(0,f.get)(t,"url",l),featuredMediaTitle:(0,f.get)(t,"title",c),multiple:Boolean((0,f.get)(e,["meta","spay_multiple"],Boolean(u))),price:(0,f.get)(e,["meta","spay_price"],p||void 0),title:(0,f.get)(e,["title","raw"],d)}),this.shouldInjectPaymentAttributes=!this.shouldInjectPaymentAttributes}toApi(){const{attributes:e}=this.props,{content:t,currency:n,email:r,featuredMediaId:o,multiple:a,price:i,productId:s,title:l}=e;return{id:s,content:t,featured_media:o,meta:{spay_currency:n,spay_email:r,spay_multiple:a,spay_price:i},status:s?"publish":"draft",title:l}}saveProduct(){if(this.state.isSavingProduct)return;const{attributes:e,setAttributes:t}=this.props,{email:n}=e,{saveEntityRecord:r}=(0,l.dispatch)("core");this.setState({isSavingProduct:!0},(()=>{r("postType",v.LC,this.toApi()).then((e=>(e&&t({productId:e.id}),e))).catch((e=>{if(!e||!e.data)return;const{data:{key:t}}=e;this.setState({fieldEmailError:"spay_email"===t?(0,u.sprintf)(/* translators: Placeholder is an email address. */ | |
| 13 | -__("%s is not a valid email address.","jetpack"),n):null,fieldPriceError:"spay_price"===t?__("Invalid price.","jetpack"):null})})).finally((()=>{this.setState({isSavingProduct:!1})}))}))}validateAttributes=()=>{const e=this.validatePrice(),t=this.validateTitle(),n=this.validateEmail(),r=this.validateCurrency();return e&&t&&n&&r};validateCurrency=()=>{const{currency:e}=this.props.attributes;return v.Rh.includes(e)};validatePrice=()=>{const{currency:e,price:t}=this.props.attributes,{precision:n}=(0,o.X)(e);return t&&0!==parseFloat(t)?Number.isNaN(parseFloat(t))?(this.setState({fieldPriceError:__("Invalid price","jetpack")}),!1):parseFloat(t)<0?(this.setState({fieldPriceError:__("Your price is negative — enter a positive number so people can pay the right amount.","jetpack")}),!1):(0,w.N3)(t)>n?0===n?(this.setState({fieldPriceError:__("We know every penny counts, but prices in this currency can’t contain decimal values.","jetpack")}),!1):(this.setState({fieldPriceError:(0,u.sprintf)(/* translators: Placeholder is a number of decimals in a number. */ | |
| 14 | -_n("The price cannot have more than %d decimal place.","The price cannot have more than %d decimal places.",n,"jetpack"),n)}),!1):(this.state.fieldPriceError&&this.setState({fieldPriceError:null}),!0):(this.setState({fieldPriceError:__("If you’re selling something, you need a price tag. Add yours here.","jetpack")}),!1)};validateEmail=()=>{const{email:e}=this.props.attributes;return e?h.validate(e)?(this.state.fieldEmailError&&this.setState({fieldEmailError:null}),!0):(this.setState({fieldEmailError:(0,u.sprintf)(/* translators: Placeholder is an email address. */ | |
| 15 | -__("%s is not a valid email address.","jetpack"),e)}),!1):(this.setState({fieldEmailError:__("We want to make sure payments reach you, so please add an email address.","jetpack")}),!1)};validateTitle=()=>{const{title:e}=this.props.attributes;return e?(this.state.fieldTitleError&&this.setState({fieldTitleError:null}),!0):(this.setState({fieldTitleError:__("Please add a brief title so that people know what they’re paying for.","jetpack")}),!1)};handleEmailChange=e=>{this.props.setAttributes({email:e}),this.setState({fieldEmailError:null})};handleContentChange=e=>{this.props.setAttributes({content:e})};handlePriceChange=e=>{e=parseFloat(e),isNaN(e)?this.props.setAttributes({price:void 0}):this.props.setAttributes({price:e}),this.setState({fieldPriceError:null})};handleCurrencyChange=e=>{this.props.setAttributes({currency:e})};handleMultipleChange=e=>{this.props.setAttributes({multiple:!!e})};handleTitleChange=e=>{this.props.setAttributes({title:e}),this.setState({fieldTitleError:null})};getCurrencyList=v.Rh.map((e=>{const{symbol:t}=(0,o.X)(e);return{value:e,label:t===e?e:`${e} ${(0,f.trimEnd)(t,".")}`}}));renderSettings=()=>(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(b.G,{postLinkText:this.props.attributes.postLinkText,setAttributes:this.props.setAttributes}));render(){const{fieldEmailError:e,fieldPriceError:t,fieldTitleError:n}=this.state,{attributes:o,instanceId:a,isSelected:s,setAttributes:l,simplePayment:c}=this.props,{content:u,currency:p,email:d,featuredMediaId:h,featuredMediaUrl:v,featuredMediaTitle:b,multiple:E,price:_,productId:C,title:S}=o,x=C&&(0,f.isEmpty)(c);if(!s&&x)return(0,r.createElement)("div",{className:"simple-payments__loading"},(0,r.createElement)(y.Z,{"aria-busy":"true",content:"█████",formattedPrice:"█████",title:"█████"}));if(!s&&d&&_&&S&&!e&&!t&&!n)return(0,r.createElement)(y.Z,{"aria-busy":"false",content:u,featuredMediaUrl:v,featuredMediaTitle:b,formattedPrice:(0,w.T4)(_,p),multiple:E,title:S});const j=x?i.Disabled:"div";return(0,r.createElement)(j,{className:"wp-block-jetpack-simple-payments"},this.renderSettings(),(0,r.createElement)(k.Z,{featuredMediaId:h,featuredMediaUrl:v,featuredMediaTitle:b,setAttributes:l}),(0,r.createElement)("div",null,(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-title-error`,className:m()("simple-payments__field","simple-payments__field-title",{"simple-payments__field-has-error":n}),label:__("Item name","jetpack"),onChange:this.handleTitleChange,placeholder:__("Item name","jetpack"),required:!0,type:"text",value:S}),(0,r.createElement)(g.Z,{id:`${a}-title-error`,isError:!0},n),(0,r.createElement)(i.TextareaControl,{className:"simple-payments__field simple-payments__field-content",label:__("Describe your item in a few words","jetpack"),onChange:this.handleContentChange,placeholder:__("Describe your item in a few words","jetpack"),"aria-label":__("Describe your item in a few words","jetpack"),value:u}),(0,r.createElement)("div",{className:"simple-payments__price-container"},(0,r.createElement)(i.SelectControl,{className:"simple-payments__field simple-payments__field-currency",label:__("Currency","jetpack"),onChange:this.handleCurrencyChange,options:this.getCurrencyList,value:p}),(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-price-error`,className:m()("simple-payments__field","simple-payments__field-price",{"simple-payments__field-has-error":t}),label:__("Price","jetpack"),onChange:this.handlePriceChange,placeholder:(0,w.T4)(0,p,!1),required:!0,step:"1",type:"number",value:_||""}),(0,r.createElement)(g.Z,{id:`${a}-price-error`,isError:!0},t)),(0,r.createElement)("div",{className:"simple-payments__field-multiple"},(0,r.createElement)(i.ToggleControl,{checked:Boolean(E),label:__("Allow people to buy more than one item at a time","jetpack"),onChange:this.handleMultipleChange})),(0,r.createElement)(i.TextControl,{"aria-describedby":`${a}-email-${e?"error":"help"}`,className:m()("simple-payments__field","simple-payments__field-email",{"simple-payments__field-has-error":e}),label:__("Email","jetpack"),onChange:this.handleEmailChange,placeholder:__("Email","jetpack"),required:!0,type:"text",value:d}),(0,r.createElement)(g.Z,{id:`${a}-email-error`,isError:!0},e),(0,r.createElement)(g.Z,{id:`${a}-email-help`},__("Enter the email address associated with your PayPal account. Don’t have an account?","jetpack")+" ",(0,r.createElement)(i.ExternalLink,{href:"https://www.paypal.com/"},__("Create one on PayPal","jetpack")))))}}const _=(0,l.withSelect)(((e,t)=>{const{getEntityRecord:n,getMedia:r}=e("core"),{getCurrentPost:o}=e("core/editor"),{__experimentalGetDirtyEntityRecords:a,isSavingEntityRecord:i}=e("core"),s=a,{productId:l,featuredMediaId:c}=t.attributes,u=l?(0,f.pick)(n("postType",v.LC,l),[["content"],["meta","spay_currency"],["meta","spay_email"],["meta","spay_multiple"],["meta","spay_price"],["title","raw"],["featured_media"]]):void 0,p=o();return{block:e("core/block-editor").getBlock(t.clientId),hasPublishAction:!!(0,f.get)(p,["_links","wp:action-publish"]),isSaving:s().some((e=>i(e.kind,e.name,e.key))),simplePayment:u,featuredMedia:c?r(c):null,postLinkUrl:p?.guid?.raw,isPostEditor:Object.keys(o()).length>0}}));t.Z=(0,s.compose)(_,s.withInstanceId)(E)},36227:function(e,t,n){"use strict";var r=n(31985),o=n(61390);(0,r.Z)(o.u2,o.Xd)},39416:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),l=n(92819),c=n(94545);const __=s.__,u=e=>t=>e({featuredMediaId:(0,l.get)(t,"id",0),featuredMediaUrl:(0,l.get)(t,"url",null),featuredMediaTitle:(0,l.get)(t,"title",null)});t.Z=e=>{let{featuredMediaId:t,featuredMediaUrl:n,featuredMediaTitle:s,setAttributes:l}=e;return t?(0,r.createElement)("div",null,(0,r.createElement)(i.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarItem,null,(()=>(0,r.createElement)(o.MediaUpload,{onSelect:u(l),allowedTypes:["image"],value:t,render:e=>{let{open:t}=e;return(0,r.createElement)(c.Z,{label:__("Edit Image","jetpack"),onClick:t})}}))),(0,r.createElement)(a.ToolbarButton,{icon:"trash",title:__("Remove Image","jetpack"),onClick:()=>l({featuredMediaId:null,featuredMediaUrl:null,featuredMediaTitle:null})}))),(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:n,alt:s})))):(0,r.createElement)(o.MediaPlaceholder,{icon:(0,r.createElement)(o.BlockIcon,{icon:"format-image"}),labels:{title:__("Product Image","jetpack")},accept:"image/*",allowedTypes:["image"],onSelect:u(l)})}},61390:function(e,t,n){"use strict";n.d(t,{Xd:function(){return b},u2:function(){return f}});var r=n(51806),o=n(13419),a=n(55609),i=n(69307),s=n(65736),l=n(70355),c=n(36825),u=n(66763),p=n(24097),d=n(36239),m=n(16376),h=n(60206);const __=s.__,_x=s._x,f="simple-payments",g=(0,r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(a.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(a.Path,{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"})),v=(0,o.Wp)()||(0,o.Ug)()?"https://wordpress.com/support/pay-with-paypal/":"https://jetpack.com/support/jetpack-blocks/pay-with-paypal/",b={title:__("Pay with PayPal","jetpack"),description:(0,r.createElement)(i.Fragment,null,(0,r.createElement)("p",null,__("Add credit and debit card payment buttons with minimal setup. Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)("p",null,__("Good for collecting donations or payments for products and services.","jetpack")),(0,r.createElement)(a.ExternalLink,{href:v},__("Support reference","jetpack"))),icon:{src:g,foreground:(0,l.m)()},category:"earn",keywords:[_x("buy","block search term","jetpack"),_x("commerce","block search term","jetpack"),_x("credit card","block search term","jetpack"),_x("debit card","block search term","jetpack"),_x("earn","block search term","jetpack"),_x("ecommerce","block search term","jetpack"),_x("money","block search term","jetpack"),_x("paid","block search term","jetpack"),_x("payments","block search term","jetpack"),_x("products","block search term","jetpack"),_x("purchase","block search term","jetpack"),_x("sell","block search term","jetpack"),_x("shop","block search term","jetpack"),"square",_x("payments","block search term","jetpack")],attributes:{currency:{type:"string",default:c.a7},content:{type:"string",source:"html",selector:".jetpack-simple-payments-description p",default:""},email:{type:"string",default:""},featuredMediaId:{type:"number",default:0},featuredMediaUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"src",default:null},featuredMediaTitle:{type:"string",source:"attribute",selector:".jetpack-simple-payments-image img",attribute:"alt",default:null},multiple:{type:"boolean",default:!1},postLinkUrl:{type:"string",source:"attribute",selector:".jetpack-simple-payments-purchase",attribute:"href"},postLinkText:{type:"string",source:"html",selector:".jetpack-simple-payments-purchase",default:__("Click here to purchase.","jetpack")},price:{type:"number"},productId:{type:"number"},title:{type:"string",source:"html",selector:".jetpack-simple-payments-title p",default:""}},transforms:{from:[{type:"shortcode",tag:"simple-payment",attributes:{productId:{type:"number",shortcode:e=>{let{named:{id:t}}=e;if(!t)return;const n=parseInt(t,10);return n||void 0}}}}]},edit:d.Z,save:m.Z,example:{attributes:{price:25,title:__("Jetpack t-shirt","jetpack"),content:__("Take flight in ultimate comfort with this stylish t-shirt featuring the Jetpack logo.","jetpack"),email:"[email protected]",featuredMediaUrl:h}},supports:{className:!1,customClassName:!1,html:!1,reusable:!1},deprecated:[u.Z,p.Z]}},72802:function(e,t,n){"use strict";var r=n(51806),o=n(65736),a=n(23879),i=n(22323);const __=o.__;t.Z=e=>{let{title:t="",content:n="",formattedPrice:o="",multiple:s=!1,featuredMediaUrl:l=null,featuredMediaTitle:c=null}=e;return(0,r.createElement)("div",{className:"jetpack-simple-payments-wrapper"},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},l&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("figure",{className:"jetpack-simple-payments-image"},(0,r.createElement)("img",{src:l,alt:c}))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},t&&(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,t)),n&&(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),o&&(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,o)),(0,r.createElement)("div",{className:"jetpack-simple-payments-purchase-box"},s&&(0,r.createElement)("div",{className:"jetpack-simple-payments-items"},(0,r.createElement)("input",{className:"jetpack-simple-payments-items-number",readOnly:!0,type:"number",value:"1"})),(0,r.createElement)("div",{className:"jetpack-simple-payments-button"},(0,r.createElement)("img",{alt:__("Pay with PayPal","jetpack"),src:i,srcSet:`${a} 2x`}))))))}},16376:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(96059);function a(e){let{attributes:t}=e;const{content:n,currency:a,featuredMediaUrl:i,featuredMediaTitle:s,postLinkUrl:l,postLinkText:c,price:u,productId:p,title:d}=t;return p?(0,r.createElement)("div",{className:`jetpack-simple-payments-wrapper jetpack-simple-payments-${p}`},(0,r.createElement)("div",{className:"jetpack-simple-payments-product"},i&&(0,r.createElement)("div",{className:"jetpack-simple-payments-product-image"},(0,r.createElement)("div",{className:"jetpack-simple-payments-image"},(0,r.createElement)("figure",null,(0,r.createElement)("img",{src:i,alt:s})))),(0,r.createElement)("div",{className:"jetpack-simple-payments-details"},(0,r.createElement)("div",{className:"jetpack-simple-payments-title"},(0,r.createElement)("p",null,d)),(0,r.createElement)("div",{className:"jetpack-simple-payments-description"},(0,r.createElement)("p",null,n)),(0,r.createElement)("div",{className:"jetpack-simple-payments-price"},(0,r.createElement)("p",null,(0,o.T4)(u,a))),(0,r.createElement)("a",{className:"jetpack-simple-payments-purchase",href:l,target:"_blank",rel:"noopener noreferrer"},c)))):null}},96059:function(e,t,n){"use strict";n.d(t,{N3:function(){return a},T4:function(){return l},w:function(){return s}});var r=n(43317),o=n(92819);n(36825);const a=e=>{const t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";const t=window?.window?.navigator;return t?.languages?.length?t.languages[0]:t?.userLanguage??t?.language??t?.browserLanguage??e},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const{precision:a,symbol:i}=(0,r.X)(t),s=e.toFixed(a);return n?`${s} ${(0,o.trimEnd)(i,".")}`:s},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!window.Intl||"function"!=typeof Intl.NumberFormat)return s(e,t,n);const r=[window?.Jetpack_Editor_Initial_State?.siteLocale??"en-US",i(),"en-US"];let o,a={};for(o of(n&&(a={style:"currency",currency:t}),r))try{return Intl.NumberFormat(o,a).format(e)}catch{continue}return s(e,t,n)}},20288:function(e,t,n){"use strict";n.d(t,{G:function(){return c},J:function(){return u}});var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),l=n(92819);const __=s.__,_x=s._x;function c(e){let{attributes:{autoplay:t,delay:n,effect:o,images:s,sizeSlug:c},imageSizeOptions:u,onChangeImageSize:p,setAttributes:d}=e;const m="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,r.createElement)(i.Fragment,null,(0,r.createElement)(a.PanelBody,{title:__("Autoplay","jetpack")},(0,r.createElement)(a.ToggleControl,{label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:t,onChange:e=>{d({autoplay:e})}}),t&&(0,r.createElement)(a.RangeControl,{label:__("Delay between transitions (in seconds)","jetpack"),value:n,onChange:e=>{d({delay:e})},min:1,max:5}),t&&m&&(0,r.createElement)("span",null,__("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack"))),(0,r.createElement)(a.PanelBody,{title:__("Effects","jetpack")},(0,r.createElement)(a.SelectControl,{label:__("Transition","jetpack"),value:o,onChange:e=>{d({effect:e})},options:h})),!(0,l.isEmpty)(s)&&!(0,l.isEmpty)(u)&&(0,r.createElement)(a.PanelBody,{title:__("Image Settings","jetpack")},(0,r.createElement)(a.SelectControl,{label:__("Size","jetpack"),value:c,options:u,onChange:e=>p(e)})))}function u(e){let{allowedMediaTypes:t,attributes:{images:n},onSelectImages:s}=e;return(0,r.createElement)(i.Fragment,null,!!n.length&&(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.ToolbarItem,null,(()=>(0,r.createElement)(o.MediaUpload,{onSelect:s,allowedTypes:t,multiple:!0,gallery:!0,value:n.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(a.Button,{label:__("Edit Slideshow","jetpack"),onClick:t},__("Edit","jetpack"))}})))))}},30847:function(e,t,n){"use strict";async function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".swiper-container",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(r||{}).map((e=>{let[t,n]=e;return[t,function(){n(this)}]})))},[{default:a}]=await Promise.all([Promise.all([n.e(958),n.e(390)]).then(n.t.bind(n,59101,23)),Promise.all([n.e(958),n.e(390)]).then(n.bind(n,89701))]);return new a(e,{...o,...t})}n.d(t,{Z:function(){return r}})},21233:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(11313),i=n(52175),s=n(55609),l=n(94333),c=n(9818),u=n(12238),p=n(69307),d=n(65736),m=n(92819),h=n(26523),f=n(20288),g=n(19486);const __=d.__,v=["image"],b=(0,o.dM)(h),k=(e,t)=>{const n=(0,m.pick)(e,["alt","id","link","caption"]);return n.url=(0,m.get)(e,["sizes",t,"url"])||(0,m.get)(e,["media_details","sizes",t,"source_url"])||e.url,n};class y extends p.Component{constructor(){super(...arguments),this.state={selectedImage:null}}componentDidMount(){const{ids:e,sizeSlug:t}=this.props.attributes;t||this.setAttributes({sizeSlug:e.length?"full":"large"})}setAttributes(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e={...e,ids:e.images.map((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}onSelectImages=e=>{const{sizeSlug:t}=this.props.attributes,n=e.map((e=>k(e,t)));this.setAttributes({images:n})};onRemoveImage=e=>()=>{const t=(0,m.filter)(this.props.attributes.images,((t,n)=>e!==n));this.setState({selectedImage:null}),this.setAttributes({images:t})};addFiles=e=>{const t=this.props.attributes.images||[],n=this.props.attributes.sizeSlug,{lockPostSaving:r,unlockPostSaving:o,noticeOperations:i}=this.props,s="slideshowBlockLock";r(s),(0,u.mediaUpload)({allowedTypes:v,filesList:e,onFileChange:e=>{const r=e.map((e=>k(e,n)));this.setAttributes({images:[...t,...r]}),r.every((e=>(0,a.isBlobURL)(e.url)))||o(s)},onError:i.createErrorNotice})};uploadFromFiles=e=>this.addFiles(e.target.files);getImageSizeOptions(){const{imageSizes:e}=this.props;return(0,m.map)(e,(e=>{let{name:t,slug:n}=e;return{value:n,label:t}}))}updateImagesSize=e=>{const{images:t}=this.props.attributes,{resizedImages:n}=this.props,r=t.map((t=>{const r=n.find((e=>{let{id:n}=e;return parseInt(n,10)===parseInt(t.id,10)})),o=(0,m.get)(r,["sizes",e,"source_url"]);return{...t,...o&&{url:o}}}));this.setAttributes({images:r,sizeSlug:e})};render(){const{attributes:e,className:t,isSelected:n,noticeOperations:o,noticeUI:a}=this.props,{align:l,autoplay:c,delay:u,effect:d,images:m}=e,h=this.getImageSizeOptions(),k=(0,r.createElement)(p.Fragment,null,(0,r.createElement)(i.InspectorControls,null,(0,r.createElement)(f.G,{attributes:e,imageSizeOptions:h,onChangeImageSize:this.updateImagesSize,setAttributes:e=>this.setAttributes(e)})),(0,r.createElement)(i.BlockControls,null,(0,r.createElement)(f.J,{allowedMediaTypes:v,attributes:e,onSelectImages:this.onSelectImages})));return 0===m.length?(0,r.createElement)(p.Fragment,null,k,(0,r.createElement)(i.MediaPlaceholder,{icon:b,className:t,labels:{title:__("Slideshow","jetpack"),instructions:__("Drag images, upload new ones or select files from your library.","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:v,multiple:!0,notices:a,onError:o.createErrorNotice})):(0,r.createElement)(p.Fragment,null,k,a,(0,r.createElement)(g.Z,{align:l,autoplay:c,className:t,delay:u,effect:d,images:m,onError:o.createErrorNotice}),(0,r.createElement)(s.DropZone,{onFilesDrop:this.addFiles}),n&&(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow__add-item"},(0,r.createElement)(s.FormFileUpload,{multiple:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack"))))}}t.ZP=(0,l.compose)((0,c.withSelect)(((e,t)=>({imageSizes:e("core/editor").getEditorSettings().imageSizes,resizedImages:t.attributes.ids.reduce(((t,n)=>{const r=e("core").getMedia(n);return[...t,{id:n,sizes:(0,m.get)(r,["media_details","sizes"])}]}),[])}))),(0,c.withDispatch)((e=>{const{lockPostSaving:t,unlockPostSaving:n}=e("core/editor");return{lockPostSaving:t,unlockPostSaving:n}})),s.withNotices)(y)},17013:function(e,t,n){"use strict";var r=n(31985),o=n(26523),a=n(21233),i=n(67240),s=n(65784),l=n(6425),c=n(85983),u=n(81504);(0,r.S)(o,{edit:a.ZP,save:i.Z,transforms:u.Z,example:{attributes:{align:"center",autoplay:!0,ids:[22,23],images:[{alt:"",caption:"",id:22,url:s},{alt:"",caption:"",id:23,url:l},{alt:"",caption:"",id:23,url:c}],effect:"slide"}}})},85575:function(e,t,n){"use strict";n.d(t,{D:function(){return o}});var r=n(65736);const __=r.__;function o(e,t,n){let o="";if(n<=5)for(let e=1;e<=n;e++){o+='<button class="'+`swiper-pagination-bullet${e===t?" swiper-pagination-bullet-active":""}`+'" tab-index="0" role="button" aria-label="'+(0,r.sprintf)(/* translators: placeholder is the the video number to navigate to */ | |
| 16 | -__("Go to slide %s","jetpack"),e)+'"></button>'}else o+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;return o}},67240:function(e,t,n){"use strict";var r=n(51806),o=n(19486);t.Z=e=>{let{attributes:{align:t,autoplay:n,delay:a,effect:i,images:s},className:l}=e;return(0,r.createElement)(o.Z,{align:t,autoplay:n,className:l,delay:a,effect:i,images:s})}},19486:function(e,t,n){"use strict";var r=n(51806),o=n(11313),a=n(52175),i=n(55609),s=n(69307),l=n(65736),c=n(65235),u=n.n(c),p=n(92819),d=n(6209),m=n(30847),h=n(85575),f=n(17766);const __=l.__;class g extends s.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,s.createRef)(),this.btnNextRef=(0,s.createRef)(),this.btnPrevRef=(0,s.createRef)(),this.paginationRef=(0,s.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{e(__("The Swiper library could not be loaded.","jetpack"))}))}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:n,delay:r,effect:o,images:a,onError:i}=this.props;if(t===e.align&&(0,p.isEqual)(a,e.images)||this.swiperInstance&&this.swiperInstance.update(),o!==e.effect||n!==e.autoplay||r!==e.delay||a!==e.images){let t;t=this.swiperIndex?a.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then((e=>{this.swiperInstance=e,this.initializeResizeObserver(e)})).catch((()=>{i(__("The Swiper library could not be loaded.","jetpack"))}))}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new d.Z((()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame((()=>{(0,f.$m)(e),e.update()}))})),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:n,effect:s,images:l}=this.props;return(0,r.createElement)("div",{className:t,"data-autoplay":e||null,"data-delay":e?n:null,"data-effect":s},(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef},(0,r.createElement)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper"},l.map((e=>{let{alt:t,caption:n,id:s,url:l}=e;return(0,r.createElement)("li",{className:u()("wp-block-jetpack-slideshow_slide","swiper-slide",(0,o.isBlobURL)(l)&&"is-transient"),key:s||l},(0,r.createElement)("figure",null,(0,r.createElement)("img",{alt:t,className:`wp-block-jetpack-slideshow_image wp-image-${s}`,"data-id":s,src:l}),(0,o.isBlobURL)(l)&&(0,r.createElement)(i.Spinner,null),n&&(0,r.createElement)(a.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:n})))}))),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,r.createElement)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,r.createElement)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,r.createElement)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})))}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(()=>{var e=this;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(0,m.Z)(e.slideshowRef.current,{autoplay:!(!e.props.autoplay||e.prefersReducedMotion())&&{delay:1e3*e.props.delay,disableOnInteraction:!1},effect:e.props.effect,loop:!0,initialSlide:t,navigation:{nextEl:e.btnNextRef.current,prevEl:e.btnPrevRef.current},pagination:{clickable:!0,el:e.paginationRef.current,type:"custom",renderCustom:h.D}},{init:f.UA,imagesReady:f.$m,paginationRender:f.Wj,transitionEnd:f.HV})}})()}t.Z=g},17766:function(e,t,n){"use strict";n.d(t,{$m:function(){return c},HV:function(){return u},UA:function(){return l},Wj:function(){return p}});var r=n(81975);const o=16/9,a=.8,i=600,s="wp-block-jetpack-slideshow_autoplay-paused";function l(e){c(e),u(e),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",(function(){e.el&&(e.el.classList.contains(s)?(e.el.classList.remove(s),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(s),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))}))}function c(e){if(!e||!e.el)return;const t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(!t)return;const n=t.clientWidth/t.clientHeight,r=Math.max(Math.min(n,o),1),s="undefined"!=typeof window?window.innerHeight*a:i,l=Math.min(e.width/r,s),c=`${Math.floor(l)}px`,u=`${Math.floor(l/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=c,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=u,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=u}function u(e){(e.slides||[]).forEach(((t,n)=>{t.setAttribute("aria-hidden",n===e.activeIndex?"false":"true"),n===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")})),function(e){const t=e.slides[e.activeIndex];if(!t)return;const n=t.getElementsByTagName("FIGCAPTION")[0],o=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:(0,r.escapeHTML)(o.alt))}(e)}function p(e){(e.pagination.bullets||[]).forEach((t=>{t.addEventListener("click",(()=>{const t=e.slides[e.realIndex];setTimeout((()=>{t.focus()}),500)}))}))}},81504:function(e,t,n){"use strict";var r=n(4981),o=n(92819);function a(e){return(0,o.filter)(e,(e=>{let{id:t,url:n}=e;return t&&n}))}const i={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>a(e).length>0,transform:e=>{const t=a(e);return(0,r.createBlock)("jetpack/slideshow",{images:t.map((e=>{let{alt:t,caption:n,id:r,url:o}=e;return{alt:t,caption:n,id:r,url:o}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:e=>{let{images:t}=e;const n=a(t);return n.length>0?(0,r.createBlock)("jetpack/slideshow",{images:n.map((e=>{let{alt:t,caption:n,id:r,url:o}=e;return{alt:t,caption:n,id:r,url:o}})),ids:n.map((e=>{let{id:t}=e;return t}))}):(0,r.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:n}=e;return(0,r.createBlock)("core/gallery",{images:t,ids:n})}},{type:"block",blocks:["core/image"],transform:e=>{let{images:t}=e;return t.length>0?t.map((e=>{let{id:t,url:n,alt:o,caption:a}=e;return(0,r.createBlock)("core/image",{id:t,url:n,alt:o,caption:a})})):(0,r.createBlock)("core/image")}}]};t.Z=i},3740:function(e,t,n){"use strict";n.d(t,{GP:function(){return s},P0:function(){return c},RA:function(){return r},Z5:function(){return i},hI:function(){return a},q3:function(){return o},xJ:function(){return l}});const r=["image"],o=4,a=20,i=20,s=2e3,l="circle",c=[{isDefault:!0,name:"rectangular"},{name:l},{name:"square"},{name:"columns"}]},73463:function(e,t,n){"use strict";var r=n(76476),o=n(43125),a=n(67525),i=n(99504);t.Z=[i,a,o,r]},1377:function(e,t,n){"use strict";n.d(t,{EU:function(){return i},GP:function(){return a},P0:function(){return s},hI:function(){return o},q3:function(){return r}});const r=4,o=20,a=2e3,i="rectangular",s=[{isDefault:!0,name:i},{name:"circle"},{name:"square"},{name:"columns"}]},56005:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(11313);function a(e){const{"aria-label":t,alt:n,height:a,id:i,link:s,linkTo:l,origUrl:c,url:u,width:p}=e;if((0,o.isBlobURL)(c))return null;let d;switch(l){case"media":d=u;break;case"attachment":d=s}const m=(0,r.createElement)("img",{alt:n,"aria-label":t,"data-height":a,"data-id":i,"data-link":s,"data-url":c,"data-width":p,src:u});return(0,r.createElement)("figure",{className:"tiled-gallery__item"},d?(0,r.createElement)("a",{href:d},m):m)}},76476:function(e,t,n){"use strict";n.r(t),n.d(t,{attributes:function(){return o},save:function(){return r.Z},support:function(){return a}});var r=n(91507);const o={align:{default:"center",type:"string"},className:{default:`is-style-${n(1377).EU}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},caption:{selector:"figcaption",source:"html",type:"string"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"}},a={align:["center","wide","full"],customClassName:!1,html:!1}},52235:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t}=e;return(0,r.createElement)("div",{className:"tiled-gallery__col"},t)}},89754:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},15645:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),o=n(11313),a=n(69307),i=n(65736),s=n(69424),l=n(1377),c=n(56005),u=n(30791),p=n(79313);const __=i.__;class d extends a.Component{photonize(e){let{height:t,width:n,url:r}=e;if(!r)return;if((0,o.isBlobURL)(r)||/^https?:\/\/localhost/.test(r))return r;const a=r.split("?",1)[0],i=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)?h:s.Z,{layoutStyle:c}=this.props;if(m(c)&&n&&t){const e=Math.min(l.GP,n,t);return i(a,{resize:`${e},${e}`})}return i(a)}renderImage(e,t){const{images:n,linkTo:o,selectedImage:a}=this.props,s=(0,i.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 17 | -__("image %1$d of %2$d in gallery","jetpack"),t+1,n.length);return(0,r.createElement)(c.Z,{alt:e.alt,"aria-label":s,height:e.height,id:e.id,origUrl:e.url,isSelected:a===t,key:t,link:e.link,linkTo:o,url:this.photonize(e),width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i}=this.props,s=m(i)?p.Z:u.Z,l=this.props.images.map(this.renderImage,this);return(0,r.createElement)("div",{className:n},(0,r.createElement)(s,{align:e,columns:o,images:a,layoutStyle:i,renderedImages:l}),t)}}function m(e){return["circle","square"].includes(e)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},30791:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(69307),a=n(6209),i=n(52235),s=n(89754),l=n(36472),c=n(6817),u=n(6648);class p extends o.Component{gallery=(0,o.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t;(0,u.W)(n).forEach((t=>(0,u.i)(t,e)))}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new a.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}render(){const{align:e,columns:t,images:n,layoutStyle:o,renderedImages:a}=this.props,u=(0,c.h9)(n),p="columns"===o?(0,c.sv)(u,t):(0,c.T9)(u,{isWide:["full","wide"].includes(e)});let d=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(l.Z,{key:t},e.map(((e,t)=>{const n=a.slice(d,d+e);return d+=e,(0,r.createElement)(i.Z,{key:t},n)}))))))}}},6817:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=x([2,1,2],5),l=j([L,L,P,L,L]),c=j([L,L,L,P,L,L,L]),u=x([3,1,3],5),p=j([P,L,L,P]),d=x([1,2,1],5),m=j([P,L,L,L]),h=x([1,3],3),f=j([L,L,L,P]),g=x([3,1],3),v=j([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),b=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&l(o)&&s(e)?[2,1,2]:o.length>15&&c(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:v(o)&&b(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),x=o.slice(S);return n(i,x)};return n([],e)}function x(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},6648:function(e,t,n){"use strict";n.d(t,{W:function(){return i},i:function(){return a}});var r=n(1377);function o(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function a(e,t){!function(e,t,n){let[a,i]=t;const p=1/a*(n-r.q3*(e.childElementCount-1)-i);!function(e,t){let{rawHeight:n,rowWidth:a}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*c(e)[0])),d=o(p,a);i.forEach(((e,t)=>{const a=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:a}=t;const i=l(e).map((e=>a/u(e))),s=o(i,n);Array.from(e.children).forEach(((e,t)=>{const n=s[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:a})}))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){const t=s(e).map(c).reduce(((e,t)=>{let[n,r]=e,[o,a]=t;return[n+o,r+a]}),[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},36472:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},79313:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(92819),a=n(1377),i=n(52235),s=n(89754),l=n(36472);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(a.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},91507:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(81518),a=n(1377),i=n(15645);function s(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{images:n}=t;if(!n.length)return null;const{align:l,className:c,columns:u=s(t),linkTo:p}=t;return(0,r.createElement)(i.Z,{align:l,className:c,columns:u,images:n,layoutStyle:(0,o.t)(a.P0,c),linkTo:p})}},86738:function(e,t,n){"use strict";n.d(t,{EU:function(){return s},GP:function(){return a},P0:function(){return l},Z5:function(){return o},hI:function(){return r},xJ:function(){return i}});const r=20,o=20,a=2e3,i="circle",s="rectangular",l=[{isDefault:!0,name:s},{name:i},{name:"square"},{name:"columns"}]},64931:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(11313),a=n(65235),i=n.n(a);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,o.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":l,"data-url":u,"data-width":d,src:p});return(0,r.createElement)("figure",{className:i()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},43125:function(e,t,n){"use strict";n.r(t),n.d(t,{attributes:function(){return a},save:function(){return o.Z},supports:function(){return i}});var r=n(86738),o=n(68405);const a={align:{default:"center",type:"string"},className:{default:`is-style-${r.EU}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],customClassName:!1,html:!1}},85407:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t}=e;return(0,r.createElement)("div",{className:"tiled-gallery__col"},t)}},40195:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},73208:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),l=n(86738),c=n(64931),u=n(67091),p=n(84420),d=n(87178);const __=a.__;class m extends o.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,linkTo:s,layoutStyle:l,selectedImage:p}=this.props,d=(0,a.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 18 | -__("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:m,srcSet:h}=(0,u.z)(e,{layoutStyle:l});return(0,r.createElement)(c.Z,{alt:e.alt,"aria-label":d,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:p===t,key:t,link:e.link,linkTo:s,origUrl:e.url,showMovers:i.length>1,srcSet:h,url:m,width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i,roundedCorners:c}=this.props,m=(0,u.v)(i)?d.Z:p.Z,h=this.props.images.map(this.renderImage,this),f=i!==l.xJ?Math.min(c,l.Z5):0;return(0,r.createElement)("div",{className:s()(n,{[`has-rounded-corners-${f}`]:f>0})},(0,r.createElement)(m,{align:e,columns:o,images:a,layoutStyle:i,renderedImages:h}),t)}}},84420:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(69307),a=n(85407),i=n(40195),s=n(56243),l=n(12126);class c extends o.Component{gallery=(0,o.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:o,renderedImages:c}=this.props,u=(0,l.h9)(n),p="columns"===o?(0,l.sv)(u,t):(0,l.T9)(u,{isWide:["full","wide"].includes(e)});let d=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},p.map(((e,t)=>(0,r.createElement)(s.Z,{key:t},e.map(((e,t)=>{const n=c.slice(d,d+e);return d+=e,(0,r.createElement)(a.Z,{key:t},n)}))))))}}},12126:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=x([2,1,2],5),l=j([L,L,P,L,L]),c=j([L,L,L,P,L,L,L]),u=x([3,1,3],5),p=j([P,L,L,P]),d=x([1,2,1],5),m=j([P,L,L,L]),h=x([1,3],3),f=j([L,L,L,P]),g=x([3,1],3),v=j([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),b=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&l(o)&&s(e)?[2,1,2]:o.length>15&&c(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:v(o)&&b(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),x=o.slice(S);return n(i,x)};return n([],e)}function x(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},56243:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},87178:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(92819),a=n(86738),i=n(85407),s=n(40195),l=n(56243);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(a.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},68405:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(81518),a=n(86738),i=n(73208);function s(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{imageFilter:n,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:p=s(t),linkTo:d,roundedCorners:m}=t;return(0,r.createElement)(i.Z,{align:c,className:u,columns:p,imageFilter:n,images:l,isSave:!0,layoutStyle:(0,o.t)(a.P0,u),linkTo:d,roundedCorners:m})}},67091:function(e,t,n){"use strict";n.d(t,{v:function(){return s},z:function(){return l}});var r=n(11313),o=n(92819),a=n(69424),i=n(86738);function s(e){return["circle","square"].includes(e)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if((0,r.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const n=e.url.split("?",1)[0],{height:l,width:u}=e,{layoutStyle:p}=t,d=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?c:a.Z;let m;if(s(p)&&u&&l){const e=Math.min(i.GP,u,l);m=d(n,{resize:`${e},${e}`})}else m=d(n);let h;if(s(p)){const e=Math.min(600,u,l),t=Math.min(i.GP,u,l);h=(0,o.range)(e,t,300).map((e=>{const t=d(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,u),t=Math.min(i.GP,u);h=(0,o.range)(e,t,300).map((e=>{const t=d(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:m},h&&{srcSet:h})}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},13993:function(e,t,n){"use strict";n.d(t,{EU:function(){return s},GP:function(){return a},P0:function(){return l},Z5:function(){return o},hI:function(){return r},xJ:function(){return i}});const r=20,o=20,a=2e3,i="circle",s="rectangular",l=[{isDefault:!0,name:s},{name:i},{name:"square"},{name:"columns"}]},21959:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(11313),a=n(65235),i=n.n(a);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,o.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":l,"data-url":u,"data-width":d,src:p});return(0,r.createElement)("figure",{className:i()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},67525:function(e,t,n){"use strict";n.r(t),n.d(t,{attributes:function(){return a},migrate:function(){return s},save:function(){return o.Z},supports:function(){return i}});var r=n(13993),o=n(5826);const a={align:{default:"center",type:"string"},className:{default:`is-style-${r.EU}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],customClassName:!1,html:!1},s=e=>{const t=Math.pow(10,5);return{...e,columnWidths:e.columnWidths.map((e=>e.map((e=>Math.round(e*t)/t))))}}},17410:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,width:n}=e;const o=Math.pow(10,12),a=Math.round(n*o)/o,i=n?{flexBasis:`${a}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:i},t)}},46349:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},178:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),l=n(13993),c=n(21959),u=n(11197),p=n(47510),d=n(65662);const __=a.__;class m extends o.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,isSave:s,linkTo:l,layoutStyle:p,onMoveBackward:d,onMoveForward:m,onRemoveImage:h,onSelectImage:f,selectedImage:g,setImageAttributes:v}=this.props,b=(0,a.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 19 | -__("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:p});return(0,r.createElement)(c.Z,{alt:e.alt,"aria-label":b,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:g===t,key:t,link:e.link,linkTo:l,onMoveBackward:s?void 0:d(t),onMoveForward:s?void 0:m(t),onRemove:s?void 0:h(t),onSelect:s?void 0:f(t),origUrl:e.url,setAttributes:s?void 0:v(t),showMovers:i.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i,roundedCorners:c,onResize:m,isSave:h,columnWidths:f}=this.props,g=(0,u.v)(i)?d.Z:p.Z,v=this.props.images.map(this.renderImage,this),b=i!==l.xJ?Math.min(c,l.Z5):0;return(0,r.createElement)("div",{className:s()(n,{[`has-rounded-corners-${b}`]:b>0})},(0,r.createElement)(g,{align:e,columns:o,columnWidths:h?f:void 0,images:a,layoutStyle:i,renderedImages:v,onResize:h?void 0:m}),t)}}},47510:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(69307),a=n(17410),i=n(46349),s=n(78922),l=n(3453);class c extends o.Component{gallery=(0,o.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:n,layoutStyle:o,renderedImages:c,columnWidths:u}=this.props,p=(0,l.h9)(n),d="columns"===o?(0,l.sv)(p,t):(0,l.T9)(p,{isWide:["full","wide"].includes(e)});let m=0;return(0,r.createElement)(i.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(s.Z,{key:t},e.map(((e,n)=>{const o=c.slice(m,m+e);return m+=e,(0,r.createElement)(a.Z,{key:n,width:u?.[t]?.[n]},o)}))))))}}},3453:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=x([2,1,2],5),l=j([L,L,P,L,L]),c=j([L,L,L,P,L,L,L]),u=x([3,1,3],5),p=j([P,L,L,P]),d=x([1,2,1],5),m=j([P,L,L,L]),h=x([1,3],3),f=j([L,L,L,P]),g=x([3,1],3),v=j([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),b=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&l(o)&&s(e)?[2,1,2]:o.length>15&&c(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:v(o)&&b(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),x=o.slice(S);return n(i,x)};return n([],e)}function x(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},78922:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},65662:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(92819),a=n(13993),i=n(17410),s=n(46349),l=n(78922);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(a.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},5826:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(81518),a=n(13993),i=n(178);function s(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{imageFilter:n,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:p=s(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(i.Z,{align:c,className:u,columns:p,imageFilter:n,images:l,isSave:!0,layoutStyle:(0,o.t)(a.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},11197:function(e,t,n){"use strict";n.d(t,{v:function(){return s},z:function(){return l}});var r=n(11313),o=n(92819),a=n(69424),i=n(13993);function s(e){return["circle","square"].includes(e)}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.url||!e.width)return{};if((0,r.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const n=e.url.split("?",1)[0],{height:l,width:u}=e,{layoutStyle:p}=t,d=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?c:a.Z;let m;if(s(p)&&u&&l){const e=Math.min(i.GP,u,l);m=d(n,{resize:`${e},${e}`})}else m=d(n);let h;if(s(p)){const e=Math.min(600,u,l),t=Math.min(i.GP,u,l);h=(0,o.range)(e,t,300).map((e=>{const t=d(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,u),t=Math.min(i.GP,u);h=(0,o.range)(e,t,300).map((e=>{const t=d(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:m},h&&{srcSet:h})}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},38698:function(e,t,n){"use strict";n.d(t,{EU:function(){return l},GP:function(){return i},P0:function(){return c},Z5:function(){return a},hI:function(){return o},q3:function(){return r},xJ:function(){return s}});const r=4,o=20,a=20,i=2e3,s="circle",l="rectangular",c=[{isDefault:!0,name:l},{name:s},{name:"square"},{name:"columns"}]},65597:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(11313),a=n(65235),i=n.n(a);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,o.isBlobURL)(u))return null;let m;switch(c){case"media":m=p;break;case"attachment":m=l}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":l,"data-url":u,"data-width":d,src:p,"data-amp-layout":"responsive"});return(0,r.createElement)("figure",{className:i()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},99504:function(e,t,n){"use strict";n.r(t),n.d(t,{attributes:function(){return a},save:function(){return o.Z},supports:function(){return i}});var r=n(38698),o=n(26225);const a={align:{default:"center",type:"string"},className:{default:`is-style-${r.EU}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},63866:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,width:n}=e;const o=n?{flexBasis:`${n}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:o},t)}},750:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},9230:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),l=n(38698),c=n(65597),u=n(74713),p=n(82265),d=n(72264);const __=a.__;class m extends o.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,isSave:s,linkTo:l,layoutStyle:p,onMoveBackward:d,onMoveForward:m,onRemoveImage:h,onSelectImage:f,selectedImage:g,setImageAttributes:v}=this.props,b=(0,a.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 20 | -__("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),{src:k,srcSet:y}=(0,u.z)(e,{layoutStyle:p});return(0,r.createElement)(c.Z,{alt:e.alt,"aria-label":b,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:g===t,key:t,link:e.link,linkTo:l,onMoveBackward:s?void 0:d(t),onMoveForward:s?void 0:m(t),onRemove:s?void 0:h(t),onSelect:s?void 0:f(t),origUrl:e.url,setAttributes:s?void 0:v(t),showMovers:i.length>1,srcSet:y,url:k,width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i,roundedCorners:c,onResize:m,style:h,isSave:f,columnWidths:g}=this.props,v=(0,u.v)(i)?d.Z:p.Z,b=this.props.images.map(this.renderImage,this),k=i!==l.xJ?Math.min(c,l.Z5):0;return(0,r.createElement)("div",{style:h,className:s()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(v,{align:e,columns:o,columnWidths:f?g:void 0,images:a,layoutStyle:i,renderedImages:b,onResize:f?void 0:m}),t)}}},82265:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(69307),a=n(6209),i=n(63866),s=n(750),l=n(2911),c=n(76981),u=n(76187);class p extends o.Component{gallery=(0,o.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(r)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new a.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,n){let r=0;return e.map((e=>e.map((e=>{const n=t.slice(r,r+e);return r+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:u}=this.props,p=(0,c.h9)(n),d="columns"===a?(0,c.sv)(p,t):(0,c.T9)(p,{isWide:["full","wide"].includes(e)}),m=o.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(d,u,1e3)})();let h=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(l.Z,{key:t},e.map(((e,n)=>{const o=u.slice(h,h+e);return h+=e,(0,r.createElement)(i.Z,{key:n,width:m?.[t]?.[n]},o)}))))))}}},76981:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=x([2,1,2],5),l=j([L,L,P,L,L]),c=j([L,L,L,P,L,L,L]),u=x([3,1,3],5),p=j([P,L,L,P]),d=x([1,2,1],5),m=j([P,L,L,L]),h=x([1,3],3),f=j([L,L,L,P]),g=x([3,1],3),v=j([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),b=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&l(o)&&s(e)?[2,1,2]:o.length>15&&c(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:v(o)&&b(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),x=o.slice(S);return n(i,x)};return n([],e)}function x(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},76187:function(e,t,n){"use strict";n.d(t,{W:function(){return i},i:function(){return a}});var r=n(38698);function o(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function a(e,t){return function(e,t,n){let[a,i]=t;const p=1/a*(n-r.q3*(e.childElementCount-1)-i);return function(e,t){let{rawHeight:n,rowWidth:a}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*c(e)[0])),d=o(p,a);i.forEach(((e,t)=>{const a=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:a}=t;const i=l(e).map((e=>a/u(e))),s=o(i,n);Array.from(e.children).forEach(((e,t)=>{const n=s[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:a})}));return d.map((e=>parseFloat(e/a*100).toFixed(5)))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){const t=s(e).map(c).reduce(((e,t)=>{let[n,r]=e,[o,a]=t;return[n+o,r+a]}),[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},2911:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},72264:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(92819),a=n(38698),i=n(63866),s=n(750),l=n(2911);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(a.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},26225:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(81518),a=n(38698),i=n(9230);function s(e){return Math.min(3,e.images.length)}function l(e){let{attributes:t}=e;const{imageFilter:n,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:p=s(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(i.Z,{align:c,className:u,columns:p,imageFilter:n,images:l,isSave:!0,layoutStyle:(0,o.t)(a.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},74713:function(e,t,n){"use strict";n.d(t,{v:function(){return c},z:function(){return u}});var r=n(13419),o=n(11313),a=n(92819),i=n(69424),s=n(99621),l=n(38698);function c(e){return["circle","square"].includes(e)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,s.Z)())return{src:e.url};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,r.Ug)()&&(0,r.M6)())return{src:e.url};const n=e.url.split("?",1)[0],{height:u,width:d}=e,{layoutStyle:m}=t,h=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?p:i.Z;let f;if(c(m)&&d&&u){const e=Math.min(l.GP,d,u);f=h(n,{resize:`${e},${e}`})}else f=h(n);let g;if(c(m)){const e=Math.min(600,d,u),t=Math.min(l.GP,d,u);g=(0,a.range)(e,t,300).map((e=>{const t=h(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,d),t=Math.min(l.GP,d);g=(0,a.range)(e,t,300).map((e=>{const t=h(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:f},g&&{srcSet:g})}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},15078:function(e,t,n){"use strict";n.d(t,{F:function(){return k}});var r=n(51806),o=n(13419),a=n(52175),i=n(55609),s=n(12238),l=n(69307),c=n(65736),u=n(92819),p=n(81518),d=n(94545),m=n(99496),h=n(3740),f=n(38897),g=n(21340);const __=c.__,v=(0,o.dM)(m),b=[{value:"attachment",label:__("Attachment Page","jetpack")},{value:"media",label:__("Media File","jetpack")},{value:"none",label:__("None","jetpack")}];function k(e){return Math.min(3,e.images.length)}const y=e=>{const t=(0,u.pick)(e,[["alt"],["id"],["link"]]);return t.url=(0,u.get)(e,["sizes","large","url"])||(0,u.get)(e,["media_details","sizes","large","source_url"])||e.url,t};class w extends l.Component{state={selectedImage:null,changed:void 0===this.props.attributes.columnWidths||0===this.props.attributes.columnWidths?.length};static getDerivedStateFromProps(e,t){return e.isSelected||null===t.selectedImage?null:{selectedImage:null}}setAttributes(e){if(e.ids)throw new Error('The "ids" attribute should not be changed directly. It is managed automatically when "images" attribute changes');e.images&&(e={...e,ids:e.images.map((e=>{let{id:t}=e;return parseInt(t,10)}))}),this.props.setAttributes(e)}addFiles=e=>{const t=this.props.attributes.images||[],{noticeOperations:n}=this.props;(0,s.mediaUpload)({allowedTypes:h.RA,filesList:e,onFileChange:e=>{const n=e.map((e=>y(e)));this.setAttributes({images:t.concat(n)})},onError:n.createErrorNotice}),this.setState({changed:!0})};onRemoveImage=e=>()=>{const t=(0,u.filter)(this.props.attributes.images,((t,n)=>e!==n)),{columns:n}=this.props.attributes;this.setState({selectedImage:null,changed:!0}),this.setAttributes({images:t,columns:n?Math.min(t.length,n):n})};onSelectImage=e=>()=>{this.state.selectedImage!==e&&this.setState({selectedImage:e})};onSelectImages=e=>{const{columns:t}=this.props.attributes;this.setAttributes({columns:t?Math.min(e.length,t):t,images:e.map((e=>y(e)))}),this.setState({changed:!0})};onMove=(e,t)=>{const n=[...this.props.attributes.images];n.splice(t,1,this.props.attributes.images[e]),n.splice(e,1,this.props.attributes.images[t]),this.setState({selectedImage:t,changed:!0}),this.setAttributes({images:n})};onMoveForward=e=>()=>{e!==this.props.attributes.images.length-1&&this.onMove(e,e+1)};onMoveBackward=e=>()=>{0!==e&&this.onMove(e,e-1)};onResize=e=>{this.state.changed&&this.setAttributes({columnWidths:e})};setColumnsNumber=e=>this.setAttributes({columns:e});setRoundedCorners=e=>this.setAttributes({roundedCorners:e});setImageAttributes=e=>t=>{const{attributes:{images:n}}=this.props;n[e]&&this.setAttributes({images:[...n.slice(0,e),{...n[e],...t},...n.slice(e+1)]})};setLinkTo=e=>this.setAttributes({linkTo:e});uploadFromFiles=e=>this.addFiles(e.target.files);render(){const{selectedImage:e}=this.state,{attributes:t,isSelected:n,className:o,noticeOperations:s,noticeUI:c,setAttributes:u}=this.props,{align:m,columns:y=k(t),imageFilter:w,images:E,linkTo:_,roundedCorners:C}=t,S=(0,r.createElement)(i.DropZone,{onFilesDrop:this.addFiles}),x=(0,r.createElement)(a.BlockControls,null,!!E.length&&(0,r.createElement)(l.Fragment,null,(0,r.createElement)(i.ToolbarGroup,null,(0,r.createElement)(i.ToolbarItem,null,(()=>(0,r.createElement)(a.MediaUpload,{onSelect:this.onSelectImages,allowedTypes:h.RA,multiple:!0,gallery:!0,value:E.map((e=>e.id)),render:e=>{let{open:t}=e;return(0,r.createElement)(d.Z,{label:__("Edit Gallery","jetpack"),onClick:t})}})))),(0,r.createElement)(f.Z,{value:w,onChange:e=>{u({imageFilter:e}),this.setState({selectedImage:null})}})));if(0===E.length)return(0,r.createElement)(l.Fragment,null,x,(0,r.createElement)(a.MediaPlaceholder,{icon:v,className:o,labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:this.onSelectImages,accept:"image/*",allowedTypes:h.RA,multiple:!0,notices:c,onError:s.createErrorNotice}));const j=(0,p.t)(h.P0,t.className);return(0,r.createElement)(l.Fragment,null,x,(0,r.createElement)(a.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:__("Tiled Gallery settings","jetpack")},["columns","circle","square"].includes(j)&&E.length>1&&(0,r.createElement)(i.RangeControl,{label:__("Columns","jetpack"),value:y,onChange:this.setColumnsNumber,min:1,max:Math.min(h.hI,E.length)}),j!==h.xJ&&(0,r.createElement)(i.RangeControl,{label:__("Rounded corners","jetpack"),value:C,onChange:this.setRoundedCorners,min:0,max:h.Z5}),(0,r.createElement)(i.SelectControl,{label:__("Link To","jetpack"),value:_,onChange:this.setLinkTo,options:b}))),c,(0,r.createElement)(g.Z,{align:m,className:o,columns:y,imageFilter:w,images:E,layoutStyle:j,linkTo:_,onMoveBackward:this.onMoveBackward,onMoveForward:this.onMoveForward,onRemoveImage:this.onRemoveImage,onSelectImage:this.onSelectImage,onResize:this.onResize,roundedCorners:C,selectedImage:n?e:null,setImageAttributes:this.setImageAttributes},S,n&&(0,r.createElement)("div",{className:"tiled-gallery__add-item"},(0,r.createElement)(i.FormFileUpload,{multiple:!0,className:"tiled-gallery__add-item-button",onChange:this.uploadFromFiles,accept:"image/*",icon:"insert"},__("Upload an image","jetpack")))))}}t.ZP=(0,i.withNotices)(w)},47158:function(e,t,n){"use strict";var r=n(4981),o=n(92819),a=n(31985),i=n(99496),s=n(73463),l=n(15078),c=n(10745);const u={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:n(96606),width:160,height:95},{alt:"",link:"",url:n(85472),width:160,height:107},{alt:"",link:"",url:n(79009),width:304,height:203},{alt:"",link:"",url:n(10742),width:312,height:207},{alt:"",link:"",url:n(52642),width:152,height:101},{alt:"",link:"",url:n(41145),width:152,height:105}],linkTo:"none"};function p(e){return(0,o.filter)(e,(e=>{let{id:t,url:n}=e;return t&&n}))}(0,a.S)(i,{edit:l.ZP,save:c.Z,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>p(e).length>0,transform:e=>{const t=p(e);return(0,r.createBlock)(i.name,{images:t.map((e=>{let{id:t,url:n,link:r,alt:o}=e;return{id:t,url:n,link:r,alt:o}})),ids:t.map((e=>{let{id:t}=e;return t}))})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:e=>{let{images:t}=e;const n=p(t);return n.length>0?(0,r.createBlock)(i.name,{images:n.map((e=>{let{id:t,url:n,link:r,alt:o}=e;return{id:t,url:n,link:r,alt:o}})),ids:n.map((e=>{let{id:t}=e;return t}))}):(0,r.createBlock)(i.name)}}],to:[{type:"block",blocks:["core/gallery"],transform:e=>{let{images:t,ids:n,columns:o,linkTo:a}=e;return(0,r.createBlock)("core/gallery",{images:t,ids:n,columns:o,imageCrop:!0,linkTo:a})}},{type:"block",blocks:["core/image"],transform:e=>{let{align:t,images:n}=e;return n.length>0?n.map((e=>{let{id:n,url:o,alt:a}=e;return(0,r.createBlock)("core/image",{align:t,id:n,url:o,alt:a})})):(0,r.createBlock)("core/image")}}]},providesContext:{imageCrop:"imageCrop"},deprecated:s.Z,example:{attributes:u}})},38897:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__,_x=a._x,i=[{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Original","image style","jetpack"),value:void 0},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Black and White","image style","jetpack"),value:"black-and-white"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),title:_x("Sepia","image style","jetpack"),value:"sepia"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:"1977",value:"1977"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})),title:_x("Clarendon","image style","jetpack"),value:"clarendon"},{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0z"}),(0,r.createElement)(o.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"})),title:_x("Gingham","image style","jetpack"),value:"gingham"}],s=__("Pick an image filter","jetpack");function l(e){let{value:t,onChange:n}=e;return(0,r.createElement)(o.Dropdown,{placement:"bottom-start",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(o.Toolbar,{controls:[{onClick:t,extraProps:{"aria-haspopup":"true","aria-expanded":n},title:s,tooltip:s,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 10v9H4.98V5h9V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zm-2.94-2.06L17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7zM12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12l-2.75-1.25z"}))}]})},renderContent:e=>{let{onClose:a}=e;return(0,r.createElement)(o.NavigableMenu,{className:"tiled-gallery__filter-picker-menu"},i.map((e=>{let{icon:i,title:s,value:l}=e;return(0,r.createElement)(o.MenuItem,{className:t===l?"is-active":void 0,icon:i,isSelected:t===l,key:l||"original",onClick:(c=l,()=>{n(t===c?void 0:c),a()}),role:"menuitemcheckbox"},s);var c})))}})}},57773:function(e,t,n){"use strict";var r=n(51806),o=n(11313),a=n(55609),i=n(9818),s=n(69307),l=n(65736),c=n(39630),u=n(65235),p=n.n(u),d=n(62051);const __=l.__;class m extends s.Component{img=(0,s.createRef)();onImageClick=()=>{this.props.isSelected||this.props.onSelect()};onImageKeyDown=e=>{this.img.current===document.activeElement&&this.props.isSelected&&[c.BACKSPACE,c.DELETE].includes(e.keyCode)&&this.props.onRemove()};componentDidUpdate(){const{alt:e,height:t,image:n,link:r,url:o,width:a}=this.props;if(n){const i={};!e&&n.alt_text&&(i.alt=n.alt_text),!t&&n.media_details&&n.media_details.height&&(i.height=+n.media_details.height),!r&&n.link&&(i.link=n.link),!o&&n.source_url&&(i.url=n.source_url),!a&&n.media_details&&n.media_details.width&&(i.width=+n.media_details.width),Object.keys(i).length&&this.props.setAttributes(i)}}render(){const{"aria-label":e,alt:t,columns:n,height:i,id:l,imageFilter:c,isFirstItem:u,isLastItem:m,isSelected:h,link:f,linkTo:g,onMoveBackward:v,onMoveForward:b,onRemove:k,origUrl:y,showMovers:w,srcSet:E,url:_,width:C}=this.props;let S;switch(g){case"media":S=y;break;case"attachment":S=f}const x=(0,o.isBlobURL)(y),j=(0,r.createElement)(s.Fragment,null,(0,r.createElement)("img",{alt:t,"aria-label":e,"data-height":i,"data-id":l,"data-link":f,"data-url":y,"data-width":C,onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,ref:this.img,src:x?void 0:_,srcSet:x?void 0:E,tabIndex:"0",style:x?{backgroundImage:`url(${y})`}:void 0}),x&&(0,r.createElement)(a.Spinner,null));return(0,r.createElement)("figure",{className:p()("tiled-gallery__item",{"is-selected":h,"is-transient":x,[`filter__${c}`]:!!c})},w&&(0,r.createElement)("div",{className:"tiled-gallery__item__move-menu"},(0,r.createElement)(a.Button,{icon:1===n?d.WO:d.KT,onClick:u?void 0:v,className:"tiled-gallery__item__move-backward",label:__("Move image backward","jetpack"),"aria-disabled":u,disabled:!h}),(0,r.createElement)(a.Button,{icon:1===n?d.xf:d.zz,onClick:m?void 0:b,className:"tiled-gallery__item__move-forward",label:__("Move image forward","jetpack"),"aria-disabled":m,disabled:!h})),(0,r.createElement)("div",{className:"tiled-gallery__item__inline-menu"},(0,r.createElement)(a.Button,{icon:d.xv,onClick:k,className:"tiled-gallery__item__remove",label:__("Remove image","jetpack"),disabled:!h})),S?(0,r.createElement)("a",null,j):j)}}t.Z=(0,i.withSelect)(((e,t)=>{const{getMedia:n}=e("core"),{id:r}=t;return{image:r?n(r):null}}))(m)},81921:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(51806),o=n(11313),a=n(65235),i=n.n(a);function s(e){const{alt:t,imageFilter:n,height:a,id:s,link:l,linkTo:c,origUrl:u,url:p,width:d}=e;if((0,o.isBlobURL)(u))return null;let m;switch(c){case"media":m=u;break;case"attachment":m=l}const h=(0,r.createElement)("img",{alt:t,"data-height":a,"data-id":s,"data-link":l,"data-url":u,"data-width":d,src:p,"data-amp-layout":"responsive"});return(0,r.createElement)("figure",{className:i()("tiled-gallery__item",{[`filter__${n}`]:!!n})},m?(0,r.createElement)("a",{href:m},h):h)}},62051:function(e,t,n){"use strict";n.d(t,{KT:function(){return a},WO:function(){return l},xf:function(){return s},xv:function(){return c},zz:function(){return i}});var r=n(51806),o=n(55609);const a=(0,r.createElement)(o.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})),i=(0,r.createElement)(o.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})),s=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})),l=(0,r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})),c=(0,r.createElement)(o.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)(o.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},24639:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,width:n}=e;const o=n?{flexBasis:`${n}%`}:void 0;return(0,r.createElement)("div",{className:"tiled-gallery__col",style:o},t)}},75084:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(51806);function o(e){let{children:t,galleryRef:n}=e;return(0,r.createElement)("div",{className:"tiled-gallery__gallery",ref:n},t)}},21340:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(51806),o=n(69307),a=n(65736),i=n(65235),s=n.n(i),l=n(3740),c=n(57773),u=n(81921),p=n(13369),d=n(46438),m=n(70216);const __=a.__;class h extends o.Component{renderImage(e,t){const{columns:n,imageFilter:o,images:i,isSave:s,linkTo:l,layoutStyle:d,onMoveBackward:m,onMoveForward:h,onRemoveImage:f,onSelectImage:g,selectedImage:v,setImageAttributes:b}=this.props,k=(0,a.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 21 | -__("image %1$d of %2$d in gallery","jetpack"),t+1,i.length),y=s?u.Z:c.Z,{src:w,srcSet:E}=(0,p.z)(e,{layoutStyle:d});return(0,r.createElement)(y,{alt:e.alt,"aria-label":k,columns:n,height:e.height,id:e.id,imageFilter:o,isFirstItem:0===t,isLastItem:t+1===i.length,isSelected:v===t,key:t,link:e.link,linkTo:l,onMoveBackward:s?void 0:m(t),onMoveForward:s?void 0:h(t),onRemove:s?void 0:f(t),onSelect:s?void 0:g(t),origUrl:e.url,setAttributes:s?void 0:b(t),showMovers:i.length>1,srcSet:E,url:w,width:e.width})}render(){const{align:e,children:t,className:n,columns:o,images:a,layoutStyle:i,roundedCorners:c,onResize:u,style:h,isSave:f,columnWidths:g}=this.props,v=(0,p.v)(i)?m.Z:d.Z,b=this.props.images.map(this.renderImage,this),k=i!==l.xJ?Math.min(c,l.Z5):0;return(0,r.createElement)("div",{style:h,className:s()(n,{[`has-rounded-corners-${k}`]:k>0})},(0,r.createElement)(v,{align:e,columns:o,columnWidths:f?g:void 0,images:a,layoutStyle:i,renderedImages:b,onResize:f?void 0:u}),t)}}},46438:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(69307),a=n(6209),i=n(24639),s=n(75084),l=n(51309),c=n(96001),u=n(99856);class p extends o.Component{gallery=(0,o.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame((()=>{for(const{contentRect:t,target:n}of e){const{width:e}=t,r=[];(0,u.W)(n).forEach((t=>{r.push((0,u.i)(t,e))})),void 0!==this.props.onResize&&this.props.onResize(r)}}))};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new a.Z(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,n){let r=0;return e.map((e=>e.map((e=>{const n=t.slice(r,r+e);return r+=e,n})))).map((e=>(0,u.i)(e,n)))}render(){const{align:e,columns:t,images:n,layoutStyle:a,renderedImages:u}=this.props,p=(0,c.h9)(n),d="columns"===a?(0,c.sv)(p,t):(0,c.T9)(p,{isWide:["full","wide"].includes(e)}),m=o.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(d,u,1e3)})();let h=0;return(0,r.createElement)(s.Z,{galleryRef:this.gallery},d.map(((e,t)=>(0,r.createElement)(l.Z,{key:t},e.map(((e,n)=>{const o=u.slice(h,h+e);return h+=e,(0,r.createElement)(i.Z,{key:n,width:m?.[t]?.[n]},o)}))))))}}},96001:function(e,t,n){"use strict";n.d(t,{T9:function(){return S},h9:function(){return o},sv:function(){return i}});var r=n(92819);function o(e){return(0,r.map)(e,a)}function a(e){let{height:t,width:n}=e;return t&&n?n/t:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const n=(0,r.sum)(e)/t,o=[];let a=e,i=0;for(let e=0;e<t-1;e++){const t=(0,r.takeWhile)(a,(t=>{const r=i<=(e+1)*n;return r&&(i+=t),r})).length;o.push(t),a=(0,r.drop)(a,t)}return o.push(a.length),[o]}const s=x([2,1,2],5),l=j([L,L,P,L,L]),c=j([L,L,L,P,L,L,L]),u=x([3,1,3],5),p=j([P,L,L,P]),d=x([1,2,1],5),m=j([P,L,L,L]),h=x([1,3],3),f=j([L,L,L,P]),g=x([3,1],3),v=j([T(1.6),(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2))]),b=x([1,2],3),k=x([1,1,1,1,1],1),y=x([1,1,1,1],1),w=x([1,1,1],3),E=j([(0,r.overEvery)(A(.9),T(2)),(0,r.overEvery)(A(.9),T(2)),T(1.6)]),_=x([2,1],3),C=j([function(e){return e>=2}]);function S(e){let{isWide:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e,o)=>{if(!o.length)return e;let a;a=o.length>15&&l(o)&&s(e)?[2,1,2]:o.length>15&&c(o)&&u(e)?[3,1,3]:5!==o.length&&p(o)&&d(e)?[1,2,1]:m(o)&&h(e)?[1,3]:f(o)&&g(e)?[3,1]:v(o)&&b(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&k(e)&&(0,r.sum)((0,r.take)(o,5))<5?[1,1,1,1,1]:function(e,t){const n=(0,r.sum)((0,r.take)(t,4));return y(e)&&n<3.5&&t.length>5||n<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,n){const o=(0,r.sum)((0,r.take)(t,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||n)}(e,o,t)?[1,1,1]:E(o)&&_(e)?[2,1]:C(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([a]),S=(0,r.sum)(a),x=o.slice(S);return n(i,x)};return n([],e)}function x(e,t){return n=>!(0,r.some)((0,r.takeRight)(n,t),(t=>(0,r.isEqual)(t,e)))}function j(e){return t=>t.length>=e.length&&(0,r.every)((0,r.zipWith)(e,t.slice(0,e.length),((e,t)=>e(t))))}function L(e){return e>=1&&e<2}function P(e){return e<1}function A(e){return t=>t>=e}function T(e){return t=>t<e}},99856:function(e,t,n){"use strict";n.d(t,{W:function(){return i},i:function(){return a}});var r=n(3740);function o(e,t){const n=(t-e.reduce(((e,t)=>e+t),0))/e.length;return e.map((e=>e+n))}function a(e,t){return function(e,t,n){let[a,i]=t;const p=1/a*(n-r.q3*(e.childElementCount-1)-i);return function(e,t){let{rawHeight:n,rowWidth:a}=t;const i=s(e),p=i.map((e=>(n-r.q3*(e.childElementCount-1))*c(e)[0])),d=o(p,a);i.forEach(((e,t)=>{const a=p[t],i=d[t];!function(e,t){let{colHeight:n,width:r,rawWidth:a}=t;const i=l(e).map((e=>a/u(e))),s=o(i,n);Array.from(e.children).forEach(((e,t)=>{const n=s[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)}))}(e,{colHeight:n-r.q3*(e.childElementCount-1),width:i,rawWidth:a})}));return d.map((e=>parseFloat(e/a*100).toFixed(5)))}(e,{rawHeight:p,rowWidth:n-r.q3*(e.childElementCount-1)})}(e,function(e){const t=s(e).map(c).reduce(((e,t)=>{let[n,r]=e,[o,a]=t;return[n+o,r+a]}),[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function s(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function l(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function c(e){const t=l(e),n=t.length,r=1/t.map(u).reduce(((e,t)=>e+1/t),0);return[r,r*n||1]}function u(e){const t=parseInt(e.dataset.width,10),n=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&n&&!Number.isNaN(n)?t/n:1}},51309:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(65235),a=n.n(o);function i(e){let{children:t,className:n}=e;return(0,r.createElement)("div",{className:a()("tiled-gallery__row",n)},t)}},70216:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(51806),o=n(92819),a=n(3740),i=n(24639),s=n(75084),l=n(51309);function c(e){let{columns:t,renderedImages:n}=e;const c=Math.min(a.hI,t),u=n.length%c;return(0,r.createElement)(s.Z,null,[...u?[(0,o.take)(n,u)]:[],...(0,o.chunk)((0,o.drop)(n,u),c)].map(((e,t)=>(0,r.createElement)(l.Z,{key:t,className:`columns-${e.length}`},e.map(((e,t)=>(0,r.createElement)(i.Z,{key:t},e)))))))}},10745:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(81518),a=n(3740),i=n(15078),s=n(21340);function l(e){let{attributes:t}=e;const{imageFilter:n,images:l}=t;if(!l.length)return null;const{align:c,className:u,columns:p=(0,i.F)(t),linkTo:d,roundedCorners:m,columnWidths:h}=t;return(0,r.createElement)(s.Z,{align:c,className:u,columns:p,imageFilter:n,images:l,isSave:!0,layoutStyle:(0,o.t)(a.P0,u),linkTo:d,roundedCorners:m,columnWidths:h})}},13369:function(e,t,n){"use strict";n.d(t,{v:function(){return c},z:function(){return u}});var r=n(13419),o=n(11313),a=n(92819),i=n(69424),s=n(99621),l=n(3740);function c(e){return["circle","square"].includes(e)}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,s.Z)())return{src:e.url};if((0,o.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,r.Ug)()&&(0,r.M6)())return{src:e.url};const n=e.url.split("?",1)[0],{height:u,width:d}=e,{layoutStyle:m}=t,h=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(n)||!0===function(){if("undefined"!=typeof jetpack_plan&&"vip"===jetpack_plan.data)return!0}()?p:i.Z;let f;if(c(m)&&d&&u){const e=Math.min(l.GP,d,u);f=h(n,{resize:`${e},${e}`})}else f=h(n);let g;if(c(m)){const e=Math.min(600,d,u),t=Math.min(l.GP,d,u);g=(0,a.range)(e,t,300).map((e=>{const t=h(n,{resize:`${e},${e}`,strip:"info"});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}else{const e=Math.min(600,d),t=Math.min(l.GP,d);g=(0,a.range)(e,t,300).map((e=>{const t=h(n,{strip:"info",width:e});return t?`${t} ${e}w`:null})).filter(Boolean).join(",")}return Object.assign({src:f},g&&{srcSet:g})}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},r=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))r.searchParams.set(n.hasOwnProperty(e)?n[e]:e,o);return r.toString()}},44814:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),l=n(75365),c=n(39630);const __=s.__,u=e=>{let{tockUrl:t,setEditedUrl:n,setUrl:o,cancel:s}=e;const u=(0,i.useRef)(!0),p=(0,i.useRef)(!1),d=e=>{o(),p.current=!0,e()};return(0,r.createElement)(a.ToolbarGroup,null,(0,r.createElement)(a.Dropdown,{popoverProps:{variant:"toolbar"},onClose:()=>p.current?p.current=!1:s(),placement:"bottom-start",renderToggle:e=>{let{isOpen:n,onToggle:o}=e;return!u.current||n||t||(u.current=!1,o()),(0,r.createElement)(a.ToolbarButton,{className:"components-toolbar__control",label:__("Edit Tock business name","jetpack"),onClick:()=>{o(),n&&s()}},__("Edit","jetpack"))},renderContent:e=>{let{onClose:o}=e;return(0,r.createElement)(a.BaseControl,{className:"jetpack-tock-url-settings",help:(0,i.createInterpolateElement)(__("The Tock business can be found in the URL of your public Tock page. For example: www.exploretock.com/<b>myname</b>","jetpack"),{b:(0,r.createElement)("strong",null)})},(0,r.createElement)("div",{className:"jetpack-tock-url-input-wrapper"},(0,r.createElement)(a.TextControl,{placeholder:__("Add Tock business name","jetpack"),onChange:n,value:t,onKeyDownCapture:e=>((e,n)=>{const{keyCode:r}=e;r===c.ENTER&&""!==t&&(e.preventDefault(),d(n)),r===c.ESCAPE&&(e.preventDefault(),s(),n())})(e,o),className:"jetpack-tock-url-input"}),(0,r.createElement)("div",{className:"jetpack-tock-url-input-action"},(0,r.createElement)(a.Button,{type:"submit",label:__("Submit","jetpack"),icon:l.Z,className:"jetpack-tock-url-input-submit",onClick:()=>d(o)}))))}}))},p=e=>{let{url:t,popoverAnchor:n}=e;const o=`\n\t\t<div id="Tock_widget_container" data-tock-display-mode="Button" data-tock-color-mode="Blue" data-tock-locale="en-us" data-tock-timezone="America/New_York" style="display:inline-block;"></div>\n\t\t<script src="https://www.exploretock.com/tock.js" async><\/script>\n\t\t<script>\n\t\t\t!function(t,o){if(!t.tock){var e=t.tock=function(){e.callMethod?\n\t\t\t e.callMethod.apply(e,arguments):e.queue.push(arguments)};t._tock||(t._tock=e),\n\t\t\t e.push=e,e.loaded=!0,e.version='1.0',e.queue=[];}}(window,document);\n\t\t\ttock('init', '${t}');\n\t\t<\/script>\n\t`;return(0,r.createElement)("div",{ref:n},(0,r.createElement)(a.SandBox,{html:o,key:`tock-${t}`}),(0,r.createElement)("div",{className:"block-library-embed__interactive-overlay"}))};function d(e){let{attributes:t,setAttributes:n,isSelected:a}=e;const s=t.url??"",[l,c]=(0,i.useState)(s),d=(0,i.useCallback)((()=>{c(s)}),[s]);return(0,i.useEffect)((()=>{a||d()}),[a,d]),(0,r.createElement)("div",(0,o.useBlockProps)(),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(u,{tockUrl:l,setEditedUrl:c,setUrl:()=>{const e=l.replace(/.*exploretock.com\//,"");c(e),n({url:e})},cancel:d})),(0,r.createElement)(p,{url:s}))}},14035:function(e,t,n){"use strict";var r=n(51806),o=n(31985),a=n(27508),i=n(44814);(0,o.S)(a,{edit:i.Z,save:()=>(0,r.createElement)("div",{id:"Tock_widget_container","data-tock-display-mode":"Button","data-tock-color-mode":"Blue","data-tock-locale":"en-us","data-tock-timezone":"America/New_York"})})},10723:function(e,t,n){"use strict";n.d(t,{H:function(){return a},Z:function(){return i}});var r=n(51806),o=n(69307);const a=(0,o.createContext)(),i=e=>{let{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:o,children:i}=e;return(0,r.createElement)(a.Provider,{value:{onFilesSelected:t,onMediaItemSelected:n,onUploadFinished:o},children:i})}},90879:function(e,t,n){"use strict";n.d(t,{s:function(){return r},v:function(){return o}});const r=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],o={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},29899:function(e,t,n){"use strict";var r=n(4900);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"}},support:{reusable:!1},save:r.Z,isDeprecation:!0}},4900:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(51806),o=n(52175);function a(e){let{attributes:t}=e;const{caption:n,guid:a}=t;if(!a)return null;const i=`https://videopress.com/v/${a}`;return(0,r.createElement)("figure",{className:"wp-block-embed is-type-video is-provider-videopress"},(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${i}\n`),!o.RichText.isEmpty(n)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:n}))}},97504:function(e,t,n){"use strict";var r=n(30454),o=n(93512);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"},align:{type:"wide"}},support:{reusable:!1},isEligible:e=>{let{videoPressClassNames:t,guid:n}=e;return n&&void 0===t},migrate:e=>{const{className:t,videoPressClassNames:n}=e;return{...e,...(0,o.a)(t,n)}},save:r.Z,isDeprecation:!0}},30454:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(51806),o=n(52175),a=n(92490);function i(e){const{attributes:{autoplay:t,caption:n,controls:i,guid:s,loop:l,muted:c,poster:u,preload:p,videoPressClassNames:d}={}}=e;if(!s)return null;const m=(0,a.p)(s,{autoplay:t,controls:i,loop:l,muted:c,poster:u,preload:p});return(0,r.createElement)("figure",{className:d},(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${m}\n`),!o.RichText.isEmpty(n)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:n}))}},92490:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(96483);const o=(e,t)=>{let{autoplay:n,controls:o,loop:a,muted:i,poster:s,preload:l}=t;if(!e)return null;const c={...n&&{autoPlay:!0},...!o&&{controls:!1},...a&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{posterUrl:s},..."none"!==l&&{preloadContent:l}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,c)}},93512:function(e,t,n){"use strict";n.d(t,{a:function(){return l}});var r=n(29512),o=n.n(r),a=n(73320),i=n.n(a);const s=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],l=(e,t)=>{const n=s.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1}),r=i()(e,{...n,"wp-block-embed":!1,"is-type-video":!1,"is-provider-videopress":!1}),a=new(o())(r);let l=i()(e,t);return a.forEach((e=>{l=l.replace(e,"")})),{className:r,videoPressClassNames:l.trim()}}},34284:function(e,t,n){"use strict";var r=n(46721);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,save:r.Z,isDeprecation:!0}},46721:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(52175),a=n(65235),i=n.n(a),s=n(96931);function l(e){const{attributes:{autoplay:t,caption:n,controls:a,guid:l,loop:c,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:f,align:g,seekbarColor:v,seekbarPlayedColor:b,seekbarLoadingColor:k}={}}=e,y=o.useBlockProps.save({className:i()("wp-block-video",f,h,{[`align${g}`]:g})}),w=(0,s.p)(l,{autoplay:t,controls:a,loop:c,muted:u,playsinline:p,poster:d,preload:m,seekbarColor:v,seekbarPlayedColor:b,seekbarLoadingColor:k});return(0,r.createElement)("figure",y,(0,r.createElement)("div",{className:"wp-block-embed__wrapper"},`\n${w}\n`),!o.RichText.isEmpty(n)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:n}))}},96931:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(96483);const o=(e,t)=>{let{autoplay:n,controls:o,loop:a,muted:i,playsinline:s,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d}=t;if(!e)return null;const m={resizeToParent:!0,...n&&{autoPlay:!0},...!o&&{controls:!1},...a&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},58351:function(e,t,n){"use strict";var r=n(83619);t.Z={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,migrate:e=>({...e,useAverageColor:!1}),save:r.Z,isDeprecation:!0}},83619:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(52175),a=n(65235),i=n.n(a),s=n(67502);function l(e){const{attributes:{autoplay:t,caption:n,controls:a,guid:l,loop:c,muted:u,playsinline:p,poster:d,preload:m,videoPressClassNames:h,className:f,align:g,seekbarColor:v,seekbarPlayedColor:b,seekbarLoadingColor:k,maxWidth:y}={}}=e,w=o.useBlockProps.save({className:i()("wp-block-video",f,h,{[`align${g}`]:g})}),E=(0,s.p)(l,{autoplay:t,controls:a,loop:c,muted:u,playsinline:p,poster:d,preload:m,seekbarColor:v,seekbarPlayedColor:b,seekbarLoadingColor:k});let _={};return y&&y.length>0&&"100%"!==y&&(_={maxWidth:y,margin:"auto"}),(0,r.createElement)("figure",w,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:_},`\n${E}\n`),!o.RichText.isEmpty(n)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:n}))}},67502:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(96483);const o=(e,t)=>{let{autoplay:n,controls:o,loop:a,muted:i,playsinline:s,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d}=t;if(!e)return null;const m={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!o&&{controls:!1},...a&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...l&&{posterUrl:l},..."none"!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,m)}},30053:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(86989),s=n.n(i),l=n(11313),c=n(52175),u=n(55609),p=n(94333),d=n(9818),m=n(69307),h=n(81975),f=n(65736),g=n(61074),v=n(65235),b=n.n(v),k=n(92819),y=n(99196),w=n(81427),E=n(10723),_=n(90879),C=n(31302),S=n(43774),x=n(75880),j=n(22081),L=n(32478),P=n(90953),A=n(77290);const __=f.__,_x=f._x,T=["image"],N=e=>{const t=(0,c.useBlockProps)({className:"resumable-upload"}),{onChangeTitle:n,title:r,filename:o,onSelectPoster:i,onRemovePoster:s,videoPosterImageData:l,fileForUpload:h,isUploadComplete:f,onDismissEditor:v,onSave:b,onVideoFrameSelected:k}=e,_=(0,d.useSelect)((e=>e("core/editor").isSavingPost()),[]),C=(0,p.usePrevious)(_);return(0,y.useEffect)((()=>{_&&!C&&b()}),[_,C,b]),(0,a.createElement)(E.Z,{onUploadFinished:e.uploadFinished},(0,a.createElement)(m.Fragment,null,e.blockSettings,(0,a.createElement)("div",t,(0,a.createElement)("div",{className:"uploader-block__logo"},(0,a.createElement)(g.Z,{icon:w.ll}),(0,a.createElement)("div",{className:"uploader-block__logo-text"},__("VideoPress","jetpack"))),(0,a.createElement)(L.$,{file:h,filename:o,title:r,onChangeTitle:n,onSelectPoster:i,onRemovePoster:s,videoPosterImageData:l,onVideoFrameSelected:k}),!f&&(0,a.createElement)(S.Z,{file:h}),f&&(0,a.createElement)("div",{className:"uploader-block__upload-complete"},(0,a.createElement)("span",null,__("Upload Complete!","jetpack")," 🎉"),(0,a.createElement)(u.Button,{variant:"primary",onClick:v},__("Done","jetpack"))))))},M=e=>{let{scripts:t}=e;const{html:n,interactive:r,caption:o,isSelected:i,hideOverlay:s,attributes:l,setAttributes:p}=e,{align:d,className:m,videoPressClassNames:h,maxWidth:f}=l,g=(0,c.useBlockProps)({className:b()("wp-block-video",m,h,{[`align${d}`]:d})});if("object"!=typeof t&&(t=[]),window.videopressAjax){const e=new Blob([`var videopressAjax = ${JSON.stringify(window.videopressAjax)};`],{type:"text/javascript"});t.push(URL.createObjectURL(e),window.videopressAjax.bridgeUrl)}return(0,a.createElement)("figure",g,(0,a.createElement)("div",{className:"wp-block-embed__wrapper"},(0,a.createElement)(u.ResizableBox,{enable:{top:!1,bottom:!1,left:!0,right:!0},maxWidth:"100%",size:{width:f},style:{margin:"auto"},onResizeStop:(e,t,n)=>{let r=getComputedStyle(n).width;if(null!==n.parentElement){r===getComputedStyle(n.parentElement).width&&(r="100%")}p({maxWidth:r})}},(0,a.createElement)(u.SandBox,{html:n,scripts:t,type:h}))),!r&&(0,a.createElement)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:s}),(!c.RichText.isEmpty(o)||i)&&(0,a.createElement)(c.RichText,{tagName:"figcaption",placeholder:__("Write caption…","jetpack"),value:o,onChange:e=>p({caption:e}),inlineToolbar:!0}))};t.Z=(0,p.createHigherOrderComponent)((0,p.compose)([(0,d.withSelect)(((e,t)=>{const{autoplay:n,controls:r,fileForImmediateUpload:o,guid:a,loop:i,muted:s,playsinline:c,poster:u,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,src:f,useAverageColor:g}=t.attributes,{getEmbedPreview:v,isRequestingEmbedPreview:b}=e("core"),k=(0,P.p)(a,{autoplay:n,controls:r,loop:i,muted:s,playsinline:c,poster:u,preload:p,seekbarColor:d,seekbarLoadingColor:m,seekbarPlayedColor:h,useAverageColor:g}),y=!!k&&v(k),w=!!k&&b(k),E=!!window.videoPressResumableEnabled;return{fileForImmediateUpload:o,isFetchingPreview:w,isUploading:!E&&(0,l.isBlobURL)(f),preview:y,resumableUploadEnabled:E,url:k}})),(0,d.withDispatch)((e=>({invalidateCachedEmbedPreview:t=>{e("core/data").invalidateResolution("core","getEmbedPreview",[t])}}))),p.withInstanceId,e=>class extends m.Component{constructor(e){super(...arguments),this.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1,rating:null,lastRequestedMediaId:null,isUpdatingRating:!1,allowDownload:null,privacySetting:_.v.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1,isEditingWhileUploading:!1,isUploadComplete:!1,lastPosterValueSource:""},this.posterImageButton=(0,m.createRef)(),this.previewCacheReloadTimer=null,this.previewFailuresCount=0}static getDerivedStateFromProps(e,t){const n={};if(!e.isSelected&&t.interactive&&(n.interactive=!1),t.fileForUpload&&!t.isEditingWhileUploading){null!==t.fileForUpload&&t.fileForUpload instanceof File&&(n.isEditingWhileUploading=!0)}return Object.keys(n).length?n:null}hideOverlay=()=>{this.setState({interactive:!0})};async componentDidMount(){const{guid:e}=this.props.attributes;e?this.setTracks(e):await this.setGuid(),this.setRatingAndAllowDownload()}setRatingAndAllowDownload=async()=>{const e=(0,k.get)(this.props,"attributes.id"),t=await this.requestMedia(e);let n=(0,k.get)(t,"jetpack_videopress.rating");const r=(0,k.get)(t,"jetpack_videopress.allow_download"),o=(0,k.get)(t,"jetpack_videopress.privacy_setting",_.v.SITE_DEFAULT);n&&("X-18"===n&&(n="R-17"),this.setState({rating:n})),void 0!==r&&this.setState({allowDownload:!!r}),void 0!==o&&this.setState({privacySetting:o})};async componentDidUpdate(e){const{attributes:t,invalidateCachedEmbedPreview:n,preview:r,setAttributes:o,url:a,isFetchingPreview:i}=this.props;t.id!==e.attributes.id&&(await this.setGuid(),this.setRatingAndAllowDownload());let s=!1;if(a&&a!==e.url&&(n(a),s=!0),r){const e=(0,A.f6)(r.html,b()("wp-block-embed","is-type-video","is-provider-videopress"),!1);this.previewFailuresCount=0,o({videoPressClassNames:e})}else i||s||!this.props.attributes.guid||this.schedulePreviewCacheReload()}schedulePreviewCacheReload=()=>{const{invalidateCachedEmbedPreview:e,url:t}=this.props;null===this.previewCacheReloadTimer&&this.previewFailuresCount<5&&(this.previewFailuresCount++,this.previewCacheReloadTimer=setTimeout((()=>{e(t),this.previewCacheReloadTimer=null}),2e3*this.previewFailuresCount))};fallbackToCore=()=>{this.props.setAttributes({guid:void 0}),this.setState({fallback:!0})};setGuid=async()=>{const{attributes:e,setAttributes:t}=this.props,{id:n}=e;if(n)try{const e=await this.requestMedia(n);if(null===e)return;const r=(0,k.get)(e,"jetpack_videopress.guid");r?(t({guid:r}),this.setTracks(r)):this.fallbackToCore()}catch(e){this.setState({isFetchingMedia:!1}),this.fallbackToCore()}else t({guid:void 0})};requestMedia=async e=>{if(!e)return null;if(null!==this.state.media&&this.state.lastRequestedMediaId===e)return this.state.media;this.setState({isFetchingMedia:!0});const t=await s()({path:`/wp/v2/media/${e}`}).catch((()=>(this.setState({fallback:!0}),null))).finally((()=>{this.setState({isFetchingMedia:!1})})),{id:n}=this.props.attributes;return e!==n?null:(this.setState({media:t,lastRequestedMediaId:e}),t)};setTracks=e=>{const{setAttributes:t}=this.props;e&&s()({url:`https://public-api.wordpress.com/rest/v1.1/videos/${e}`,credentials:"omit",global:!0}).then((e=>{const n=[];Object.keys(e.tracks).forEach((t=>{for(const r in e.tracks[t]){const o=e.tracks[t][r];n.push({src:o.src,kind:t,srcLang:r,label:o.label})}})),t({videoPressTracks:n})}))};switchToEditing=()=>{this.props.setAttributes({id:void 0,guid:void 0,src:void 0})};onSelectPoster=e=>{const{setAttributes:t}=this.props;t({poster:e.url}),this.setState({videoPosterImageData:e})};onRemovePoster=()=>{const{setAttributes:e}=this.props;e({poster:""}),this.setState({videoPosterImageData:null}),this.posterImageButton.current.focus()};toggleAttribute=e=>t=>{this.props.setAttributes({[e]:t})};getAutoplayHelp=e=>e?__("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null;getPreloadHelp(){const{attributes:e}=this.props;return"auto"===e.preload?__("Note: Automatically downloading videos may cause issues if there are many videos displayed on the same page.","jetpack"):null}getPrivacySettingHelp=e=>{const t=parseInt(e,10);return _.v.PRIVATE===t?__("Restrict views to members of this site","jetpack"):_.v.PUBLIC===t?__("Video can be viewed by anyone","jetpack"):__("Follow the site privacy setting","jetpack")};renderControlLabelWithTooltip(e,t){return(0,a.createElement)(u.Tooltip,{text:t,position:"top"},(0,a.createElement)("span",null,e))}onChangeRating=e=>{const t=this.state.rating;"X-18"===e&&(e="R-17"),-1!==(0,k.indexOf)(["G","PG-13","R-17"],e)&&this.updateMetaApiCall({rating:e},(()=>this.setState({isUpdatingRating:!0,rating:e})),(()=>this.setState({rating:t})),(()=>this.setState({isUpdatingRating:!1})))};onChangeAllowDownload=e=>{const t=this.state.allowDownload;this.updateMetaApiCall({allow_download:e?1:0},(()=>this.setState({isUpdatingAllowDownload:!0,allowDownload:e})),(()=>this.setState({allowDownload:t})),(()=>this.setState({isUpdatingAllowDownload:!1})))};onChangePrivacySetting=e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},(()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e})),(()=>this.setState({privacySetting:t})),(()=>this.setState({isUpdatingPrivacySetting:!1})))};updateMetaApiCall=(e,t,n,r)=>{const{invalidateCachedEmbedPreview:o,url:a}=this.props,{id:i}=this.props.attributes;if(!i)return;t();const l={id:i};Object.assign(l,e),s()({path:"/wpcom/v2/videopress/meta",method:"POST",data:l}).then((e=>{status in e&&200!==e.status&&n()})).catch((()=>n())).finally((()=>{r(),o(a)}))};render(){const{attributes:t,instanceId:n,isFetchingPreview:r,isUploading:i,preview:l,resumableUploadEnabled:p,setAttributes:d}=this.props,{fallback:g,fileForUpload:v,isFetchingMedia:b,isUpdatingRating:k,interactive:y,rating:w,allowDownload:S,privacySetting:L,isUpdatingAllowDownload:P,isUpdatingPrivacySetting:I,videoPosterImageData:R}=this.state,{autoplay:D,caption:B,controls:Z,guid:F,loop:O,muted:U,playsinline:z,poster:$,preload:H,useAverageColor:q,videoPressTracks:V,isVideoPressExample:G,src:W}=t;if(G&&W)return(0,a.createElement)("img",{src:W,alt:B});const J=`video-block__poster-image-description-${n}`,K=!(!$&&!R),Y=(0,a.createElement)(m.Fragment,null,(0,a.createElement)(c.BlockControls,{group:"block"},(0,a.createElement)(j.Z,{tracks:V,onChange:e=>{d({videoPressTracks:e})},guid:F})),(0,a.createElement)(c.BlockControls,null,(0,a.createElement)(u.ToolbarGroup,null,(0,a.createElement)(u.ToolbarButton,{className:"components-icon-button components-toolbar__control",text:__("Replace","jetpack"),onClick:this.switchToEditing}))),(0,a.createElement)(c.InspectorControls,null,(0,a.createElement)(u.PanelBody,{title:__("Video Settings","jetpack")},(0,a.createElement)(u.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Autoplay","jetpack"),/* translators: Tooltip describing the "autoplay" option for the VideoPress player */ | |
| 22 | -__("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:D,help:this.getAutoplayHelp}),(0,a.createElement)(u.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),/* translators: Tooltip describing the "loop" option for the VideoPress player */ | |
| 23 | -__("Restarts the video when it reaches the end","jetpack")),onChange:this.toggleAttribute("loop"),checked:O}),(0,a.createElement)(u.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:U}),(0,a.createElement)(u.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Playback Controls","jetpack"),/* translators: Tooltip describing the "controls" option for the VideoPress player */ | |
| 24 | -__("Display the video playback controls","jetpack")),onChange:this.toggleAttribute("controls"),checked:Z}),(0,a.createElement)(u.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Play Inline","jetpack"),/* translators: Tooltip describing the "playsinline" option for the VideoPress player */ | |
| 25 | -__("Play the video inline instead of full-screen on mobile devices","jetpack")),onChange:this.toggleAttribute("playsinline"),checked:z}),(0,a.createElement)(u.SelectControl,{label:this.renderControlLabelWithTooltip(__("Preload","jetpack"),/* translators: Tooltip describing the "preload" option for the VideoPress player */ | |
| 26 | -__("Content to dowload before the video is played","jetpack")),value:H??"",onChange:e=>d({preload:e}),options:[{value:"auto",label:_x("Auto","VideoPress preload setting","jetpack")},{value:"metadata",label:_x("Metadata","VideoPress preload setting","jetpack")},{value:"none",label:_x("None","VideoPress preload setting","jetpack")}],help:this.getPreloadHelp()}),(0,a.createElement)(c.MediaUploadCheck,null,(0,a.createElement)(u.BaseControl,{className:"editor-video-poster-control",label:__("Poster Image","jetpack")},(0,a.createElement)(c.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:T,render:e=>{let{open:t}=e;return(0,a.createElement)(u.Button,{variant:"secondary",onClick:t,ref:this.posterImageButton,"aria-describedby":J},K?__("Replace image","jetpack",0):__("Select Poster Image","jetpack"))}}),(0,a.createElement)("p",{id:J,hidden:!0},K?(0,f.sprintf)(/* translators: Placeholder is an image URL. */ | |
| 27 | -__("The current poster image url is %s","jetpack"),$??R):__("There is no poster image currently selected","jetpack")),K&&(0,a.createElement)(u.Button,{onClick:this.onRemovePoster,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")))),(0,m.createInterpolateElement)(__("Send us your <a>VideoPress feedback</a>","jetpack"),{a:(0,a.createElement)(u.ExternalLink,{href:"https://automattic.survey.fm/videopress-feedback"})})),(0,a.createElement)(x.Z,{attributes:t,setAttributes:d,useAverageColor:q,toggleAttribute:this.toggleAttribute}),(0,a.createElement)(u.PanelBody,{title:__("Video File Settings","jetpack")},(0,a.createElement)(u.SelectControl,{label:_x("Rating","The age rating for this video.","jetpack"),value:w??"",disabled:b||k,options:[{label:_x("G",'Video rating for "General Audiences".',"jetpack"),value:"G"},{label:_x("PG-13",'Video rating for "Parental Guidance", unsuitable for children under 13.',"jetpack"),value:"PG-13"},{label:_x("R",'Video rating for "Restricted", not recommended for children under 17.',"jetpack"),value:"R-17"}],onChange:this.onChangeRating}),(0,a.createElement)(u.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Allow download","jetpack"),/* translators: Tooltip describing the "allow download" option for the VideoPress player */ | |
| 28 | -__("Display download option and allow viewers to download this video","jetpack")),onChange:this.onChangeAllowDownload,checked:S,disabled:b||P}),(0,a.createElement)(u.SelectControl,{label:__("Video Privacy","jetpack"),help:this.getPrivacySettingHelp(L),onChange:this.onChangePrivacySetting,value:L??"",options:[{value:_.v.SITE_DEFAULT,label:_x("Site Default","VideoPress privacy setting","jetpack")},{value:_.v.PUBLIC,label:_x("Public","VideoPress privacy setting","jetpack")},{value:_.v.PRIVATE,label:_x("Private","VideoPress privacy setting","jetpack")}],disabled:b||I})))),X=e=>{this.setState({fileForUpload:e[0]})},Q=e=>{e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):d({src:void 0,id:void 0,poster:void 0})},ee=()=>"videoPressUploadPoster"in window,te=(0,h.escapeHTML)(v?(0,A.K8)(v.name):""),ne=e=>{let{mediaId:t,guid:n,src:r}=e;this.setState({title:this.state.title??te,fileForUpload:null,isUploadComplete:!!t,isEditingWhileUploading:!!t&&this.state.isEditingWhileUploading}),t&&n&&r&&d({id:t,guid:n,src:r})},re=e=>{this.setState({title:e})},oe=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},ae=()=>{const e=this.state.title;this.updateMetaApiCall({title:e},(()=>this.setState({isUpdatingTitle:!0,title:e})),(()=>this.setState({title:e})),(()=>this.setState({isUpdatingTitle:!1})))},ie=()=>pe({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),se=()=>pe({poster_attachment_id:this.state.videoPosterImageData.id}),le=e=>{e.generating?ce():ue(e.poster)},ce=()=>{setTimeout((()=>{(ee()?window.videoPressGetPoster(F):s()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then((e=>le(e)))}),2e3)},ue=e=>{e&&d({poster:e})},pe=e=>{if(ee())return window.videoPressUploadPoster(F,e).then((e=>le(e)));s()({path:`/videos/${F}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch((e=>e))},de=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&ae(),R?se():null!=t&&ie()},me=()=>{this.setState({isEditingWhileUploading:!1}),de()};if(null!=v&&v.name||this.state.isEditingWhileUploading){const e=this.state.title??te;return(0,a.createElement)(N,{fileForUpload:v,filename:te,uploadFinished:ne,blockSettings:Y,onDismissEditor:me,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:re,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:oe,onSave:de})}const he=b||r,fe=g||i||!F,ge=fe&&!i&&!he,ve=(0,a.createElement)(m.Fragment,null,(0,a.createElement)("div",{className:i||he?"":"videopress-block-hide"},(0,a.createElement)(C.Z,{text:i?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})),(0,a.createElement)("div",{className:ge?"":"videopress-block-hide"},(0,a.createElement)(e,this.props)));if(fe)return p?(0,a.createElement)(E.Z,{onFilesSelected:X,onMediaItemSelected:Q},ve):(0,a.createElement)(m.Fragment,null,ve);const{html:be,scripts:ke}=l||{html:null,scripts:null},ye=he||!l;return(0,a.createElement)(m.Fragment,null,Y,ye&&(0,a.createElement)(C.Z,{text:__("Generating preview…","jetpack")}),!ye&&(0,a.createElement)(M,o()({},this.props,{hideOverlay:this.hideOverlay,html:be,scripts:ke,interactive:y,caption:B})))}}]),"withVideoPressEdit")},37549:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(6975),s=n(13419),l=n(11313),c=n(52175),u=n(65391),p=n(4981),d=n(55609),m=n(94333),h=n(9818),f=n(12238),g=n(69307),v=n(92694),b=n(65736),k=n(92819),y=n(10723),w=n(29899),E=n(97504),_=n(34284),C=n(58351),S=n(30053),x=n(23096),j=n(77290),L=n(23062),P=n(84676),A=n(41194);const __=b.__,T=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,c.useBlockEditContext)();return"core/video"!==n?(0,a.createElement)(e,t):(0,a.createElement)(e,o()({},t,{disableDropZone:!0,className:"no-videopress-media-placeholder"}),(0,a.createElement)(d.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("Media Library","jetpack")),(0,a.createElement)(d.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary"},__("Upload","jetpack")))}),"videoPressNoPlanMediaPlaceholder"),N=(0,m.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,c.useBlockEditContext)();if("core/video"!==n)return(0,a.createElement)(e,t);const{onFilesSelected:r,onMediaItemSelected:i}=(0,g.useContext)(y.H),s={...t,handleUpload:!1,disableDropZone:!0,onSelect:e=>{void 0!==e.length?r(e):i(e)}};return(0,a.createElement)(e,o()({},s,{className:"videopress-media-placeholder"}))}),"videoPressMediaPlaceholder"),M=(e,t,n)=>("core/video"!==t.name||!n.guid||n.className?.indexOf("wp-block-video")>=0||n.videoPressClassNames||(e.className=e.className.replace("wp-block-video","").trim()),e);(0,v.addFilter)("blocks.registerBlockType","jetpack/videopress",((e,t)=>{if("core/embed"===t)return(e=>{if(!("variations"in e)||"object"!=typeof e.variations)return;const{available:t}=(0,s.OZ)("videopress");e.variations.some((e=>"videopress"===e.name&&(t&&(e.scope=[]),e.patterns.push(/^https?:\/\/v\.wordpress\.com\/([a-zA-Z\d]{8})(.+)?$/i),!0)))})(e),e;if("core/video"!==t||e.isDeprecation)return e;const{deprecated:n,edit:r,save:o,supports:a,transforms:i}=e,{available:c,unavailableReason:u}=(0,s.OZ)("videopress"),d=((0,s.Wp)()||(0,s.Ug)())&&["missing_plan","unknown"].includes(u),m=!!window.videoPressResumableEnabled;if(d?((0,v.addFilter)("editor.MediaPlaceholder","jetpack/videopress",T),(0,v.addFilter)("editor.BlockListBlock","jetpack/videopress-with-has-warning-is-interactive-class-names",(0,s.T)("core/video"))):c&&(m&&(0,v.addFilter)("editor.MediaPlaceholder","jetpack/videopress",N),e.description=__("Embed a video from your media library or upload a new one with VideoPress.","jetpack"),e.example.attributes={caption:"",isVideoPressExample:!0,src:A}),(0,v.addFilter)("blocks.getSaveContent.extraProps","jetpack/videopress",M,20),c||["missing_plan","missing_module","unknown"].includes(u)){const t={autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string",source:"attribute",selector:"video",attribute:"src"},useAverageColor:{type:"boolean",default:!0},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"},fileForImmediateUpload:{type:"object",default:null}},s=/https?:\/\/v\.wordpress\.com\/([a-zA-Z\d]{8})(.+)?/i;return{...e,attributes:{...e.attributes,...t},transforms:{...i,from:[{type:"files",isMatch:e=>(0,k.every)(e,(e=>0===e.type.indexOf("video/"))),priority:9,transform:(e,t)=>{const n=[];return e.forEach((e=>{if(c&&m){const t=(0,p.createBlock)("core/video",{fileForImmediateUpload:e});n.push(t)}else{const r=(0,p.createBlock)("core/video",{src:(0,l.createBlobURL)(e)});(0,f.mediaUpload)({filesList:[e],onFileChange:e=>{let[{id:n,url:o}]=e;t(r.clientId,{id:n,src:o})},allowedTypes:["video"]}),n.push(r)}})),n}},{type:"raw",isMatch:e=>"P"===e.nodeName&&s.test(e.innerHTML),transform:e=>{const t=s.exec(e.innerHTML);return(0,p.createBlock)("core/embed",{url:"https://videopress.com/v/"+t[1].trim()})}}]},supports:{...a,reusable:!1},edit:(0,S.Z)(r),save:(0,x.Z)(o),deprecated:[...n||[],C.Z,_.Z,{attributes:t,isEligible:e=>!e.guid,save:o,supports:a,isDeprecation:!0},E.Z,w.Z]}}return e}),5),(0,v.addFilter)("blocks.registerBlockType","videopress/add-wp-chapters-support",P.Z),(0,v.addFilter)("blocks.registerBlockType","videopress/add-v6-transform-support",L.Z),(0,v.addFilter)("blocks.registerBlockType","videopress/add-core-video-transform",(function(e,t){if("videopress/video"!==t)return e;const n=(0,p.getBlockType)("videopress/video"),{available:r}=(0,s.OZ)("videopress/video");return n&&r?{...e,transforms:{from:[...e.transforms?.from||[],{type:"block",blocks:["core/video"],isMatch:e=>{const{src:t,guid:n}=e,r=(0,j.Zx)(t);return n||r},transform:e=>{const t=(0,h.select)(f.store).getCurrentPostId();return i.Z?.tracks?.recordEvent("jetpack_editor_videopress_block_manual_transform_click",{post_id:t}),(0,p.createBlock)("videopress/video",e)}}],to:[...e.transforms?.to||[],{type:"block",blocks:["core/video"],transform:e=>(0,p.createBlock)("core/video",e)}]}}:e}));const I=(0,m.createHigherOrderComponent)((e=>t=>{const{block:n}=t,{name:r,attributes:o,clientId:i,__unstableBlockSource:l}=n,{replaceBlock:u}=(0,h.useDispatch)(c.store),{url:d,guid:m,providerNameSlug:f}=o,{available:v}=((0,j.Kp)(o),(0,p.getBlockType)("videopress/video"),(0,s.OZ)("videopress/video")),b="core/embed"===r,k=(0,j.Zx)(d),y=b&&k?k:m;(0,s.Wp)();return(0,g.useEffect)((()=>{}),[i,false,o,l,u,y]),(0,a.createElement)(e,t)}),"convertVideoBlockToVideoPressVideoBlock");function R(e){let{BlockListBlock:t,...n}=e;const{block:r}=n,{name:o,attributes:i,clientId:s}=r,{replaceBlock:l}=(0,h.useDispatch)(c.store);return(0,g.useEffect)((()=>{try{const e=(0,u.parse)(i.originalContent),t=e?.[0];if(!t)return;const{attrs:n}=t;l(s,(0,p.createBlock)("core/video",function(e){const t={...e};return e?.tracks&&(t.videoPressTracks=e.tracks,delete t.tracks),e?.isExample&&(t.isVideoPressExample=e.isExample,delete t.isExample),e?.classNames&&(t.videoPressClassNames=e.classNames,delete t.classNames),delete t.title,delete t.description,delete t.cacheHtml,delete t.videoRatio,delete t.privacySetting,delete t.allowDownload,delete t.displayEmbed,delete t.rating,delete t.isPrivate,t}(n)))}catch(e){console.error("Error converting VideoPress block to core/video",e)}}),[o,s,i,l]),(0,a.createElement)(t,n)}(0,v.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-to-videopress-video-block",I);const D=(0,m.createHigherOrderComponent)((e=>t=>{const{block:n}=t,{name:r,attributes:i}=n;return"core/missing"!==r||"videopress/video"!==i?.originalName?(0,a.createElement)(e,t):(0,a.createElement)(R,o()({},t,{BlockListBlock:e}))}),"convertV6toV5");(0,v.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-from-v6-to-v5",D)},31302:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=e=>{let{text:t}=e;return(0,r.createElement)("div",{className:"wp-block-embed is-loading"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("p",null,t))}},43774:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(90861),l=n.n(s),c=n(10723),u=n(5482);const __=i.__;function p(e){let{file:t}=e;const[n,s]=(0,a.useState)(0),[p,d]=(0,a.useState)(!1),[m,h]=(0,a.useState)(null),[f,g]=(0,a.useState)(null),[v,b]=(0,a.useState)(null),{onUploadFinished:k}=(0,a.useContext)(c.H),y=(0,a.useRef)(null);y.current=m;const w=(0,a.useCallback)((()=>{const e=(0,u.J)({onError:e=>{g(e)},onProgress:(e,t)=>{s(e/t*100)},onSuccess:e=>{k(e)},onUploadUuidRetrieved:e=>{null===v&&b(e)}});(0,u.v)().then((n=>{const r=e(t,n);h(r)})).catch((e=>{g(e)}))}),[t,k,v]);(0,a.useEffect)((()=>(w(),()=>{null!==y.current&&y.current.abort()})),[]);const E=Math.round(n),_={width:`${E}%`},C=l()(t.size);return(0,r.createElement)(r.Fragment,null,null!==f?(0,r.createElement)("div",{className:"resumable-upload__error"},(0,r.createElement)("div",{className:"resumable-upload__error-text"},(()=>{let e=__("An error was encountered during the upload. Check your network connection.","jetpack");if("object"==typeof f){const t=f.toString().match(/message":"([^"]+)"/);if(t&&"object"==typeof t&&2===t.length){const n=t[1];if("Invalid Mime"!==n)return n;e=(0,r.createElement)(r.Fragment,null,__("The format of the video you uploaded is not supported.","jetpack")," ",(0,r.createElement)(o.ExternalLink,{href:"https://wordpress.com/support/videopress/recommended-video-settings/",target:"_blank",rel:"noreferrer"},__("Check the recommended video settings.","jetpack")))}}return e})()),(0,r.createElement)(o.Button,{variant:"primary",onClick:()=>(g(null),void w())},__("Try again","jetpack")),(0,r.createElement)(o.Button,{variant:"secondary",onClick:()=>k({mediaId:null}),className:"resumable-upload__error-cancel"},__("Cancel","jetpack"))):(0,r.createElement)("div",{className:"resumable-upload__status"},(0,r.createElement)("div",{className:"resumable-upload__progress"},(0,r.createElement)("div",{className:"resumable-upload__progress-loaded",style:_})),(0,r.createElement)("div",{className:"resumable-upload__file-info"},(0,r.createElement)("div",null,p?(0,i.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */ | |
| 29 | -__("Paused (%s%%)","jetpack"),E):(0,i.sprintf)(/* translators: Placeholder is an upload progress percenatage number, from 0-100. */ | |
| 30 | -__("Uploading (%s%%)","jetpack"),E)),(0,r.createElement)("div",{className:"resumable-upload__file-size"},C)),(0,r.createElement)("div",{className:"resumable-upload__actions"},(0,r.createElement)(o.Button,{variant:"link",onClick:()=>{m&&(p?m.start():m.abort(),d(!p))}},p?"Resume":"Pause"))))}},5482:function(e,t,n){"use strict";n.d(t,{J:function(){return i},v:function(){return o}});var r=n(99537);const o=function(e){return new Promise((function(t,n){const r=e?{data:{key:e}}:{};wp.media.ajax("videopress-get-upload-jwt",{async:!0,...r}).done((function(e){t({token:e.upload_token,blogId:e.upload_blog_id,url:e.upload_action_url})})).fail((function(e){n(e)}))}))},a={},i=e=>{let{onUploadUuidRetrieved:t,onError:n,onProgress:i,onSuccess:s}=e;return(e,l)=>{const c=new r.gq(e,{onError:n,onProgress:i,endpoint:l.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:e.name,filetype:e.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(e,n){if(n.getStatus()>=400)return;const r=n.getHeader("x-videopress-upload-guid"),o=n.getHeader("x-videopress-upload-media-id"),i=n.getHeader("x-videopress-upload-src-url");if(r&&o&&i)return void(s&&s({mediaId:Number(o),guid:r,src:i}));const l={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},c={};Object.keys(l).forEach((function(e){const t=n.getHeader(e);t&&(c[l[e]]=t)})),c.key&&c.token&&(a[c.key]=c.token),c.key&&t(c.key)},onBeforeRequest:function(e){const t=e._method;if(["HEAD","OPTIONS"].indexOf(t)>=0&&(e._method="GET",e.setHeader("X-HTTP-Method-Override",t)),["DELETE","PUT","PATCH"].indexOf(t)>=0&&(e._method="POST",e.setHeader("X-HTTP-Method-Override",t)),e._xhr.open(e._method,e._url,!0),Object.keys(e._headers).map((function(t){e.setHeader(t,e._headers[t])})),"POST"===t){if(!!!l.token)throw"should never happen";e.setHeader("x-videopress-upload-token",l.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){const n=new URL(e._url).pathname.split("/"),r=n[n.length-1];if(a[r])e.setHeader("x-videopress-upload-token",a[r]);else if("HEAD"===t)return o(r).then((t=>(a[r]=t.token,e.setHeader("x-videopress-upload-token",t.token),e)))}return Promise.resolve(e)}});return c.findPreviousUploads().then((function(e){e.length&&c.resumeFromPreviousUpload(e[0]),c.start()})),c}}},23096:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(94333),i=n(65235),s=n.n(i),l=n(90953);t.Z=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:{autoplay:n,caption:a,controls:i,guid:c,loop:u,muted:p,playsinline:d,poster:m,preload:h,videoPressClassNames:f,className:g,align:v,seekbarColor:b,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:w,maxWidth:E}={}}=t,_=o.useBlockProps.save({className:s()("wp-block-video",g,f,{[`align${v}`]:v})});if(!c)return e(t);const C=(0,l.p)(c,{autoplay:n,controls:i,loop:u,muted:p,playsinline:d,poster:m,preload:h,seekbarColor:b,seekbarPlayedColor:k,seekbarLoadingColor:y,useAverageColor:w});let S={};return E&&E.length>0&&"100%"!==E&&(S={maxWidth:E,margin:"auto"}),(0,r.createElement)("figure",_,(0,r.createElement)("div",{className:"wp-block-embed__wrapper",style:S},`\n${C}\n`),!o.RichText.isEmpty(a)&&(0,r.createElement)(o.RichText.Content,{tagName:"figcaption",value:a}))}),"withVideoPressSave")},75880:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736);n(99196);const __=s.__;class l extends i.Component{constructor(){super(...arguments);const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}}handleChangeSeekbarColor=e=>{this.setState({seekbarColor:e})};handleChangeSeekbarLoadingColor=e=>{this.setState({seekbarLoadingColor:e})};handleChangeSeekbarPlayedColor=e=>{this.setState({seekbarPlayedColor:e})};saveColors=()=>{const{seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n}=this.state,{setAttributes:r}=this.props;r({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:n})};render(){const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:n}=this.state,{toggleAttribute:i,useAverageColor:s}=this.props,l=!0;return(0,r.createElement)(a.PanelBody,{className:"seekbar-color-settings__panel",title:__("Progress Bar Colors","jetpack"),initialOpen:!1},(0,r.createElement)(a.ToggleControl,{label:__("Match video","jetpack"),help:__("Colors adapt to the video as it plays","jetpack"),onChange:i("useAverageColor"),checked:s}),(0,r.createElement)(o.PanelColorSettings,{opened:!s,showTitle:!1,colorSettings:[{value:e,onChange:this.handleChangeSeekbarColor,label:__("Main","jetpack"),showTitle:l},{value:n,onChange:this.handleChangeSeekbarLoadingColor,label:__("Loaded","jetpack"),showTitle:l},{value:t,onChange:this.handleChangeSeekbarPlayedColor,label:__("Progress","jetpack"),showTitle:l}]},(0,r.createElement)(a.Button,{variant:"secondary",onClick:this.saveColors},__("Save colors","jetpack"))))}}t.Z=l},22081:function(e,t,n){"use strict";n.d(t,{Z:function(){return w},n:function(){return v}});var r=n(51806),o=n(86989),a=n.n(o),i=n(52175),s=n(55609),l=n(9818),c=n(69307),u=n(65736),p=n(47659);const __=u.__,d="subtitles",m=".vtt,text/vtt",h=[{label:__("Subtitles","jetpack"),value:"subtitles"},{label:__("Captions","jetpack"),value:"captions"},{label:__("Descriptions","jetpack"),value:"descriptions"},{label:__("Chapters","jetpack"),value:"chapters"},{label:__("Metadata","jetpack"),value:"metadata"}],f=(0,r.createElement)(s.SVG,{width:"18",height:"14",viewBox:"0 0 18 14",role:"img",fill:"none"},(0,r.createElement)(s.Rect,{x:"0.75",y:"0.75",width:"16.5",height:"12.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),(0,r.createElement)(s.Path,{d:"M3 7H15",stroke:"black",strokeWidth:"1.5"}),(0,r.createElement)(s.Path,{d:"M3 10L15 10",stroke:"black",strokeWidth:"1.5"})),g=()=>"videoPressUploadTrack"in window,v=(e,t)=>{if(g())return window.videoPressUploadTrack(t,e.kind,e.srcLang,e.label,e.tmpFile);const n={method:"POST",path:`/videos/${t}/tracks`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang],["label",e.label],["vtt",e.tmpFile]]};return a()(n)},b=(e,t)=>{if(g())return window.videoPressDeleteTrack(t,e.kind,e.srcLang);const n={method:"POST",path:`/videos/${t}/tracks/delete`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang]]};return a()(n)};function k(e){let{tracks:t,onChange:n,guid:o}=e;const[a=-1,i]=(0,c.useState)();let l;return l=0===t.length?(0,r.createElement)("p",{className:"videopress-block-tracks-editor__tracks-informative-message"},__("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.","jetpack")):t.map(((e,l)=>(0,r.createElement)("div",{key:l,className:"videopress-block-tracks-editor__track-list-track"},(0,r.createElement)("span",null,e.label),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__track-list-track-delete"},(0,r.createElement)(s.Button,{variant:"link",isDestructive:!0,onClick:()=>{(e=>{const r=t[e];i(e),b(r,o).finally((()=>{n(t.filter(((t,n)=>n!==e))),i(-1)}))})(l)},"aria-label":(0,u.sprintf)(/* translators: %s: Label of the video text track e.g: "French subtitles" */ | |
| 31 | -__("Delete %s","jetpack"),e.label),disabled:a===l},a===l?__("Deleting","jetpack"):__("Delete","jetpack",0)))))),(0,r.createElement)(s.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list"},l)}function y(e){let{track:t,guid:n,onChange:o,onClose:a,onCancel:p,trackExists:f}=e;const[g,b]=(0,c.useState)(),[k=!1,y]=(0,c.useState)(),{label:w="",srcLang:E="",kind:_=d}=t,C=t.tmpFile?t.tmpFile.name:"";if(!(0,l.useSelect)((e=>e(i.store).getSettings().mediaUpload),[]))return null;return(0,r.createElement)(s.NavigableMenu,null,(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor"},(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-label"},__("Edit track","jetpack")),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file"},(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label"},(0,r.createElement)("span",null,__("File","jetpack"),":"),""!==C&&(0,r.createElement)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name"},(0,r.createElement)("strong",null,C)),(0,r.createElement)(i.MediaUploadCheck,null,(0,r.createElement)(s.FormFileUpload,{onChange:e=>{const n=e.target.files;!n.length>0||(t.tmpFile=n[0],o(t))},accept:m,render:e=>{let{openFileDialog:t}=e;return(0,r.createElement)(s.Button,{variant:"link",onClick:()=>{t()}},""===C?__("Select track","jetpack"):__("Change track","jetpack",0))},disabled:k}))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help"},/* translators: %s: The allowed file types to be uploaded as a video text track." */ | |
| 32 | -(0,u.sprintf)(__("Allowed formats: %s","jetpack"),m))),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-label-language"},(0,r.createElement)(s.TextControl,{onChange:e=>o({...t,label:e}),label:__("Label","jetpack"),value:w,help:__("Title of track","jetpack"),disabled:k}),(0,r.createElement)(s.TextControl,{onChange:e=>o({...t,srcLang:e}),label:__("Source language","jetpack"),value:E,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:k})),(0,r.createElement)(s.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:h,value:_,label:/* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */ | |
| 33 | -__("Kind","jetpack"),onChange:e=>{o({...t,kind:e})},disabled:k}),(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container"},k?(0,r.createElement)(s.Spinner,null):(0,r.createElement)(s.Button,{variant:"secondary",disabled:!t.tmpFile,onClick:()=>{b(null),""===w&&(t.label=__("English","jetpack")),""===E&&(t.srcLang="en"),void 0===t.kind&&(t.kind=d),f(t)?b(__("A track already exists for that language and kind.","jetpack")):(y(!0),v(t,n).then((()=>{o(t),b(null),a()})).catch((e=>{e.message&&b(e.message)})).finally((()=>{y(!1)})))}},__("Save","jetpack")),(0,r.createElement)(s.Button,{variant:"link",onClick:p},__("Close","jetpack"))),g&&(0,r.createElement)("div",{className:"videopress-block-tracks-editor__single-track-editor-error"},/* translators: %s: An error message returned after a failed video track file upload." */ | |
| 34 | -(0,u.sprintf)(__("Error: %s","jetpack"),g))))}function w(e){let{tracks:t=[],onChange:n,guid:o}=e;const[a,i]=(0,c.useState)(null);return(0,r.createElement)(s.Dropdown,{contentClassName:"videopress-block-tracks-editor",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;return(0,r.createElement)(s.ToolbarButton,{label:__("Text tracks","jetpack"),showTooltip:!0,"aria-expanded":t,"aria-haspopup":"true",onClick:n,icon:f})},renderContent:()=>null!==a?(0,r.createElement)(y,{track:t[a],guid:o,onChange:e=>{const r=[...t];r[a]=e,n(r)},onClose:()=>i(null),onCancel:()=>{n(t.filter(((e,t)=>t!==a))),i(null)},trackExists:e=>-1!==t.filter(((e,t)=>t!==a)).findIndex((t=>t.kind===e.kind&&t.srcLang===e.srcLang))}):(0,r.createElement)(r.Fragment,null,(0,r.createElement)(s.NavigableMenu,null,(0,r.createElement)(k,{tracks:t,onChange:n,guid:o}),(0,r.createElement)(s.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack")},(0,r.createElement)(s.MenuItem,{icon:p.Z,onClick:()=>{(()=>{const e=t.length,r=[...t];r[e]||(r[e]={}),r[e]={...t[e]},n(r),i(e)})()}},__("Upload track","jetpack")))))})}},32478:function(e,t,n){"use strict";n.d(t,{$:function(){return f}});var r=n(51806),o=n(52175),a=n(55609),i=n(69307),s=n(65736),l=n(61074),c=n(65235),u=n.n(c),p=n(81427);const __=s.__,d=["image"],m=e=>{const{videoPosterImageUrl:t}=e;return(0,r.createElement)("div",{className:"resumable-upload__editor-thumb-placeholder"},t?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("img",{src:t,alt:"Poster"}),(0,r.createElement)(l.Z,{className:"uploading-editor__play-icon",icon:p.o1})):(0,r.createElement)("span",null,"No Poster Selected"))},h=e=>{const{onSelectPoster:t,onRemovePoster:n}=e;return(0,r.createElement)(a.BaseControl,{className:u()(e.className,"editor-video-poster-control")},(0,r.createElement)(m,e),(0,r.createElement)(o.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:t,allowedTypes:d,render:e=>{let{open:t}=e;return(0,r.createElement)("div",{className:"poster-selector__buttons"},(0,r.createElement)(a.Button,{onClick:n,variant:"link",isDestructive:!0},__("Remove Poster Image","jetpack")),(0,r.createElement)(a.Button,{variant:"secondary",onClick:t},__("Select Poster Image","jetpack")))}}))},f=e=>{const{file:t,onSelectPoster:n,onRemovePoster:s,videoPosterImageData:c,title:u,onChangeTitle:m,onVideoFrameSelected:f}=e,[g,v]=(0,i.useState)(0),[b,k]=(0,i.useState)(!0),y=(0,i.useRef)(null),w=(0,i.useRef)(null),E=()=>{k(!1)};(0,i.useEffect)((()=>{null!==t&&y&&(y.current.src=URL.createObjectURL(t))}),[t,y]);const _={};return c&&(_.display="none"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"uploading-editor"},(0,r.createElement)("div",{className:"uploading-editor__summary"}),(0,r.createElement)("div",{className:"uploading-editor__fields"},(0,r.createElement)(a.TextControl,{label:__("Video title","jetpack"),className:"uploading-editor__title",onChange:m,value:u}),(0,r.createElement)("div",{className:"uploading-editor__content"},(0,r.createElement)(a.BaseControl,{label:__("Video poster (optional)","jetpack")},b?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"uploading-editor__video-container"},(0,r.createElement)("div",{className:"uploading-editor__video-poster-wrapper"},c&&(0,r.createElement)(h,{onSelectPoster:n,onRemovePoster:s,videoPosterImageUrl:c.url}),(0,r.createElement)("video",{ref:y,muted:!0,className:"uploading-editor__video",onDurationChange:e=>{const t=e.target.duration;v(t),y.current&&(y.current.currentTime=t/2)},onError:E,onLoadedMetadata:e=>{e.target.videoHeight||E()},style:_})),!c&&(0,r.createElement)(l.Z,{className:"uploading-editor__play-icon",icon:p.o1})),(0,r.createElement)("span",{style:_},(0,r.createElement)(a.RangeControl,{className:"uploading-editor__range",min:"0",step:"0.1",max:g,showTooltip:!1,withInputField:!1,onChange:e=>{f(1e3*e),y.current&&(y.current.currentTime=e)}})),(0,r.createElement)("span",{className:"uploading-editor__scrubber-help",style:_},(0,i.createInterpolateElement)(__("This is how the video will look. Use the slider to choose a poster or <a>select a custom one</a>.","jetpack"),{a:(0,r.createElement)(o.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:n,allowedTypes:d,render:e=>{let{open:t}=e;return(0,r.createElement)("a",{className:"uploading-editor__upload-link",onClick:t,onKeyDown:t,ref:w,role:"button",tabIndex:0},__("select a custom one","jetpack"))}})}))):(0,r.createElement)(h,{onSelectPoster:n,videoPosterImageUrl:c?c.url:null}))))))}},90953:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(96483);const o=(e,t)=>{let{autoplay:n,controls:o,loop:a,muted:i,playsinline:s,poster:l,preload:c,seekbarColor:u,seekbarPlayedColor:p,seekbarLoadingColor:d,useAverageColor:m}=t;if(!e)return null;const h={resizeToParent:!0,cover:!0,...n&&{autoPlay:!0},...!o&&{controls:!1},...a&&{loop:!0},...i&&{muted:!0,persistVolume:!1},...s&&{playsinline:!0},...l&&{posterUrl:l},...""!==c&&{preloadContent:c},...""!==u&&{sbc:u},...""!==p&&{sbpc:p},...""!==d&&{sblc:d},...m&&{useAverageColor:!0}};return(0,r.addQueryArgs)(`https://videopress.com/v/${e}`,h)}},77290:function(e,t,n){"use strict";n.d(t,{K8:function(){return l},Kp:function(){return u},Zx:function(){return c},f6:function(){return s}});var r=n(65235),o=n.n(r),a=n(90879);const i=e=>{const t=a.s.reduce(((e,t)=>{let{className:n}=t;return e[n]=!1,e}),{"wp-has-aspect-ratio":!1});return o()(e,t)};function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]))return i(t);const n=document.implementation.createHTMLDocument("");n.body.innerHTML=e;const r=n.body.querySelector("iframe");if(r&&r.height&&r.width){const e=(r.width/r.height).toFixed(2);for(let n=0;n<a.s.length;n++){const r=a.s[n];if(e>=r.ratio)return o()(i(t),r.className,"wp-has-aspect-ratio")}}return t}const l=e=>e.replace(/\.[^/.]+$/,""),c=e=>{if(!e||"string"!=typeof e)return null;const t=e.match(/^https?:\/\/(?<host>video(?:\.word|s\.files\.word)?press\.com)(?:\/v|\/embed)?\/(?<guid>[a-zA-Z\d]{8})/);return t?.groups?.guid?t.groups.guid:null},u=e=>{const{guid:t,videoPressTracks:n,isVideoPressExample:r}=e;if(!t?.length)return!1;if(!Array.isArray(n))return!1;return!(!Object.keys(e).includes("isVideoPressExample")||"boolean"!=typeof r)}},65192:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(51806),o=n(13419),a=n(52175),i=n(4981),s=n(55609),l=n(9818),c=n(12238),u=n(65736),p=(n(99196),n(77290)),d=n(5743);const __=u.__,m={instances:[]},h=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(m.instances=[]),e.forEach((e=>{if(e.innerBlocks.length)return void h(e.innerBlocks,!1,t+1);const{clientId:n,name:r,attributes:o}=e;"core/video"===r&&(0,p.Kp)(o)&&m.instances.push({clientId:n,name:r,attributes:o})})),0===t)return m.instances};function f(e){let{clientId:t,attributes:n}=e;const u=(0,l.useSelect)((e=>e(c.store).getCurrentPostId())),{getBlocks:m}=(0,l.useSelect)(a.store),{replaceBlock:f}=(0,l.useDispatch)(a.store),{tracks:g}=(0,o.z$)();return(0,r.createElement)("div",{className:d.Z.wrapper},(0,r.createElement)(s.Notice,{status:"info",isDismissible:!1,className:d.Z["conversion-notice"]},__("You can transform this post's video blocks to the new VideoPress block to take advantage of new features, such as adding chapters directly in the description or hiding the video's share menu.","jetpack")),(0,r.createElement)(s.Button,{variant:"primary",onClick:()=>{const e=h(m(),!0);e?.length&&(e.find((e=>e.clientId===t))||e.push({clientId:t,name:"core/video",currentBlockAttributes:n}),e.forEach((e=>{const{clientId:t,name:n,attributes:r}=e;"core/video"===n&&(0,p.Kp)(r)&&(f(t,(0,i.createBlock)("videopress/video",r)),g.recordEvent("jetpack_editor_videopress_block_manual_conversion_click",{post_id:u}))})))}},__("Transform blocks to VideoPress","jetpack")))}},68938:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(94333),i=n(77290),s=n(65192);const l=(0,a.createHigherOrderComponent)((e=>t=>(0,i.Kp)(t.attributes)?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(s.Z,{clientId:t.clientId,attributes:t.attributes})),(0,r.createElement)(e,t)):(0,r.createElement)(e,t)));t.Z=l},23062:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(13419),o=n(68938);const a="videopress/video";function i(e,t){if("core/video"!==t)return e;const{available:n}=(0,r.OZ)(a);return n?{...e,edit:(0,o.Z)(e.edit)}:e}},73859:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var r=n(51806),o=n(55609),a=n(65736),i=n(78680),s=n(75255);const __=a.__,l="videopress/video-chapters",c=!!window?.Jetpack_Editor_Initial_State?.available_blocks[l],u=31;function p(e){let{isRequestingVideoItem:t}=e;const{attributes:n,setAttributes:a}=(0,s.Z)(),{title:p,description:d}=n,m=(0,i.L)(l),h=d?.length?d.split("\n").map((e=>Math.ceil(e.length/u)||1)).reduce(((e,t)=>e+t),0):4,f=Math.min(12,Math.max(h,4));if(!c)return null;return(0,r.createElement)(o.PanelBody,{title:__("Details","jetpack"),className:m?"is-beta":""},(0,r.createElement)(o.TextControl,{label:__("Title","jetpack"),value:p,placeholder:__("Video title","jetpack"),onChange:e=>{a({title:e})},disabled:t}),(0,r.createElement)(o.TextareaControl,{label:__("Description","jetpack"),value:d,placeholder:__("Video description","jetpack"),onChange:e=>{a({description:e})},disabled:t,rows:f}))}},24288:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(94333),i=n(69307),s=n(73859),l=n(67203),c=n(49664),u=n(84676);const p=(0,a.createHigherOrderComponent)((e=>t=>{const{attributes:n,setAttributes:a}=t,[p,d]=(0,l.Z)(n?.id),[m]=(0,c.v)(n);return(0,i.useEffect)((()=>{if(!p)return;const e={};p?.title&&(e.title=p.title),p?.description&&(e.description=p.description),Object.keys(e).length&&(a(e),m(e))}),[p,a,m]),u.d&&"core/video"!==!t.name&&t.attributes?.guid?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(s.Z,{isRequestingVideoItem:d})),(0,r.createElement)(e,t)):(0,r.createElement)(e,t)}));t.Z=p},75255:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(52175),o=n(9818);function a(){const{clientId:e,attributes:t}=(0,o.useSelect)((e=>{const t=e(r.store).getSelectedBlockClientId();return{clientId:t,attributes:t?e("core/block-editor").getBlockAttributes(t):void 0}})),{updateBlockAttributes:n}=(0,o.useDispatch)(r.store);return{clientId:e,attributes:t,setAttributes:t=>n(e,t)}}},49664:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(86989),o=n.n(r),a=n(94333),i=n(37798),s=n(9818),l=n(12238),c=n(69307),u=n(65736),p=n(22081),d=n(90953),m=n(6268),h=n(38871);const __=u.__;function f(e){const{id:t,title:n,description:r,guid:u}=e,f=(0,s.useSelect)((e=>e(l.store).isSavingPost()),[]),g=(0,a.usePrevious)(f),v=(0,s.useDispatch)(i.store).invalidateResolution,[b,k]=(0,c.useState)(),y=(0,c.useCallback)((e=>{k((t=>({...t,...e})))}),[]);(0,c.useEffect)((()=>{k({title:n,description:r})}),[]);const w=function(e){return t=>new Promise(((n,r)=>{o()({path:"/wpcom/v2/videopress/meta",method:"POST",data:{id:e,...t}}).then((e=>{if(200!==e?.data)return r(e);n(e)})).catch(r)}))}(t);return(0,c.useEffect)((()=>{if(!f||g)return;if(!t)return;const o={};if(b?.title!==n&&(o.title=n),b?.description!==r&&(o.description=r),!Object.keys(o).length)return;if(w(o).then((()=>y({title:n,description:r}))),!o?.description?.length)return;const a=(0,m.ZP)(o.description);if(!a?.length)return;const i={label:__("English","jetpack"),srcLang:"en",kind:"chapters",tmpFile:(0,h.ZP)(o.description)};(0,p.n)(i,u).then((()=>{const t=(0,d.p)(u,e);v("getEmbedPreview",[t])}))}),[f,g,n,b?.title,b?.description,r,w,y,e,v,t,u]),[y]}},67203:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(86989),o=n.n(r),a=n(69307);function i(e){const[t,n]=(0,a.useState)({}),[r,i]=(0,a.useState)(!1);return(0,a.useEffect)((()=>{e&&(i(!0),async function(){try{const t=await o()({path:`/wp/v2/media/${e}`});n(t?.jetpack_videopress||{}),i(!1)}catch(e){throw i(!1),new Error(e)}}())}),[e]),[t,r]}},84676:function(e,t,n){"use strict";n.d(t,{Z:function(){return a},d:function(){return o}});var r=n(24288);const o=!!window?.Jetpack_Editor_Initial_State?.available_blocks["videopress/video-chapters"];function a(e,t){if(!o)return e;if("core/video"!==t)return e;const n={...e.attributes,title:{type:"string"},description:{type:"string"}};return{...e,attributes:n,edit:(0,r.Z)(e.edit)}}},6268:function(e,t,n){"use strict";function r(e){return e.split("\n").map((e=>function(e){const t=/(?<timeBlock>\(?(?<time>\d{1,2}:\d{2}:\d{2}|\d{1,2}:\d{2})\)?)/.exec(e);if(null==t||null==t.groups)return null;const{groups:{timeBlock:n,time:r}}=t,o=e.indexOf(n),a=(o<(e.length-n.length)/2?e.substring(o+n.length,e.length):e.substring(0,o)).trim().replace(/(\s-$)|(^-\s)/,""),i=r.split(":");return 1===i[0].length&&(i[0]=`0${i[0]}`),2===i.length&&i.unshift("00"),{startAt:i.join(":"),title:a}}(e))).filter((e=>null!==e)).sort(((e,t)=>e.startAt.localeCompare(t.startAt)))}n.d(t,{Tn:function(){return r},ZP:function(){return r}})},38871:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a}});var r=n(6268);function o(e){const t=Math.floor(e/36e5);let n=e-36e5*t;const r=Math.floor(n/6e4);n-=6e4*r;return[t,r,Math.floor(n/1e3)].map((e=>e<10?`0${e}`:e)).join(":")}function a(e,t){const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:359999e3;const n=(0,r.Tn)(e);if(0===n.length)return null;let a="WEBVTT\n",i=1;for(const[e,r]of n.entries()){const s=0===e?"000":"001",l=e<n.length-1?n[e+1].startAt:o(t);a+=`\n${i++}\n${r.startAt}.${s} --\x3e ${l}.000\n${r.title}\n`}return a}(e,t);return n?new File([n],"chapters.vtt",{type:"text/vtt"}):null}},68925:function(e,t,n){"use strict";n.d(t,{W:function(){return c}});var r=n(51806),o=n(13419),a=n(55609),i=n(65736),s=n(99787);const __=i.__,l=(0,o.dM)(s),c=e=>{let{changeStatus:t,isLoading:n,isModuleActive:o}=e;return(0,r.createElement)(a.Placeholder,{icon:l,instructions:__("You'll need to activate the WordAds feature to use this block.","jetpack"),label:s.title},(0,r.createElement)(a.Button,{disabled:o||n,isBusy:n,onClick:()=>t(!0),variant:"secondary"},n?__("Activating WordAds","jetpack"):__("Activate WordAds","jetpack",0)),(0,r.createElement)("div",{className:"membership-button__disclaimer"},(0,r.createElement)(a.ExternalLink,{href:"https://jetpack.com/support/ads/"},__("Learn more about the WordAds feature.","jetpack"))))}},61981:function(e,t,n){"use strict";n.d(t,{c:function(){return i}});var r=n(51806),o=n(22636),a=n(55609);const i=()=>(0,r.createElement)(a.Placeholder,null,(0,r.createElement)(a.Flex,{gap:2,direction:"column",style:{width:"100%"}},(0,r.createElement)(a.Flex,{gap:4},(0,r.createElement)(a.FlexItem,null,(0,r.createElement)(o.Z,{width:30,height:30})),(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(o.Z,{width:"90%",height:30}))),(0,r.createElement)(a.Flex,{style:{marginTop:12}},(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(o.Z,{height:30,width:"60%"}))),(0,r.createElement)(a.Flex,{style:{marginTop:12}},(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(o.Z,{width:150,height:50}))),(0,r.createElement)(a.Flex,{style:{marginTop:18}},(0,r.createElement)(a.FlexBlock,null,(0,r.createElement)(o.Z,{width:"90%",height:16})))))},50354:function(e,t,n){"use strict";n.d(t,{m:function(){return i}});var r=n(51806),o=n(55609),a=n(65736);const __=a.__,i=[{height:250,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-7-2h2V7h-4v2h2z"})),name:__("Rectangle 300x250","jetpack"),tag:"mrec",width:300,editorPadding:30},{height:90,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V9c0-1.11-.9-2-2-2H9v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})),name:__("Leaderboard 728x90","jetpack"),tag:"leaderboard",width:728,editorPadding:60},{height:50,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V9c0-1.11-.9-2-2-2H9v2h4v2h-2v2h2v2H9v2h4c1.1 0 2-.89 2-2z"})),name:__("Mobile Leaderboard 320x50","jetpack"),tag:"mobile_leaderboard",width:320,editorPadding:100},{height:600,icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),(0,r.createElement)(o.Path,{d:"M19.04 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-14V5h14v14zm-6-2h2V7h-2v4h-2V7h-2v6h4z"})),name:__("Wide Skyscraper 160x600","jetpack"),tag:"wideskyscraper",width:160,editorPadding:30}]},56565:function(e,t,n){"use strict";var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(1020);const __=i.__,l=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(a.PanelBody,{title:__("Visibility","jetpack")},(0,r.createElement)(a.ToggleControl,{className:"jetpack-wordads__mobile-visibility",checked:!!t,label:__("Hide on mobile","jetpack"),help:__("Hides this block for site visitors on mobile devices.","jetpack"),onChange:n}))};t.Z=e=>{let{attributes:{format:t,hideMobile:n},setAttributes:a}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(s.Z,{value:t,onChange:e=>a({format:e})})),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(l,{value:n,onChange:e=>a({hideMobile:!!e})})))}},53193:function(e,t,n){"use strict";var r=n(51806),o=n(88275),a=n(13419),i=n(68925),s=n(61981),l=n(50354),c=n(56565),u=n(80405),p=n(72473),d=n(38511),m=n(52203);t.Z=e=>{let{attributes:t,setAttributes:n}=e;const{format:h}=t,{isLoadingModules:f,isChangingStatus:g,isModuleActive:v,changeStatus:b}=(0,a.el)("wordads"),k=l.m.find((e=>{let{tag:t}=e;return t===h}));return v?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(c.Z,{attributes:t,setAttributes:n}),(0,r.createElement)("div",{className:`wp-block-jetpack-wordads jetpack-wordads-${h}`},(0,r.createElement)("div",{className:"jetpack-wordads__ad",style:{width:k.width,height:k.height,backgroundImage:`url( ${(e=>{switch(e){case"leaderboard":return m;case"mobile_leaderboard":return d;case"wideskyscraper":return u;default:return p}})(h)} )`,backgroundSize:"cover"}}))):f?(0,r.createElement)(o.ZP,null,(0,r.createElement)(s.c,null)):(0,r.createElement)(i.W,{changeStatus:b,isModuleActive:v,isLoading:g})}},3432:function(e,t,n){"use strict";var r=n(31985),o=n(99787),a=n(53193);(0,r.S)(o,{edit:a.Z,save:()=>null})},1020:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(51806),o=n(55609),a=n(65736),i=n(50354);const s=(0,a.__)("Pick an ad format","jetpack");function l(e){let{value:t,onChange:n}=e;return(0,r.createElement)(o.Dropdown,{placement:"bottom-start",renderToggle:e=>{let{onToggle:t,isOpen:n}=e;return(0,r.createElement)(o.ToolbarGroup,{controls:[{icon:(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,r.createElement)(o.Path,{d:"M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"})),title:s,onClick:t,extraProps:{"aria-expanded":n},className:"wp-block-jetpack-wordads__format-picker-icon"}]})},renderContent:e=>{let{onClose:a}=e;return(0,r.createElement)(o.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker"},i.m.map((e=>{let{tag:i,name:s,icon:l}=e;return(0,r.createElement)(o.MenuItem,{className:i===t?"is-active":void 0,icon:l,isSelected:i===t,key:i,onClick:()=>{n(i),a()},role:"menuitemcheckbox"},s)})))}})}},78680:function(e,t,n){"use strict";n.d(t,{L:function(){return p}});var r=n(82674),o=n.n(r),a=n(51806),i=n(86989),s=n.n(i),l=n(94333),c=n(92694),u=(n(80425),n(85921),n(63066),n(92713),n(54414),n(36215),n(31657),n(23984),n(14688),n(7652),n(1949));function p(e){if(!u)return!1;const t=u.beta||[],n=e.replace(/jetpack\//,"");return t.includes(e)||t.includes(n)}s().use(((e,t)=>{if("cors"===e.mode)return t(e);if(e.url)try{const n=new URL(e.url,location.href);if(n.protocol!==location.protocol||n.hostname!==location.hostname||n.port!==location.port)return t(e)}catch{return t(e)}return e.headers||(e.headers={}),e.headers["x-wp-api-fetch-from-editor"]="true",t(e)})),(0,c.addFilter)("blocks.registerBlockType","jetpack/label-beta-blocks-title",(function(e,t){if(!p(t))return e;const{title:n,keywords:r}=e,o="(beta)",a="beta",i={...e};return n&&(i.title=n.toLowerCase().endsWith(o)?n:`${e.title} ${o}`),Array.isArray(r)&&(i.keywords=r.includes(a)?r:[...r,a]),i}));const d=(0,l.createHigherOrderComponent)((e=>t=>{if(t?.clientRootId)return(0,a.createElement)(e,t);const{name:n}=t;return p(n)?(0,a.createElement)(e,o()({},t,{className:"is-beta-extension"})):(0,a.createElement)(e,t)}),"withBetaClassName");(0,c.addFilter)("editor.BlockListBlock","jetpack/label-beta-extensions",d)},6460:function(e,t,n){"use strict";var r=n(4981),o=n(65736),a=n(81427);const __=o.__,i={name:"descript",title:"Descript",icon:a.h,keywords:[__("descript","jetpack")],description:__("Embed a Descript Item.","jetpack"),patterns:[/^https:\/\/share.descript.com\/(view|embed)\/\w+/i],attributes:{providerNameSlug:"descript",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},5166:function(e,t,n){"use strict";var r=n(92694),o=n(65736),a=n(70355),i=n(81427);const __=o.__,_x=o._x,s={name:"facebook",title:"Facebook",icon:{src:i.Vq,foreground:(0,a.m)()},keywords:[_x("social","block search term","jetpack")],description:__("Embed a Facebook post.","jetpack"),patterns:[/^https?:\/\/www\.facebook.com\/.+/i],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}};(0,r.addFilter)("blocks.registerBlockType","reactivateFacebookEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations)return e;const n=e.variations.filter((e=>e.name!==s.name));return e.variations=[...n,s],e}))},36215:function(e,t,n){"use strict";n(5166),n(20970),n(25467),n(91128),n(6460)},20970:function(e,t,n){"use strict";var r=n(92694),o=n(65736),a=n(70355),i=n(81427),s=n(12923);const __=o.__,_x=o._x,l={name:"instagram",title:"Instagram",icon:{src:i.yu,foreground:(0,a.m)()},keywords:[_x("image","block search term","jetpack"),_x("social","block search term","jetpack")],description:__("Embed an Instagram post.","jetpack"),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i],attributes:{providerNameSlug:"instagram",responsive:!0}};(0,r.addFilter)("blocks.registerBlockType","reactivateInstagramEmbedBlockVariation",(function(e,t){if("core/embed"!==t||!e.variations||!(0,s.Z)())return e;const n=e.variations.filter((e=>e.name!==l.name));return e.variations=[...n,l],e}))},25467:function(e,t,n){"use strict";var r=n(4981),o=n(65736),a=n(81427);const __=o.__,i={name:"loom",title:"Loom",icon:a.zf,keywords:[__("video","jetpack")],description:__("Embed a Loom video.","jetpack"),patterns:[/^https?:\/\/(www\.)?loom\.com\/share\/.+/i],attributes:{providerNameSlug:"loom",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},91128:function(e,t,n){"use strict";var r=n(4981),o=n(65736),a=n(81427);const __=o.__,i={name:"smartframe",title:"SmartFrame",icon:a.Ae,keywords:[__("smartframe","jetpack")],description:__("Embed a SmartFrame Image.","jetpack"),patterns:[/^https?:\/\/(.*?).smartframe.(io|net)\/.*/i],attributes:{providerNameSlug:"smartframe",responsive:!0}};(0,r.registerBlockVariation)("core/embed",i)},31657:function(e,t,n){"use strict";var r=n(4981),o=n(92694),a=n(6512);const i={from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:n}=e;return!!n?.raw&&"jetpack_widget_social_icons"===t},transform:e=>{let{instance:t}=e,n=[];return t.raw.icons.forEach((e=>{const t=new URL(e.url.includes(":")?e.url:"https://"+e.url),o=t.hostname?t.hostname:t.protocol,i=a.Z.find((e=>o.includes(e.url)||e.url.includes(o))),s=(0,r.createBlock)("core/social-link",{service:i?i.name:"chain",url:e.url});n=[...n,s]})),(0,r.createBlock)("core/social-links",{},n)}}]};(0,o.addFilter)("blocks.registerBlockType","addTransformToSocialLinksWidget",(function(e,t){return"core/social-links"!==t||(e.transforms=i),e}))},6512:function(e,t){"use strict";t.Z=[{name:"wordpress",url:["wordpress."]},{name:"fivehundredpx",url:["500px.com"]},{name:"amazon",url:["amazon."]},{name:"bandcamp",url:["bandcamp.com"]},{name:"behance",url:["behance.net"]},{name:"codepen",url:["codepen.io"]},{name:"deviantart",url:["deviantart.com"]},{name:"dribbble",url:["dribbble.com"]},{name:"dropbox",url:["dropbox.com"]},{name:"etsy",url:["etsy.com"]},{name:"facebook",url:["facebook.com"]},{name:"flickr",url:["flickr.com"]},{name:"foursquare",url:["foursquare.com"]},{name:"goodreads",url:["goodreads.com"]},{name:"google",url:["google."]},{name:"github",url:["github.com"]},{name:"instagram",url:["instagram.com"]},{name:"lastfm",url:["last.fm"]},{name:"linkedin",url:["linkedin.com"]},{name:"mail",url:["mailto:"]},{name:"linkedin",url:["linkedin.com"]},{name:"mastodon",url:["mastodon.social"]},{name:"meetup",url:["meetup.com"]},{name:"medium",url:["medium.com"]},{name:"patreon",url:["patreon.com"]},{name:"pinterest",url:["pinterest."]},{name:"pocket",url:["getpocket.com"]},{name:"reddit",url:["reddit.com"]},{name:"skype",url:["skype.com","skype:"]},{name:"snapchat",url:["snapchat.com"]},{name:"soundcloud",url:["soundcloud.com"]},{name:"spotify",url:["spotify.com"]},{name:"telegram",url:["telegram.me","t.me"]},{name:"tiktok",url:["tiktok.com"]},{name:"tumblr",url:["tumblr.com"]},{name:"twitch",url:["twitch.tv"]},{name:"twitter",url:["twitter.com"]},{name:"vimeo",url:["vimeo.com"]},{name:"vk",url:["vk.com"]},{name:"yelp",url:["yelp.com"]},{name:"youtube",url:["youtube.com"]}]},87950:function(e,t,n){"use strict";n.d(t,{L:function(){return i},x:function(){return a}});var r=n(51806),o=n(69307);const a=(0,o.createContext)(),i=e=>{let{onBannerVisibilityChange:t,hasParentBanner:n,children:o}=e;return(0,r.createElement)(a.Provider,{value:{onBannerVisibilityChange:t,hasParentBanner:n},children:o})}},23984:function(e,t,n){"use strict";var r=n(13419),o=n(47701),a=n.n(o),i=n(92694),s=n(65736),l=n(92819),c=n(30371),u=n(7832),p=n(42770),d=n(27003);const __=s.__,m=[];(0,i.addFilter)("blocks.registerBlockType","jetpack/paid-block",((e,t)=>((0,r.X1)(t)&&(m.includes(t)||m.push(t),e.keywords=(0,l.uniq)([...e.keywords,"premium",__("premium","jetpack")]),(0,r.HD)(t)||(e.icon=(0,p.Z)(e.icon)),e.attributes.shouldDisplayFrontendBanner||(e.attributes.shouldDisplayFrontendBanner={type:"boolean",default:!0}),"core/cover"!==t&&(e.supports={...e.supports,__experimentalExposeControlsToChildren:!0})),e))),(0,i.addFilter)("blocks.registerBlockType","jetpack/paid-block-with-upgrade-banner",d.v),(0,i.addFilter)("editor.MediaPlaceholder","jetpack/paid-block-media-placeholder",c.Z),(0,i.addFilter)("editor.MediaReplaceFlow","jetpack/paid-block-media-placeholder",u.Z),a()((function(){(0,r.FK)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")}))},30371:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(13419),s=n(52175),l=n(94333),c=n(69307),u=n(11317),p=n(87950);t.Z=(0,l.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,s.useBlockEditContext)(),r=(0,i.m3)(n);if(!r?.mediaPlaceholder||!(0,i.X1)(n))return(0,a.createElement)(e,t);const{fileType:l}=r,{onError:d}=t,{onBannerVisibilityChange:m}=(0,c.useContext)(p.x),h=(0,c.useCallback)((e=>m(e?.length&&(0,u.Qu)(e[0],l))),[l,m]),f=(0,c.useCallback)((e=>{const t=e?.[0]?.props?.children;return(0,u.Qu)(t,l)?h([t]):d(e)}),[h,l,d]);return(0,a.createElement)("div",{className:"paid-block-media-placeholder"},(0,a.createElement)(e,o()({},t,{onFilesPreUpload:h,onError:f})))}),"withMediaPlaceholderUpgradable")},7832:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(13419),s=n(52175),l=n(94333),c=n(69307),u=n(11317),p=n(87950);t.Z=(0,l.createHigherOrderComponent)((e=>t=>{const{name:n}=(0,s.useBlockEditContext)(),r=(0,i.m3)(n),l=(0,c.useRef)();if(!r?.mediaReplaceFlow||!(0,i.X1)(n))return(0,a.createElement)(e,t);const{fileType:d}=r,{onBannerVisibilityChange:m}=(0,c.useContext)(p.x);return(0,a.createElement)(e,o()({},t,{onFilesUpload:e=>{l.current=e?.length?e[0]:null,m(e?.length&&(0,u.Qu)(e[0],d))},createNotice:(e,n,r)=>{if((0,u.Qu)(l.current,d))return l.current=null,null;t.createNotice(e,n,r)}}))}),"withMediaReplaceFlowUpgradable")},95796:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=e=>{let{cx:t=0,cy:n=0,r:a=4,fill:i="#e34c84",stroke:s="#ffffff",strokeWidth:l="2"}=e;return(0,r.createElement)(o.SVG,{className:"jetpack-paid-block-symbol"},(0,r.createElement)(o.Circle,{cx:t,cy:n,r:a,fill:i,stroke:s,strokeWidth:l}))}},42770:function(e,t,n){"use strict";var r=n(51806),o=(n(13419),n(95796));const a=e=>{const t=(0,r.createElement)(o.Z,{key:"paid-symbol"});return e?.src?{...e,src:(0,r.createElement)(r.Fragment,null,e.src,t)}:(0,r.createElement)(r.Fragment,null,e,t)};t.Z=a},66316:function(e,t,n){"use strict";var r=n(51806),o=n(9818),a=n(65736),i=n(26546),s=n(78798);const __=a.__,_x=a._x,l=__("Premium Block","jetpack"),/** translators: %s: name of the plan. */ | |
| 35 | -c=__("Upgrade to %s to use this premium block","jetpack"),u=(__("Upgrade your plan to use this premium block","jetpack"),_x("Upgrade","Call to action to buy a new plan","jetpack"));t.ZP=e=>{let{onRedirect:t,align:n,className:p,title:d=l,description:m=null,buttonText:h=u,visible:f=!0,requiredPlan:g,context:v}=e;const[b,k,y]=(0,s.Z)(g,t),w=(0,o.useSelect)((e=>{if(m)return m;const t=e("wordpress-com/plans"),n=t&&t.getPlan(g);return n?(0,a.sprintf)(c,n.product_name_short):null}),[m]);return w&&(0,r.createElement)(i.p,{align:n,buttonText:h,checkoutUrl:b,className:p,context:v,description:w,goToCheckoutPage:k,isRedirecting:y,title:d,visible:f})}},38140:function(e,t,n){"use strict";n.d(t,{W:function(){return o},v:function(){return r}});const r=e=>{let{plan:t,blockName:n,context:r,tracks:o}=e;o.recordEvent("jetpack_editor_block_upgrade_click",{plan:t,block:n,context:r})},o=e=>{let{plan:t,blockName:n,context:r,tracks:o}=e;o.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:t,block:n,context:r})}},27003:function(e,t,n){"use strict";n.d(t,{v:function(){return m}});var r=n(51806),o=n(13419),a=n(52175),i=n(94333),s=n(9818),l=n(69307),c=n(87950),u=n(66316),p=n(38140);const d=(0,i.createHigherOrderComponent)((e=>t=>{const{name:n,clientId:i,isSelected:d,attributes:m,setAttributes:h}=t||{},f=(0,o.Rl)(n);if(!f)return(0,r.createElement)(e,t);const g=(0,o.HD)(n),v=(0,o.m3)(n),[b,k]=(0,l.useState)(!g),[y,w]=(0,l.useState)(!1),E="editor-canvas",_=(0,s.useSelect)((e=>e("core/block-editor").hasSelectedInnerBlock(i,!0)),[]),{hasParentBanner:C}=(0,l.useContext)(c.x)||{},S=(d||_)&&b&&!C,{tracks:x}=(0,o.z$)(),j=(0,l.useMemo)((()=>({plan:f,blockName:n,context:E,tracks:x})),[f,n,x]);(0,l.useEffect)((()=>{S&&w(!0)}),[S,w]),(0,l.useEffect)((()=>{!y&&S&&(0,p.W)(j)}),[y,j,S]),(0,l.useEffect)((()=>k(!g)),[m,k,g]),(0,l.useEffect)((()=>{h({shouldDisplayFrontendBanner:!C})}),[h,C]);const L=(0,a.useBlockProps)();return(0,r.createElement)(c.L,{onBannerVisibilityChange:k,hasParentBanner:S},(0,r.createElement)("div",{ref:L.ref},(0,r.createElement)(u.ZP,{className:`is-${n.replace(/\//,"-")}-paid-block`,title:null,align:m?.align,visible:S,description:v?.description,requiredPlan:f,context:E,onRedirect:()=>(0,p.v)(j)}),(0,r.createElement)(e,t)))}),"withUpgradeBanner");function m(e,t){return(0,o.Rl)(t)?{...e,edit:d(e.edit)}:e}},85921:function(e,t,n){"use strict";var r=n(51806),o=n(13419),a=n(4981),i=n(65736),s=n(81427);const __=i.__;(0,o.Wp)()||(0,o.Ug)()||(0,a.registerBlockCollection)("jetpack",{title:"Jetpack",icon:(0,r.createElement)(s.IM,null)}),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"contact-form"!==t})),{slug:"contact-form",title:__("Forms","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"earn"!==t})),{slug:"earn",title:__("Earn","jetpack"),icon:(0,r.createElement)(s.IM,null)}]),(0,a.setCategories)([...(0,a.getCategories)().filter((e=>{let{slug:t}=e;return"grow"!==t})),{slug:"grow",title:__("Grow","jetpack"),icon:(0,r.createElement)(s.IM,null)}])},85007:function(e,t,n){"use strict";function r(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function o(e,t,n){const o=`${window.Jetpack_Block_Assets_Base_Url.url}editor-assets`,{currentDoc:a}=r(n),i=a.getElementsByTagName("head")[0];e.forEach((e=>{const[n,r]=e.file.split("/").pop().split(".");if("css"===r){if(a.getElementById(e.id))return;const t=a.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${o}/${n}-${e.version}.${r}`,i.appendChild(t)}if("js"===r){const s=t[e.id]?t[e.id]:null;if(a.getElementById(e.id))return s();const l=a.createElement("script");l.id=e.id,l.type="text/javascript",l.src=`${o}/${n}-${e.version}.${r}`,l.onload=s,i.appendChild(l)}}))}function a(e,t){return new Promise((n=>{const r=()=>{e[t]?n(e[t]):e.requestAnimationFrame(r)};r()}))}n.d(t,{Dz:function(){return a},Pp:function(){return o},bL:function(){return r}})},70355:function(e,t,n){"use strict";n.d(t,{m:function(){return i}});var r=n(80550),o=n(13419);const a=r.O["Jetpack Green 40"];function i(){return(0,o.Ug)()||(0,o.Wp)()?null:a}},81518:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(29512),o=n.n(r),a=n(92819);function i(e,t){const n=function(e,t){for(const n of new(o())(t).values()){if(-1===n.indexOf("is-style-"))continue;const t=n.substring(9),r=(0,a.find)(e,{name:t});if(r)return r}return(0,a.find)(e,"isDefault")}(e,t);return n?n.name:null}},24381:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});const r=/^#?[A-Fa-f0-9]{6}$/;function o(e){return r.test(e)}},44738:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var r=n(51806),o=n(52175),a=n(55609),i=n(65736),s=n(65235),l=n.n(s),c=n(46867);const __=i.__;function u(e){let{blockName:t,buttonLabel:n,className:i,href:s,icon:u,onClick:p,readMoreUrl:d,subtitle:m,title:h}=e;const{autosaveAndRedirect:f}=(0,c.Z)(s);return(0,r.createElement)(o.Warning,{actions:s&&[(0,r.createElement)(a.Button,{href:s,onClick:e=>{e.preventDefault(),p(t),f(e)},target:"_top",variant:"secondary",className:"jetpack-stripe-nudge__link"},n)],className:l()(i,"jetpack-block-nudge wp-block")},(0,r.createElement)("span",{className:"jetpack-block-nudge__info"},u,(0,r.createElement)("span",{className:"jetpack-block-nudge__text-container"},(0,r.createElement)("span",{className:"jetpack-block-nudge__title"},h),m&&(0,r.createElement)("span",{className:"jetpack-block-nudge__message"},m,d&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)("br",null),(0,r.createElement)(a.ExternalLink,{href:d},__("Learn more about the block and fees","jetpack")))))))}},57538:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var r=n(51806),o=n(52175),a=n(4981),i=n(55609),s=n(9818),l=n(69307),c=n(65736),u=n(39630),p=n(65235),d=n.n(p),m=n(92819);const __=c.__,h=e=>{let{attributes:t,styleOption:n,viewportWidth:i,blockName:s}=e;const l=(0,a.getBlockType)(s);return(0,r.createElement)(o.BlockPreview,{viewportWidth:i,blocks:(c=l.example?(0,a.getBlockFromExample)(s,{attributes:{...l.example.attributes,style:n.value},innerBlocks:l.example.innerBlocks}):(0,a.createBlock)(s,t),{...c,attributes:{...c.attributes,__isBlockPreview:!0}})});var c},f=l.memo?(0,l.memo)(h,((e,t)=>(0,m.isEqual)(e,t))):h;function g(e){let t,{attributes:n,clientId:a,styleOptions:l,onSelectStyle:c,activeStyle:p,viewportWidth:m,title:h}=e;return s.useSelect&&(t=(0,s.useSelect)((e=>{const{getBlock:t}=e("core/block-editor");return t(a)}))),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(i.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:l.map((e=>({title:e.label,isActive:e.value===p,onClick:()=>c({style:e.value})}))),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})),(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(i.PanelBody,{title:h||__("Styles","jetpack")},(0,r.createElement)("div",{className:"block-editor-block-styles jetpack-block-styles-selector"},l.map((e=>{const o={...n,style:e.value};return(0,r.createElement)("div",{key:e.value,className:d()("block-editor-block-styles__item",{"is-active":e.value===p}),onClick:()=>{c({style:e.value})},onKeyDown:t=>{u.ENTER!==t.keyCode&&u.SPACE!==t.keyCode||(t.preventDefault(),c({style:e.value}))},role:"button",tabIndex:"0","aria-label":e.label},(0,r.createElement)("div",{className:"block-editor-block-styles__item-preview"},e.preview?e.preview:s.useSelect&&t&&(0,r.createElement)(f,{blockName:t.name,styleOption:e,attributes:o,viewportWidth:m})),(0,r.createElement)("div",{className:"block-editor-block-styles__item-label"},e.label))}))))))}},20769:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(55609);const s=i.NumberControl||i.__experimentalNumberControl||function(e){return(0,a.createElement)(i.TextControl,o()({type:"number",inputMode:"numeric"},e))};t.Z=s},14436:function(e,t,n){"use strict";n.d(t,{Bn:function(){return r},DM:function(){return o}});const r="payment-plan",o="subscription"},51585:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});var r=n(65736),o=n(14436);const __=r.__,a={"add a new product":{[o.Bn]:__("Add a new payment plan","jetpack"),[o.DM]:__("Add a new subscription","jetpack")},"product not found":{[o.Bn]:__("Payment plan not found","jetpack"),[o.DM]:__("Subscription not found","jetpack")},"select a product":{[o.Bn]:__("Select a payment plan","jetpack"),[o.DM]:__("Select a subscription","jetpack")},"default new product title":{[o.Bn]:__("Monthly Subscription","jetpack"),[o.DM]:__("Monthly Subscription","jetpack")},"manage your products":{[o.Bn]:__("Manage your payment plans.","jetpack"),[o.DM]:__("Manage your subscriptions.","jetpack")},"saving product":{[o.Bn]:__("Saving payment plan…","jetpack"),[o.DM]:__("Saving subscription…","jetpack")},"add product":{[o.Bn]:__("Add payment plan","jetpack"),[o.DM]:__("Add subscription","jetpack")},"product requires a name":{[o.Bn]:__("Payment plan requires a name","jetpack"),[o.DM]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[o.Bn]:__("Payment plan requires a valid price","jetpack"),[o.DM]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[o.Bn]:__("Successfully created payment plan","jetpack"),[o.DM]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[o.Bn]:__("There was an error when adding the payment plan.","jetpack"),[o.DM]:__("There was an error when adding the subscription.","jetpack")},"invalid product configured for this block":{[o.Bn]:__("Invalid payment plan configured for this block.","jetpack"),[o.DM]:__("Invalid subscription configured for this block.","jetpack")},"the button will be hidden from your visitors until you select a valid product":{[o.Bn]:__("The button will be hidden from your visitors until you select a valid payment plan.","jetpack"),[o.DM]:__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")},"mark this product as a donation":{[o.Bn]:__("Mark this payment plan as a donation","jetpack"),[o.DM]:__("Mark this subscription as a donation","jetpack")}};function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Bn;return a?.[e]?.[t]||null}__("Monthly Subscription","jetpack"),__("Yearly Subscription","jetpack"),__("Subscription","jetpack")},16367:function(e,t,n){"use strict";n.d(t,{U:function(){return p}});var r=n(51806),o=n(6895),a=n(13419),i=n(9818),s=n(65736),l=n(89933),c=n(7652),u=n(44738);const __=s.__,p=e=>{let{blockName:t}=e;const n=(0,i.select)(c.h).getConnectUrl(),{tracks:s}=(0,a.z$)(),p=(0,a.Ug)()||(0,a.Wp)();if(!n)return null;let d;switch(t){case"payment-buttons":d=p?(0,o.Z)("wpcom-support-wordpress-editor-blocks-payments-block"):(0,o.Z)("jetpack-support-jetpack-blocks-payments-block");break;case"donations":d=p?(0,o.Z)("wpcom-support-wordpress-editor-blocks-donations-block"):(0,o.Z)("jetpack-support-jetpack-blocks-donations-block");break;case"premium-content":d=p?(0,o.Z)("wpcom-support-wordpress-editor-blocks-premium-content-block"):(0,o.Z)("jetpack-support-jetpack-blocks-premium-content-block");break;default:d=p?(0,o.Z)("wpcom-support-payments-button-block"):(0,o.Z)("jetpack-support-jetpack-blocks-payments-block")}return(0,r.createElement)(u.Z,{className:"jetpack-stripe-nudge__banner",buttonLabel:__("Connect","jetpack"),icon:(0,r.createElement)(l.Z,{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:n,readMoreUrl:d,onClick:()=>s.recordEvent("jetpack_editor_block_stripe_connect_click",{block:t}),title:__("Connect to Stripe to use this block on your site","jetpack"),subtitle:__("This block will be hidden from your visitors until you connect to Stripe.","jetpack")})}},26546:function(e,t,n){"use strict";n.d(t,{p:function(){return l}});var r=n(51806),o=n(55609),a=n(65736),i=n(65235),s=n.n(i);const __=a.__,l=e=>{let{align:t,className:n,title:a,description:i,buttonText:l=null,visible:c=!0,context:u,checkoutUrl:p=null,goToCheckoutPage:d=null,isRedirecting:m=!1,showButton:h=!0}=e;const f=s()(n,"jetpack-upgrade-plan-banner",{"wp-block":"editor-canvas"===u,"block-editor-block-list__block":"editor-canvas"===u,"jetpack-upgrade-plan__hidden":!c}),g=__("Redirecting…","jetpack");return(0,r.createElement)("div",{className:f,"data-align":t},(0,r.createElement)("div",{className:"jetpack-upgrade-plan-banner__wrapper"},a&&(0,r.createElement)("strong",{className:s()("banner-title",{[`${n}__title`]:n})},a),i&&(0,r.createElement)("span",{className:`${n}__description banner-description`},i),h&&(0,r.createElement)(o.Button,{href:m?null:p,onClick:d,target:"_top",className:s()("is-primary",{"jetpack-upgrade-plan__hidden":!p}),isBusy:m},m?g:l)))}},87553:function(e,t,n){"use strict";var r=n(9818);const o={setPlans:e=>({type:"SET_PLANS",plans:e}),fetchFromAPI:e=>({type:"FETCH_FROM_API",url:e})};(0,r.registerStore)("wordpress-com/plans",{reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_PLANS"===t.type?t.plans:e},actions:o,selectors:{getPlan:(e,t)=>e.find((e=>e.product_slug===t))},controls:{FETCH_FROM_API(e){let{url:t}=e;return fetch(t).then((e=>e.json()))}},resolvers:{*getPlan(){const e=yield o.fetchFromAPI("https://public-api.wordpress.com/rest/v1.5/plans");return o.setPlans(e)}}})},79162:function(e,t,n){"use strict";n.d(t,{Vm:function(){return l},ck:function(){return o},hj:function(){return a},li:function(){return i},vs:function(){return s}});var r=n(43317);const o={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5};Object.keys(o).map((e=>{const{symbol:t}=(0,r.X)(e);var n;return{value:e,label:t===e?e:`${e} ${n=t,String(n||"").replace(/\.+$/,"")}`}}));function a(e){return o[e]}function i(e){const t=a(e);return[10*t,30*t,200*t]}function s(e,t){return!isNaN(t)&&t>=a(e)}function l(e,t){if(!e)return null;if("number"==typeof e)return e;let n=e;return r.M[t].grouping&&(n=e.replace(new RegExp("\\"+r.M[t].grouping,"g"),"")),e=parseFloat(n.replace(new RegExp("\\"+r.M[t].decimal,"g"),".")),isNaN(e)?null:e}},94545:function(e,t,n){"use strict";var r=n(51806),o=n(55609);t.Z=e=>{let{label:t,onClick:n}=e;return(0,r.createElement)(o.Button,{className:"components-toolbar__control",label:t,icon:"edit",onClick:n})}},73905:function(e,t){"use strict";const n=new Map,r=e=>n.has(e);t.Z={acquire:e=>{if(r(e))return null;const t=Math.random();return n.set(e,t),[e,t]},blockExecution:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;for(;r(e);)await new Promise((e=>setTimeout(e,t)))},clearAll:()=>n.clear(),isLocked:r,release:e=>{const[t,o]=e;return!(!r(t)||n.get(t)!==o)&&(n.delete(t),!0)}}},20982:function(e,t,n){"use strict";n.d(t,{Bb:function(){return v},CY:function(){return h},Eh:function(){return s},En:function(){return b},OG:function(){return p},QU:function(){return y},Qh:function(){return g},Tu:function(){return u},Wm:function(){return f},h9:function(){return m},iT:function(){return i},l5:function(){return E},oI:function(){return c},tY:function(){return d},wk:function(){return l},yD:function(){return k},zs:function(){return w}});var r=n(69771),o=n(65736),a=n(92819);const __=o.__,i="google_photos",s="openverse",l="pexels",c="recent",u="/",p=[{value:c,label:__("Photos","jetpack")},{value:u,label:__("Albums","jetpack")}],d=[{value:"", | |
| 36 | -/* translators: category of images */ | |
| 37 | -label:__("All categories","jetpack")},{value:"animals", | |
| 38 | -/* translators: category of images */ | |
| 39 | -label:__("Animals","jetpack")},{value:"arts", | |
| 40 | -/* translators: category of images */ | |
| 41 | -label:__("Arts","jetpack")},{value:"birthdays", | |
| 42 | -/* translators: category of images */ | |
| 43 | -label:__("Birthdays","jetpack")},{value:"cityscapes", | |
| 44 | -/* translators: category of images */ | |
| 45 | -label:__("Cityscapes","jetpack")},{value:"crafts", | |
| 46 | -/* translators: category of images */ | |
| 47 | -label:__("Crafts","jetpack")},{value:"fashion", | |
| 48 | -/* translators: category of images */ | |
| 49 | -label:__("Fashion","jetpack")},{value:"food", | |
| 50 | -/* translators: category of images */ | |
| 51 | -label:__("Food","jetpack")},{value:"flowers", | |
| 52 | -/* translators: category of images */ | |
| 53 | -label:__("Flowers","jetpack")},{value:"gardens", | |
| 54 | -/* translators: category of images */ | |
| 55 | -label:__("Gardens","jetpack")},{value:"holidays", | |
| 56 | -/* translators: category of images */ | |
| 57 | -label:__("Holidays","jetpack")},{value:"houses", | |
| 58 | -/* translators: category of images */ | |
| 59 | -label:__("Houses","jetpack")},{value:"landmarks", | |
| 60 | -/* translators: category of images */ | |
| 61 | -label:__("Landmarks","jetpack")},{value:"landscapes", | |
| 62 | -/* translators: category of images */ | |
| 63 | -label:__("Landscapes","jetpack")},{value:"night", | |
| 64 | -/* translators: category of images */ | |
| 65 | -label:__("Night","jetpack")},{value:"people", | |
| 66 | -/* translators: category of images */ | |
| 67 | -label:__("People","jetpack")},{value:"pets", | |
| 68 | -/* translators: category of images */ | |
| 69 | -label:__("Pets","jetpack")},{value:"selfies", | |
| 70 | -/* translators: category of images */ | |
| 71 | -label:__("Selfies","jetpack")},{value:"sport", | |
| 72 | -/* translators: category of images */ | |
| 73 | -label:__("Sport","jetpack")},{value:"travel", | |
| 74 | -/* translators: category of images */ | |
| 75 | -label:__("Travel","jetpack")},{value:"weddings", | |
| 76 | -/* translators: category of images */ | |
| 77 | -label:__("Weddings","jetpack")}],m=["mountain","ocean","river","clouds","pattern","abstract","sky"],h="ANY",f="LAST_7_DAYS",g="LAST_30_DAYS",v="LAST_6_MONTHS",b="LAST_12_MONTHS",k="CUSTOM",y=[{value:h,label:__("Any time","jetpack")},{value:f,label:__("Last 7 days","jetpack")},{value:g,label:__("Last 30 days","jetpack")},{value:v,label:__("Last 6 months","jetpack")},{value:b,label:__("Last 12 months","jetpack")},{value:k,label:__("Specific Month/Year","jetpack")}],w=(new Date).getFullYear(),E=[{label:__("Any Month","jetpack"),value:-1},...(0,a.map)((0,a.range)(0,12),(e=>({label:(0,r.dateI18n)("F",new Date(0,e)),value:e})))]},54414:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(13419),s=n(52175),l=n(92694),c=n(10892),u=n(1285),p=n(38457);if((0,i.Dp)()&&"function"==typeof s.useBlockEditContext){(0,u.HO)(),(0,u.on)();const e=e=>e.unstableFeaturedImageFlow||e.modalClass&&e.modalClass.indexOf("featured-image")>-1,t=(e,t)=>["core/cover","core/image","core/gallery","core/media-text","jetpack/image-compare","jetpack/slideshow","jetpack/story","jetpack/tiled-gallery","videopress/video"].indexOf(e)>-1&&-1===t.toString().indexOf("coblocks");(0,l.addFilter)("editor.MediaUpload","external-media/replace-media-upload",(n=>r=>{const{name:i}=(0,s.useBlockEditContext)();let{render:l}=r;if(t(i,l)||e(r)){const{allowedTypes:e,gallery:t=!1,value:n=[]}=r;e.indexOf("image")>-1&&!(t&&n.length>0)&&(l=e=>(0,a.createElement)(c.Z,o()({},e,{mediaProps:r})))}return(0,a.createElement)(n,o()({},r,{render:l}))}),100),(0,l.addFilter)("blocks.registerBlockType","external-media/individual-blocks",(function(e,t){return"core/image"!==t?e:{...e,keywords:[...e.keywords,...p.Dv.map((e=>e.keyword))]}}))}},11583:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(39630),l=n(65235),c=n.n(l),u=n(92819),p=n(46406),d=n(9827);const __=i.__,m=(0,a.memo)((()=>(0,r.createElement)("div",{className:"jetpack-external-media-browser__empty"},(0,r.createElement)("p",null,__("Sorry, but nothing matched your search criteria.","jetpack")))));t.Z=function(e){const{media:t,isCopying:n,isLoading:i,pageHandle:l,className:h,multiple:f,setPath:g,nextPage:v,onCopy:b}=e,[k,y]=(0,a.useState)([]),[w,E]=(0,a.useState)(-1),_=(0,a.useRef)(-1),C=(0,a.useRef)(null),S=(0,a.useCallback)((e=>{let t=[e];"folder"===e.type?g(e.ID):f?(t=k.slice(0,9).concat(e),k.find((t=>e.ID===t.ID))&&(t=k.filter((t=>t.ID!==e.ID)))):1===k.length&&e.ID===k[0].ID&&(t=[]),y(t)}),[k,f,g]),x=(0,a.useCallback)((()=>{b(k)}),[k,b]),j=t.filter((e=>"folder"!==e.type)).length>0,L=c()({"jetpack-external-media-browser__media":!0,"jetpack-external-media-browser__media__loading":i}),P=c()({"jetpack-external-media-browser":!0,[h]:!0}),A=()=>{let e=1;const t=C.current.children;if(t.length>0){const n=t[0].offsetTop;for(;e<t.length&&t[e].offsetTop===n;)++e}_.current=e},T=(0,u.debounce)(A,400);(0,a.useEffect)((()=>(window.addEventListener("resize",T),()=>{window.removeEventListener("resize",T)})),[]),(0,a.useEffect)((()=>{t.length&&-1===_.current&&A()}),[t]);const N=(e,t)=>{let{item:n}=t;S(n)},M=(e,n)=>{let{item:r,index:o}=n;[s.LEFT,s.RIGHT,s.UP,s.DOWN].includes(e.keyCode)?((e,n)=>{switch(e){case s.LEFT:n>=1&&E(n-1);break;case s.RIGHT:n<t.length&&E(n+1);break;case s.UP:n>=_.current&&E(n-_.current);break;case s.DOWN:n<t.length-_.current&&E(n+_.current)}})(e.keyCode,o):s.SPACE===e.keyCode?(S(r),e.preventDefault()):s.ENTER===e.keyCode&&S(r),[s.LEFT,s.RIGHT,s.UP,s.DOWN,s.SPACE,s.ENTER].includes(e.keyCode)&&e.stopPropagation()};return(0,r.createElement)("div",{className:P},(0,r.createElement)("ul",{ref:C,className:L},t.map(((e,t)=>(0,r.createElement)(p.Z,{item:e,index:t,key:e.ID,onClick:N,onKeyDown:M,focus:t===w,isSelected:k.find((t=>t.ID===e.ID)),isCopying:n}))),0===t.length&&!i&&(0,r.createElement)(m,null),i&&(0,r.createElement)(d.Z,null),l&&!i&&(0,r.createElement)(o.Button,{variant:"secondary",className:"jetpack-external-media-browser__loadmore",disabled:i||n,onClick:()=>{t.length&&E(t.length),v()}},__("Load More","jetpack"))),j&&(0,r.createElement)((()=>{const e=0===k.length||n,t=n?__("Inserting…","jetpack"):__("Select","jetpack",0);return(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__toolbar"},(0,r.createElement)(o.Button,{variant:"primary",isBusy:n,disabled:e,onClick:x},t))}),null))}},46406:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(65235),l=n.n(s);const __=i.__;t.Z=function(e){const{item:t,focus:n,isSelected:i,isCopying:s=!1}=e,{thumbnails:c,caption:u,name:p,title:d,type:m,children:h=0}=t,{medium:f=null,fmt_hd:g=null,thumbnail:v=null}=c,b=d||u||p,k=l()({"jetpack-external-media-browser__media__item":!0,"jetpack-external-media-browser__media__item__selected":i,"jetpack-external-media-browser__media__folder":"folder"===m,"is-transient":s}),y=(0,a.useRef)(null);return(0,a.useEffect)((()=>{n&&y.current.focus()}),[n]),(0,r.createElement)("li",{ref:y,className:k,onClick:s?void 0:t=>{const{item:n,index:r}=e;e.onClick&&e.onClick(t,{item:n,index:r})},onKeyDown:s?void 0:t=>{const{item:n,index:r}=e;e.onKeyDown&&e.onKeyDown(t,{item:n,index:r})},role:"checkbox",tabIndex:"0","aria-checked":!!i,"aria-disabled":!!s},i&&s&&(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator"},(0,r.createElement)(o.Spinner,null),(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__copying_indicator__label"},__("Inserting Image…","jetpack"))),(0,r.createElement)("img",{src:f||g||v,alt:b}),"folder"===m&&(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__info"},(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__name"},p),(0,r.createElement)("div",{className:"jetpack-external-media-browser__media__count"},h)))}},9827:function(e,t,n){"use strict";var r=n(51806),o=n(69307);t.Z=(0,o.memo)((function(){const e="jetpack-external-media-browser__media__item jetpack-external-media-browser__media__placeholder";return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:e}),(0,r.createElement)("div",{className:e}),(0,r.createElement)("div",{className:e}))}))},10892:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(69307),s=n(38457),l=n(95833);const c=e=>e.unstableFeaturedImageFlow||e.modalClass&&-1!==e.modalClass.indexOf("featured-image"),u=e=>void 0===e.multiple&&!c(e);t.Z=function(e){const{mediaProps:t}=e,[n,r]=(0,i.useState)(null),p=(0,s.ZR)(n);return(0,a.createElement)("div",{onClick:e=>e.stopPropagation()},(0,a.createElement)(l.Z,o()({},e,{setSelectedSource:r,isReplace:u(t),isFeatured:c(t),hasImage:t.value>0})),p&&(0,a.createElement)(p,o()({},t,{onClose:e=>{e&&(e.stopPropagation(),e.target.closest(".jetpack-external-media-header__dropdown"))||(r(null),t.onClose?.())}})))}},95833:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(65736),i=n(61074),s=n(20843),l=n(13959);const __=a.__;t.Z=function(e){const{mediaProps:t,open:n,setSelectedSource:a,isFeatured:c,isReplace:u,hasImage:p}=e,d=t.render;let m="tertiary";if(u)return(0,r.createElement)(l.Z,{originalButton:d,open:n,setSource:a});let h=__("Select Image","jetpack");return t.multiple&&(h=__("Select Images","jetpack")),t.allowedTypes.length>1&&(h=__("Select Media","jetpack")),c&&(h=__("Replace Image","jetpack"),m="secondary"),(0,r.createElement)(r.Fragment,null,(0,r.createElement)(o.Dropdown,{placement:"bottom-start",className:"jetpack-external-media-button-menu__dropdown",contentClassName:"jetpack-external-media-button-menu__options",renderToggle:e=>{let{isOpen:t,onToggle:n}=e;const a=d&&d({open:n});return c&&p||a&&"string"!=typeof a.props.children?a:(0,r.createElement)(o.Button,{variant:m,className:"jetpack-external-media-button-menu","aria-haspopup":"true","aria-expanded":t,onClick:n},(0,r.createElement)("div",{className:"jetpack-external-media-button-menu__label"},h),(0,r.createElement)(i.Z,{icon:s.Z}))},renderContent:e=>{let{onClose:t}=e;return(0,r.createElement)(o.NavigableMenu,{"aria-label":h},(0,r.createElement)(o.MenuGroup,null,(0,r.createElement)(o.MenuItem,{icon:s.Z,onClick:()=>{t(),n()}},__("Media Library","jetpack")),(0,r.createElement)(l.Z,{open:n,setSource:a,onClick:t})))}}))}},13959:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(38457);t.Z=function(e){let{originalButton:t=null,onClick:n=(()=>{}),open:s,setSource:l}=e;return(0,r.createElement)(a.Fragment,null,t&&t({open:s}),i.Dv.map((e=>{let{icon:t,id:a,label:i}=e;return(0,r.createElement)(o.MenuItem,{icon:t,key:a,onClick:()=>{n(),l(a)}},i)})))}},1285:function(e,t,n){"use strict";n.d(t,{HO:function(){return L},on:function(){return j},uk:function(){return P}});var r=n(6975),o=n(86989),a=n.n(o),i=n(9818),s=n(65736),l=n(96483),c=n(67194),u=n(94841),p=n(29755);const __=s.__,d=__("Pexels Free Photos","jetpack"),m=__("Search Pexels Free Photos","jetpack"),h={per_page:10,search:"mountain"},f=__("Google Photos","jetpack"),g=__("Search Google Photos","jetpack"),v={per_page:25,search:""};var b=function(e){return e.List="/wpcom/v2/external-media/list/",e}(b||{}),k=function(e){return e.Image="image",e.Video="video",e}(k||{});const y=(e,t)=>(0,l.addQueryArgs)(`${b.List}${e}`,{...t.search&&{search:t.search},number:t.per_page||25,path:"recent"}),w=e=>({caption:e?.caption??"",previewUrl:e.thumbnails.thumbnail,title:e?.title??e?.name??e.file,url:e.URL}),E=(e,t,n,o,i)=>({name:e,labels:{name:t,search_items:n},mediaType:"image",fetch:async e=>await a()({path:y(o,{per_page:i.per_page,search:""===e?.search?i.search:e.search}),method:"GET"}).then((t=>{const n=t.media.filter((e=>e.type===k.Image)).map(w);return r.Z.tracks.recordEvent("jetpack_editor_media_inserter_external_source",{mediaSource:o.toString(),results:n.length,search:""===e?.search?i.search:e.search}),n})).catch((()=>[])),getReportUrl:null,isExternalResource:!0}),_=()=>E("google_photos",f,g,p.Y.GooglePhotos,v),C=()=>(0,i.select)("core/edit-post")?.isInserterOpened()||(0,i.select)("core/edit-site")?.isInserterOpened()||(0,i.select)("core/edit-widgets")?.isInserterOpened?.(),S=e=>(0,i.dispatch)("core/block-editor")?.registerInserterMediaCategory?.(e()),x=()=>E("pexels",d,m,p.Y.Pexels,h),j=async()=>{(0,c.X)(C).then((async()=>{await(async e=>a()({path:y(e,h),method:"GET"}).then((e=>e)).catch((()=>!1)))(p.Y.GooglePhotos)?S(_):(0,c.X)((()=>{return e=p.Y.GooglePhotos,!!(0,i.select)(u.j).isAuthenticated(e);var e})).then((()=>S(_)))}))},L=()=>{(0,c.X)(C).then((()=>S(x)))},P=(e,t)=>{(0,i.dispatch)(u.j).setAuthenticated(e,t)}},29755:function(e,t,n){"use strict";n.d(t,{Y:function(){return r}});let r=function(e){return e.Pexels="pexels",e.GooglePhotos="google_photos",e.Openverse="openverse",e.Unknown="unknown",e}({})},47285:function(e,t,n){"use strict";n.d(t,{k:function(){return i}});var r=n(13419),o=n(96483);const a={list:"/wpcom/v2/external-media/list/",copy:(0,r.Wp)()?"/rest/v1.1/external-media-upload?service=":"/wpcom/v2/external-media/copy/",connection:"/wpcom/v2/external-media/connection/"};function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return a[e]?(0,o.addQueryArgs)(a[e]+t,n):null}},53463:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736),i=n(81427);const __=a.__;t.Z=(0,o.memo)((function(){return(0,r.createElement)(o.Fragment,null,(0,r.createElement)(i.JO,null),(0,r.createElement)("p",null,__("To get started, connect your site to your Google Photos library.","jetpack")),(0,r.createElement)("p",null,__("You can remove the connection in either of these places:","jetpack")),(0,r.createElement)("ul",null,(0,r.createElement)("li",null,(0,r.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://myaccount.google.com/security"},__("Google Security page","jetpack"))),(0,r.createElement)("li",null,(0,r.createElement)("a",{target:"_blank",rel:"noopener noreferrer",href:"https://wordpress.com/marketing/connections/"},__("WordPress.com Connections","jetpack")))))}))},5890:function(e,t,n){"use strict";var r=n(51806),o=n(69307),a=n(65736);const __=a.__;t.Z=(0,o.memo)((function(){return(0,r.createElement)("p",null,__("Awaiting authorization","jetpack"))}))},86167:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(20982);const __=i.__;t.Z=(0,a.memo)((function(e){let{path:t,setPath:n}=e;return(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.Button,{variant:"tertiary",onClick:()=>n(s.Tu)},__("Albums","jetpack")),"→ ",t.name)}))},4819:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(92819),l=n(20769),c=n(20982);const __=i.__;function u(e){let{value:t,updateFilter:n}=e;return(0,r.createElement)(o.SelectControl,{label:__("Category","jetpack"),value:t,options:c.tY,onChange:n})}function p(e){let{value:t,updateFilter:n}=e;const i=t?.range||c.CY,[s,u]=(0,a.useState)(-1),[p,d]=(0,a.useState)(c.zs);return(0,r.createElement)("div",{className:"jetpack-external-media-date-filter"},(0,r.createElement)(o.SelectControl,{label:__("Filter by time period","jetpack"),value:i,options:c.QU,onChange:e=>n({range:e})}),i===c.yD&&(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.SelectControl,{label:__("Month","jetpack"),value:s,options:c.l5,onChange:u}),(0,r.createElement)(l.Z,{className:"components-base-control",label:__("Year","jetpack"),value:p,min:1970,onChange:d}),(0,r.createElement)(o.Button,{variant:"secondary",disabled:t?.month===s&&t?.year===p,onClick:()=>{n({range:i,month:s,year:p})}},__("Apply","jetpack"))))}function d(){return(0,r.createElement)("span",null,__("Favorites","jetpack"))}function m(e){let{value:t,updateFilter:n}=e;const a=[{label:__("All","jetpack"),value:""},{label:__("Images","jetpack"),value:"photo"},{label:__("Videos","jetpack"),value:"video"}];return(0,r.createElement)(o.SelectControl,{label:__("Type","jetpack"),value:t,options:a,onChange:n})}function h(e){let{children:t,removeFilter:n,isRemovable:a=!1}=e;return(0,r.createElement)("div",{className:"jetpack-external-media-googlephotos-filter"},t,!!a&&(0,r.createElement)(o.Button,{onClick:n,isSmall:!0},__("Remove Filter","jetpack")))}t.Z=function(e){let{filters:t,setFilters:n,canChangeMedia:o}=e;const a=Object.keys(t).filter((e=>o||"mediaType"!==e)).map((e=>{return(0,r.createElement)(h,{key:e,removeFilter:()=>n((0,s.omit)(t,e))},(o=e,a=t[e],i=r=>n(function(e,t,n){const r={...e,[t]:n};return"mediaType"===t&&"video"===n?delete r.category:"category"===t&&"video"===r.mediaType&&delete r.mediaType,r}(t,e,r)),"category"===o?(0,r.createElement)(u,{value:a,updateFilter:i}):"date"===o?(0,r.createElement)(p,{value:a,updateFilter:i}):"favorite"===o?(0,r.createElement)(d,{value:a}):"mediaType"===o?(0,r.createElement)(m,{value:a,updateFilter:i}):null));var o,a,i}));return 0===a.length?null:a}},58912:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(76292),o=n.n(r),a=n(20982);const i=o()();function s(e){const{mediaType:t,category:n,favorite:r,date:s}=e,l=[];if(t&&l.push("mediaType="+t),n&&"video"!==t&&l.push("categoryInclude="+n),void 0!==r&&l.push("feature=favorite"),s){let e=null,t=null;switch(s.range){case a.Wm:e=o()(i).subtract(7,"days"),t=i;break;case a.Qh:e=o()(i).subtract(30,"days"),t=i;break;case a.Bb:e=o()(i).subtract(6,"months"),t=i;break;case a.En:e=o()(i).subtract(1,"year"),t=i;break;case a.yD:const n=parseInt(s.month),r=parseInt(s.year);isNaN(n)||isNaN(r)||(-1===n?(e=o()([r,0]),t=o()(e).endOf("year")):(e=o()([r,n]),t=o()(e).endOf("month")))}const n=e?e.format("YYYY-MM-DD"):"0000-00-00",r=t?t.format("YYYY-MM-DD"):"0000-00-00";l.push(`dateRange=${n}:${r}`)}return l.length>0?l:null}},53800:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736);const __=i.__,s=[{label:__("Category","jetpack"),value:"category"},{label:__("Date","jetpack"),value:"date"},{label:__("Favorites","jetpack"),value:"favorite"},{label:__("Media Type","jetpack"),value:"mediaType"}];function l(e){return s.filter((t=>void 0===e[t.value]))}function c(e){const t=l(e);return t.length>0?t[0].value:""}t.Z=function(e){const[t,n]=(0,a.useState)(c([])),{isLoading:i,isCopying:s,filters:u,canChangeMedia:p}=e,d=function(e,t){return t?e:e.filter((e=>"mediaType"!==e.value))}(l(u),p);return 0===d.length?null:(0,r.createElement)(a.Fragment,null,(0,r.createElement)(o.SelectControl,{label:__("Filters","jetpack"),value:t,disabled:i||s,options:d,onChange:n}),(0,r.createElement)(o.Button,{disabled:i||s,variant:"secondary",isSmall:!0,onClick:()=>{const r=(o=u,a=t,{...o,[a]:"favorite"===a||""});var o,a;e.setFilters(r),n(c(r))}},__("Add Filter","jetpack")))}},64034:function(e,t,n){"use strict";var r=n(51806),o=n(2772);t.Z=e=>{let{account:t,setAuthenticated:n}=e;const{image:a,name:i}=t||{};return(0,r.createElement)("div",{className:"jetpack-external-media-header__account"},(0,r.createElement)("div",{className:"jetpack-external-media-header__account-info"},a&&(0,r.createElement)("img",{className:"jetpack-external-media-header__account-image",src:a,alt:"",height:"18",width:"18"}),i&&(0,r.createElement)("div",{className:"jetpack-external-media-header__account-name"},i)),(0,r.createElement)(o.Z,{setAuthenticated:n}))}},62494:function(e,t,n){"use strict";var r=n(51806),o=n(39229),a=n(86989),i=n.n(a),s=n(55609),l=n(69307),c=n(65736),u=n(20982),p=n(47285),d=n(53463),m=n(5890);const __=c.__;t.Z=function(e){const{setAuthenticated:t}=e,[n,a]=(0,l.useState)(!1),c=(0,l.useCallback)((()=>{a(!0),i()({path:(0,p.k)("connection",u.iT)}).then((e=>{if(e.error)throw e.message;(0,o.Z)(e.connect_URL,(()=>{a(!1),t(!0)}))})).catch((()=>{a(!1)}))}),[t]);return(0,r.createElement)("div",{className:"jetpack-external-media-auth"},n?(0,r.createElement)(m.Z,null):(0,r.createElement)(d.Z,null),(0,r.createElement)(s.Button,{variant:"primary",disabled:n,onClick:c},__("Connect to Google Photos","jetpack")))}},2772:function(e,t,n){"use strict";var r=n(51806),o=n(86989),a=n.n(o),i=n(55609),s=n(69307),l=n(65736),c=n(20982),u=n(47285);const __=l.__;t.Z=e=>{let{setAuthenticated:t}=e;const[n,o]=(0,s.useState)(!1),l=(0,s.useCallback)((()=>{o(!0),a()({method:"DELETE",path:(0,u.k)("connection",c.iT)}).then((()=>t(!1))).catch((()=>o(!1)))}),[t]);return(0,r.createElement)(i.Button,{variant:"secondary",className:"jetpack-external-media-browser__disconnect",onClick:l,disabled:n,isBusy:n},__("Disconnect from Google Photos","jetpack"))}},20107:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(20982),l=n(11583),c=n(47285),u=n(86167),p=n(4819),d=n(58912),m=n(53800),h=n(64034);const __=i.__;t.Z=function(e){const{account:t,allowedTypes:n,copyMedia:i,getMedia:f,isCopying:g,isLoading:v,media:b,multiple:k,onChangePath:y,pageHandle:w,path:E,setAuthenticated:_,showAdditionalFilters:C=!1}=e,S=(x=n)&&1===x.length&&"image"===x[0];var x;const[j,L]=(0,a.useState)(S?{mediaType:"photo",date:{range:s.CY}}:{date:{range:s.CY}}),P=(0,a.useRef)(""),A=(0,a.useRef)(""),T=E.ID===s.oI?(0,d.Z)(j):null,N={number:20,path:E.ID};T&&(N.filter=T);const M=(0,c.k)("list",s.iT,N),I=(0,a.useCallback)((function(e){f(M,arguments.length>1&&void 0!==arguments[1]&&arguments[1])}),[f,M]),R=(0,a.useCallback)((e=>{const t=b.find((t=>t.ID===e));A.current=E,y(t||{ID:e})}),[b,y,A,E]),D=(0,a.useCallback)((e=>{i(e,(0,c.k)("copy",s.iT),s.iT)}),[i]);return(0,a.useEffect)((()=>{P!==M&&(P.current=M,I({},E!==A.current))}),[P,M,I,E]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__google"},(0,r.createElement)("div",{className:"jetpack-external-media-header__view"},(0,r.createElement)(o.SelectControl,{className:"jetpack-external-media-header__select",label:__("View","jetpack"),value:E.ID!==s.oI?s.Tu:s.oI,disabled:v||g,options:s.OG,onChange:R}),C&&E.ID===s.oI&&(0,r.createElement)(m.Z,{filters:j,isLoading:v,setFilters:L,canChangeMedia:!S}),(0,r.createElement)("div",{className:"jetpack-external-media-header__filter"},E.ID===s.oI&&(0,r.createElement)(p.Z,{filters:j,isLoading:v,setFilters:L,canChangeMedia:!S}),E.ID!==s.oI&&E.ID!==s.Tu&&(0,r.createElement)(u.Z,{path:E,setPath:R})),(!v||b.length>0)&&(0,r.createElement)(h.Z,{account:t,setAuthenticated:_})),(0,r.createElement)(l.Z,{className:"jetpack-external-media-browser__google",key:M,media:b,isCopying:g,isLoading:v,nextPage:I,onCopy:D,pageHandle:w,multiple:k,setPath:R}))}},77453:function(e,t,n){"use strict";var r=n(51806),o=n(29755),a=n(97893),i=n(62494),s=n(20107);t.Z=(0,a.Z)(o.Y.GooglePhotos)((function(e){return e.isAuthenticated?(0,r.createElement)(s.Z,e):(0,r.createElement)(i.Z,e)}))},38457:function(e,t,n){"use strict";n.d(t,{Dv:function(){return u},ZR:function(){return p}});var r=n(51806),o=n(65736),a=n(81427),i=n(20982),s=n(77453),l=n(41214),c=n(12533);const __=o.__,u=[{id:i.iT,label:__("Google Photos","jetpack"),icon:(0,r.createElement)(a.He,{className:"components-menu-items__item-icon"}),keyword:"google photos"},{id:i.wk,label:__("Pexels Free Photos","jetpack"),icon:(0,r.createElement)(a.yk,{className:"components-menu-items__item-icon"}),keyword:"pexels"},{id:i.Eh,label:__("Openverse","jetpack"),icon:(0,r.createElement)(a.FG,{className:"components-menu-items__item-icon"}),keyword:"openverse"}];function p(e){return e===i.wk?c.Z:e===i.iT?s.Z:e===i.Eh?l.Z:null}},41214:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(92819),l=n(20982),c=n(11583),u=n(29755),p=n(47285),d=n(97893);const __=i.__;t.Z=(0,d.Z)(u.Y.Openverse)((function(e){const{media:t,isCopying:n,isLoading:i,pageHandle:u,multiple:d,copyMedia:m,getMedia:h}=e,[f,g]=(0,a.useState)((0,s.sample)(l.h9)),[v,b]=(0,a.useState)(""),k=(0,a.useCallback)((e=>{m(e,(0,p.k)("copy",l.Eh),l.Eh)}),[m]),y=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f&&h((0,p.k)("list",l.Eh,{number:20,search:f}),t)}),[h,f]),w=(0,a.useRef)(),E=(0,a.useCallback)((e=>{e.preventDefault(),b(f),y(e,!0),w.current=f}),[y,f]);(0,a.useEffect)(y,[]);const _=(0,a.useRef)(null);return(0,a.useEffect)((()=>{if(!_?.current)return;const e=_.current.querySelector("input[type='search']");e&&(e.focus(),e.select())}),[]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__openverse"},(0,r.createElement)("form",{ref:_,className:"jetpack-external-media-header__openverse",onSubmit:E},(0,r.createElement)(o.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:f,onChange:g,disabled:!!n}),(0,r.createElement)(o.Button,{isPrimary:!0,onClick:E,type:"submit",disabled:!f.length||f===w.current||n},__("Search","jetpack"))),(0,r.createElement)(c.Z,{key:v,className:"jetpack-external-media-browser__openverse",media:t,isCopying:n,isLoading:i,nextPage:y,onCopy:k,pageHandle:u,multiple:d}))}))},12533:function(e,t,n){"use strict";var r=n(51806),o=n(55609),a=n(69307),i=n(65736),s=n(92819),l=n(20982),c=n(11583),u=n(29755),p=n(47285),d=n(97893);const __=i.__;t.Z=(0,d.Z)(u.Y.Pexels)((function(e){const{media:t,isCopying:n,isLoading:i,pageHandle:u,multiple:d,copyMedia:m,getMedia:h}=e,[f,g]=(0,a.useState)((0,s.sample)(l.h9)),[v,b]=(0,a.useState)(""),k=(0,a.useCallback)((e=>{m(e,(0,p.k)("copy",l.wk),l.wk)}),[m]),y=(0,a.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];f&&h((0,p.k)("list",l.wk,{number:20,path:"recent",search:f}),t)}),[h,f]),w=(0,a.useRef)(),E=(0,a.useCallback)((e=>{e.preventDefault(),b(f),y(e,!0),w.current=f}),[y,f]);(0,a.useEffect)(y,[]);const _=(0,a.useRef)(null);return(0,a.useEffect)((()=>{if(!_.current)return;const e=Array.from(_.current.elements).find((e=>"search"===e.type));e&&(e.focus(),e.select())}),[]),(0,r.createElement)("div",{className:"jetpack-external-media-wrapper__pexels"},(0,r.createElement)("form",{ref:_,className:"jetpack-external-media-header__pexels",onSubmit:E},(0,r.createElement)(o.TextControl,{"aria-label":__("Search","jetpack"),type:"search",value:f,onChange:g,disabled:!!n}),(0,r.createElement)(o.Button,{variant:"primary",onClick:E,type:"submit",disabled:!f.length||f===w.current||n},__("Search","jetpack"))),(0,r.createElement)(c.Z,{key:v,className:"jetpack-external-media-browser__pexels",media:t,isCopying:n,isLoading:i,nextPage:y,onCopy:k,pageHandle:u,multiple:d}))}))},97893:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(51806),o=n(86989),a=n.n(o),i=n(55609),s=n(94333),l=n(9818),c=n(69307),u=n(65736),p=n(39630),d=n(65235),m=n.n(d),h=n(92819),f=n(20982),g=n(1285),v=n(29755);const __=u.__;function b(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v.Y.Unknown;return(0,s.createHigherOrderComponent)((t=>{class n extends c.Component{constructor(e){super(e),this.defaultAccount={image:"",name:""},this.state={account:this.defaultAccount,media:[],nextHandle:!1,isLoading:!1,isCopying:null,isAuthenticated:!0,path:{ID:f.oI}}}contentRef=e=>{e?(this.contentElement=e,this.modalElement=e.closest(".jetpack-external-media-browser"),this.modalElement&&this.modalElement.addEventListener("keydown",this.stopArrowKeysPropagation)):this.modalElement&&(this.modalElement.removeEventListener("keydown",this.stopArrowKeysPropagation),this.modalElement=null,this.contentElement=null)};stopArrowKeysPropagation=e=>{[p.UP,p.DOWN,p.LEFT,p.RIGHT].includes(e.keyCode)&&!e.target.classList.contains("jetpack-external-media-browser__media__item")&&e.stopPropagation()};setAuthenticated=t=>{this.setState({isAuthenticated:t}),(0,g.uk)(e,t)};mergeMedia(e,t){return(0,h.uniqBy)(e.concat(t),"ID")}getRequestUrl(e){const{nextHandle:t}=this.state;return t?e+"&page_handle="+encodeURIComponent(t):e}getMedia=(()=>{var e=this;return function(t){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.state.isLoading||(n&&e.props.noticeOperations.removeAllNotices(),e.setState({account:n?e.defaultAccount:e.state.account,isLoading:!0,media:n?[]:e.state.media,nextHandle:!n&&e.state.nextHandle},(()=>e.getMediaRequest(t))))}})();handleApiError=e=>{if("authorization_required"===e.code)return this.setAuthenticated(!1),void this.setState({isLoading:!1,isCopying:!1});e.errors?.length&&(e={code:e.errors[0].error,message:e.errors[0].message});const{noticeOperations:t}=this.props;t.createErrorNotice("internal_server_error"===e.code?"Internal server error":e.message),this.setState({isLoading:!1,isCopying:!1})};getMediaRequest=e=>{const{nextHandle:t,media:n}=this.state;if(!1===t&&n.length>0)return void this.setState({isLoading:!1});const r=this.getRequestUrl(e);a()({path:r,method:"GET",parse:void 0===window.wpcomFetch}).then((e=>{this.setState({account:e.meta.account,media:this.mergeMedia(n,e.media),nextHandle:e.meta.next_page,isLoading:!1}),this.setAuthenticated(!0)})).catch(this.handleApiError)};copyMedia=(e,t,n)=>{this.setState({isCopying:e}),this.props.noticeOperations.removeAllNotices(),this.modalElement&&this.modalElement.focus(),a()({path:t,method:"POST",data:{external_ids:e.map((e=>e.guid)),media:e.map((e=>({guid:e.guid,caption:e.caption,title:e.title}))),service:n,post_id:this.props.postId??0}}).then((e=>{e.media&&(e=e.media.map((e=>({alt:e.alt,caption:e.caption,id:e.ID,type:"image",url:e.URL}))));const{value:t,addToGallery:n,multiple:r}=this.props,o=r?e:e[0],a=e.find((e=>e.errors));if(a){const{errors:e}=a,t=Object.keys(e)[0];this.handleApiError({code:t,message:e[t]})}else this.props.onClose(),this.props.onSelect(n?t.concat(e):o)})).catch(this.handleApiError)};onChangePath=(e,t)=>{this.setState({path:e},t)};render(){const{account:e,isAuthenticated:n,isCopying:o,isLoading:a,media:s,nextHandle:l,path:c}=this.state,{allowedTypes:u,multiple:p=!1,noticeUI:d,onClose:h}=this.props,f=o?__("Inserting media","jetpack"):__("Select media","jetpack",0),g=o?__("When the media is finished copying and inserting, you will be returned to the editor.","jetpack"):__("Select the media you would like to insert into the editor.","jetpack",0),v="jetpack-external-media-browser__description",b=m()({"jetpack-external-media-browser":!0,"jetpack-external-media-browser--is-copying":o});return(0,r.createElement)(i.Modal,{onRequestClose:h,title:f,aria:{describedby:v},className:b},(0,r.createElement)("div",{ref:this.contentRef},d,(0,r.createElement)("p",{id:v,className:"jetpack-external-media-browser--visually-hidden"},g),(0,r.createElement)(t,{account:e,getMedia:this.getMedia,copyMedia:this.copyMedia,isCopying:o,isLoading:a,media:s,pageHandle:l,allowedTypes:u,isAuthenticated:n,setAuthenticated:this.setAuthenticated,multiple:p,path:c,onChangePath:this.onChangePath})))}}return(0,l.withSelect)((e=>({postId:e("core/editor").getCurrentPostId()})))((0,i.withNotices)(n))}))}},42232:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});const r="SET_AUTHENTICATED";t.Z={setAuthenticated:(e,t)=>({type:r,payload:{isAuthenticated:t,mediaSource:e}})}},94841:function(e,t,n){"use strict";n.d(t,{j:function(){return s}});var r=n(9818),o=n(42232),a=n(57805),i=n(38972);const s="jetpack-media",l={actions:o.Z,reducer:a.Z,selectors:i.Z},c=(0,r.createReduxStore)(s,l);(0,r.register)(c)},57805:function(e,t,n){"use strict";var r=n(42232),o=n(2790);t.Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.F,t=arguments.length>1?arguments[1]:void 0;return t.type===r.A?{...e,mediaSourceIsAuthenticated:e.mediaSourceIsAuthenticated.set(t.payload.mediaSource,t.payload.isAuthenticated)}:e}},38972:function(e,t){"use strict";t.Z={isAuthenticated:(e,t)=>e.mediaSourceIsAuthenticated.get(t)??!1}},2790:function(e,t,n){"use strict";n.d(t,{F:function(){return o}});var r=n(29755);const o={mediaSourceIsAuthenticated:new Map([[r.Y.Pexels,!1],[r.Y.GooglePhotos,!1],[r.Y.Openverse,!1],[r.Y.Unknown,!1]])}},11317:function(e,t,n){"use strict";n.d(t,{Qu:function(){return i}});var r=n(13419),o=n(92819);function a(){return(0,o.get)((0,r.Pb)(),["allowedMimeTypes"],[])}function i(e,t){if(!e||!t)return!1;if(!a())return!1;const n=(r=t)?(0,o.pickBy)(a(),(e=>(0,o.startsWith)(e,`${r}/`))):{};var r;const i=(s=n)?(0,o.flatten)((0,o.map)((0,o.keys)(s),(e=>e.split("|")))):[];var s;if("string"==typeof e){const t=e.split(".").pop();return t&&i.includes(t)}return"object"==typeof e&&(e.type&&(0,o.values)(n).includes(e.type))}},5820:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4981);function o(){const e=(0,r.getCategories)();for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];for(const t of n)if(e.some((e=>{let{slug:n}=e;return n===t})))return t;throw new Error(`Could not find a category from the provided list: ${n.join(",")}`)}},74251:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(96483);function o(e,t){if(!(0,r.isURL)(t))return null;let n=t;try{const o=(0,r.getQueryArg)(t,"state"),a=JSON.parse(atob(o));if(e)a.from_editor_post_id=e;else{const e=new URLSearchParams(window.location.search);a.from_site_editor_post_id=e.get("postId"),a.from_site_editor_post_type=e.get("postType")}n=(0,r.addQueryArgs)(t,{state:btoa(JSON.stringify(a))})}catch(e){0}return n}},4554:function(e,t,n){"use strict";n.d(t,{S:function(){return o}});var r=n(92819);const o=(e,t)=>(0,r.reduce)(t,((t,n,r)=>{if(void 0===e[r])return t;const{type:o,validator:a,validValues:i,default:s}=e[r];return t[r]="boolean"===o?"false"!==n&&!!n:a?a(n)?n:s:i?i.includes(n)?n:s:n,t}),{})},59809:function(e,t,n){"use strict";var r=n(82674),o=n.n(r),a=n(51806),i=n(65235),s=n.n(i),l=n(73139);t.Z=e=>{let{children:t=null,isError:n=!1,...r}=e;const i=s()("help-message",{"help-message-is-error":n});return t&&(0,a.createElement)("div",o()({className:i},r),n&&(0,a.createElement)(l.Z,{size:"24","aria-hidden":"true",role:"img",focusable:"false"}),(0,a.createElement)("span",null,t))}},81427:function(e,t,n){"use strict";n.d(t,{Ae:function(){return b},FG:function(){return m},He:function(){return d},IM:function(){return g},JO:function(){return f},Vq:function(){return E},h:function(){return k},ll:function(){return y},o1:function(){return w},yk:function(){return h},yu:function(){return _},zf:function(){return v}});var r=n(82674),o=n.n(r),a=n(51806),i=n(80550),s=n(55609),l=n(65235),c=n.n(l),u=n(70355);const p=i.O["Jetpack Green 40"],d=e=>(0,a.createElement)(s.SVG,o()({height:"24",width:"24",viewBox:"1.2 10.8 169.6 169.6",xmlns:"http://www.w3.org/2000/svg"},e),(0,a.createElement)(s.Path,{d:"m43.6 49.4c23.4 0 42.4 19 42.4 42.4v3.9h-80.9c-2.1 0-3.8-1.7-3.9-3.9 0-23.4 19-42.4 42.4-42.4z",fill:"#f6bc04"}),(0,a.createElement)(s.Path,{d:"m132.2 53.2c0 23.4-19 42.4-42.4 42.4h-3.8v-80.9c0-2.1 1.7-3.9 3.8-3.9 23.5 0 42.4 19 42.4 42.4z",fill:"#ea4335"}),(0,a.createElement)(s.Path,{d:"m128.4 141.9c-23.4 0-42.4-19-42.4-42.4v-3.9h80.9c2.1 0 3.9 1.7 3.9 3.8 0 23.5-19 42.5-42.4 42.5z",fill:"#4285f4"}),(0,a.createElement)(s.Path,{d:"m39.8 138c0-23.4 19-42.4 42.4-42.4h3.8v80.9c0 2.1-1.7 3.8-3.9 3.9-23.4 0-42.3-19-42.3-42.4z",fill:"#34a853"})),m=e=>(0,a.createElement)(s.SVG,o()({style:{fill:"#30272e",background:"#ffe033",padding:"3px",width:"22px",height:"24px"},width:"46",height:"42",viewBox:"0 0 46 42",xmlns:"http://www.w3.org/2000/svg"},e),(0,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M0 9.3975C0 14.5687 4.1722 18.795 9.3353 18.795V0C4.1722 0 0 4.2 0 9.3975Z"}),(0,a.createElement)(s.Path,{d:"M13.6118 9.3975C13.6118 14.5687 17.784 18.795 22.9471 18.795V0C17.8101 0 13.6118 4.2 13.6118 9.3975Z"}),(0,a.createElement)(s.Path,{d:"M36.5589 18.795C41.7147 18.795 45.8942 14.5876 45.8942 9.3975C45.8942 4.2074 41.7147 0 36.5589 0C31.4032 0 27.2236 4.2074 27.2236 9.3975C27.2236 14.5876 31.4032 18.795 36.5589 18.795Z"}),(0,a.createElement)(s.Path,{d:"M0 32.6025C0 37.8 4.1722 42 9.3353 42V23.2312C4.1722 23.2312 0 27.4312 0 32.6025Z"}),(0,a.createElement)(s.Path,{d:"M13.6118 32.5238C13.6118 37.695 17.784 41.9213 22.9471 41.9213V23.1525C17.8101 23.1525 13.6118 27.3525 13.6118 32.5238Z"}),(0,a.createElement)(s.Path,{d:"M36.5589 41.9212C41.7147 41.9212 45.8942 37.7138 45.8942 32.5238C45.8942 27.3337 41.7147 23.1263 36.5589 23.1263C31.4032 23.1263 27.2236 27.3337 27.2236 32.5238C27.2236 37.7138 31.4032 41.9212 36.5589 41.9212Z"}))),h=e=>(0,a.createElement)(s.SVG,o()({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),(0,a.createElement)(s.Path,{d:"M14 7H9v10h3.9v-3.8H14c1.7 0 3.1-1.4 3.1-3.1C17.2 8.4 15.8 7 14 7z"}),(0,a.createElement)(s.Path,{d:"M20.5 2h-17C2.7 2 2 2.7 2 3.5v17c0 .8.7 1.5 1.5 1.5h17c.8 0 1.5-.7 1.5-1.5v-17c0-.8-.7-1.5-1.5-1.5zm-5.6 13.2V19H7V5h7c2.8 0 5.1 2.3 5.1 5.1.1 2.5-1.8 4.7-4.2 5.1z"})),f=()=>{const e="#757575";return(0,a.createElement)(s.SVG,{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/SVG",x:"0px",y:"0px",viewBox:"0 0 1292 448",style:{enableBackground:"new 0 0 1292 448"}},(0,a.createElement)(s.G,{id:"Icon"},(0,a.createElement)(s.Path,{class:"st0",fill:"#F6B704",d:"M171.6,177.4c23.4,0,42.4,19,42.4,42.4v3.9h-80.9c-2.1,0-3.8-1.7-3.9-3.9C129.2,196.4,148.2,177.4,171.6,177.4 C171.6,177.4,171.6,177.4,171.6,177.4z"}),(0,a.createElement)(s.Path,{class:"st1",fill:"#E54335",d:"M260.2,181.2c0,23.4-19,42.4-42.4,42.4H214v-80.9c0-2.1,1.7-3.9,3.8-3.9h0 C241.3,138.8,260.2,157.8,260.2,181.2C260.2,181.2,260.2,181.2,260.2,181.2z"}),(0,a.createElement)(s.Path,{class:"st2",fill:"#4280EF",d:"M256.4,269.9c-23.4,0-42.4-19-42.4-42.4v-3.9h80.9c2.1,0,3.9,1.7,3.9,3.8v0 C298.8,250.9,279.8,269.9,256.4,269.9C256.4,269.9,256.4,269.9,256.4,269.9z"}),(0,a.createElement)(s.Path,{class:"st3",fill:"#34A353",d:"M167.8,266c0-23.4,19-42.4,42.4-42.4c0,0,0,0,0,0h3.9v80.9c0,2.1-1.7,3.8-3.9,3.9 C186.7,308.4,167.8,289.4,167.8,266z"})),(0,a.createElement)(s.G,{id:"Photos"},(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M796,272v-91.6h31.2c15.2,0,28.7,11.3,28.7,27.3s-13.4,27.3-28.7,27.3h-19.4V272H796z M827.5,223.6 c8.8,0,16-7.2,16-16s-7.2-16-16-16h-19.7v32H827.5z"}),(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M875.8,209.3l-0.5,8.7h0.5c3.3-5.8,11.3-10.8,19.8-10.8c16,0,23.9,10.9,23.9,26.4V272h-11.8v-36.6 c0-13-6.5-17.4-15.5-17.4c-10.2,0-16.5,9.7-16.5,19.3V272H864v-91.6h11.8V209.3z"}),(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M993.8,240.6c0,19.1-13.4,33.4-32.2,33.4s-32.2-14.3-32.2-33.4s13.4-33.4,32.2-33.4S993.8,221.6,993.8,240.6z M982,240.6c0-14.3-10-22.6-20.5-22.6s-20.5,8.3-20.5,22.6s10,22.7,20.5,22.7S982,255,982,240.6L982,240.6z"}),(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M1008,252.9V220h-11v-10.7h11v-19.2h11.8v19.2h15.3V220h-15.3v32c0,7,2.9,10.2,8.4,10.2c1.8,0.1,3.7-0.3,5.4-1 l4.1,10.1c-3,1.2-6.2,1.8-9.5,1.7C1015,273,1008,265.7,1008,252.9z"}),(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M1105.8,240.6c0,19.1-13.4,33.4-32.2,33.4s-32.2-14.3-32.2-33.4s13.4-33.4,32.2-33.4 S1105.8,221.6,1105.8,240.6z M1094,240.6c0-14.3-10-22.6-20.5-22.6s-20.5,8.3-20.5,22.6s10,22.7,20.5,22.7S1094,255,1094,240.6 L1094,240.6z"}),(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M1111,256.1l10.5-4.4c3.3,7.9,9.5,11.8,17,11.8c7.3,0,12.5-3.6,12.5-8.8c0-3.2-1.9-6.6-8.6-8.3l-12.7-3.1 c-5.8-1.4-16.8-6.4-16.8-17.4c0-11.4,11.8-18.7,24.8-18.7c10.9,0,20.3,5,24.2,14.6l-10.2,4.2c-2.4-5.9-8.2-8.3-14.3-8.3 c-6.7,0-12.4,3-12.4,8.1c0,4,3.3,6.1,8.3,7.3l12.4,2.9c12.4,2.9,17.3,10.6,17.3,18.3c0,11.1-10,19.7-24.7,19.7 C1123.2,274,1114.7,265.1,1111,256.1z"})),(0,a.createElement)(s.G,{id:"Google"},(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M348.7,221.6c0-28.9,24.3-52.5,53.2-52.5c13.5-0.2,26.4,5,36,14.5l-10.1,10.1c-6.9-6.7-16.2-10.4-25.9-10.2 c-21.1,0-37.6,17-37.6,38.2s16.5,38.1,37.6,38.1c13.7,0,21.5-5.5,26.5-10.5c4.1-4.1,6.8-10,7.8-18H402v-14.4h48.3 c0.5,3,0.8,6,0.8,9c0,10.8-2.9,24.1-12.4,33.5c-9.2,9.6-21,14.7-36.6,14.7C373,274,348.7,250.5,348.7,221.6z"}),(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M490,206.5c-18.7,0-33.9,14.2-33.9,33.8S471.3,274,490,274s33.9-14.3,33.9-33.8S508.7,206.5,490,206.5z M490,260.7c-10.2,0-19.1-8.4-19.1-20.5s8.8-20.5,19.1-20.5s19.1,8.3,19.1,20.5S500.2,260.7,490,260.7z"}),(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M564,206.5c-18.7,0-33.9,14.2-33.9,33.8S545.3,274,564,274s33.9-14.3,33.9-33.8S582.7,206.5,564,206.5z M564,260.7c-10.2,0-19.1-8.4-19.1-20.5s8.8-20.5,19.1-20.5s19.1,8.3,19.1,20.5S574.2,260.7,564,260.7z"}),(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M654.8,208.5v5.5h-0.5c-3.3-4-9.7-7.6-17.8-7.6c-16.9,0-32.4,14.9-32.4,33.9s15.5,33.7,32.4,33.7 c8.1,0,14.5-3.6,17.8-7.7h0.5v4.9c0,12.9-6.9,19.8-18,19.8c-9.1,0-14.7-6.5-17-12l-12.9,5.4c5,12.1,16.8,20.1,30,20 c17.4,0,32.1-10.2,32.1-35.2v-60.7H654.8z M637.8,260.7c-10.2,0-18.8-8.6-18.8-20.4s8.6-20.6,18.8-20.6s18,8.7,18,20.6 S647.9,260.7,637.8,260.7L637.8,260.7z"}),(0,a.createElement)(s.Rect,{x:"679.2",y:"172.7",class:"st4",fill:e,width:"14.8",height:"99.3"}),(0,a.createElement)(s.Path,{class:"st4",fill:e,d:"M734.7,260.7c-7.6,0-12.9-3.5-16.4-10.2l45.2-18.7L762,228c-2.8-7.6-11.4-21.5-28.9-21.5s-31.9,13.7-31.9,33.8 c0,19,14.3,33.8,33.5,33.8c11.3,0.1,21.9-5.6,28.2-15l-11.5-7.7C747.5,257,742.3,260.7,734.7,260.7z M733.6,219.5 c5.9,0,10.9,2.9,12.5,7.2l-30.2,12.5C715.5,226.2,726,219.5,733.6,219.5L733.6,219.5z"})))},g=e=>{let{size:t=24,border:n=0,className:r,color:o=p}=e;const i=n?-n/t*32:0;return(0,a.createElement)(s.SVG,{className:c()("jetpack-logo",r),width:t,height:t,viewBox:`${i} ${i} ${32-2*i} ${32-2*i}`},(0,a.createElement)(s.Path,{className:"jetpack-logo__icon-circle",fill:o,stroke:n?"#fff":"transparent",strokeWidth:n,d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),(0,a.createElement)(s.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`15,19 ${7-.5*i},19 15,${3-i}`}),(0,a.createElement)(s.Polygon,{className:"jetpack-logo__icon-triangle",fill:"#fff",points:`17,${29+i} 17,13 ${25+.5*i},13`}))},v={foreground:(0,u.m)(),src:(0,a.createElement)(s.SVG,{viewBox:"0 0 100 100"},(0,a.createElement)(s.Path,{d:"M100,44H72.4l23.9-13.8l-6-10.4L66.4,33.6L80.2,9.7l-10.4-6L56,27.59V0H44v27.6L30.2,3.7l-10.4,6l13.8,23.9 L9.7,19.8l-6,10.4L27.6,44H0V56h27.6L3.7,69.8l6,10.4l23.9-13.8L19.8,90.3l10.4,6L44,72.4V100H56V72.41l13.8,23.9l10.4-6L66.4,66.4 l23.9,13.8l6-10.4L72.4,56H100V44z M50,65.23c-8.41,0-15.23-6.82-15.23-15.23c0-8.41,6.82-15.23,15.23-15.23S65.23,41.59,65.23,50 C65.23,58.41,58.41,65.23,50,65.23z"}))},b={foreground:(0,u.m)(),src:(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20.7 17",xmlSpace:"preserve"},(0,a.createElement)(s.Path,{d:"m20.7 12.9-.9-11c0-.5-.2-.9-.5-1.3-.3-.3-.8-.5-1.3-.5L1.9 0h-.1c-.2 0-.5 0-.7.1C.9.2.7.4.5.5.4.7.2.9.1 1.1c-.1.2-.1.5-.1.7v.1l.9 13.4c0 .5.2.9.5 1.3.3.2.8.4 1.3.4H3l16.1-2c.4 0 .9-.3 1.1-.6.3-.3.5-.8.5-1.2v-.3zm-3.1.8L4.2 15.3H4c-.4 0-.8-.1-1-.4-.3-.3-.4-.6-.5-1L1.7 3.2v-.1c0-.4.2-.8.5-1 .3-.3.7-.4 1-.4h.1l13.5.1c.4 0 .8.1 1 .4.3.3.4.6.5 1L19 12v.3c0 .4-.2.7-.4 1-.3.2-.6.4-1 .4z"}))},k={foreground:(0,u.m)(),src:(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 43 43",xmlSpace:"preserve"},(0,a.createElement)(s.Path,{transform:"translate(-25)",fillRule:"evenodd",d:"M37 31.908c0 1.376.893 2.268 2.27 2.268H45.9c3.956 0 7.192-1.337 9.392-3.68H37v1.412zM45.901 9H39.27C37.893 9 37 9.893 37 11.269v1.411h18.294C53.093 10.338 49.857 9 45.9 9zm5.787 16.176c0 1.113.726 1.835 1.845 1.835h3.973c.45-1.117.753-2.345.894-3.671h-4.867c-1.119 0-1.845.722-1.845 1.836zm-5.507-7.166c0 1.113.725 1.836 1.844 1.836H58.4a13.644 13.644 0 00-.894-3.672h-9.481c-1.119 0-1.844.723-1.844 1.836zm1.843 7.166c0-1.114-.726-1.836-1.845-1.836H37v3.671h9.18c1.118 0 1.843-.722 1.843-1.835zm-5.508-7.166c0-1.113-.726-1.836-1.844-1.836H37v3.672h3.672c1.118 0 1.844-.723 1.844-1.836zM83.667 21.209c.296-1.437",clipRule:"evenodd"}))},y=((0,u.m)(),(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"}))),(0,u.m)(),(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M15.9216 2H2.98533C2.43803 2 1.99023 2.45 1.99023 3V17L5.97062 13H15.9216C16.4689 13 16.9167 12.55 16.9167 12V3C16.9167 2.45 16.4689 2 15.9216 2ZM14.9265 4V11H5.14469L3.98043 12.17V4H14.9265ZM18.9069 6H20.8971C21.4444 6 21.8922 6.45 21.8922 7V22L17.9118 18H6.96572C6.41842 18 5.97062 17.55 5.97062 17V15H18.9069V6Z"}))),(0,u.m)(),(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M3.98042 2H19.9019C20.9965 2 21.8921 2.9 21.8921 4V16C21.8921 17.1 20.9965 18 19.9019 18H5.97061L1.99023 22V4C1.99023 2.9 2.88582 2 3.98042 2ZM5.97061 16H19.9019V4H3.98042V18L5.97061 16Z"}))),(0,u.m)(),(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M11.1114 8H20.0002M11.1113 15H20.0002",stroke:(0,u.m)(),strokeWidth:"1.5"}),(0,a.createElement)(s.Path,{d:"M4 10V6L8 8L4 10Z",fill:(0,u.m)()}),(0,a.createElement)(s.Path,{d:"M4 17V13L8 15L4 17Z",fill:(0,u.m)()}))),(0,u.m)(),(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24"},(0,a.createElement)(s.Rect,{x:"0",fill:"none",width:"24",height:"24"}),(0,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M4 12V4L11 8L4 12Z"}),(0,a.createElement)(s.Path,{d:"M4 14.5H20V16H4V14.5Z"}),(0,a.createElement)(s.Path,{d:"M4 18.5H13V20H4V18.5Z"}))),(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.Path,{d:"M2.5 7.5V4.5H15.5V7.5H10.5V19.5H7.5V7.5H2.5ZM12.5 9.5H21.5V12.5H18.5V19.5H15.5V12.5H12.5V9.5Z"})),(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.Path,{d:"M12.7049 2V6C8.30658 6 4.74414 9.58 4.74414 14C4.74414 18.42 8.30658 22 12.7049 22C17.1032 22 20.6656 18.42 20.6656 14H18.6755C18.6755 17.31 15.9987 20 12.7049 20C9.41113 20 6.73433 17.31 6.73433 14C6.73433 10.69 9.41113 8 12.7049 8V12L17.6804 7L12.7049 2ZM11.6501 12.73L11.4013 14.9L12.068 15.06C12.0753 15.0526 12.0827 15.0447 12.0901 15.0366C12.1131 15.0116 12.1375 14.9851 12.1675 14.97C12.1874 14.96 12.2073 14.9475 12.2272 14.935C12.2471 14.9225 12.2671 14.91 12.287 14.9C12.3268 14.88 12.3865 14.86 12.4362 14.85C12.486 14.84 12.5556 14.83 12.6352 14.83C12.7447 14.83 12.8542 14.85 12.9338 14.88C13.0134 14.91 13.083 14.96 13.1427 15.03C13.2024 15.1 13.2422 15.17 13.2721 15.27C13.302 15.37 13.3119 15.47 13.3119 15.58V15.58C13.3119 15.69 13.3119 15.79 13.2821 15.89C13.2522 15.99 13.2124 16.07 13.1726 16.14C13.1328 16.21 13.0631 16.27 12.9935 16.31C12.9238 16.35 12.8343 16.37 12.7248 16.37C12.5556 16.37 12.4163 16.31 12.3069 16.22C12.1974 16.13 12.1377 15.99 12.1178 15.81H11.2819C11.2819 16.01 11.3317 16.19 11.4113 16.34C11.4909 16.49 11.5904 16.63 11.7297 16.73C11.869 16.83 12.0183 16.92 12.1874 16.97C12.3566 17.02 12.5357 17.05 12.7148 17.05C12.9636 17.05 13.1726 17 13.3517 16.93C13.5308 16.86 13.6801 16.75 13.7995 16.62C13.9189 16.49 14.0085 16.34 14.0682 16.17C14.1279 16 14.1577 15.82 14.1577 15.63C14.1577 15.41 14.1179 15.21 14.0682 15.03C14.0184 14.85 13.9289 14.7 13.8194 14.58C13.7099 14.46 13.5706 14.37 13.4114 14.3C13.2522 14.23 13.0731 14.2 12.8641 14.2C12.7945 14.2 12.7248 14.21 12.6651 14.22C12.6352 14.225 12.6054 14.2325 12.5755 14.24C12.5457 14.2475 12.5158 14.255 12.486 14.26C12.4263 14.27 12.3765 14.29 12.3367 14.31C12.3201 14.3183 12.3035 14.325 12.2876 14.3313C12.2654 14.3401 12.2446 14.3483 12.2272 14.36L12.3367 13.44H14.0284V12.73H11.6501Z"})),(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.Path,{d:"M11.9412 2V6C16.3395 6 19.902 9.58 19.902 14C19.902 18.42 16.3395 22 11.9412 22C7.54291 22 3.98047 18.42 3.98047 14H5.97066C5.97066 17.31 8.64746 20 11.9412 20C15.235 20 17.9118 17.31 17.9118 14C17.9118 10.69 15.235 8 11.9412 8V12L6.96575 7L11.9412 2ZM10.8864 12.73L10.6376 14.9L11.3044 15.06C11.3117 15.0526 11.319 15.0447 11.3264 15.0366C11.3494 15.0116 11.3738 14.9851 11.4039 14.97C11.4238 14.96 11.4437 14.9475 11.4636 14.935C11.4835 14.9225 11.5034 14.91 11.5233 14.9C11.5631 14.88 11.6228 14.86 11.6725 14.85C11.7223 14.84 11.792 14.83 11.8716 14.83C11.981 14.83 12.0905 14.85 12.1701 14.88C12.2497 14.91 12.3194 14.96 12.3791 15.03C12.4388 15.1 12.4786 15.17 12.5084 15.27C12.5383 15.37 12.5482 15.47 12.5482 15.58V15.58C12.5482 15.69 12.5482 15.79 12.5184 15.89C12.4885 15.99 12.4487 16.07 12.4089 16.14C12.3691 16.21 12.2995 16.27 12.2298 16.31C12.1601 16.35 12.0706 16.37 11.9611 16.37C11.792 16.37 11.6526 16.31 11.5432 16.22C11.4337 16.13 11.374 15.99 11.3541 15.81H10.5182C10.5182 16.01 10.568 16.19 10.6476 16.34C10.7272 16.49 10.8267 16.63 10.966 16.73C11.1053 16.83 11.2546 16.92 11.4238 16.97C11.5929 17.02 11.7721 17.05 11.9512 17.05C12.1999 17.05 12.4089 17 12.588 16.93C12.7672 16.86 12.9164 16.75 13.0358 16.62C13.1552 16.49 13.2448 16.34 13.3045 16.17C13.3642 16 13.3941 15.82 13.3941 15.63C13.3941 15.41 13.3543 15.21 13.3045 15.03C13.2547 14.85 13.1652 14.7 13.0557 14.58C12.9463 14.46 12.807 14.37 12.6477 14.3C12.4885 14.23 12.3094 14.2 12.1004 14.2C12.0308 14.2 11.9611 14.21 11.9014 14.22C11.8716 14.225 11.8417 14.2325 11.8119 14.24C11.782 14.2475 11.7522 14.255 11.7223 14.26C11.6626 14.27 11.6128 14.29 11.573 14.31C11.5564 14.3183 11.5398 14.325 11.5239 14.3313C11.5017 14.3401 11.481 14.3483 11.4636 14.36L11.573 13.44H13.2647V12.73H10.8864Z"})),(0,a.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,a.createElement)(s.Path,{d:"M0 0h24v24H0z",fill:"none"}),(0,a.createElement)(s.Path,{d:"M7 2v11h3v9l7-12h-4l4-8z",fill:"currentColor"})),(0,a.createElement)(s.SVG,{width:"29",height:"21",viewBox:"0 0 29 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M2.79037 0.59375C4.0363 0.59375 5.13102 1.41658 5.47215 2.60947L8.8452 14.4044C8.8486 14.4164 8.85411 14.4273 8.86124 14.4368L12.8572 0.59375H15.0927H21.2721C25.6033 0.59375 28.5066 3.39892 28.5066 7.64565C28.5066 11.9411 25.5272 14.6196 21.0818 14.6196H18.1499H14.3719L13.6379 16.8813C12.9796 18.9095 11.0827 20.2839 8.94152 20.2839C6.80035 20.2839 4.90341 18.9095 4.24517 16.8813L0.137069 4.22276C-0.444671 2.43022 0.898038 0.59375 2.79037 0.59375ZM15.7374 10.4119H20.0156C21.8718 10.4119 22.9856 9.35018 22.9856 7.64565C22.9856 5.93137 21.8718 4.91839 20.0156 4.91839H17.5202L15.7374 10.4119Z",fill:"#000000"}))),w=(0,a.createElement)(s.SVG,{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{d:"M4.75725 2.075C4.60279 1.97745 4.41041 1.97489 4.25365 2.06832C4.09689 2.16174 4 2.3367 4 2.52632V21.4737C4 21.6633 4.09689 21.8383 4.25365 21.9317C4.41041 22.0251 4.60279 22.0226 4.75725 21.925L19.7573 12.4513C19.9079 12.3562 20 12.1849 20 12C20 11.8151 19.9079 11.6438 19.7573 11.5487L4.75725 2.075Z",fill:"white"})),E=((0,a.createElement)(s.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{fill:"none"}},(0,a.createElement)(s.Path,{d:"M13.9 16.55L13.75 16.75V17V19C13.75 19.1381 13.6381 19.25 13.5 19.25H10.5C10.3619 19.25 10.25 19.1381 10.25 19V17V16.75L10.1 16.55L7.25 12.75V9C7.25 8.86193 7.36193 8.75 7.5 8.75H16.5C16.6381 8.75 16.75 8.86193 16.75 9V12.75L13.9 16.55Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,a.createElement)("line",{x1:"9.75",y1:"9",x2:"9.75",y2:"4",stroke:"currentColor",strokeWidth:"1.5"}),(0,a.createElement)("line",{x1:"14.25",y1:"9",x2:"14.25",y2:"4",stroke:"currentColor",strokeWidth:"1.5"})),(0,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{d:"M18 6.75H6C5.30964 6.75 4.75 7.30964 4.75 8V16C4.75 16.6904 5.30964 17.25 6 17.25H18C18.6904 17.25 19.25 16.6904 19.25 16V8C19.25 7.30964 18.6904 6.75 18 6.75Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,a.createElement)(s.Path,{d:"M5 7L12 13L19 7",stroke:"currentColor",strokeWidth:"1.5"})),(0,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M7 2.75H6.25V3.5V8.25H5.5C4.25736 8.25 3.25 9.25736 3.25 10.5V18.5C3.25 19.7426 4.25736 20.75 5.5 20.75H18C19.2426 20.75 20.25 19.7426 20.25 18.5V10.5C20.25 9.25736 19.2426 8.25 18 8.25H9.5V9.75H18C18.4142 9.75 18.75 10.0858 18.75 10.5V18.5C18.75 18.9142 18.4142 19.25 18 19.25H5.5C5.08579 19.25 4.75 18.9142 4.75 18.5V10.5C4.75 10.0858 5.08579 9.75 5.5 9.75H6.25V10H7.75V6.5H7.75229H7.75464H7.75699H7.75934H7.76169H7.76405H7.7664H7.76875H7.77111H7.77346H7.77582H7.77817H7.78053H7.78289H7.78524H7.7876H7.78996H7.79232H7.79468H7.79704H7.7994H7.80176H7.80412H7.80648H7.80884H7.8112H7.81357H7.81593H7.81829H7.82065H7.82302H7.82538H7.82774H7.83011H7.83247H7.83484H7.8372H7.83956H7.84193H7.84429H7.84666H7.84902H7.85139H7.85375H7.85612H7.85848H7.86085H7.86322H7.86558H7.86795H7.87031H7.87268H7.87504H7.87741H7.87977H7.88214H7.8845H7.88687H7.88923H7.8916H7.89396H7.89633H7.89869H7.90106H7.90342H7.90578H7.90815H7.91051H7.91287H7.91524H7.9176H7.91996H7.92232H7.92468H7.92704H7.9294H7.93177H7.93412H7.93648H7.93884H7.9412H7.94356H7.94592H7.94828H7.95063H7.95299H7.95535H7.9577H7.96006H7.96241H7.96477H7.96712H7.96947H7.97182H7.97418H7.97653H7.97888H7.98123H7.98358H7.98592H7.98827H7.99062H7.99297H7.99531H7.99766H8H13.5V5.5V5V4.25V4V2.75H7Z",fill:"currentColor"})),(0,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M15.6416 9.51049L16.3128 10.701L17.5605 10.1432C17.8568 10.0108 18.1778 9.94237 18.5024 9.94253H18.5032C19.7889 9.94253 20.8543 10.9979 20.8543 12.3265C20.8543 13.655 19.7889 14.7104 18.5032 14.7104C18.3449 14.7104 18.1896 14.6946 18.0348 14.6638L16.9668 14.4513L16.434 15.401C16.2045 15.81 15.7702 16.0783 15.2884 16.0783L15.2855 16.0783C15.0869 16.0787 14.8909 16.0337 14.7125 15.9467L13.2933 15.2546L12.6749 16.7074C12.4124 17.3238 11.8034 17.75 11.1027 17.75C10.3678 17.75 9.74128 17.289 9.49859 16.6313L9.04988 15.4152L7.78159 15.6829C7.68225 15.7039 7.58099 15.7144 7.47947 15.7143H7.47856C6.67732 15.7143 6 15.0516 6 14.203C6 13.6392 6.30098 13.1495 6.75148 12.8837L7.89299 12.2103L7.36523 10.9945C7.25853 10.7487 7.20361 10.4836 7.20389 10.2156V10.2141C7.20389 9.13045 8.08351 8.25 9.17451 8.25C9.69379 8.25 10.1669 8.451 10.5168 8.77912L10.5156 8.78033L10.5156 8.78034L10.5156 8.78036L10.5156 8.78039L10.5157 8.78042L10.5157 8.78047L10.5158 8.78051L10.5158 8.7806L10.5159 8.78065L10.516 8.78075L10.5161 8.78081L10.5162 8.78095L10.5163 8.78102L10.5164 8.78118L10.5165 8.78126L10.5167 8.78145L10.5168 8.78153L10.517 8.78176L10.5171 8.78184L10.5173 8.7821L10.5174 8.78219L10.5177 8.78248L10.5178 8.78257L10.5181 8.7829L10.5182 8.78299L10.5186 8.78336L10.5187 8.78344L10.5191 8.78385L10.5192 8.78392L10.5196 8.78438L10.5197 8.78444L10.5202 8.78495L10.5202 8.78499L10.5208 8.78556L10.5208 8.78558L10.5214 8.7862L10.5214 8.78621L10.5221 8.78686L10.5221 8.7869L10.5228 8.78755L10.5229 8.78762L10.5235 8.78827L10.5236 8.78839L10.5243 8.78903L10.5244 8.78919L10.5251 8.78982L10.5253 8.79003L10.5259 8.79065L10.5261 8.79091L10.5267 8.7915L10.5271 8.79183L10.5276 8.79239L10.528 8.79279L10.5286 8.79332L10.529 8.79379L10.5295 8.79427L10.5301 8.79483L10.5305 8.79526L10.5311 8.79591L10.5315 8.79629L10.5323 8.79702L10.5326 8.79734L10.5334 8.79818L10.5337 8.79843L10.5346 8.79938L10.5348 8.79955L10.5359 8.80062L10.5359 8.8007L10.5371 8.80188L10.5371 8.8019L10.5383 8.80309L10.5385 8.80322L10.5396 8.80434L10.5398 8.80458L10.5409 8.80562L10.5412 8.80598L10.5422 8.80693L10.5427 8.80743L10.5435 8.80827L10.5441 8.80891L10.5449 8.80964L10.5457 8.81043L10.5463 8.81105L10.5472 8.812L10.5477 8.81248L10.5488 8.81361L10.5492 8.81395L10.5505 8.81526L10.5507 8.81544L10.5522 8.81695L10.5522 8.81697L10.5538 8.81853L10.5539 8.81868L10.5554 8.82011L10.5557 8.82046L10.557 8.82173L10.5575 8.82227L10.5586 8.82338L10.5594 8.82413L10.5603 8.82506L10.5613 8.82603L10.562 8.82676L10.5632 8.82798L10.5637 8.8285L10.5652 8.82996L10.5655 8.83027L10.5672 8.83199L10.5673 8.83206L10.5691 8.83389L10.5693 8.83406L10.571 8.83574L10.5714 8.83618L10.5729 8.83763L10.5736 8.83834L10.5748 8.83954L10.5758 8.84054L10.5767 8.84148L10.578 8.84278L10.5787 8.84345L10.5803 8.84507L10.5807 8.84545L10.5826 8.8474L10.5827 8.84748L10.5848 8.84954L10.585 8.84978L10.5869 8.85162L10.5874 8.8522L10.589 8.85373L10.5899 8.85466L10.5911 8.85587L10.5924 8.85717L10.5933 8.85804L10.595 8.85972L10.5955 8.86023L10.5976 8.86231L10.5977 8.86246L10.5999 8.86471L10.6002 8.86495L10.6022 8.86699L10.6029 8.86764L10.6045 8.86929L10.6056 8.87037L10.6069 8.87162L10.6084 8.87314L10.6092 8.87398L10.6112 8.87596L10.6116 8.87637L10.614 8.87878L10.6141 8.87883L10.6165 8.88122L10.617 8.88174L10.6189 8.88369L10.6199 8.88469L10.6214 8.88618L10.6229 8.88769L10.6239 8.8887L10.626 8.89074L10.6265 8.89124L10.629 8.89381L10.6291 8.89383L10.6316 8.89641L10.6322 8.89697L10.6324 8.89712C10.6683 8.93709 10.7026 8.97856 10.7351 9.02142L10.7474 9.01213L10.7482 9.01292L10.7483 9.01306L10.7517 9.01642L10.7529 9.01768L10.7552 9.01995L10.7576 9.02236L10.7587 9.02349L10.7623 9.02706L10.7623 9.02708L10.7659 9.03064L10.7671 9.03185L10.7695 9.03425L10.7719 9.03667L10.7731 9.03787L10.7768 9.04152L10.7768 9.04155L10.7804 9.04519L10.7817 9.04647L10.7841 9.04887L10.7867 9.05144L10.7878 9.05258L10.7915 9.0563L10.7917 9.05647L10.7953 9.06005L10.7968 9.06155L10.799 9.06381L10.8019 9.06667L10.8028 9.06759L10.8066 9.0714L10.8071 9.07185L10.8105 9.07522L10.8123 9.07708L10.8143 9.07906L10.8176 9.08236L10.8182 9.08291L10.822 9.08679L10.8229 9.08769L10.8259 9.09068L10.8283 9.09308L10.8298 9.0946L10.8338 9.09852L10.8338 9.09853L10.8377 9.10248L10.8392 9.104L10.8417 9.10644L10.8457 9.11043L10.8497 9.11443L10.8537 9.11845L10.8577 9.12249L10.8618 9.12654L10.8659 9.13061L10.8699 9.1347L10.874 9.13881L10.8782 9.14293L10.8823 9.14707L10.8865 9.15122L10.8906 9.15539L10.8948 9.15958L10.899 9.16378L10.9032 9.168L10.9075 9.17224L10.9117 9.17649L10.916 9.18076L10.9203 9.18504L10.9246 9.18934L10.9289 9.19365L10.9332 9.19798L10.9376 9.20232L10.9419 9.20668L10.9463 9.21105L10.9507 9.21544L10.9551 9.21984L10.9595 9.22425L10.9639 9.22868L10.9684 9.23313L10.9728 9.23758L10.9773 9.24205L10.9818 9.24654L10.9863 9.25104L10.9908 9.25555L10.9953 9.26008L10.9999 9.26462L11.0044 9.26917L11.009 9.27373L11.0135 9.27831L11.0181 9.2829L11.0227 9.2875L11.0274 9.29212L11.032 9.29674L11.0366 9.30138L11.0413 9.30604L11.0459 9.3107L11.0506 9.31537L11.0553 9.32006L11.06 9.32476L11.0647 9.32947L11.0694 9.33419L11.0742 9.33892L11.0789 9.34367L11.0837 9.34842L11.0884 9.35319L11.0932 9.35796L11.098 9.36275L11.1028 9.36755L11.1076 9.37235L11.1124 9.37717L11.1172 9.382L11.1221 9.38683L11.1269 9.39168L11.1318 9.39654L11.1366 9.4014L11.1415 9.40628L11.1464 9.41116L11.1513 9.41606L11.1562 9.42096L11.1611 9.42587L11.166 9.43079L11.171 9.43572L11.1759 9.44066L11.1808 9.4456L11.1858 9.45056L11.1908 9.45552L11.1957 9.46049L11.2007 9.46547L11.2057 9.47046L11.2107 9.47545L11.2157 9.48045L11.2207 9.48546L11.2257 9.49048L11.2307 9.4955L11.2358 9.50053L11.2408 9.50557L11.2458 9.51061L11.2509 9.51566L11.256 9.52072L11.261 9.52578L11.2661 9.53085L11.2712 9.53592L11.2762 9.54101L11.2813 9.54609L11.2864 9.55119L11.2915 9.55628L11.2966 9.56139L11.3017 9.5665L11.3069 9.57161L11.312 9.57673L11.3171 9.58186L11.3222 9.58699L11.3274 9.59212L11.3325 9.59726L11.3376 9.6024L11.3428 9.60755L11.3479 9.6127L11.3531 9.61786L11.3583 9.62302L11.3634 9.62818L11.3686 9.63335L11.3738 9.63852L11.3789 9.6437L11.3841 9.64887L11.3893 9.65406L11.3945 9.65924L11.3997 9.66443L11.4049 9.66962L11.41 9.67481L11.4152 9.68001L11.4204 9.6852L11.4256 9.6904L11.4308 9.69561L11.436 9.70081L11.4413 9.70602L11.4465 9.71122L11.4517 9.71643L11.4569 9.72165L11.4621 9.72686L11.4673 9.73207L11.4725 9.73729L11.4777 9.7425L11.483 9.74772L11.4882 9.75294L11.4934 9.75816L11.4986 9.76338L11.5038 9.7686L11.5091 9.77382L11.5143 9.77904L11.5195 9.78426L11.5247 9.78948L11.5299 9.7947L11.5352 9.79992L11.5404 9.80514L11.5456 9.81036L11.5508 9.81558L11.556 9.82079L11.5612 9.82601L11.5665 9.83123L11.5717 9.83644L11.5769 9.84165L11.5821 9.84686L11.5873 9.85207L11.5925 9.85728L11.5977 9.86249L11.6029 9.86769L11.6081 9.87289L11.6133 9.87809L11.6185 9.88329L11.6237 9.88849L11.6289 9.89368L11.6341 9.89887L11.6393 9.90406L11.6445 9.90924L11.6497 9.91442L11.6548 9.9196L11.66 9.92477L11.6652 9.92994L11.6703 9.93511L11.6755 9.94027L11.6807 9.94543L11.6858 9.95059L11.691 9.95574L11.6961 9.96089L11.7013 9.96603L11.7064 9.97117L11.7115 9.9763L11.7167 9.98143L11.7218 9.98656L11.7269 9.99167L11.732 9.99679L11.7371 10.0019L11.7422 10.007L11.7473 10.0121L11.7524 10.0172L11.7575 10.0223L11.7626 10.0274L11.7677 10.0324L11.7727 10.0375L11.7778 10.0426L11.7829 10.0476L11.7879 10.0527L11.793 10.0577L11.798 10.0627L11.803 10.0678L11.808 10.0728L11.8131 10.0778L11.8181 10.0828L11.8231 10.0878L11.8281 10.0928L11.833 10.0978L11.838 10.1028L11.843 10.1077L11.8479 10.1127L11.8529 10.1177L11.8578 10.1226L11.8628 10.1275L11.8677 10.1325L11.8726 10.1374L11.8775 10.1423L11.8824 10.1472L11.8873 10.1521L11.8922 10.157L11.8971 10.1619L11.902 10.1667L11.9068 10.1716L11.9117 10.1764L11.9165 10.1813L11.9213 10.1861L11.9261 10.1909L11.9309 10.1957L11.9357 10.2005L11.9405 10.2053L11.9453 10.2101L11.9501 10.2148L11.9548 10.2196L11.9596 10.2243L11.9643 10.2291L11.969 10.2338L11.9737 10.2385L11.9784 10.2432L11.9831 10.2479L11.9878 10.2525L11.9924 10.2572L11.9971 10.2619L12.0017 10.2665L12.0064 10.2711L12.011 10.2757L12.0156 10.2803L13.0762 9.21967L13.0716 9.21507L13.067 9.21045L13.0624 9.20583L13.0577 9.20119L13.0531 9.19654L13.0484 9.19188L13.0438 9.1872L13.0391 9.18252L13.0344 9.17782L13.0297 9.17311L13.025 9.16839L13.0202 9.16366L13.0155 9.15892L13.0107 9.15417L13.006 9.1494L13.0012 9.14463L12.9964 9.13984L12.9916 9.13505L12.9868 9.13024L12.982 9.12542L12.9772 9.1206L12.9723 9.11576L12.9675 9.11092L12.9626 9.10606L12.9578 9.1012L12.9529 9.09632L12.948 9.09144L12.9431 9.08655L12.9382 9.08164L12.9333 9.07673L12.9284 9.07181L12.9234 9.06689L12.9185 9.06195L12.9136 9.057L12.9086 9.05205L12.9048 9.04829L13.0111 9.15036C13.3196 8.82924 13.7369 8.64023 14.1928 8.64023C14.7957 8.64023 15.3379 8.97179 15.6416 9.51049ZM11.9483 8.0917C12.1799 7.85456 12.4472 7.65398 12.7412 7.49903C13.1764 7.26964 13.67 7.14023 14.1928 7.14023C15.3737 7.14023 16.3972 7.7963 16.9483 8.77385C17.4375 8.55516 17.9673 8.44226 18.5032 8.44253C20.6289 8.44253 22.3543 10.1811 22.3543 12.3265C22.3543 14.4718 20.6289 16.2104 18.5032 16.2104C18.2434 16.2104 17.9901 16.1843 17.7421 16.135C17.2599 16.9944 16.3382 17.5783 15.2884 17.5783C14.957 17.579 14.6288 17.5208 14.319 17.4073C14.2294 17.3744 14.1412 17.337 14.055 17.2949C14.0121 17.3958 13.9641 17.4941 13.9114 17.5894C13.3647 18.5786 12.3115 19.25 11.1027 19.25C9.71839 19.25 8.54402 18.3774 8.09134 17.1506C7.88985 17.1931 7.68448 17.2145 7.47856 17.2143C5.83183 17.2143 4.5 15.8628 4.5 14.203C4.5 13.0877 5.09965 12.1167 5.98928 11.5918C5.80055 11.157 5.7034 10.688 5.70389 10.2141C5.70389 8.29833 7.25878 6.75 9.17451 6.75C9.91511 6.75 10.6042 6.98301 11.1683 7.38015C11.3677 7.52056 11.5515 7.68148 11.7164 7.85987L11.7168 7.86025L11.7196 7.86308L11.7197 7.86309L11.7225 7.86597L11.7232 7.86663L11.7254 7.86886L11.7268 7.87024L11.7283 7.87178L11.7304 7.87389L11.7313 7.87472L11.7341 7.87759L11.7343 7.87769L11.7372 7.88068L11.7379 7.88133L11.7403 7.8837L11.7417 7.88513L11.7433 7.88674L11.7455 7.88897L11.7464 7.8898L11.7494 7.89286L11.7494 7.89288L11.7526 7.89599L11.7534 7.89679L11.7557 7.89912L11.7573 7.90078L11.7588 7.90228L11.7614 7.90481L11.762 7.90546L11.7652 7.90866L11.7655 7.90889L11.7684 7.91188L11.7696 7.91302L11.7717 7.91512L11.7738 7.9172L11.7749 7.91839L11.778 7.92143L11.7782 7.92168L11.7815 7.92499L11.7823 7.92571L11.7849 7.92832L11.7866 7.93003L11.7882 7.93168L11.791 7.93441L11.7916 7.93505L11.795 7.93845L11.7954 7.93883L11.7984 7.94187L11.7999 7.9433L11.8019 7.94531L11.8044 7.94783L11.8053 7.94877L11.8088 7.95226L11.809 7.9524L11.8123 7.95576L11.8136 7.95702L11.8158 7.95929L11.8183 7.9617L11.8194 7.96283L11.823 7.9664L11.823 7.96642L11.8265 7.96998L11.8277 7.97119L11.8301 7.97359L11.8326 7.97601L11.8338 7.97721L11.8374 7.98086L11.8374 7.98089L11.8411 7.98453L11.8424 7.98581L11.8448 7.98821L11.8473 7.99078L11.8485 7.99192L11.8522 7.99564L11.8524 7.99581L11.8559 7.99939L11.8574 8.00089L11.8597 8.00315L11.8626 8.00601L11.8635 8.00693L11.8673 8.01074L11.8677 8.01119L11.8711 8.01456L11.873 8.01642L11.875 8.0184L11.8783 8.0217L11.8788 8.02225L11.8827 8.02613L11.8836 8.02703L11.8866 8.03002L11.889 8.03242L11.8905 8.03394L11.8944 8.03785L11.8944 8.03787L11.8984 8.04182L11.8999 8.04334L11.9023 8.04578L11.9063 8.04977L11.9103 8.05377L11.9143 8.05779L11.9184 8.06183L11.9224 8.06588L11.9265 8.06995L11.9306 8.07404L11.9347 8.07815L11.9388 8.08227L11.943 8.08641L11.9471 8.09056L11.9483 8.0917Z",fill:"currentColor"})),(0,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.Path,{d:"M20 3H4c-.6 0-1 .4-1 1v16c0 .5.4 1 1 1h8.6v-7h-2.3v-2.7h2.3v-2c0-2.3 1.4-3.6 3.5-3.6 1 0 1.8.1 2.1.1v2.4h-1.4c-1.1 0-1.3.5-1.3 1.3v1.7h2.7l-.4 2.8h-2.3v7H20c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1z"}))),_=(0,a.createElement)(s.SVG,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.createElement)(s.G,null,(0,a.createElement)(s.Path,{d:"M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z"})))},12923:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(13419),o=n(92819);function a(){return(0,o.get)((0,r.Pb)(),["jetpack","is_active"],!1)}},99621:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(13419),o=n(92819);function a(){return(0,o.get)((0,r.Pb)(),["jetpack","is_offline_mode"],!1)}},63066:function(e,t,n){"use strict";var r=n(13419),o=n(86989),a=n.n(o),i=n(9818),s=n(65736);n(53961);const __=s.__;function l(){const e=(0,r.lQ)();return void 0!==typeof window&&window.location&&e?(0,r.Wp)()||(0,r.Ug)()?`https://wordpress.com/plans/my-plan/${e}`:`${window.location.protocol}//${e.replace("::","/")}/wp-admin/admin.php?page=jetpack#/my-plan`:null}(async()=>{if(void 0!==typeof window&&window.location){if(new URLSearchParams(window.location.search).get("plan_upgraded")){let e=null;e:try{if((0,r.Wp)())break e;const t=await a()({path:"/jetpack/v4/site"});e=JSON.parse(t.data).plan.product_name}finally{const t=l();(0,i.dispatch)("core/notices").createNotice("success",e?(0,s.sprintf)(/* translators: %s is the plan name, such as Jetpack Premium. */ | |
| 78 | -__("Congratulations! Your site is now on the %s plan.","jetpack"),e):__("Congratulations! Your site is now on a paid plan.","jetpack"),{isDismissible:!0,...t&&{actions:[{url:l(),label:__("View my plan","jetpack")}]}})}}}})()},80425:function(e,t,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&window.Jetpack_Block_Assets_Base_Url.url&&(n.p=window.Jetpack_Block_Assets_Base_Url.url)},31985:function(e,t,n){"use strict";n.d(t,{S:function(){return l},Z:function(){return s}});var r=n(13419),o=n(4981),a=n(92694);const i="jetpack/";function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const l="string"==typeof e?e:e.name,c=l.startsWith(i),u=c?l.slice(i.length):l,{available:p,details:d,unavailableReason:m}=(0,r.OZ)(u),h=(0,r._D)(m,d),f=s||c?i:"";if(!p&&!h)return!1;const g=f+u,v=(0,o.registerBlockType)("object"===e?e:g,t);return h&&(0,a.addFilter)("editor.BlockListBlock",`${g}-with-has-warning-is-interactive-class-names`,(0,r.T)(g)),n.forEach((e=>(0,o.registerBlockType)(f+e.name,e.settings))),v}function l(e,t,n,o){const a={...t,icon:(0,r.lt)(e),attributes:e.attributes||{}},{variations:i}=e;return Array.isArray(i)&&i.length>0&&(a.variations=i.map((e=>({...e,icon:(0,r.lt)(e)})))),s(e,a,n,o)}},36598:function(e,t,n){"use strict";var r=n(51806),o=n(70444);t.Z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:24,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0 0 24 24";return(0,r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,viewBox:a},(0,r.createElement)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z",className:"icon-filler"}),e)}},66425:function(e,t,n){"use strict";var r=n(51806),o=n(52175);t.Z=(e,t,n,a,i)=>{const{isSelected:s}=t,l=t.attributes[e];return(0,r.createElement)("div",{className:s?`jetpack-${e}-block is-selected`:`jetpack-${e}-block`},!s&&""!==l&&a(t),(s||""===l)&&(0,r.createElement)(o.PlainText,{value:l,placeholder:n,"aria-label":n,onChange:i}))}},92713:function(e,t,n){"use strict";var r=n(9818),o=n(65736);n(53961);const __=o.__;if("undefined"!=typeof window&&window.location){const e=new URLSearchParams(window.location.search);e.get("stripe_connect_success")?(0,r.dispatch)("core/notices").createNotice("success",__("Congrats! Your site is now connected to Stripe. You can now start accepting funds!","jetpack")):e.get("stripe_connect_cancelled")&&(0,r.dispatch)("core/notices").createNotice("error",__("You cancelled connecting your site to Stripe.","jetpack"))}},23621:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(86989),o=n.n(r),a=n(92819);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.noop;return t(!0),new Promise(((n,r)=>{o()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then((o=>{t(!1);const a=o.status?parseInt(o.status,10):null;a&&a>=400?r():n(o.url||e)}),(()=>{t(!1),r()}))}))}},46867:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9818),o=n(69307),a=n(92819);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.noop;const[n,i]=(0,o.useState)(!1),{isAutosaveablePost:s,isDirtyPost:l,currentPost:c}=(0,r.useSelect)((e=>{const t=e("core/editor");return{isAutosaveablePost:t.isEditedPostAutosaveable(),isDirtyPost:t.isEditedPostDirty(),currentPost:t.getCurrentPost()}}),[]),u=Object.keys(c).length>0,p=(0,r.useSelect)((e=>!!window.wp?.customize||!!e("core/edit-widgets"))),d=(0,r.dispatch)("core/editor").savePost,m=(0,r.useSelect)((e=>e("core").__experimentalGetDirtyEntityRecords())),h=async e=>{e.preventDefault(),u?l&&s&&await d(e):await(async()=>{for(let e=0;e<m.length;e++)await(0,r.dispatch)("core").saveEditedEntityRecord(m[e].kind,m[e].name,m[e].key)})()};return{autosave:h,autosaveAndRedirect:async r=>{r.preventDefault(),n||(i(!0),h(r).then((()=>{!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t&&t(e),n?window.open(e,"_blank"):window.top.location.href=e}(e,t,p)})))},isRedirecting:n}}},78798:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(13419),o=n(9818),a=n(92694),i=n(92819),s=(n(87553),n(46867));const l="a8c.wpcom-block-editor.openCheckoutModal";function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.noop;const{checkoutUrl:n,planData:c}=(0,o.useSelect)((t=>{const n=t("core/editor"),o=t("wordpress-com/plans"),{id:a,type:i}=n.getCurrentPost(),s=o&&o.getPlan(e);return{checkoutUrl:(0,r.Qq)({plan:s,planSlug:e,postId:a,postType:i}),planData:s}}),[]),{autosave:u,autosaveAndRedirect:p,isRedirecting:d}=(0,s.Z)(n,t);return[n,async e=>{if(e.preventDefault(),(0,a.hasAction)(l))return e.preventDefault(),u(e),void(0,a.doAction)(l,{products:[c]});p(e)},d,c]}},81673:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(69307);const o=e=>{const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current};function a(e){let{attributes:t,disableEffects:n=!1,setAttributes:a}=e;const{align:i,width:s}=t,l=o(i);(0,r.useEffect)((()=>{if(n)return;l!==i&&("left"===i||"right"===i)&&s?.includes("%")&&a({width:void 0})}),[i,n,l,a,s])}},67194:function(e,t,n){"use strict";n.d(t,{X:function(){return o}});var r=n(9818);const o=async e=>new Promise((t=>{const n=(0,r.subscribe)((()=>{e()&&(n(),t())}))}))},30429:function(e,t,n){"use strict";n.d(t,{G:function(){return h}});var r=n(82674),o=n.n(r),a=n(51806),i=n(55609),s=n(69307),l=n(65736),c=n(65235),u=n.n(c);const __=l.__,p=[{value:"%",label:"%",default:100},{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],d=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],m=["25%","50%","75%","100%"];function h(e){return(0,a.createElement)(i.PanelBody,{title:__("Width settings","jetpack")},(0,a.createElement)(f,o()({showLabel:!1},e)))}function f(e){let{align:t,width:n,onChange:r,showLabel:o=!0}=e;const[l,c]=(0,s.useState)("%");(0,s.useEffect)((()=>{void 0===n&&c("px")}),[n]);const h="left"===t||"right"===t;return(0,a.createElement)(i.BaseControl,{label:o&&__("Width","jetpack")},(0,a.createElement)("div",{className:u()("jetpack-block-width-controls",{"is-aligned":h})},!h&&(0,a.createElement)(i.ButtonGroup,{"aria-label":__("Percentage Width","jetpack")},m.map((e=>(0,a.createElement)(i.Button,{key:e,isSmall:!0,variant:e===n?"primary":void 0,onClick:()=>function(e){const t=n===e?void 0:e;c("%"),r(t)}(e)},e)))),(0,a.createElement)(i.__experimentalUnitControl,{isResetValueOnUnitChange:!0,max:"%"===l||n?.includes("%")?100:void 0,min:0,onChange:e=>r(e),onUnitChange:e=>c(e),size:"small",units:h?d:p,value:n})))}},97115:function(e,t,n){"use strict";n.d(t,{Vy:function(){return a},Wp:function(){return o},_5:function(){return i},tT:function(){return r}});const r="jetpack/media-source",o="is-playing",a="is-error",i="is-paused"},14688:function(e,t,n){"use strict";var r=n(9818),o=n(97115),a=n(66858);if(void 0!==r.createReduxStore){const e=(0,r.createReduxStore)(o.tT,a.Z);(0,r.register)(e)}else(0,r.registerStore)(o.tT,a.Z)},66858:function(e,t,n){"use strict";var r=n(97115);const o={sources:{},default:null},a={getDefaultMediaSource(e){let t=null;const n=Object.keys(e.sources);if(e.default?t=e.default:n?.length&&(t=e.sources[n[0]].id),t)return e.sources[t]},getMediaPlayerState(e,t){const n=t?e.sources?.[t]:a.getDefaultMediaSource(e);return n?.state},getMediaSourceCurrentTime(e,t){const n=t?e.sources?.[t]:a.getDefaultMediaSource(e);return n?.currentTime},getMediaSourceDuration(e,t){if(!t){const t=a.getDefaultMediaSource(e);return t?.duration}return e.sources?.[t]?.duration},getMediaSourceDomReference(e,t){const n=t?e.sources?.[t]:a.getDefaultMediaSource(e);if(!n)return;const r=n?.domId;return r?document.getElementById(r):void 0}},i={reducer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;const n=t.id||e.default||Object.keys(e.sources)?.[0];switch(t.type){case"REGISTER_MEDIA_SOURCE":return{...e,sources:{...e.sources,[t.id]:{id:t.id,...t.mediaSourceState}}};case"UPDATE_MEDIA_SOURCE_DATA":return{...e,sources:{...e.sources,[t.id]:{...e.sources[t.id],...t.data}}};case"UNREGISTER_MEDIA_SOURCE":{const n=Object.assign({},e);return n.sources[t.id]&&delete n.sources[t.id],t.id===e.default&&(n.default=Object.keys(e.sources)?.[0]),n}case"SET_DEFAULT_MEDIA_SOURCE":return{...e,default:t.id};case"SET_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[n]:{...e.sources[n],state:t.state}}};case"TOGGLE_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[n]:{...e.sources[n],state:e.sources[n].state===r.Wp?r._5:r.Wp}}};case"SET_MEDIA_PLAYER_CURRENT_TIME":return{...e,sources:{...e.sources,[n]:{...e.sources[n],currentTime:t.currentTime}}}}return e},actions:{registerMediaSource:(e,t)=>({type:"REGISTER_MEDIA_SOURCE",id:e,mediaSourceState:t}),updateMediaSourceData:(e,t)=>({type:"UPDATE_MEDIA_SOURCE_DATA",id:e,data:t}),unregisterMediaSource:e=>({type:"UNREGISTER_MEDIA_SOURCE",id:e}),setDefaultMediaSource:e=>({type:"SET_DEFAULT_MEDIA_SOURCE",id:e}),playMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:r.Wp}),toggleMediaSource:e=>({type:"TOGGLE_MEDIA_PLAYER_STATE",id:e}),pauseMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:r._5}),errorMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:r.Vy}),setMediaSourceCurrentTime:(e,t)=>({type:"SET_MEDIA_PLAYER_CURRENT_TIME",id:e,currentTime:t})},selectors:a};t.Z=i},6247:function(e,t,n){"use strict";n.r(t),n.d(t,{saveProduct:function(){return v},setApiState:function(){return f},setConnectUrl:function(){return m},setConnectedAccountDefaultCurrency:function(){return h},setProducts:function(){return d},setSiteSlug:function(){return g},setSubscriberCounts:function(){return b}});var r=n(25607),o=n(86989),a=n.n(o),i=n(65736),s=n(14436),l=n(51585),c=n(79162),u=n(23267),p=n(46529);const __=i.__,d=e=>({type:"SET_PRODUCTS",products:e}),m=e=>({type:"SET_CONNECT_URL",connectUrl:e}),h=e=>({type:"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY",connectedAccountDefaultCurrency:e}),f=e=>({type:"SET_API_STATE",apiState:e}),g=e=>({type:"SET_SITE_SLUG",siteSlug:e}),v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.Bn,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{},m=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return async s=>{let{dispatch:h,registry:f}=s;const{title:g,price:v,currency:b}=e;if(!g||0===g.length)return(0,p.q)((0,l.l)("product requires a name",t),f),void o(!1);const k=parseFloat(v),y=(0,c.hj)(b);if(k<y)return(0,p.q)((0,i.sprintf)( | |
| 17 | +__("Tier %d","jetpack"),t+1),onChange:e=>((e,t)=>{const r=[..._];r[t]=e,k("amounts",r)})(e,t),value:e},`jetpack-donations-amount-${t}`))}),m&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:b,onChange:e=>r({customAmountText:e})}),(0,l.jsx)(a.A,{currency:c,label:__("Custom amount","jetpack"),defaultValue:g??100*(0,i.dv)(c),className:"donations__custom-amount",disabled:!0})]}),(0,l.jsx)("hr",{className:"donations__separator"}),(0,l.jsx)(n.RichText,{tagName:"p",placeholder:__("Write a message…","jetpack"),value:y("extraText")??u.extraText,onChange:e=>k("extraText",e)}),(0,l.jsx)("div",{className:"wp-block-button donations__donate-button-wrapper",children:(0,l.jsx)(n.RichText,{className:"wp-block-button__link wp-element-button donations__donate-button",placeholder:__("Write a message…","jetpack"),value:y("buttonText")??u[v]?.buttonText,onChange:e=>{return t=e,void r({oneTimeDonation:{...d,buttonText:t},monthlyDonation:{...p,buttonText:t},annualDonation:{...h,buttonText:t}});var t},allowedFormats:x})})]})}},52244(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(86087),o=r(27723),s=r(13022),i=r(54806),a=r(32299),c=r(75703),l=r(10790);const __=o.__,u=e=>{const{attributes:t,products:r,setAttributes:o}=e,{oneTimeDonation:u,monthlyDonation:d,annualDonation:p,defaultInterval:h}=t,m=!1!==u.show,g=(0,c.fq)(m,d.show,p.show)??"one-time",f="one-time"===h&&m||"1 month"===h&&d.show||"1 year"===h&&p.show?h:g,[b,v]=(0,n.useState)(f),y=(0,n.useCallback)(e=>b===e,[b]),k={...m&&{"one-time":{title:__("One-Time","jetpack")}},...d.show&&{"1 month":{title:__("Monthly","jetpack")}},...p.show&&{"1 year":{title:__("Yearly","jetpack")}}};return(0,n.useEffect)(()=>{u.planId===r["one-time"]&&d.planId===r["1 month"]&&p.planId===r["1 year"]||o({...r["one-time"]&&{oneTimeDonation:{...u,planId:r["one-time"]}},...r["1 month"]&&{monthlyDonation:{...d,planId:r["1 month"]}},...r["1 year"]&&{annualDonation:{...p,planId:r["1 year"]}}})},[u,d,p,o,r]),(0,n.useEffect)(()=>{const e=(0,c.fq)(m,d.show,p.show);null!==e&&(!m&&y("one-time")&&v(e),!d.show&&y("1 month")&&v(e),!p.show&&y("1 year")&&v(e))},[m,d,p,v,y]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"donations__container",children:[Object.keys(k).length>1&&(0,l.jsx)("div",{className:"donations__nav",children:Object.entries(k).map(([e,{title:t}])=>(0,l.jsx)("div",{role:"button",tabIndex:0,className:(0,s.A)("donations__nav-item",{"is-active":y(e)}),onClick:()=>v(e),onKeyDown:()=>v(e),children:t},`jetpack-donations-nav-item-${e} `))}),(0,l.jsx)("div",{className:"donations__content",children:(0,l.jsx)(a.A,{activeTab:b,attributes:t,setAttributes:o})})]}),(0,l.jsx)(i.A,{...e})]})}},30746(e,t,r){"use strict";r.d(t,{Ay:()=>a});var n=r(27723),o=r(62060);const __=n.__,s="tips",i={variationName:s,displayMode:"modal",triggerSticky:!1,triggerButtonText:"Buy me a coffee",triggerIcon:"coffee",contentAlignment:"center",buttonAlignment:"full",tabsAppearance:"buttons",showCustomAmount:!1,chooseAmountText:"",annualDonation:{show:!1,planId:null,amounts:[3,5,8]},oneTimeDonation:{show:!0,planId:null,amounts:[3,5,8],defaultAmountIndex:0,heading:"",buttonText:"Buy coffee",extraText:"Thanks for your generosity!"},monthlyDonation:{show:!0,planId:null,amounts:[3,5,8],defaultAmountIndex:0,heading:"",buttonText:"Buy coffee",extraText:"Thanks for your generosity!"}},a={name:s,title:__("Tips","jetpack"),description:__("Get financial support from friends and followers.","jetpack"),icon:o.$f,isDefault:!1,attributes:i,scope:["inserter"],isActive:e=>e.variationName===s,keywords:[__("tips","jetpack"),__("coffee","jetpack"),__("support","jetpack"),__("buy me a coffee","jetpack")]}},75703(e,t,r){"use strict";function n(e,t,r){return e?"one-time":t?"1 month":r?"1 year":null}function o(){if("undefined"==typeof window)return{};const e=window.Jetpack_DonationsBlock?.defaultTexts;return"object"!=typeof e?{}:e}r.d(t,{OI:()=>o,fq:()=>n})},36850(e,t,r){"use strict";r.d(t,{GY:()=>o,_t:()=>n,gQ:()=>s});const n=/^\s*https?:\/\/(?:www\.)?(?:eventbrite\.[a-z.]+)\/e\/[^/]*?(\d+)\/?(?:\?[^/]*)?\s*$/i,o=/^\s*https?:\/\/(?:.+\.)?(?:eventbrite\.[a-z.]+)\/?(?:\?[^/]*)?\s*$/i,s="https://www.eventbrite.com/e/test-event-tickets-123456789"},79979(e,t,r){"use strict";r.d(t,{o:()=>l,s:()=>u});var n=r(56427),o=r(27723),s=r(24971),i=r(72660),a=r(10790);const __=o.__,_x=o._x,c=[{value:"inline",label:__("In-page Embed","jetpack"),preview:(0,a.jsx)("div",{className:"block-editor-block-preview__container",children:(0,a.jsx)("img",{src:i,alt:__("In page Eventbrite checkout example","jetpack")})})},{value:"modal",label:__("Button & Modal","jetpack")}],l=({setEditingUrl:e})=>(0,a.jsx)(n.ToolbarGroup,{children:(0,a.jsx)(n.ToolbarButton,{className:"components-toolbar__control",label:__("Edit URL","jetpack"),icon:"edit",onClick:()=>e(!0)})}),u=({attributes:e,clientId:t,setAttributes:r})=>(0,a.jsx)(s.A,{title:_x("Embed Type","option for how the embed displays on a page, e.g. inline or as a modal","jetpack"),clientId:t,styleOptions:c,onSelectStyle:r,activeStyle:e.style,attributes:e,viewportWidth:130})},77629(e,t,r){"use strict";r.d(t,{A:()=>n});const n=[r(84109).A]},84109(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(74997),s=r(27723),i=r(13022),a=r(66087),c=r(10790);const _x=s._x,l=["text","backgroundColor","textColor","customBackgroundColor","customTextColor","borderRadius"];const u={attributes:{url:{type:"string",validator:e=>!e||e.startsWith("http")},eventId:{type:"number"},useModal:{type:"boolean"},style:{type:"string"},text:{type:"string",default:_x("Register","verb: e.g. register for an event.","jetpack")},backgroundColor:{type:"string"},textColor:{type:"string"},customBackgroundColor:{type:"string"},customTextColor:{type:"string"},borderRadius:{type:"number"}},migrate:e=>{const{className:t,style:r}=e;let n=r;n||(n=e.useModal?"modal":"inline");const s={...Object.fromEntries(Object.entries(e).filter(([e])=>"useModal"!==e&&!l.includes(e))),className:t&&t.replace("is-style-outline",""),style:n},i=(0,a.pick)(e,l);return[s,[(0,o.createBlock)("jetpack/button",{element:"a",text:i.text||_x("Register","verb: e.g. register for an event.","jetpack"),...i,uniqueId:"eventbrite-widget-id",className:t&&-1!==t.indexOf("is-style-outline")?"is-style-outline":""})]]},save:function({attributes:e}){const{eventId:t,useModal:r,url:o,style:s}=e;if(t)return r||"modal"===s?function(e){const{backgroundColor:t,borderRadius:r,customBackgroundColor:o,customTextColor:s,eventId:a,text:l,textColor:u,url:d}=e,p=(0,n.getColorClassName)("color",u),h=(0,n.getColorClassName)("background-color",t),m=(0,i.A)("wp-block-button__link",{"has-text-color":u||s,[p]:p,"has-background":t||o,[h]:h,"no-border-radius":0===r}),g={backgroundColor:h?void 0:o,color:p?void 0:s,borderRadius:r?r+"px":void 0};return(0,c.jsx)("div",{className:"wp-block-button",children:(0,c.jsx)(n.RichText.Content,{className:m,href:d,id:`eventbrite-widget-${a}`,rel:"noopener noreferrer",role:"button",style:g,tagName:"a",target:"_blank",value:l})})}(e):o&&(0,c.jsx)("a",{className:"eventbrite__direct-link",href:o,children:o})},isEligible:(e,t)=>("modal"===e.style||e.useModal)&&((0,a.isEmpty)(t)||Object.entries(e).some(([e,t])=>t&&l.includes(e)))}},90397(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r(94715),o=r(56427),s=r(86087),i=r(27723),a=r(78218),c=r(56145),l=r(82306),u=r(36850),d=r(79979),p=r(51228),h=r(54492),m=r(87965),g=r(17158),f=(r(59357),r(10790));const __=i.__,_x=i._x,b={name:"jetpack/button",attributes:{element:"a",text:_x("Register","verb: e.g. register for an event.","jetpack"),uniqueId:"eventbrite-widget-id"}},v=(0,o.withNotices)(e=>{const{attributes:t,noticeOperations:r,onReplace:i,setAttributes:v}=e,{url:y,style:k}=t,w=(0,n.useBlockProps)(),[_,x]=(0,s.useState)(!1),[j,C]=(0,s.useState)(t.url||""),[A,S]=(0,s.useState)(!1),E=!A&&y&&!u._t.test(y),T=(0,s.useCallback)(()=>{r.removeAllNotices(),r.createErrorNotice((0,f.jsxs)(f.Fragment,{children:[__("Sorry, this content could not be embedded.","jetpack")," ",(0,f.jsx)(o.Button,{variant:"link",onClick:()=>(0,g.pG)(j,i),children:_x("Convert block to link","button label","jetpack")})]}))},[r,i,j]),N=(0,s.useCallback)(e=>{if(!e||u.gQ===e||"modal"===k)return;const t=(0,g.HE)(e);if(t){const n={eventId:t,url:e};(0,c.A)(n.url,S).then(e=>{const t=(0,a.y)(l.attributes,{...n,url:e});v(t),C(e),r.removeAllNotices()}).catch(()=>{v({eventId:void 0,url:void 0}),T()})}else T()},[k,r,T,v,C,S]);let P;return(0,s.useEffect)(()=>{N(y)},[y,N]),P=A?(0,f.jsx)(h.A,{}):_||!y||E?(0,f.jsx)(p.A,{...e,editedUrl:j,onChange:e=>C(e.target.value),onSubmit:e=>{e&&e.preventDefault(),N((0,g.pJ)(j)),x(!1)}}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(d.s,{...e}),(0,f.jsx)(n.BlockControls,{children:(0,f.jsx)(d.o,{setEditingUrl:x})}),"modal"===k?(0,f.jsx)(n.InnerBlocks,{template:[[b.name,b.attributes]],templateLock:"all"}):(0,f.jsx)(m.A,{...e})]}),(0,f.jsx)("div",{...w,children:P})})},34590(e,t,r){"use strict";var n=r(74997),o=r(94375),s=r(82306),i=r(36850),a=r(77629),c=r(90397),l=r(41958);(0,o.M)(s,{edit:c.A,save:l.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&(i._t.test(e.textContent)||i.GY.test(e.textContent)),transform:e=>(0,n.createBlock)("jetpack/eventbrite",{url:e.textContent.trim()})}]},deprecated:a.A})},51228(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(97999),o=r(85985),s=r(56427),i=r(27723),a=r(57273),c=r(82306),l=(r(17158),r(10790));const __=i.__,_x=i._x,u=(0,o.sh)(c),d=({className:e,noticeUI:t,editedUrl:r,onChange:o,onSubmit:i})=>{const c=(0,n.isWpcomPlatformSite)()?"http://support.wordpress.com/wordpress-editor/blocks/eventbrite-block/":"https://jetpack.com/support/jetpack-blocks/eventbrite-block/";return(0,l.jsx)("div",{className:e,children:(0,l.jsxs)(s.Placeholder,{label:__("Eventbrite Checkout","jetpack"),instructions:__("Paste a link to an Eventbrite event to embed ticket checkout.","jetpack"),icon:u,notices:t,children:[(0,l.jsxs)("form",{onSubmit:i,children:[(0,l.jsx)("input",{type:"url",value:r,className:"components-placeholder__input","aria-label":__("Eventbrite URL","jetpack"),placeholder:__("Enter an event URL to embed here…","jetpack"),onChange:o}),(0,l.jsx)(s.Button,{variant:"secondary",type:"submit",children:_x("Embed","submit button label","jetpack")})]}),(0,l.jsx)("div",{className:"components-placeholder__learn-more",children:(0,l.jsx)(a.N,{openInNewTab:!0,href:c,children:__("Learn more about Eventbrite embeds","jetpack")})})]})})}},54492(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(56427),o=r(27723),s=r(10790);const __=o.__,i=()=>(0,s.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,s.jsx)(n.Spinner,{}),(0,s.jsx)("p",{children:__("Embedding…","jetpack")})]})},87965(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=({className:e,attributes:t})=>{const{eventId:r}=t;if(!r)return;const s=`eventbrite-widget-${r}`,i=`\n\t\t\t<script src="https://www.eventbrite.com/static/widgets/eb_widgets.js"><\/script>\n\t\t\t<style>\n\t\t\t\t/* Prevent scrollbar on the embed preview */\n\t\t\t\tbody {\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t}\n\t\t\t\t/* Eventbrite embeds have a CSS height transition on loading, which causes <Sandbox>\n\t\t\t\tto not recognise the resizing. We need to disable that transition. */\n\t\t\t\t* {\n\t\t\t\t\ttransition: none !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<script>\n\t\t\t\twindow.EBWidgets.createWidget({\n\t\t\t\t\twidgetType: 'checkout',\n\t\t\t\t\teventId: ${r},\n\t\t\t\t\tiframeContainerId: '${s}',\n\t\t\t\t});\n\t\t\t<\/script>\n\t\t\t<div id="${s}"></div>\n\t\t`;return(0,o.jsxs)("div",{className:e,children:[(0,o.jsx)(n.SandBox,{html:i}),(0,o.jsx)("div",{className:"block-library-embed__interactive-overlay"})]})}},41958(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);function s({attributes:e}){const{eventId:t,style:r,url:s}=e;if(!t)return;let i;"modal"===r?i=(0,o.jsx)(n.InnerBlocks.Content,{}):s&&(i=(0,o.jsx)("a",{className:"eventbrite__direct-link",href:s,children:s}));const a=n.useBlockProps.save();return(0,o.jsx)("div",{...a,children:i})}},17158(e,t,r){"use strict";r.d(t,{HE:()=>a,pG:()=>i,pJ:()=>c});var n=r(74997),o=r(86087),s=r(10790);function i(e,t){const r=(0,s.jsx)("a",{href:e,children:e});t((0,n.createBlock)("core/paragraph",{content:(0,o.renderToString)(r)}))}function a(e){if(!e)return null;const t=e.match(/(\d+)\/?(?:\?[^/]*)?\s*$/);return t&&t[1]?parseInt(t[1],10):null}function c(e=""){return e&&"string"==typeof e?e.trim():null}},10167(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(56427),o=r(86087),s=r(27723),i=r(10790);const __=s.__;const a=(0,o.forwardRef)(function({onSubmit:e,onChange:t,value:r=""},o){return(0,i.jsxs)("form",{className:"wp-block-jetpack-gif_input-container",onSubmit:e,children:[(0,i.jsx)("input",{type:"text",className:"wp-block-jetpack-gif_input components-placeholder__input",placeholder:__("Enter search terms, e.g. cat…","jetpack"),value:r,onChange:t,ref:o,"aria-labelledby":"wp-block-jetpack-gif_search-button"}),(0,i.jsx)(n.Button,{id:"wp-block-jetpack-gif_search-button",variant:"secondary",type:"submit",children:__("Search","jetpack")})]})})},83690(e,t,r){"use strict";r.d(t,{T:()=>n});const n="t1PkR1Vq0mzHueIFBvZSZErgFs9NBmYW"},89635(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(94715),o=r(56427),s=r(10790);function i(){return(0,s.jsx)(n.InspectorControls,{children:(0,s.jsx)(o.PanelBody,{className:"components-panel__body-gif-branding",children:(0,s.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 202 22",children:[(0,s.jsx)(o.Path,{d:"M4.6 5.9H0v10h1.6v-3.1h3c4.8 0 4.8-6.9 0-6.9zm0 5.4h-3v-4h3c2.6.1 2.6 4 0 4zM51.2 12.3c2-.3 2.7-1.7 2.7-3.1 0-1.7-1.2-3.3-3.5-3.3h-4.6v10h1.6v-3.4h2.1l3 3.4h1.9l-.2-.3-3-3.3zM47.4 11V7.4h3c1.3 0 1.9.9 1.9 1.8s-.6 1.8-1.9 1.8h-3zM30.6 13.6L28 5.9h-1.1l-2.5 7.7-2.6-7.7H20l3.7 10H25l1.4-3.5L27.5 9l1.1 3.4 1.3 3.5h1.4l3.5-10h-1.7z"}),(0,s.jsx)(o.Path,{d:"M14.4 5.7c-3 0-5.1 2.2-5.1 5.2 0 2.6 1.6 5.1 5.1 5.1 3.5 0 5.1-2.5 5.1-5.2-.1-2.6-1.7-5.1-5.1-5.1zm-.1 8.9c-2.5 0-3.5-1.9-3.5-3.7 0-2.2 1.2-3.8 3.5-3.8 2.4 0 3.5 2 3.5 3.8.1 2-1 3.7-3.5 3.7zM57.7 11.6h5.5v-1.5h-5.5V7.4h5.7V5.9h-7.3v10h7.3v-1.6h-5.7zM38 14.3v-2.7h5.5v-1.5H38V7.4h5.7V5.9h-7.3v10h7.3v-1.6zM93 10.3l-2.7-4.4h-1.9V6l3.8 5.8v4.1h1.6v-4.1l4-5.8v-.1h-2zM69.3 5.9h-3.8v10h3.8c3.5 0 5.1-2.5 5-5.1-.1-2.5-1.6-4.9-5-4.9zm0 8.4h-2.2V7.4h2.2c2.3 0 3.4 1.7 3.4 3.4s-1 3.5-3.4 3.5zM86.3 10.7c.9-.4 1.4-1.1 1.4-2 0-2-1.5-2.8-3.4-2.8h-4.6v10h4.6c2 0 3.7-.7 3.7-2.8 0-.8-.5-2-1.7-2.4zm-5-3.4h3c1.2 0 1.8.7 1.8 1.4 0 .8-.6 1.3-1.8 1.3h-3V7.3zm3 7.1h-3v-2.9h3c.9 0 2.1.5 2.1 1.6 0 1-1.2 1.3-2.1 1.3zM113.9 13.3h5.3V16c-1.2.9-2.9 1.1-4 1.1-4.2 0-5.6-3.3-5.6-6 0-4.1 2.2-6.1 5.6-6.1 1.4 0 3.2.4 4.8 1.8l3.4-3.4C120.7.6 118.1 0 115.2 0c-7.8 0-11.4 5.6-11.4 11s3.1 10.9 11.4 10.9c4 0 7.6-1.4 8.9-4.1V8.6h-10.2v4.7zM171.9 8.5h-7.4V.6h-5.9v20.8h5.9v-7.8h7.4v7.8h5.9V.6h-5.9zM195.1.6l-4.5 7.1-4.3-7.1h-6.6v.2l7.9 12.3v8.3h5.9v-8.3L201.8.9V.6zM127.4.6h5.9v20.8h-5.9zM147.6.6h-10.1v20.8h5.9v-5.6h4.2c5.6-.1 8.3-3.4 8.3-7.6.1-4.1-2.7-7.6-8.3-7.6zm0 10.2h-4.2V5.6h4.2c1.6 0 2.5 1.2 2.5 2.6 0 1.4-.9 2.6-2.5 2.6z"})]})})})}},41221(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(85985),o=r(94715),s=r(56427),i=r(86087),a=r(27723),c=r(13022),l=r(5564),u=r(10167),d=r(89635),p=r(65465),h=r(38770),m=r(10790);const __=a.__,g=(0,n.sh)(l);const f=function({attributes:e,setAttributes:t,isSelected:r}){const{align:n,caption:a,giphyUrl:f,searchText:b,paddingTop:v}=e,[y,k]=(0,i.useState)(!1),w=(0,i.createRef)(),{isFetching:_,giphyData:x,fetchGiphyData:j}=(0,p.A)(),C=(0,o.useBlockProps)(),A=()=>{w.current.focus(),k(!1)};(0,i.useEffect)(()=>{!f&&x&&x[0]&&t((0,h.Er)(x[0]))},[f,x,t]);const S=async t=>{if(t.preventDefault(),!e.searchText||_)return;const r=await(0,h.ID)(e.searchText);r&&j(r)},E=e=>t({searchText:e.target.value});return(0,m.jsxs)("div",{...C,className:(0,c.A)(C.className,`align${n}`),children:[(0,m.jsx)(d.A,{}),f?(0,m.jsxs)("figure",{children:[r&&(0,m.jsx)(u.A,{onSubmit:S,onChange:E,value:b,ref:w}),r&&x&&x.length>1&&(0,m.jsx)("div",{className:"wp-block-jetpack-gif_thumbnails-container",children:x.map(e=>{const r={backgroundImage:`url(${e.images.downsized_still.url})`};return(0,m.jsx)("button",{className:"wp-block-jetpack-gif_thumbnail-container",onClick:r=>{r.preventDefault(),(e=>{t((0,h.Er)(e))})(e)},style:r},e.id)})}),(0,m.jsxs)("div",{className:"wp-block-jetpack-gif-wrapper",style:{paddingTop:v},children:[(0,m.jsx)("div",{className:"wp-block-jetpack-gif_cover",onClick:A,onKeyDown:A,role:"button",tabIndex:"0"}),(0,m.jsx)("iframe",{src:f,title:b})]}),(!o.RichText.isEmpty(a)||r)&&!!f&&(0,m.jsx)(o.RichText,{className:"wp-block-jetpack-gif-caption gallery-caption",inlineToolbar:!0,isSelected:y,onFocus:()=>k(!1),onChange:e=>t({caption:e}),placeholder:__("Write caption…","jetpack"),tagName:"figcaption",value:a})]}):(0,m.jsx)(s.Placeholder,{className:"wp-block-jetpack-gif_placeholder",icon:g,label:l.title,instructions:__("Search for a term or paste a Giphy URL","jetpack"),children:(0,m.jsx)(u.A,{onSubmit:S,onChange:E,value:b,ref:w})})]})}},55734(e,t,r){"use strict";var n=r(94375),o=r(5564),s=r(41221);r(27453),r(88561);(0,n.M)(o,{edit:s.A,save:()=>null})},65465(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(86087);const o=(e=[])=>{const[t,r]=(0,n.useState)(!1),[o,s]=(0,n.useState)(e),[i,a]=(0,n.useState)("");return(0,n.useEffect)(()=>{if(!i)return;(async()=>{r(!0);const e=await fetch(i).then(e=>!!e.ok&&e).catch(()=>!1);if(e){const t=await e.json(),r=void 0!==t.data.images?[t.data]:t.data;r[0].images&&s(r)}r(!1)})()},[i]),{isFetching:t,giphyData:o,fetchGiphyData:a}}},38770(e,t,r){"use strict";r.d(t,{Er:()=>d,ID:()=>c});var n=r(56145),o=r(83690);const s=e=>`https://api.giphy.com/v1/gifs/search?q=${encodeURIComponent(e)}&api_key=${encodeURIComponent(o.T)}&limit=10`,i=e=>`https://api.giphy.com/v1/gifs/${encodeURIComponent(e)}?api_key=${encodeURIComponent(o.T)}`,a=(e="",t)=>{const r=e.split(t);return r[r.length-1]},c=(e="")=>new Promise(t=>{let r=null;if((e=e.trim()).match(/^https:\/\/gph\.is\/(?:[a-zA-Z0-9]+\/)?[a-zA-Z0-9]+$/i))(0,n.A)(e).then(n=>{n.startsWith("https://giphy.com/gifs/")?(r=a(n,"-"),t(i(r))):t(s(e))}).catch(()=>t(s(e)));else{const n=/^https?:\/\/(media\.|i\.)?giphy\.com\/(embed|gifs|media)?\/?([-\w]*)(\/giphy)?(\.gif)?$/,o=e.match(n);o&&o[3]&&(r=a(o[3],"-")),r&&t(i(r)),t(s(e))}}),l=e=>`${Math.floor(e.images.original.height/e.images.original.width*100)}%`,u=e=>e?.embed_url,d=e=>({giphyUrl:u(e),paddingTop:l(e)})},55777(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(56427),o=r(27723),s=r(10790);const __=o.__,_x=o._x,i=e=>{const{className:t,embedValue:r,onChange:o,onSubmit:i}=e;return(0,s.jsx)(n.PanelBody,{title:__("Calendar settings","jetpack"),initialOpen:!1,children:(0,s.jsxs)("form",{onSubmit:i,className:t,children:[(0,s.jsx)("textarea",{type:"text",value:r,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:o}),(0,s.jsx)(n.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})]})})}},50259(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r(97999),o=r(85985),s=r(94715),i=r(74997),a=r(56427),c=r(29491),l=r(86087),u=r(27723),d=r(57273),p=r(26873),h=r(76862),m=r(55777),g=r(23972),f=r(10790);const __=u.__,_x=u._x,b=(0,o.sh)(h);const v=(0,c.compose)(a.withNotices,(0,p.withViewportMatch)({isMobile:"< small"}))(function(e){const{attributes:{url:t,height:r},isMobile:o,isSelected:c,name:u,noticeOperations:p,noticeUI:h,setAttributes:v}=e,y=(0,s.useBlockProps)(),[k,w]=(0,l.useState)(t||""),[_,x]=(0,l.useState)(!1),[j,C]=(0,l.useState)(!1);(0,l.useEffect)(()=>{!c&&j&&C(!1)},[c,j]);const A=()=>{C(!0)},S=e=>{e&&e.preventDefault();const t=(0,g.tW)(k.trim());if(!g._t.test(t.url))return p.removeAllNotices(),void p.createErrorNotice(__("Your calendar couldn't be embedded. Please double check your URL or Embed Code. Please note, you need to use the 'Public URL' or 'Embed Code', the 'Shareable Link' will not work.","jetpack"));v(t),x(!1),p.removeAllNotices()},E=(0,i.getBlockDefaultClassName)(u),T=`<iframe src="${t}" style="border:0" scrolling="no" frameborder="0" height="${o?"300":r}"></iframe>`,N=(0,f.jsx)(d.N,{openInNewTab:!0,href:"https://en.support.wordpress.com/google-calendar/",children:__("Enable Permissions for the calendar you want to share","jetpack")}),P=(0,f.jsx)(s.InspectorControls,{children:(0,f.jsx)(m.A,{className:`${E}-embed-form-sidebar`,embedValue:k,onChange:e=>w(e.target.value),onSubmit:S})});let B;if(_||!t){const e=(0,n.isWpcomPlatformSite)()?"https://en.support.wordpress.com/wordpress-editor/blocks/google-calendar/":"https://jetpack.com/support/jetpack-blocks/google-calendar/";B=(0,f.jsxs)(f.Fragment,{children:[P,(0,f.jsxs)(a.Placeholder,{label:__("Google Calendar","jetpack"),icon:b,notices:h,children:[(0,f.jsxs)("ol",{className:`${E}-placeholder-instructions`,children:[(0,f.jsx)("li",{children:N}),(0,f.jsx)("li",{children:__("Paste the embed code you copied from your Google Calendar below","jetpack")})]}),(R=`${E}-embed-form-editor`,(0,f.jsxs)("form",{onSubmit:S,className:R,children:[(0,f.jsx)("textarea",{type:"text",value:k,className:"components-placeholder__input","aria-label":__("Google Calendar URL or iframe","jetpack"),placeholder:__("Enter URL or iframe to embed here…","jetpack"),onChange:e=>w(e.target.value)}),(0,f.jsx)(a.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})]})),(0,f.jsx)("div",{className:`${E}-placeholder-links`,children:(0,f.jsx)(d.N,{openInNewTab:!0,href:e,children:__("Learn more","jetpack")})})]})]})}else B=(0,f.jsxs)(f.Fragment,{children:[P,(0,f.jsxs)("div",{children:[(0,f.jsx)(a.SandBox,{html:T,onFocus:A}),!j&&(0,f.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:A})]})]});var R;return(0,f.jsx)("div",{...y,children:B})})},29280(e,t,r){"use strict";var n=r(74997),o=r(94375),s=r(76862),i=r(50259),a=r(41700),c=r(23972);r(14647);(0,o.M)(s,{edit:i.A,save:a.A,transforms:{from:[{type:"shortcode",tag:"googleapps",isMatch:function(e){return"calendar"===e.named.domain},attributes:{url:{type:"string",shortcode:({named:{domain:e,dir:t,query:r}})=>`https://${e}.google.com/${t}?${r}`}}},{type:"raw",isMatch:e=>"P"===e.nodeName&&c._t.test(e.textContent),transform:e=>(0,n.createBlock)("jetpack/google-calendar",{url:e.textContent.trim()})},{type:"raw",isMatch:e=>"FIGURE"===e.nodeName&&c.fF.test(e.innerHTML),transform:e=>{const{url:t,height:r}=(0,c.HW)(e.innerHTML.trim());return(0,n.createBlock)("jetpack/google-calendar",{url:t,height:r})}}]}})},41700(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);const s=({attributes:{url:e}})=>{const t=n.useBlockProps.save();return(0,o.jsx)("a",{...t,href:e,children:e})};r.dn(s)},23972(e,t,r){"use strict";r.d(t,{HW:()=>l,_t:()=>o,fF:()=>s,tW:()=>u});const n="https?://calendar\\.google\\.com/calendar",o=new RegExp(`^${n}`,"i"),s=new RegExp(`<iframe((?:\\s+\\w+=(['"]).*?\\2)*)\\s+src=(["'])(${n}.*?)\\3((?:\\s+\\w+=(['"]).*?\\6)*)`,"i"),i=new RegExp(`${n}\\?cid=([-A-Za-z0-9+/]+={0,3})`,"i"),a=/\s+(\w+)=(["'])(.*?)\2/gi;function c(e){const t=i.exec(e);if(t)return"https://calendar.google.com/calendar/embed?src="+encodeURIComponent(atob(t[1]))}function l(e){const t=s.exec(e);if(!t)return;const r={};return t.forEach((e,t)=>{if(0===t)return;if(o.test(e))return void(r.url=e);let n;for(;null!==(n=a.exec(e));)r[n[1]]=n[3]}),{url:r.url,width:r.width,height:r.height}}function u(e){return s.test(e)?l(e):i.test(e)?{url:c(e)}:{url:e}}},80427(e,t,r){"use strict";r.d(t,{B:()=>o,V:()=>n});const n=30,o="jetpack-new-instagram-connection"},64874(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(56427),o=r(27723),s=r(57273),i=r(80427),a=r(10790);const __=o.__,_n=o._n;function c({accountImageTotal:e,attributes:t,currentUserConnected:r,disconnectFromService:c,shouldRenderSidebarNotice:l,setAttributes:u}){const{accessToken:d,columns:p,count:h,instagramUser:m,isStackedOnMobile:g,spacing:f}=t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.PanelBody,{title:__("Account Settings","jetpack"),children:[(0,a.jsxs)(n.PanelRow,{children:[(0,a.jsx)("span",{children:__("Account","jetpack")}),(0,a.jsxs)(s.N,{openInNewTab:!0,href:`https://www.instagram.com/${m}/`,children:["@",m]})]}),r&&(0,a.jsx)(n.PanelRow,{children:(0,a.jsx)(n.Button,{isDestructive:!0,variant:"link",onClick:()=>c(d),children:__("Disconnect your account","jetpack")})})]}),(0,a.jsxs)(n.PanelBody,{title:__("Display Settings","jetpack"),children:[l?(()=>{const t=e?(0,o.sprintf)(/* translators: %s: the number of posts. */ | |
| 18 | +_n("There is currently only %s post in your Instagram account.","There are currently only %s posts in your Instagram account.",e,"jetpack"),e):__("There are currently no posts in your Instagram account.","jetpack");return(0,a.jsx)("div",{className:"wp-block-jetpack-instagram-gallery__count-notice",children:(0,a.jsx)(n.Notice,{isDismissible:!1,status:"info",children:t})})})():null,(0,a.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of Posts","jetpack"),value:h,onChange:e=>u({count:e}),min:1,max:i.V}),(0,a.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of Columns","jetpack"),value:p,onChange:e=>u({columns:e}),min:1,max:6}),(0,a.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Image Spacing (px)","jetpack"),value:f,onChange:e=>u({spacing:e}),min:0,max:50}),(0,a.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Stack on mobile","jetpack"),checked:g,onChange:()=>u({isStackedOnMobile:!g})})]})]})}},17084(e,t,r){"use strict";r.d(t,{A:()=>y});var n=r(85985),o=r(94715),s=r(56427),i=r(86087),a=r(27723),c=r(13022),l=r(66087),u=r(78218),d=r(89525),p=r(80427),h=r(64874),m=r(37765),g=r(49783),f=r(53495),b=r(80619),v=(r(93726),r(10790));const __=a.__,y=(0,s.withNotices)(e=>{const t=(0,o.useBlockProps)(),{attributes:r,isSelected:a,noticeOperations:y,noticeUI:k,setAttributes:w}=e,{accessToken:_,align:x,columns:j,count:C,isStackedOnMobile:A,spacing:S}=r;(0,i.useEffect)(()=>{const e=(0,u.y)(d.attributes,r);(0,l.isEqual)(e,r)||w(e)},[r,w]);const[E,T]=(0,i.useState)(_),{isRequestingWpcomConnectUrl:N,wpcomConnectUrl:P}=(0,f.A)(),{images:B,isLoadingGallery:R,setImages:I}=(0,b.A)({accessToken:_,noticeOperations:y,setAttributes:w,setSelectedAccount:T}),{connectToService:D,disconnectFromService:L,isConnecting:F,isRequestingUserConnections:M,userConnections:O}=(0,g.A)({accessToken:_,noticeOperations:y,selectedAccount:E,setAttributes:w,setImages:I,setSelectedAccount:T}),U=(0,n.gB)(),z=C>B.length?B.length:C,$=!R&&(!_||(0,l.isEmpty)(B)),q=!$,H=_&&R&&(0,l.isEmpty)(B),V=!$&&!H,G=(0,c.A)(t.className,{[`align${x}`]:x}),W=(0,c.A)("wp-block-jetpack-instagram-gallery__grid",`wp-block-jetpack-instagram-gallery__grid-columns-${j}`,{"is-stacked-on-mobile":A}),Z={gridGap:S,"--latest-instagram-posts-spacing":S?`${S}px`:void 0},J={padding:S},K=e=>{if(B[e]){const t=B[e];return(0,v.jsx)(m.A,{alt:t.title||t.url,src:t.url,attributes:r,spacing:S})}return(0,v.jsx)("img",{alt:__("Latest Instagram Posts placeholder","jetpack"),src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNMyc2tBwAEOgG/c94mJwAAAABJRU5ErkJggg=="})},Y=()=>{E&&p.B!==E?w({accessToken:E,instagramUser:O.find(e=>e.token===E).username}):D()};return(0,v.jsxs)("div",{...t,className:G,children:[$&&(0,v.jsx)(s.Placeholder,{icon:"instagram",instructions:U?M||O.length?void 0:__("Connect to Instagram to start sharing your images.","jetpack"):__("First, you'll need to connect your WordPress.com account.","jetpack"),label:__("Latest Instagram Posts","jetpack"),notices:k,children:U?(()=>{const e=O.length>0,t=[...O.map(e=>({label:`@${e.username}`,value:e.token})),{label:__("Add a new account","jetpack"),value:p.B}],r=F||M||e&&!E;return(0,v.jsxs)("div",{children:[e&&(0,v.jsx)(s.RadioControl,{label:__("Select your Instagram account:","jetpack"),onChange:e=>T(e),options:t,selected:E}),p.B===E&&(0,v.jsx)("p",{className:"wp-block-jetpack-instagram-gallery__new-account-instructions",children:__("If you are currently logged in to Instagram on this device, you might need to log out of it first.","jetpack")}),(0,v.jsxs)(s.Button,{disabled:r,variant:"primary",onClick:Y,children:[F&&__("Connecting…","jetpack"),M&&__("Loading your connections…","jetpack"),!F&&!M&&__("Connect to Instagram","jetpack")]})]})})():(0,v.jsx)(s.Button,{disabled:N||!P,href:P,variant:"secondary",children:__("Connect to WordPress.com","jetpack")})}),H&&(0,v.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,v.jsx)(s.Spinner,{}),(0,v.jsx)("p",{children:__("Embedding…","jetpack")})]}),V&&(0,v.jsx)("div",{className:W,style:Z,children:Array.from(Array(a?C:z),(e,t)=>(0,v.jsx)("span",{className:(0,c.A)("wp-block-jetpack-instagram-gallery__grid-post"),style:J,children:K(t)},t))}),q&&(0,v.jsx)(o.InspectorControls,{children:(0,v.jsx)(h.A,{accountImageTotal:B.length,attributes:r,currentUserConnected:U,disconnectFromService:L,shouldRenderSidebarNotice:q&&!H&&B.length<C,setAttributes:w})})]})})},92585(e,t,r){"use strict";var n=r(74997),o=r(94375),s=r(89525),i=r(17084),a=r(90235);(0,o.M)(s,{edit:i.A,save:a.A,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"wpcom_instagram_widget"===e,transform:({instance:e})=>(0,n.createBlock)("jetpack/instagram-gallery",{columns:e.raw.columns,count:e.raw.count,accessToken:e.raw.token_id})}]}})},37765(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(86087),o=r(13022),s=r(10790);function i({src:e,alt:t,spacing:r}){const[i,a]=(0,n.useState)(!1),[c,l]=(0,n.useState)("auto"),u=(0,n.useRef)(void 0),d=()=>{a(!0),l("auto")};(0,n.useEffect)(()=>{const t=e;if(t){const e=new window.Image;e.src=t,e.onload=d}u.current&&l(u.current.parentNode.getBoundingClientRect().width)},[e]);const p=-1*r,h=(0,o.A)("wp-block-jetpack-instagram-gallery__placeholder",{"is-loaded":i}),m=i?{margin:p}:{margin:p,height:c},g=(0,o.A)({"is-loaded":i});return(0,s.jsx)("span",{style:m,className:h,children:(0,s.jsx)("img",{alt:t,className:g,ref:u,src:e})})}},90235(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);const s=({attributes:{instagramUser:e}})=>{const t=n.useBlockProps.save();return e&&(0,o.jsx)("div",{...t,children:(0,o.jsx)("a",{href:`https://www.instagram.com/${e}/`,rel:"noopener noreferrer",target:"_blank",children:`https://www.instagram.com/${e}/`})})};r.dn(s)},49783(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(85985),o=r(51119),s=r(1455),i=r.n(s),a=r(86087),c=r(27723),l=r(80427);const __=c.__;function u({accessToken:e,noticeOperations:t,selectedAccount:r,setAttributes:s,setImages:c,setSelectedAccount:u}){const[d,p]=(0,a.useState)(!1),[h,m]=(0,a.useState)(!1),[g,f]=(0,a.useState)([]),b=(0,n.gB)();(0,a.useEffect)(()=>{!e&&b&&(m(!0),i()({path:"/wpcom/v2/instagram-gallery/connections"}).then(e=>{m(!1),f(e)}).catch(()=>{m(!1),f([])}))},[e,b]),(0,a.useEffect)(()=>{l.B===r||g.find(e=>e.token===r)||u(void 0)},[r,u,g]);return{connectToService:()=>{t.removeAllNotices(),p(!0),i()({path:"/wpcom/v2/instagram-gallery/connect-url"}).then(e=>{const t=new o.A;t.open(e,"connect-to-instagram-popup","toolbar=0,location=0,menubar=0,"+t.getScreenCenterSpecs(700,700)),t.on("message",({keyring_id:e})=>{if(p(!1),e){const t=e.toString();s({accessToken:t}),u(t)}}),t.on("close",e=>{"connect-to-instagram-popup"===e&&p(!1)})}).catch(()=>{t.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),p(!1)})},disconnectFromService:()=>{t.removeAllNotices(),s({accessToken:void 0,instagramUser:void 0}),c([])},isConnecting:d,isRequestingUserConnections:h,userConnections:g}}},53495(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(85985),o=r(1455),s=r.n(o),i=r(47143),a=r(86087),c=r(93832);function l(){const{isAutoDraft:e}=(0,i.useSelect)(e=>{const{status:t}=e("core/editor").getCurrentPost();return{isAutoDraft:"auto-draft"===t}}),{savePost:t}=(0,i.useDispatch)("core/editor"),[r,o]=(0,a.useState)(),[l,u]=(0,a.useState)(!1),d=(0,n.gB)();return(0,a.useEffect)(()=>{d||r||l||(e?t():(u(!0),s()({path:(0,c.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then(e=>{o(e),u(!1)})))},[d,e,l,t,r]),{isRequestingWpcomConnectUrl:l,wpcomConnectUrl:r}}},80619(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(1455),o=r.n(n),s=r(86087),i=r(27723),a=r(93832),c=r(66087),l=r(80427);const __=i.__;function u({accessToken:e,noticeOperations:t,setAttributes:r,setSelectedAccount:n}){const[i,u]=(0,s.useState)([]),[d,p]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{e&&(t.removeAllNotices(),p(!0),o()({path:(0,a.addQueryArgs)("/wpcom/v2/instagram-gallery/gallery",{access_token:e,count:l.V})}).then(({external_name:e,images:o})=>{if(p(!1),!o||!Array.isArray(o))return t.createErrorNotice(__("An error occurred. Please try again later.","jetpack")),u([]),r({accessToken:void 0,instagramUser:void 0}),void n(void 0);(0,c.isEmpty)(o)&&t.createErrorNotice(__("No images were found in your Instagram account.","jetpack")),r({instagramUser:e}),u(o)}).catch(()=>{p(!1),u([]),r({accessToken:void 0,instagramUser:void 0}),n(void 0)}))},[e,r,n]),{images:i,isLoadingGallery:d,setImages:u}}},14737(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(56427),s=r(27723),i=r(13022),a=r(54790),c=r(10790);const __=s.__,l={name:"jetpack/button",attributes:{element:"button",text:__("Join my Mailchimp audience","jetpack"),uniqueId:"mailchimp-widget-id"}},u=({attributes:e,setAttributes:t,audition:r})=>{const{emailPlaceholder:s=a.Bd,consentText:u=a.Do,processingLabel:d=a.HD,successLabel:p=a.XO,errorLabel:h=a.Ys}=e,m={[a.k1]:d,[a.EM]:p,[a.Dc]:h}[r];return(0,c.jsxs)("div",{className:(0,i.A)({[`${a.j7}_notication-audition`]:r}),children:[(0,c.jsx)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,"aria-label":s,className:`${a.j7}_text-input`,disabled:!0,onChange:()=>!1,placeholder:s,title:__("You can edit the email placeholder in the sidebar.","jetpack"),type:"email"}),(0,c.jsx)(n.InnerBlocks,{template:[[l.name,l.attributes]],templateLock:"all"}),(0,c.jsx)(n.RichText,{tagName:"p",placeholder:__("Write consent text","jetpack"),value:u,onChange:e=>t({consentText:e}),inlineToolbar:!0}),r&&(0,c.jsx)("div",{className:`${a.j7}_notification ${a.j7}_${r}`,role:r===a.Dc?"alert":"status",children:m})]})}},54790(e,t,r){"use strict";r.d(t,{Bd:()=>d,Dc:()=>i,Do:()=>p,EM:()=>s,HD:()=>h,JA:()=>l,XO:()=>m,Ys:()=>g,an:()=>c,gI:()=>u,j7:()=>a,k1:()=>o});var n=r(27723);const __=n.__,o="processing",s="success",i="error",a="wp-block-jetpack-mailchimp",c=0,l=1,u=2,d=__("Enter your email","jetpack"),p=__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack"),h=__("Processing…","jetpack"),m=__("Success! You're on the list.","jetpack"),g=__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},99983(e,t,r){"use strict";r.d(t,{o:()=>p});var n=r(94715),o=r(56427),s=r(86087),i=r(27723),a=r(57273),c=r(54790),l=r(22258),u=r(10790);const __=i.__,d=({auditionNotification:e,clearAudition:t,setAttributes:r,emailPlaceholder:n=c.Bd,processingLabel:s=c.HD,successLabel:i=c.XO,errorLabel:d=c.Ys,interests:p,signupFieldTag:h,signupFieldValue:m,connectURL:g})=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(o.PanelBody,{title:__("Text Elements","jetpack"),children:(0,u.jsx)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Email Placeholder","jetpack"),value:n,onChange:e=>{r({emailPlaceholder:e}),t()}})}),(0,u.jsxs)(o.PanelBody,{title:__("Notifications","jetpack"),children:[(0,u.jsx)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Processing text","jetpack"),value:s,onChange:t=>{r({processingLabel:t}),e(c.k1)}}),(0,u.jsx)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Success text","jetpack"),value:i,onChange:t=>{r({successLabel:t}),e(c.EM)}}),(0,u.jsx)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Error text","jetpack"),value:d,onChange:t=>{r({errorLabel:t}),e(c.Dc)}})]}),(0,u.jsxs)(o.PanelBody,{title:__("Mailchimp Groups","jetpack"),children:[(0,u.jsx)(l.A,{interests:p,onChange:(e,t)=>{const n=[...new Set([...p,e])].filter(r=>!(r===e&&!t)&&r);r({interests:n})}}),(0,u.jsx)(a.N,{openInNewTab:!0,href:"https://mailchimp.com/help/send-groups-audience/",children:__("Learn about groups","jetpack")})]}),(0,u.jsxs)(o.PanelBody,{title:__("Signup Location Tracking","jetpack"),children:[(0,u.jsx)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Signup Field Tag","jetpack"),placeholder:__("SIGNUP","jetpack"),value:h,onChange:e=>r({signupFieldTag:e})}),(0,u.jsx)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Signup Field Value","jetpack"),placeholder:__("website","jetpack"),value:m,onChange:e=>r({signupFieldValue:e})}),(0,u.jsx)(a.N,{openInNewTab:!0,href:"https://mailchimp.com/help/determine-webpage-signup-location/",children:__("Learn about signup location tracking","jetpack")})]}),(0,u.jsx)(o.PanelBody,{title:__("Mailchimp Connection","jetpack"),children:(0,u.jsx)(a.N,{openInNewTab:!0,href:g,children:__("Manage Connection","jetpack")})})]}),p=({connectURL:e,attributes:t,setAttributes:r,setAudition:o})=>{const{emailPlaceholder:i=c.Bd,processingLabel:a=c.HD,successLabel:l=c.XO,errorLabel:p=c.Ys,interests:h,signupFieldTag:m,signupFieldValue:g}=t,f=(0,s.useRef)(null),b=()=>o(null);return(0,u.jsx)(n.InspectorControls,{children:(0,u.jsx)(d,{auditionNotification:e=>{o(e),f.current&&clearTimeout(f.current),f.current=setTimeout(b,3e3)},clearAudition:b,emailPlaceholder:i,processingLabel:a,successLabel:l,errorLabel:p,interests:h,setAttributes:r,signupFieldTag:m,signupFieldValue:g,connectURL:e})})}},31491(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(74997),o=r(27723),s=r(66087);const __=o.__,i=["submitButtonText","backgroundButtonColor","textButtonColor","submitButtonClasses","customBackgroundButtonColor","customTextButtonColor"],a={attributes:{emailPlaceholder:{type:"string",default:__("Enter your email","jetpack")},submitButtonText:{type:"string",default:__("Join my email list","jetpack")},backgroundButtonColor:{type:"string"},textButtonColor:{type:"string"},submitButtonClasses:{type:"string"},customBackgroundButtonColor:{type:"string"},customTextButtonColor:{type:"string"},consentText:{type:"string",default:__("By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time.","jetpack")},interests:{type:"array",default:[]},processingLabel:{type:"string",default:__("Processing…","jetpack")},signupFieldTag:{type:"string"},signupFieldValue:{type:"string"},successLabel:{type:"string",default:__("Success! You're on the list.","jetpack")},errorLabel:{type:"string",default:__("Whoops! There was an error and we couldn't process your subscription. Please reload the page and try again.","jetpack")},preview:{type:"boolean",default:!1}},migrate:e=>{const t=Object.fromEntries(Object.entries(e).filter(([e])=>!i.includes(e))),r={text:(o=e).submitButtonText||__("Join my email list","jetpack"),textColor:o.textButtonColor,customTextColor:o.customTextButtonColor,backgroundColor:o.backgroundButtonColor,customBackgroundColor:o.customBackgroundButtonColor};var o;return[t,[(0,n.createBlock)("jetpack/button",{element:"button",uniqueId:"mailchimp-widget-id",...r})]]},isEligible:(e,t)=>(0,s.isEmpty)(t)||Object.entries(e).some(([e,t])=>t&&i.includes(e)),save:()=>null}},321(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r(85985),o=r(1455),s=r.n(o),i=r(94715),a=r(56427),c=r(86087),l=r(93832),u=r(37120),d=r(14737),p=r(54790),h=r(99983),m=r(61800),g=r(17527),f=r(10790);const b=(0,n.sh)(u),v=(0,a.withNotices)(({attributes:e,setAttributes:t,notices:r,noticeUI:o,noticeOperations:a})=>{const u=(0,i.useBlockProps)(),[v,y]=(0,c.useState)(null),[k,w]=(0,c.useState)(p.an),[_,x]=(0,c.useState)(null),[j,C]=(0,c.useState)(null),A=(0,c.useCallback)(()=>{const e=(0,n.gB)();e?s()({path:"/wpcom/v2/mailchimp",method:"GET"}).then(({connect_url:t,code:r})=>{x(t),w("connected"===r?p.JA:p.gI),C(e)},({message:t})=>{x(null),w(p.gI),C(e),a.removeAllNotices(),a.createErrorNotice(t)}):s()({path:(0,l.addQueryArgs)("/jetpack/v4/connection/url",{from:"jetpack-block-editor",redirect:window.location.href})}).then(t=>{x(t),w(p.gI),C(e)})},[x,w,C,a]);let S;return(0,c.useEffect)(()=>{A()},[A]),e.preview?S=(0,f.jsx)(d.A,{attributes:e,setAttributes:t,audition:v}):k===p.an?S=(0,f.jsx)(m.A,{icon:b,notices:r}):k===p.gI?S=j?(0,f.jsx)(g.W,{icon:b,notices:r,connectURL:_,apiCall:A}):(0,f.jsx)(g.V,{icon:b,notices:r,connectURL:_}):k===p.JA&&(S=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.o,{connectURL:_,attributes:e,setAttributes:t,setAudition:y}),(0,f.jsx)(d.A,{attributes:e,setAttributes:t,audition:v})]})),(0,f.jsxs)("div",{...u,children:[o,S]})})},97618(e,t,r){"use strict";var n=r(94375),o=r(37120),s=r(31491),i=r(321),a=r(55378),c=r(47638);r(31369);(0,n.M)(o,{edit:i.A,save:a.A,deprecated:[s.A],transforms:c.A})},61800(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(56427),o=r(27723),s=r(54790),i=r(10790);const __=o.__,a=({icon:e,notices:t})=>(0,i.jsx)(n.Placeholder,{icon:e,notices:t,className:s.j7,label:__("Mailchimp","jetpack"),children:(0,i.jsx)("div",{className:"align-center",children:(0,i.jsx)(n.Spinner,{})})})},22258(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(1455),o=r.n(n),s=r(56427),i=r(86087),a=r(10790);class c extends i.Component{state={interest_categories:[]};componentDidMount(){this.retrieveGroups()}retrieveGroups=()=>{o()({method:"GET",path:"/wpcom/v2/mailchimp/groups"}).then(e=>{const{interest_categories:t}=e;this.setState({interest_categories:t})})};render=()=>{const{interest_categories:e}=this.state,{interests:t,onChange:r}=this.props;return(0,a.jsx)(i.Fragment,{children:e&&(e||[]).map(e=>e.interests.map(e=>(0,a.jsx)(s.CheckboxControl,{__nextHasNoMarginBottom:!0,label:e.name,value:e.id,checked:t.includes(e.id),onChange:t=>r(e.id,t)},e.id)))})}}const l=c;c.defaultProps={interests:[],onChange:()=>null}},17527(e,t,r){"use strict";r.d(t,{V:()=>c,W:()=>a});var n=r(56427),o=r(27723),s=r(54790),i=r(10790);const __=o.__,a=({icon:e,notices:t,connectURL:r,apiCall:o})=>(0,i.jsxs)(n.Placeholder,{className:s.j7,icon:e,label:__("Mailchimp","jetpack"),notices:t,instructions:__("You need to connect your Mailchimp account and choose an audience in order to start collecting Email subscribers.","jetpack"),children:[(0,i.jsx)(n.Button,{variant:"secondary",href:r,target:"_blank",children:(0,i.jsx)("span",{children:__("Set up Mailchimp form","jetpack")})}),(0,i.jsx)("div",{className:`${s.j7}-recheck`,children:(0,i.jsx)(n.Button,{variant:"link",onClick:o,children:(0,i.jsx)("span",{children:__("Re-check Connection","jetpack")})})})]}),c=({icon:e,notices:t,connectURL:r})=>(0,i.jsx)(n.Placeholder,{className:s.j7,icon:e,label:__("Mailchimp","jetpack"),notices:t,instructions:__("First, you'll need to connect your WordPress.com account.","jetpack"),children:(0,i.jsx)(n.Button,{variant:"secondary",href:r,children:__("Connect to WordPress.com","jetpack")})})},55378(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);const s=()=>{const e=n.useBlockProps.save();return(0,o.jsx)("div",{...e,children:(0,o.jsx)(n.InnerBlocks.Content,{})})};r.dn(s)},47638(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(74997);const o={to:[{type:"block",blocks:["jetpack/subscriptions"],transform:()=>(0,n.createBlock)("jetpack/subscriptions")}]}},4408(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(56427),o=r(86087),s=r(27723),i=r(2202),a=(r(30938),r(10790));const __=s.__;class c extends o.Component{render(){const{onClose:e,onAddPoint:t,onError:r,apiKey:o,mapProvider:s}=this.props;return(0,a.jsxs)(n.Button,{className:"component__add-point",children:[__("Add marker","jetpack"),(0,a.jsxs)(n.Popover,{className:"component__add-point__popover",position:"bottom center",children:[(0,a.jsx)(n.Button,{className:"component__add-point__close",onClick:e,children:(0,a.jsx)(n.Dashicon,{icon:"no"})}),(0,a.jsx)(i.A,{onAddPoint:t,label:__("Add a location","jetpack"),apiKey:o,onError:r,mapProvider:s})]})]})}}c.defaultProps={onAddPoint:()=>{},onClose:()=>{},onError:()=>{},mapProvider:"mapbox"};const l=c},67613(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(86087),o=r(15244),s=r(40347),i=r(10790);const a=(0,n.forwardRef)((e,t)=>{if("mapkit"===e.mapProvider){const r={...e,ref:null};return(0,i.jsx)(s.A,{...r,ref:t})}return(0,i.jsx)(o.A,{...e,ref:t})})},35977(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(9216),o=r(90135),s=r(10790);const i=e=>"mapkit"===e.mapProvider?(0,s.jsx)(o.A,{...e}):(0,s.jsx)(n.A,{...e})},9216(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(86087),o=r(16815);class s extends n.Component{componentDidMount(){const{mapboxgl:e}=this.props;this.el=document.createElement("DIV"),this.infowindow=(0,o.BY)(e),this.infowindow.setDOMContent(this.el),this.infowindow.on("close",this.closeClick)}componentDidUpdate(e){this.props.activeMarker!==e.activeMarker&&(this.props.activeMarker?this.openWindow():this.closeWindow())}render(){return this.el?(0,n.createPortal)(this.props.children,this.el):null}closeClick=()=>{this.props.unsetActiveMarker()};openWindow(){const{map:e,activeMarker:t}=this.props;this.infowindow.setLngLat(t.getPoint()).addTo(e)}closeWindow(){this.infowindow.remove()}}s.defaultProps={unsetActiveMarker:()=>{},activeMarker:null,map:null,mapboxgl:null};const i=s},90135(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(56427),o=r(86087),s=r(27723),i=r(5389),a=r(10790);const __=s.__,c=()=>{const{activeMarker:e,setActiveMarker:t,calloutReference:r,admin:s,points:c,setPoints:l}=(0,i.ST)(),[u,d]=(0,o.useState)(c),[p,h]=(0,o.useState)(!1),{title:m,caption:g}=u.find(t=>t.id===e?.id)||{},f=t=>{const r=c.map(r=>r.id===e.id?{...r,...t}:r);d(r),h(!0)};return(0,o.useEffect)(()=>{!e&&p&&l(u)},[e,p,u,l]),(0,o.useEffect)(()=>{d(c),h(!1)},[c]),e&&r?(0,o.createPortal)((0,a.jsxs)(o.Fragment,{children:[s&&(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(n.TextControl,{label:__("Marker Title","jetpack"),value:m,onChange:e=>f({title:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,a.jsx)(n.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:g,rows:"2",tag:"textarea",onChange:e=>f({caption:e}),__nextHasNoMarginBottom:!0}),(0,a.jsxs)(n.Button,{onClick:()=>{const r=c.filter(t=>t.id!==e.id);d(r),h(!0),t(null)},className:"wp-block-jetpack-map__delete-btn",children:[(0,a.jsx)(n.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack")]})]}),!s&&(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)("h3",{children:m}),(0,a.jsx)("p",{children:g})]})]}),r):null}},56099(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(86087),o=r(34377),s=r(16815);r(50221);class i extends n.Component{componentDidMount(){this.renderMarker()}componentWillUnmount(){this.marker&&(this.marker.remove(),this.marker=null)}componentDidUpdate(){this.renderMarker()}handleClick=()=>{const{onClick:e}=this.props;e(this)};getPoint=()=>{const{point:e}=this.props;return[e.coordinates.longitude,e.coordinates.latitude]};renderMarker(){const{map:e,point:t,mapboxgl:r,markerColor:n,mapRef:i}=this.props,{handleClick:a}=this,c=[t.coordinates.longitude,t.coordinates.latitude],{currentDoc:l}=(0,o.sG)(i.current),u=this.marker?this.marker.getElement():l.createElement("div");this.marker?this.marker.setLngLat(c):(u.className="wp-block-jetpack-map-marker",this.marker=new r.Marker(u).setLngLat(c).setOffset([0,-19]).addTo(e),this.marker.getElement().addEventListener("click",a)),(0,s.iU)(u,n)}render(){return null}}i.defaultProps={point:{},map:null,markerColor:"#000000",mapboxgl:null,onClick:()=>{}};const a=i},15244(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(56427),o=r(86087),s=r(27723),i=r(66087),a=r(34377),c=r(55740),l=r(82063),u=r(16815),d=r(91844),p=r(35977),h=r(56099),m=r(10790);const __=s.__;class g extends o.Component{constructor(){super(...arguments),this.state={map:null,fit_to_bounds:!1,loaded:!1,mapboxgl:null},this.mapRef=(0,o.createRef)(),this.debouncedSizeMap=(0,i.debounce)(this.sizeMap,250)}render(){const{points:e,admin:t,children:r,markerColor:s}=this.props,{map:i,activeMarker:a,mapboxgl:c}=this.state,{onMarkerClick:l,deleteActiveMarker:u,updateActiveMarker:d}=this,g=a?.props?.point||{},{title:f,caption:b}=g,v=o.Children.map(r,e=>{const t=e?.props?.tagName;if("AddPoint"===t)return e}),y=i&&c&&e.map((e,t)=>(0,m.jsx)(h.A,{mapRef:this.mapRef,point:e,index:t,map:i,mapboxgl:c,markerColor:s,onClick:l},t)),k=c&&(0,m.jsxs)(p.A,{activeMarker:a,map:i,mapboxgl:c,unsetActiveMarker:()=>this.setState({activeMarker:null}),children:[a&&t&&(0,m.jsxs)(o.Fragment,{children:[(0,m.jsx)(n.TextControl,{label:__("Marker Title","jetpack"),value:f,onChange:e=>d({title:e}),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,m.jsx)(n.TextareaControl,{className:"wp-block-jetpack-map__marker-caption",label:__("Marker Caption","jetpack"),value:b,rows:"2",tag:"textarea",onChange:e=>d({caption:e}),__nextHasNoMarginBottom:!0}),(0,m.jsxs)(n.Button,{onClick:u,className:"wp-block-jetpack-map__delete-btn",children:[(0,m.jsx)(n.Dashicon,{icon:"trash",size:"15"})," ",__("Delete Marker","jetpack")]})]}),a&&!t&&(0,m.jsxs)(o.Fragment,{children:[(0,m.jsx)("h3",{children:f}),(0,m.jsx)("p",{children:b})]})]});return(0,m.jsxs)(o.Fragment,{children:[(0,m.jsx)("div",{className:"wp-block-jetpack-map__gm-container",ref:this.mapRef,children:y}),k,v]})}componentDidMount(){const{apiKey:e}=this.props;e&&this.loadMapLibraries()}componentWillUnmount(){this.debouncedSizeMap.cancel(),window.removeEventListener("resize",this.debouncedSizeMap)}componentDidUpdate(e){const{admin:t,apiKey:r,children:n,points:o,mapStyle:s,mapDetails:i,scrollToZoom:a,showFullscreenButton:c}=this.props,{map:l,fullscreenControl:u}=this.state;r&&r.length>0&&r!==e.apiKey&&this.loadMapLibraries(),n!==e.children&&!1!==n&&this.clearCurrentMarker(),o!==e.points&&this.setBoundsByMarkers(),o.length!==e.points.length&&this.clearCurrentMarker(),s===e.mapStyle&&i===e.mapDetails||l.setStyle(this.getMapStyle()),a!==e.scrollToZoom&&(a?l.scrollZoom.enable():l.scrollZoom.disable()),c!==e.showFullscreenButton&&(c?(l.addControl(u),t&&u._fullscreenButton&&(u._fullscreenButton.disabled=!0)):l.removeControl(u))}onMarkerClick=e=>{const{onMarkerClick:t}=this.props;this.setState({activeMarker:e}),t()};onMapClick=()=>{this.setState({activeMarker:null})};clearCurrentMarker=()=>{this.setState({activeMarker:null})};updateActiveMarker=e=>{const{points:t}=this.props,{activeMarker:r}=this.state,{index:n}=r.props,o=t.slice(0);Object.assign(o[n],e),this.props.onSetPoints(o)};deleteActiveMarker=()=>{const{points:e}=this.props,{activeMarker:t}=this.state,{index:r}=t.props,n=e.slice(0);n.splice(r,1),this.props.onSetPoints(n),this.setState({activeMarker:null})};sizeMap=()=>{const{mapHeight:e}=this.props,{map:t}=this.state,r=this.mapRef.current;(0,d.A)(r,e),t.resize(),this.setBoundsByMarkers()};updateZoom=()=>{const{zoom:e}=this.props,{map:t}=this.state;t.setZoom(e)};setBoundsByMarkers=()=>{const{admin:e,onSetMapCenter:t,onSetZoom:r,points:n,zoom:o}=this.props,{map:s,activeMarker:i,mapboxgl:a,zoomControl:c,boundsSetProgrammatically:l}=this.state;if(!s)return;if(n.length&&e?s.dragPan.disable():s.dragPan.enable(),!n.length)return;if(i)return;const d=(0,u.ES)(a,n);if(t(d.getCenter()),n.length>1){(0,u._t)(s,d),this.setState({boundsSetProgrammatically:!0});try{s.removeControl(c)}catch{}}else{if(s.setCenter(d.getCenter()),l){const e=12;s.setZoom(e),r(e)}else s.setZoom(parseInt(o,10));s.addControl(c),this.setState({boundsSetProgrammatically:!1})}};getMapStyle(){const{mapStyle:e,mapDetails:t}=this.props;return(0,l.o)(e,t)}getMapType(){const{mapStyle:e}=this.props;switch(e){case"satellite":return"HYBRID";case"terrain":return"TERRAIN";default:return"ROADMAP"}}scriptsLoaded=()=>{const{mapCenter:e,points:t}=this.props;this.setState({loaded:!0}),t.length,this.initMap(e)};loadMapLibraries(){const{apiKey:e}=this.props,{currentWindow:t}=(0,a.sG)(this.mapRef.current),r={"mapbox-gl-js":()=>{(0,a.Cu)(t,"mapboxgl").then(t=>{t.accessToken=e,this.setState({mapboxgl:t},this.scriptsLoaded)})}};(0,a.a$)(c,r,this.mapRef.current)}initMap(e){const{mapboxgl:t}=this.state,{zoom:r,onMapLoaded:n,onError:o,scrollToZoom:s,showFullscreenButton:i,admin:a}=this.props;let c=null;try{c=new t.Map({container:this.mapRef.current,style:this.getMapStyle(),center:(0,u.jF)(e),zoom:parseInt(r,10),pitchWithRotate:!1,attributionControl:!1,dragRotate:!1})}catch(e){return void o("mapbox_error",e.message)}s||c.scrollZoom.disable();const l=new t.FullscreenControl;c.on("error",e=>{o("mapbox_error",e.error.message)});const d=new t.NavigationControl({showCompass:!1,showZoom:!0});c.on("zoomend",()=>{this.props.onSetZoom(c.getZoom())}),c.on("moveend",()=>{const{onSetMapCenter:e,points:t}=this.props;t.length<1&&e(c.getCenter())}),c.getCanvas().addEventListener("click",this.onMapClick),this.setState(({map:e})=>{try{e?.remove()}catch{}return{map:c,zoomControl:d,fullscreenControl:l}},()=>{this.debouncedSizeMap(),c.addControl(d),i&&(c.addControl(l),a&&l._fullscreenButton&&(l._fullscreenButton.disabled=!0)),this.mapRef.current.addEventListener("alignmentChanged",this.debouncedSizeMap),c.resize(),n(),this.setState({loaded:!0}),window.addEventListener("resize",this.debouncedSizeMap)})}}g.defaultProps={points:[],mapStyle:"default",zoom:13,onSetZoom:()=>{},onSetMapCenter:()=>{},onMapLoaded:()=>{},onMarkerClick:()=>{},onError:()=>{},markerColor:"red",apiKey:null,mapCenter:{},address:null};const f=g},40347(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(86087),o=r(39698),s=r(5389),i=r(42470),a=r(35977),c=r(10790);const l=(0,n.forwardRef)(({admin:e,points:t=[],mapStyle:r="default",zoom:i=13,onSetZoom:l=()=>{},onSetMapCenter:d=()=>{},onMapLoaded:p=()=>{},onMarkerClick:h=()=>{},onError:m=()=>{},markerColor:g="red",mapCenter:f={},mapHeight:b=400,address:v=null,onSetPoints:y,children:k},w)=>{const{loaded:_,error:x,mapkit:j,currentDoc:C,currentWindow:A}=(0,s.PC)(w),{map:S}=(0,s.I3)(j,_,w),E=n.Children.map(k,e=>{const t=e?.props?.tagName;if("AddPoint"===t)return e}),[T,N]=(0,n.useState)(!1);(0,n.useEffect)(()=>{x&&m("mapkit_error",x)},[x,m]);return(0,n.useEffect)(()=>{const e=e=>{w.current.contains(e.target)||N(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[w]),(0,c.jsxs)(o.u,{value:{mapkit:j,map:S,loaded:_,currentDoc:C,currentWindow:A,admin:e,points:t,setPoints:y},children:[_&&j&&S?(0,c.jsx)(u,{address:v,mapCenter:f,mapStyle:r,zoom:i,onSetMapCenter:d,onSetZoom:l,onSetPoints:y,points:t,markerColor:g,onMarkerClick:h,onMapLoaded:p}):null,(0,c.jsxs)("div",{style:{height:b?`${b}px`:"400px",position:"relative"},className:"wp-block-jetpack-map__mapkit-wrapper",ref:w,onClick:()=>{N(!0)},children:[!T&&(0,c.jsx)("div",{className:"wp-block-jetpack-map__select-overlay"}),(0,c.jsx)("div",{className:"wp-block-jetpack-map__gm-container",style:{height:`${b}px`,position:"absolute",pointerEvents:T?"auto":"none"}})]}),E,(0,c.jsx)(a.A,{mapProvider:"mapkit"})]})}),u=(0,n.memo)(({address:e=null,mapCenter:t={},mapStyle:r="default",zoom:o=13,onSetMapCenter:a=()=>{},onSetZoom:c=()=>{},onSetPoints:l=()=>{},points:u=[],markerColor:d="red",onMarkerClick:p=()=>{},onMapLoaded:h=()=>{}})=>{const{map:m,mapkit:g,setActiveMarker:f,setPreviousCenter:b,setCalloutReference:v,currentDoc:y}=(0,s.ST)(),k=(0,n.useRef)(p),w=(0,n.useRef)(l),_=(0,n.useCallback)(e=>{f(e),b(m.center),k.current&&k.current(e),m.setCenterAnimated(new g.Coordinate(e.coordinates.latitude,e.coordinates.longitude))},[m,g,f,b,k]);return(0,s.FN)(t,a),(0,s.y7)(r),(0,s.LR)(o,c),(0,s.$H)(u,d,(0,i.K5)(y,v),_),(0,s.bY)(h),(0,s.wB)(e=>{f(null),e&&m.setCenterAnimated(e)}),(0,s.mA)(e,w),null}),d=l},5171(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(56427),s=r(27723),i=r(57273),a=r(20104),c=r(10790);const __=s.__,l=(0,c.jsx)(o.SVG,{width:"14",height:"20",viewBox:"0 0 14 20",xmlns:"http://www.w3.org/2000/svg",children:(0,c.jsx)(o.G,{id:"Page-1",fill:"none",fillRule:"evenodd",children:(0,c.jsxs)(o.G,{id:"outline-add_location-24px",transform:"translate(-5 -2)",children:[(0,c.jsx)(o.Polygon,{id:"Shape",points:"0 0 24 0 24 24 0 24"}),(0,c.jsx)(o.Path,{d:"M12,2 C8.14,2 5,5.14 5,9 C5,14.25 12,22 12,22 C12,22 19,14.25 19,9 C19,5.14 15.86,2 12,2 Z M7,9 C7,6.24 9.24,4 12,4 C14.76,4 17,6.24 17,9 C17,11.88 14.12,16.19 12,18.88 C9.92,16.21 7,11.85 7,9 Z M13,6 L11,6 L11,8 L9,8 L9,10 L11,10 L11,12 L13,12 L13,10 L15,10 L15,8 L13,8 L13,6 Z",id:"Shape",fill:"#000",fillRule:"nonzero"})]})})}),u=({attributes:e,setAttributes:t,apiKey:r,apiKeySource:s,apiKeyControl:u,onKeyChange:d,context:p,mapRef:h,minHeight:m,removeAPIKey:g,updateAPIKey:f,setPointVisibility:b,mapProvider:v})=>"toolbar"===p?(0,c.jsx)(o.ToolbarGroup,{children:(0,c.jsx)(o.ToolbarButton,{icon:l,label:__("Add a marker","jetpack"),onClick:b})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.PanelColorSettings,{title:__("Colors","jetpack"),initialOpen:!0,colorSettings:[{value:e.markerColor,onChange:e=>t({markerColor:e}),label:__("Marker","jetpack")}]}),(0,c.jsxs)(o.PanelBody,{title:__("Settings","jetpack"),children:[(0,c.jsx)(o.__experimentalNumberControl,{label:__("Height in pixels","jetpack"),value:e.mapHeight||"",min:m,onChange:e=>{t({mapHeight:e})},size:"__unstable-large",step:10}),(0,c.jsx)(o.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Zoom level","jetpack"),help:e.points.length>1&&__("The default zoom level cannot be changed when there are two or more markers on the map.","jetpack"),disabled:e.points.length>1,value:Math.round(e.zoom),onChange:e=>{t({zoom:e}),h.current&&h.current.updateZoom&&setTimeout(h.current.updateZoom,0)},min:0,max:22}),"mapbox"===v?(0,c.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Show labels","jetpack"),checked:e.mapDetails,onChange:e=>t({mapDetails:e})}):null,(0,c.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Scroll to zoom","jetpack"),help:__("Allow the map to capture scrolling, and zoom in or out.","jetpack"),checked:e.scrollToZoom,onChange:e=>t({scrollToZoom:e})}),"mapbox"===v?(0,c.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Show Fullscreen Button","jetpack"),help:__("Allow your visitors to display the map in fullscreen.","jetpack"),checked:e.showFullscreenButton,onChange:e=>t({showFullscreenButton:e})}):null]}),e.points.length?(0,c.jsx)(o.PanelBody,{title:__("Markers","jetpack"),initialOpen:!1,children:(0,c.jsx)(a.A,{points:e.points,onChange:e=>{t({points:e})}})}):null,"mapbox"===v?(0,c.jsxs)(o.PanelBody,{title:__("Mapbox Access Token","jetpack"),initialOpen:!1,children:[(0,c.jsx)(o.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,help:"wpcom"===s&&(0,c.jsxs)(c.Fragment,{children:[__("You can optionally enter your own access token.","jetpack")," ",(0,c.jsx)(i.N,{openInNewTab:!0,href:"https://account.mapbox.com/access-tokens/",children:__("Find it on Mapbox","jetpack")})]}),label:__("Mapbox Access Token","jetpack"),value:u,onChange:d}),(0,c.jsx)("div",{className:"jetpack-map-token-settings",children:(0,c.jsxs)(o.__experimentalToggleGroupControl,{isBlock:!0,__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,children:[(0,c.jsx)(o.__experimentalToggleGroupControlOption,{className:"components-button jetpack-update-token-button",label:__("Update Token","jetpack"),value:"update",onClick:f,disabled:!u||u===r}),(0,c.jsx)(o.__experimentalToggleGroupControlOption,{className:"components-button is-secondary",label:__("Remove Token","jetpack"),value:"remove",onClick:g,disabled:"wpcom"===s})]})})]}):null]});r.dn(u)},1807(e,t,r){"use strict";r.d(t,{A:()=>n});const n={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:r,...n}=e;return{...n,showFullscreenButton:!0,className:t}},save:r(37670).A}},37670(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(86087),o=r(10790);class s extends n.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:r,mapDetails:n,points:s,zoom:i,mapCenter:a,markerColor:c,scrollToZoom:l,mapHeight:u}=e,d=s.map((e,t)=>{const{longitude:r,latitude:n}=e.coordinates,s="https://www.google.com/maps/search/?api=1&query="+n+","+r;return(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:s,children:e.title})},t)}),p=t?`align${t}`:null;return(0,o.jsx)("div",{className:p,"data-map-style":r,"data-map-details":n,"data-points":JSON.stringify(s),"data-zoom":i,"data-map-center":JSON.stringify(a),"data-marker-color":c,"data-scroll-to-zoom":l||null,"data-map-height":u||null,children:s.length>0&&(0,o.jsx)("ul",{children:d})})}}const i=s},43402(e,t,r){"use strict";r.d(t,{A:()=>n});const n={attributes:{align:{type:"string"},points:{type:"array",default:[]},mapDetails:{type:"boolean",default:!0},zoom:{type:"integer",default:13},mapCenter:{type:"object",default:{longitude:-122.41941550000001,latitude:37.7749295}},mapStyle:{type:"string",default:"default"},markerColor:{type:"string",default:"red"},scrollToZoom:{type:"boolean",default:!1},mapHeight:{type:"integer"},showFullscreenButton:{type:"boolean",default:!0}},migrate:e=>{const t=((e.className||"").replace(/is-style-[^ ]+/,"")+` is-style-${e.mapStyle}`).replace(/\s+/g," ").trim(),{mapStyle:r,...n}=e;return{...n,className:t}},save:r(47083).A}},47083(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(86087),o=r(10790);class s extends n.Component{render(){const{attributes:e}=this.props,{align:t,mapStyle:r,mapDetails:n,points:s,zoom:i,mapCenter:a,markerColor:c,scrollToZoom:l,mapHeight:u,showFullscreenButton:d}=e,p=s.map((e,t)=>{const{longitude:r,latitude:n}=e.coordinates,s="https://www.google.com/maps/search/?api=1&query="+n+","+r;return(0,o.jsx)("li",{children:(0,o.jsx)("a",{href:s,children:e.title})},t)}),h=t?`align${t}`:null;return(0,o.jsx)("div",{className:h,"data-map-style":r,"data-map-details":n,"data-points":JSON.stringify(s),"data-zoom":i,"data-map-center":JSON.stringify(a),"data-marker-color":c,"data-scroll-to-zoom":l||null,"data-map-height":u||null,"data-show-fullscreen-button":d||null,children:s.length>0&&(0,o.jsx)("ul",{children:p})})}}const i=s},34549(e,t,r){"use strict";r.d(t,{A:()=>C});var n=r(85985),o=r(1455),s=r.n(o),i=r(94715),a=r(56427),c=r(29491),l=r(47143),u=r(86087),d=r(27723),p=r(57273),h=r(90907),m=r(4408),g=r(6852),f=r(67613),b=r(5171),v=r(2905),y=r(25836),k=r(62393),w=r(44950),_=r(10790);const __=d.__,x=(0,n.sh)(g),j={top:!1,right:!1,bottom:!0,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},C=(0,c.compose)(a.withNotices)(({setAttributes:e,attributes:t,noticeUI:r,notices:n,isSelected:o,noticeOperations:c})=>{const{address:d,align:g,mapDetails:C,points:A,zoom:S,mapCenter:E,markerColor:T,mapHeight:N,showFullscreenButton:P}=t,{toggleSelection:B}=(0,l.useDispatch)("core/block-editor"),{isPreviewMode:R}=(0,l.useSelect)(e=>{const{getSettings:t}=e(i.store);return{isPreviewMode:t().isPreviewMode}},[]),[I,D]=(0,u.useState)(!1),[L,F]=(0,u.useState)(0),[M,O]=(0,u.useState)(null),[U,z]=(0,u.useState)(null),[$,q]=(0,u.useState)(null),[H,V]=(0,u.useState)(null),G=(0,u.useRef)(null),W=(0,i.useBlockProps)(),{className:Z}=W,J=(0,h.D)(k.A,Z),K=(0,w.A)({mapStyle:J}),Y=()=>{d&&M&&"mapkit"!==K&&(0,v.I)(d,M).then(t=>{if(t.features?.length){const r=t.features[0],n=[{title:r.text,placeTitle:r.text,caption:r.place_name,id:r.id,coordinates:{latitude:r.center[1],longitude:r.center[0]}}];e({points:n})}else re(null,__("Could not find the coordinates of the provided address. Displaying default location. Feel free to add the location manually.","jetpack"))}).catch(e=>re(null,e.message))},Q=(e=null,t="GET")=>new Promise((r,n)=>{const o="/wpcom/v2/service-api-keys/mapbox",i=e?{path:o,method:t,data:{service_api_key:e}}:{path:o,method:t};V(!0),s()(i).then(({service_api_key:e,service_api_key_source:t})=>{c.removeAllNotices(),F(e?2:1),O(e),z("wpcom"===t?"":e),q(t),V(!1),r()},({message:e})=>{re(null,e),F(1),V(!1),n()})}),X=t=>{if(A.some(e=>e.id===t.id))return;const r=A.slice(0);r.push(t),e({points:r}),D(!1)},ee=()=>{c.removeAllNotices(),U&&Q(U,"POST")},te=()=>Q(null,"DELETE"),re=(e,t)=>{c.removeAllNotices(),c.createErrorNotice(t)},ne=(t,r,n,o)=>{B(!0);const s=G?.current?.mapRef??G;if(s){const t=parseInt(s.current.offsetHeight+o.height,10);e({mapHeight:t}),s.current.sizeMap&&setTimeout(s.current.sizeMap,0)}};let oe;if((0,u.useEffect)(()=>{"mapbox"===K?Q().then(Y):F(2)},[]),(0,u.useEffect)(()=>{if(!G.current?.sizeMap)return;const e=setTimeout(G.current.sizeMap,0);return()=>clearTimeout(e)},[g]),(0,u.useEffect)(Y,[d]),(0,u.useEffect)(()=>{Z&&!M&&(F(0),Q())},[Z]),R){const e=k.A.find(e=>e.name===J);oe=(0,_.jsx)("div",{children:(0,_.jsx)("img",{alt:__("Map Preview","jetpack"),src:e?e.preview:y,style:{width:"100%",height:N||"400px",objectFit:"cover"}})})}else if(0===L)oe=(0,_.jsx)(a.Placeholder,{icon:x,children:(0,_.jsx)(a.Spinner,{})});else if(1===L)oe=(0,_.jsx)(a.Placeholder,{icon:x,label:__("Map","jetpack"),notices:n,children:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("p",{className:"components-placeholder__instructions",children:[__("To use the map block, you need an Access Token.","jetpack"),(0,_.jsx)("br",{}),(0,_.jsx)(p.N,{openInNewTab:!0,href:"https://www.mapbox.com",children:__("Create an account or log in to Mapbox.","jetpack")}),(0,_.jsx)("br",{}),__("Locate and copy the default access token. Then, paste it into the field below.","jetpack")]}),(0,_.jsxs)("form",{children:[(0,_.jsx)("input",{type:"text",className:"components-placeholder__input",disabled:H,placeholder:__("Paste Token Here","jetpack"),value:U,onChange:e=>z(e.target.value)}),(0,_.jsx)(a.Button,{variant:"secondary",disabled:H||!U||U.length<1,onClick:ee,children:__("Set Token","jetpack")})]})]})});else if(2===L){const r=e=>z(e),n=o&&A.length<=1;oe=(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(i.BlockControls,{children:(0,_.jsx)(b.A,{attributes:t,setAttributes:e,apiKey:M,apiKeySource:$,apiKeyControl:U,onKeyChange:r,setPointVisibility:()=>D(!0),context:"toolbar",mapProvider:K})}),(0,_.jsx)(i.InspectorControls,{children:(0,_.jsx)(b.A,{attributes:t,setAttributes:e,apiKey:M,apiKeySource:$,apiKeyControl:U,onKeyChange:r,mapRef:G,minHeight:400,removeAPIKey:te,updateAPIKey:ee,mapProvider:K})}),(0,_.jsx)(a.ResizableBox,{size:{height:N||"auto",width:"100%"},grid:[10,10],showHandle:o,minHeight:400,enable:j,onResizeStart:()=>B(!1),onResizeStop:ne,children:(0,_.jsx)("div",{className:"wp-block-jetpack-map__map_wrapper",children:(0,_.jsx)(f.A,{ref:G,address:d,scrollToZoom:n,showFullscreenButton:P,mapStyle:J||"default",mapDetails:C,mapHeight:N,points:A,zoom:S,mapCenter:E,markerColor:T,onSetZoom:t=>{e({zoom:t})},admin:!0,apiKey:M,onSetPoints:t=>e({points:t}),onSetMapCenter:t=>e({mapCenter:t}),onMapLoaded:()=>D(!A.length),onMarkerClick:()=>D(!1),onError:re,mapProvider:K,children:o&&I&&(0,_.jsx)(m.A,{onAddPoint:X,onClose:()=>D(!1),apiKey:M,onError:re,tagName:"AddPoint",mapProvider:K})})})})]})}return(0,_.jsxs)("div",{...W,children:[r,oe]})})},12742(e,t,r){"use strict";var n=r(94375),o=r(6852),s=r(1807),i=r(43402),a=r(34549),c=r(20974),l=r(62393);r(64525),r(2753);(0,n.M)(o,{edit:a.A,save:c.A,styles:l.A,deprecated:[i.A,s.A]})},2905(e,t,r){"use strict";function n(e,t){return fetch(`https://api.mapbox.com/geocoding/v5/mapbox.places/${encodeURIComponent(e)}.json?access_token=${encodeURIComponent(t)}`).then(e=>e.json())}r.d(t,{I:()=>n})},2202(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(64597),o=r(3094),s=r(10790);const i=e=>{const t="mapbox"===e.mapProvider?n.A:o.A;return(0,s.jsx)(t,{...e})}},64597(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(56427),o=r(86087),s=r(27723),i=r(97602),a=r(10790);const c=(0,s.__)("Add a marker…","jetpack");class l extends o.Component{constructor(){super(...arguments),this.textRef=(0,o.createRef)(),this.containerRef=(0,o.createRef)(),this.state={isEmpty:!0},this.autocompleter={name:"placeSearch",options:this.search,isDebounced:!0,getOptionLabel:e=>(0,a.jsx)("span",{children:e.place_name}),getOptionKeywords:e=>[e.place_name],getOptionCompletion:this.getOptionCompletion}}componentDidMount(){setTimeout(()=>{this.containerRef.current.querySelector("input").focus()},50)}getOptionCompletion=e=>{const{value:t}=e,r={placeTitle:t.text,title:t.text,caption:t.place_name,id:t.id,coordinates:{longitude:t.geometry.coordinates[0],latitude:t.geometry.coordinates[1]}};return this.props.onAddPoint(r),t.text};search=e=>{const{apiKey:t,onError:r}=this.props,n="https://api.mapbox.com/geocoding/v5/mapbox.places/"+encodeURI(e)+".json?access_token="+t;return new Promise(function(e,t){const o=new XMLHttpRequest;o.open("GET",n),o.onload=function(){if(200===o.status){const t=JSON.parse(o.responseText);e(t.features)}else{const e=JSON.parse(o.responseText);r(e.statusText,e.responseJSON.message),t(new Error("Mapbox Places Error"))}},o.send()})};onReset=()=>{this.textRef.current.value=null};render(){const{label:e}=this.props;return(0,a.jsx)("div",{ref:this.containerRef,children:(0,a.jsx)("div",{className:"components-location-search",children:(0,a.jsx)(i.A,{completer:this.autocompleter,onReset:this.onReset,children:({isExpanded:t,listBoxId:r,activeId:o,onChange:s,onKeyDown:i})=>(0,a.jsx)(n.TextControl,{label:e,placeholder:c,ref:this.textRef,onChange:s,"aria-expanded":t,"aria-owns":r,"aria-activedescendant":o,onKeyDown:i,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})})})}}l.defaultProps={onError:()=>{}};const u=l},3094(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(56427),o=r(86087),s=r(27723),i=r(97602),a=r(5389),c=r(10790);const l=(0,s.__)("Add a marker…","jetpack"),u=({label:e,onAddPoint:t})=>{const r=(0,o.useRef)(void 0),s=(0,o.useRef)(void 0),{mapkit:u}=(0,a.ST)(),d=new u.Search({includePointsOfInterest:!1}),p={name:"placeSearch",options:async e=>new Promise(function(t,r){d.autocomplete(e,(e,n)=>{if(e)return void r(e);const o=(n?.results.filter(e=>e.coordinate)??[]).map(e=>({...e,placeName:e.displayLines?.join(", "),original:e}));t(o)})}),isDebounced:!0,getOptionLabel:e=>(0,c.jsx)("span",{children:e.placeName}),getOptionKeywords:e=>[e.placeName],getOptionCompletion:e=>{const{value:r}=e,n={placeTitle:r.placeName,title:r.placeName,caption:r.placeName,coordinates:{longitude:r.coordinate.longitude,latitude:r.coordinate.latitude},id:`${r.placeName} ${Number(r.coordinate.latitude).toFixed(2)} ${Number(r.coordinate.longitude).toFixed(2)}`};return d.search(r.original,(e,r)=>{if(!e){const{places:e}=r;if(e.length>0){const t=e[0];n.coordinates={longitude:t.coordinate.longitude,latitude:t.coordinate.latitude}}}t(n)}),r.placeName}};return(0,o.useEffect)(()=>{setTimeout(()=>{r.current.querySelector("input").focus()},50)},[]),(0,c.jsx)("div",{ref:r,children:(0,c.jsx)("div",{className:"components-location-search",children:(0,c.jsx)(i.A,{completer:p,onReset:()=>{s.current.value=""},children:({isExpanded:t,listBoxId:r,activeId:o,onChange:i,onKeyDown:a})=>(0,c.jsx)(n.TextControl,{label:e,placeholder:l,ref:s,onChange:i,"aria-expanded":t,"aria-owns":r,"aria-activedescendant":o,onKeyDown:a,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})})})}},20104(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(56427),o=r(86087),s=(r(52918),r(10790));class i extends o.Component{constructor(){super(...arguments),this.state={selectedCell:null}}onDeletePoint=e=>{const t=parseInt(e.target.getAttribute("data-id")),{points:r,onChange:n}=this.props,o=r.slice(0);o.splice(t,1),n(o)};setMarkerField(e,t,r){const{points:n,onChange:o}=this.props,s=n.slice(0);s[r][e]=t,o(s)}render(){const{points:e}=this.props,t=e.map((e,t)=>(0,s.jsxs)(n.PanelBody,{title:e.placeTitle,initialOpen:!1,children:[(0,s.jsx)(n.TextControl,{label:"Marker Title",value:e.title,onChange:e=>this.setMarkerField("title",e,t),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,s.jsx)(n.TextareaControl,{label:"Marker Caption",value:e.caption,rows:"3",onChange:e=>this.setMarkerField("caption",e,t),__nextHasNoMarginBottom:!0}),(0,s.jsxs)(n.Button,{"data-id":t,onClick:this.onDeletePoint,className:"component__locations__delete-btn",children:[(0,s.jsx)(n.Dashicon,{icon:"trash",size:"15"})," Delete Marker"]})]},e.id));return(0,s.jsx)("div",{className:"component__locations",children:(0,s.jsx)(n.Panel,{className:"component__locations__panel",children:t})})}}i.defaultProps={points:Object.freeze([]),onChange:()=>{}};const a=i},97602(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r(56427),o=r(29491),s=r(86087),i=r(27723),a=r(48558),c=r(13022),l=r(66087),u=r(10790);const __=i.__,_n=i._n;function d(e=[],t=10){const r=[];for(let n=0;n<e.length;n++){const o=e[n];if(r.push(o),r.length===t)break}return r}class p extends s.Component{static getInitialState(){return{selectedIndex:0,query:void 0,filteredOptions:[],isOpen:!1}}constructor(){super(...arguments),this.debouncedLoadOptions=(0,l.debounce)(this.loadOptions,250),this.state=this.constructor.getInitialState()}componentWillUnmount(){this.debouncedLoadOptions.cancel()}select=e=>{const{completer:t}=this.props;(t.getOptionCompletion||{})(e),this.reset()};reset=()=>{this.setState(this.constructor.getInitialState())};handleFocusOutside(){this.reset()}loadOptions(e,t){const{options:r}=e,n=this.activePromise=Promise.resolve("function"==typeof r?r(t):r).then(t=>{if(n!==this.activePromise)return;const r=t.map((t,r)=>({key:`${r}`,value:t,label:e.getOptionLabel(t),keywords:e.getOptionKeywords?e.getOptionKeywords(t):[]})),o=d(r),s=o.length===this.state.filteredOptions.length?this.state.selectedIndex:0;this.setState({options:r,filteredOptions:o,selectedIndex:s,isOpen:o.length>0}),this.announce(o)})}onChange=e=>{const{completer:t}=this.props,{options:r}=this.state;if(!e)return void this.reset();t&&(t.isDebounced?this.debouncedLoadOptions(t,e):this.loadOptions(t,e));const n=t?d(r):[];t&&this.setState({selectedIndex:0,filteredOptions:n,query:e})};onKeyDown=e=>{const{isOpen:t,selectedIndex:r,filteredOptions:n}=this.state;if(!t)return;let o;switch(e.keyCode){case a.UP:o=(0===r?n.length:r)-1,this.setState({selectedIndex:o});break;case a.DOWN:o=(r+1)%n.length,this.setState({selectedIndex:o});break;case a.ENTER:this.select(n[r]);break;case a.LEFT:case a.RIGHT:case a.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()};announce(e){const{debouncedSpeak:t}=this.props;t&&(e.length?t((0,i.sprintf)(/* translators: %d: the number of results. */ | |
| 19 | +_n("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"jetpack","jetpack"),e.length),"assertive"):t(__("No results.","jetpack"),"assertive"))}render(){const{onChange:e,onKeyDown:t}=this,{children:r,instanceId:o,completer:s}=this.props,{selectedIndex:i,filteredOptions:a}=this.state,{key:l=""}=a[i]||{},{className:d}=s,p=a.length>0,h=p?`components-autocomplete-listbox-${o}`:null,m=p?`components-autocomplete-item-${o}-${l}`:null;return(0,u.jsxs)("div",{className:"components-autocomplete",children:[r({isExpanded:p,listBoxId:h,activeId:m,onChange:e,onKeyDown:t}),p&&(0,u.jsx)(n.Popover,{focusOnMount:!1,onClose:this.reset,position:"top center",className:"components-autocomplete__popover",noArrow:!0,children:(0,u.jsx)("div",{id:h,role:"listbox",className:"components-autocomplete__results",children:a.map((e,t)=>(0,u.jsx)(n.Button,{id:`components-autocomplete-item-${o}-${e.key}`,role:"option","aria-selected":t===i,disabled:e.isDisabled,className:(0,c.A)("components-autocomplete__result",d,{"is-selected":t===i}),onClick:()=>this.select(e),children:e.label},e.key))})})]})}}const h=(0,o.compose)([n.withSpokenMessages,o.withInstanceId,n.withFocusOutside])(p)},82063(e,t,r){"use strict";function n(e,t){return{default:{details:"mapbox://styles/automattic/cjolkhmez0qdd2ro82dwog1in",no_details:"mapbox://styles/automattic/cjolkci3905d82soef4zlmkdo"},black_and_white:{details:"mapbox://styles/automattic/cjolkixvv0ty42spgt2k4j434",no_details:"mapbox://styles/automattic/cjolkgc540tvj2spgzzoq37k4"},satellite:{details:"mapbox://styles/mapbox/satellite-streets-v10",no_details:"mapbox://styles/mapbox/satellite-v9"},terrain:{details:"mapbox://styles/automattic/cjolkf8p405fh2soet2rdt96b",no_details:"mapbox://styles/automattic/cjolke6fz12ys2rpbpvgl12ha"}}[e][t?"details":"no_details"]}r.d(t,{o:()=>n})},16815(e,t,r){"use strict";r.d(t,{BY:()=>a,ES:()=>o,_t:()=>s,iU:()=>i,jF:()=>n});const n=e=>Object.hasOwn(e,"lat")&&Object.hasOwn(e,"lng")?e:{lat:e.latitude||0,lng:e.longitude||0};function o(e,t){const r=new e.LngLatBounds;return t.forEach(e=>{r.extend([e.coordinates.longitude,e.coordinates.latitude])}),r}function s(e,t){e.fitBounds(t,{padding:{top:80,bottom:80,left:40,right:40}})}function i(e,t){e.innerHTML='\n\t\t<svg version="1.1" viewBox="0 0 32 38" xmlns="http://www.w3.org/2000/svg">\n\t\t\t<path d="m16 38s16-11.308 16-22-7.1634-16-16-16-16 5.3076-16 16 16 22 16 22z"/>\n\t\t</svg>\n\t',e.querySelector("path").setAttribute("fill",CSS.supports("color",t)?t:"red")}function a(e){return new e.Popup({closeButton:!0,closeOnClick:!1,offset:{left:[0,0],top:[0,5],right:[0,0],bottom:[0,-40]}})}},42470(e,t,r){"use strict";r.d(t,{IR:()=>u,K5:()=>c,Sm:()=>i,Yc:()=>l,c6:()=>s,nQ:()=>a});var n=r(34377);function o(e){return Math.abs(6371e3*Math.cos(e*Math.PI/180)*2*Math.PI/256)}function s(e,t){return 512/Math.pow(2,e)*.5*o(t)}function i(e,t){const r=e/o(t);return Math.log2(512/(r/.5))}function a(e,t){if(0===t.length)return null;const r=new e.Coordinate(-90,180),n=new e.Coordinate(90,-180);t.forEach(e=>{r.latitude=Math.max(r.latitude,e.coordinates.latitude),r.longitude=Math.min(r.longitude,e.coordinates.longitude),n.latitude=Math.min(n.latitude,e.coordinates.latitude),n.longitude=Math.max(n.longitude,e.coordinates.longitude)});const o=new e.Coordinate(r.latitude-.5*(r.latitude-n.latitude),r.longitude+.5*(n.longitude-r.longitude)),s=new e.CoordinateSpan(1.3*Math.abs(r.latitude-n.latitude),1.3*Math.abs(n.longitude-r.longitude));return new e.CoordinateRegion(o,s)}function c(e,t){return()=>{const r=e.createElement("div");return r.classList.add("mapkit-popup-content"),t(r),r}}function l(e,t){return new Promise(r=>{if(t.mapkitScriptIsLoading)(0,n.Cu)(t,"mapkit").then(e=>{r(e)});else{t.mapkitScriptIsLoading=!0;const o=e.createElement("script");o.addEventListener("load",async()=>{const e=await(0,n.Cu)(t,"mapkit");t.mapkitScriptIsLoading=!1,r(e)},{once:!0}),o.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",o.crossOrigin="anonymous",e.head.appendChild(o)}})}function u(e,t,r){return new Promise((t,n)=>{r.mapkitIsInitialized?t():r.mapkitIsInitializing?function(e){return new Promise((t,r)=>{const n=()=>{void 0===e.mapkitIsInitializing?r():!1===e.mapkitIsInitializing?t():e.requestAnimationFrame(n)};n()})}(r).then(()=>{t()}):(r.mapkitIsInitializing=!0,r.mapkitIsInitialized=!1,e.init({authorizationCallback:async e=>{try{const o=await fetch("https://public-api.wordpress.com/wpcom/v2/mapkit");if(200===o.status){e((await o.json()).wpcom_mapkit_access_token)}else n();r.mapkitIsInitializing=!1,r.mapkitIsInitialized=!0,t()}catch{n()}}}))})}},39698(e,t,r){"use strict";r.d(t,{C:()=>s,u:()=>i});var n=r(86087),o=r(10790);const s=(0,n.createContext)({map:null,mapkit:null,loaded:!1,activeMarker:null,calloutReference:null,currentDoc:null,currentWindow:null,admin:!1,setPoints:()=>{},points:[],previousCenter:null}),i=({value:e,children:t})=>{const[r,i]=(0,n.useState)(null),[a,c]=(0,n.useState)(null),[l,u]=(0,n.useState)(null);return(0,o.jsx)(s.Provider,{value:{...e,activeMarker:r,setActiveMarker:i,calloutReference:a,setCalloutReference:c,previousCenter:l,setPreviousCenter:u},children:t})}},5389(e,t,r){"use strict";r.d(t,{$H:()=>b,FN:()=>m,I3:()=>h,LR:()=>f,PC:()=>p,ST:()=>d,bY:()=>v,mA:()=>k,wB:()=>y,y7:()=>g});var n=r(39384),o=r(47143),s=r(86087),i=r(27723),a=r(66087),c=r(34377),l=r(42470),u=r(39698);const __=i.__,d=()=>(0,s.useContext)(u.C),p=e=>{const[t,r]=(0,s.useState)(!1),[i,a]=(0,s.useState)(!1),[u,d]=(0,s.useState)(null),[p,h]=(0,s.useState)(null),[m,g]=(0,s.useState)(null);return(0,s.useEffect)(()=>{const t=(0,o.select)(n.CONNECTION_STORE_ID).getBlogId(),{currentDoc:s,currentWindow:i}=(0,c.sG)(e.current);if(e.current){h(i),g(s);const e=__("Failed to retrieve a Mapkit API token. Please try refreshing.","jetpack");i.mapkit?(d(i.mapkit),(0,l.IR)(i.mapkit,t,i).then(()=>{r(!0)},()=>{a(e)})):(0,l.Yc)(s,i).then(n=>{d(n),(0,l.IR)(n,t,i).then(()=>{r(!0)},()=>{a(e)})})}},[e]),{loaded:t,error:i,mapkit:u,currentDoc:m,currentWindow:p}},h=(e,t,r)=>{const[n,o]=(0,s.useState)(null);return(0,s.useEffect)(()=>{e&&t&&o(new e.Map(r.current,{showsMapTypeControl:!1}))},[e,t,r]),{map:n}},m=(e,t)=>{const{mapkit:r,map:n}=d(),o=(0,s.useRef)(e),i=(0,s.useRef)(t);(0,s.useEffect)(()=>{if(!r||!n||!o.current)return;const e=o.current?.lat??o.current?.latitude,t=o.current?.lng??o.current?.longitude;"number"==typeof e&&"number"==typeof t&&(n.center=new r.Coordinate(e,t))},[r,n,o]),(0,s.useEffect)(()=>{if(!r||!n)return;const e=()=>{if(n.center){const{latitude:e,longitude:t}=n.center;i.current({lat:e,lng:t})}};return n.addEventListener("region-change-end",(0,a.debounce)(e,1e3)),()=>{n.removeEventListener("region-change-end",e)}},[r,n,i])},g=e=>{const{mapkit:t,map:r}=d();(0,s.useEffect)(()=>{t&&r&&(r.mapType=(()=>{switch(e){case"satellite":return t.Map.MapTypes.Satellite;case"black_and_white":return t.Map.MapTypes.MutedStandard;case"hybrid":return t.Map.MapTypes.Hybrid;default:return t.Map.MapTypes.Standard}})())},[t,r,e])},f=(e,t)=>{const{mapkit:r,map:n,points:o}=d();(0,s.useEffect)(()=>{if(r&&n)if(o&&o.length<=1){const t=(0,l.c6)(13,n.center.latitude);if(e){const t=(0,l.c6)(e,n.center.latitude);t!==n.cameraDistance&&(n.cameraDistance=t)}else t!==n.cameraDistance&&(n.cameraDistance=t);n.isZoomEnabled=!0,n.isScrollEnabled=!0}else n.region=(0,l.nQ)(r,o),n.isZoomEnabled=!1,n.isScrollEnabled=!1},[r,n,e,o]),(0,s.useEffect)(()=>{const e=()=>{t((0,l.Sm)(n.cameraDistance,n.center.latitude))};return n.addEventListener("zoom-end",e),()=>{n.removeEventListener("zoom-end",e)}},[r,n,t])},b=(e,t,r=null,n=null)=>{const{mapkit:o,map:i,loaded:a,currentWindow:c}=d(),l=(0,s.useRef)(r),u=(0,s.useRef)(n);(0,s.useEffect)(()=>{if(a){i.annotations.filter(t=>!e.find(e=>e.id===t.data.id)).forEach(e=>i.removeAnnotation(e));const r=e.map(e=>{const r=i.annotations.find(t=>t.data.id===e.id);if(r)return r.title=e.title,r.color=t,r;const n=new o.MarkerAnnotation(new o.Coordinate(e.coordinates.latitude,e.coordinates.longitude),{color:t,data:{id:e.id}});return n.calloutEnabled=!0,n.title=e.title,l.current&&(n.callout={calloutElementForAnnotation:l.current}),u.current&&n.addEventListener("select",()=>u.current(e,i)),n});i.annotations.length!==r.length&&i.showItems(new c.Array(...r))}},[e,a,i,o,t,l,u,c])},v=e=>{const{map:t,loaded:r}=d(),n=(0,s.useRef)(e);(0,s.useEffect)(()=>{r&&n.current(t)},[r,t,n])},y=e=>{const{map:t,previousCenter:r,loaded:n}=d(),o=(0,s.useRef)(e);(0,s.useEffect)(()=>{n&&t.addEventListener("single-tap",()=>{o.current(r)})},[n,t,r,o])},k=(e,t)=>{const{mapkit:r,map:n}=d();(0,s.useEffect)(()=>{if(r&&n&&e?.length){(new r.Geocoder).lookup(e,(e,r)=>{if(r?.results?.length){const e=r.results[0],n=e.formattedAddress,o={placeTitle:n,title:n,caption:n,coordinates:{longitude:e.coordinate.longitude,latitude:e.coordinate.latitude},id:`${n} ${Number(e.coordinate.latitude).toFixed(2)} ${Number(e.coordinate.longitude).toFixed(2)}`};t.current([o])}})}},[r,n,e,t])}},20974(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(94715),o=r(13022),s=r(90907),i=r(62393),a=r(10790);const c=({attributes:e})=>{const{align:t,mapDetails:r,points:c,zoom:l,mapCenter:u,markerColor:d,scrollToZoom:p,mapHeight:h,showFullscreenButton:m}=e,g=n.useBlockProps.save(),{className:f}=g,b=(0,s.D)(i.A,f),v=c.map((e,t)=>{const{longitude:r,latitude:n}=e.coordinates,o="https://www.google.com/maps/search/?api=1&query="+n+","+r;return(0,a.jsx)("li",{children:(0,a.jsx)("a",{href:o,children:e.title})},t)});return(0,a.jsx)("div",{...g,className:(0,o.A)(f,t?`align${t}`:null),"data-map-style":b,"data-map-details":r,"data-points":JSON.stringify(c),"data-zoom":l,"data-map-center":JSON.stringify(u),"data-marker-color":d,"data-scroll-to-zoom":p||null,"data-map-height":h||null,"data-show-fullscreen-button":m||null,children:c.length>0&&(0,a.jsx)("ul",{children:v})})}},62393(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r(27723),o=r(93797),s=r(49364),i=r(77971),a=r(98430),c=r(27415),l=r(72386),u=r(92747),d=r(44950);const __=n.__,p=(0,d.A)(),h=[{name:"default",label:__("Basic","jetpack"),preview:"mapkit"===p?a:i,isDefault:!0},{name:"black_and_white",label:"mapkit"===p?__("Muted","jetpack",0):__("Black & White","jetpack"),preview:"mapkit"===p?s:o},{name:"satellite",label:__("Satellite","jetpack"),preview:"mapkit"===p?l:c},{name:"terrain",label:__("Terrain","jetpack"),preview:u}]},44950(e,t,r){"use strict";r.d(t,{A:()=>n});const n=e=>{if(e?.mapStyle&&["terrain"].includes(e.mapStyle))return"mapbox";const t=function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()}("map_provider");return t||(window&&"string"==typeof window.Jetpack_Maps?.provider&&["mapbox","mapkit"].includes(window.Jetpack_Maps?.provider)?window.Jetpack_Maps?.provider:"mapbox")}},91844(e,t,r){"use strict";r.d(t,{A:()=>n});const n=(e,t=null)=>{if(t)e.style.height=t+"px";else{const t=e.offsetWidth,r=window.location.search.indexOf("map-block-counter")>-1?window.innerHeight:.8*window.innerHeight,n=Math.min(t*(3/4),r);e.style.height=n+"px"}}},80178(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(13022),o=r(10790);const s=({className:e,label:t,isPressed:r,onClick:s})=>{const i=(0,n.A)(e,"components-button components-tab-button",{"is-pressed":r});return(0,o.jsx)("button",{className:i,onClick:s,children:(0,o.jsx)("span",{children:t})})}},30068(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r(94715),o=r(29491),s=r(47143),i=r(86087),a=r(27723),c=r(80178),l=r(51497),u=r(10790);const __=a.__,d="editor",p="preview",h=(0,o.compose)([(0,s.withSelect)(e=>({currentBlockId:e("core/block-editor").getSelectedBlockClientId()})),(0,s.withDispatch)((e,{currentBlockId:t})=>({removeBlock:()=>e("core/block-editor").removeBlocks(t)}))])(({attributes:e,setAttributes:t,isSelected:r,removeBlock:o})=>{const{source:s}=e,a=!s||""===s.trim(),h=(0,n.useBlockProps)(),{className:m}=h,[g,f]=(0,i.useState)(d),b=(0,i.useRef)(null),v=e=>t({source:e}),y=e=>{8===e.keyCode&&""===s&&(o(),e.preventDefault())};let k;return(0,i.useEffect)(()=>{r?g===d&&b?.current.focus():g===p&&f(d)},[r,g,f]),k=!r&&a?(0,u.jsx)("p",{className:`${m}__placeholder`,children:__("Write your _Markdown_ **here**…","jetpack")}):(0,u.jsxs)("div",{className:m,children:[(0,u.jsx)(n.BlockControls,{children:(0,u.jsxs)("div",{className:"components-toolbar",children:[(0,u.jsx)(c.A,{className:m,label:__("Markdown","jetpack"),isPressed:g===d,onClick:()=>f(d)}),(0,u.jsx)(c.A,{className:m,label:__("Preview","jetpack"),isPressed:g===p,onClick:()=>f(p)})]})}),g!==p&&r?(0,u.jsx)(n.PlainText,{className:`${m}__editor`,onChange:v,onKeyDown:y,"aria-label":__("Markdown","jetpack"),ref:b,value:s}):(0,u.jsx)(l.A,{className:`${m}__preview`,source:s})]}),(0,u.jsx)("div",{...h,children:k})})},57809(e,t,r){"use strict";var n=r(94375),o=r(73431),s=r(30068),i=r(19235);r(1982);(0,n.M)(o,{edit:s.A,save:i.A})},51497(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r(94715),o=r(86087),s=r(27723),i=r(97158),a=r(20305),c=r.n(a),l=r(10790);const __=s.__,u=new i.A({typographer:!0}).use(c()),d=e=>{if("A"===e.target.nodeName){window.confirm(__("Are you sure you wish to leave this page?","jetpack"))||e.preventDefault()}},p=(e={})=>{const t=(0,n.__experimentalGetSpacingClassesAndStyles)?.(e);return t?.style?t.style:{}},h=({className:e,source:t="",attributes:r})=>(0,l.jsx)(o.RawHTML,{className:e,onClick:d,style:p(r),children:t.length?u.render(t):""});r.dn(h)},19235(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(94715),o=r(51497),s=r(10790);const i=({attributes:e})=>{const t=n.useBlockProps.save();return(0,s.jsx)(o.A,{...t,source:e.source,attributes:e})};r.dn(i)},39103(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(79018),o=r(10790);const s={attributes:n.attributes,supports:{align:!0,html:!1},save:({attributes:{rid:e}})=>(0,o.jsx)(o.Fragment,{children:e.map(e=>(0,o.jsx)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,children:`https://www.opentable.com/restref/client/?rid=${e}`},e))})}},50260(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(79018),o=r(10790);const s={attributes:n.attributes,migrate:e=>{const{style:t,className:r}=e,n="standard"===t?"":`is-style-${t}`;return{...e,className:r?`${r} ${n}`:n}},isEligible:({style:e,className:t})=>!(!e||"standard"===e)&&(!t||-1===t.indexOf("is-style-")),save:({attributes:{rid:e}})=>(0,o.jsx)("div",{children:e.map(e=>(0,o.jsx)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,children:`https://www.opentable.com/restref/client/?rid=${e}`},e))})}},64627(e,t,r){"use strict";r.d(t,{A:()=>x});var n=r(97999),o=r(85985),s=r(94715),i=r(74997),a=r(56427),c=r(86087),l=r(27723),u=r(57273),d=r(13022),p=r(66087),h=r(90907),m=r(78218),g=r(79018),f=r(82101),b=r(74739),v=r(50387),y=r(59038),k=r(84260),w=(r(79935),r(10790));const __=l.__,_=(0,o.sh)(g);const x=(0,a.withNotices)(function({attributes:e,clientId:t,isSelected:r,name:o,noticeOperations:x,noticeUI:j,setAttributes:C}){const A=(0,s.useBlockProps)(),S=(0,i.getBlockDefaultClassName)(o),E=(0,m.y)(g.attributes,e);(0,p.isEqual)(E,e)||C(E);const{align:T,rid:N,iframe:P,domain:B,lang:R,newtab:I,negativeMargin:D}=e,L=(0,p.isEmpty)(N),F=(0,h.D)((0,v.Iy)(),e.className),M=(0,h.D)((0,v.Iy)(N),e.className),O=(0,y.A)(M),U=(0,p.isEqual)(N,["1"]);(0,c.useEffect)(()=>{if(x.removeAllNotices(),!L&&!U&&"wide"===M&&"wide"!==T&&"full"!==T){const e=(0,w.jsx)(w.Fragment,{children:__('With the OpenTable block you may encounter display issues if you use its "wide" style with anything other than "wide" or "full" alignment. The wide display style may also not work well on smaller screens.',"jetpack")});x.createNotice({status:"warning",content:e})}},[U,T,L,N,M]),(0,c.useEffect)(()=>{"button"===F&&Array.isArray(N)&&N?.length>1&&C({className:"",style:""})},[N,F,C]),(0,c.useEffect)(()=>{r&&(Array.isArray(N)&&N?.length>1?(0,i.unregisterBlockStyle)("jetpack/opentable",["button"]):(0,i.registerBlockStyle)("jetpack/opentable",v.i9))},[r,N]),(0,c.useEffect)(()=>{"wide"===O&&"wide"===T&&C({align:""}),"wide"===M&&O&&M!==O&&C({align:"wide"}),C({style:M})},[T,M,O,C]);const z=(0,v.K5)(N),$=e=>N?.length>1?["multi","button"!==e?e:"standard"]:["button"===e?"button":"standard","button"===e?"standard":e],q=e=>{Array.isArray(e)?C({rid:e,style:e.length>1&&"button"===M?"standard":M}):(e=>{const t=(0,k.a9)(e);t||(x.removeAllNotices(),x.createErrorNotice((0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("strong",{children:__("We ran into an issue","jetpack")}),(0,w.jsx)("br",{}),__("Please ensure this embed matches the one from your OpenTable account","jetpack")]})));const r=(0,m.y)(g.attributes,t);C(r),x.removeAllNotices()})(e)},H=(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(s.InspectorAdvancedControls,{children:[(0,w.jsx)(a.ToggleControl,{label:__("Load the widget in an iFrame (Recommended)","jetpack"),checked:P,onChange:()=>C({iframe:!P}),className:"is-opentable",__nextHasNoMarginBottom:!0}),"button"===M&&(0,w.jsx)(a.ToggleControl,{label:__("Remove button margin","jetpack"),checked:D,onChange:()=>C({negativeMargin:!D}),__nextHasNoMarginBottom:!0})]}),(0,w.jsx)(s.InspectorControls,{children:(0,w.jsxs)(a.PanelBody,{title:__("Settings","jetpack"),children:[(0,w.jsx)(b.A,{rids:N,onChange:q}),(0,w.jsx)(a.SelectControl,{label:__("Language","jetpack"),value:R,onChange:e=>C({lang:e}),options:f.P,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,w.jsx)(a.ToggleControl,{label:__("Open in a new window","jetpack"),checked:I,onChange:()=>C({newtab:!I}),__nextHasNoMarginBottom:!0})]})})]}),V=(0,n.isWpcomPlatformSite)()?"https://en.support.wordpress.com/wordpress-editor/blocks/opentable-block/":"https://jetpack.com/support/jetpack-blocks/opentable-block/",G=(0,w.jsxs)(a.Placeholder,{label:__("OpenTable Reservation","jetpack"),icon:_,instructions:__("Enter your restaurants IDs, separated by comma, or paste an OpenTable Reservation Widget embed code.","jetpack"),notices:j,children:[(0,w.jsx)(b.A,{rids:N,onSubmit:q}),(0,w.jsxs)("div",{className:`${S}-placeholder-links`,children:[(0,w.jsx)(u.N,{openInNewTab:!0,href:"https://restaurant.opentable.com/get-started/",children:__("Sign up for OpenTable","jetpack")}),(0,w.jsx)(u.N,{openInNewTab:!0,href:V,children:__("Learn more","jetpack")})]})]}),W=(0,d.A)({[`is-style-${M}`]:!L&&z.includes(M),"is-placeholder":L,"is-multi":"multi"===$(M)[0],[`align${T}`]:T,"has-no-margin":D});return(0,w.jsxs)("div",{...A,children:[j,(0,w.jsxs)("div",{className:W,children:[!L&&H,L?G:(e=>{const[r,n]=$(e||M);return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{className:`${S}-overlay`}),(0,w.jsx)("iframe",{title:(0,l.sprintf)(/* translators: %s: a unique ID. */ | |
| 20 | +__("Open Table Preview %s","jetpack"),t),scrolling:"no",src:`https://www.opentable.com/widget/reservation/canvas?rid=${Array.isArray(N)?N.join("%2C"):""}&type=${r}&theme=${n}&overlay=false&domain=${B}&lang=${R&&f.L.includes(R)?R:"en-US"}&newtab=${I}&disablega=true`})]})})()]})]})})},71992(e,t,r){"use strict";var n=r(94715),o=r(74997),s=r(94375),i=r(79018),a=r(39103),c=r(50260),l=r(64627),u=r(50387),d=r(84260),p=(r(79935),r(45199),r(10790));(0,s.M)(i,{edit:l.A,save:({attributes:{rid:e}})=>{const t=n.useBlockProps.save();return(0,p.jsx)("div",{...t,children:e?.map((e,t)=>(0,p.jsx)("a",{href:`https://www.opentable.com/restref/client/?rid=${e}`,children:`https://www.opentable.com/restref/client/?rid=${e}`},`${e}-${t}`))})},attributes:i.attributes,styles:(0,u.Iy)(),transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&0===e.textContent.indexOf("http")&&(d.XA.test(e.textContent)||d.JJ.test(e.textContent)),transform:e=>{const t=(0,d.a9)(e.textContent);return(0,o.createBlock)("jetpack/opentable",t)}}]},deprecated:[a.A,c.A]})},82101(e,t,r){"use strict";r.d(t,{L:()=>o,P:()=>n});const n=[{value:"en-US",label:"English"},{value:"fr-CA",label:"Français"},{value:"de-DE",label:"Deutsch"},{value:"es-MX",label:"Español"},{value:"ja-JP",label:"日本語"},{value:"nl-NL",label:"Nederlands"},{value:"it-IT",label:"Italiano"}],o=n.map(e=>e.value)},74739(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(56427),o=r(86087),s=r(27723),i=r(66087),a=r(10790);const __=s.__,_n=s._n,c=/^\s*(http[s]?:\/\/|<script)/;function l(e){const[t,r]=(0,o.useState)(""),[s,l]=(0,o.useState)(e.rids||[]),u=/^(\d+)$|\(#(\d+)\)$/,d=(0,a.jsx)(n.FormTokenField,{value:s,saveTransform:e=>c.test(e)?"":e.trim(),onInputChange:r,label:_n("Restaurant ID","Restaurant IDs",s.length,"jetpack"),...e,onChange:t=>{const r=t.map(e=>{const t=u.exec(e);if(t){return t[1]||t[2]}return e});l(r),e.onChange&&e.onChange(r)},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0});return(0,a.jsx)("div",{className:"wp-block-jetpack-opentable-restaurant-picker",children:e.onSubmit?(0,a.jsxs)("form",{onSubmit:r=>{r.preventDefault(),e.onSubmit((0,i.isEmpty)(s)?t:s)},children:[d,(0,a.jsx)(n.Button,{variant:"secondary",type:"submit",children:__("Embed","jetpack")})]}):d})}},50387(e,t,r){"use strict";r.d(t,{Iy:()=>s,K5:()=>i,i9:()=>o});var n=r(27723);const __=n.__,o={name:"button",label:__("Button (210 x 113 pixels)","jetpack")},s=e=>[{name:"standard",label:__("Standard (224 x 301 pixels)","jetpack"),isDefault:!0},{name:"tall",label:__("Tall (288 x 490 pixels)","jetpack")},{name:"wide",label:__("Wide (840 x 150 pixels)","jetpack")},(!e||1===e.length)&&o].filter(Boolean),i=e=>s(e).map(e=>e.name)},59038(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(86087);function o(e){const t=(0,n.useRef)(void 0);return(0,n.useEffect)(()=>{t.current=e},[e]),t.current}},84260(e,t,r){"use strict";r.d(t,{JJ:()=>o,XA:()=>s,a9:()=>i});const n=/<\s*script[^>]*src\s*=\s*["']?([^"']*)/i,o=/restref=([0-9]+)&/,s=/rid=([0-9]+)&/,i=e=>{if(e)return(e=>{if(!e)return;let t;if(t=0===e.indexOf("http")?new URL(e):new URL("http:"+e),!t.host||-1===t.host.indexOf("opentable")||!t.search)return;const r=new URLSearchParams(t.search);let n=r.get("theme");"button"===r.get("type")&&(n=r.get("type"));let o=r.getAll("rid");if(o&&0!==o.length||(o=r.getAll("restref")),!o||0===o.length)return;const s={};o&&(s.rid=o);const i=r.get("domain");i&&(s.domain=i);const a=r.get("iframe");a&&(s.iframe=a);const c=r.get("lang");c&&(s.lang=c);const l=r.get("newtab");return l&&(s.newtab=l),n&&(s.style=n),s})((e=>{const t=e.match(n);return t&&t[1]?t[1]:o.test(e)||s.test(e)?e:void 0})(e))}},59767(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(85985),o=r(56427),s=r(27723),i=r(73800),a=r(10790);const __=s.__,_x=s._x,c=(0,n.sh)(i);function l({className:e,onSubmit:t,noticeUI:r,url:n,setUrl:s}){return(0,a.jsx)("div",{className:e,children:(0,a.jsx)(o.Placeholder,{label:__("Pinterest","jetpack"),icon:c,notices:r,children:(0,a.jsxs)("form",{onSubmit:e=>{e.preventDefault(),t()},children:[(0,a.jsx)("input",{type:"url",value:n,className:"components-placeholder__input","aria-label":__("Pinterest URL","jetpack"),placeholder:__("Enter URL to embed here…","jetpack"),onChange:e=>s(e.target.value)}),(0,a.jsx)(o.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})]})})})}},62769(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(74997),o=r(56427),s=r(86087),i=r(27723),a=r(10790);const __=i.__,_x=i._x;function c({fallbackUrl:e,onClick:t}){return(0,a.jsxs)(a.Fragment,{children:[__("Sorry, this content could not be embedded.","jetpack")," ",(0,a.jsx)(o.Button,{variant:"link",onClick:()=>{const r=(0,a.jsx)("a",{href:e,children:e});t((0,n.createBlock)("core/paragraph",{content:(0,s.renderToString)(r)}))},children:_x("Convert block to link","button label","jetpack")})]})}},83646(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(56427),o=r(27723),s=r(10790);const __=o.__;function i(){return(0,s.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,s.jsx)(n.Spinner,{}),(0,s.jsx)("p",{children:__("Embedding…","jetpack")})]})}},76910(e,t,r){"use strict";r.d(t,{_:()=>o,e:()=>n});const n="https://pinterest.com/anapinskywalker/",o=/^\s*https?:\/\/(?:www\.)?(?:[a-z]{2}\.)?(?:pinterest\.[a-z.]+|pin\.it)\/([^/]+)(\/[^/]+)?/i},62713(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(57462),o=r(10790);const s={attributes:{url:{type:"string"}},supports:{align:!1,html:!1},save:({attributes:e,className:t})=>{const{url:r}=e;return(0,n.C)(r)?(0,o.jsx)("div",{className:t,children:(0,o.jsx)("a",{"data-pin-do":(0,n.C)(r),href:r})}):null}}},32089(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(94715),o=r(56427),s=r(86087),i=r(59767),a=r(62769),c=r(83646),l=r(67627),u=r(57462),d=r(10790);const p=(0,o.withNotices)(function({attributes:e,isSelected:t,noticeOperations:r,noticeUI:p,setAttributes:h,onReplace:m}){const{url:g}=e,f=(0,n.useBlockProps)(),{isFetching:b,pinterestUrl:v,testUrl:y,hasTestUrlError:k}=(0,l.A)(),[w,_]=(0,s.useState)(!1),[x,j]=(0,s.useState)(""),[C,A]=(0,s.useState)(!1),S=(0,s.useCallback)(()=>(0,d.jsx)(a.A,{fallbackUrl:x,onClick:m}),[k]),E=()=>{b||(y(x),A(!1))},T=()=>{_(!0)};if((0,s.useEffect)(()=>{g&&y(g)},[]),(0,s.useEffect)(()=>{!t&&w&&_(!1)},[t,w]),(0,s.useEffect)(()=>{h({url:v}),r.removeAllNotices(),v&&j(v),k&&r.createErrorNotice(S())},[v,k,h,S]),b)return(0,d.jsx)(c.A,{});const N=(0,u.C)(g);let P;if(C||!g||g&&!N)P=(0,d.jsx)(i.A,{onSubmit:E,noticeUI:p,url:x,setUrl:j});else{const e=`<a data-pin-do='${N}' href='${g}'></a>`;P=(0,d.jsx)("div",{...f,children:(0,d.jsxs)("div",{children:[(0,d.jsx)(o.SandBox,{html:e,scripts:["https://assets.pinterest.com/js/pinit.js"],onFocus:T}),!w&&(0,d.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:T})]})})}return(0,d.jsx)("div",{...f,children:P})})},46010(e,t,r){"use strict";var n=r(94375),o=r(73800),s=r(62713),i=r(32089),a=r(9114);(0,n.M)(o,{edit:i.A,save:a.A,deprecated:[s.A]})},67627(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(86087),o=r(56145),s=r(76910);const i=(e="")=>{const[t,r]=(0,n.useState)(!1),[i,a]=(0,n.useState)(e),[c,l]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{i&&i!==s.e&&(r(!0),(0,o.A)(i).then(e=>{r(!1),a(e),l(!1)}).catch(()=>{r(!1),a(i||void 0),l(!0)}))},[i]),{isFetching:t,pinterestUrl:i,hasTestUrlError:c,testUrl:a}}},9114(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);function s({attributes:e}){const t=n.useBlockProps.save(),{url:r}=e;return(0,o.jsx)("a",{...t,href:r,children:r})}},57462(e,t,r){"use strict";r.d(t,{C:()=>s});var n=r(93832),o=r(76910);function s(e){if(!o._.test(e))return"";const t=(0,n.getPath)(e);return t?t.startsWith("pin/")?"embedPin":t.match(/^([^/]+)\/?$/)?"embedUser":t.match(/^([^/]+)\/([^/]+)\/?$/)?"embedBoard":"":""}},32155(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(94715),o=r(56427),s=r(27723),i=r(10790);const __=s.__,a=({id:e,setRating:t,children:r})=>{return(0,i.jsx)("span",{className:"jetpack-ratings-button",tabIndex:0,role:"button",onKeyDown:(n=e,({code:e})=>"Enter"===e?t(n):null),onClick:(e=>()=>t(e))(e),children:r});var n},c=e=>function({setAttributes:t,attributes:{align:r,color:s,rating:c,maxRating:l}}){const u=(0,n.useBlockProps)(),d=e=>{e===c?Math.ceil(c)===c&&(e-=.5):.5===c&&1===e&&(e=0),t({rating:e})};return(0,i.jsxs)("div",{...u,children:[(0,i.jsx)(n.BlockControls,{children:(0,i.jsx)(n.AlignmentToolbar,{value:r,onChange:e=>t({align:e})})}),(0,i.jsx)("div",{style:{textAlign:r},children:Array.from(Array(Math.ceil(l)),(e,t)=>t+1).map(t=>(0,i.jsxs)(a,{id:t,setRating:d,children:[(0,i.jsx)("span",{children:(0,i.jsx)(e,{className:c>=t-.5?null:"is-rating-unfilled",color:s})}),(0,i.jsx)("span",{children:(0,i.jsx)(e,{className:c>=t?null:"is-rating-unfilled",color:s})})]},t))}),(0,i.jsxs)(n.InspectorControls,{children:[(0,i.jsx)(o.PanelBody,{title:__("Settings","jetpack"),children:(0,i.jsx)(o.RangeControl,{label:__("Highest rating","jetpack"),value:l,onChange:e=>t({maxRating:e}),min:2,max:10,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,i.jsx)(n.PanelColorSettings,{title:__("Color","jetpack"),initialOpen:!0,colorSettings:[{value:s,onChange:e=>t({color:e}),label:__("Color","jetpack")}]})]})]})};r.dn(c)},8171(e,t,r){"use strict";var n=r(94375),o=r(8206),s=r(32155),i=r(7420),a=r(91548);r(73163),r(89399);(0,n.M)(o,{edit:(0,s.A)(i.G),save:(0,a.A)("★")})},7420(e,t,r){"use strict";r.d(t,{G:()=>s});var n=r(56427),o=r(10790);const s=e=>{const t=(e=>e&&e.color?e.color:"currentColor")(e),r=(e=>e&&e.className?e.className:"")(e);return(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",color:t,children:(0,o.jsx)(n.Path,{className:r,fill:t,stroke:t,d:"M12,17.3l6.2,3.7l-1.6-7L22,9.2l-7.2-0.6L12,2L9.2,8.6L2,9.2L7.5,14l-1.6,7L12,17.3z"})})}},91548(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);const s=e=>function({attributes:{align:t,rating:r,color:s}}){const i=n.useBlockProps.save();return(0,o.jsx)("figure",{...i,style:{textAlign:t},children:Array.from(Array(Math.ceil(r)),(e,t)=>t+1).map(t=>(0,o.jsx)("span",{style:{color:s},children:e},t))})};r.dn(s)},25324(e,t,r){"use strict";r.d(t,{WB:()=>a,_f:()=>i});var n=r(56427),o=r(27723),s=r(10790);const __=o.__;function i({attributes:e,setAttributes:t}){const{displayAuthor:r,displayContext:o,displayDate:i,displayThumbnails:a,postsToShow:c}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.PanelBody,{title:__("Layout settings","jetpack"),children:(0,s.jsx)(n.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Number of posts","jetpack"),value:c,onChange:e=>t({postsToShow:Math.min(e,6)}),min:1,max:6})}),(0,s.jsxs)(n.PanelBody,{title:__("Metadata settings","jetpack"),children:[(0,s.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display date","jetpack"),checked:i,onChange:e=>t({displayDate:e})}),(0,s.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display author","jetpack"),checked:r,onChange:e=>t({displayAuthor:e})}),(0,s.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display context (category or tag)","jetpack"),checked:o,onChange:e=>t({displayContext:e})}),(0,s.jsx)(n.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Display thumbnail","jetpack"),checked:a,onChange:e=>t({displayThumbnails:e})})]})]})}function a({attributes:e,setAttributes:t}){const{postLayout:r}=e,o=[{icon:"grid-view",title:__("Grid view","jetpack"),onClick:()=>t({postLayout:"grid"}),isActive:"grid"===r},{icon:"list-view",title:__("List view","jetpack"),onClick:()=>t({postLayout:"list"}),isActive:"list"===r}];return(0,s.jsx)(n.ToolbarGroup,{controls:o})}},49108(e,t,r){"use strict";r.d(t,{A:()=>n});const n=[r(82228)]},50783(e,t,r){"use strict";r.d(t,{A:()=>n});const n={postLayout:{type:"string",default:"grid"},displayAuthor:{type:"boolean",default:!1},displayDate:{type:"boolean",default:!0},displayHeadline:{type:"boolean",default:!1},displayThumbnails:{type:"boolean",default:!1},displayContext:{type:"boolean",default:!1},headline:{type:"string",default:""},postsToShow:{type:"number",default:3}}},82228(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>o.A,migrate:()=>i,save:()=>a,supports:()=>s.A});var n=r(74997),o=r(50783),s=r(90526);const i=(e,t)=>[e,e.headline?[(0,n.createBlock)("core/heading",{content:e.headline,level:3}),...t]:t],a=()=>null},90526(e,t,r){"use strict";r.d(t,{A:()=>n});const n={html:!1,multiple:!1,reusable:!1,color:{gradients:!0,link:!0},spacing:{margin:!0,padding:!0},typography:{__experimentalFontFamily:!0,fontSize:!0,lineHeight:!0},align:["wide","full"]}},7582(e,t,r){"use strict";r.d(t,{A:()=>k});var n=r(85985),o=r(94715),s=r(56427),i=r(29491),a=r(27723),c=r(10798),l=r(59340),u=r(88795),d=r(25324),p=r(80108),h=r(21144),m=r(18017),g=(r(63036),r(10790));const __=a.__,f=u.name.replace("jetpack/","");function b(e){return(0,g.jsxs)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading",children:[(0,g.jsx)("strong",{id:e.id+"-heading",className:"jp-related-posts-i2__post-link",children:e.isInSiteEditor?__("Preview unavailable in site editor. The post title will appear normally on your site.","jetpack"):__("Preview unavailable: you haven't published enough posts with similar content.","jetpack")}),e.displayThumbnails&&(0,g.jsxs)("figure",{className:"jp-related-posts-i2__post-image-placeholder","aria-label":__("Placeholder image","jetpack"),children:[(0,g.jsxs)(s.SVG,{className:"jp-related-posts-i2__post-image-placeholder-square",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 350 200",children:[(0,g.jsx)("title",{children:__("Grey square","jetpack")}),(0,g.jsx)(s.Path,{d:"M0 0h350v200H0z",fill:"#8B8B96",fillOpacity:".1"})]}),(0,g.jsxs)(s.SVG,{className:"jp-related-posts-i2__post-image-placeholder-icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,g.jsx)("title",{children:__("Icon for image","jetpack")}),(0,g.jsx)(s.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,g.jsx)(s.Path,{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"})]})]}),e.displayDate&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-date has-small-font-size",children:__("August 3, 2025","jetpack")}),e.displayAuthor&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-author has-small-font-size",children:__("by John Doe","jetpack")}),e.displayContext&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-context has-small-font-size",children:__("In “Uncategorized”","jetpack")})]})}function v(e){const t=e.post?.block_context?.text||"",r=e.post?.block_context?.link||"",n=""!==t,o=""!==r;return(0,g.jsxs)("div",{className:"jp-related-posts-i2__post",id:e.id,"aria-labelledby":e.id+"-heading",children:[(0,g.jsx)("a",{className:"jp-related-posts-i2__post-link",id:e.id+"-heading",href:e.post.url,rel:"nofollow noopener noreferrer",target:"_blank",children:e.post.title}),e.displayThumbnails&&e.post.img&&e.post.img.src&&(0,g.jsx)("a",{className:"jp-related-posts-i2__post-img-link",href:e.post.url,target:"_blank",rel:"nofollow noopener noreferrer",children:(0,g.jsx)("img",{className:"jp-related-posts-i2__post-img",src:e.post.img.src,alt:e.post.title})}),e.displayDate&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-date has-small-font-size",children:e.post.date}),e.displayAuthor&&(0,g.jsx)("div",{className:"jp-related-posts-i2__post-author has-small-font-size",children:e.post.author}),e.displayContext&&n&&(0,g.jsxs)("div",{className:"jp-related-posts-i2__post-context has-small-font-size",children:[o&&(0,g.jsx)("a",{href:r,children:t}),!1===o&&t]})]})}function y(e){const t="jp-related-posts-i2__row";let r;const n=e.posts.length>3;switch(e.posts.length){case 2:case 4:case 5:r=2;break;default:r=3}return(0,g.jsxs)("div",{children:[(0,g.jsx)("div",{className:t,"data-post-count":e.posts.slice(0,r).length,children:e.posts.slice(0,r)}),n&&(0,g.jsx)("div",{className:t,"data-post-count":e.posts.slice(r).length,children:e.posts.slice(r)})]})}function k({attributes:e,setAttributes:t}){const{displayAuthor:r,displayContext:s,displayDate:a,displayThumbnails:u,postLayout:w,postsToShow:_}=e,x=(0,o.useBlockProps)(),{isLoadingModules:j,isChangingStatus:C,isModuleActive:A,changeStatus:S}=(0,n.q7)(f),{isEnabled:E,enable:T,isFetchingStatus:N,isUpdatingStatus:P}=(0,h.M)(),B=C||P,{posts:R,isLoading:I}=(0,p.Y)(E),D=l.O3===(0,l.AU)(),{instanceId:L}=(0,i.useInstanceId)(k);let F;if(j||N||I)F=(0,g.jsx)(c.G,{});else if(A&&E){const n="jp-relatedposts-i2",i=[];for(let e=0;e<_;e++)R[e]?i.push((0,g.jsx)(v,{id:`related-posts-${L}-post-${e}`,post:R[e],displayThumbnails:u,displayDate:a,displayContext:s,displayAuthor:r},n+"-"+e)):i.push((0,g.jsx)(b,{id:`related-posts-${L}-post-${e}`,displayThumbnails:u,displayDate:a,displayContext:s,isInSiteEditor:D,displayAuthor:r},"related-post-placeholder-"+e));F=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(o.InspectorControls,{children:(0,g.jsx)(d._f,{attributes:e,setAttributes:t})}),(0,g.jsx)(o.BlockControls,{children:(0,g.jsx)(d.WB,{attributes:e,setAttributes:t})}),(0,g.jsxs)("div",{id:`related-posts-${L}`,children:[(0,g.jsx)(o.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{placeholder:__("Add a headline","jetpack")}]]}),(0,g.jsx)("div",{className:n,"data-layout":w,children:(0,g.jsx)(y,{posts:i})})]})]})}else F=(0,g.jsx)(m.L,{changeStatus:S,isLoading:B,enable:T});return(0,g.jsx)("div",{...x,children:F})}},97453(e,t,r){"use strict";var n=r(94715),o=r(94375),s=r(88795),i=r(49108),a=r(7582),c=(r(88894),r(10790));(0,o.M)(s,{edit:a.A,save:()=>{const e=n.useBlockProps.save();return(0,c.jsx)("div",{...e,children:(0,c.jsx)(n.InnerBlocks.Content,{})})},transforms:{from:[{type:"shortcode",tag:"jetpack-related-posts"}]},deprecated:i.A})},80108(e,t,r){"use strict";r.d(t,{Y:()=>l});var n=r(1455),o=r.n(n),s=r(29491),i=r(47143),a=r(43656),c=r(86087);const l=e=>{const t=(0,s.usePrevious)(e),[r,n]=(0,c.useState)(!1),[l,u]=(0,c.useState)(null),{currentPostId:d,currentPostRelatedPosts:p}=(0,i.useSelect)(e=>{const t=e(a.store).getCurrentPost();return{currentPostId:t.id,currentPostRelatedPosts:t?.["jetpack-related-posts"]??[]}}),h=0===p.length&&!t&&e;return(0,c.useEffect)(()=>{h&&(n(!0),async function(e){try{return await o()({path:`/wpcom/v2/related-posts/${e}`})}catch{return[]}}(d).then(e=>{u(e)}).catch(()=>{}).then(()=>{n(!1)}))},[h,d]),(0,c.useMemo)(()=>({posts:l??p,isLoading:r}),[r,l,p])}},21144(e,t,r){"use strict";r.d(t,{M:()=>i});var n=r(1455),o=r.n(n),s=r(86087);const i=()=>{const[e,t]=(0,s.useState)(!1),[r,n]=(0,s.useState)(!1),[i,a]=(0,s.useState)(!1);(0,s.useEffect)(()=>{t(!0),async function(){try{const e=await o()({path:"/wpcom/v2/related-posts"});return e?.enabled??!1}catch{return!1}}().then(e=>{a(e),t(!1)}).catch(()=>{t(!1)})},[]);const c=(0,s.useCallback)(()=>{n(!0),async function(){try{return await o()({path:"/wpcom/v2/related-posts/enable",method:"POST"})}catch{return!1}}().then(e=>{a(e),n(!1)}).catch(()=>{n(!1)})},[]);return(0,s.useMemo)(()=>({isEnabled:i,enable:c,isFetchingStatus:e,isUpdatingStatus:r}),[i,c,e,r])}},18017(e,t,r){"use strict";r.d(t,{L:()=>h});var n=r(3924),o=r(97999),s=r(85985),i=r(56427),a=r(86087),c=r(27723),l=r(57273),u=r(88795),d=r(10790);const __=c.__,p=(0,s.sh)(u),h=({className:e,changeStatus:t,isLoading:r,enable:c})=>{const{tracks:h}=(0,s.st)();(0,a.useEffect)(()=>{h.recordEvent("jetpack_editor_related_posts_placeholder_view")},[h]);const m=(0,o.isWpcomPlatformSite)()?"https://wordpress.com/support/related-posts/":(0,n.A)("jetpack-support-related-posts");return(0,d.jsx)("div",{className:e,children:(0,d.jsxs)(i.Placeholder,{icon:p,instructions:__("You'll need to activate the Related Posts feature to use this block.","jetpack"),label:u.title,children:[(0,d.jsx)(i.Button,{disabled:r,isBusy:r,onClick:()=>(h.recordEvent("jetpack_editor_related_posts_enable"),(0,o.isSimpleSite)()||t(!0),c()),variant:"secondary",children:r?__("Activating Related Posts","jetpack"):__("Activate Related Posts","jetpack",0)}),(0,d.jsx)("div",{className:"components-placeholder__learn-more",children:(0,d.jsx)(l.N,{openInNewTab:!0,href:m,children:__("Learn more about the Related Posts feature.","jetpack")})})]})})}},64806(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r(85985),o=r(94715),s=r(56427),i=r(47143),a=r(86087),c=r(27723),l=r(13022),u=r(20242),d=r(84730),p=r(10790);const __=c.__,_n=c._n,h=[{value:d.DF,label:__("Show after threshold","jetpack")},{value:d.et,label:__("Show before threshold","jetpack")}],m=(0,n.sh)(u),g=(0,i.withSelect)((e,t)=>{const{isBlockSelected:r,hasSelectedInnerBlock:n}=e("core/block-editor");return{isSelected:r(t.clientId)||n(t.clientId)}})(({isSelected:e,attributes:t,setAttributes:r})=>{const{criteria:n,threshold:i}=t,u=(0,o.useBlockProps)(),[g,f]=(0,a.useState)(!0);return(0,p.jsxs)("div",{...u,className:(0,l.A)(u.className,{"wp-block-jetpack-repeat-visitor--is-unselected":!e}),children:[(0,p.jsxs)(s.Placeholder,{icon:m,label:__("Repeat Visitor","jetpack"),className:"wp-block-jetpack-repeat-visitor-placeholder",children:[(0,p.jsx)(s.TextControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,className:"wp-block-jetpack-repeat-visitor-threshold",defaultValue:i,help:g?"":__("Please enter a valid number.","jetpack"),label:__("Visit count threshold","jetpack"),min:"1",onChange:e=>{/^\d+$/.test(e)&&+e>0?(r({threshold:+e}),f(!0)):f(!1)},pattern:"[0-9]",type:"number"}),(0,p.jsx)(s.RadioControl,{label:__("Visibility","jetpack"),selected:n,options:h,onChange:e=>r({criteria:e})})]}),(0,p.jsx)(s.Notice,{status:"info",isDismissible:!1,children:n===d.DF?1===i?__("This block will only appear to people who have visited this page more than once.","jetpack"):(0,c.sprintf)(/* translators: %d: the number of people. */ | |
| 21 | +_n("This block will only appear to people who have visited this page more than %d time.","This block will only appear to people who have visited this page more than %d times.",+i,"jetpack"),i):1===i?__("This block will only appear to people who are visiting this page for the first time.","jetpack"):(0,c.sprintf)(/* translators: %d: the number of people. */ | |
| 22 | +_n("This block will only appear to people who are visiting this page for %d time.","This block will only appear to people who have visited this page at most %d times.",+i,"jetpack"),i)}),(0,p.jsx)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container",children:(0,p.jsx)(o.InnerBlocks,{})})]})})},11525(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);const s=()=>{const e=n.useBlockProps.save();return(0,o.jsx)("div",{...e,children:(0,o.jsx)("div",{className:"wp-block-jetpack-repeat-visitor__inner-container",children:(0,o.jsx)(n.InnerBlocks.Content,{})})})};r.dn(s)},84730(e,t,r){"use strict";r.d(t,{DF:()=>n,aV:()=>s,et:()=>o});const n="after-visits",o="before-visits",s=3},14930(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(94715),o=r(84730),s=r(10790);const i={attributes:{criteria:{type:"string",default:o.DF},threshold:{type:"number",default:o.aV}},supports:{html:!1},save:({className:e})=>(0,s.jsx)("div",{className:e,children:(0,s.jsx)(n.InnerBlocks.Content,{})})}},79238(e,t,r){"use strict";var n=r(94375),o=r(20242),s=r(64806),i=r(11525),a=r(14930);r(75646);(0,n.M)(o,{edit:s.A,save:i.A,deprecated:[a.A]})},95213(e,t,r){"use strict";r.d(t,{H:()=>l,o:()=>u});var n=r(94715),o=r(56427),s=r(86087),i=r(27723),a=r(66087),c=r(10790);const __=i.__,_x=i._x;function l({attributes:{autoplay:e,delay:t,effect:r,images:n,sizeSlug:i},imageSizeOptions:l,onChangeImageSize:u,setAttributes:d}){const p="undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,h=[{label:_x("Slide","Slideshow transition effect","jetpack"),value:"slide"},{label:_x("Fade","Slideshow transition effect","jetpack"),value:"fade"}];return(0,c.jsxs)(s.Fragment,{children:[(0,c.jsxs)(o.PanelBody,{title:__("Autoplay","jetpack"),children:[(0,c.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,label:__("Autoplay","jetpack"),help:__("Autoplay between slides","jetpack"),checked:e,onChange:e=>{d({autoplay:e})}}),e&&(0,c.jsx)(o.RangeControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Delay between transitions (in seconds)","jetpack"),value:t,onChange:e=>{d({delay:e})},min:1,max:5}),e&&p&&(0,c.jsx)("span",{children:__("The Reduce Motion accessibility option is selected, therefore autoplay will be disabled in this browser.","jetpack")})]}),(0,c.jsx)(o.PanelBody,{title:__("Effects","jetpack"),children:(0,c.jsx)(o.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Transition","jetpack"),value:r,onChange:e=>{d({effect:e})},options:h})}),!(0,a.isEmpty)(n)&&!(0,a.isEmpty)(l)&&(0,c.jsx)(o.PanelBody,{title:__("Image Settings","jetpack"),children:(0,c.jsx)(o.SelectControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,label:__("Size","jetpack"),value:i,options:l,onChange:e=>u(e)})})]})}function u({allowedMediaTypes:e,attributes:{images:t},onSelectImages:r}){return(0,c.jsx)(s.Fragment,{children:!!t.length&&(0,c.jsx)(o.ToolbarGroup,{children:(0,c.jsx)(o.ToolbarItem,{children:()=>(0,c.jsx)(n.MediaUpload,{onSelect:r,allowedTypes:e,multiple:!0,gallery:!0,value:t.map(e=>e.id),render:({open:e})=>(0,c.jsx)(o.Button,{label:__("Edit Slideshow","jetpack"),onClick:e,children:__("Edit","jetpack")})})})})})}},33170(e,t,r){"use strict";r.d(t,{A:()=>n});r(58203);async function n(e=".wp-block-jetpack-slideshow_container",t={},r={}){const n={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[e,function(){t(this)}]))};let o;if(window.JetpackSwiper)o=window.JetpackSwiper;else{const e=window.Jetpack_Block_Assets_Base_Url+"swiper.css";if(!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}if(await(import(window.Jetpack_Block_Assets_Base_Url+"swiper.js")),!window.JetpackSwiper)throw new Error("Failed to load Jetpack Swiper bundle");o=window.JetpackSwiper}return new o(e,{...n,...t})}},88075(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(2619),o=r(14496);const s=[r(50869),o,n]},84972(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:{default:"center",type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:3},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".swiper-slide",query:{alt:{source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},id:{source:"attribute",selector:"img",attribute:"data-id"},url:{source:"attribute",selector:"img",attribute:"src"}}},effect:{type:"string",default:"slide"},sizeSlug:{type:"string"}}},39126(e,t,r){"use strict";r.d(t,{A:()=>n});r(89275);async function n(e=".swiper-container",t={},r={}){const n={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[e,function(){t(this)}]))};let o;if(window.JetpackSwiper)o=window.JetpackSwiper;else{const e=window.Jetpack_Block_Assets_Base_Url+"swiper.css";if(!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}if(await(import(window.Jetpack_Block_Assets_Base_Url+"swiper.js")),!window.JetpackSwiper)throw new Error("Failed to load Jetpack Swiper bundle");o=window.JetpackSwiper}return new o(e,{...n,...t})}},2619(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>s.A,save:()=>a,supports:()=>i.A});var n=r(85711),o=r(10790),s=r(84972),i=r(82233);const a=({attributes:{align:e,autoplay:t,delay:r,effect:s,images:i},className:a})=>(0,o.jsx)(n.A,{align:e,autoplay:t,className:a,delay:r,effect:s,images:i})},31837(e,t,r){"use strict";r.d(t,{y:()=>o});var n=r(27723);const __=n.__;function o(e,t,r){let o="";if(r<=5)for(let e=1;e<=r;e++){o+='<button class="'+`swiper-pagination-bullet${e===t?" swiper-pagination-bullet-active":""}`+'" tab-index="0" role="button" aria-label="'+(0,n.sprintf)(/* translators: %s: the slide number to navigate to */ | |
| 23 | +__("Go to slide %s","jetpack"),e)+'"></button>'}else o+=`<div class="swiper-pagination-simple">${t} / ${r}</div>`;return o}},85711(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(63162),o=r(94715),s=r(56427),i=r(86087),a=r(27723),c=r(13022),l=r(66087),u=r(94107),d=r(39126),p=r(31837),h=r(57464),m=r(10790);const __=a.__;class g extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{e(__("The Swiper library could not be loaded.","jetpack"))})}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:r,delay:n,effect:o,images:s,onError:i}=this.props;if(t===e.align&&(0,l.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),o!==e.effect||r!==e.autoplay||n!==e.delay||s!==e.images){let t;t=this.swiperIndex?s.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{i(__("The Swiper library could not be loaded.","jetpack"))})}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new u.A(()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame(()=>{(0,h.bz)(e),e.update()})}),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:r,effect:i,images:a}=this.props;return(0,m.jsx)("div",{className:t,"data-autoplay":e||null,"data-delay":e?r:null,"data-effect":i,children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:a.map(({alt:e,caption:t,id:r,url:i})=>(0,m.jsx)("li",{className:(0,c.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,n.isBlobURL)(i)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${r}`,"data-id":r,src:i}),(0,n.isBlobURL)(i)&&(0,m.jsx)(s.Spinner,{}),t&&(0,m.jsx)(o.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},r||i))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,d.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:p.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}const f=g},82233(e,t,r){"use strict";r.d(t,{A:()=>n});const n={html:!1,align:["center","wide","full"]}},57464(e,t,r){"use strict";r.d(t,{WF:()=>c,bz:()=>a,n7:()=>l,rQ:()=>i});var n=r(89877);const o=16/9,s="wp-block-jetpack-slideshow_autoplay-paused";function i(e){a(e),c(e),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",function(){e.el&&(e.el.classList.contains(s)?(e.el.classList.remove(s),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(s),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))})}function a(e){if(!e||!e.el)return;const t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(!t)return;const r=t.clientWidth/t.clientHeight,n=Math.max(Math.min(r,o),1),s="undefined"!=typeof window?.8*window.innerHeight:600,i=Math.min(e.width/n,s),a=`${Math.floor(i)}px`,c=`${Math.floor(i/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=a,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=c,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=c}function c(e){(e.slides||[]).forEach((t,r)=>{t.setAttribute("aria-hidden",r===e.activeIndex?"false":"true"),r===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}),function(e){const t=e.slides[e.activeIndex];if(!t)return;const r=t.getElementsByTagName("FIGCAPTION")[0],o=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=r?r.innerHTML:(0,n.escapeHTML)(o.alt))}(e)}function l(e){(e.pagination.bullets||[]).forEach(t=>{t.addEventListener("click",()=>{const t=e.slides[e.realIndex];setTimeout(()=>{t.focus()},500)})})}},14496(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>i.A,save:()=>c,supports:()=>a.A});var n=r(94715),o=r(7312),s=r(10790),i=r(84972),a=r(82233);const c=({attributes:{align:e,autoplay:t,delay:r,effect:i,images:a}})=>{const c=n.useBlockProps.save();return(0,s.jsx)("div",{...c,children:(0,s.jsx)(o.A,{align:e,autoplay:t,delay:r,effect:i,images:a})})}},7312(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(63162),o=r(94715),s=r(56427),i=r(86087),a=r(27723),c=r(13022),l=r(66087),u=r(94107),d=r(39126),p=r(31837),h=r(57464),m=r(10790);const __=a.__;class g extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{e(__("The Swiper library could not be loaded.","jetpack"))})}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:r,delay:n,effect:o,images:s,onError:i}=this.props;if(t===e.align&&(0,l.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),o!==e.effect||r!==e.autoplay||n!==e.delay||s!==e.images){let t;t=this.swiperIndex?s.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{i(__("The Swiper library could not be loaded.","jetpack"))})}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new u.A(()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame(()=>{(0,h.bz)(e),e.update()})}),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,delay:t,effect:r,images:i}=this.props;return(0,m.jsx)("div",{"data-autoplay":e||null,"data-delay":e?t:null,"data-effect":r,children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:i.map(({alt:e,caption:t,id:r,url:i})=>(0,m.jsx)("li",{className:(0,c.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,n.isBlobURL)(i)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${r}`,"data-id":r,src:i}),(0,n.isBlobURL)(i)&&(0,m.jsx)(s.Spinner,{}),t&&(0,m.jsx)(o.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},r||i))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,d.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!0,initialSlide:e,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:p.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}const f=g},77294(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:{default:"center",type:"string"},autoplay:{type:"boolean",default:!1},delay:{type:"number",default:3},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".swiper-slide",query:{alt:{source:"attribute",selector:"img",attribute:"alt",default:""},caption:{type:"string",source:"html",selector:"figcaption"},id:{source:"attribute",selector:"img",attribute:"data-id"},url:{source:"attribute",selector:"img",attribute:"src"},aspectRatio:{source:"attribute",selector:"img",attribute:"data-aspect-ratio"}}},effect:{type:"string",default:"slide"},sizeSlug:{type:"string"}}},51012(e,t,r){"use strict";r.d(t,{A:()=>n});r(17309);async function n(e=".swiper-container",t={},r={}){const n={effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[e,function(){t(this)}]))};let o;if(window.JetpackSwiper)o=window.JetpackSwiper;else{const e=window.Jetpack_Block_Assets_Base_Url+"swiper.css";if(!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}if(await(import(window.Jetpack_Block_Assets_Base_Url+"swiper.js")),!window.JetpackSwiper)throw new Error("Failed to load Jetpack Swiper bundle");o=window.JetpackSwiper}return new o(e,{...n,...t})}},50869(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>i.A,save:()=>c,supports:()=>a.A});var n=r(94715),o=r(27909),s=r(10790),i=r(77294),a=r(82233);const c=({attributes:{align:e,autoplay:t,delay:r,effect:i,images:a},className:c})=>{const l=n.useBlockProps.save({className:c});return(0,s.jsx)(o.A,{align:e,autoplay:t,className:l.className,delay:r,effect:i,images:a})}},27909(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(63162),o=r(94715),s=r(56427),i=r(86087),a=r(27723),c=r(13022),l=r(66087),u=r(94107),d=r(31837),p=r(51012),h=r(72182),m=r(10790);const __=a.__;class g extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{e(__("The Swiper library could not be loaded.","jetpack"))})}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:r,delay:n,effect:o,images:s,onError:i}=this.props;if(t===e.align&&(0,l.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),o!==e.effect||r!==e.autoplay||n!==e.delay||s!==e.images){let t;t=this.swiperIndex?s.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{i(__("The Swiper library could not be loaded.","jetpack"))})}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new u.A(()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame(()=>{(0,h.bz)(e),e.update()})}),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:r,effect:i,images:a}=this.props;return(0,m.jsx)("div",{className:t,"data-autoplay":e||null,"data-delay":e?r:null,"data-effect":i,style:{"--aspect-ratio":a[0]?.aspectRatio?`calc(${a[0].aspectRatio})`:void 0},children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper-container",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:a.map(({alt:e,caption:t,id:r,url:i,aspectRatio:a},l)=>(0,m.jsx)("li",{className:(0,c.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,n.isBlobURL)(i)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${r}`,"data-id":r,"data-aspect-ratio":a,src:i}),(0,n.isBlobURL)(i)&&(0,m.jsx)(s.Spinner,{}),t&&(0,m.jsx)(o.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},r?`${r}-${l}`:`${i}-${l}`))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,p.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!0,initialSlide:e,followFinger:!1,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:d.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}const f=g},72182(e,t,r){"use strict";r.d(t,{WF:()=>c,bz:()=>a,n7:()=>l,rQ:()=>i});var n=r(89877);const o=16/9,s="wp-block-jetpack-slideshow_autoplay-paused";function i(e){a(e),c(e),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",function(){e.el&&(e.el.classList.contains(s)?(e.el.classList.remove(s),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(s),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))})}function a(e){if(!e||!e.el)return;const t=e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(!t)return;const r=t.naturalWidth/t.naturalHeight,n=Math.max(Math.min(r,o),1),s="undefined"!=typeof window?.8*window.innerHeight:600,i=Math.min(e.width/n,s),a=`${Math.floor(i)}px`,c=`${Math.floor(i/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=a,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=c,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=c}function c(e){(e.slides||[]).forEach((t,r)=>{t.setAttribute("aria-hidden",r===e.activeIndex?"false":"true"),r===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}),function(e){const t=e.slides[e.activeIndex];if(!t)return;const r=t.getElementsByTagName("FIGCAPTION")[0],o=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=r?r.innerHTML:(0,n.escapeHTML)(o.alt))}(e)}function l(e){(e.pagination.bullets||[]).forEach(t=>{t.addEventListener("click",()=>{const t=e.slides[e.realIndex];setTimeout(()=>{t.focus()},500)})})}},13391(e,t,r){"use strict";r.d(t,{Ay:()=>_});var n=r(85985),o=r(63162),s=r(94715),i=r(56427),a=r(29491),c=r(47143),l=r(98490),u=r.n(l),d=r(43656),p=r(86087),h=r(27723),m=r(66087),g=r(87762),f=r(95213),b=r(82795),v=r(63728),y=(r(17319),r(10790));const __=h.__,k=["image"],w=(e,t)=>{const r=(0,m.pick)(e,["alt","id","link","caption"]),n=e?.sizes?.[t]||e?.media_details?.sizes?.[t]||e?.sizes?.full||e?.media_details?.sizes?.full||e;return r.url=n?.url||n?.source_url||e.url,r.width=n?.width||null,r.height=n?.height||null,r.aspectRatio=n?.width&&n?.height?`${n.width} / ${n.height}`:null,r},_=(0,a.compose)((0,c.withSelect)((e,t)=>{const{ids:r}=t.attributes,{getEntityRecord:n}=e("core");return{imageSizes:e("core/editor").getEditorSettings().imageSizes,resizedImages:r.map(e=>{const t=n("postType","attachment",e);return{id:e,sizes:t?.media_details?.sizes}})}}),(0,c.withDispatch)(e=>{const{lockPostSaving:t,unlockPostSaving:r}=e("core/editor");return{lockPostSaving:t,unlockPostSaving:r}}),i.withNotices)(({attributes:e,setAttributes:t,className:r,isSelected:a,noticeOperations:c,noticeUI:l,lockPostSaving:h,unlockPostSaving:m,imageSizes:_,resizedImages:x})=>{const{align:j,autoplay:C,delay:A,effect:S,images:E,sizeSlug:T,ids:N}=e,P=(0,s.useBlockProps)({className:r}),B=e=>{t({images:e,ids:e.map(({id:e})=>parseInt(e,10))})};(0,p.useEffect)(()=>{"undefined"!=typeof window&&u()(function(){(0,v.A)()})},[]);const R=e=>B(e.map(e=>w(e,T))),I=e=>{const t="slideshowBlockLock";h(t),(0,d.mediaUpload)({allowedTypes:k,filesList:e,onFileChange:e=>{const r=e.map(e=>w(e,T));B([...E||[],...r]),r.every(e=>(0,o.isBlobURL)(e.url))||m(t)},onError:c.createErrorNotice})},D=e=>I(e.target.files);let L;return(0,p.useEffect)(()=>{T||t({sizeSlug:N.length?"full":"large"})},[]),L=0===E.length?(0,y.jsx)(s.MediaPlaceholder,{icon:(0,n.sh)(g),labels:{title:__("Slideshow","jetpack"),instructions:__("Drag images, upload new ones or select files from your library.","jetpack")},onSelect:R,accept:"image/*",allowedTypes:k,multiple:!0,notices:l,onError:c.createErrorNotice}):(0,y.jsxs)(y.Fragment,{children:[l,(0,y.jsx)(b.A,{align:j,autoplay:C,delay:A,effect:S,images:E,onError:c.createErrorNotice}),(0,y.jsx)(i.DropZone,{onFilesDrop:I}),a&&(0,y.jsx)("div",{className:"wp-block-jetpack-slideshow__add-item",children:(0,y.jsx)(i.FormFileUpload,{multiple:!0,className:"wp-block-jetpack-slideshow__add-item-button",onChange:D,accept:"image/*",icon:"insert",__next40pxDefaultSize:!0,children:__("Upload an image","jetpack")})})]}),(0,y.jsxs)("div",{...P,children:[(0,y.jsx)(s.InspectorControls,{children:(0,y.jsx)(f.H,{attributes:e,imageSizeOptions:_?.map(({name:e,slug:t})=>({value:t,label:e}))??[],onChangeImageSize:e=>{const r=E.map(t=>{const r=x.find(({id:e})=>parseInt(e,10)===parseInt(t.id,10)),n=r?.sizes?.[e]||r?.media_details?.sizes?.[e]||r?.sizes?.full||r?.media_details?.sizes?.full,o=n?.source_url||n?.url||t.url;return{...t,...o&&{url:o}}});B(r),t({sizeSlug:e})},setAttributes:t})}),(0,y.jsx)(s.BlockControls,{children:(0,y.jsx)(f.o,{allowedMediaTypes:k,attributes:e,onSelectImages:R})}),L]})})},96764(e,t,r){"use strict";var n=r(94375),o=r(87762),s=r(88075),i=r(13391),a=r(7928),c=r(96374),l=r(88513),u=r(98564),d=r(37332);(0,n.M)(o,{edit:i.Ay,save:a.A,transforms:d.A,example:{attributes:{align:"center",autoplay:!0,images:[{alt:"",caption:"",url:c},{alt:"",caption:"",url:l},{alt:"",caption:"",url:u}],effect:"slide"}},deprecated:s.A})},30889(e,t,r){"use strict";r.d(t,{y:()=>o});var n=r(27723);const __=n.__;function o(e,t,r){let o="";if(r<=5)for(let e=1;e<=r;e++){o+='<button class="'+`swiper-pagination-bullet${e===t?" swiper-pagination-bullet-active":""}`+'" tab-index="0" role="button" aria-label="'+(0,n.sprintf)(/* translators: %s: the slide number to navigate to */ | |
| 24 | +__("Go to slide %s","jetpack"),e)+'"></button>'}else o+=`<div class="swiper-pagination-simple">${t} / ${r}</div>`;return o}},7928(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(94715),o=r(82795),s=r(10790);const i=({attributes:{align:e,autoplay:t,delay:r,effect:i,images:a},className:c})=>{const l=n.useBlockProps.save({className:c});return(0,s.jsx)(o.A,{align:e,autoplay:t,className:l.className,delay:r,effect:i,images:a})};r.dn(i)},82795(e,t,r){"use strict";r.d(t,{A:()=>f});var n=r(63162),o=r(94715),s=r(56427),i=r(86087),a=r(27723),c=r(13022),l=r(66087),u=r(94107),d=r(33170),p=r(30889),h=r(34308),m=r(10790);const __=a.__;class g extends i.Component{pendingRequestAnimationFrame=null;resizeObserver=null;static defaultProps={effect:"slide"};constructor(e){super(e),this.slideshowRef=(0,i.createRef)(),this.btnNextRef=(0,i.createRef)(),this.btnPrevRef=(0,i.createRef)(),this.paginationRef=(0,i.createRef)()}componentDidMount(){const{onError:e}=this.props;this.buildSwiper().then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{e(__("The Swiper library could not be loaded.","jetpack"))})}componentWillUnmount(){this.clearResizeObserver(),this.clearPendingRequestAnimationFrame()}componentDidUpdate(e){const{align:t,autoplay:r,delay:n,effect:o,images:s,onError:i}=this.props;if(t===e.align&&(0,l.isEqual)(s,e.images)||this.swiperInstance&&this.swiperInstance.update(),o!==e.effect||r!==e.autoplay||n!==e.delay||s!==e.images){let t;t=this.swiperIndex?s.length===e.images.length?this.swiperInstance.realIndex:e.images.length:0,this.swiperInstance&&this.swiperInstance.destroy(!0,!0),this.buildSwiper(t).then(e=>{this.swiperInstance=e,this.initializeResizeObserver(e)}).catch(()=>{i(__("The Swiper library could not be loaded.","jetpack"))})}}initializeResizeObserver=e=>{this.clearResizeObserver(),this.resizeObserver=new u.A(()=>{this.clearPendingRequestAnimationFrame(),this.pendingRequestAnimationFrame=requestAnimationFrame(()=>{(0,h.bz)(e),e.update()})}),this.resizeObserver.observe(e.el)};clearPendingRequestAnimationFrame=()=>{this.pendingRequestAnimationFrame&&(cancelAnimationFrame(this.pendingRequestAnimationFrame),this.pendingRequestAnimationFrame=null)};clearResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};render(){if(!this.props?.images?.length)return null;const{autoplay:e,className:t,delay:r,effect:i,images:a}=this.props;return(0,m.jsx)("div",{className:t,"data-autoplay":e||null,"data-delay":e?r:null,"data-effect":i,style:{"--aspect-ratio":a[0]?.aspectRatio?`calc(${a[0].aspectRatio})`:void 0},children:(0,m.jsxs)("div",{className:"wp-block-jetpack-slideshow_container swiper",ref:this.slideshowRef,children:[(0,m.jsx)("ul",{className:"wp-block-jetpack-slideshow_swiper-wrapper swiper-wrapper",children:a.map(({alt:e,caption:t,id:r,url:i,aspectRatio:a},l)=>(0,m.jsx)("li",{className:(0,c.A)("wp-block-jetpack-slideshow_slide","swiper-slide",(0,n.isBlobURL)(i)&&"is-transient"),children:(0,m.jsxs)("figure",{children:[(0,m.jsx)("img",{alt:e,className:`wp-block-jetpack-slideshow_image wp-image-${r}`,"data-id":r,"data-aspect-ratio":a,src:i}),(0,n.isBlobURL)(i)&&(0,m.jsx)(s.Spinner,{}),t&&(0,m.jsx)(o.RichText.Content,{className:"wp-block-jetpack-slideshow_caption gallery-caption",tagName:"figcaption",value:t})]})},r?`${r}-${l}`:`${i}-${l}`))}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-prev swiper-button-prev swiper-button-white",ref:this.btnPrevRef,role:"button"}),(0,m.jsx)("a",{className:"wp-block-jetpack-slideshow_button-next swiper-button-next swiper-button-white",ref:this.btnNextRef,role:"button"}),(0,m.jsx)("a",{"aria-label":"Pause Slideshow",className:"wp-block-jetpack-slideshow_button-pause",role:"button"}),(0,m.jsx)("div",{className:"wp-block-jetpack-slideshow_pagination swiper-pagination swiper-pagination-white",ref:this.paginationRef})]})})}prefersReducedMotion=()=>"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;buildSwiper=(e=0)=>(0,d.A)(this.slideshowRef.current,{autoplay:!(!this.props.autoplay||this.prefersReducedMotion())&&{delay:1e3*this.props.delay,disableOnInteraction:!1},effect:this.props.effect,loop:!1,initialSlide:e,followFinger:!1,navigation:{nextEl:this.btnNextRef.current,prevEl:this.btnPrevRef.current},pagination:{clickable:!0,el:this.paginationRef.current,type:"custom",renderCustom:p.y}},{init:h.rQ,imagesReady:h.bz,paginationRender:h.n7,transitionEnd:h.WF})}const f=g},34308(e,t,r){"use strict";r.d(t,{WF:()=>c,bz:()=>a,n7:()=>l,rQ:()=>i});var n=r(89877);const o=16/9,s="wp-block-jetpack-slideshow_autoplay-paused";function i(e){e.slides.length>1&&(e.loopDestroy(),e.params.loop=!0,e.loopCreate(),e.update()),a(e),c(e),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",function(){e.el&&(e.el.classList.contains(s)?(e.el.classList.remove(s),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(s),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))})}function a(e){if(!e||!e.el)return;const t=e.params.loop?e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img'):e.el.querySelector(".swiper-slide img");if(!t)return;let r;if(t.naturalWidth>0&&t.naturalHeight>0)r=t.naturalWidth/t.naturalHeight;else if(t.dataset.aspectRatio){const e=t.dataset.aspectRatio.match(/(\d+) \/ (\d+)/);e&&e[1]&&e[2]&&(r=parseInt(e[1],10)/parseInt(e[2],10))}else t.getAttribute("width")&&t.getAttribute("height")&&(r=parseInt(t.getAttribute("width"),10)/parseInt(t.getAttribute("height"),10));r||(r=o,t.complete||t.addEventListener("load",()=>a(e),{once:!0}));const n=Math.max(Math.min(r,o),1),s="undefined"!=typeof window?.8*window.innerHeight:600,i=Math.min(e.width/n,s),c=`${Math.floor(i)}px`,l=`${Math.floor(i/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=c,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=l,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=l}function c(e){(e.slides||[]).forEach((t,r)=>{t.setAttribute("aria-hidden",r===e.activeIndex?"false":"true"),r===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}),function(e){const t=e.slides[e.activeIndex];if(!t)return;const r=t.getElementsByTagName("FIGCAPTION")[0],o=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=r?r.innerHTML:(0,n.escapeHTML)(o.alt))}(e)}function l(e){(e.pagination.bullets||[]).forEach(t=>{t.addEventListener("click",()=>{const t=e.slides[e.realIndex];setTimeout(()=>{t.focus()},500)})})}},37332(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(74997);function o(e=[]){return e.filter(({id:e,url:t})=>e&&t)}const s={from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>o(e).length>0,transform:e=>{const t=o(e);return(0,n.createBlock)("jetpack/slideshow",{images:t.map(({alt:e,caption:t,id:r,url:n})=>({alt:e,caption:t,id:r,url:n})),ids:t.map(({id:e})=>e)})}},{type:"block",blocks:["core/gallery","jetpack/tiled-gallery"],transform:({images:e=[]},t)=>{!e.length&&t?.length&&(e=t.filter(e=>"core/image"===e.name&&e.attributes?.url).map(({attributes:e})=>({id:e.id,url:e.url,link:e.href,alt:e.alt,caption:e.caption})));const r=o(e);return r.length>0?(0,n.createBlock)("jetpack/slideshow",{images:r.map(({alt:e,caption:t,id:r,url:n})=>({alt:e,caption:t,id:r,url:n})),ids:r.map(({id:e})=>e)}):(0,n.createBlock)("jetpack/slideshow")}}],to:[{type:"block",blocks:["core/gallery"],transform:({images:e,ids:t})=>(0,n.createBlock)("core/gallery",{images:e,ids:t})},{type:"block",blocks:["core/image"],transform:({images:e})=>e.length>0?e.map(({id:e,url:t,alt:r,caption:o})=>(0,n.createBlock)("core/image",{id:e,url:t,alt:r,caption:o})):(0,n.createBlock)("core/image")}]}},63728(e,t,r){"use strict";function n(){const e=(e,t)=>{const r=e.querySelector(".wp-site-blocks");if(!r)return;const{paddingLeft:n,paddingRight:o}=window.getComputedStyle(r),s=parseFloat(n)+parseFloat(o);e.querySelectorAll(t?".wp-block-group.is-vertical:not(.is-layout-constrained) .wp-block-jetpack-slideshow":".wp-block-group.is-vertical:not(.is-layout-constrained) .wp-block-jetpack-slideshow:not(.entry-content .wp-block-jetpack-slideshow)").forEach(e=>{e.style.maxWidth=`calc(100vw - ${s}px)`})};e(document,!1);document.querySelectorAll("iframe").forEach(t=>{const r=t.contentDocument,n=t.closest("#editor");if(r&&n){r.querySelectorAll(".wp-block-group.is-vertical:not(.is-layout-constrained) .wp-block-jetpack-slideshow").forEach(e=>{e.style.maxWidth="inherit"})}else r&&e(r,!0)})}r.d(t,{A:()=>n})},35463(e,t,r){"use strict";r.d(t,{WN:()=>i,ZS:()=>s,aQ:()=>c,eN:()=>n,hE:()=>o,kc:()=>l,rK:()=>a});const n=["image"],o=4,s=20,i=20,a=2e3,c="circle",l=[{isDefault:!0,name:"rectangular"},{name:c},{name:"square"},{name:"columns"}]},55702(e,t,r){"use strict";r.d(t,{M:()=>m,c:()=>h});var n=r(94715),o=r(56427),s=r(86087),i=r(27723),a=r(74006),c=r(35463),l=r(62820),u=r(9888),d=r(10790);const __=i.__,p=[{value:"attachment",label:__("Attachment Page","jetpack")},{value:"media",label:__("Media File","jetpack")},{value:"none",label:__("None","jetpack")},{value:"custom",label:__("Custom","jetpack")}],h=({images:e,onSelectImages:t,imageFilter:r,onFilterChange:i})=>(0,d.jsx)(n.BlockControls,{children:!!e.length&&(0,d.jsxs)(s.Fragment,{children:[(0,d.jsx)(o.ToolbarGroup,{children:(0,d.jsx)(o.ToolbarItem,{children:()=>(0,d.jsx)(n.MediaUpload,{onSelect:t,allowedTypes:c.eN,multiple:!0,gallery:!0,value:e.map(e=>e.id),render:({open:e})=>(0,d.jsx)(a.A,{label:__("Edit Gallery","jetpack"),onClick:e})})})}),(0,d.jsx)(l.A,{value:r,onChange:i})]})}),m=({layoutStyle:e,images:t,columns:r,onColumnsChange:s,roundedCorners:i,onRoundedCornersChange:a,linkTo:l,onLinkToChange:h,selectedImage:m,setImageAttributes:g})=>(0,d.jsxs)(n.InspectorControls,{children:[(0,d.jsxs)(o.PanelBody,{title:__("Tiled Gallery settings","jetpack"),children:[(0,u.o)(e)&&t.length>1&&(0,d.jsx)(o.RangeControl,{label:__("Columns","jetpack"),value:r,onChange:s,min:1,max:Math.min(c.ZS,t.length),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),e!==c.aQ&&(0,d.jsx)(o.RangeControl,{label:__("Rounded corners","jetpack"),value:i,onChange:a,min:0,max:c.WN,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(o.SelectControl,{label:__("Link To","jetpack"),value:l,onChange:h,options:p,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),null!==m&&"custom"===l&&(0,d.jsx)(o.PanelBody,{title:__("Image Link Settings","jetpack"),children:(0,d.jsx)(o.TextControl,{label:__("Link URL","jetpack"),value:t[m]?.customLink||"",onChange:e=>{"custom"===l&&g(m)({customLink:e})},placeholder:__("Enter URL","jetpack"),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})})]})},43268(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:{type:"string",default:"center"},className:{type:"string",default:"is-style-rectangular"},columns:{type:"number"},columnWidths:{type:"array",default:[]},ids:{type:"array",default:[]},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",type:"number",selector:"img",source:"attribute"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},customLink:{attribute:"href",selector:"a",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}}},44681(e,t,r){"use strict";r.d(t,{T:()=>i,m:()=>a});var n=r(43268),o=r(66852),s=r(15121);const i={attributes:n.A,supports:s.A,save:o.A},a={attributes:n.A,supports:s.A,save:o.t}},66852(e,t,r){"use strict";r.d(t,{A:()=>d,t:()=>p});var n=r(94715),o=r(13022),s=r(90907),i=r(35463),a=r(22728),c=r(6775),l=r(10790);function u(e){return function({attributes:t}){const{imageFilter:r,images:u}=t;if(!u.length)return null;const{align:d,className:p,columns:h=(0,a.EB)(t),linkTo:m,roundedCorners:g,columnWidths:f}=t,b=n.useBlockProps.save();return(0,l.jsx)("div",{...b,className:(0,o.A)(b.className,p),children:(0,l.jsx)(c.A,{align:d,columns:h,imageFilter:r,images:u,isSave:!0,layoutStyle:(0,s.D)(i.kc,p),linkTo:m,roundedCorners:g,columnWidths:f,skipPhotonDomain:e})})}}const d=u(!1),p=u(!0)},15121(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},10602(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(44681),o=r(9190),s=r(72203),i=r(52516),a=r(24753),c=r(62554),l=r(59679),u=r(75e3),d=r(20837);const p=[n.T,n.m,d,u,l,c,a,i,s,o]},70263(e,t,r){"use strict";r.d(t,{T$:()=>i,ZS:()=>o,hE:()=>n,kc:()=>a,rK:()=>s});const n=4,o=20,s=2e3,i="rectangular",a=[{isDefault:!0,name:i},{name:"circle"},{name:"square"},{name:"columns"}]},81273(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(63162),o=r(10790);function s(e){const{"aria-label":t,alt:r,height:s,id:i,link:a,linkTo:c,origUrl:l,url:u,width:d}=e;if((0,n.isBlobURL)(l))return null;let p;switch(c){case"media":p=u;break;case"attachment":p=a}const h=(0,o.jsx)("img",{alt:r,"aria-label":t,"data-height":s,"data-id":i,"data-link":a,"data-url":l,"data-width":d,src:u});return(0,o.jsx)("figure",{className:"tiled-gallery__item",children:p?(0,o.jsx)("a",{href:p,children:h}):h})}},9190(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>o,save:()=>n.A,support:()=>s});var n=r(42511);const o={align:{default:"center",type:"string"},className:{default:`is-style-${r(70263).T$}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},caption:{selector:"figcaption",source:"html",type:"string"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"}},s={align:["center","wide","full"],customClassName:!1,html:!1}},59265(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e}){return(0,n.jsx)("div",{className:"tiled-gallery__col",children:e})}},70669(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,galleryRef:t}){return(0,n.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},83943(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(63162),o=r(86087),s=r(27723),i=r(14936),a=r(70263),c=r(81273),l=r(20762),u=r(84034),d=r(10790);const __=s.__;class p extends o.Component{photonize({height:e,width:t,url:r}){if(!r)return;if((0,n.isBlobURL)(r)||/^https?:\/\/localhost/.test(r))return r;const o=r.split("?",1)[0],s=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)?m:i.A,{layoutStyle:c}=this.props;if(h(c)&&t&&e){const r=Math.min(a.rK,t,e);return s(o,{resize:`${r},${r}`})}return s(o)}renderImage(e,t){const{images:r,linkTo:n,selectedImage:o}=this.props,i=(0,s.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 25 | +__("image %1$d of %2$d in gallery","jetpack"),t+1,r.length);return(0,d.jsx)(c.A,{alt:e.alt,"aria-label":i,height:e.height,id:e.id,origUrl:e.url,isSelected:o===t,link:e.link,linkTo:n,url:this.photonize(e),width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:o,layoutStyle:s}=this.props,i=h(s)?u.A:l.A,a=this.props.images.map(this.renderImage,this);return(0,d.jsxs)("div",{className:r,children:[(0,d.jsx)(i,{align:e,columns:n,images:o,layoutStyle:s,renderedImages:a}),t]})}}function h(e){return["circle","square"].includes(e)}function m(e,t={}){const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))n.searchParams.set(Object.hasOwn(r,e)?r[e]:e,o);return n.toString()}},20762(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(86087),o=r(94107),s=r(59265),i=r(70669),a=r(15199),c=r(34896),l=r(5236),u=r(10790);class d extends n.Component{gallery=(0,n.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame(()=>{for(const{contentRect:t,target:r}of e){const{width:e}=t;(0,l.S)(r).forEach(t=>(0,l.r)(t,e))}})};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new o.A(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:o}=this.props,l=(0,c.mJ)(r),d="columns"===n?(0,c.FL)(l,t):(0,c.VU)(l,{isWide:["full","wide"].includes(e)});let p=0;return(0,u.jsx)(i.A,{galleryRef:this.gallery,children:d.map((e,t)=>(0,u.jsx)(a.A,{children:e.map((e,t)=>{const r=o.slice(p,p+e);return p+=e,(0,u.jsx)(s.A,{children:r},t)})},t))})}}},34896(e,t,r){"use strict";r.d(t,{FL:()=>i,VU:()=>C,mJ:()=>o});var n=r(66087);function o(e){return e.map(s)}function s({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,o=[];let s=e,i=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,t=>{const n=i<=(e+1)*r;return n&&(i+=t),n}).length;o.push(t),s=s.slice(t)}return o.push(s.length),[o]}const a=A([2,1,2],5),c=S([E,E,T,E,E]),l=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),w=A([1,1,1],3),_=S([(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2)),P(1.6)]),x=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const r=(e,o)=>{if(!o.length)return e;let s;s=o.length>15&&c(o)&&a(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&d(o)&&p(e)?[1,2,1]:h(o)&&m(e)?[1,3]:g(o)&&f(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&y(e)&&(0,n.sum)(o.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)(t.slice(0,4));return k(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,r){const o=(0,n.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||r)}(e,o,t)?[1,1,1]:_(o)&&x(e)?[2,1]:j(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([s]),C=(0,n.sum)(s),A=o.slice(C);return r(i,A)};return r([],e)}function A(e,t){return r=>!r.slice(-t).some(t=>(0,n.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},5236(e,t,r){"use strict";r.d(t,{S:()=>i,r:()=>s});var n=r(70263);function o(e,t){const r=(t-e.reduce((e,t)=>e+t,0))/e.length;return e.map(e=>e+r)}function s(e,t){!function(e,[t,r],s){const i=1/t*(s-n.hE*(e.childElementCount-1)-r);!function(e,{rawHeight:t,rowWidth:r}){const s=a(e),i=s.map(e=>(t-n.hE*(e.childElementCount-1))*l(e)[0]),d=o(i,r);s.forEach((e,r)=>{const s=i[r],a=d[r];!function(e,{colHeight:t,width:r,rawWidth:n}){const s=c(e).map(e=>n/u(e)),i=o(s,t);Array.from(e.children).forEach((e,t)=>{const n=i[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)})}(e,{colHeight:t-n.hE*(e.childElementCount-1),width:a,rawWidth:s})})}(e,{rawHeight:i,rowWidth:s-n.hE*(e.childElementCount-1)})}(e,function(e){const t=a(e).map(l).reduce(([e,t],[r,n])=>[e+r,t+n],[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function a(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function c(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function l(e){const t=c(e),r=t.length,n=1/t.map(u).reduce((e,t)=>e+1/t,0);return[n,n*r||1]}function u(e){const t=parseInt(e.dataset.width,10),r=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&r&&!Number.isNaN(r)?t/r:1}},15199(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(13022),o=r(10790);function s({children:e,className:t}){return(0,o.jsx)("div",{className:(0,n.A)("tiled-gallery__row",t),children:e})}},84034(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(66087),o=r(70263),s=r(59265),i=r(70669),a=r(15199),c=r(10790);function l({columns:e,renderedImages:t}){const r=Math.min(o.ZS,e),l=t.length%r;return(0,c.jsx)(i.A,{children:[...l?[t.slice(0,l)]:[],...(0,n.chunk)(t.slice(l),r)].map((e,t)=>(0,c.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,c.jsx)(s.A,{children:e},t))},t))})}},42511(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(90907),o=r(70263),s=r(83943),i=r(10790);function a(e){return Math.min(3,e.images.length)}function c({attributes:e}){const{images:t}=e;if(!t.length)return null;const{align:r,className:c,columns:l=a(e),linkTo:u}=e;return(0,i.jsx)(s.A,{align:r,className:c,columns:l,images:t,layoutStyle:(0,n.D)(o.kc,c),linkTo:u})}},43566(e,t,r){"use strict";r.d(t,{T$:()=>a,WN:()=>o,ZS:()=>n,aQ:()=>i,kc:()=>c,rK:()=>s});const n=20,o=20,s=2e3,i="circle",a="rectangular",c=[{isDefault:!0,name:a},{name:i},{name:"square"},{name:"columns"}]},89427(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(63162),o=r(13022),s=r(10790);function i(e){const{alt:t,imageFilter:r,height:i,id:a,link:c,linkTo:l,origUrl:u,url:d,width:p}=e;if((0,n.isBlobURL)(u))return null;let h;switch(l){case"media":h=d;break;case"attachment":h=c}const m=(0,s.jsx)("img",{alt:t,"data-height":i,"data-id":a,"data-link":c,"data-url":u,"data-width":p,src:d});return(0,s.jsx)("figure",{className:(0,o.A)("tiled-gallery__item",{[`filter__${r}`]:!!r}),children:h?(0,s.jsx)("a",{href:h,children:m}):m})}},72203(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>s,save:()=>o.A,supports:()=>i});var n=r(43566),o=r(14266);const s={align:{default:"center",type:"string"},className:{default:`is-style-${n.T$}`,type:"string"},columns:{type:"number"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],customClassName:!1,html:!1}},91654(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e}){return(0,n.jsx)("div",{className:"tiled-gallery__col",children:e})}},4228(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,galleryRef:t}){return(0,n.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},27230(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(86087),o=r(27723),s=r(13022),i=r(43566),a=r(89427),c=r(24549),l=r(12165),u=r(86209),d=r(10790);const __=o.__;class p extends n.Component{renderImage(e,t){const{columns:r,imageFilter:n,images:s,linkTo:i,layoutStyle:l,selectedImage:u}=this.props,p=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 26 | +__("image %1$d of %2$d in gallery","jetpack"),t+1,s.length),{src:h,srcSet:m}=(0,c.A)(e,{layoutStyle:l});return(0,d.jsx)(a.A,{alt:e.alt,"aria-label":p,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:u===t,link:e.link,linkTo:i,origUrl:e.url,showMovers:s.length>1,srcSet:m,url:h,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:o,layoutStyle:a,roundedCorners:p}=this.props,h=(0,c.s)(a)?u.A:l.A,m=this.props.images.map(this.renderImage,this),g=a!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{className:(0,s.A)(r,{[`has-rounded-corners-${g}`]:g>0}),children:[(0,d.jsx)(h,{align:e,columns:n,images:o,layoutStyle:a,renderedImages:m}),t]})}}},12165(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(86087),o=r(91654),s=r(4228),i=r(28198),a=r(89195),c=r(10790);class l extends n.Component{gallery=(0,n.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:l}=this.props,u=(0,a.mJ)(r),d="columns"===n?(0,a.FL)(u,t):(0,a.VU)(u,{isWide:["full","wide"].includes(e)});let p=0;return(0,c.jsx)(s.A,{galleryRef:this.gallery,children:d.map((e,t)=>(0,c.jsx)(i.A,{children:e.map((e,t)=>{const r=l.slice(p,p+e);return p+=e,(0,c.jsx)(o.A,{children:r},t)})},t))})}}},89195(e,t,r){"use strict";r.d(t,{FL:()=>i,VU:()=>C,mJ:()=>o});var n=r(66087);function o(e){return e.map(s)}function s({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,o=[];let s=e,i=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,t=>{const n=i<=(e+1)*r;return n&&(i+=t),n}).length;o.push(t),s=s.slice(t)}return o.push(s.length),[o]}const a=A([2,1,2],5),c=S([E,E,T,E,E]),l=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),w=A([1,1,1],3),_=S([(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2)),P(1.6)]),x=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const r=(e,o)=>{if(!o.length)return e;let s;s=o.length>15&&c(o)&&a(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&d(o)&&p(e)?[1,2,1]:h(o)&&m(e)?[1,3]:g(o)&&f(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&y(e)&&(0,n.sum)(o.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)(t.slice(0,4));return k(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,r){const o=(0,n.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||r)}(e,o,t)?[1,1,1]:_(o)&&x(e)?[2,1]:j(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([s]),C=(0,n.sum)(s),A=o.slice(C);return r(i,A)};return r([],e)}function A(e,t){return r=>!r.slice(-t).some(t=>(0,n.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},28198(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(13022),o=r(10790);function s({children:e,className:t}){return(0,o.jsx)("div",{className:(0,n.A)("tiled-gallery__row",t),children:e})}},86209(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(66087),o=r(43566),s=r(91654),i=r(4228),a=r(28198),c=r(10790);function l({columns:e,renderedImages:t}){const r=Math.min(o.ZS,e),l=t.length%r;return(0,c.jsx)(i.A,{children:[...l?[t.slice(0,l)]:[],...(0,n.chunk)(t.slice(l),r)].map((e,t)=>(0,c.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,c.jsx)(s.A,{children:e},t))},t))})}},14266(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(90907),o=r(43566),s=r(27230),i=r(10790);function a(e){return Math.min(3,e.images.length)}function c({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:c,className:l,columns:u=a(e),linkTo:d,roundedCorners:p}=e;return(0,i.jsx)(s.A,{align:c,className:l,columns:u,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,n.D)(o.kc,l),linkTo:d,roundedCorners:p})}},24549(e,t,r){"use strict";r.d(t,{A:()=>a,s:()=>i});var n=r(63162),o=r(14936),s=r(43566);function i(e){return["circle","square"].includes(e)}function a(e,t={}){if(!e.height||!e.url||!e.width)return{};if((0,n.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const r=e.url.split("?",1)[0],{height:a,width:l}=e,{layoutStyle:u}=t,d=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)?c:o.A;let p;if(i(u)&&l&&a){const e=Math.min(s.rK,l,a);p=d(r,{resize:`${e},${e}`})}else p=d(r);let h=[];if(i(u)){const e=Math.min(600,l,a),t=Math.min(s.rK,l,a);for(let n=e;n<t;n+=300){const e=d(r,{resize:`${n},${n}`,strip:"info"});e&&h.push(`${e} ${n}w`)}}else{const e=Math.min(600,l),t=Math.min(s.rK,l);for(let n=e;n<t;n+=300){const e=d(r,{strip:"info",width:n});e&&h.push(`${e} ${n}w`)}}return h=h.join(","),Object.assign({src:p},h&&{srcSet:h})}function c(e,t={}){const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))n.searchParams.set(Object.hasOwn(r,e)?r[e]:e,o);return n.toString()}},60041(e,t,r){"use strict";r.d(t,{T$:()=>a,WN:()=>o,ZS:()=>n,aQ:()=>i,kc:()=>c,rK:()=>s});const n=20,o=20,s=2e3,i="circle",a="rectangular",c=[{isDefault:!0,name:a},{name:i},{name:"square"},{name:"columns"}]},61820(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(63162),o=r(13022),s=r(10790);function i(e){const{alt:t,imageFilter:r,height:i,id:a,link:c,linkTo:l,origUrl:u,url:d,width:p}=e;if((0,n.isBlobURL)(u))return null;let h;switch(l){case"media":h=d;break;case"attachment":h=c}const m=(0,s.jsx)("img",{alt:t,"data-height":i,"data-id":a,"data-link":c,"data-url":u,"data-width":p,src:d});return(0,s.jsx)("figure",{className:(0,o.A)("tiled-gallery__item",{[`filter__${r}`]:!!r}),children:h?(0,s.jsx)("a",{href:h,children:m}):m})}},52516(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>s,migrate:()=>a,save:()=>o.A,supports:()=>i});var n=r(60041),o=r(93865);const s={align:{default:"center",type:"string"},className:{default:`is-style-${n.T$}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],customClassName:!1,html:!1},a=e=>{const t=Math.pow(10,5);return{...e,columnWidths:e.columnWidths.map(e=>e.map(e=>Math.round(e*t)/t))}}},63307(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,width:t}){const r=Math.pow(10,12),o=Math.round(t*r)/r,s=t?{flexBasis:`${o}%`}:void 0;return(0,n.jsx)("div",{className:"tiled-gallery__col",style:s,children:e})}},37471(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,galleryRef:t}){return(0,n.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},98413(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(86087),o=r(27723),s=r(13022),i=r(60041),a=r(61820),c=r(13014),l=r(18228),u=r(49611),d=r(10790);const __=o.__;class p extends n.Component{renderImage(e,t){const{columns:r,imageFilter:n,images:s,isSave:i,linkTo:l,layoutStyle:u,onMoveBackward:p,onMoveForward:h,onRemoveImage:m,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 27 | +__("image %1$d of %2$d in gallery","jetpack"),t+1,s.length),{src:y,srcSet:k}=(0,c.A)(e,{layoutStyle:u});return(0,d.jsx)(a.A,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:f===t,link:e.link,linkTo:l,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:m(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:s.length>1,srcSet:k,url:y,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:o,layoutStyle:a,roundedCorners:p,onResize:h,isSave:m,columnWidths:g}=this.props,f=(0,c.s)(a)?u.A:l.A,b=this.props.images.map(this.renderImage,this),v=a!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{className:(0,s.A)(r,{[`has-rounded-corners-${v}`]:v>0}),children:[(0,d.jsx)(f,{align:e,columns:n,columnWidths:m?g:void 0,images:o,layoutStyle:a,renderedImages:b,onResize:m?void 0:h}),t]})}}},18228(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(86087),o=r(63307),s=r(37471),i=r(66645),a=r(70394),c=r(10790);class l extends n.Component{gallery=(0,n.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:l,columnWidths:u}=this.props,d=(0,a.mJ)(r),p="columns"===n?(0,a.FL)(d,t):(0,a.VU)(d,{isWide:["full","wide"].includes(e)});let h=0;return(0,c.jsx)(s.A,{galleryRef:this.gallery,children:p.map((e,t)=>(0,c.jsx)(i.A,{children:e.map((e,r)=>{const n=l.slice(h,h+e);return h+=e,(0,c.jsx)(o.A,{width:u?.[t]?.[r],children:n},r)})},t))})}}},70394(e,t,r){"use strict";r.d(t,{FL:()=>i,VU:()=>C,mJ:()=>o});var n=r(66087);function o(e){return e.map(s)}function s({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,o=[];let s=e,i=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,t=>{const n=i<=(e+1)*r;return n&&(i+=t),n}).length;o.push(t),s=s.slice(t)}return o.push(s.length),[o]}const a=A([2,1,2],5),c=S([E,E,T,E,E]),l=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),w=A([1,1,1],3),_=S([(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2)),P(1.6)]),x=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const r=(e,o)=>{if(!o.length)return e;let s;s=o.length>15&&c(o)&&a(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&d(o)&&p(e)?[1,2,1]:h(o)&&m(e)?[1,3]:g(o)&&f(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&y(e)&&(0,n.sum)(o.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)(t.slice(0,4));return k(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,r){const o=(0,n.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||r)}(e,o,t)?[1,1,1]:_(o)&&x(e)?[2,1]:j(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([s]),C=(0,n.sum)(s),A=o.slice(C);return r(i,A)};return r([],e)}function A(e,t){return r=>!r.slice(-t).some(t=>(0,n.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},66645(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(13022),o=r(10790);function s({children:e,className:t}){return(0,o.jsx)("div",{className:(0,n.A)("tiled-gallery__row",t),children:e})}},49611(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(66087),o=r(60041),s=r(63307),i=r(37471),a=r(66645),c=r(10790);function l({columns:e,renderedImages:t}){const r=Math.min(o.ZS,e),l=t.length%r;return(0,c.jsx)(i.A,{children:[...l?[t.slice(0,l)]:[],...(0,n.chunk)(t.slice(l),r)].map((e,t)=>(0,c.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,c.jsx)(s.A,{children:e},t))},t))})}},93865(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(90907),o=r(60041),s=r(98413),i=r(10790);function a(e){return Math.min(3,e.images.length)}function c({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:c,className:l,columns:u=a(e),linkTo:d,roundedCorners:p,columnWidths:h}=e;return(0,i.jsx)(s.A,{align:c,className:l,columns:u,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,n.D)(o.kc,l),linkTo:d,roundedCorners:p,columnWidths:h})}},13014(e,t,r){"use strict";r.d(t,{A:()=>a,s:()=>i});var n=r(63162),o=r(14936),s=r(60041);function i(e){return["circle","square"].includes(e)}function a(e,t={}){if(!e.height||!e.url||!e.width)return{};if((0,n.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url))return{src:e.url};const r=e.url.split("?",1)[0],{height:a,width:l}=e,{layoutStyle:u}=t,d=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)?c:o.A;let p;if(i(u)&&l&&a){const e=Math.min(s.rK,l,a);p=d(r,{resize:`${e},${e}`})}else p=d(r);let h=[];if(i(u)){const e=Math.min(600,l,a),t=Math.min(s.rK,l,a);for(let n=e;n<t;n+=300){const e=d(r,{resize:`${n},${n}`,strip:"info"});e&&h.push(`${e} ${n}w`)}}else{const e=Math.min(600,l),t=Math.min(s.rK,l);for(let n=e;n<t;n+=300){const e=d(r,{strip:"info",width:n});e&&h.push(`${e} ${n}w`)}}return h=h.join(","),Object.assign({src:p},h&&{srcSet:h})}function c(e,t={}){const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))n.searchParams.set(Object.hasOwn(r,e)?r[e]:e,o);return n.toString()}},86136(e,t,r){"use strict";r.d(t,{T$:()=>c,WN:()=>s,ZS:()=>o,aQ:()=>a,hE:()=>n,kc:()=>l,rK:()=>i});const n=4,o=20,s=20,i=2e3,a="circle",c="rectangular",l=[{isDefault:!0,name:c},{name:a},{name:"square"},{name:"columns"}]},52469(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(63162),o=r(13022),s=r(10790);function i(e){const{alt:t,imageFilter:r,height:i,id:a,link:c,linkTo:l,origUrl:u,url:d,width:p}=e;if((0,n.isBlobURL)(u))return null;let h;switch(l){case"media":h=d;break;case"attachment":h=c}const m=(0,s.jsx)("img",{alt:t,"data-height":i,"data-id":a,"data-link":c,"data-url":u,"data-width":p,src:d,"data-amp-layout":"responsive"});return(0,s.jsx)("figure",{className:(0,o.A)("tiled-gallery__item",{[`filter__${r}`]:!!r}),children:h?(0,s.jsx)("a",{href:h,children:m}):m})}},24753(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>s,save:()=>o.A,supports:()=>i});var n=r(86136),o=r(83276);const s={align:{default:"center",type:"string"},className:{default:`is-style-${n.T$}`,type:"string"},columns:{type:"number"},columnWidths:{default:[],type:"array"},ids:{default:[],type:"array"},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",selector:"img",source:"attribute",type:"number"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}},i={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},81992(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,width:t}){const r=t?{flexBasis:`${t}%`}:void 0;return(0,n.jsx)("div",{className:"tiled-gallery__col",style:r,children:e})}},7270(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,galleryRef:t}){return(0,n.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},66972(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(86087),o=r(27723),s=r(13022),i=r(86136),a=r(52469),c=r(32083),l=r(55807),u=r(35151),d=r(10790);const __=o.__;class p extends n.Component{renderImage(e,t){const{columns:r,imageFilter:n,images:s,isSave:i,linkTo:l,layoutStyle:u,onMoveBackward:p,onMoveForward:h,onRemoveImage:m,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 28 | +__("image %1$d of %2$d in gallery","jetpack"),t+1,s.length),{src:y,srcSet:k}=(0,c.A)(e,{layoutStyle:u});return(0,d.jsx)(a.A,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:f===t,link:e.link,linkTo:l,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:m(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:s.length>1,srcSet:k,url:y,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:o,layoutStyle:a,roundedCorners:p,onResize:h,style:m,isSave:g,columnWidths:f}=this.props,b=(0,c.s)(a)?u.A:l.A,v=this.props.images.map(this.renderImage,this),y=a!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{style:m,className:(0,s.A)(r,{[`has-rounded-corners-${y}`]:y>0}),children:[(0,d.jsx)(b,{align:e,columns:n,columnWidths:g?f:void 0,images:o,layoutStyle:a,renderedImages:v,onResize:g?void 0:h}),t]})}}},55807(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(86087),o=r(94107),s=r(81992),i=r(7270),a=r(14476),c=r(71245),l=r(86461),u=r(10790);class d extends n.Component{gallery=(0,n.createRef)();pendingRaf=null;ro=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}handleGalleryResize=e=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame(()=>{for(const{contentRect:t,target:r}of e){const{width:e}=t,n=[];(0,l.S)(r).forEach(t=>{n.push((0,l.r)(t,e))}),void 0!==this.props.onResize&&this.props.onResize(n)}})};triggerResize(){this.gallery.current&&this.handleGalleryResize([{target:this.gallery.current,contentRect:{width:this.gallery.current.clientWidth}}])}observeResize(){this.triggerResize(),this.ro=new o.A(this.handleGalleryResize),this.gallery.current&&this.ro.observe(this.gallery.current)}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,r){let n=0;return e.map(e=>e.map(e=>{const r=t.slice(n,n+e);return n+=e,r})).map(e=>(0,l.r)(e,r))}render(){const{align:e,columns:t,images:r,layoutStyle:o,renderedImages:l}=this.props,d=(0,c.mJ)(r),p="columns"===o?(0,c.FL)(d,t):(0,c.VU)(d,{isWide:["full","wide"].includes(e)}),h=n.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,l,1e3)})();let m=0;return(0,u.jsx)(i.A,{galleryRef:this.gallery,children:p.map((e,t)=>(0,u.jsx)(a.A,{children:e.map((e,r)=>{const n=l.slice(m,m+e);return m+=e,(0,u.jsx)(s.A,{width:h?.[t]?.[r],children:n},r)})},t))})}}},71245(e,t,r){"use strict";r.d(t,{FL:()=>i,VU:()=>C,mJ:()=>o});var n=r(66087);function o(e){return e.map(s)}function s({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,o=[];let s=e,i=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,t=>{const n=i<=(e+1)*r;return n&&(i+=t),n}).length;o.push(t),s=s.slice(t)}return o.push(s.length),[o]}const a=A([2,1,2],5),c=S([E,E,T,E,E]),l=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),w=A([1,1,1],3),_=S([(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2)),P(1.6)]),x=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const r=(e,o)=>{if(!o.length)return e;let s;s=o.length>15&&c(o)&&a(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&d(o)&&p(e)?[1,2,1]:h(o)&&m(e)?[1,3]:g(o)&&f(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&y(e)&&(0,n.sum)(o.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)(t.slice(0,4));return k(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,r){const o=(0,n.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||r)}(e,o,t)?[1,1,1]:_(o)&&x(e)?[2,1]:j(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([s]),C=(0,n.sum)(s),A=o.slice(C);return r(i,A)};return r([],e)}function A(e,t){return r=>!r.slice(-t).some(t=>(0,n.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},86461(e,t,r){"use strict";r.d(t,{S:()=>i,r:()=>s});var n=r(86136);function o(e,t){const r=(t-e.reduce((e,t)=>e+t,0))/e.length;return e.map(e=>e+r)}function s(e,t){return function(e,[t,r],s){const i=1/t*(s-n.hE*(e.childElementCount-1)-r);return function(e,{rawHeight:t,rowWidth:r}){const s=a(e),i=s.map(e=>(t-n.hE*(e.childElementCount-1))*l(e)[0]),d=o(i,r);s.forEach((e,r)=>{const s=i[r],a=d[r];!function(e,{colHeight:t,width:r,rawWidth:n}){const s=c(e).map(e=>n/u(e)),i=o(s,t);Array.from(e.children).forEach((e,t)=>{const n=i[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)})}(e,{colHeight:t-n.hE*(e.childElementCount-1),width:a,rawWidth:s})});return d.map(e=>parseFloat(e/r*100).toFixed(5))}(e,{rawHeight:i,rowWidth:s-n.hE*(e.childElementCount-1)})}(e,function(e){const t=a(e).map(l).reduce(([e,t],[r,n])=>[e+r,t+n],[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function a(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function c(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function l(e){const t=c(e),r=t.length,n=1/t.map(u).reduce((e,t)=>e+1/t,0);return[n,n*r||1]}function u(e){const t=parseInt(e.dataset.width,10),r=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&r&&!Number.isNaN(r)?t/r:1}},14476(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(13022),o=r(10790);function s({children:e,className:t}){return(0,o.jsx)("div",{className:(0,n.A)("tiled-gallery__row",t),children:e})}},35151(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(66087),o=r(86136),s=r(81992),i=r(7270),a=r(14476),c=r(10790);function l({columns:e,renderedImages:t}){const r=Math.min(o.ZS,e),l=t.length%r;return(0,c.jsx)(i.A,{children:[...l?[t.slice(0,l)]:[],...(0,n.chunk)(t.slice(l),r)].map((e,t)=>(0,c.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,c.jsx)(s.A,{children:e},t))},t))})}},83276(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(90907),o=r(86136),s=r(66972),i=r(10790);function a(e){return Math.min(3,e.images.length)}function c({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:c,className:l,columns:u=a(e),linkTo:d,roundedCorners:p,columnWidths:h}=e;return(0,i.jsx)(s.A,{align:c,className:l,columns:u,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,n.D)(o.kc,l),linkTo:d,roundedCorners:p,columnWidths:h})}},32083(e,t,r){"use strict";r.d(t,{A:()=>u,s:()=>l});var n=r(97999),o=r(85985),s=r(63162),i=r(14936),a=r(13087),c=r(86136);function l(e){return["circle","square"].includes(e)}function u(e,t={}){if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,a.A)())return{src:e.url};if((0,s.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,n.isWoASite)()&&(0,o.pP)())return{src:e.url};const r=e.url.split("?",1)[0],{height:u,width:p}=e,{layoutStyle:h}=t,m=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)?d:i.A;let g;if(l(h)&&p&&u){const e=Math.min(c.rK,p,u);g=m(r,{resize:`${e},${e}`})}else g=m(r);let f=[];if(l(h)){const e=Math.min(600,p,u),t=Math.min(c.rK,p,u);for(let n=e;n<t;n+=300){const e=m(r,{resize:`${n},${n}`,strip:"info"});e&&f.push(`${e} ${n}w`)}}else{const e=Math.min(600,p),t=Math.min(c.rK,p);for(let n=e;n<t;n+=300){const e=m(r,{strip:"info",width:n});e&&f.push(`${e} ${n}w`)}}return f=f.join(","),Object.assign({src:g},f&&{srcSet:f})}function d(e,t={}){const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))n.searchParams.set(Object.hasOwn(r,e)?r[e]:e,o);return n.toString()}},60601(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:{type:"string",default:"center"},className:{type:"string",default:"is-style-rectangular"},columns:{type:"number"},columnWidths:{type:"array",default:[]},ids:{type:"array",default:[]},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",type:"number",selector:"img",source:"attribute"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}}},62554(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>n.A,save:()=>s.A,supports:()=>o.A});var n=r(60601),o=r(2500),s=r(55035)},55035(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(94715),o=r(90907),s=r(35463),i=r(22728),a=r(6775),c=r(10790);function l({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:l,className:u,columns:d=(0,i.EB)(e),linkTo:p,roundedCorners:h,columnWidths:m}=e,g=n.useBlockProps.save();return(0,c.jsx)("div",{...g,children:(0,c.jsx)(a.A,{align:l,className:u,columns:d,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,o.D)(s.kc,u),linkTo:p,roundedCorners:h,columnWidths:m,skipPhotonDomain:!1})})}},2500(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},92990(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:{type:"string",default:"center"},className:{type:"string",default:"is-style-rectangular"},columns:{type:"number"},columnWidths:{type:"array",default:[]},ids:{type:"array",default:[]},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",type:"number",selector:"img",source:"attribute"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}}},41314(e,t,r){"use strict";r.d(t,{WN:()=>o,ZS:()=>n,aQ:()=>i,rK:()=>s});const n=20,o=20,s=2e3,i="circle"},18151(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(63162),o=r(13022),s=r(10790);function i(e){const{alt:t,imageFilter:r,height:i,id:a,link:c,linkTo:l,origUrl:u,url:d,width:p}=e;if((0,n.isBlobURL)(u))return null;let h;switch(l){case"media":h=u;break;case"attachment":h=c}const m=(0,s.jsx)("img",{alt:t,"data-height":i,"data-id":a,"data-link":c,"data-url":u,"data-width":p,src:d,"data-amp-layout":"responsive"});return(0,s.jsx)("figure",{className:(0,o.A)("tiled-gallery__item",{[`filter__${r}`]:!!r}),children:h?(0,s.jsx)("a",{href:h,children:m}):m})}},59679(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>n.A,save:()=>s.A,supports:()=>o.A});var n=r(92990),o=r(93951),s=r(56137)},22026(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,width:t}){const r=Math.pow(10,12),o=Math.round(t*r)/r,s=t?{flexBasis:`${o}%`}:void 0;return(0,n.jsx)("div",{className:"tiled-gallery__col",style:s,children:e})}},90984(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,galleryRef:t}){return(0,n.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},66746(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(86087),o=r(27723),s=r(13022),i=r(41314),a=r(18151),c=r(52537),l=r(88833),u=r(48669),d=r(10790);const __=o.__;class p extends n.Component{renderImage(e,t){const{columns:r,imageFilter:n,images:s,isSave:i,linkTo:l,layoutStyle:u,onMoveBackward:p,onMoveForward:h,onRemoveImage:m,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 29 | +__("image %1$d of %2$d in gallery","jetpack"),t+1,s.length),{src:y,srcSet:k}=(0,c.A)(e,{layoutStyle:u});return(0,d.jsx)(a.A,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:f===t,link:e.link,linkTo:l,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:m(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:s.length>1,srcSet:k,url:y,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:o,layoutStyle:a,roundedCorners:p,onResize:h,isSave:m,columnWidths:g}=this.props,f=(0,c.s)(a)?u.A:l.A,b=this.props.images.map(this.renderImage,this),v=a!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{className:(0,s.A)(r,{[`has-rounded-corners-${v}`]:v>0}),children:[(0,d.jsx)(f,{align:e,columns:n,columnWidths:m?g:void 0,images:o,layoutStyle:a,renderedImages:b,onResize:m?void 0:h}),t]})}}},88833(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(86087),o=r(22026),s=r(90984),i=r(45610),a=r(79167),c=r(10790);class l extends n.Component{gallery=(0,n.createRef)();pendingRaf=null;render(){const{align:e,columns:t,images:r,layoutStyle:n,renderedImages:l,columnWidths:u}=this.props,d=(0,a.mJ)(r),p="columns"===n?(0,a.FL)(d,t):(0,a.VU)(d,{isWide:["full","wide"].includes(e)});let h=0;return(0,c.jsx)(s.A,{galleryRef:this.gallery,children:p.map((e,t)=>(0,c.jsx)(i.A,{children:e.map((e,r)=>{const n=l.slice(h,h+e);return h+=e,(0,c.jsx)(o.A,{width:u?.[t]?.[r],children:n},r)})},t))})}}},79167(e,t,r){"use strict";r.d(t,{FL:()=>i,VU:()=>C,mJ:()=>o});var n=r(66087);function o(e){return e.map(s)}function s({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,o=[];let s=e,i=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,t=>{const n=i<=(e+1)*r;return n&&(i+=t),n}).length;o.push(t),s=s.slice(t)}return o.push(s.length),[o]}const a=A([2,1,2],5),c=S([E,E,T,E,E]),l=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),w=A([1,1,1],3),_=S([(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2)),P(1.6)]),x=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const r=(e,o)=>{if(!o.length)return e;let s;s=o.length>15&&c(o)&&a(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&d(o)&&p(e)?[1,2,1]:h(o)&&m(e)?[1,3]:g(o)&&f(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&y(e)&&(0,n.sum)(o.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)(t.slice(0,4));return k(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,r){const o=(0,n.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||r)}(e,o,t)?[1,1,1]:_(o)&&x(e)?[2,1]:j(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([s]),C=(0,n.sum)(s),A=o.slice(C);return r(i,A)};return r([],e)}function A(e,t){return r=>!r.slice(-t).some(t=>(0,n.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},45610(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(13022),o=r(10790);function s({children:e,className:t}){return(0,o.jsx)("div",{className:(0,n.A)("tiled-gallery__row",t),children:e})}},48669(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(66087),o=r(41314),s=r(22026),i=r(90984),a=r(45610),c=r(10790);function l({columns:e,renderedImages:t}){const r=Math.min(o.ZS,e),l=t.length%r;return(0,c.jsx)(i.A,{children:[...l?[t.slice(0,l)]:[],...(0,n.chunk)(t.slice(l),r)].map((e,t)=>(0,c.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,c.jsx)(s.A,{children:e},t))},t))})}},56137(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(13022),s=r(90907),i=r(35463),a=r(22728),c=r(66746),l=r(10790);function u({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:u,className:d,columns:p=(0,a.EB)(e),linkTo:h,roundedCorners:m,columnWidths:g}=e,f=n.useBlockProps.save();return(0,l.jsxs)("div",{...f,className:(0,o.A)(f.className,d),children:[" ",(0,l.jsx)(c.A,{align:u,columns:p,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,s.D)(i.kc,d),linkTo:h,roundedCorners:m,columnWidths:g})]})}},93951(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},52537(e,t,r){"use strict";r.d(t,{A:()=>u,s:()=>l});var n=r(97999),o=r(85985),s=r(63162),i=r(14936),a=r(13087),c=r(41314);function l(e){return["circle","square"].includes(e)}function u(e,t={}){if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,a.A)())return{src:e.url};if((0,s.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,n.isWoASite)()&&(0,o.pP)())return{src:e.url};const r=e.url.split("?",1)[0],{height:u,width:p}=e,{layoutStyle:h}=t,m=function(e){const{host:t}=new URL(e,window.location.href);return/\.files\.wordpress\.com$/.test(t)}(r)?d:i.A;let g;if(l(h)&&p&&u){const e=Math.min(c.rK,p,u);g=m(r,{resize:`${e},${e}`})}else g=m(r);let f=[];if(l(h)){const e=Math.min(600,p,u),t=Math.min(c.rK,p,u);for(let n=e;n<t;n+=300){const e=m(r,{resize:`${n},${n}`,strip:"info"});e&&f.push(`${e} ${n}w`)}}else{const e=Math.min(600,p),t=Math.min(c.rK,p);for(let n=e;n<t;n+=300){const e=m(r,{strip:"info",width:n});e&&f.push(`${e} ${n}w`)}}return f=f.join(","),Object.assign({src:g},f&&{srcSet:f})}function d(e,t={}){const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))n.searchParams.set(Object.hasOwn(r,e)?r[e]:e,o);return n.toString()}},75e3(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>n.A,save:()=>s.A,supports:()=>o.A});var n=r(37336),o=r(69813),s=r(11045)},11045(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(13022),s=r(90907),i=r(35463),a=r(22728),c=r(72712),l=r(10790);function u({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:u,className:d,columns:p=(0,a.EB)(e),linkTo:h,roundedCorners:m,columnWidths:g}=e,f=n.useBlockProps.save();return(0,l.jsxs)("div",{...f,className:(0,o.A)(f.className,d),children:[" ",(0,l.jsx)(c.A,{align:u,columns:p,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,s.D)(i.kc,d),linkTo:h,roundedCorners:m,columnWidths:g})]})}},37336(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:{type:"string",default:"center"},className:{type:"string",default:"is-style-rectangular"},columns:{type:"number"},columnWidths:{type:"array",default:[]},ids:{type:"array",default:[]},imageFilter:{type:"string"},images:{type:"array",default:[],source:"query",selector:".tiled-gallery__item",query:{alt:{attribute:"alt",default:"",selector:"img",source:"attribute"},height:{attribute:"data-height",type:"number",selector:"img",source:"attribute"},id:{attribute:"data-id",selector:"img",source:"attribute"},link:{attribute:"data-link",selector:"img",source:"attribute"},customLink:{attribute:"data-custom-link",selector:"img",source:"attribute"},url:{attribute:"data-url",selector:"img",source:"attribute"},width:{attribute:"data-width",selector:"img",source:"attribute",type:"number"}}},imageCrop:{type:"boolean",default:!0},linkTo:{default:"none",type:"string"},roundedCorners:{type:"integer",default:0}}},32377(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(97999),o=r(63162),s=r(13022),i=r(10790);function a(e){const{alt:t,imageFilter:r,height:a,id:c,link:l,linkTo:u,customLink:d,origUrl:p,url:h,width:m,"aria-label":g}=e;if((0,o.isBlobURL)(p))return null;let f;switch(u){case"media":f=p;break;case"attachment":f=l;break;case"custom":f=d||"";break;default:f=""}const b=(0,i.jsx)("img",{alt:t,"data-height":a,"data-id":c,"data-link":l,"data-url":p,"data-custom-link":d,"data-width":m,src:h,...!(0,n.isSimpleSite)()&&{"data-amp-layout":"responsive"},tabIndex:0,role:"button","aria-label":g});return(0,i.jsx)("figure",{className:(0,s.A)("tiled-gallery__item",{[`filter__${r}`]:!!r}),children:f?(0,i.jsx)("a",{href:f,children:b}):b})}},20837(e,t,r){"use strict";r.r(t),r.d(t,{attributes:()=>n.A,save:()=>s.A,supports:()=>o.A});var n=r(37336),o=r(69813),s=r(49928)},72712(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(86087),o=r(27723),s=r(13022),i=r(35463),a=r(69322),c=r(92978),l=r(90256),u=r(32377),d=r(10790);const __=o.__;class p extends n.Component{renderImage(e,t){const{columns:r,imageFilter:n,images:s,isSave:i,linkTo:a,layoutStyle:c,onMoveBackward:p,onMoveForward:h,onRemoveImage:m,onSelectImage:g,selectedImage:f,setImageAttributes:b}=this.props,v=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 30 | +__("Open image %1$d of %2$d in full-screen","jetpack"),t+1,s.length),y=u.A,{src:k,srcSet:w}=(0,l.AW)(e,{layoutStyle:c},{skipPhotonDomain:!1});return(0,d.jsx)(y,{alt:e.alt,"aria-label":v,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:f===t,link:e.link,linkTo:a,customLink:e.customLink,onMoveBackward:i?void 0:p(t),onMoveForward:i?void 0:h(t),onRemove:i?void 0:m(t),onSelect:i?void 0:g(t),origUrl:e.url,setAttributes:i?void 0:b(t),showMovers:s.length>1,srcSet:w,url:k,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:o,layoutStyle:u,roundedCorners:p,onResize:h,style:m,isSave:g,columnWidths:f}=this.props,b=(0,l.sL)(u)?c.A:a.A,v=this.props.images.map(this.renderImage,this),y=u!==i.aQ?Math.min(p,i.WN):0;return(0,d.jsxs)("div",{style:m,className:(0,s.A)(r,{[`has-rounded-corners-${y}`]:y>0}),children:[(0,d.jsx)(b,{align:e,columns:n,columnWidths:g?f:void 0,images:o,layoutStyle:u,renderedImages:v,onResize:g?void 0:h}),t]})}}},49928(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(13022),s=r(90907),i=r(35463),a=r(22728),c=r(72712),l=r(10790);function u({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:u,className:d,columns:p=(0,a.EB)(e),linkTo:h,roundedCorners:m,columnWidths:g}=e,f=n.useBlockProps.save();return(0,l.jsxs)("div",{...f,className:(0,o.A)(f.className,d),children:[" ",(0,l.jsx)(c.A,{align:u,columns:p,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,s.D)(i.kc,d),linkTo:h,roundedCorners:m,columnWidths:g})]})}},69813(e,t,r){"use strict";r.d(t,{A:()=>n});const n={align:["center","wide","full"],color:{gradients:!0,text:!1},customClassName:!1,html:!1,spacing:{margin:!0,padding:!0},__experimentalHideChildBlockControls:!0}},22728(e,t,r){"use strict";r.d(t,{Ay:()=>y,EB:()=>b});var n=r(85985),o=r(94715),s=r(56427),i=r(43656),a=r(86087),c=r(27723),l=r(66087),u=r(90907),d=r(76585),p=r(35463),h=r(55702),m=r(6775),g=r(9888),f=r(10790);const __=c.__;function b(e){return e.images.length>0?Math.min(3,e.images.length):3}const v=e=>{const t=(0,l.pick)(e,[["alt"],["id"],["link"]]);return t.url=e?.sizes?.large?.url||e?.media_details?.sizes?.large?.source_url||e.url,t},y=(0,s.withNotices)(({attributes:e,isSelected:t,noticeOperations:r,noticeUI:c,setAttributes:l})=>{const{align:y,columns:k=b(e),imageFilter:w,images:_,linkTo:x,roundedCorners:j,columnWidths:C}=e,A=(0,u.D)(p.kc,e.className),S=(0,o.useBlockProps)(),[E,T]=(0,a.useState)(null),[N,P]=(0,a.useState)(void 0===C||0===C?.length),B=e=>{l({images:e,ids:e.map(({id:e})=>parseInt(e,10))})},R=e=>{(0,i.mediaUpload)({allowedTypes:p.eN,filesList:e,onFileChange:e=>B((_||[]).concat(e.map(v))),onError:r.createErrorNotice}),P(!0)},I=e=>()=>{const t=_.filter((t,r)=>e!==r);T(null),P(!0),B(t),l({columns:k?Math.min(t.length,k):k})},D=e=>()=>{E!==e&&T(e)},L=e=>{const t=e.map(e=>{const t=_.find(t=>parseInt(t.id,10)===parseInt(e.id,10));return t?.customLink?{...v(e),customLink:t.customLink}:v(e)});B(t),l({columns:k?Math.min(e.length,k):k}),P(!0)},F=(e,t)=>{const r=[..._];r.splice(t,1,_[e]),r.splice(e,1,_[t]),T(t),P(!0),B(r)},M=e=>()=>{e!==_.length-1&&F(e,e+1)},O=e=>()=>{0!==e&&F(e,e-1)},U=e=>{!N&&(0,g.O)(e,C)||l({columnWidths:e})},z=e=>R(e.target.files),$=e=>t=>{_[e]&&B([..._.slice(0,e),{..._[e],...t},..._.slice(e+1)])};let q;return(0,a.useEffect)(()=>{t||null===E||T(null)},[t,E,T]),q=0===_.length?(0,f.jsx)(o.MediaPlaceholder,{icon:(0,n.sh)(d),labels:{title:__("Tiled Gallery","jetpack"),name:__("images","jetpack")},onSelect:L,accept:"image/*",allowedTypes:p.eN,multiple:!0,notices:c,onError:r.createErrorNotice}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(h.M,{layoutStyle:A,images:_,columns:k,selectedImage:E,setImageAttributes:$,onColumnsChange:e=>l({columns:e}),roundedCorners:j,onRoundedCornersChange:e=>l({roundedCorners:e}),linkTo:x,onLinkToChange:e=>l({linkTo:e})}),c,(0,f.jsxs)(m.A,{className:"tiled-gallery__wrapper",align:y,columns:k,imageFilter:w,images:_,layoutStyle:A,linkTo:x,onMoveBackward:O,onMoveForward:M,onRemoveImage:I,onSelectImage:D,onResize:U,roundedCorners:j,selectedImage:t?E:null,setImageAttributes:$,children:[(0,f.jsx)(s.DropZone,{onFilesDrop:R}),t&&(0,f.jsx)("div",{className:"tiled-gallery__add-item",children:(0,f.jsx)(s.FormFileUpload,{multiple:!0,className:"tiled-gallery__add-item-button",onChange:z,accept:"image/*",icon:"insert",__next40pxDefaultSize:!0,children:__("Upload an image","jetpack")})})]})]}),(0,f.jsxs)("div",{...S,children:[(0,f.jsx)(h.c,{images:_,onSelectImages:L,imageFilter:w,onFilterChange:e=>{l({imageFilter:e}),T(null)}}),q]})})},25589(e,t,r){"use strict";var n=r(74997),o=r(94375),s=r(76585),i=r(10602),a=r(22728),c=r(96575),l=r(32022),u=r(2369),d=r(24324),p=r(49263),h=r(76882),m=r(86781);r(80490);const g={align:"center",className:"is-style-rectangular",images:[{alt:"",link:"",url:l,width:160,height:95},{alt:"",link:"",url:u,width:160,height:107},{alt:"",link:"",url:d,width:304,height:203},{alt:"",link:"",url:p,width:312,height:207},{alt:"",link:"",url:h,width:152,height:101},{alt:"",link:"",url:m,width:152,height:105}],linkTo:"none"};function f(e=[]){return e.filter(({id:e,url:t})=>e&&t)}(0,o.M)(s,{edit:a.Ay,save:c.A,transforms:{from:[{type:"block",isMultiBlock:!0,blocks:["core/image"],isMatch:e=>f(e).length>0,transform:e=>{const t=f(e);return(0,n.createBlock)(s.name,{images:t.map(({id:e,url:t,link:r,alt:n})=>({id:e,url:t,link:r,alt:n})),ids:t.map(({id:e})=>e)})}},{type:"block",blocks:["core/gallery","jetpack/slideshow"],transform:({images:e=[]},t)=>{!e.length&&t?.length&&(e=t.filter(e=>"core/image"===e.name&&e.attributes?.url).map(({attributes:e})=>({id:e.id,url:e.url,link:e.href,alt:e.alt})));const r=f(e);return r.length>0?(0,n.createBlock)(s.name,{images:r.map(({id:e,url:t,link:r,alt:n})=>({id:e,url:t,link:r,alt:n})),ids:r.map(({id:e})=>e)}):(0,n.createBlock)(s.name)}}],to:[{type:"block",blocks:["core/gallery"],transform:({images:e,ids:t,columns:r,linkTo:o})=>(0,n.createBlock)("core/gallery",{images:e,ids:t,columns:r,imageCrop:!0,linkTo:o})},{type:"block",blocks:["core/image"],transform:({align:e,images:t})=>t.length>0?t.map(({id:t,url:r,alt:o})=>(0,n.createBlock)("core/image",{align:e,id:t,url:r,alt:o})):(0,n.createBlock)("core/image")}]},providesContext:{imageCrop:"imageCrop"},deprecated:i.A,example:{attributes:g}})},62820(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(56427),s=r(27723),i=r(10790);const __=s.__,_x=s._x,a=[{icon:(0,i.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})]}),title:_x("Original","image style","jetpack"),value:void 0},{icon:(0,i.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})]}),title:_x("Black and White","image style","jetpack"),value:"black-and-white"},{icon:(0,i.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})]}),title:_x("Sepia","image style","jetpack"),value:"sepia"},{icon:(0,i.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(o.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"})]}),title:"1977",value:"1977"},{icon:(0,i.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(o.Path,{d:"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"})]}),title:_x("Clarendon","image style","jetpack"),value:"clarendon"},{icon:(0,i.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(o.Path,{fill:"none",d:"M0 0h24v24H0z"}),(0,i.jsx)(o.Path,{d:"M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"})]}),title:_x("Gingham","image style","jetpack"),value:"gingham"}],c=__("Pick an image filter","jetpack"),l=(0,i.jsxs)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,i.jsx)(o.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(o.Path,{d:"M19 10v9H4.98V5h9V3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zm-2.94-2.06L17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7zM12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12l-2.75-1.25z"})]});function u({value:e,onChange:t}){return(0,i.jsx)(o.Dropdown,{placement:"bottom-start",className:"editor-block-switcher",contentClassName:"editor-block-switcher__popover",renderToggle:({onToggle:e,isOpen:t})=>(0,i.jsx)(n.BlockControls,{children:(0,i.jsx)(o.Toolbar,{label:c,children:(0,i.jsx)(o.ToolbarButton,{onClick:e,"aria-expanded":t,"aria-haspopup":"true",label:c,showTooltip:!0,icon:l})})}),renderContent:({onClose:r})=>(0,i.jsx)(o.NavigableMenu,{className:"tiled-gallery__filter-picker-menu",children:a.map(({icon:n,title:s,value:a})=>{return(0,i.jsx)(o.MenuItem,{className:e===a?"is-active":void 0,icon:n,isSelected:e===a,onClick:(c=a,()=>{t(e===c?void 0:c),r()}),role:"menuitemcheckbox",children:s},a||"original");var c})})})}},42777(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r(63162),o=r(56427),s=r(47143),i=r(86087),a=r(27723),c=r(48558),l=r(13022),u=r(74540),d=r(10790);const __=a.__;class p extends i.Component{img=(0,i.createRef)();state={isLoading:!1};onImageClick=()=>{this.props.isSelected||this.props.onSelect()};onImageKeyDown=e=>{const{isSelected:t,onRemove:r}=this.props;t&&[c.BACKSPACE,c.DELETE].includes(e.keyCode)&&(e.preventDefault(),r())};onImageLoadComplete=()=>{this.setState({isLoading:!1}),this.removeImageEventListeners()};addImageEventListeners=()=>{if(this.removeImageEventListeners(),this.img.current&&!(0,n.isBlobURL)(this.props.origUrl)){const e=this.img.current.complete;this.setState({isLoading:!e}),e||(this.img.current.addEventListener("load",this.onImageLoadComplete,{once:!0}),this.img.current.addEventListener("error",this.onImageLoadComplete,{once:!0}))}};removeImageEventListeners=()=>{this.img.current&&(this.img.current.removeEventListener("load",this.onImageLoadComplete),this.img.current.removeEventListener("error",this.onImageLoadComplete))};componentDidMount(){(0,n.isBlobURL)(this.props.origUrl)||this.img.current?.complete||(this.setState({isLoading:!0}),this.addImageEventListeners())}componentWillUnmount(){this.removeImageEventListeners()}componentDidUpdate(e){const{alt:t,height:r,image:o,link:s,url:i,width:a,origUrl:c}=this.props,l=(0,n.isBlobURL)(e.origUrl);if((0,n.isBlobURL)(c)||this.img.current?.complete||!l&&e.url===i||(this.setState({isLoading:!0}),this.addImageEventListeners()),o){const e={};!t&&o.alt_text&&(e.alt=o.alt_text),!r&&o.media_details&&o.media_details.height&&(e.height=+o.media_details.height),!s&&o.link&&(e.link=o.link),!i&&o.source_url&&(e.url=o.source_url),!a&&o.media_details&&o.media_details.width&&(e.width=+o.media_details.width),Object.keys(e).length&&this.props.setAttributes(e)}}render(){const{"aria-label":e,alt:t,columns:r,height:s,id:a,imageFilter:c,isFirstItem:p,isLastItem:h,isSelected:m,link:g,linkTo:f,customLink:b,onMoveBackward:v,onMoveForward:y,onRemove:k,origUrl:w,showMovers:_,srcSet:x,url:j,width:C}=this.props,{isLoading:A}=this.state;let S;switch(f){case"media":S=w;break;case"attachment":S=g;break;case"custom":S=b||"";break;default:S=""}const E=(0,n.isBlobURL)(w),T=(0,d.jsxs)(i.Fragment,{children:[(0,d.jsx)("img",{alt:t,"data-height":s,"data-id":a,"data-link":g,"data-url":w,"data-width":C,ref:this.img,src:E?void 0:j,srcSet:E?void 0:x,style:E?{backgroundImage:`url(${w})`}:void 0}),E&&(0,d.jsx)(o.Spinner,{})]});return(0,d.jsxs)("div",{className:(0,l.A)("tiled-gallery__item",{"is-selected":m,"is-transient":E,"is-loading":!E&&A,[`filter__${c}`]:!!c}),tabIndex:"0",role:"button",onClick:this.onImageClick,onKeyDown:this.onImageKeyDown,"aria-label":e,children:[_&&(0,d.jsxs)("div",{className:"tiled-gallery__item__move-menu",children:[(0,d.jsx)(o.Button,{icon:1===r?u.Lo:u.Nd,onClick:p?void 0:v,className:"tiled-gallery__item__move-backward",label:__("Move image backward","jetpack"),"aria-disabled":p,disabled:!m}),(0,d.jsx)(o.Button,{icon:1===r?u.W4:u.Gy,onClick:h?void 0:y,className:"tiled-gallery__item__move-forward",label:__("Move image forward","jetpack"),"aria-disabled":h,disabled:!m})]}),(0,d.jsx)("div",{className:"tiled-gallery__item__inline-menu",children:(0,d.jsx)(o.Button,{icon:u.VN,onClick:k,className:"tiled-gallery__item__remove",label:__("Remove image","jetpack"),disabled:!m})}),S?(0,d.jsx)("a",{"aria-hidden":"true",children:T}):T]})}}const h=(0,s.withSelect)((e,t)=>{const{getEntityRecord:r}=e("core"),{id:n}=t;return{image:n?r("postType","attachment",n):null}})(p)},52026(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(97999),o=r(63162),s=r(13022),i=r(10790);function a(e){const{alt:t,imageFilter:r,height:a,id:c,link:l,linkTo:u,customLink:d,origUrl:p,url:h,width:m}=e;if((0,o.isBlobURL)(p))return null;let g;switch(u){case"media":g=p;break;case"attachment":g=l;break;case"custom":g=d||"";break;default:g=""}const f=(0,n.isSimpleSite)()?{}:{"data-amp-layout":"responsive"},b=(0,i.jsx)("img",{alt:t,"data-height":a,"data-id":c,"data-link":l,"data-url":p,"data-width":m,src:h,...f});return(0,i.jsx)("figure",{className:(0,s.A)("tiled-gallery__item",{[`filter__${r}`]:!!r}),children:g?(0,i.jsx)("a",{href:g,children:b}):b})}},74540(e,t,r){"use strict";r.d(t,{Gy:()=>i,Lo:()=>c,Nd:()=>s,VN:()=>l,W4:()=>a});var n=r(56427),o=r(10790);const s=(0,o.jsx)(n.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(n.Path,{d:"M5 8.70002L10.6 14.4L12 12.9L7.8 8.70002L12 4.50002L10.6 3.00002L5 8.70002Z"})}),i=(0,o.jsx)(n.SVG,{width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(n.Path,{d:"M13 8.7L7.4 3L6 4.5L10.2 8.7L6 12.9L7.4 14.4L13 8.7Z"})}),a=(0,o.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(n.Path,{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z"})}),c=(0,o.jsx)(n.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(n.Path,{d:"M12,8l-6,6l1.41,1.41L12,10.83l4.59,4.58L18,14L12,8z"})}),l=(0,o.jsx)(n.SVG,{width:"18",height:"18",viewBox:"-2 -2 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(n.Path,{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"})})},98737(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,width:t}){const r=t?{flexBasis:`${t}%`}:void 0;return(0,n.jsx)("div",{className:"tiled-gallery__col",style:r,children:e})}},3645(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(10790);function o({children:e,galleryRef:t}){return(0,n.jsx)("div",{className:"tiled-gallery__gallery",ref:t,children:e})}},6775(e,t,r){"use strict";r.d(t,{A:()=>h});var n=r(86087),o=r(27723),s=r(13022),i=r(35463),a=r(42777),c=r(52026),l=r(90256),u=r(69322),d=r(92978),p=r(10790);const __=o.__;class h extends n.Component{renderImage(e,t){const{columns:r,imageFilter:n,images:s,isSave:i,linkTo:u,layoutStyle:d,onMoveBackward:h,onMoveForward:m,onRemoveImage:g,onSelectImage:f,selectedImage:b,setImageAttributes:v,skipPhotonDomain:y}=this.props,k=(0,o.sprintf)(/* translators: %1$d is the order number of the image, %2$d is the total number of images. */ | |
| 31 | +__("image %1$d of %2$d in gallery","jetpack"),t+1,s.length),w=i?c.A:a.A,{src:_,srcSet:x}=(0,l.AW)(e,{layoutStyle:d},{skipPhotonDomain:y});return(0,p.jsx)(w,{alt:e.alt,"aria-label":k,columns:r,height:e.height,id:e.id,imageFilter:n,isFirstItem:0===t,isLastItem:t+1===s.length,isSelected:b===t,link:e.link,linkTo:u,customLink:e.customLink,onMoveBackward:i?void 0:h(t),onMoveForward:i?void 0:m(t),onRemove:i?void 0:g(t),onSelect:i?void 0:f(t),origUrl:e.url,setAttributes:i?void 0:v(t),showMovers:s.length>1,srcSet:x,url:_,width:e.width},t)}render(){const{align:e,children:t,className:r,columns:n,images:o,layoutStyle:a,roundedCorners:c,onResize:h,style:m,isSave:g,columnWidths:f}=this.props,b=(0,l.sL)(a)?d.A:u.A,v=this.props.images.map(this.renderImage,this),y=a!==i.aQ?Math.min(c,i.WN):0;return(0,p.jsxs)("div",{style:m,className:(0,s.A)(r,{[`has-rounded-corners-${y}`]:y>0}),children:[(0,p.jsx)(b,{align:e,columns:n,columnWidths:g?f:void 0,images:o,layoutStyle:a,renderedImages:v,onResize:g?void 0:h}),t]})}}},69322(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(86087),o=r(94107),s=r(98737),i=r(3645),a=r(51663),c=r(74176),l=r(18980),u=r(10790);class d extends n.Component{gallery=(0,n.createRef)();pendingRaf=null;lastWidth=null;ro=null;observedContainer=null;componentDidMount(){this.observeResize()}componentWillUnmount(){this.unobserveResize()}componentDidUpdate(e){(e.images!==this.props.images||e.align!==this.props.align||"columns"===this.props.layoutStyle&&e.columns!==this.props.columns)&&this.triggerResize()}isContentSized(e,t){const r=t.getComputedStyle(e);if("inline-flex"===r.display||"inline-block"===r.display)return!0;if("absolute"===r.position||"fixed"===r.position)return!0;if(r.float&&"none"!==r.float)return!0;if(r.width&&/^(max|min|fit)-content/.test(r.width))return!0;const n=e.parentElement;if(!n)return!1;const o=t.getComputedStyle(n);if("flex"!==o.display&&"inline-flex"!==o.display)return!1;if(/^column/.test(o.flexDirection)){const e=r.alignSelf&&"auto"!==r.alignSelf?r.alignSelf:o.alignItems;return!!e&&"stretch"!==e&&"normal"!==e}const s=r.flexBasis;return"0"===r.flexGrow&&(!s||"auto"===s||"content"===s)}getFlexContainer(){const e=this.gallery.current;if(!e)return null;const t=e.ownerDocument?.defaultView||window;let r=e.parentElement;for(;r&&r.parentElement;){if(r.matches(".is-root-container, .editor-styles-wrapper"))return null;const e=r.parentElement,n=t.getComputedStyle(e).display;if(("flex"===n||"inline-flex"===n)&&!this.isContentSized(e,t))return e;r=e}return null}countFlexItems(e,t){const r=["STYLE","SCRIPT","TEMPLATE","LINK"];return Array.from(e.children).filter(e=>{if(r.includes(e.tagName))return!1;const n=t.getComputedStyle(e);return"none"!==n.display&&("absolute"!==n.position&&"fixed"!==n.position)}).length}getLayoutWidth(){const e=this.getFlexContainer();if(!e)return this.gallery.current?this.gallery.current.clientWidth:0;const t=e.ownerDocument?.defaultView||window,r=t.getComputedStyle(e);if(/^column/.test(r.flexDirection))return e.clientWidth;const n=this.countFlexItems(e,t);if(n<=1)return e.clientWidth;const o=parseFloat(r.columnGap)||0;return(e.clientWidth-o*(n-1))/n}syncContainerObservation(){if(!this.ro)return;const e=this.getFlexContainer();e!==this.observedContainer&&(this.observedContainer&&this.ro.unobserve(this.observedContainer),this.observedContainer=e,e&&this.ro.observe(e))}handleGalleryResize=()=>{this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null),this.pendingRaf=requestAnimationFrame(()=>{const e=this.gallery.current;if(!e)return;this.syncContainerObservation();const t=this.getLayoutWidth();if(t<=0)return;if(null!==this.lastWidth&&Math.abs(t-this.lastWidth)<1)return;this.lastWidth=t;const r=[];(0,l.S)(e).forEach(e=>{r.push((0,l.r)(e,t))}),void 0!==this.props.onResize&&this.props.onResize(r)})};triggerResize(){this.gallery.current&&(this.lastWidth=null,this.handleGalleryResize())}observeResize(){this.triggerResize(),this.ro=new o.A(this.handleGalleryResize),this.gallery.current&&(this.ro.observe(this.gallery.current),this.syncContainerObservation())}unobserveResize(){this.ro&&(this.ro.disconnect(),this.ro=null),this.observedContainer=null,this.pendingRaf&&(cancelAnimationFrame(this.pendingRaf),this.pendingRaf=null)}getColumnWidths(e,t,r){let n=0;return e.map(e=>e.map(e=>{const r=t.slice(n,n+e);return n+=e,r})).map(e=>(0,l.r)(e,r))}render(){const{align:e,columns:t,images:r,layoutStyle:o,renderedImages:l}=this.props,d=(0,c.mJ)(r),p="columns"===o?(0,c.FL)(d,t):(0,c.VU)(d,{isWide:["full","wide"].includes(e)}),h=n.Platform.select({web:()=>this.props.columnWidths,native:()=>this.getColumnWidths(p,l,1e3)})();let m=0;return(0,u.jsx)(i.A,{galleryRef:this.gallery,children:p.map((e,t)=>(0,u.jsx)(a.A,{children:e.map((e,r)=>{const n=l.slice(m,m+e);return m+=e,(0,u.jsx)(s.A,{width:h?.[t]?.[r],children:n},r)})},t))})}}},74176(e,t,r){"use strict";r.d(t,{FL:()=>i,VU:()=>C,mJ:()=>o});var n=r(66087);function o(e){return e.map(s)}function s({height:e,width:t}){return e&&t?t/e:1}function i(e,t){if(e.length<=t)return[Array(e.length).fill(1)];const r=(0,n.sum)(e)/t,o=[];let s=e,i=0;for(let e=0;e<t-1;e++){const t=(0,n.takeWhile)(s,t=>{const n=i<=(e+1)*r;return n&&(i+=t),n}).length;o.push(t),s=s.slice(t)}return o.push(s.length),[o]}const a=A([2,1,2],5),c=S([E,E,T,E,E]),l=S([E,E,E,T,E,E,E]),u=A([3,1,3],5),d=S([T,E,E,T]),p=A([1,2,1],5),h=S([T,E,E,E]),m=A([1,3],3),g=S([E,E,E,T]),f=A([3,1],3),b=S([P(1.6),(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2))]),v=A([1,2],3),y=A([1,1,1,1,1],1),k=A([1,1,1,1],1),w=A([1,1,1],3),_=S([(0,n.overEvery)(N(.9),P(2)),(0,n.overEvery)(N(.9),P(2)),P(1.6)]),x=A([2,1],3),j=S([function(e){return e>=2}]);function C(e,{isWide:t}={}){const r=(e,o)=>{if(!o.length)return e;let s;s=o.length>15&&c(o)&&a(e)?[2,1,2]:o.length>15&&l(o)&&u(e)?[3,1,3]:5!==o.length&&d(o)&&p(e)?[1,2,1]:h(o)&&m(e)?[1,3]:g(o)&&f(e)?[3,1]:b(o)&&v(e)?[1,2]:t&&(5===o.length||10!==o.length&&o.length>6)&&y(e)&&(0,n.sum)(o.slice(0,5))<5?[1,1,1,1,1]:function(e,t){const r=(0,n.sum)(t.slice(0,4));return k(e)&&r<3.5&&t.length>5||r<7&&4===t.length}(e,o)?[1,1,1,1]:function(e,t,r){const o=(0,n.sum)(t.slice(0,3));return t.length>=3&&4!==t.length&&6!==t.length&&w(e)&&(o<2.5||o<5&&t.length>=3&&t[0]===t[2]||r)}(e,o,t)?[1,1,1]:_(o)&&x(e)?[2,1]:j(o)?[1]:o.length>3?[1,1]:Array(o.length).fill(1);const i=e.concat([s]),C=(0,n.sum)(s),A=o.slice(C);return r(i,A)};return r([],e)}function A(e,t){return r=>!r.slice(-t).some(t=>(0,n.isEqual)(t,e))}function S(e){return t=>t.length>=e.length&&(0,n.zipWith)(e,t.slice(0,e.length),(e,t)=>e(t)).every(Boolean)}function E(e){return e>=1&&e<2}function T(e){return e<1}function N(e){return t=>t>=e}function P(e){return t=>t<e}},18980(e,t,r){"use strict";r.d(t,{S:()=>i,r:()=>s});var n=r(35463);function o(e,t){const r=(t-e.reduce((e,t)=>e+t,0))/e.length;return e.map(e=>e+r)}function s(e,t){return function(e,[t,r],s){const i=n.hE*(e.childElementCount-1),d=s-i;return function(e,{rawHeight:t,rowWidth:r}){const s=a(e),i=s.map(e=>(t-n.hE*(e.childElementCount-1))*l(e)[0]),d=o(i,r);s.forEach((e,r)=>{const s=i[r],a=d[r];!function(e,{colHeight:t,width:r,rawWidth:n}){const s=c(e).map(e=>n/u(e)),i=o(s,t);Array.from(e.children).forEach((e,t)=>{const n=i[t];e.setAttribute("style",`height:${n}px;width:${r}px;`)})}(e,{colHeight:t-n.hE*(e.childElementCount-1),width:a,rawWidth:s})});return d.map(e=>parseFloat(e/r*100).toFixed(5))}(e,{rawHeight:1/t*(d-r),rowWidth:d})}(e,function(e){const t=a(e).map(l).reduce(([e,t],[r,n])=>[e+r,t+n],[0,0]);return t}(e),t)}function i(e){return Array.from(e.querySelectorAll(".tiled-gallery__row"))}function a(e){return Array.from(e.querySelectorAll(".tiled-gallery__col"))}function c(e){return Array.from(e.querySelectorAll(".tiled-gallery__item > img, .tiled-gallery__item > a > img"))}function l(e){const t=c(e),r=t.length,n=1/t.map(u).reduce((e,t)=>e+1/t,0);return[n,n*r||1]}function u(e){const t=parseInt(e.dataset.width,10),r=parseInt(e.dataset.height,10);return t&&!Number.isNaN(t)&&r&&!Number.isNaN(r)?t/r:1}},51663(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(13022),o=r(10790);function s({children:e,className:t}){return(0,o.jsx)("div",{className:(0,n.A)("tiled-gallery__row",t),children:e})}},92978(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(66087),o=r(35463),s=r(98737),i=r(3645),a=r(51663),c=r(10790);function l({columns:e,renderedImages:t}){const r=Math.min(o.ZS,e),l=t.length%r;return(0,c.jsx)(i.A,{children:[...l?[t.slice(0,l)]:[],...(0,n.chunk)(t.slice(l),r)].map((e,t)=>(0,c.jsx)(a.A,{className:`columns-${e.length}`,children:e.map((e,t)=>(0,c.jsx)(s.A,{children:e},t))},t))})}},9888(e,t,r){"use strict";function n(e){return["columns","circle","square"].includes(e)}function o(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,r)=>e?.length===t[r]?.length)}r.d(t,{O:()=>o,o:()=>n})},96575(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(94715),o=r(13022),s=r(90907),i=r(35463),a=r(22728),c=r(6775),l=r(10790);function u({attributes:e}){const{imageFilter:t,images:r}=e;if(!r.length)return null;const{align:u,className:d,columns:p=(0,a.EB)(e),linkTo:h,roundedCorners:m,columnWidths:g}=e,f=n.useBlockProps.save();return(0,l.jsx)("div",{...f,className:(0,o.A)(f.className,d),children:(0,l.jsx)(c.A,{align:u,columns:p,imageFilter:t,images:r,isSave:!0,layoutStyle:(0,s.D)(i.kc,d),linkTo:h,roundedCorners:m,columnWidths:g})})}},90256(e,t,r){"use strict";r.d(t,{AW:()=>u,sL:()=>l});var n=r(97999),o=r(85985),s=r(63162),i=r(14936),a=r(13087),c=r(35463);function l(e){return["circle","square"].includes(e)}function u(e,t={},{skipPhotonDomain:r=d()}={}){if(!e.height||!e.width)return e.url?{src:e.url}:{};if((0,a.A)())return{src:e.url};if((0,s.isBlobURL)(e.url)||/^https?:\/\/localhost/.test(e.url)||/^https?:\/\/.*\.local\//.test(e.url)||(0,n.isWoASite)()&&(0,o.pP)())return{src:e.url};const u=e.url.split("?",1)[0],{height:h,width:m}=e,{layoutStyle:g}=t,f=r||(0,n.isSimpleSite)()?p:i.A;let b;if(l(g)&&m&&h){const e=Math.min(c.rK,m,h);b=f(u,{resize:`${e},${e}`})}else b=f(u);let v=[];if(l(g)){const e=Math.min(600,m,h),t=Math.min(c.rK,m,h);for(let r=e;r<t;r+=300){const e=f(u,{resize:`${r},${r}`,strip:"info"});e&&v.push(`${e} ${r}w`)}}else{const e=Math.min(600,m),t=Math.min(c.rK,m);for(let r=e;r<t;r+=300){const e=f(u,{strip:"info",width:r});e&&v.push(`${e} ${r}w`)}}return v=v.join(","),Object.assign({src:b},v&&{srcSet:v})}function d(){return!0===(0,n.getScriptData)()?.jetpack?.flags?.skipPhotonDomain}function p(e,t={}){const r={width:"w",height:"h",letterboxing:"lb",removeLetterboxing:"ulb"},n=Object.assign(new URL(e,window.location.href),{username:"",password:"",port:"",search:"",hash:""});for(const[e,o]of Object.entries(t))n.searchParams.set(Object.hasOwn(r,e)?r[e]:e,o);return n.toString()}},98746(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(94715),o=r(56427),s=r(86087),i=r(27723),a=r(375),c=r(48558),l=(r(20744),r(10790));const __=i.__,u=({tockUrl:e,setEditedUrl:t,setUrl:r,cancel:n})=>{const i=(0,s.useRef)(!0),u=(0,s.useRef)(!1),d=e=>{r(),u.current=!0,e()};return(0,l.jsx)(o.ToolbarGroup,{children:(0,l.jsx)(o.Dropdown,{popoverProps:{variant:"toolbar"},onClose:()=>u.current?u.current=!1:n(),placement:"bottom-start",renderToggle:({isOpen:t,onToggle:r})=>(!i.current||t||e||(i.current=!1,r()),(0,l.jsx)(o.ToolbarButton,{className:"components-toolbar__control",label:__("Edit Tock business name","jetpack"),onClick:()=>{r(),t&&n()},children:__("Edit","jetpack")})),renderContent:({onClose:r})=>(0,l.jsx)(o.BaseControl,{className:"jetpack-tock-url-settings",help:(0,s.createInterpolateElement)(__("The Tock business can be found in the URL of your public Tock page. For example: www.exploretock.com/<b>myname</b>","jetpack"),{b:(0,l.jsx)("strong",{})}),__nextHasNoMarginBottom:!0,children:(0,l.jsxs)("div",{className:"jetpack-tock-url-input-wrapper",children:[(0,l.jsx)(o.TextControl,{placeholder:__("Add Tock business name","jetpack"),onChange:t,value:e,onKeyDownCapture:t=>((t,r)=>{const{keyCode:o}=t;o===c.ENTER&&""!==e&&(t.preventDefault(),d(r)),o===c.ESCAPE&&(t.preventDefault(),n(),r())})(t,r),className:"jetpack-tock-url-input",__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,l.jsx)("div",{className:"jetpack-tock-url-input-action",children:(0,l.jsx)(o.Button,{type:"submit",label:__("Submit","jetpack"),icon:a.A,className:"jetpack-tock-url-input-submit",onClick:()=>d(r)})})]})})})})},d=({url:e,popoverAnchor:t})=>{const r=`\n\t\t<div id="Tock_widget_container" data-tock-display-mode="Button" data-tock-color-mode="Blue" data-tock-locale="en-us" data-tock-timezone="America/New_York" style="display:inline-block;"></div>\n\t\t<script src="https://www.exploretock.com/tock.js" async><\/script>\n\t\t<script>\n\t\t\t!function(t,o){if(!t.tock){var e=t.tock=function(){e.callMethod?\n\t\t\t e.callMethod.apply(e,arguments):e.queue.push(arguments)};t._tock||(t._tock=e),\n\t\t\t e.push=e,e.loaded=!0,e.version='1.0',e.queue=[];}}(window,document);\n\t\t\ttock('init', '${e}');\n\t\t<\/script>\n\t`;return(0,l.jsxs)("div",{ref:t,children:[(0,l.jsx)(o.SandBox,{html:r},`tock-${e}`),(0,l.jsx)("div",{className:"block-library-embed__interactive-overlay"})]})};function p({attributes:e,setAttributes:t,isSelected:r}){const o=e.url??"",[i,a]=(0,s.useState)(o),c=(0,s.useCallback)(()=>{a(o)},[o]);return(0,s.useEffect)(()=>{r||c()},[r,c]),(0,l.jsxs)("div",{...(0,n.useBlockProps)(),children:[(0,l.jsx)(n.BlockControls,{children:(0,l.jsx)(u,{tockUrl:i,setEditedUrl:a,setUrl:()=>{const e=i.replace(/.*exploretock.com\//,"");a(e),t({url:e})},cancel:c})}),(0,l.jsx)(d,{url:o})]})}},94881(e,t,r){"use strict";var n=r(94375),o=r(86525),s=r(98746),i=r(10790);(0,n.M)(o,{edit:s.A,save:()=>(0,i.jsx)("div",{id:"Tock_widget_container","data-tock-display-mode":"Button","data-tock-color-mode":"Blue","data-tock-locale":"en-us","data-tock-timezone":"America/New_York"})})},33983(e,t,r){"use strict";r.d(t,{Z:()=>s,f:()=>i});var n=r(86087),o=r(10790);const s=(0,n.createContext)(),i=({onFilesSelected:e,onMediaItemSelected:t,onUploadFinished:r,children:n})=>(0,o.jsx)(s.Provider,{value:{onFilesSelected:e,onMediaItemSelected:t,onUploadFinished:r},children:n})},74628(e,t,r){"use strict";r.d(t,{C1:()=>n,NF:()=>o});const n=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],o={PUBLIC:0,PRIVATE:1,SITE_DEFAULT:2}},59257(e,t,r){"use strict";r.d(t,{A:()=>n});const n={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"}},support:{reusable:!1},save:r(36564).A,isDeprecation:!0}},36564(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);function s({attributes:e}){const{caption:t,guid:r}=e;if(!r)return null;const s=`https://videopress.com/v/${r}`;return(0,o.jsxs)("figure",{className:"wp-block-embed is-type-video is-provider-videopress",children:[(0,o.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${s}\n`}),!n.RichText.isEmpty(t)&&(0,o.jsx)(n.RichText.Content,{tagName:"figcaption",value:t})]})}},21440(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(37037),o=r(31481);const s={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsInline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},src:{type:"string"},videoPressClassNames:{type:"string"},align:{type:"wide"}},support:{reusable:!1},isEligible:({videoPressClassNames:e,guid:t})=>t&&void 0===e,migrate:e=>{const{className:t,videoPressClassNames:r}=e;return{...e,...(0,o.j)(t,r)}},save:n.A,isDeprecation:!0}},37037(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(94715),o=r(77473),s=r(10790);function i(e){const{attributes:{autoplay:t,caption:r,controls:i,guid:a,loop:c,muted:l,poster:u,preload:d,videoPressClassNames:p}={}}=e;if(!a)return null;const h=(0,o.e)(a,{autoplay:t,controls:i,loop:c,muted:l,poster:u,preload:d});return(0,s.jsxs)("figure",{className:p,children:[(0,s.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${h}\n`}),!n.RichText.isEmpty(r)&&(0,s.jsx)(n.RichText.Content,{tagName:"figcaption",value:r})]})}},77473(e,t,r){"use strict";r.d(t,{e:()=>o});var n=r(93832);const o=(e,{autoplay:t,controls:r,loop:o,muted:s,poster:i,preload:a})=>{if(!e)return null;const c={...t&&{autoPlay:!0},...!r&&{controls:!1},...o&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...i&&{posterUrl:i},..."none"!==a&&{preloadContent:a}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,c)}},31481(e,t,r){"use strict";r.d(t,{j:()=>i});var n=r(36536),o=r.n(n);const s=[{ratio:"2.33",className:"wp-embed-aspect-21-9"},{ratio:"2.00",className:"wp-embed-aspect-18-9"},{ratio:"1.77",className:"wp-embed-aspect-16-9"},{ratio:"1.33",className:"wp-embed-aspect-4-3"},{ratio:"1.00",className:"wp-embed-aspect-1-1"},{ratio:"0.56",className:"wp-embed-aspect-9-16"},{ratio:"0.50",className:"wp-embed-aspect-1-2"}],i=(e,t)=>{const r=s.map(e=>e.className),n=new(o())(e);n.remove(...r,"wp-block-embed","is-type-video","is-provider-videopress");const i=new(o())(e);return i.add(t),i.remove(...n),{className:n.value,videoPressClassNames:i.value}}},54727(e,t,r){"use strict";r.d(t,{A:()=>n});const n={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,save:r(36478).A,isDeprecation:!0}},36478(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(94715),o=r(13022),s=r(70222),i=r(10790);function a(e){const{attributes:{autoplay:t,caption:r,controls:a,guid:c,loop:l,muted:u,playsinline:d,poster:p,preload:h,videoPressClassNames:m,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:y}={}}=e,k=n.useBlockProps.save({className:(0,o.A)("wp-block-video",g,m,{[`align${f}`]:f})}),w=(0,s.e)(c,{autoplay:t,controls:a,loop:l,muted:u,playsinline:d,poster:p,preload:h,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:y});return(0,i.jsxs)("figure",{...k,children:[(0,i.jsx)("div",{className:"wp-block-embed__wrapper",children:`\n${w}\n`}),!n.RichText.isEmpty(r)&&(0,i.jsx)(n.RichText.Content,{tagName:"figcaption",value:r})]})}},70222(e,t,r){"use strict";r.d(t,{e:()=>o});var n=r(93832);const o=(e,{autoplay:t,controls:r,loop:o,muted:s,playsinline:i,poster:a,preload:c,seekbarColor:l,seekbarPlayedColor:u,seekbarLoadingColor:d})=>{if(!e)return null;const p={resizeToParent:!0,...t&&{autoPlay:!0},...!r&&{controls:!1},...o&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...i&&{playsinline:!0},...a&&{posterUrl:a},..."none"!==c&&{preloadContent:c},...""!==l&&{sbc:l},...""!==u&&{sbpc:u},...""!==d&&{sblc:d}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,p)}},65390(e,t,r){"use strict";r.d(t,{A:()=>n});const n={attributes:{autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string"},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"}},support:{reusable:!1},isEligible:e=>e.guid,migrate:e=>({...e,useAverageColor:!1}),save:r(34135).A,isDeprecation:!0}},34135(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(94715),o=r(13022),s=r(9847),i=r(10790);function a(e){const{attributes:{autoplay:t,caption:r,controls:a,guid:c,loop:l,muted:u,playsinline:d,poster:p,preload:h,videoPressClassNames:m,className:g,align:f,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:y,maxWidth:k}={}}=e,w=n.useBlockProps.save({className:(0,o.A)("wp-block-video",g,m,{[`align${f}`]:f})}),_=(0,s.e)(c,{autoplay:t,controls:a,loop:l,muted:u,playsinline:d,poster:p,preload:h,seekbarColor:b,seekbarPlayedColor:v,seekbarLoadingColor:y});let x={};return k&&k.length>0&&"100%"!==k&&(x={maxWidth:k,margin:"auto"}),(0,i.jsxs)("figure",{...w,children:[(0,i.jsx)("div",{className:"wp-block-embed__wrapper",style:x,children:`\n${_}\n`}),!n.RichText.isEmpty(r)&&(0,i.jsx)(n.RichText.Content,{tagName:"figcaption",value:r})]})}},9847(e,t,r){"use strict";r.d(t,{e:()=>o});var n=r(93832);const o=(e,{autoplay:t,controls:r,loop:o,muted:s,playsinline:i,poster:a,preload:c,seekbarColor:l,seekbarPlayedColor:u,seekbarLoadingColor:d})=>{if(!e)return null;const p={resizeToParent:!0,cover:!0,...t&&{autoPlay:!0},...!r&&{controls:!1},...o&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...i&&{playsinline:!0},...a&&{posterUrl:a},..."none"!==c&&{preloadContent:c},...""!==l&&{sbc:l},...""!==u&&{sbpc:u},...""!==d&&{sblc:d}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,p)}},85719(e,t,r){"use strict";r.d(t,{A:()=>P});var n=r(35750),o=r(1455),s=r.n(o),i=r(63162),a=r(94715),c=r(56427),l=r(29491),u=r(47143),d=r(86087),p=r(89877),h=r(27723),m=r(13109),g=r(57273),f=r(13022),b=r(33983),v=r(74628),y=r(64655),k=r(57636),w=r(63739),_=r(51742),x=r(9821),j=r(73475),C=r(17900),A=r(47960),S=r(10790);const __=h.__,_x=h._x,E=["image"],T=e=>{const t=(0,a.useBlockProps)({className:"resumable-upload"}),{onChangeTitle:r,title:o,filename:s,onSelectPoster:i,onRemovePoster:p,videoPosterImageData:h,fileForUpload:g,isUploadComplete:f,onDismissEditor:v,onSave:y,onVideoFrameSelected:w}=e,_=(0,u.useSelect)(e=>e("core/editor").isSavingPost(),[]),x=(0,l.usePrevious)(_);return(0,d.useEffect)(()=>{_&&!x&&y()},[_,x,y]),(0,S.jsx)(b.f,{onUploadFinished:e.uploadFinished,children:(0,S.jsxs)(d.Fragment,{children:[e.blockSettings,(0,S.jsxs)("div",{...t,children:[(0,S.jsxs)("div",{className:"uploader-block__logo",children:[(0,S.jsx)(m.A,{icon:n.KZ}),(0,S.jsx)("div",{className:"uploader-block__logo-text",children:__("VideoPress","jetpack")})]}),(0,S.jsx)(j.d,{file:g,filename:s,title:o,onChangeTitle:r,onSelectPoster:i,onRemovePoster:p,videoPosterImageData:h,onVideoFrameSelected:w}),!f&&(0,S.jsx)(k.A,{file:g}),f&&(0,S.jsxs)("div",{className:"uploader-block__upload-complete",children:[(0,S.jsxs)("span",{children:[__("Upload Complete!","jetpack")," 🎉"]}),(0,S.jsx)(c.Button,{variant:"primary",onClick:v,children:__("Done","jetpack")})]})]})]})})},N=e=>{const{scripts:t}=e,{html:r,interactive:n,caption:o,isSelected:s,hideOverlay:i,attributes:l,setAttributes:u,shouldRenderLoadingBlock:p}=e,{align:h,className:m,videoPressClassNames:g,maxWidth:b}=l,v=(0,a.useBlockProps)({className:(0,f.A)("wp-block-video",m,g,{[`align${h}`]:h})}),k=(0,d.useMemo)(()=>(0,w.e)(t),[t]);if(p)return(0,S.jsx)("figure",{...v,children:(0,S.jsx)(y.A,{text:__("Generating preview…","jetpack")})});return(0,S.jsxs)("figure",{...v,children:[(0,S.jsx)("div",{className:"wp-block-embed__wrapper",children:(0,S.jsx)(c.ResizableBox,{enable:{top:!1,bottom:!1,left:!0,right:!0},maxWidth:"100%",size:{width:b},style:{margin:"auto"},onResizeStop:(e,t,r)=>{let n=getComputedStyle(r).width;if(null!==r.parentElement){n===getComputedStyle(r.parentElement).width&&(n="100%")}u({maxWidth:n})},children:(0,S.jsx)(c.SandBox,{html:r,scripts:k,type:g,allowSameOrigin:!0})})}),!n&&(0,S.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:i}),(!a.RichText.isEmpty(o)||s)&&(0,S.jsx)(a.RichText,{tagName:"figcaption",placeholder:__("Write caption…","jetpack"),value:o,onChange:e=>u({caption:e}),inlineToolbar:!0})]})},P=(0,l.createHigherOrderComponent)((0,l.compose)([(0,u.withSelect)((e,t)=>{const{autoplay:r,controls:n,fileForImmediateUpload:o,guid:s,loop:a,muted:c,playsinline:l,poster:u,preload:d,seekbarColor:p,seekbarLoadingColor:h,seekbarPlayedColor:m,src:g,useAverageColor:f}=t.attributes,{getEmbedPreview:b,isRequestingEmbedPreview:v}=e("core"),y=(0,C.e)(s,{autoplay:r,controls:n,loop:a,muted:c,playsinline:l,poster:u,preload:d,seekbarColor:p,seekbarLoadingColor:h,seekbarPlayedColor:m,useAverageColor:f}),k=!!y&&b(y),w=!!y&&v(y),_=!!window.videoPressResumableEnabled;return{fileForImmediateUpload:o,isFetchingPreview:w,isUploading:!_&&(0,i.isBlobURL)(g),preview:k,resumableUploadEnabled:_,url:y}}),(0,u.withDispatch)(e=>({invalidateCachedEmbedPreview:t=>{e("core/data").invalidateResolution("core","getEmbedPreview",[t])}})),l.withInstanceId,e=>class extends d.Component{constructor(e){super(...arguments),this.state={media:null,isFetchingMedia:!1,fallback:!1,interactive:!1,rating:null,lastRequestedMediaId:null,isUpdatingRating:!1,allowDownload:null,privacySetting:v.NF.SITE_DEFAULT,isUpdatingAllowDownload:!1,fileForUpload:e.fileForImmediateUpload,isUpdatingIsPrivate:!1,isEditingWhileUploading:!1,isUploadComplete:!1,lastPosterValueSource:"",pendingVideoAttributes:null},this.posterImageButton=(0,d.createRef)(),this.previewCacheReloadTimer=null,this.previewFailuresCount=0}static getDerivedStateFromProps(e,t){const r={};if(!e.isSelected&&t.interactive&&(r.interactive=!1),t.fileForUpload&&!t.isEditingWhileUploading){null!==t.fileForUpload&&t.fileForUpload instanceof File&&(r.isEditingWhileUploading=!0)}else t.pendingVideoAttributes&&(r.isEditingWhileUploading=!0);return Object.keys(r).length?r:null}hideOverlay=()=>{this.setState({interactive:!0})};async componentDidMount(){const{guid:e}=this.props.attributes;e?this.setTracks(e):await this.setGuid(),this.setRatingAndAllowDownload()}setRatingAndAllowDownload=async()=>{const e=this.props?.attributes?.id,t=await this.requestMedia(e);let r=t?.jetpack_videopress?.rating;const n=t?.jetpack_videopress?.allow_download,o=t?.jetpack_videopress?.privacy_setting??v.NF.SITE_DEFAULT;r&&("X-18"===r&&(r="R-17"),this.setState({rating:r})),void 0!==n&&this.setState({allowDownload:!!n}),void 0!==o&&this.setState({privacySetting:o})};async componentDidUpdate(e){const{attributes:t,invalidateCachedEmbedPreview:r,preview:n,setAttributes:o,url:s,isFetchingPreview:i}=this.props;t.id!==e.attributes.id&&(await this.setGuid(),this.setRatingAndAllowDownload());let a=!1;if(s&&s!==e.url&&(r(s),a=!0),n){const e=(0,A.Zz)(n.html,(0,f.A)("wp-block-embed","is-type-video","is-provider-videopress"),!1);this.previewFailuresCount=0,o({videoPressClassNames:e})}else i||a||!this.props.attributes.guid||this.schedulePreviewCacheReload()}schedulePreviewCacheReload=()=>{const{invalidateCachedEmbedPreview:e,url:t}=this.props;null===this.previewCacheReloadTimer&&this.previewFailuresCount<5&&(this.previewFailuresCount++,this.previewCacheReloadTimer=setTimeout(()=>{e(t),this.previewCacheReloadTimer=null},2e3*this.previewFailuresCount))};fallbackToCore=()=>{this.props.setAttributes({guid:void 0}),this.setState({fallback:!0})};setGuid=async()=>{const{attributes:e,setAttributes:t}=this.props,{id:r}=e;if(r)try{const e=await this.requestMedia(r);if(null===e)return;const n=e?.jetpack_videopress?.guid;n?(t({guid:n}),this.setTracks(n)):this.fallbackToCore()}catch{this.setState({isFetchingMedia:!1}),this.fallbackToCore()}else t({guid:void 0})};requestMedia=async e=>{if(!e)return null;if(null!==this.state.media&&this.state.lastRequestedMediaId===e)return this.state.media;this.setState({isFetchingMedia:!0});const t=await s()({path:`/wp/v2/media/${e}`}).catch(()=>(this.setState({fallback:!0}),null)).finally(()=>{this.setState({isFetchingMedia:!1})}),{id:r}=this.props.attributes;return e!==r?null:(this.setState({media:t,lastRequestedMediaId:e}),t)};setTracks=e=>{const{setAttributes:t}=this.props;e&&s()({url:`https://public-api.wordpress.com/rest/v1.1/videos/${e}`,credentials:"omit",global:!0}).then(e=>{const r=[];Object.keys(e.tracks).forEach(t=>{for(const n in e.tracks[t]){const o=e.tracks[t][n];r.push({src:o.src,kind:t,srcLang:n,label:o.label})}}),t({videoPressTracks:r})})};switchToEditing=()=>{this.props.setAttributes({id:void 0,guid:void 0,src:void 0})};onSelectPoster=e=>{const{setAttributes:t}=this.props;t({poster:e.url}),this.setState({videoPosterImageData:e})};onRemovePoster=()=>{const{setAttributes:e}=this.props;e({poster:""}),this.setState({videoPosterImageData:null}),this.posterImageButton.current.focus()};toggleAttribute=e=>t=>{this.props.setAttributes({[e]:t})};getAutoplayHelp=e=>e?__("Note: Autoplaying videos may cause usability issues for some visitors.","jetpack"):null;getPreloadHelp(){const{attributes:e}=this.props;return"auto"===e.preload?__("Note: Automatically downloading videos may cause issues if there are many videos displayed on the same page.","jetpack"):null}getPrivacySettingHelp=e=>{const t=parseInt(e,10);return v.NF.PRIVATE===t?__("Restrict views to members of this site","jetpack"):v.NF.PUBLIC===t?__("Video can be viewed by anyone","jetpack"):__("Follow the site privacy setting","jetpack")};renderControlLabelWithTooltip(e,t){return(0,S.jsx)(c.Tooltip,{text:t,position:"top",children:(0,S.jsx)("span",{children:e})})}onChangeRating=e=>{const t=this.state.rating;"X-18"===e&&(e="R-17"),-1!==["G","PG-13","R-17"].indexOf(e)&&this.updateMetaApiCall({rating:e},()=>this.setState({isUpdatingRating:!0,rating:e}),()=>this.setState({rating:t}),()=>this.setState({isUpdatingRating:!1}))};onChangeAllowDownload=e=>{const t=this.state.allowDownload;this.updateMetaApiCall({allow_download:e?1:0},()=>this.setState({isUpdatingAllowDownload:!0,allowDownload:e}),()=>this.setState({allowDownload:t}),()=>this.setState({isUpdatingAllowDownload:!1}))};onChangePrivacySetting=e=>{const t=this.state.privacySetting;this.updateMetaApiCall({privacy_setting:e},()=>this.setState({isUpdatingPrivacySetting:!0,privacySetting:e}),()=>this.setState({privacySetting:t}),()=>this.setState({isUpdatingPrivacySetting:!1}))};updateMetaApiCall=(e,t,r,n)=>{const{invalidateCachedEmbedPreview:o,url:i}=this.props,{id:a}=this.props.attributes;if(!a)return;t();const c={id:a};Object.assign(c,e),s()({path:"/wpcom/v2/videopress/meta",method:"POST",data:c}).then(e=>{status in e&&200!==e.status&&r()}).catch(()=>r()).finally(()=>{n(),o(i)})};render(){const{attributes:t,instanceId:r,isFetchingPreview:n,isUploading:o,preview:i,resumableUploadEnabled:l,setAttributes:u}=this.props,{fallback:m,fileForUpload:f,isFetchingMedia:k,isUpdatingRating:w,interactive:j,rating:C,allowDownload:P,privacySetting:B,isUpdatingAllowDownload:R,isUpdatingPrivacySetting:I,videoPosterImageData:D}=this.state,{autoplay:L,caption:F,controls:M,guid:O,loop:U,muted:z,playsinline:$,poster:q,preload:H,useAverageColor:V,videoPressTracks:G,isVideoPressExample:W,src:Z}=t;if(W&&Z)return(0,S.jsx)("img",{src:Z,alt:F});const J=`video-block__poster-image-description-${r}`,K=!(!q&&!D),Y=(0,S.jsxs)(d.Fragment,{children:[(0,S.jsx)(a.BlockControls,{group:"block",children:(0,S.jsx)(x.A,{tracks:G,onChange:e=>{u({videoPressTracks:e})},guid:O})}),(0,S.jsx)(a.BlockControls,{children:(0,S.jsx)(c.ToolbarGroup,{children:(0,S.jsx)(c.ToolbarButton,{className:"components-icon-button components-toolbar__control",text:__("Replace","jetpack"),onClick:this.switchToEditing})})}),(0,S.jsxs)(a.InspectorControls,{children:[(0,S.jsxs)(c.PanelBody,{title:__("Video Settings","jetpack"),children:[(0,S.jsx)(c.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Autoplay","jetpack"),/* translators: Tooltip describing the "autoplay" option for the VideoPress player */ | |
| 32 | +__("Start playing the video as soon as the page loads","jetpack")),onChange:this.toggleAttribute("autoplay"),checked:L,help:this.getAutoplayHelp,__nextHasNoMarginBottom:!0}),(0,S.jsx)(c.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Loop","jetpack"),/* translators: Tooltip describing the "loop" option for the VideoPress player */ | |
| 33 | +__("Restarts the video when it reaches the end","jetpack")),onChange:this.toggleAttribute("loop"),checked:U,__nextHasNoMarginBottom:!0}),(0,S.jsx)(c.ToggleControl,{label:__("Muted","jetpack"),onChange:this.toggleAttribute("muted"),checked:z,__nextHasNoMarginBottom:!0}),(0,S.jsx)(c.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Playback Controls","jetpack"),/* translators: Tooltip describing the "controls" option for the VideoPress player */ | |
| 34 | +__("Display the video playback controls","jetpack")),onChange:this.toggleAttribute("controls"),checked:M,__nextHasNoMarginBottom:!0}),(0,S.jsx)(c.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Play Inline","jetpack"),/* translators: Tooltip describing the "playsinline" option for the VideoPress player */ | |
| 35 | +__("Play the video inline instead of full-screen on mobile devices","jetpack")),onChange:this.toggleAttribute("playsinline"),checked:$,__nextHasNoMarginBottom:!0}),(0,S.jsx)(c.SelectControl,{label:this.renderControlLabelWithTooltip(__("Preload","jetpack"),/* translators: Tooltip describing the "preload" option for the VideoPress player */ | |
| 36 | +__("Content to dowload before the video is played","jetpack")),value:H??"",onChange:e=>u({preload:e}),options:[{value:"auto",label:_x("Auto","VideoPress preload setting","jetpack")},{value:"metadata",label:_x("Metadata","VideoPress preload setting","jetpack")},{value:"none",label:_x("None","VideoPress preload setting","jetpack")}],help:this.getPreloadHelp(),__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,S.jsx)(a.MediaUploadCheck,{children:(0,S.jsxs)(c.BaseControl,{className:"editor-video-poster-control",children:[(0,S.jsx)(c.BaseControl.VisualLabel,{children:__("Poster Image","jetpack")}),(0,S.jsx)(a.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:this.onSelectPoster,allowedTypes:E,render:({open:e})=>(0,S.jsx)(c.Button,{variant:"secondary",onClick:e,ref:this.posterImageButton,"aria-describedby":J,children:K?__("Replace image","jetpack",0):__("Select Poster Image","jetpack")})}),(0,S.jsx)("p",{id:J,hidden:!0,children:K?(0,h.sprintf)(/* translators: %s: an image URL. */ | |
| 37 | +__("The current poster image url is %s","jetpack"),q??D):__("There is no poster image currently selected","jetpack")}),K&&(0,S.jsx)(c.Button,{onClick:this.onRemovePoster,variant:"link",isDestructive:!0,children:__("Remove Poster Image","jetpack")})]})}),(0,d.createInterpolateElement)(__("Send us your <a>VideoPress feedback</a>","jetpack"),{a:(0,S.jsx)(g.N,{openInNewTab:!0,href:"https://automattic.survey.fm/videopress-feedback"})})]}),(0,S.jsx)(_.A,{attributes:t,setAttributes:u,useAverageColor:V,toggleAttribute:this.toggleAttribute}),(0,S.jsxs)(c.PanelBody,{title:__("Video File Settings","jetpack"),children:[(0,S.jsx)(c.SelectControl,{label:_x("Rating","The age rating for this video.","jetpack"),value:C??"",disabled:k||w,options:[{label:_x("G",'Video rating for "General Audiences".',"jetpack"),value:"G"},{label:_x("PG-13",'Video rating for "Parental Guidance", unsuitable for children under 13.',"jetpack"),value:"PG-13"},{label:_x("R",'Video rating for "Restricted", not recommended for children under 17.',"jetpack"),value:"R-17"}],onChange:this.onChangeRating,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,S.jsx)(c.ToggleControl,{label:this.renderControlLabelWithTooltip(__("Allow download","jetpack"),/* translators: Tooltip describing the "allow download" option for the VideoPress player */ | |
| 38 | +__("Display download option and allow viewers to download this video","jetpack")),onChange:this.onChangeAllowDownload,checked:P,disabled:k||R,__nextHasNoMarginBottom:!0}),(0,S.jsx)(c.SelectControl,{label:__("Video Privacy","jetpack"),help:this.getPrivacySettingHelp(B),onChange:this.onChangePrivacySetting,value:B??"",options:[{value:v.NF.SITE_DEFAULT,label:_x("Site Default","VideoPress privacy setting","jetpack")},{value:v.NF.PUBLIC,label:_x("Public","VideoPress privacy setting","jetpack")},{value:v.NF.PRIVATE,label:_x("Private","VideoPress privacy setting","jetpack")}],disabled:k||I,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]})]})]}),Q=e=>{this.setState({fileForUpload:e[0]})},X=e=>{e&&e.url?(this.props.setAttributes({src:e.url,id:e.id,poster:e.image?.src!==e.icon?e.image?.src:void 0}),e.videopress_guid&&this.props.setAttributes({guid:e.videopress_guid})):u({src:void 0,id:void 0,poster:void 0})},ee=()=>"videoPressUploadPoster"in window,te=(0,p.escapeHTML)(f?(0,A.T3)(f.name):""),re=({mediaId:e,guid:t,src:r})=>{this.setState({title:this.state.title??te,fileForUpload:null,isUploadComplete:!!e,isEditingWhileUploading:!!e&&this.state.isEditingWhileUploading,pendingVideoAttributes:e&&t&&r?{id:e,guid:t,src:r}:null})},ne=e=>{this.setState({title:e})},oe=e=>{this.setState({videoFrameSelectedInMillis:e,videoPosterImageData:null})},se=()=>{const e=this.state.title;this.updateMetaApiCall({title:e},()=>this.setState({isUpdatingTitle:!0,title:e}),()=>this.setState({title:e}),()=>this.setState({isUpdatingTitle:!1}))},ie=()=>de({at_time:this.state.videoFrameSelectedInMillis,is_millisec:!0}),ae=()=>de({poster_attachment_id:this.state.videoPosterImageData.id}),ce=e=>{e.generating?le():ue(e.poster)},le=()=>{setTimeout(()=>{(ee()?window.videoPressGetPoster(O):s()({path:`/videos/${O}/poster`,apiNamespace:"rest/v1.1",global:!0,method:"GET"})).then(e=>ce(e))},2e3)},ue=e=>{e&&u({poster:e})},de=e=>{if(ee())return window.videoPressUploadPoster(O,e).then(e=>ce(e));s()({path:`/videos/${O}/poster`,apiNamespace:"rest/v1.1",method:"POST",global:!0,data:e}).catch(e=>e)},pe=()=>{const{title:e,videoFrameSelectedInMillis:t}=this.state;e&&se(),D?ae():null!=t&&ie()},he=()=>{this.state.pendingVideoAttributes&&u(this.state.pendingVideoAttributes),this.setState({isEditingWhileUploading:!1,pendingVideoAttributes:null}),pe()};if(null!=f&&f.name||this.state.isEditingWhileUploading){const e=this.state.title??te;return(0,S.jsx)(T,{fileForUpload:f,filename:te,uploadFinished:re,blockSettings:Y,onDismissEditor:he,isUploadComplete:this.state.isUploadComplete,onSelectPoster:this.onSelectPoster,onRemovePoster:this.onRemovePoster,onChangeTitle:ne,title:e,videoPosterImageData:this.state.videoPosterImageData,onVideoFrameSelected:oe,onSave:pe})}const me=k||n,ge=m||o||!O,fe=ge&&!o&&!me,be=(0,S.jsxs)(d.Fragment,{children:[(0,S.jsx)("div",{className:o||me?"":"videopress-block-hide",children:(0,S.jsx)(y.A,{text:o?__("Uploading…","jetpack"):__("Generating preview…","jetpack",0)})}),(0,S.jsx)("div",{className:fe?"":"videopress-block-hide",children:(0,S.jsx)(e,{...this.props})})]});if(ge)return l?(0,S.jsx)(b.f,{onFilesSelected:Q,onMediaItemSelected:X,children:be}):(0,S.jsx)(d.Fragment,{children:be});const{html:ve,scripts:ye}=i||{html:null,scripts:null},ke=me||!i;return(0,S.jsxs)(d.Fragment,{children:[Y,(0,S.jsx)(N,{...this.props,hideOverlay:this.hideOverlay,html:ve,scripts:ye,interactive:j,caption:F,shouldRenderLoadingBlock:ke})]})}}]),"withVideoPressEdit")},15652(e,t,r){"use strict";var n=r(90372),o=r(97999),s=r(85985),i=r(63162),a=r(94715),c=r(75994),l=r(74997),u=r(56427),d=r(29491),p=r(47143),h=r(43656),m=r(86087),g=r(52619),f=r(27723),b=r(33983),v=r(59257),y=r(21440),k=r(54727),w=r(65390),_=r(85719),x=r(81360),j=r(47960),C=r(51983),A=r(7345),S=r(40932),E=(r(591),r(10790));const __=f.__,T=(0,d.createHigherOrderComponent)(e=>t=>{const{name:r}=(0,a.useBlockEditContext)();return"core/video"!==r&&"videopress/video"!==r?(0,E.jsx)(e,{...t}):(0,E.jsxs)(e,{...t,disableDropZone:!0,className:"no-videopress-media-placeholder",children:[(0,E.jsx)(u.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary",children:__("Media Library","jetpack")}),(0,E.jsx)(u.Button,{disabled:!0,className:"components-button no-videopress-disabled-button",variant:"secondary",children:__("Upload","jetpack")})]})},"videoPressNoPlanMediaPlaceholder"),N=(0,d.createHigherOrderComponent)(e=>t=>{const{name:r}=(0,a.useBlockEditContext)();if("core/video"!==r)return(0,E.jsx)(e,{...t});const{onFilesSelected:n,onMediaItemSelected:o}=(0,m.useContext)(b.Z),s={...t,handleUpload:!1,disableDropZone:!0,onSelect:e=>{void 0!==e.length?n(e):o(e)}};return(0,E.jsx)(e,{...s,className:"videopress-media-placeholder"})},"videoPressMediaPlaceholder"),P=(e,t,r)=>("core/video"!==t.name||!r.guid||r.className?.indexOf("wp-block-video")>=0||r.videoPressClassNames||(e.className=e.className.replace("wp-block-video","").trim()),e);(0,g.addFilter)("blocks.registerBlockType","jetpack/videopress",(e,t)=>{if("core/embed"===t)return(e=>{if(!("variations"in e)||"object"!=typeof e.variations)return;const{available:t}=(0,s.FB)("videopress");e.variations.some(e=>"videopress"===e.name&&(t&&(e.scope=[]),e.patterns.push(/^https?:\/\/v\.wordpress\.com\/([a-zA-Z\d]{8})(.+)?$/i),!0))})(e),e;if("core/video"!==t||e.isDeprecation)return e;const{deprecated:r,edit:n,save:a,supports:c,transforms:u}=e,{available:d,unavailableReason:p}=(0,s.FB)("videopress"),m=(0,o.isWpcomPlatformSite)()&&["missing_plan","unknown"].includes(p),f=!!window.videoPressResumableEnabled;if(m?((0,g.addFilter)("editor.MediaPlaceholder","jetpack/videopress",T),(0,g.addFilter)("editor.BlockListBlock","jetpack/videopress-with-has-warning-is-interactive-class-names",(0,s.BT)("core/video"))):d&&(f&&(0,g.addFilter)("editor.MediaPlaceholder","jetpack/videopress",N),e.description=__("Embed a video from your media library or upload a new one with VideoPress.","jetpack"),e.example.attributes={caption:"",isVideoPressExample:!0,src:S}),(0,g.addFilter)("blocks.getSaveContent.extraProps","jetpack/videopress",P,20),d||["missing_plan","missing_module","unknown"].includes(p)){const t={autoplay:{type:"boolean"},caption:{type:"string",source:"html",selector:"figcaption"},controls:{type:"boolean",default:!0},maxWidth:{type:"string",default:"100%"},guid:{type:"string"},id:{type:"number"},loop:{type:"boolean"},isVideoPressExample:{type:"boolean",default:!1},muted:{type:"boolean"},playsinline:{type:"boolean"},poster:{type:"string"},preload:{type:"string",default:"metadata"},seekbarPlayedColor:{type:"string",default:""},seekbarLoadingColor:{type:"string",default:""},seekbarColor:{type:"string",default:""},src:{type:"string",source:"attribute",selector:"video",attribute:"src"},useAverageColor:{type:"boolean",default:!0},videoPressTracks:{type:"array",items:{type:"object"},default:[]},videoPressClassNames:{type:"string"},fileForImmediateUpload:{type:"object",default:null}},o=/https?:\/\/v\.wordpress\.com\/([a-zA-Z\d]{8})(.+)?/i;return{...e,attributes:{...e.attributes,...t},transforms:{...u,from:[{type:"files",isMatch:e=>e.every(e=>0===e.type.indexOf("video/")),priority:9,transform:(e,t)=>{const r=[];return e.forEach(e=>{if(d&&f){const t=(0,l.createBlock)("core/video",{fileForImmediateUpload:e});r.push(t)}else{const n=(0,l.createBlock)("core/video",{src:(0,i.createBlobURL)(e)});(0,h.mediaUpload)({filesList:[e],onFileChange:([{id:e,url:r}])=>{t(n.clientId,{id:e,src:r})},allowedTypes:["video"]}),r.push(n)}}),r}},{type:"raw",isMatch:e=>"P"===e.nodeName&&o.test(e.innerHTML),transform:e=>{const t=o.exec(e.innerHTML);return(0,l.createBlock)("core/embed",{url:"https://videopress.com/v/"+t[1].trim()})}}]},supports:{...c,reusable:!1},edit:(0,_.A)(n),save:(0,x.A)(a),deprecated:[...r||[],w.A,k.A,{attributes:t,isEligible:e=>!e.guid,save:a,supports:c,isDeprecation:!0},y.A,v.A]}}return e},5),(0,g.addFilter)("blocks.registerBlockType","videopress/add-wp-chapters-support",A.A),(0,g.addFilter)("blocks.registerBlockType","videopress/add-v6-transform-support",C.A),(0,g.addFilter)("blocks.registerBlockType","videopress/handle-unavailability",function(e,t){if("videopress/video"!==t)return e;const{available:r,unavailableReason:n}=(0,s.FB)("videopress/video");return r?e:(0,o.isWpcomPlatformSite)()&&["missing_plan","unknown"].includes(n)?((0,g.addFilter)("editor.MediaPlaceholder","jetpack/videopress-video-no-plan",T),(0,g.addFilter)("editor.BlockListBlock","jetpack/videopress-video-with-has-warning-is-interactive-class-names",(0,s.BT)("videopress/video")),e):e},20),(0,g.addFilter)("blocks.registerBlockType","videopress/add-core-video-transform",function(e,t){if("videopress/video"!==t)return e;const r=(0,l.getBlockType)("videopress/video"),{available:o}=(0,s.FB)("videopress/video");return r&&o?{...e,transforms:{from:[...e.transforms?.from||[],{type:"block",blocks:["core/video"],isMatch:e=>{const{src:t,guid:r}=e,n=(0,j.QW)(t);return r||n},transform:e=>{const t=(0,p.select)(h.store).getCurrentPostId();return n.A?.tracks?.recordEvent("jetpack_editor_videopress_block_manual_transform_click",{post_id:t}),(0,l.createBlock)("videopress/video",e)}}],to:[...e.transforms?.to||[],{type:"block",blocks:["core/video"],transform:e=>(0,l.createBlock)("core/video",e)}]}}:e});const B=(0,d.createHigherOrderComponent)(e=>t=>{const{block:r}=t,{name:n,attributes:i,clientId:c,__unstableBlockSource:u}=r,{replaceBlock:d}=(0,p.useDispatch)(a.store),{url:h,guid:g,providerNameSlug:f}=i,{available:b}=((0,j.x1)(i),(0,l.getBlockType)("videopress/video"),(0,s.FB)("videopress/video")),v="core/embed"===n,y=(0,j.QW)(h),k=v&&y?y:g,w=((0,o.isSimpleSite)(),!1),_=w;return(0,m.useEffect)(()=>{},[c,_,i,u,d,k]),(0,E.jsx)(e,{...t})},"convertVideoBlockToVideoPressVideoBlock");function R({BlockListBlock:e,...t}){const{block:r}=t,{name:n,attributes:o,clientId:s}=r,{replaceBlock:i}=(0,p.useDispatch)(a.store);return(0,m.useEffect)(()=>{try{const e=(0,c.parse)(o.originalContent),t=e?.[0];if(!t)return;const{attrs:r}=t;i(s,(0,l.createBlock)("core/video",function(e){const t={...e};return e?.tracks&&(t.videoPressTracks=e.tracks,delete t.tracks),e?.isExample&&(t.isVideoPressExample=e.isExample,delete t.isExample),e?.classNames&&(t.videoPressClassNames=e.classNames,delete t.classNames),delete t.title,delete t.description,delete t.cacheHtml,delete t.videoRatio,delete t.privacySetting,delete t.allowDownload,delete t.displayEmbed,delete t.rating,delete t.isPrivate,t}(r)))}catch(e){console.error("Error converting VideoPress block to core/video",e)}},[n,s,o,i]),(0,E.jsx)(e,{...t})}(0,g.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-to-videopress-video-block",B);const I=(0,d.createHigherOrderComponent)(e=>t=>{const{block:r}=t,{name:n,attributes:o}=r;return"core/missing"!==n||"videopress/video"!==o?.originalName?(0,E.jsx)(e,{...t}):(0,E.jsx)(R,{...t,BlockListBlock:e})},"convertV6toV5");(0,g.addFilter)("editor.BlockListBlock","videopress/jetpack-convert-from-v6-to-v5",I)},64655(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=({text:e})=>(0,o.jsxs)("div",{className:"wp-block-embed is-loading",children:[(0,o.jsx)(n.Spinner,{}),(0,o.jsx)("p",{children:e})]})},57636(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(56427),o=r(86087),s=r(27723),i=r(57273),a=r(37578),c=r(33983),l=r(80534),u=(r(86154),r(10790));const __=s.__;function d({file:e}){const[t,r]=(0,o.useState)(0),[d,p]=(0,o.useState)(!1),[h,m]=(0,o.useState)(null),[g,f]=(0,o.useState)(null),[b,v]=(0,o.useState)(null),{onUploadFinished:y}=(0,o.useContext)(c.Z),k=(0,o.useRef)(null);k.current=h;const w=(0,o.useCallback)(()=>{const t=(0,l.l)({onError:e=>{f(e)},onProgress:(e,t)=>{r(e/t*100)},onSuccess:e=>{y(e)},onUploadUuidRetrieved:e=>{null===b&&v(e)}});(0,l.Q)().then(r=>{const n=t(e,r);m(n)}).catch(e=>{f(e)})},[e,y,b]);(0,o.useEffect)(()=>(w(),()=>{null!==k.current&&k.current.abort()}),[]);const _=Math.round(t),x={width:`${_}%`},j=(0,a.O)(e.size);return(0,u.jsx)(u.Fragment,{children:null!==g?(0,u.jsxs)("div",{className:"resumable-upload__error",children:[(0,u.jsx)("div",{className:"resumable-upload__error-text",children:(()=>{let e=__("An error was encountered during the upload. Check your network connection.","jetpack");if("object"==typeof g){const t=g.toString().match(/message":"([^"]+)"/);if(t&&"object"==typeof t&&2===t.length){const r=t[1];if("Invalid Mime"!==r)return r;e=(0,u.jsxs)(u.Fragment,{children:[__("The format of the video you uploaded is not supported.","jetpack")," ",(0,u.jsx)(i.N,{openInNewTab:!0,href:"https://wordpress.com/support/videopress/recommended-video-settings/",target:"_blank",rel:"noreferrer",children:__("Check the recommended video settings.","jetpack")})]})}}return e})()}),(0,u.jsx)(n.Button,{variant:"primary",onClick:()=>(f(null),void w()),children:__("Try again","jetpack")}),(0,u.jsx)(n.Button,{variant:"secondary",onClick:()=>y({mediaId:null}),className:"resumable-upload__error-cancel",children:__("Cancel","jetpack")})]}):(0,u.jsxs)("div",{className:"resumable-upload__status",children:[(0,u.jsx)("div",{className:"resumable-upload__progress",children:(0,u.jsx)("div",{className:"resumable-upload__progress-loaded",style:x})}),(0,u.jsxs)("div",{className:"resumable-upload__file-info",children:[(0,u.jsx)("div",{children:d?(0,s.sprintf)(/* translators: %s: an upload progress percentage number, from 0-100. */ | |
| 39 | +__("Paused (%s%%)","jetpack"),_):(0,s.sprintf)(/* translators: %s: an upload progress percentage number, from 0-100. */ | |
| 40 | +__("Uploading (%s%%)","jetpack"),_)}),(0,u.jsx)("div",{className:"resumable-upload__file-size",children:j})]}),(0,u.jsx)("div",{className:"resumable-upload__actions",children:(0,u.jsx)(n.Button,{variant:"link",onClick:()=>{h&&(d?h.start():h.abort(),p(!d))},children:d?"Resume":"Pause"})})]})})}},80534(e,t,r){"use strict";r.d(t,{Q:()=>o,l:()=>i});var n=r(10781);const o=function(e){return new Promise(function(t,r){const n=e?{data:{key:e}}:{};wp.media.ajax("videopress-get-upload-jwt",{async:!0,...n}).done(function(e){t({token:e.upload_token,blogId:e.upload_blog_id,url:e.upload_action_url})}).fail(function(e){r(e)})})},s={},i=({onUploadUuidRetrieved:e,onError:t,onProgress:r,onSuccess:i})=>(a,c)=>{const l=new n._O(a,{onError:t,onProgress:r,endpoint:c.url,removeFingerprintOnSuccess:!0,withCredentials:!1,autoRetry:!0,overridePatchMethod:!1,chunkSize:1e7,allowedFileTypes:["video/*"],metadata:{filename:a.name,filetype:a.type},retryDelays:[0,1e3,3e3,5e3,1e4],onAfterResponse:function(t,r){if(r.getStatus()>=400)return;const n=r.getHeader("x-videopress-upload-guid"),o=r.getHeader("x-videopress-upload-media-id"),a=r.getHeader("x-videopress-upload-src-url");if(n&&o&&a)return void(i&&i({mediaId:Number(o),guid:n,src:a}));const c={"x-videopress-upload-key-token":"token","x-videopress-upload-key":"key"},l={};Object.keys(c).forEach(function(e){const t=r.getHeader(e);t&&(l[c[e]]=t)}),l.key&&l.token&&(s[l.key]=l.token),l.key&&e(l.key)},onBeforeRequest:function(e){const t=e._method;["HEAD","OPTIONS"].indexOf(t)>=0&&(e._method="GET",e.setHeader("X-HTTP-Method-Override",t)),["DELETE","PUT","PATCH"].indexOf(t)>=0&&(e._method="POST",e.setHeader("X-HTTP-Method-Override",t)),e._xhr.open(e._method,e._url,!0);for(const t of Object.keys(e._headers))e.setHeader(t,e._headers[t]);if("POST"===t){if(!!!c.token)throw"should never happen";e.setHeader("x-videopress-upload-token",c.token)}if(["OPTIONS","GET","HEAD","DELETE","PUT","PATCH"].indexOf(t)>=0){const r=new URL(e._url).pathname.split("/"),n=r[r.length-1];if(s[n])e.setHeader("x-videopress-upload-token",s[n]);else if("HEAD"===t)return o(n).then(t=>(s[n]=t.token,e.setHeader("x-videopress-upload-token",t.token),e))}return Promise.resolve(e)}});return l.findPreviousUploads().then(function(e){e.length&&l.resumeFromPreviousUpload(e[0]),l.start()}),l}},63739(e,t,r){"use strict";r.d(t,{e:()=>n});const n=e=>{const t=Array.isArray(e)?[...e]:[];if(window.videopressAjax){const e=new Blob([`var videopressAjax = ${JSON.stringify({...window.videopressAjax,context:"sandbox"})};`],{type:"text/javascript"});t.push(URL.createObjectURL(e)),window.videopressAjax.bridgeUrl&&t.push(window.videopressAjax.bridgeUrl)}return window?.videoPressEditorState?.playerBridgeUrl&&t.push(window.videoPressEditorState.playerBridgeUrl),t}},81360(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(94715),o=r(29491),s=r(13022),i=r(17900),a=r(10790);const c=(0,o.createHigherOrderComponent)(e=>t=>{const{attributes:{autoplay:r,caption:o,controls:c,guid:l,loop:u,muted:d,playsinline:p,poster:h,preload:m,videoPressClassNames:g,className:f,align:b,seekbarColor:v,seekbarPlayedColor:y,seekbarLoadingColor:k,useAverageColor:w,maxWidth:_}={}}=t;if(!l)return e(t);const x=n.useBlockProps.save({className:(0,s.A)("wp-block-video",f,g,{[`align${b}`]:b})}),j=(0,i.e)(l,{autoplay:r,controls:c,loop:u,muted:d,playsinline:p,poster:h,preload:m,seekbarColor:v,seekbarPlayedColor:y,seekbarLoadingColor:k,useAverageColor:w});let C={};return _&&_.length>0&&"100%"!==_&&(C={maxWidth:_,margin:"auto"}),(0,a.jsxs)("figure",{...x,children:[(0,a.jsx)("div",{className:"wp-block-embed__wrapper",style:C,children:`\n${j}\n`}),!n.RichText.isEmpty(o)&&(0,a.jsx)(n.RichText.Content,{tagName:"figcaption",value:o})]})},"withVideoPressSave")},51742(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(94715),o=r(56427),s=r(86087),i=r(27723),a=r(10790);const __=i.__;class c extends s.Component{constructor(){super(...arguments);const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}=this.props.attributes;this.state={seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}}handleChangeSeekbarColor=e=>{this.setState({seekbarColor:e})};handleChangeSeekbarLoadingColor=e=>{this.setState({seekbarLoadingColor:e})};handleChangeSeekbarPlayedColor=e=>{this.setState({seekbarPlayedColor:e})};saveColors=()=>{const{seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:r}=this.state,{setAttributes:n}=this.props;n({seekbarColor:e,seekbarLoadingColor:t,seekbarPlayedColor:r})};render(){const{seekbarColor:e,seekbarPlayedColor:t,seekbarLoadingColor:r}=this.state,{toggleAttribute:s,useAverageColor:i}=this.props,c=!0;return(0,a.jsxs)(o.PanelBody,{className:"seekbar-color-settings__panel",title:__("Progress Bar Colors","jetpack"),initialOpen:!1,children:[(0,a.jsx)(o.ToggleControl,{label:__("Match video","jetpack"),help:__("Colors adapt to the video as it plays","jetpack"),onChange:s("useAverageColor"),checked:i,__nextHasNoMarginBottom:!0}),(0,a.jsx)(n.PanelColorSettings,{opened:!i,showTitle:!1,colorSettings:[{value:e,onChange:this.handleChangeSeekbarColor,label:__("Main","jetpack"),showTitle:c},{value:r,onChange:this.handleChangeSeekbarLoadingColor,label:__("Loaded","jetpack"),showTitle:c},{value:t,onChange:this.handleChangeSeekbarPlayedColor,label:__("Progress","jetpack"),showTitle:c}],children:(0,a.jsx)(o.Button,{variant:"secondary",onClick:this.saveColors,children:__("Save colors","jetpack")})})]})}}const l=c},9821(e,t,r){"use strict";r.d(t,{A:()=>k,n:()=>b});var n=r(1455),o=r.n(n),s=r(94715),i=r(56427),a=r(47143),c=r(86087),l=r(27723),u=r(58384),d=r(10790);const __=l.__,p="subtitles",h={".vtt":"text/vtt",".srt":"application/x-subrip"},m=[{label:__("Subtitles","jetpack"),value:"subtitles"},{label:__("Captions","jetpack"),value:"captions"},{label:__("Descriptions","jetpack"),value:"descriptions"},{label:__("Chapters","jetpack"),value:"chapters"},{label:__("Metadata","jetpack"),value:"metadata"}],g=(0,d.jsxs)(i.SVG,{width:"18",height:"14",viewBox:"0 0 18 14",role:"img",fill:"none",children:[(0,d.jsx)(i.Rect,{x:"0.75",y:"0.75",width:"16.5",height:"12.5",rx:"1.25",stroke:"black",strokeWidth:"1.5",fill:"none"}),(0,d.jsx)(i.Path,{d:"M3 7H15",stroke:"black",strokeWidth:"1.5"}),(0,d.jsx)(i.Path,{d:"M3 10L15 10",stroke:"black",strokeWidth:"1.5"})]}),f=()=>"videoPressUploadTrack"in window,b=(e,t)=>{if(f())return window.videoPressUploadTrack(t,e.kind,e.srcLang,e.label,e.tmpFile);const r={method:"POST",path:`/videos/${t}/tracks`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang],["label",e.label],["vtt",e.tmpFile]]};return o()(r)};function v({tracks:e,onChange:t,guid:r}){const[n=-1,s]=(0,c.useState)(),a=n=>{const i=e[n];s(n),((e,t)=>{if(f())return window.videoPressDeleteTrack(t,e.kind,e.srcLang);const r={method:"POST",path:`/videos/${t}/tracks/delete`,apiNamespace:"rest/v1.1",global:!0,parse:!1,formData:[["kind",e.kind],["srclang",e.srcLang]]};return o()(r)})(i,r).finally(()=>{t(e.filter((e,t)=>t!==n)),s(-1)})};let u;return u=0===e.length?(0,d.jsx)("p",{className:"videopress-block-tracks-editor__tracks-informative-message",children:__("Tracks can be subtitles, captions, chapters, or descriptions. They help make your content more accessible to a wider range of users.","jetpack")}):e.map((e,t)=>(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__track-list-track",children:[(0,d.jsx)("span",{children:e.label}),(0,d.jsx)("div",{className:"videopress-block-tracks-editor__track-list-track-delete",children:(0,d.jsx)(i.Button,{variant:"link",isDestructive:!0,onClick:()=>{a(t)},"aria-label":(0,l.sprintf)(/* translators: %s: Label of the video text track e.g: "French subtitles" */ | |
| 41 | +__("Delete %s","jetpack"),e.label),disabled:n===t,children:n===t?__("Deleting","jetpack"):__("Delete","jetpack",0)})})]},t)),(0,d.jsx)(i.MenuGroup,{label:__("Text tracks","jetpack"),className:"videopress-block-tracks-editor__track-list",children:u})}function y({track:e,guid:t,onChange:r,onClose:n,onCancel:o,trackExists:u}){const[g,f]=(0,c.useState)(),[v=!1,y]=(0,c.useState)(),{label:k="",srcLang:w="",kind:_=p}=e,x=e.tmpFile?e.tmpFile.name:"";if(!(0,a.useSelect)(e=>e(s.store).getSettings().mediaUpload,[]))return null;return(0,d.jsx)(i.NavigableMenu,{children:(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor",children:[(0,d.jsx)("span",{className:"videopress-block-tracks-editor__single-track-editor-label",children:__("Edit track","jetpack")}),(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file",children:[(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label",children:[(0,d.jsxs)("span",{children:[__("File","jetpack"),":"]}),""!==x&&(0,d.jsx)("span",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-label-name",children:(0,d.jsx)("strong",{children:x})}),(0,d.jsx)(s.MediaUploadCheck,{children:(0,d.jsx)(i.FormFileUpload,{onChange:t=>{const n=t.target.files;!n.length>0||(e.tmpFile=n[0],r(e))},accept:Object.entries(h).join(),render:({openFileDialog:e})=>(0,d.jsx)(i.Button,{variant:"link",onClick:()=>{e()},children:""===x?__("Select track","jetpack"):__("Change track","jetpack",0)}),disabled:v})})]}),(0,d.jsx)("div",{className:"videopress-block-tracks-editor__single-track-editor-upload-file-help",children:(0,l.sprintf)(/* translators: %s: The allowed file types to be uploaded as a video text track." */ | |
| 42 | +__("Allowed formats: %s","jetpack"),Object.keys(h).join(", "))})]}),(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-label-language",children:[(0,d.jsx)(i.TextControl,{onChange:t=>r({...e,label:t}),label:__("Label","jetpack"),value:k,help:__("Title of track","jetpack"),disabled:v,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsx)(i.TextControl,{onChange:t=>r({...e,srcLang:t}),label:__("Source language","jetpack"),value:w,help:__("Language tag (en, fr, etc.)","jetpack"),disabled:v,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})]}),(0,d.jsx)(i.SelectControl,{className:"videopress-block-tracks-editor__single-track-editor-kind-select",options:m,value:_,label:/* translators: %s: The kind of video text track e.g: "Subtitles, Captions" */ | |
| 43 | +__("Kind","jetpack"),onChange:t=>{r({...e,kind:t})},disabled:v,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,d.jsxs)("div",{className:"videopress-block-tracks-editor__single-track-editor-buttons-container",children:[v?(0,d.jsx)(i.Spinner,{}):(0,d.jsx)(i.Button,{variant:"secondary",disabled:!e.tmpFile,onClick:()=>{f(null),""===k&&(e.label=__("English","jetpack")),""===w&&(e.srcLang="en"),void 0===e.kind&&(e.kind=p),u(e)?f(__("A track already exists for that language and kind.","jetpack")):(y(!0),b(e,t).then(()=>{r(e),f(null),n()}).catch(e=>{e.message&&f(e.message)}).finally(()=>{y(!1)}))},children:__("Save","jetpack")}),(0,d.jsx)(i.Button,{variant:"link",onClick:o,children:__("Close","jetpack")})]}),g&&(0,d.jsx)("div",{className:"videopress-block-tracks-editor__single-track-editor-error",children:/* translators: %s: An error message returned after a failed video track file upload." */ /* translators: %s: An error message returned after a failed video track file upload." */ | |
| 44 | +(0,l.sprintf)(__("Error: %s","jetpack"),g)})]})})}function k({tracks:e=[],onChange:t,guid:r}){const[n,o]=(0,c.useState)(null);return(0,d.jsx)(i.Dropdown,{contentClassName:"videopress-block-tracks-editor",renderToggle:({isOpen:e,onToggle:t})=>(0,d.jsx)(i.ToolbarButton,{label:__("Text tracks","jetpack"),showTooltip:!0,"aria-expanded":e,"aria-haspopup":"true",onClick:t,icon:g}),renderContent:()=>null!==n?(0,d.jsx)(y,{track:e[n],guid:r,onChange:r=>{const o=[...e];o[n]=r,t(o)},onClose:()=>o(null),onCancel:()=>{t(e.filter((e,t)=>t!==n)),o(null)},trackExists:t=>-1!==e.filter((e,t)=>t!==n).findIndex(e=>e.kind===t.kind&&e.srcLang===t.srcLang),__next40pxDefaultSize:!0}):(0,d.jsx)(d.Fragment,{children:(0,d.jsxs)(i.NavigableMenu,{children:[(0,d.jsx)(v,{tracks:e,onChange:t,guid:r}),(0,d.jsx)(i.MenuGroup,{className:"videopress-block-tracks-editor__add-tracks-container",label:__("Add tracks","jetpack"),children:(0,d.jsx)(i.MenuItem,{icon:u.A,onClick:()=>{(()=>{const r=e.length,n=[...e];n[r]||(n[r]={}),n[r]={...e[r]},t(n),o(r)})()},children:__("Upload track","jetpack")})})]})})})}},73475(e,t,r){"use strict";r.d(t,{d:()=>m});var n=r(35750),o=r(94715),s=r(56427),i=r(86087),a=r(27723),c=r(13109),l=r(13022),u=(r(58227),r(10790));const __=a.__,d=["image"],p=e=>{const{videoPosterImageUrl:t}=e;return(0,u.jsx)("div",{className:"resumable-upload__editor-thumb-placeholder",children:t?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("img",{src:t,alt:"Poster"}),(0,u.jsx)(c.A,{className:"uploading-editor__play-icon",icon:n.ud})]}):(0,u.jsx)("span",{children:"No Poster Selected"})})},h=e=>{const{onSelectPoster:t,onRemovePoster:r}=e;return(0,u.jsxs)(s.BaseControl,{className:(0,l.A)(e.className,"editor-video-poster-control"),children:[(0,u.jsx)(p,{...e}),(0,u.jsx)(o.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:t,allowedTypes:d,render:({open:e})=>(0,u.jsxs)("div",{className:"poster-selector__buttons",children:[(0,u.jsx)(s.Button,{onClick:r,variant:"link",isDestructive:!0,children:__("Remove Poster Image","jetpack")}),(0,u.jsx)(s.Button,{variant:"secondary",onClick:e,children:__("Select Poster Image","jetpack")})]})})]})},m=e=>{const{file:t,onSelectPoster:r,onRemovePoster:a,videoPosterImageData:l,title:p,onChangeTitle:m,onVideoFrameSelected:g}=e,[f,b]=(0,i.useState)(0),[v,y]=(0,i.useState)(!0),k=(0,i.useRef)(null),w=(0,i.useRef)(null),_=()=>{y(!1)};(0,i.useEffect)(()=>{null!==t&&k&&(k.current.src=URL.createObjectURL(t))},[t,k]);const x={};return l&&(x.display="none"),(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{className:"uploading-editor",children:[(0,u.jsx)("div",{className:"uploading-editor__summary"}),(0,u.jsxs)("div",{className:"uploading-editor__fields",children:[(0,u.jsx)(s.TextControl,{label:__("Video title","jetpack"),className:"uploading-editor__title",onChange:m,value:p,__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0}),(0,u.jsx)("div",{className:"uploading-editor__content",children:(0,u.jsxs)(s.BaseControl,{__nextHasNoMarginBottom:!0,children:[(0,u.jsx)(s.BaseControl.VisualLabel,{children:__("Video poster (optional)","jetpack")}),v?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:"uploading-editor__video-container",children:[(0,u.jsxs)("div",{className:"uploading-editor__video-poster-wrapper",children:[l&&(0,u.jsx)(h,{onSelectPoster:r,onRemovePoster:a,videoPosterImageUrl:l.url}),(0,u.jsx)("video",{ref:k,muted:!0,className:"uploading-editor__video",onDurationChange:e=>{const t=e.target.duration;b(t),k.current&&(k.current.currentTime=t/2)},onError:_,onLoadedMetadata:e=>{e.target.videoHeight||_()},style:x})]}),!l&&(0,u.jsx)(c.A,{className:"uploading-editor__play-icon",icon:n.ud})]}),(0,u.jsx)("span",{style:x,children:(0,u.jsx)(s.RangeControl,{className:"uploading-editor__range",min:"0",step:"0.1",max:f,showTooltip:!1,withInputField:!1,onChange:e=>{g(1e3*e),k.current&&(k.current.currentTime=e)},__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0})}),(0,u.jsx)("span",{className:"uploading-editor__scrubber-help",style:x,children:(0,i.createInterpolateElement)(__("This is how the video will look. Use the slider to choose a poster or <a>select a custom one</a>.","jetpack"),{a:(0,u.jsx)(o.MediaUpload,{title:__("Select Poster Image","jetpack"),onSelect:r,allowedTypes:d,render:({open:e})=>(0,u.jsx)("a",{className:"uploading-editor__upload-link",onClick:e,onKeyDown:e,ref:w,role:"button",tabIndex:0,children:__("select a custom one","jetpack")})})})})]}):(0,u.jsx)(h,{onSelectPoster:r,videoPosterImageUrl:l?l.url:null})]})})]})]})})}},17900(e,t,r){"use strict";r.d(t,{e:()=>o});var n=r(93832);const o=(e,{autoplay:t,controls:r,loop:o,muted:s,playsinline:i,poster:a,preload:c,seekbarColor:l,seekbarPlayedColor:u,seekbarLoadingColor:d,useAverageColor:p})=>{if(!e)return null;const h={resizeToParent:!0,cover:!0,...t&&{autoPlay:!0},...!r&&{controls:!1},...o&&{loop:!0},...s&&{muted:!0,persistVolume:!1},...i&&{playsinline:!0},...a&&{posterUrl:a},...""!==c&&{preloadContent:c},...""!==l&&{sbc:l},...""!==u&&{sbpc:u},...""!==d&&{sblc:d},...p&&{useAverageColor:!0}};return(0,n.addQueryArgs)(`https://videopress.com/v/${e}`,h)}},47960(e,t,r){"use strict";r.d(t,{QW:()=>c,T3:()=>a,Zz:()=>i,x1:()=>l});r(74997);var n=r(13022),o=r(74628);const s=e=>{const t=o.C1.reduce((e,{className:t})=>(e[t]=!1,e),{"wp-has-aspect-ratio":!1});return(0,n.A)(e,t)};function i(e,t="",r=!0){if(!r)return s(t);const i=document.implementation.createHTMLDocument("");i.body.innerHTML=e;const a=i.body.querySelector("iframe");if(a&&a.height&&a.width){const e=(a.width/a.height).toFixed(2);for(let r=0;r<o.C1.length;r++){const i=o.C1[r];if(e>=i.ratio)return(0,n.A)(s(t),i.className,"wp-has-aspect-ratio")}}return t}const a=e=>e.replace(/\.[^/.]+$/,""),c=e=>{if(!e||"string"!=typeof e)return null;const t=e.match(/^https?:\/\/(?<host>video(?:\.word|s\.files\.word)?press\.com)(?:\/v|\/embed)?\/(?<guid>[a-zA-Z\d]{8})/);return t?.groups?.guid?t.groups.guid:null},l=e=>{const{guid:t,videoPressTracks:r,isVideoPressExample:n}=e;if(!t?.length)return!1;if(!Array.isArray(r))return!1;return!(!Object.keys(e).includes("isVideoPressExample")||"boolean"!=typeof n)}},51801(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r(85985),o=r(94715),s=r(74997),i=r(56427),a=r(47143),c=r(43656),l=r(27723),u=r(47960),d=r(89732),p=r(10790);const __=l.__,h={instances:[]},m=(e=[],t=!1,r=0)=>{if(t&&(h.instances=[]),e.forEach(e=>{if(e.innerBlocks.length)return void m(e.innerBlocks,!1,r+1);const{clientId:t,name:n,attributes:o}=e;"core/video"===n&&(0,u.x1)(o)&&h.instances.push({clientId:t,name:n,attributes:o})}),0===r)return h.instances};function g({clientId:e,attributes:t}){const r=(0,a.useSelect)(e=>e(c.store).getCurrentPostId()),{getBlocks:l}=(0,a.useSelect)(o.store),{replaceBlock:h}=(0,a.useDispatch)(o.store),{tracks:g}=(0,n.st)();return(0,p.jsxs)("div",{className:d.A.wrapper,children:[(0,p.jsx)(i.Notice,{status:"info",isDismissible:!1,className:d.A["conversion-notice"],children:__("You can transform this post's video blocks to the new VideoPress block to take advantage of new features, such as adding chapters directly in the description or hiding the video's share menu.","jetpack")}),(0,p.jsx)(i.Button,{variant:"primary",onClick:()=>{const n=m(l(),!0);n?.length&&(n.find(t=>t.clientId===e)||n.push({clientId:e,name:"core/video",currentBlockAttributes:t}),n.forEach(e=>{const{clientId:t,name:n,attributes:o}=e;"core/video"===n&&(0,u.x1)(o)&&(h(t,(0,s.createBlock)("videopress/video",o)),g.recordEvent("jetpack_editor_videopress_block_manual_conversion_click",{post_id:r}))}))},children:__("Transform blocks to VideoPress","jetpack")})]})}},50685(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(94715),o=r(29491),s=r(47960),i=r(51801),a=r(10790);const c=(0,o.createHigherOrderComponent)(e=>t=>(0,s.x1)(t.attributes)?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.InspectorControls,{children:(0,a.jsx)(i.A,{clientId:t.clientId,attributes:t.attributes})}),(0,a.jsx)(e,{...t})]}):(0,a.jsx)(e,{...t}))},51983(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(85985),o=r(50685);function s(e,t){if("core/video"!==t)return e;const{available:r}=(0,n.FB)("videopress/video");return r?{...e,edit:(0,o.A)(e.edit)}:e}},48022(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(56427),o=r(27723),s=r(72398),i=r(84605),a=(r(60333),r(10790));const __=o.__,c="videopress/video-chapters",l=!!window?.Jetpack_Editor_Initial_State?.available_blocks[c];function u({isRequestingVideoItem:e}){const{attributes:t,setAttributes:r}=(0,i.A)();if(!l)return null;const{title:o,description:u}=t,d=(0,s.m)(c),p=u?.length?u.split("\n").map(e=>Math.ceil(e.length/31)||1).reduce((e,t)=>e+t,0):4,h=Math.min(12,Math.max(p,4));return(0,a.jsxs)(n.PanelBody,{title:__("Details","jetpack"),className:d?"is-beta":"",children:[(0,a.jsx)(n.TextControl,{label:__("Title","jetpack"),value:o,placeholder:__("Video title","jetpack"),onChange:e=>{r({title:e})},disabled:e,__next40pxDefaultSize:!0}),(0,a.jsx)(n.TextareaControl,{label:__("Description","jetpack"),value:u,placeholder:__("Video description","jetpack"),onChange:e=>{r({description:e})},disabled:e,rows:h})]})}},51072(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(94715),o=r(29491),s=r(86087),i=r(48022),a=r(52753),c=r(95501),l=r(7345),u=r(10790);const d=(0,o.createHigherOrderComponent)(e=>t=>{const{attributes:r,setAttributes:o}=t,[d,p]=(0,a.A)(r?.id),[h]=(0,c.n)(r);return(0,s.useEffect)(()=>{if(!d)return;const e={};d?.title&&(e.title=d.title),d?.description&&(e.description=d.description),Object.keys(e).length&&(o(e),h(e))},[d,o,h]),l.j&&"core/video"!==!t.name&&t.attributes?.guid?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n.InspectorControls,{children:(0,u.jsx)(i.A,{isRequestingVideoItem:p})}),(0,u.jsx)(e,{...t})]}):(0,u.jsx)(e,{...t})})},84605(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(47143);function s(){const{clientId:e,attributes:t}=(0,o.useSelect)(e=>{const t=e(n.store).getSelectedBlockClientId();return{clientId:t,attributes:t?e("core/block-editor").getBlockAttributes(t):void 0}}),{updateBlockAttributes:r}=(0,o.useDispatch)(n.store);return{clientId:e,attributes:t,setAttributes:t=>r(e,t)}}},95501(e,t,r){"use strict";r.d(t,{n:()=>g});var n=r(1455),o=r.n(n),s=r(29491),i=r(3582),a=r(47143),c=r(43656),l=r(86087),u=r(27723),d=r(9821),p=r(17900),h=r(17204),m=r(97393);const __=u.__;function g(e){const{id:t,title:r,description:n,guid:u}=e,g=(0,a.useSelect)(e=>e(c.store).isSavingPost(),[]),f=(0,s.usePrevious)(g),b=(0,a.useDispatch)(i.store).invalidateResolution,[v,y]=(0,l.useState)(),k=(0,l.useCallback)(e=>{y(t=>({...t,...e}))},[]);(0,l.useEffect)(()=>{y({title:r,description:n})},[]);const w=function(e){return t=>new Promise((r,n)=>{o()({path:"/wpcom/v2/videopress/meta",method:"POST",data:{id:e,...t}}).then(e=>{if(200!==e?.data)return n(e);r(e)}).catch(n)})}(t);return(0,l.useEffect)(()=>{if(!g||f)return;if(!t)return;const o={};if(v?.title!==r&&(o.title=r),v?.description!==n&&(o.description=n),!Object.keys(o).length)return;if(w(o).then(()=>k({title:r,description:n})),!o?.description?.length)return;const s=(0,h.Ay)(o.description);if(!s?.length)return;const i={label:__("English","jetpack"),srcLang:"en",kind:"chapters",tmpFile:(0,m.Ay)(o.description)};(0,d.n)(i,u).then(()=>{const t=(0,p.e)(u,e);b("getEmbedPreview",[t])})},[g,f,r,v?.title,v?.description,n,w,k,e,b,t,u]),[k]}},52753(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(1455),o=r.n(n),s=r(86087);function i(e){const[t,r]=(0,s.useState)({}),[n,i]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{e&&(i(!0),async function(){try{const t=await o()({path:`/wp/v2/media/${e}`});r(t?.jetpack_videopress||{}),i(!1)}catch(e){throw i(!1),new Error(e,{cause:e})}}())},[e]),[t,n]}},7345(e,t,r){"use strict";r.d(t,{A:()=>s,j:()=>o});var n=r(51072);const o=!!window?.Jetpack_Editor_Initial_State?.available_blocks["videopress/video-chapters"];function s(e,t){if(!o)return e;if("core/video"!==t)return e;const r={...e.attributes,title:{type:"string"},description:{type:"string"}};return{...e,attributes:r,edit:(0,n.A)(e.edit)}}},17204(e,t,r){"use strict";function n(e){return e.split("\n").map(e=>function(e){const t=/(?<timeBlock>\(?(?<time>\d{1,2}:\d{2}:\d{2}|\d{1,2}:\d{2})\)?)/.exec(e);if(null==t||null==t.groups)return null;const{groups:{timeBlock:r,time:n}}=t,o=e.indexOf(r),s=(o<(e.length-r.length)/2?e.substring(o+r.length,e.length):e.substring(0,o)).trim().replace(/(\s-$)|(^-\s)/,""),i=n.split(":");return 1===i[0].length&&(i[0]=`0${i[0]}`),2===i.length&&i.unshift("00"),{startAt:i.join(":"),title:s}}(e)).filter(e=>null!==e).sort((e,t)=>e.startAt.localeCompare(t.startAt))}r.d(t,{$k:()=>n,Ay:()=>n})},97393(e,t,r){"use strict";r.d(t,{Ay:()=>s});var n=r(17204);function o(e){const t=Math.floor(e/36e5);let r=e-36e5*t;const n=Math.floor(r/6e4);r-=6e4*n;return[t,n,Math.floor(r/1e3)].map(e=>e<10?`0${e}`:e).join(":")}function s(e,t){const r=function(e,t=359999e3){const r=(0,n.$k)(e);if(0===r.length)return null;let s="WEBVTT\n",i=1;for(const[e,n]of r.entries()){const a=0===e?"000":"001",c=e<r.length-1?r[e+1].startAt:o(t);s+=`\n${i++}\n${n.startAt}.${a} --\x3e ${c}.000\n${n.title}\n`}return s}(e,t);return r?new File([r],"chapters.vtt",{type:"text/vtt"}):null}},84854(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(96865),o=r(56427),s=r(27723),i=r(10790);const __=s.__;function a({state:e,onUpload:t,onCancel:r,onRecord:s,onPause:a,onResume:c,onDone:l}){return(0,i.jsxs)("div",{className:"jetpack-ai-voice-to-content__action-buttons",children:[["inactive","error","validating"].includes(e)&&(0,i.jsx)(o.Button,{className:"jetpack-ai-voice-to-content__button",icon:n.Vo,variant:"secondary",onClick:s,children:__("Begin recording","jetpack")}),["recording"].includes(e)&&(0,i.jsx)(o.Button,{className:"jetpack-ai-voice-to-content__button",icon:n.ni,variant:"secondary",onClick:a,children:__("Pause recording","jetpack")}),["paused"].includes(e)&&(0,i.jsx)(o.Button,{className:"jetpack-ai-voice-to-content__button",icon:n.Vo,variant:"secondary",onClick:c,children:__("Resume recording","jetpack")}),["inactive","error","validating"].includes(e)&&(0,i.jsx)(o.FormFileUpload,{accept:".mp3,.mpeg,.mpga,.ogg,.flac,.m4a,.mp4,.wav,.wave,.webm",onChange:t,className:"jetpack-ai-voice-to-content__button is-secondary",children:__("Upload audio","jetpack")}),["recording","paused"].includes(e)&&(0,i.jsx)(o.Button,{className:"jetpack-ai-voice-to-content__button",variant:"primary",onClick:l,children:__("Done","jetpack")}),["recording","paused","processing"].includes(e)&&(0,i.jsx)(o.Button,{className:"jetpack-ai-voice-to-content__button",variant:"secondary",onClick:r,children:__("Cancel","jetpack")})]})}},41004(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(96865),o=r(27723),s=r(73723),i=r(10790);const __=o.__;function a({state:e,error:t=null,analyser:r,duration:o=0}){return"inactive"===e?(0,i.jsx)("div",{className:"jetpack-ai-voice-to-content__information",children:__("File size limit: 25MB. Recording time limit: 25 minutes.","jetpack")}):"recording"===e?(0,i.jsxs)("div",{className:"jetpack-ai-voice-to-content__audio",children:[(0,i.jsx)(n.z3,{className:"jetpack-ai-voice-to-content__audio--duration",duration:o}),(0,i.jsx)(s.A,{analyser:r,paused:!1}),(0,i.jsx)("span",{className:"jetpack-ai-voice-to-content__information",children:__("Recording…","jetpack")})]}):"paused"===e?(0,i.jsxs)("div",{className:"jetpack-ai-voice-to-content__audio",children:[(0,i.jsx)(n.z3,{className:"jetpack-ai-voice-to-content__audio--duration",duration:o}),(0,i.jsx)(s.A,{analyser:r,paused:!0}),(0,i.jsx)("span",{className:"jetpack-ai-voice-to-content__information",children:__("Paused","jetpack")})]}):"processing"===e?(0,i.jsx)("div",{className:"jetpack-ai-voice-to-content__information",children:__("Uploading and transcribing audio…","jetpack")}):"validating"===e?(0,i.jsx)("div",{className:"jetpack-ai-voice-to-content__information",children:__("Validating audio…","jetpack")}):"error"===e?(0,i.jsx)("div",{className:"jetpack-ai-voice-to-content__information--error",children:t}):null}},73723(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(86087),o=r(10790);function s({analyser:e,paused:t=!1}){const r=(0,n.useRef)(null),s=(0,n.useRef)(t),i=(0,n.useRef)(null);return(0,n.useEffect)(()=>{s.current=t},[t]),(0,n.useEffect)(()=>{e&&r.current&&(i.current&&i.current(),i.current=function(e,t,r){const n=t.getContext("2d");let o=!1;if(!n)return;e.fftSize=Math.pow(2,13);const s=e.fftSize,i=new Float32Array(s),a=s/10,{width:c,height:l}=t,u=l/2;n.lineWidth=4,n.lineCap="round",n.strokeStyle=getComputedStyle(t).getPropertyValue("--jp-green-50")||"#008710";const d=()=>{n.clearRect(0,0,c,l),e.getFloatTimeDomainData(i);for(let e=1;e<=10;e++){let t=0;r.current||(t=i.slice(e*a,(e+1)*a).reduce((e,t)=>e+t,0)/a,t*=2048,t=Math.abs(t),t=Math.min(16,Math.max(0,t))),n.beginPath(),n.moveTo(2+6*e,u-t),n.lineTo(2+6*e,u+t),n.stroke()}setTimeout(()=>{o||requestAnimationFrame(d)},50)};return d(),()=>{o=!0}}(e,r.current,s))},[e,r,s]),(0,n.useEffect)(()=>()=>{i.current&&i.current()},[]),(0,o.jsx)("canvas",{className:"jetpack-ai-voice-to-content__oscilloscope",width:70,height:38,ref:r})}},42279(e,t,r){"use strict";r.d(t,{A:()=>b});var n=r(96865),o=r(50723),s=r(85985),i=r(94715),a=r(56427),c=r(47143),l=r(86087),u=r(27723),d=r(1866),p=r(84854),h=r(41004),m=r(59926),g=r(22228),f=r(10790);const __=u.__;function b({clientId:e}){const[t,r]=(0,l.useState)(null),{removeBlock:u}=(0,c.useDispatch)(i.store),{getBlocks:b}=(0,c.useSelect)(i.store,[]),v=(0,l.useCallback)(()=>{setTimeout(()=>{u(e)},100)},[u,e]),{tracks:y}=(0,s.st)(),{isValidatingAudio:k,validateAudio:w}=(0,n.rr)(),{upsertTranscription:_}=(0,g.A)(),{isCreatingTranscription:x,createTranscription:j,cancelTranscription:C}=(0,m.A)({onReady:e=>{_(e);const t=b();for(let e=0;e<2;e++)"core/paragraph"===t[e].name&&""===t[e].attributes?.content&&u(String(t[e].clientId));A()},onUpdate:e=>{_(e)},onError:e=>{N(e)}}),A=()=>{C(),v()},{state:S,controls:E,error:T,onError:N,duration:P,analyser:B}=(0,n.be)({onDone:e=>{R(e)}}),R=(0,l.useCallback)(e=>{e&&r(e)},[r]);(0,l.useEffect)(()=>{t&&w(t,e=>{y.recordEvent("jetpack_ai_voice_to_content_transcription_started",{post_processing_action:n.uH,type:e.isFile?"upload":"record",audio_duration:e.duration,audio_file_size:e.size}),j(t,n.uH)},N)},[t,y,w,j,N]);const{start:I,pause:D,resume:L,stop:F,reset:M}=E,O=(0,l.useCallback)(e=>{if(e.currentTarget.files.length>0){const t=e.currentTarget.files[0];R(t)}},[R]),U=(0,l.useCallback)(()=>{C(),M()},[C,M]),z=(0,l.useCallback)(()=>{I(1e3)},[I]),$=(0,l.useCallback)(()=>{D()},[D]),q=(0,l.useCallback)(()=>{L()},[L]),H=(0,l.useCallback)(()=>{F()},[F]),V=((e,t,r)=>t?"validating":e?"processing":r)(x,k,S);return(0,f.jsx)(a.Modal,{onRequestClose:A,title:__("Jetpack AI Voice to content","jetpack"),className:"jetpack-ai-voice-to-content__modal",shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!1,children:(0,f.jsx)(o.Ay,{children:(0,f.jsxs)("div",{className:"jetpack-ai-voice-to-content__wrapper",children:[(0,f.jsxs)("div",{className:"jetpack-ai-voice-to-content__body",children:[(0,f.jsx)("span",{className:"jetpack-ai-voice-to-content__description",children:__("Transform your spoken words into a post ready to publish with AI.","jetpack")}),(0,f.jsx)("div",{className:"jetpack-ai-voice-to-content__contextual-row",children:(0,f.jsx)(h.A,{state:V,error:T,duration:P,analyser:B})}),(0,f.jsx)(p.A,{state:V,onUpload:O,onCancel:U,onRecord:z,onPause:$,onResume:q,onDone:H})]}),(0,f.jsx)("div",{className:"jetpack-ai-voice-to-content__footer",children:(0,f.jsxs)(a.Button,{variant:"link",className:"jetpack-ai-voice-to-content__feedback-button",href:"https://a8c.slack.com/archives/C054LN8RNVA",target:"_blank",children:[(0,f.jsx)("span",{children:__("Provide feedback","jetpack")}),(0,f.jsx)(a.Icon,{icon:d.A,className:"icon"})]})})]})})})}},72718(e,t,r){"use strict";var n=r(94375),o=r(15210),s=r(42279);r(94533);(0,n.M)(o,{edit:s.A,save:()=>null})},59926(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(96865),o=r(86087),s=r(10067);const i=r.n(s)()("voice-to-content:use-transcription-creator"),a="voice-to-content";function c({onReady:e,onUpdate:t,onError:r}){const s=(0,o.useRef)(null),c=(0,o.useRef)(null),{processTranscription:l,cancelTranscriptionProcessing:u,isProcessingTranscription:d}=(0,n.xA)({feature:a,onReady:e,onUpdate:t,onError:t=>{if(s.current)return e(s.current);i("Transcription post-processing error: ",t)}}),p=(0,o.useCallback)(e=>{s.current=e,c.current&&l(c.current,e)},[l]),{transcribeAudio:h,cancelTranscription:m,isTranscribingAudio:g}=(0,n.E0)({feature:a,onReady:p,onError:r});return{isCreatingTranscription:g||d,createTranscription:(0,o.useCallback)((e,t)=>{if(e&&t)return c.current=t,h(e)},[h]),cancelTranscription:(0,o.useCallback)(()=>{m(),u()},[m,u])}}},22228(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(96865),o=r(74997),s=r(47143),i=r(86087),a=r(10067);const c=r.n(a)()("voice-to-content:use-transcription-inserter");function l(){const{updateBlockAttributes:e,insertBlocks:t,replaceInnerBlocks:r}=(0,s.useDispatch)("core/block-editor"),a=(0,i.useRef)([]);return{upsertTranscription:(0,i.useCallback)(s=>{c("Upserting transcription");const i=(0,n._E)({content:s||""}),l=(0,o.rawHandler)({HTML:i});for(let n=0;n<l.length;n++)if(n<a.current.length){const t=a.current[n].clientId,o=a.current[n].attributes?.content;l[n].attributes?.content&&o!==l[n].attributes?.content&&e(t,{content:l[n].attributes.content}),l[n].innerBlocks.length>0&&r(t,l[n].innerBlocks)}else t([l[n]],void 0,void 0,!0,null),a.current.push(l[n])},[a,t,e,r])}}},6751(e,t,r){"use strict";r.d(t,{e:()=>p});var n=r(85985),o=r(56427),s=r(27723),i=r(21220),a=r(57273),c=r(72326),l=r(16344),u=r(10790);const __=s.__,d=(0,n.sh)(l),p=({changeStatus:e,isLoading:t,isModuleActive:r})=>{const n=__("Activate WordAds","jetpack",0),s=__("Activating WordAds","jetpack");return(0,u.jsx)(o.Placeholder,{icon:d,instructions:__("You'll need to activate the WordAds feature to use this block.","jetpack"),label:l.title,children:(0,u.jsxs)(i.B,{gap:"lg",direction:"column",align:"start",children:[(0,u.jsx)(c.$,{disabled:r||t,loading:t,loadingAnnouncement:s,onClick:()=>e(!0),variant:"outline",children:t?s:n}),(0,u.jsx)(a.N,{openInNewTab:!0,href:"https://jetpack.com/support/ads/",children:__("Learn more about the WordAds feature.","jetpack")})]})})}},94243(e,t,r){"use strict";r.d(t,{B:()=>i});var n=r(11876),o=r(56427),s=r(10790);const i=()=>(0,s.jsx)(o.Placeholder,{children:(0,s.jsxs)(o.Flex,{gap:2,direction:"column",style:{width:"100%"},children:[(0,s.jsxs)(o.Flex,{gap:4,children:[(0,s.jsx)(o.FlexItem,{children:(0,s.jsx)(n.A,{width:30,height:30})}),(0,s.jsx)(o.FlexBlock,{children:(0,s.jsx)(n.A,{width:"90%",height:30})})]}),(0,s.jsx)(o.Flex,{style:{marginTop:12},children:(0,s.jsx)(o.FlexBlock,{children:(0,s.jsx)(n.A,{height:30,width:"60%"})})}),(0,s.jsx)(o.Flex,{style:{marginTop:12},children:(0,s.jsx)(o.FlexBlock,{children:(0,s.jsx)(n.A,{width:150,height:50})})}),(0,s.jsx)(o.Flex,{style:{marginTop:18},children:(0,s.jsx)(o.FlexBlock,{children:(0,s.jsx)(n.A,{width:"90%",height:16})})})]})})},69462(e,t,r){"use strict";r.d(t,{H:()=>i});var n=r(56427),o=r(27723),s=r(10790);const __=o.__,i=[{height:250,icon:(0,s.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,s.jsx)(n.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,s.jsx)(n.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-7-2h2V7h-4v2h2z"})]}),name:__("Rectangle 300x250","jetpack"),tag:"mrec",width:300,editorPadding:30},{height:90,icon:(0,s.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,s.jsx)(n.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,s.jsx)(n.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V9c0-1.11-.9-2-2-2H9v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"})]}),name:__("Leaderboard 728x90","jetpack"),tag:"leaderboard",width:728,editorPadding:60},{height:50,icon:(0,s.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,s.jsx)(n.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,s.jsx)(n.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-4-4v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V9c0-1.11-.9-2-2-2H9v2h4v2h-2v2h2v2H9v2h4c1.1 0 2-.89 2-2z"})]}),name:__("Mobile Leaderboard 320x50","jetpack"),tag:"mobile_leaderboard",width:320,editorPadding:100},{height:600,icon:(0,s.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[(0,s.jsx)(n.Path,{fill:"none",d:"M.04 0h24v24h-24V0z"}),(0,s.jsx)(n.Path,{d:"M19.04 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-14V5h14v14zm-6-2h2V7h-2v4h-2V7h-2v6h4z"})]}),name:__("Wide Skyscraper 160x600","jetpack"),tag:"wideskyscraper",width:160,editorPadding:30}]},63283(e,t,r){"use strict";r.d(t,{A:()=>l});var n=r(94715),o=r(56427),s=r(27723),i=r(69353),a=r(10790);const __=s.__,c=({value:e,onChange:t})=>(0,a.jsx)(o.PanelBody,{title:__("Visibility","jetpack"),children:(0,a.jsx)(o.ToggleControl,{__nextHasNoMarginBottom:!0,className:"jetpack-wordads__mobile-visibility",checked:!!e,label:__("Hide on mobile","jetpack"),help:__("Hides this block for site visitors on mobile devices.","jetpack"),onChange:t})}),l=({attributes:{format:e,hideMobile:t},setAttributes:r})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.BlockControls,{children:(0,a.jsx)(i.A,{value:e,onChange:e=>r({format:e})})}),(0,a.jsx)(n.InspectorControls,{children:(0,a.jsx)(c,{value:t,onChange:e=>r({hideMobile:!!e})})})]})},29397(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r(50723),o=r(85985),s=r(94715),i=r(6751),a=r(94243),c=r(69462),l=r(63283),u=r(60651),d=r(26408),p=r(68364),h=r(90244),m=(r(42265),r(10790));const g=({attributes:e,setAttributes:t})=>{const r=(0,s.useBlockProps)(),{format:g}=e,{isLoadingModules:f,isChangingStatus:b,isModuleActive:v,changeStatus:y}=(0,o.q7)("wordads"),k=c.H.find(({tag:e})=>e===g),w=e=>{switch(e){case"leaderboard":return h;case"mobile_leaderboard":return p;case"wideskyscraper":return u;default:return d}};let _;return _=v?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(l.A,{attributes:e,setAttributes:t}),(0,m.jsx)("div",{className:`wp-block-jetpack-wordads jetpack-wordads-${g}`,children:(0,m.jsx)("div",{className:"jetpack-wordads__ad",style:{width:k.width,height:k.height,backgroundImage:`url( ${w(g)} )`,backgroundSize:"cover"}})})]}):f?(0,m.jsx)(n.Ay,{children:(0,m.jsx)(a.B,{})}):(0,m.jsx)(i.e,{changeStatus:y,isModuleActive:v,isLoading:b}),(0,m.jsx)("div",{...r,children:_})}},99398(e,t,r){"use strict";var n=r(94375),o=r(16344),s=r(29397);(0,n.M)(o,{edit:s.A,save:()=>null})},69353(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(56427),o=r(27723),s=r(69462),i=r(10790);const a=(0,o.__)("Pick an ad format","jetpack");function c({value:e,onChange:t}){return(0,i.jsx)(n.Dropdown,{placement:"bottom-start",renderToggle:({onToggle:e,isOpen:t})=>(0,i.jsx)(n.ToolbarGroup,{controls:[{icon:(0,i.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,i.jsx)(n.Path,{fill:"none",d:"M0 0h24v24H0V0z"}),(0,i.jsx)(n.Path,{d:"M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"})]}),title:a,onClick:e,extraProps:{"aria-expanded":t},className:"wp-block-jetpack-wordads__format-picker-icon"}]}),renderContent:({onClose:r})=>(0,i.jsx)(n.NavigableMenu,{className:"wp-block-jetpack-wordads__format-picker",children:s.H.map(({tag:o,name:s,icon:a})=>(0,i.jsx)(n.MenuItem,{className:o===e?"is-active":void 0,icon:a,isSelected:o===e,onClick:()=>{t(o),r()},role:"menuitemcheckbox",children:s},o))})})}},63326(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r(85985),o=r(94715),s=r(74997),i=r(56427),a=r(86087),c=r(27723),l=r(33196),u=r(57273),d=r(79493),p=r(1785),h=r(10790);const __=c.__,_x=c._x,m=(0,n.sh)(d);const g=(0,i.withNotices)(function(e){const{attributes:{url:t},isSelected:r,name:n,noticeOperations:c,noticeUI:d,setAttributes:g}=e,f=(0,o.useBlockProps)(),b=(0,s.getBlockDefaultClassName)(n),[v,y]=(0,a.useState)(t||""),[k,w]=(0,a.useState)(!t),[_,x]=(0,a.useState)(!1);(0,a.useEffect)(()=>{y(t||"")},[t]),(0,a.useEffect)(()=>{!r&&_&&x(!1)},[_,r]);const j=t?(0,p.$f)(t):void 0,C=t&&!k?(0,h.jsx)(o.BlockControls,{children:(0,h.jsx)(i.ToolbarGroup,{children:(0,h.jsx)(i.ToolbarButton,{icon:l.A,label:__("Edit URL","jetpack"),onClick:()=>w(!0)})})}):null,A=(0,h.jsxs)(i.Placeholder,{label:__("Zoom Scheduler","jetpack"),instructions:__("Paste your Zoom Scheduler booking page URL below.","jetpack"),icon:m,notices:d,children:[(0,h.jsxs)("form",{onSubmit:e=>{e&&e.preventDefault();const t=(0,p.l2)(v);if(!t)return c.removeAllNotices(),void c.createErrorNotice(__("Your Zoom Scheduler booking page couldn't be embedded. Please double check your URL.","jetpack"));g({url:t}),w(!1),c.removeAllNotices()},className:`${b}-embed-form`,children:[(0,h.jsx)("input",{type:"text",value:v,className:"components-placeholder__input","aria-label":__("Zoom Scheduler URL","jetpack"),placeholder:"https://scheduler.zoom.us/your-name/discovery-call",onChange:e=>y(e.target.value)}),(0,h.jsx)(i.Button,{variant:"secondary",type:"submit",children:_x("Embed","button label","jetpack")})]}),(0,h.jsxs)("div",{className:`${b}-help`,children:[(0,h.jsx)(u.N,{openInNewTab:!0,href:"https://scheduler.zoom.us/sign-up?signUpFrom=wordpress.com",children:__("New to Zoom Scheduler? Get started","jetpack")}),(0,h.jsx)(u.N,{openInNewTab:!0,href:"https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0058092",children:__("Find your booking page URL","jetpack")})]})]}),S=j?(0,h.jsxs)("div",{className:`${b}-preview`,children:[(0,h.jsx)("div",{className:`${b}__embed`,children:(0,h.jsx)("iframe",{src:j,title:__("Zoom Scheduler","jetpack"),width:"100%",height:900,frameBorder:"0",sandbox:"allow-scripts allow-same-origin allow-popups allow-forms"})}),!_&&(0,h.jsx)("div",{className:"block-library-embed__interactive-overlay",onMouseUp:()=>{x(!0)}})]}):A;return(0,h.jsxs)("div",{...f,children:[C,k||!t?A:S]})})},46471(e,t,r){"use strict";var n=r(74997),o=r(94375),s=r(79493),i=r(63326),a=r(11277),c=r(1785);r(7504);(0,o.M)(s,{edit:i.A,save:a.A,transforms:{from:[{type:"raw",isMatch:e=>"P"===e.nodeName&&!!(0,c.l2)(e.textContent.trim()),transform:e=>{const t=e.textContent.trim(),r=(0,c.l2)(t);return r?(0,n.createBlock)("jetpack/zoom-scheduler",{url:r}):(0,n.createBlock)("core/paragraph",{content:t})}}]}})},11277(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(94715),o=r(10790);const s=({attributes:{url:e}})=>{const t=n.useBlockProps.save();return(0,o.jsx)("a",{...t,href:e,children:e})};r.dn(s)},1785(e,t,r){"use strict";r.d(t,{$f:()=>c,l2:()=>a});const n=/^(?:(?:https?:)?\/\/)?scheduler\.zoom\.us\/.+/i,o=/<iframe/i,s=/^[a-z][a-z\d+.-]*:\/\//i,i=/^\/\//;function a(e){if(!e)return;const t=e.trim();if(o.test(t)||!n.test(t))return;const r=s.test(t)?t:`https://${t.replace(i,"")}`;try{const e=new URL(r);if("scheduler.zoom.us"!==e.hostname||"/"===e.pathname)return;return"https:"!==e.protocol&&(e.protocol="https:"),`${e.origin}${e.pathname}${e.search}`}catch{return}}function c(e){const t=a(e);if(!t)return;const r=new URL(t);return r.searchParams.set("embed","true"),r.toString()}},72398(e,t,r){"use strict";r.d(t,{m:()=>l});var n=r(1455),o=r.n(n),s=r(29491),i=r(52619),a=(r(87687),r(79366),r(42047),r(14435),r(59740),r(21929),r(80076),r(15946),r(34180),r(56414),r(51521),r(12088),r(16521),r(73391)),c=(r(24920),r(10790));function l(e){if(!a)return!1;const t=a.beta||[],r=e.replace(/jetpack\//,"");return t.includes(e)||t.includes(r)}o().use((e,t)=>{if("cors"===e.mode)return t(e);if(e.url)try{const r=new URL(e.url,location.href);if(r.protocol!==location.protocol||r.hostname!==location.hostname||r.port!==location.port)return t(e)}catch{return t(e)}return e.headers||(e.headers={}),e.headers["x-wp-api-fetch-from-editor"]="true",t(e)}),(0,i.addFilter)("blocks.registerBlockType","jetpack/label-beta-blocks-title",function(e,t){if(!l(t))return e;const{title:r,keywords:n}=e,o="(beta)",s="beta",i={...e};return r&&(i.title=r.toLowerCase().endsWith(o)?r:`${e.title} ${o}`),Array.isArray(n)&&(i.keywords=n.includes(s)?n:[...n,s]),i});const u=(0,s.createHigherOrderComponent)(e=>t=>{if(t?.clientRootId)return(0,c.jsx)(e,{...t});const{name:r}=t;return l(r)?(0,c.jsx)(e,{...t,className:"is-beta-extension"}):(0,c.jsx)(e,{...t})},"withBetaClassName");(0,i.addFilter)("editor.BlockListBlock","jetpack/label-beta-extensions",u)},24430(e,t,r){"use strict";var n=r(35750),o=r(74997),s=r(27723);const __=s.__,i={name:"descript",title:"Descript",icon:n.QB,keywords:[__("descript","jetpack")],description:__("Embed a Descript Item.","jetpack"),patterns:[/^https:\/\/share.descript.com\/(view|embed)\/\w+/i],attributes:{providerNameSlug:"descript",responsive:!0}};(0,o.registerBlockVariation)("core/embed",i)},30710(e,t,r){"use strict";var n=r(35750),o=r(52619),s=r(27723);const __=s.__,_x=s._x,i={name:"facebook",title:__("Facebook Embed","jetpack"),icon:{src:n.ik},keywords:[_x("social","block search term","jetpack")],description:__("Embed a Facebook post.","jetpack"),patterns:[/^https?:\/\/www\.facebook.com\/.+/i],attributes:{providerNameSlug:"facebook",previewable:!1,responsive:!0}};(0,o.addFilter)("blocks.registerBlockType","reactivateFacebookEmbedBlockVariation",function(e,t){if("core/embed"!==t||!e.variations)return e;const r=e.variations.filter(e=>e.name!==i.name);return e.variations=[...r,i],e})},80076(e,t,r){"use strict";r(30710),r(65052),r(43887),r(60068),r(24430),r(24260)},65052(e,t,r){"use strict";var n=r(35750),o=r(52619),s=r(27723),i=r(21604);const __=s.__,_x=s._x,a={name:"instagram",title:__("Instagram Embed","jetpack"),icon:{src:n.oW},keywords:[_x("image","block search term","jetpack"),_x("social","block search term","jetpack")],description:__("Embed an Instagram post.","jetpack"),patterns:[/^https?:\/\/(www\.)?instagr(\.am|am\.com)\/.+/i],attributes:{providerNameSlug:"instagram",responsive:!0}};(0,o.addFilter)("blocks.registerBlockType","reactivateInstagramEmbedBlockVariation",function(e,t){if("core/embed"!==t||!e.variations||!(0,i.A)())return e;const r=e.variations.filter(e=>e.name!==a.name);return e.variations=[...r,a],e})},43887(e,t,r){"use strict";var n=r(35750),o=r(74997),s=r(27723);const __=s.__,i={name:"loom",title:"Loom",icon:n.T3,keywords:[__("video","jetpack")],description:__("Embed a Loom video.","jetpack"),patterns:[/^https?:\/\/(www\.)?loom\.com\/share\/.+/i],attributes:{providerNameSlug:"loom",responsive:!0}};(0,o.registerBlockVariation)("core/embed",i)},60068(e,t,r){"use strict";var n=r(35750),o=r(74997),s=r(27723);const __=s.__,i={name:"smartframe",title:"SmartFrame",icon:n.M4,keywords:[__("smartframe","jetpack")],description:__("Embed a SmartFrame Image.","jetpack"),patterns:[/^https?:\/\/(.*?).smartframe.(io|net)\/.*/i],attributes:{providerNameSlug:"smartframe",responsive:!0}};(0,o.registerBlockVariation)("core/embed",i)},24260(e,t,r){"use strict";var n=r(94715),o=r(74997),s=r(29491),i=r(47143),a=r(52619),c=r(27723),l=r(74628),u=r(17900),d=r(47960),p=r(10790);const __=c.__,h=(0,s.createHigherOrderComponent)(e=>t=>{const{name:r,attributes:s,isSelected:a}=t;if("core/embed"!==r)return(0,p.jsx)(e,{...t});if(!(s?.url?.match(/^https?:\/\/(?:video\.wordpress\.com\/[ve]\/|videopress\.com\/[ve]\/)[a-zA-Z\d]{8}/)||"videopress"===s?.providerNameSlug))return(0,p.jsx)(e,{...t});const{replaceBlock:c}=(0,i.dispatch)("core/block-editor");return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(e,{...t}),a&&(0,p.jsx)(n.InspectorControls,{children:(0,p.jsxs)("div",{className:"wp-block-videopress-video-transform",style:{padding:"16px"},children:[(0,p.jsx)("div",{className:"components-notice is-info",children:(0,p.jsx)("div",{className:"components-notice__content",children:__("You can transform this post's video blocks to the new VideoPress block to take advantage of new features.","jetpack")})}),(0,p.jsx)("div",{style:{marginTop:"8px"},children:(0,p.jsx)("button",{className:"components-button is-primary",onClick:()=>{const e=s.url,r=s.guid||(0,d.QW)(e),n=(0,o.createBlock)("videopress/video",{src:e,id:s.id||null,guid:r,title:s.title||"",caption:s.caption||"",isVideoPressExample:!1,autoplay:!1,controls:!0,muted:!1,playsinline:!0,preload:"metadata",useAverageColor:!0,poster:s.poster||"",loop:!1,videoPressTracks:[],className:s.className||"",align:s.align||"",rating:"",allowDownload:!1,privacySetting:l.NF.SITE_DEFAULT,url:(0,u.e)(r,{autoplay:!1,controls:!0,loop:!1,muted:!1,playsinline:!0,poster:s.poster||"",preload:"metadata",useAverageColor:!0})});c(t.clientId,n)},children:__("Transform to VideoPress block","jetpack")})})]})})]})},"withVideoPressSettings");(0,a.addFilter)("editor.BlockEdit","jetpack/videopress-embed-settings",h)},26760(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(96865),o=r(56427),s=r(86087),i=r(27723),a=r(10790);const __=i.__;function c({clickHandler:e,showButtonText:t=!1}){const r=(0,s.useCallback)(()=>{e?.()},[e]),i=t?__("Generate","jetpack"):"";return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(o.ToolbarButton,{showTooltip:!0,onClick:r,label:__("Generate with AI","jetpack"),icon:n.cj,children:i})})}},24255(e,t,r){"use strict";r.d(t,{Mb:()=>o,TC:()=>s,tF:()=>n});const n="site-logo-block-extension",o="block-editor",s="ai-assistant-site-logo-support"},15946(e,t,r){"use strict";var n=r(96865),o=r(94715),s=r(74997),i=r(29491),a=r(47143),c=r(86087),l=r(52619),u=r(48499),d=r(26760),p=r(24255),h=r(10790);const m=(0,i.createHigherOrderComponent)(e=>t=>{const[r,s]=(0,c.useState)(!1),{setLogo:i}=(()=>{const e=(0,a.useDispatch)("core").editEntityRecord,t=(0,c.useCallback)(t=>{e("root","site",void 0,{site_logo:t})},[e]),r=(0,c.useCallback)(t=>{e("root","site",void 0,{site_icon:t})},[e]);return{setLogo:(0,c.useCallback)((e,n)=>{t(e),n&&r(e)},[t,r])}})(),l=t?.attributes?.shouldSyncIcon||!1,u=(0,c.useCallback)(()=>{s(!0)},[]),m=(0,c.useCallback)(()=>{s(!1)},[]),g=(0,c.useCallback)(e=>{e&&i(e,l)},[i,l]);(0,c.useEffect)(()=>()=>{m()},[m]);const f=(()=>{const e=(0,a.useSelect)(e=>e("core").getEntityRecord("root","site"),[]);return{ID:parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId),URL:e?.url,domain:window?.Jetpack_Editor_Initial_State?.siteFragment,name:e?.title,description:e?.description,siteLogo:e?.site_logo||0}})();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(e,{...t}),(0,h.jsx)(o.BlockControls,{group:"block",children:(0,h.jsx)(d.A,{showButtonText:!f?.siteLogo,clickHandler:u})}),(0,h.jsx)(n.Tg,{isOpen:r,onClose:m,onApplyLogo:g,context:p.Mb,placement:p.tF,siteDetails:f})]})},"SiteLogoEditWithAiComponents");function g(e){if("core/site-logo"!==e)return!1;if(!(0,s.getBlockType)("jetpack/ai-assistant"))return!1;if(!(0,u.C)(p.TC))return!1;return!((0,a.select)("core/edit-post")?.getHiddenBlockTypes?.()??[]).includes("jetpack/ai-assistant")}(0,l.addFilter)("blocks.registerBlockType","jetpack/site-logo-with-ai-support",function(e,t){return g(t)?{...e,edit:m(e.edit)}:e},100)},34180(e,t,r){"use strict";var n=r(74997),o=r(52619),s=r(94250);const i={from:[{type:"block",isMultiBlock:!1,blocks:["core/legacy-widget"],isMatch:({idBase:e,instance:t})=>!!t?.raw&&"jetpack_widget_social_icons"===e,transform:({instance:e})=>{let t=[];return e.raw.icons.forEach(e=>{const r=new URL(e.url.includes(":")?e.url:"https://"+e.url),o=r.hostname?r.hostname:r.protocol,i=s.A.find(e=>o.includes(e.url)||e.url.includes(o)),a=(0,n.createBlock)("core/social-link",{service:i?i.name:"chain",url:e.url});t=[...t,a]}),(0,n.createBlock)("core/social-links",{},t)}}]};(0,o.addFilter)("blocks.registerBlockType","addTransformToSocialLinksWidget",function(e,t){return"core/social-links"!==t||(e.transforms=i),e})},94250(e,t,r){"use strict";r.d(t,{A:()=>n});const n=[{name:"wordpress",url:["wordpress."]},{name:"fivehundredpx",url:["500px.com"]},{name:"amazon",url:["amazon."]},{name:"bandcamp",url:["bandcamp.com"]},{name:"behance",url:["behance.net"]},{name:"codepen",url:["codepen.io"]},{name:"deviantart",url:["deviantart.com"]},{name:"dribbble",url:["dribbble.com"]},{name:"dropbox",url:["dropbox.com"]},{name:"etsy",url:["etsy.com"]},{name:"facebook",url:["facebook.com"]},{name:"flickr",url:["flickr.com"]},{name:"foursquare",url:["foursquare.com"]},{name:"goodreads",url:["goodreads.com"]},{name:"google",url:["google."]},{name:"github",url:["github.com"]},{name:"instagram",url:["instagram.com"]},{name:"lastfm",url:["last.fm"]},{name:"linkedin",url:["linkedin.com"]},{name:"mail",url:["mailto:"]},{name:"linkedin",url:["linkedin.com"]},{name:"mastodon",url:["mastodon.social"]},{name:"meetup",url:["meetup.com"]},{name:"medium",url:["medium.com"]},{name:"patreon",url:["patreon.com"]},{name:"pinterest",url:["pinterest."]},{name:"reddit",url:["reddit.com"]},{name:"snapchat",url:["snapchat.com"]},{name:"soundcloud",url:["soundcloud.com"]},{name:"spotify",url:["spotify.com"]},{name:"telegram",url:["telegram.me","t.me"]},{name:"tiktok",url:["tiktok.com"]},{name:"tumblr",url:["tumblr.com"]},{name:"twitch",url:["twitch.tv"]},{name:"twitter",url:["twitter.com"]},{name:"vimeo",url:["vimeo.com"]},{name:"vk",url:["vk.com"]},{name:"yelp",url:["yelp.com"]},{name:"youtube",url:["youtube.com"]}]},56664(e,t,r){"use strict";r.d(t,{b:()=>i,j:()=>s});var n=r(86087),o=r(10790);const s=(0,n.createContext)(),i=({onBannerVisibilityChange:e,hasParentBanner:t,children:r})=>(0,o.jsx)(s.Provider,{value:{onBannerVisibilityChange:e,hasParentBanner:t},children:r})},56414(e,t,r){"use strict";var n=r(85985),o=r(98490),s=r.n(o),i=r(52619),a=r(27723),c=r(24534),l=r(44804),u=r(4643),d=r(3120);r(22734);const __=a.__,p=[];(0,i.addFilter)("blocks.registerBlockType","jetpack/paid-block",(e,t)=>((0,n.W4)(t)&&(p.includes(t)||p.push(t),e.keywords=[...new Set([...e.keywords,"premium",__("premium","jetpack")])],(0,n.sH)(t)||(e.icon=(0,u.A)(e.icon)),e.attributes.shouldDisplayFrontendBanner||(e.attributes.shouldDisplayFrontendBanner={type:"boolean",default:!0}),"core/cover"!==t&&(e.supports={...e.supports,__experimentalExposeControlsToChildren:!0})),e)),(0,i.addFilter)("blocks.registerBlockType","jetpack/paid-block-with-upgrade-banner",d.e),(0,i.addFilter)("editor.MediaPlaceholder","jetpack/paid-block-media-placeholder",c.A),(0,i.addFilter)("editor.MediaReplaceFlow","jetpack/paid-block-media-placeholder",l.A),s()(function(){(0,n.Dk)()&&document.body.classList.add("jetpack-enable-upgrade-nudge")})},24534(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(85985),o=r(94715),s=r(29491),i=r(86087),a=r(333),c=r(56664),l=r(10790);const u=(0,s.createHigherOrderComponent)(e=>t=>{const{name:r}=(0,o.useBlockEditContext)(),s=(0,n.GT)(r);if(!s?.mediaPlaceholder||!(0,n.W4)(r))return(0,l.jsx)(e,{...t});const{fileType:u}=s,{onError:d}=t,{onBannerVisibilityChange:p}=(0,i.useContext)(c.j),h=(0,i.useCallback)(e=>p(e?.length&&(0,a.wc)(e[0],u)),[u,p]),m=(0,i.useCallback)(e=>{const t=e?.[0]?.props?.children;return(0,a.wc)(t,u)?h([t]):d(e)},[h,u,d]);return(0,l.jsx)("div",{className:"paid-block-media-placeholder",children:(0,l.jsx)(e,{...t,onFilesPreUpload:h,onError:m})})},"withMediaPlaceholderUpgradable")},44804(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(85985),o=r(94715),s=r(29491),i=r(86087),a=r(333),c=r(56664),l=r(10790);const u=(0,s.createHigherOrderComponent)(e=>t=>{const{name:r}=(0,o.useBlockEditContext)(),s=(0,n.GT)(r),u=(0,i.useRef)(void 0);if(!s?.mediaReplaceFlow||!(0,n.W4)(r))return(0,l.jsx)(e,{...t});const{fileType:d}=s,{onBannerVisibilityChange:p}=(0,i.useContext)(c.j);return(0,l.jsx)(e,{...t,onFilesUpload:e=>{u.current=e?.length?e[0]:null,p(e?.length&&(0,a.wc)(e[0],d))},createNotice:(e,r,n)=>{if((0,a.wc)(u.current,d))return u.current=null,null;t.createNotice(e,r,n)}})},"withMediaReplaceFlowUpgradable")},51333(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=({cx:e=0,cy:t=0,r=4,fill:s="#e34c84",stroke:i="#ffffff",strokeWidth:a="2"})=>(0,o.jsx)(n.SVG,{className:"jetpack-paid-block-symbol",children:(0,o.jsx)(n.Circle,{cx:e,cy:t,r,fill:s,stroke:i,strokeWidth:a})});r.dn(s)},4643(e,t,r){"use strict";r.d(t,{A:()=>i});r(85985);var n=r(51333),o=r(10790);const s=e=>{const t=(0,o.jsx)(n.A,{},"paid-symbol");return e?.src?{...e,src:(0,o.jsxs)(o.Fragment,{children:[e.src,t]})}:(0,o.jsxs)(o.Fragment,{children:[e,t]})},i=s},26845(e,t,r){"use strict";r.d(t,{Ay:()=>d});var n=r(85985),o=r(82201),s=r(47143),i=r(27723),a=r(10790);const __=i.__,_x=i._x,c=__("Premium Block","jetpack"),/** translators: %s: name of the plan. */ | |
| 45 | +l=__("Upgrade to %s to use this premium block","jetpack"),u=(__("Upgrade your plan to use this premium block","jetpack"),_x("Upgrade","Call to action to buy a new plan","jetpack")),d=({onRedirect:e,align:t,className:r,title:d=c,description:p=null,buttonText:h=u,visible:m=!0,requiredPlan:g,context:f})=>{const[b,v,y]=(0,n._6)(g,e),k=(0,s.useSelect)(e=>{if(p)return p;const t=e("wordpress-com/plans"),r=t&&t.getPlan(g);return r?(0,i.sprintf)(l,r.product_name_short):null},[p,g]);return k&&(0,a.jsx)(o.cb,{align:t,buttonText:h,checkoutUrl:b,className:r,context:f,description:k,goToCheckoutPage:v,isRedirecting:y,title:d,visible:m})}},23887(e,t,r){"use strict";r.d(t,{W:()=>n,r:()=>o});const n=({plan:e,blockName:t,context:r,tracks:n})=>{n.recordEvent("jetpack_editor_block_upgrade_click",{plan:e,block:t,context:r})},o=({plan:e,blockName:t,context:r,tracks:n})=>{n.recordEvent("jetpack_editor_block_upgrade_banner_impression",{plan:e,block:t,context:r})}},3120(e,t,r){"use strict";r.d(t,{e:()=>h});var n=r(85985),o=r(94715),s=r(29491),i=r(47143),a=r(86087),c=r(56664),l=r(26845),u=r(23887),d=r(10790);const p=(0,s.createHigherOrderComponent)(e=>t=>{const{name:r,clientId:s,isSelected:p,attributes:h,setAttributes:m}=t||{},g=(0,n.tu)(r);if(!g)return(0,d.jsx)(e,{...t});const f=(0,n.sH)(r),b=(0,n.GT)(r),[v,y]=(0,a.useState)(!f),[k,w]=(0,a.useState)(!1),_="editor-canvas",x=(0,i.useSelect)(e=>e("core/block-editor").hasSelectedInnerBlock(s,!0),[s]),{hasParentBanner:j}=(0,a.useContext)(c.j)||{},C=(p||x)&&v&&!j,{tracks:A}=(0,n.st)(),S=(0,a.useMemo)(()=>({plan:g,blockName:r,context:_,tracks:A}),[g,r,A]);(0,a.useEffect)(()=>{C&&w(!0)},[C,w]),(0,a.useEffect)(()=>{!k&&C&&(0,u.r)(S)},[k,S,C]),(0,a.useEffect)(()=>y(!f),[h,y,f]),(0,a.useEffect)(()=>{m({shouldDisplayFrontendBanner:!j})},[m,j]);const E=(0,o.useBlockProps)();return(0,d.jsx)(c.b,{onBannerVisibilityChange:y,hasParentBanner:C,children:(0,d.jsxs)("div",{ref:E.ref,style:{maxWidth:"unset"},children:[(0,d.jsx)(l.Ay,{className:`is-${r.replace(/\//,"-")}-paid-block`,title:null,align:h?.align,visible:C,description:b?.description,requiredPlan:g,context:_,onRedirect:()=>(0,u.W)(S)}),(0,d.jsx)(e,{...t})]})})},"withUpgradeBanner");function h(e,t){return(0,n.tu)(t)?{...e,edit:p(e.edit)}:e}},4167(e,t,r){"use strict";r.d(t,{G:()=>o});var n=r(27723);const __=n.__,o=["seo-title","seo-meta-description","images-alt-text"];__("SEO title","jetpack"),__("SEO description","jetpack"),__("Image alt text","jetpack")},6363(e,t,r){"use strict";function n(e){return{type:"SET_BUSY",isBusy:e}}function o(e){return{type:"SET_TITLE_BUSY",isBusy:e}}function s(e){return{type:"SET_DESCRIPTION_BUSY",isBusy:e}}function i(e){return{type:"SET_IS_TOGGLING_AUTO_ENHANCE",isToggling:e}}function a(e){return{type:"SET_IS_AUTO_ENHANCE_ENABLED",isEnabled:e}}function c(e,t){return{type:"SET_IMAGE_BUSY",clientId:e,isBusy:t}}function l(e,t){return{type:"SET_IMAGE_FAILED",clientId:e,failed:t}}function u(e,t){return{type:"SET_FEATURE_ENABLED",feature:e,enabled:t}}r.r(t),r.d(t,{setBusy:()=>n,setDescriptionBusy:()=>s,setFeatureEnabled:()=>u,setImageBusy:()=>c,setImageFailed:()=>l,setIsAutoEnhanceEnabled:()=>a,setIsTogglingAutoEnhance:()=>i,setTitleBusy:()=>o})},16204(e,t,r){"use strict";r.d(t,{M:()=>d});var n=r(97999),o=r(85985),s=r(47143),i=r(4167),a=r(6363),c=r(49824),l=r(16886);let u=!1;try{if(!(0,n.isSimpleSite)()){const e=(0,s.select)(o.M_).getJetpackModules()["seo-tools"],t=e&&"ai_seo_enhancer_enabled"in e.options;u=t&&e.options?.ai_seo_enhancer_enabled?.current_value}}catch{u=!1}const d=(0,s.createReduxStore)("jetpack/seo-enhancer",{reducer:c.A,selectors:l,actions:a,initialState:function(){const e=i.G.reduce((e,t)=>(e[t]=!0,e),{});try{const t=localStorage.getItem("jetpack-seo-enhancer-features"),r=t?JSON.parse(t):{};for(const t of i.G)e[t]=r[t]??!0}catch{}return{isBusy:!1,isTogglingAutoEnhance:!1,isAutoEnhanceEnabled:u,busyImages:{},failedImages:{},features:e}}()});(0,s.register)(d)},49824(e,t,r){"use strict";r.d(t,{A:()=>n});const n=function(e,t){let r;switch(t.type){case"SET_BUSY":return{...e,isBusy:t.isBusy};case"SET_TITLE_BUSY":return{...e,isTitleBusy:t.isBusy};case"SET_DESCRIPTION_BUSY":return{...e,isDescriptionBusy:t.isBusy};case"SET_IS_TOGGLING_AUTO_ENHANCE":return{...e,isTogglingAutoEnhance:t.isToggling};case"SET_IS_AUTO_ENHANCE_ENABLED":return{...e,isAutoEnhanceEnabled:t.isEnabled};case"SET_IMAGE_BUSY":return{...e,busyImages:{...e.busyImages,[t.clientId]:t.isBusy}};case"SET_IMAGE_FAILED":return{...e,failedImages:{...e.failedImages,[t.clientId]:t.failed}};case"SET_FEATURE_ENABLED":return r={...e,features:{...e.features,[t.feature]:t.enabled}},n=r.features,localStorage.setItem("jetpack-seo-enhancer-features",JSON.stringify(n)),r;default:return e}var n}},16886(e,t,r){"use strict";r.r(t),r.d(t,{getEnabledFeatures:()=>p,hasImageFailed:()=>d,isAnyImageBusy:()=>u,isAutoEnhanceEnabled:()=>c,isBusy:()=>o,isDescriptionBusy:()=>i,isImageAltTextFeatureEnabled:()=>h,isImageBusy:()=>l,isTitleBusy:()=>s,isTogglingAutoEnhance:()=>a});var n=r(47143);function o(e){return e.isBusy}function s(e){return e.isTitleBusy}function i(e){return e.isDescriptionBusy}function a(e){return e.isTogglingAutoEnhance}function c(e){return e.isAutoEnhanceEnabled}function l(e,t){return e.busyImages[t]??!1}function u(e){return Object.values(e.busyImages).some(e=>e)}function d(e,t){return e.failedImages[t]??!1}const p=(0,n.createSelector)(e=>Object.keys(e.features).filter(t=>e.features[t]),e=>[e.features]);function h(e){return p(e).includes("images-alt-text")}},93471(e,t,r){"use strict";r.d(t,{A:()=>d});var n=r(11876),o=r(85985),s=r(56427),i=r(86087),a=r(27723),c=r(13022),l=(r(72613),r(10790));const __=a.__,u=({usage:e})=>{if(null==e)return null;const t=100-100*Math.max(Math.min(e,1),0),r={width:`${t}%`};return(0,l.jsx)("div",{className:"ai-assistant-usage-bar-wrapper",children:(0,l.jsx)("div",{className:(0,c.A)("ai-assistant-usage-bar-usage",{warning:t<60&&t>20,danger:t<=20}),style:r})})};const d=function({isOverLimit:e,planType:t,requestsCount:r,requestsLimit:c,nextResetDate:d=null,loading:p=!1}){const h=e||r>=c;let m=null;const g=Array(),f=Math.max(0,c-r);h&&t===o._X&&g.push(__("You've reached your free requests limit.","jetpack")),h&&t===o.ds&&g.push(__("You've reached your plan requests limit.","jetpack")),d&&t===o.ds&&(m=(0,i.createInterpolateElement)((0,a.sprintf)( | |
| 46 | +// translators: %1$d: number of days until the next usage count reset, %2$s: date of next reset | |
| 47 | +__("Requests will reset to <strong>%1$d</strong> on %2$s.","jetpack"),c,d),{strong:(0,l.jsx)("strong",{})}));const b=r/c,v=(0,l.jsxs)(l.Fragment,{children:[t===o.Ti&&(0,l.jsx)("p",{children:__("Unlimited requests.","jetpack")}),(t===o._X||t===o.ds)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"jetpack-ai-usage-panel__available-requests",children:f}),(0,l.jsx)(u,{usage:b})]})]}),y=(0,l.jsx)(n.A,{height:100,className:"jetpack-ai-usage-panel__loading-placeholder"}),k=(0,l.jsxs)(l.Fragment,{children:[!p&&g.length?g.join(" ").concat(" "):null,!p&&m]});return(0,l.jsxs)(s.BaseControl,{__nextHasNoMarginBottom:!0,help:k,children:[(0,l.jsx)(s.BaseControl.VisualLabel,{children:__("Available Requests","jetpack")}),!p&&v,p&&y]})}},27970(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r(96865),o=r(3924),s=r(97999),i=r(85985),a=r(56427),c=r(38443),l=r(86087),u=r(27723),d=r(75956),p=r(93471),h=(r(90698),r(10790));const __=u.__;function m({isOverLimit:e,requestsCount:t,requestsLimit:r,nextStart:n,planType:o,loading:s,canUpgrade:l,showContactUsCallToAction:d,nextLimit:m,contactUsURL:g,handleContactUsClick:f,checkoutUrl:b,handleUpgradeClick:v}){const y=((e,t)=>e===i._X?__("Upgrade","jetpack"):t?(0,u.sprintf)( | |
| 48 | +// translators: %1$d: an integer, the number of requests to upgrade to on the next tier | |
| 49 | +__("Get %1$d requests","jetpack"),t):__("Get more requests","jetpack"))(o,m),k=(w=n)?(0,c.gmdateI18n)("F j",w):null;var w;return(0,h.jsx)("div",{className:"jetpack-ai-usage-panel",children:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(p.A,{isOverLimit:e,requestsCount:t,requestsLimit:r,nextResetDate:k,planType:o,loading:s}),!s&&(o===i._X||o===i.ds)&&l&&(0,h.jsxs)("div",{className:"jetpack-ai-usage-panel-upgrade-button",children:[d&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("p",{children:__("Need more requests?","jetpack")}),(0,h.jsx)(a.Button,{target:"_blank",variant:"primary",label:__("Contact us for more requests","jetpack"),href:g,onClick:f,children:(0,h.jsx)("span",{children:__("Contact Us","jetpack")})})]}),!d&&(0,h.jsx)(a.Button,{target:"_blank",variant:"primary",label:__("Upgrade your Jetpack AI plan","jetpack"),href:b,onClick:v,children:(0,h.jsx)("span",{children:y})})]})]})})}function g({placement:e=null}){const{checkoutUrl:t}=(0,n.ON)(),{contactUsURL:r}=(()=>{const e=(0,o.A)("jetpack-ai-tiers-more-requests-contact"),{autosaveAndRedirect:t,isRedirecting:r}=(0,i.ZR)(e);return{contactUsURL:e,autosaveAndRedirectContactUs:t,isRedirectingContactUs:r}})(),{tracks:a}=(0,d.A)(),c=(0,i.CP)(),{requestsCount:u,requestsLimit:p,isOverLimit:g,usagePeriod:f,currentTier:b,nextTier:v,loading:y}=(0,n.yM)(),k=(0,i.Bd)(b),w=(0,l.useCallback)(()=>{a.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:b?.slug,requests_count:u,...e?{placement:e}:{}})},[a,b,u,e]),_=(0,l.useCallback)(()=>{a.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:b?.slug,requests_count:u,...e?{placement:e}:{}})},[a,b,u,e]),x=(0,s.isWpcomPlatformSite)()&&k===i.ds&&!v;return(0,h.jsx)(m,{isOverLimit:g,requestsCount:u,requestsLimit:p,nextStart:f?.nextStart,nextLimit:v?.limit,planType:k,loading:y,canUpgrade:c,showContactUsCallToAction:x,contactUsURL:r,handleContactUsClick:_,checkoutUrl:t,handleUpgradeClick:w})}},56199(e,t,r){"use strict";r.d(t,{k:()=>n});const n="block_settings_sidebar"},42047(e,t,r){"use strict";var n=r(35750),o=r(74997),s=r(27723),i=r(10790);const __=s.__;(0,o.setCategories)([...(0,o.getCategories)().filter(({slug:e})=>"contact-form"!==e),{slug:"contact-form",title:__("Forms","jetpack"),icon:(0,i.jsx)(n.ux,{})}]),(0,o.setCategories)([...(0,o.getCategories)().filter(({slug:e})=>"monetize"!==e),{slug:"monetize",title:__("Monetize","jetpack"),icon:(0,i.jsx)(n.ux,{})}]),(0,o.setCategories)([...(0,o.getCategories)().filter(({slug:e})=>"grow"!==e),{slug:"grow",title:__("Grow","jetpack"),icon:(0,i.jsx)(n.ux,{})}])},34377(e,t,r){"use strict";function n(e){const t=e.ownerDocument;return{currentDoc:t,currentWindow:t.defaultView||t.parentWindow}}function o(e,t,o){let s;try{s=new URL("editor-assets",r.p)}catch{return}const i=s.href,{currentDoc:a}=n(o),c=a.getElementsByTagName("head")[0];e.forEach(e=>{const[r,n]=e.file.split("/").pop().split(".");if("css"===n){if(a.getElementById(e.id))return;const t=a.createElement("link");t.id=e.id,t.rel="stylesheet",t.href=`${i}/${r}-${e.version}.${n}`,c.appendChild(t)}if("js"===n){const o=t[e.id]?t[e.id]:null;if(a.getElementById(e.id))return o();const s=a.createElement("script");s.id=e.id,s.type="text/javascript",s.src=`${i}/${r}-${e.version}.${n}`,s.onload=o,c.appendChild(s)}})}function s(e,t){return new Promise(r=>{const n=()=>{e[t]?r(e[t]):e.requestAnimationFrame(n)};n()})}r.d(t,{Cu:()=>s,a$:()=>o,sG:()=>n})},90907(e,t,r){"use strict";r.d(t,{D:()=>s});var n=r(36536),o=r.n(n);function s(e,t){const r=function(e,t){for(const r of new(o())(t).values()){if(-1===r.indexOf("is-style-"))continue;const t=r.substring(9),n=e.find(e=>e.name===t);if(n)return n}return e.find(e=>e.isDefault)}(e,t);return r?r.name:null}},98329(e,t,r){"use strict";r.d(t,{A:()=>o});const n=/^#?[A-Fa-f0-9]{6}$/;function o(e){return n.test(e)}},11998(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(85985),o=r(94715),s=r(56427),i=r(13022),a=(r(42036),r(10790));function c({blockName:e,buttonLabel:t,className:r,href:c,icon:l,links:u,onClick:d,subtitle:p,title:h}){const{autosaveAndRedirect:m}=(0,n.ZR)(c);return(0,a.jsx)(o.Warning,{actions:c&&[(0,a.jsx)(s.Button,{href:c,onClick:t=>{t.preventDefault(),d(e),m(t)},target:"_top",variant:"secondary",className:"jetpack-stripe-nudge__link",children:t},"nudge")],className:(0,i.A)(r,"jetpack-block-nudge wp-block"),children:(0,a.jsxs)("span",{className:"jetpack-block-nudge__info",children:[l,(0,a.jsxs)("span",{className:"jetpack-block-nudge__text-container",children:[(0,a.jsx)("span",{className:"jetpack-block-nudge__title",children:h}),p&&(0,a.jsx)("span",{className:"jetpack-block-nudge__message",children:p}),u&&(0,a.jsx)("span",{className:"jetpack-block-nudge__links",children:u})]})]})})}},24971(e,t,r){"use strict";r.d(t,{A:()=>g});var n=r(94715),o=r(74997),s=r(56427),i=r(47143),a=r(86087),c=r(27723),l=r(48558),u=r(13022),d=r(66087),p=(r(93571),r(10790));const __=c.__,h=({attributes:e,styleOption:t,viewportWidth:r,blockName:s})=>{const i=(0,o.getBlockType)(s);return(0,p.jsx)(n.BlockPreview,{viewportWidth:r,blocks:(a=i.example?(0,o.getBlockFromExample)(s,{attributes:{...i.example.attributes,style:t.value},innerBlocks:i.example.innerBlocks}):(0,o.createBlock)(s,e),{...a,attributes:{...a.attributes,__isBlockPreview:!0}})});var a},m=a.memo?(0,a.memo)(h,(e,t)=>(0,d.isEqual)(e,t)):h;function g({attributes:e,clientId:t,styleOptions:r,onSelectStyle:o,activeStyle:a,viewportWidth:c,title:d}){const h=(0,i.useSelect)(e=>{const{getBlock:r}=e("core/block-editor");return r(t)});return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n.BlockControls,{children:(0,p.jsx)(s.ToolbarGroup,{isCollapsed:!0,icon:"admin-appearance",label:__("Style","jetpack"),controls:r.map(e=>({title:e.label,isActive:e.value===a,onClick:()=>o({style:e.value})})),popoverProps:{className:"jetpack-block-styles-selector-toolbar"}})}),(0,p.jsx)(n.InspectorControls,{children:(0,p.jsx)(s.PanelBody,{title:d||__("Styles","jetpack"),children:(0,p.jsx)("div",{className:"block-editor-block-styles jetpack-block-styles-selector",children:r.map(t=>{const r={...e,style:t.value};return(0,p.jsxs)("div",{className:(0,u.A)("block-editor-block-styles__item",{"is-active":t.value===a}),onClick:()=>{o({style:t.value})},onKeyDown:e=>{l.ENTER!==e.keyCode&&l.SPACE!==e.keyCode||(e.preventDefault(),o({style:t.value}))},role:"button",tabIndex:"0","aria-label":t.label,children:[(0,p.jsx)("div",{className:"block-editor-block-styles__item-preview",children:t.preview?t.preview:h&&(0,p.jsx)(m,{blockName:h.name,styleOption:t,attributes:r,viewportWidth:c})}),(0,p.jsx)("div",{className:"block-editor-block-styles__item-label",children:t.label})]},t.value)})})})})]})}},2274(e,t,r){"use strict";r.d(t,{A:()=>u});var n=r(39384),o=r(85985),s=r(82201),i=r(27723),a=r(51609),c=(r(94378),r(10790));const __=i.__,l=()=>{const e=window?.location?.pathname.replace(/.*?wp-admin\//,""),t=window?.location?.search;return`${e}${t}`},u=({block:e,explanation:t=null})=>{const[r,i]=(0,a.useState)(!1),[u,d]=(0,a.useState)(!1),{handleConnectUser:p}=(0,n.useConnection)({from:"editor",redirectUri:l(),autoTrigger:!1,skipPricingPage:!0}),{autosave:h}=(0,o.ZR)(),{tracks:m}=(0,o.st)();return(0,a.useEffect)(()=>{r&&p()},[r,p]),(0,c.jsxs)("div",{children:[(0,c.jsx)(s.cb,{buttonText:__("Connect Jetpack","jetpack"),className:"jetpack-connect-banner-nudge",description:__("Your account is not connected to Jetpack at the moment.","jetpack"),goToCheckoutPage:t=>{d(!0),h(t).then(()=>{m.recordEvent("jetpack_editor_connect_banner_click",{block:e}),i(!0),d(!1)})},checkoutUrl:"#",isRedirecting:r||u}),(0,c.jsx)("div",{className:"jetpack-connect-banner",children:t&&(0,c.jsx)("div",{className:"jetpack-connect-banner__explanation",children:(0,c.jsx)("p",{children:t})})})]})}},10798(e,t,r){"use strict";r.d(t,{G:()=>a});var n=r(50723),o=r(11876),s=r(56427),i=r(10790);const a=()=>(0,i.jsx)(n.Ay,{children:(0,i.jsxs)(s.Placeholder,{children:[(0,i.jsxs)(s.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"},children:[(0,i.jsx)(s.FlexItem,{children:(0,i.jsx)(o.A,{width:"100%",height:30})}),(0,i.jsx)(s.FlexItem,{children:(0,i.jsx)(o.A,{width:"100%",height:90})})]}),(0,i.jsxs)(s.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"},children:[(0,i.jsx)(s.FlexItem,{children:(0,i.jsx)(o.A,{width:"100%",height:30})}),(0,i.jsx)(s.FlexItem,{children:(0,i.jsx)(o.A,{width:"100%",height:90})})]}),(0,i.jsxs)(s.Flex,{gap:2,direction:"column",style:{flexBasis:"33.3%",padding:"0 1em"},children:[(0,i.jsx)(s.FlexItem,{children:(0,i.jsx)(o.A,{width:"100%",height:30})}),(0,i.jsx)(s.FlexItem,{children:(0,i.jsx)(o.A,{width:"100%",height:90})})]})]})})},29726(e,t,r){"use strict";r.d(t,{_$:()=>n,h5:()=>o});const n="payment-plan",o="subscription"},1990(e,t,r){"use strict";r.d(t,{W:()=>i});var n=r(27723),o=r(29726);const __=n.__,s={"add a new product":{[o._$]:__("Add a new payment plan","jetpack"),[o.h5]:__("Add a new subscription","jetpack")},"product not found":{[o._$]:__("Payment plan not found","jetpack"),[o.h5]:__("Subscription not found","jetpack")},"select a product":{[o._$]:__("Select a payment plan","jetpack"),[o.h5]:__("Select a subscription","jetpack")},"default new product title":{[o._$]:__("Monthly Subscription","jetpack"),[o.h5]:__("Monthly Subscription","jetpack")},"manage your products":{[o._$]:__("Manage your payment plans.","jetpack"),[o.h5]:__("Manage your subscriptions.","jetpack")},"saving product":{[o._$]:__("Saving payment plan…","jetpack"),[o.h5]:__("Saving subscription…","jetpack")},"add product":{[o._$]:__("Add payment plan","jetpack"),[o.h5]:__("Add subscription","jetpack")},"product requires a name":{[o._$]:__("Payment plan requires a name","jetpack"),[o.h5]:__("Subscription requires a name","jetpack")},"product requires a valid price":{[o._$]:__("Payment plan requires a valid price","jetpack"),[o.h5]:__("Subscription requires a valid price","jetpack")},"successfully created product":{[o._$]:__("Successfully created payment plan","jetpack"),[o.h5]:__("Successfully created subscription","jetpack")},"there was an error when adding the product":{[o._$]:__("There was an error when adding the payment plan.","jetpack"),[o.h5]:__("There was an error when adding the subscription.","jetpack")},"invalid product configured for this block":{[o._$]:__("Invalid payment plan configured for this block.","jetpack"),[o.h5]:__("Invalid subscription configured for this block.","jetpack")},"the button will be hidden from your visitors until you select a valid product":{[o._$]:__("The button will be hidden from your visitors until you select a valid payment plan.","jetpack"),[o.h5]:__("The subscribe button will be hidden from your visitors until you select a valid subscription.","jetpack")},"mark this product as a donation":{[o._$]:__("Mark this payment plan as a donation","jetpack"),[o.h5]:__("Mark this subscription as a donation","jetpack")}};function i(e,t=o._$){return s?.[e]?.[t]||null}__("Monthly Subscription","jetpack"),__("Yearly Subscription","jetpack"),__("Subscription","jetpack")},53796(e,t,r){"use strict";r.d(t,{V:()=>h});var n=r(3924),o=r(97999),s=r(85985),i=r(47143),a=r(27723),c=r(57273),l=r(71218),u=r(16521),d=r(11998),p=(r(51082),r(10790));const __=a.__,h=({blockName:e})=>{const t=(0,i.select)(u.M).getConnectUrl(),{tracks:r}=(0,s.st)();if(!t)return null;let a,h;const m=(0,o.isWpcomPlatformSite)();switch(e){case"payment-buttons":a=m?(0,n.A)("wpcom-support-wordpress-editor-blocks-payments-block"):(0,n.A)("jetpack-support-jetpack-blocks-payments-block");break;case"donations":a=m?(0,n.A)("wpcom-support-wordpress-editor-blocks-donations-block"):(0,n.A)("jetpack-support-jetpack-blocks-donations-block"),h=(0,p.jsx)(c.N,{openInNewTab:!0,href:(0,n.A)("jetpack-support-donation-block-stripe-reqs"),children:__("Review Stripe’s requirements for accepting donations","jetpack")});break;case"premium-content":a=m?(0,n.A)("wpcom-support-wordpress-editor-blocks-premium-content-block"):(0,n.A)("jetpack-support-jetpack-blocks-premium-content-block");break;default:a=m?(0,n.A)("wpcom-support-payments-button-block"):(0,n.A)("jetpack-support-jetpack-blocks-payments-block")}return(0,p.jsx)(d.A,{className:"jetpack-stripe-nudge__banner",buttonLabel:__("Connect","jetpack"),icon:(0,p.jsx)(l.A,{className:"jetpack-stripe-nudge__icon",size:18,"aria-hidden":"true",role:"img",focusable:"false"}),href:t,links:(0,p.jsxs)(p.Fragment,{children:[h,(0,p.jsx)(c.N,{openInNewTab:!0,href:a,children:__("Learn more about the block and fees","jetpack")})]}),onClick:()=>r.recordEvent("jetpack_editor_block_stripe_connect_click",{block:e}),title:__("Connect to Stripe to use this block on your site","jetpack"),subtitle:__("This block will be hidden from your visitors until you connect to Stripe.","jetpack")})}},72730(e,t,r){"use strict";r.d(t,{C_:()=>c,VK:()=>o,Xj:()=>i,dv:()=>s,kF:()=>a});var n=r(26356);const o={USD:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,DKK:2.5,EUR:.5,GBP:.3,HKD:4,INR:.5,JPY:50,MXN:10,NOK:3,NZD:.5,PLN:2,SEK:3,SGD:.5};Object.keys(o).map(e=>{const{symbol:t}=(r=e,n.y[r]||{symbol:"$",decimal:".",grouping:",",precision:2});var r;var o;return{value:e,label:t===e?e:`${e} ${o=t,String(o||"").replace(/\.+$/,"")}`}});function s(e){return o[e]}function i(e){const t=s(e);return[10*t,30*t,200*t]}function a(e,t){return!isNaN(t)&&t>=s(e)}function c(e,t){if(!e)return null;if("number"==typeof e)return e;let r=e;return n.y[t].grouping&&(r=e.replace(new RegExp("\\"+n.y[t].grouping,"g"),"")),e=parseFloat(r.replace(new RegExp("\\"+n.y[t].decimal,"g"),".")),isNaN(e)?null:e}},74006(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(56427),o=r(10790);const s=({label:e,onClick:t})=>(0,o.jsx)(n.ToolbarButton,{className:"components-toolbar__control",onClick:t,icon:"edit",title:e,showTooltip:!0});r.dn(s)},56539(e,t,r){"use strict";r.d(t,{A:()=>s});const n=new Map,o=e=>n.has(e),s={acquire:e=>{if(o(e))return null;const t=Math.random();return n.set(e,t),[e,t]},blockExecution:async(e,t=10)=>{for(;o(e);)await new Promise(e=>setTimeout(e,t))},clearAll:()=>n.clear(),isLocked:o,release:e=>{const[t,r]=e;return!(!o(t)||n.get(t)!==r)&&(n.delete(t),!0)}}},333(e,t,r){"use strict";r.d(t,{wc:()=>i});var n=r(85985),o=r(66087);function s(){return(0,n.$i)()?.allowedMimeTypes??[]}function i(e,t){if(!e||!t)return!1;if(!s())return!1;const r=(n=t)?(0,o.pickBy)(s(),e=>e.startsWith(`${n}/`)):{};var n;const i=(a=r)?Object.keys(a).map(e=>e.split("|")).flat():[];var a;if("string"==typeof e){const t=e.split(".").pop();return t&&i.includes(t)}return"object"==typeof e&&(e.type&&Object.values(r).includes(e.type))}},97969(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(74997);function o(...e){const t=(0,n.getCategories)();for(const r of e)if(t.some(({slug:e})=>e===r))return r;throw new Error(`Could not find a category from the provided list: ${e.join(",")}`)}},27574(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(93832);function o(e,t){if(!(0,n.isURL)(t))return null;let r=t;try{const o=(0,n.getQueryArg)(t,"state"),s=JSON.parse(atob(o));if(e)s.from_editor_post_id=e;else{const e=new URLSearchParams(window.location.search);s.from_site_editor_post_id=e.get("postId"),s.from_site_editor_post_type=e.get("postType")}r=(0,n.addQueryArgs)(t,{state:btoa(JSON.stringify(s))})}catch(e){0}return r}},59340(e,t,r){"use strict";r.d(t,{AU:()=>s,O3:()=>o});var n=r(47143);const o="site",s=()=>(0,n.select)("core/edit-site")?o:(0,n.select)("core/edit-widgets")?"widget":(0,n.select)("core/customize-widgets")?"customizer":(0,n.select)("core/edit-navigation")?"navigation":(0,n.select)("core/edit-post")?"post":"unknown"},78218(e,t,r){"use strict";r.d(t,{y:()=>n});const n=(e,t)=>Object.entries(t).reduce((t,[r,n])=>{if(void 0===e[r])return t;const{type:o,validator:s,validValues:i,default:a}=e[r];return t[r]="boolean"===o?"false"!==n&&!!n:s?s(n)?n:a:i?i.includes(n)?n:a:n,t},{})},21604(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(85985);function o(){return(0,n.$i)()?.jetpack?.is_active??!1}},13087(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(85985);function o(){return(0,n.$i)()?.jetpack?.is_offline_mode??!1}},14435(e,t,r){"use strict";var n=r(97999),o=r(85985),s=r(1455),i=r.n(s),a=r(47143),c=r(27723);r(692);const __=c.__;function l(){const e=(0,o.GE)();return window?.location&&e?(0,n.isWpcomPlatformSite)()?`https://wordpress.com/plans/my-plan/${e}`:`${window.location.protocol}//${e.replace("::","/")}/wp-admin/admin.php?page=jetpack#/my-plan`:null}const u="jetpackPlanUpgradedReloadedForSlug";function d(e){try{return window.sessionStorage.getItem(u)===e}catch{return!0}}(async()=>{if(!window?.location)return;if(!new URLSearchParams(window.location.search).get("plan_upgraded"))return void function(){try{window.sessionStorage.removeItem(u)}catch{}}();let e=null,t=null;try{if((0,n.isSimpleSite)()){const t=await i()({path:`/sites/${parseInt(window?.Jetpack_Editor_Initial_State?.wpcomBlogId)||0}`,apiNamespace:"rest/v1.1"});t?.plan&&(e=t.plan.product_name_short)}else{const r=await i()({path:"/jetpack/v4/site"}),n=JSON.parse(r.data);e=n.plan.product_name,t=n.plan.product_slug}}catch{}const r=window?.Jetpack_Editor_Initial_State?.jetpack?.jetpack_plan?.data;if(function({isSimple:e,freshPlanSlug:t,renderedPlanSlug:r,alreadyReloaded:n}){return!(e||!t||!r||t===r||n)}({isSimple:(0,n.isSimpleSite)(),freshPlanSlug:t,renderedPlanSlug:r,alreadyReloaded:d(r)})&&function(e){try{return window.sessionStorage.setItem(u,e),!0}catch{return!1}}(r))return void window.location.reload();const o=l();(0,a.dispatch)("core/notices").createNotice("success",e?(0,c.sprintf)(/* translators: %s is the plan name, such as Jetpack Premium. */ | |
| 50 | +__("Congratulations! Your site is now on the %s plan.","jetpack"),e):__("Congratulations! Your site is now on a paid plan.","jetpack"),{isDismissible:!0,...o&&{actions:[{url:l(),label:__("View my plan","jetpack")}]}})})()},79366(e,t,r){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(r.p=window.Jetpack_Block_Assets_Base_Url)},59740(e,t,r){"use strict";var n=r(74997),o=r(47143),s=r(89877),i=r(93832),a=r(30552);const c=(0,i.getQueryArgs)(window.location.href);function l(e){const t=c[e];return"string"==typeof t?t:""}const u=l("url"),d=l("title"),p=l("text"),h=l("comment_content"),m=l("comment_author"),g=["http:","https:"];function f(e){if("string"!=typeof e||!e)return null;try{const t=new URL(e);return g.includes(t.protocol)?t.href:null}catch{return null}}const b={A:["href","title"],ABBR:["title"],ACRONYM:["title"],B:[],BLOCKQUOTE:["cite"],BR:[],CITE:[],CODE:[],DEL:["datetime"],EM:[],I:[],P:[],Q:["cite"],S:[],STRIKE:[],STRONG:[]},v=Object.keys(b),y=["href","cite"],k=["SCRIPT","STYLE","TEMPLATE","NOSCRIPT"];const w=f(u);w&&(async()=>{await(0,a.O)();const e=[];if(p&&p!==d){const t=`<a href="${(0,s.escapeAttribute)(w)}">${(0,s.escapeHTML)(d)}</a>`;e.push((0,n.createBlock)("core/quote",{citation:t},[(0,n.createBlock)("core/paragraph",{content:(0,s.escapeHTML)(p)})]))}if(h){const t=function(e){const t=document.implementation.createHTMLDocument("");t.body.innerHTML=e,t.body.querySelectorAll("blockquote").forEach(e=>{e.replaceWith(...e.childNodes)});let r=null;return Array.from(t.body.childNodes).forEach(e=>{"P"!==e.nodeName?(r||(r=t.createElement("p"),e.replaceWith(r)),r.append(e)):r=null}),Array.from(t.body.children).map(e=>e.innerHTML).filter(e=>""!==e.trim()).map(e=>(0,n.createBlock)("core/paragraph",{content:e}))}(function(e){if("string"!=typeof e||!e)return"";const t=document.implementation.createHTMLDocument("");t.body.innerHTML=e,t.body.querySelectorAll("*").forEach(e=>{const t=e.tagName.toUpperCase();if(k.includes(t))return void e.remove();if(!v.includes(t))return void e.replaceWith(...e.childNodes);const r=b[t]||[];Array.from(e.attributes).forEach(({name:t,value:n})=>{if(r.includes(t)){if(y.includes(t)){const r=f(n);return void(r?e.setAttribute(t,r):e.removeAttribute(t))}/[<>]/.test(n)&&e.setAttribute(t,n.replace(/[<>]/g,""))}else e.removeAttribute(t)})});const r=t.createTreeWalker(t.body,NodeFilter.SHOW_COMMENT),n=[];for(;r.nextNode();)n.push(r.currentNode);return n.forEach(e=>e.remove()),t.body.innerHTML}(h));t.length&&e.push((0,n.createBlock)("core/quote",{citation:(0,s.escapeHTML)(m)},t))}e.push((0,n.createBlock)("core/embed",{url:w,type:"wp-embed"})),(0,o.dispatch)("core/editor").resetEditorBlocks(e)})()},94375(e,t,r){"use strict";r.d(t,{A:()=>a,M:()=>c});var n=r(85985),o=r(74997),s=r(52619);const i="jetpack/";function a(e,t,r=[],a=!0){const c="string"==typeof e?e:e.name,l=c.startsWith(i),u=l?c.slice(8):c,{available:d,details:p,unavailableReason:h}=(0,n.FB)(u),m=(0,n.aq)(h,p),g=a||l?i:"";if(!d&&!m)return!1;const f=g+u,b=(0,o.registerBlockType)("object"==typeof e?e:f,t);return m&&(0,s.addFilter)("editor.BlockListBlock",`${f}-with-has-warning-is-interactive-class-names`,(0,n.BT)(f)),r.forEach(e=>(0,o.registerBlockType)(g+e.name,e.settings)),b}function c(e,t,r,o){return a(e,{...t,icon:(0,n.Cq)(e),attributes:e.attributes||{}},r,o)}},45838(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(94715),o=r(13022),s=r(10790);const i=(e,t,r,i,a,c={})=>{const{isSelected:l}=t,u=t.attributes[e];return c.className=(0,o.A)(c.className,`jetpack-${e}-block`,{"is-selected":l}),(0,s.jsxs)("div",{...c,children:[!l&&""!==u&&i(t),(l||""===u)&&(0,s.jsx)(n.PlainText,{value:u,placeholder:r,"aria-label":r,onChange:a})]})}},21929(e,t,r){"use strict";var n=r(47143),o=r(27723);r(692);const __=o.__;if("undefined"!=typeof window&&window.location){const e=new URLSearchParams(window.location.search);e.get("stripe_connect_success")?(0,n.dispatch)("core/notices").createNotice("success",__("Congrats! Your site is now connected to Stripe. You can now start accepting funds!","jetpack")):e.get("stripe_connect_cancelled")&&(0,n.dispatch)("core/notices").createNotice("error",__("You cancelled connecting your site to Stripe.","jetpack"))}},56145(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(1455),o=r.n(n);const s=()=>{};function i(e,t=s){return t(!0),new Promise((r,n)=>{o()({path:`/wpcom/v2/resolve-redirect/?url=${encodeURIComponent(e)}`}).then(o=>{t(!1);const s=o.status?parseInt(o.status,10):null;s&&s>=400?n():r(o.url||e)},()=>{t(!1),n()})})}},26247(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(39384),o=r(97999);const s=()=>{const{isUserConnected:e}=(0,n.useConnection)();return(0,o.isSimpleSite)()||e}},30552(e,t,r){"use strict";r.d(t,{O:()=>o});var n=r(47143);function o(){return new Promise((e,t)=>{if(s())return void e();const r=(0,n.subscribe)(()=>{s()&&(clearTimeout(o),r(),e())}),o=setTimeout(()=>{r(),t(new Error("Timeout: Waiting for the editor to be ready has timed out."))},7e3)})}function s(){const e=(0,n.select)("core/editor"),t=(0,n.select)("core/block-editor");return!(!e||!t)&&(e.isCleanNewPost()||e.getCurrentPostId()||t.getBlocks().length>0)}},68210(e,t,r){"use strict";r.d(t,{D:()=>d});var n=r(56427),o=r(86087),s=r(27723),i=r(13022),a=(r(62653),r(10790));const __=s.__,c=[{value:"%",label:"%",default:100},{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],l=[{value:"px",label:"px",default:150},{value:"em",label:"em",default:10}],u=["25%","50%","75%","100%"];function d(e){return(0,a.jsx)(n.PanelBody,{title:__("Width settings","jetpack"),children:(0,a.jsx)(p,{showLabel:!1,...e})})}function p({align:e,width:t,onChange:r,showLabel:s=!0}){const[d,p]=(0,o.useState)("%");(0,o.useEffect)(()=>{void 0===t&&p("px")},[t]);const h="left"===e||"right"===e;return(0,a.jsxs)(n.BaseControl,{__nextHasNoMarginBottom:!0,children:[s&&(0,a.jsx)(n.BaseControl.VisualLabel,{children:__("Width","jetpack")}),(0,a.jsxs)("div",{className:(0,i.A)("jetpack-block-width-controls",{"is-aligned":h}),children:[!h&&(0,a.jsx)(n.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,"aria-label":__("Percentage width","jetpack"),isBlock:!0,value:t,onChange:function(e){const n=t===e?void 0:e;p("%"),r(n)},children:u.map(e=>(0,a.jsx)(n.__experimentalToggleGroupControlOption,{label:e,value:e},e))}),(0,a.jsx)(n.__experimentalUnitControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,isResetValueOnUnitChange:!0,max:"%"===d||t?.includes("%")?100:void 0,min:0,onChange:e=>r(e),onUnitChange:e=>p(e),units:h?l:c,value:t})]})]})}},23117(e,t,r){"use strict";r.d(t,{ax:()=>n,pF:()=>s,v8:()=>o,vh:()=>i});const n="jetpack/media-source",o="is-playing",s="is-error",i="is-paused"},12088(e,t,r){"use strict";var n=r(47143),o=r(23117),s=r(11267);if(void 0!==n.createReduxStore){const e=(0,n.createReduxStore)(o.ax,s.A);(0,n.register)(e)}else(0,n.registerStore)(o.ax,s.A)},11267(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(23117);const o={sources:{},default:null},s={registerMediaSource:(e,t)=>({type:"REGISTER_MEDIA_SOURCE",id:e,mediaSourceState:t}),updateMediaSourceData:(e,t)=>({type:"UPDATE_MEDIA_SOURCE_DATA",id:e,data:t}),unregisterMediaSource:e=>({type:"UNREGISTER_MEDIA_SOURCE",id:e}),setDefaultMediaSource:e=>({type:"SET_DEFAULT_MEDIA_SOURCE",id:e}),playMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:n.v8}),toggleMediaSource:e=>({type:"TOGGLE_MEDIA_PLAYER_STATE",id:e}),pauseMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:n.vh}),errorMediaSource:e=>({type:"SET_MEDIA_PLAYER_STATE",id:e,state:n.pF}),setMediaSourceCurrentTime:(e,t)=>({type:"SET_MEDIA_PLAYER_CURRENT_TIME",id:e,currentTime:t})},i={getDefaultMediaSource(e){let t=null;const r=Object.keys(e.sources);if(e.default?t=e.default:r?.length&&(t=e.sources[r[0]].id),t)return e.sources[t]},getMediaPlayerState(e,t){const r=t?e.sources?.[t]:i.getDefaultMediaSource(e);return r?.state},getMediaSourceCurrentTime(e,t){const r=t?e.sources?.[t]:i.getDefaultMediaSource(e);return r?.currentTime},getMediaSourceDuration(e,t){if(!t){const t=i.getDefaultMediaSource(e);return t?.duration}return e.sources?.[t]?.duration},getMediaSourceDomReference(e,t){const r=t?e.sources?.[t]:i.getDefaultMediaSource(e);if(!r)return;const n=r?.domId;return n?document.getElementById(n):void 0}},a={reducer(e=o,t){const r=t.id||e.default||Object.keys(e.sources)?.[0];switch(t.type){case"REGISTER_MEDIA_SOURCE":return{...e,sources:{...e.sources,[t.id]:{id:t.id,...t.mediaSourceState}}};case"UPDATE_MEDIA_SOURCE_DATA":return{...e,sources:{...e.sources,[t.id]:{...e.sources[t.id],...t.data}}};case"UNREGISTER_MEDIA_SOURCE":{const r=Object.assign({},e);return r.sources[t.id]&&delete r.sources[t.id],t.id===e.default&&(r.default=Object.keys(e.sources)?.[0]),r}case"SET_DEFAULT_MEDIA_SOURCE":return{...e,default:t.id};case"SET_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[r]:{...e.sources[r],state:t.state}}};case"TOGGLE_MEDIA_PLAYER_STATE":return{...e,sources:{...e.sources,[r]:{...e.sources[r],state:e.sources[r].state===n.v8?n.vh:n.v8}}};case"SET_MEDIA_PLAYER_CURRENT_TIME":return{...e,sources:{...e.sources,[r]:{...e.sources[r],currentTime:t.currentTime}}}}return e},actions:s,selectors:i}},66314(e,t,r){"use strict";r.r(t),r.d(t,{saveProduct:()=>b,setAlreadySentPostModifiedInSession:()=>_,setApiState:()=>g,setConnectUrl:()=>h,setConnectedAccountDefaultCurrency:()=>m,setNewsletterCategories:()=>k,setPostEmailSentState:()=>w,setProducts:()=>p,setPublishedWithEmailEnabledInSession:()=>x,setSiteSlug:()=>f,setSubscriberCounts:()=>v,setTotalEmailsSentCount:()=>y});var n=r(54268),o=r(1455),s=r.n(o),i=r(27723),a=r(29726),c=r(1990),l=r(72730),u=r(3696),d=r(34884);const __=i.__,p=e=>({type:"SET_PRODUCTS",products:e}),h=e=>({type:"SET_CONNECT_URL",connectUrl:e}),m=e=>({type:"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY",connectedAccountDefaultCurrency:e}),g=e=>({type:"SET_API_STATE",apiState:e}),f=e=>({type:"SET_SITE_SLUG",siteSlug:e}),b=(e,t=a._$,r=()=>{},o=()=>{},h=!0)=>async({dispatch:a,registry:m})=>{const{title:g,price:f,currency:b}=e;if(!g||0===g.length)return(0,d.S)((0,c.W)("product requires a name",t),m),void o(!1);const v=parseFloat(f),y=(0,l.dv)(b);if(v<y)return(0,d.S)((0,i.sprintf)( | |
| 79 | 51 | // translators: %s: Price |
| 80 | -__("Minimum allowed price is %s.","jetpack"),(0,r.ZP)(y,b)),f),void o(!1);if(!(0,c.vs)(b,k))return(0,p.q)((0,l.l)("product requires a valid price",t),f),void o(!1);try{const r=await a()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),i={id:r.id,title:r.title,interval:r.interval,price:r.price,currency:r.currency},s=f.select(u.G4).getProducts();h(d(s.concat([i]))),n(i.id),m&&(0,p.w)((0,l.l)("successfully created product",t),f),o(!0)}catch(e){(0,p.q)((0,l.l)("there was an error when adding the product",t),f),o(!1)}}},b=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e})},23267:function(e,t,n){"use strict";n.d(t,{G4:function(){return r},P:function(){return i},Zq:function(){return s},cH:function(){return a},lp:function(){return o}});const r="jetpack/membership-products",o=0,a=1,i=2,s="tier"},7652:function(e,t,n){"use strict";n.d(t,{h:function(){return c}});var r=n(9818),o=n(6247),a=n(23267),i=n(93100),s=n(20360),l=n(93245);const c=(0,r.createReduxStore)(a.G4,{actions:o,reducer:i.Z,resolvers:s,selectors:l,__experimentalUseThunks:!0});(0,r.register)(c)},93100:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});const r={products:[],apiState:n(23267).lp,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{socialFollowers:null,emailSubscribers:null,paidSubscribers:null}};function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PRODUCTS":return{...e,products:t.products};case"SET_CONNECT_URL":return{...e,connectUrl:t.connectUrl};case"SET_API_STATE":return{...e,apiState:t.apiState};case"SET_SITE_SLUG":return{...e,siteSlug:t.siteSlug};case"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY":return{...e,connectedAccountDefaultCurrency:t.connectedAccountDefaultCurrency};case"SET_SUBSCRIBER_COUNTS":return{...e,subscriberCounts:t.subscriberCounts}}return e}},20360:function(e,t,n){"use strict";n.r(t),n.d(t,{getNewsletterProducts:function(){return b},getProducts:function(){return k},getSubscriberCounts:function(){return y}});var r=n(86989),o=n.n(r),a=n(12238),i=n(96483),s=n(14436),l=n(51585),c=n(73905),u=n(74251),p=n(6247),d=n(23267),m=n(46529);const h="membership-products-resolver-getProducts",f="membership-products-resolver-getSubscriberCounts";let g=!1;const v=(e,t,n)=>{if(e)return;const r=n.getProductsNoResolver()[0]?.id;r&&t(r)},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.Bn;return k(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},!1)},k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.Bn,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return async s=>{let{dispatch:f,registry:b,select:k}=s;if(await c.Z.blockExecution(h),g)return void v(t,n,k);const y=c.Z.acquire(h);try{const s=await(async()=>{const e=(0,i.getQueryArg)(window.location.href,"origin"),t=(0,i.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===e?"gutenberg-wpcom":"gutenberg",type:"all",is_editable:!0}),n=await o()({path:t,method:"GET"});if(!n&&"object"!=typeof n)throw new Error("Unexpected API response");const r=n?.errors&&Object.values(n.errors)?.[0]?.[0];if(r)throw new Error(r);return n})();((e,t,n)=>{const r=t.select(a.store).getCurrentPostId();n((0,p.setConnectUrl)((0,u.Z)(r,e.connect_url))),n((0,p.setSiteSlug)(e.site_slug)),n((0,p.setProducts)(e.products)),n((0,p.setConnectedAccountDefaultCurrency)(e.connected_account_default_currency)),n((0,p.setApiState)(e.connected_account_id?d.cH:d.P))})(s,b,f),(e=>!e.products.length&&e.connected_account_id)(s)&&await(async(e,t,n,r)=>{await n((0,p.saveProduct)({title:(0,l.l)("default new product title",e),currency:"USD",price:5,interval:"1 month"},e,t,(()=>{}),r))})(e,n,f,r),v(t,n,k),g=!0}catch(e){f((0,p.setConnectUrl)(null)),f((0,p.setApiState)(d.P)),(0,m.q)(e.message,b)}c.Z.release(y)}},y=()=>async e=>{let{dispatch:t,registry:n}=e;await c.Z.blockExecution(f);const r=c.Z.acquire(f);try{const e=await(async()=>{const e=await o()({path:"/wpcom/v2/subscribers/counts"});if(!e||"object"!=typeof e)throw new Error("Unexpected API response");const t=e?.errors&&Object.values(e.errors)?.[0]?.[0];if(t)throw new Error(t);return e})();t((0,p.setSubscriberCounts)({socialFollowers:e.counts.social_followers,emailSubscribers:e.counts.email_subscribers,paidSubscribers:e.counts.paid_subscribers}))}catch(e){t((0,p.setApiState)(d.P)),(0,m.q)(e.message,n)}c.Z.release(r)}},93245:function(e,t,n){"use strict";n.r(t),n.d(t,{getApiState:function(){return o},getConnectUrl:function(){return a},getConnectedAccountDefaultCurrency:function(){return i},getNewsletterProducts:function(){return u},getProduct:function(){return c},getProducts:function(){return s},getProductsNoResolver:function(){return l},getSiteSlug:function(){return p},getSubscriberCounts:function(){return f},isApiStateConnected:function(){return d},isApiStateLoading:function(){return m},isInvalidProduct:function(){return h}});var r=n(23267);const o=e=>e.apiState,a=e=>e.connectUrl,i=e=>e.connectedAccountDefaultCurrency,s=e=>e.products,l=e=>s(e),c=(e,t)=>s(e).find((e=>e.id===t)),u=e=>e.products.filter((e=>e.subscribe_as_site_subscriber&&"one-time"!==e.interval||e.type===r.Zq)),p=e=>e.siteSlug,d=e=>e.apiState===r.cH,m=e=>e.apiState===r.lp,h=(e,t)=>!!t&&!c(e,t),f=e=>e.subscriberCounts},46529:function(e,t,n){"use strict";n.d(t,{q:function(){return o},w:function(){return a}});var r=n(53961);const o=(e,t)=>t.dispatch(r.store).createErrorNotice(e,{type:"snackbar"}),a=(e,t)=>t.dispatch(r.store).createSuccessNotice(e,{type:"snackbar"})},43317:function(e,t,n){"use strict";n.d(t,{M:function(){return r},X:function(){return o}});const r={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function o(e){return r[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},25607:function(e,t,n){"use strict";n.d(t,{ZP:function(){return a}});var r=n(43317),o=n(5375);function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(0,r.X)(t);if(!a||isNaN(e))return null;const{decimal:i,grouping:s,precision:l,symbol:c}={...a,...n},u=e<0?"-":"";let p=(0,o.Z)(Math.abs(e),l,i,s);return n.stripZeros&&(p=function(e,t){const n=new RegExp(`\\${t}0+$`);return e.replace(n,"")}(p,i)),`${u}${c}${p}`}},5375:function(e,t,n){"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:",";const o=(e+"").replace(/[^0-9+\-Ee.]/g,""),a=isFinite(+o)?+o:0,i=isFinite(+t)?Math.abs(t):0,s=(i?function(e,t){const n=Math.pow(10,t);return""+(Math.round(e*n)/n).toFixed(t)}(a,i):""+Math.round(a)).split(".");return s[0].length>3&&(s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r)),(s[1]||"").length<i&&(s[1]=s[1]||"",s[1]+=new Array(i-s[1].length+1).join("0")),s.join(n)}n.d(t,{Z:function(){return r}})},7211:function(e,t,n){"use strict";var r,o=n(53184);function a(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}r=a.prototype,Object.assign(r,o.EventEmitter.prototype),r.emitChange=function(){this.emit("change")},r.off=r.removeListener,a.prototype.open=function(e,t,n){return t=t||Date.now(),this.windowInstance=window.open(e,t,n),this.startMonitoring(t,this.windowInstance),window.addEventListener("message",this.onMessage,!1),this},a.prototype.getScreenCenterSpecs=function(e,t){const n=void 0!==window.screenTop?window.screenTop:window.screenY,r=void 0!==window.screenLeft?window.screenLeft:window.screenX;return["width="+e,"height="+t,"top="+(n+window.innerHeight/2-t/2),"left="+(r+window.innerWidth/2-e/2)].join()},a.prototype.isOpen=function(e){let t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(e){}return!t},a.prototype.checkStatus=function(){for(const e in this.intervals)this.intervals.hasOwnProperty(e)&&!this.isOpen(e)&&(this.emit("close",e),delete this.intervals[e]);0===Object.keys(this.intervals).length&&(clearInterval(this.monitorInterval),delete this.monitorInterval,window.removeEventListener("message",this.onMessage))},a.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t},t.Z=a},39229:function(e,t,n){"use strict";var r=n(7211);t.Z=function(e,t){var n,o=new r.Z;o.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+o.getScreenCenterSpecs(780,700)),o.once("close",(function(){var e={};n&&n.keyring_id&&(e.keyring_id=Number(n.keyring_id),e.id_token=n.id_token,e.user=n.user),t(e)})),o.on("message",(function(e){return n=e}))}},51128:function(e,t,n){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))})),t.splice(o,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(62942)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},62942:function(e,t,n){e.exports=function(e){function t(e){let n,o,a,i=null;function s(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];if(!s.enabled)return;const a=s,i=Number(new Date),l=i-(n||i);a.diff=l,a.prev=n,a.curr=i,n=i,r[0]=t.coerce(r[0]),"string"!=typeof r[0]&&r.unshift("%O");let c=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,((e,n)=>{if("%%"===e)return"%";c++;const o=t.formatters[n];if("function"==typeof o){const t=r[c];e=o.call(a,t),r.splice(c,1),c--}return e})),t.formatArgs.call(a,r);(a.log||t.log).apply(a,r)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=r,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(o!==t.namespaces&&(o=t.namespaces,a=t.enabled(e)),a),set:e=>{i=e}}),"function"==typeof t.init&&t.init(s),s}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n<o;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(73171),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},73139:function(e,t,n){"use strict";t.Z=function(e){var t=e.size,n=void 0===t?24:t,r=e.onClick,s=(e.icon,e.className),l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),c=["gridicon","gridicons-notice-outline",s,!!function(e){return 0==e%18}(n)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:c,height:n,width:n,onClick:r},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.411 0 8 3.589 8 8s-3.589 8-8 8-8-3.589-8-8 3.589-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})))};var r,o=(r=n(99196))&&r.__esModule?r:{default:r},a=["size","onClick","icon","className"];function i(){return i=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)}},89933:function(e,t,n){"use strict";t.Z=function(e){var t=e.size,n=void 0===t?24:t,r=e.onClick,s=(e.icon,e.className),l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,a),c=["gridicon","gridicons-star",s,!!function(e){return 0==e%18}(n)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:c,height:n,width:n,onClick:r},l,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.891 5.82 21l2.002-7.141L2 9.257l7.418-.304z"})))};var r,o=(r=n(99196))&&r.__esModule?r:{default:r},a=["size","onClick","icon","className"];function i(){return i=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)}},60300:function(e,t,n){"use strict";n.r(t),n.d(t,{decode:function(){return v},encode:function(){return b},toASCII:function(){return y},toUnicode:function(){return k},ucs2decode:function(){return m},ucs2encode:function(){return h}});const r=2147483647,o=36,a=/^xn--/,i=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,u=String.fromCharCode;function p(e){throw new RangeError(l[e])}function d(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]);const o=function(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}((e=e.replace(s,".")).split("."),t).join(".");return r+o}function m(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),n--)}else t.push(o)}return t}const h=e=>String.fromCodePoint(...e),f=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},g=function(e,t,n){let r=0;for(e=n?c(e/700):e>>1,e+=c(e/t);e>455;r+=o)e=c(e/35);return c(r+36*e/(e+38))},v=function(e){const t=[],n=e.length;let a=0,i=128,s=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let n=0;n<l;++n)e.charCodeAt(n)>=128&&p("not-basic"),t.push(e.charCodeAt(n));for(let d=l>0?l+1:0;d<n;){const l=a;for(let t=1,i=o;;i+=o){d>=n&&p("invalid-input");const l=(u=e.charCodeAt(d++))>=48&&u<58?u-48+26:u>=65&&u<91?u-65:u>=97&&u<123?u-97:o;l>=o&&p("invalid-input"),l>c((r-a)/t)&&p("overflow"),a+=l*t;const m=i<=s?1:i>=s+26?26:i-s;if(l<m)break;const h=o-m;t>c(r/h)&&p("overflow"),t*=h}const m=t.length+1;s=g(a-l,m,0==l),c(a/m)>r-i&&p("overflow"),i+=c(a/m),a%=m,t.splice(a++,0,i)}var u;return String.fromCodePoint(...t)},b=function(e){const t=[],n=(e=m(e)).length;let a=128,i=0,s=72;for(const n of e)n<128&&t.push(u(n));const l=t.length;let d=l;for(l&&t.push("-");d<n;){let n=r;for(const t of e)t>=a&&t<n&&(n=t);const m=d+1;n-a>c((r-i)/m)&&p("overflow"),i+=(n-a)*m,a=n;for(const n of e)if(n<a&&++i>r&&p("overflow"),n===a){let e=i;for(let n=o;;n+=o){const r=n<=s?1:n>=s+26?26:n-s;if(e<r)break;const a=e-r,i=o-r;t.push(u(f(r+a%i,0))),e=c(a/i)}t.push(u(f(e,0))),s=g(i,m,d===l),i=0,++d}++i,++a}return t.join("")},k=function(e){return d(e,(function(e){return a.test(e)?v(e.slice(4).toLowerCase()):e}))},y=function(e){return d(e,(function(e){return i.test(e)?"xn--"+b(e):e}))},w={version:"2.1.0",ucs2:{decode:m,encode:h},decode:v,encode:b,toASCII:y,toUnicode:k};t.default=w},38697:function(e,t,n){"use strict";n.d(t,{pi:function(){return r}});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.create;Object.create},92213:function(e,t){"use strict";function n(e,t){return Array(t+1).join(e)}var r=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function o(e){return l(e,r)}var a=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function i(e){return l(e,a)}var s=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function l(e,t){return t.indexOf(e.nodeName)>=0}function c(e,t){return e.getElementsByTagName&&t.some((function(t){return e.getElementsByTagName(t).length}))}var u={};function p(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function d(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function m(e,t,n){for(var r=0;r<e.length;r++){var o=e[r];if(h(o,t,n))return o}}function h(e,t,n){var r=e.filter;if("string"==typeof r){if(r===t.nodeName.toLowerCase())return!0}else if(Array.isArray(r)){if(r.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof r)throw new TypeError("`filter` needs to be a string, array, or function");if(r.call(e,t,n))return!0}}function f(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function g(e,t,n){return e&&e.parentNode===t||n(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}u.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},u.lineBreak={filter:"br",replacement:function(e,t,n){return n.br+"\n"}},u.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var o=Number(t.nodeName.charAt(1));return"setext"===r.headingStyle&&o<3?"\n\n"+e+"\n"+n(1===o?"=":"-",e.length)+"\n\n":"\n\n"+n("#",o)+" "+e+"\n\n"}},u.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},u.list={filter:["ul","ol"],replacement:function(e,t){var n=t.parentNode;return"LI"===n.nodeName&&n.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},u.listItem={filter:"li",replacement:function(e,t,n){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n ");var r=n.bulletListMarker+" ",o=t.parentNode;if("OL"===o.nodeName){var a=o.getAttribute("start"),i=Array.prototype.indexOf.call(o.children,t);r=(a?Number(a)+i:i+1)+". "}return r+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},u.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,n){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},u.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){for(var o,a=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,s=r.fence.charAt(0),l=3,c=new RegExp("^"+s+"{3,}","gm");o=c.exec(i);)o[0].length>=l&&(l=o[0].length+1);var u=n(s,l);return"\n\n"+u+a+"\n"+i.replace(/\n$/,"")+"\n"+u+"\n\n"}},u.horizontalRule={filter:"hr",replacement:function(e,t,n){return"\n\n"+n.hr+"\n\n"}},u.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var n=t.getAttribute("href"),r=p(t.getAttribute("title"));return r&&(r=' "'+r+'"'),"["+e+"]("+n+r+")"}},u.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,n){var r,o,a=t.getAttribute("href"),i=p(t.getAttribute("title"));switch(i&&(i=' "'+i+'"'),n.linkReferenceStyle){case"collapsed":r="["+e+"][]",o="["+e+"]: "+a+i;break;case"shortcut":r="["+e+"]",o="["+e+"]: "+a+i;break;default:var s=this.references.length+1;r="["+e+"]["+s+"]",o="["+s+"]: "+a+i}return this.references.push(o),r},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},u.emphasis={filter:["em","i"],replacement:function(e,t,n){return e.trim()?n.emDelimiter+e+n.emDelimiter:""}},u.strong={filter:["strong","b"],replacement:function(e,t,n){return e.trim()?n.strongDelimiter+e+n.strongDelimiter:""}},u.code={filter:function(e){var t=e.previousSibling||e.nextSibling,n="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!n},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",n="`",r=e.match(/`+/gm)||[];-1!==r.indexOf(n);)n+="`";return n+t+e+t+n}},u.image={filter:"img",replacement:function(e,t){var n=p(t.getAttribute("alt")),r=t.getAttribute("src")||"",o=p(t.getAttribute("title"));return r?"+")":""}},d.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=m(this.array,e,this.options))||(t=m(this._keep,e,this.options))||(t=m(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var v="undefined"!=typeof window?window:{};var b,k,y=function(){var e=v.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?v.DOMParser:(b=function(){},function(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){window.ActiveXObject&&(e=!0)}return e}()?b.prototype.parseFromString=function(e){var t=new window.ActiveXObject("htmlfile");return t.designMode="on",t.open(),t.write(e),t.close(),t}:b.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument("");return t.open(),t.write(e),t.close(),t},b);function w(e,t){var n;"string"==typeof e?n=(k=k||new y).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):n=e.cloneNode(!0);return function(e){var t=e.element,n=e.isBlock,r=e.isVoid,o=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!o(t)){for(var a=null,i=!1,s=null,l=g(s,t,o);l!==t;){if(3===l.nodeType||4===l.nodeType){var c=l.data.replace(/[ \r\n\t]+/g," ");if(a&&!/ $/.test(a.data)||i||" "!==c[0]||(c=c.substr(1)),!c){l=f(l);continue}l.data=c,a=l}else{if(1!==l.nodeType){l=f(l);continue}n(l)||"BR"===l.nodeName?(a&&(a.data=a.data.replace(/ $/,"")),a=null,i=!1):r(l)||o(l)?(a=null,i=!0):a&&(i=!1)}var u=g(s,l,o);s=l,l=u}a&&(a.data=a.data.replace(/ $/,""),a.data||f(a))}}({element:n,isBlock:o,isVoid:i,isPre:t.preformattedCode?E:null}),n}function E(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function _(e,t){return e.isBlock=o(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!i(e)&&!function(e){return l(e,s)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return c(e,a)}(e)&&!function(e){return c(e,s)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var n=(r=e.textContent,o=r.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/),{leading:o[1],leadingAscii:o[2],leadingNonAscii:o[3],trailing:o[4],trailingNonAscii:o[5],trailingAscii:o[6]});var r,o;n.leadingAscii&&C("left",e,t)&&(n.leading=n.leadingNonAscii);n.trailingAscii&&C("right",e,t)&&(n.trailing=n.trailingNonAscii);return{leading:n.leading,trailing:n.trailing}}(e,t),e}function C(e,t,n){var r,a,i;return"left"===e?(r=t.previousSibling,a=/ $/):(r=t.nextSibling,a=/^ /),r&&(3===r.nodeType?i=a.test(r.nodeValue):n.preformattedCode&&"CODE"===r.nodeName?i=!1:1!==r.nodeType||o(r)||(i=a.test(r.textContent))),i}var S=Array.prototype.reduce,x=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function j(e){if(!(this instanceof j))return new j(e);var t={rules:u,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}({},t,e),this.rules=new d(this.options)}function L(e){var t=this;return S.call(e.childNodes,(function(e,n){var r="";return 3===(n=new _(n,t.options)).nodeType?r=n.isCode?n.nodeValue:t.escape(n.nodeValue):1===n.nodeType&&(r=A.call(t,n)),T(e,r)}),"")}function P(e){var t=this;return this.rules.forEach((function(n){"function"==typeof n.append&&(e=T(e,n.append(t.options)))})),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function A(e){var t=this.rules.forNode(e),n=L.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(n=n.trim()),r.leading+t.replacement(n,e,this.options)+r.trailing}function T(e,t){var n=function(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}(e),r=t.replace(/^\n*/,""),o=Math.max(e.length-n.length,t.length-r.length);return n+"\n\n".substring(0,o)+r}j.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=L.call(this,new w(e,this.options));return P.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return x.reduce((function(e,t){return e.replace(t[0],t[1])}),e)}},t.Z=j},23427:function(e,t,n){"use strict";n.d(t,{Z:function(){return m}});var r=n(75908),o=n(9106),a=n(85016),i=n(11662);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}var u=function(){function e(t){s(this,e),this._file=t,this.size=t.size}return c(e,[{key:"slice",value:function(e,t){if((0,a.Z)())return(0,i.Z)(this._file.slice(e,t));var n=this._file.slice(e,t);return Promise.resolve({value:n})}},{key:"close",value:function(){}}]),e}(),p=function(){function e(t,n){s(this,e),this._chunkSize=n,this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1}return c(e,[{key:"slice",value:function(e,t){return e<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(e,t)}},{key:"_readUntilEnoughDataOrDone",value:function(e,t){var n=this,r=t<=this._bufferOffset+d(this._buffer);if(this._done||r){var o=this._getDataFromBuffer(e,t),a=null==o&&this._done;return Promise.resolve({value:o,done:a})}return this._reader.read().then((function(r){var o=r.value;return r.done?n._done=!0:void 0===n._buffer?n._buffer=o:n._buffer=function(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}throw new Error("Unknown data type")}(n._buffer,o),n._readUntilEnoughDataOrDone(e,t)}))}},{key:"_getDataFromBuffer",value:function(e,t){e>this._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var n=0===d(this._buffer);return this._done&&n?null:this._buffer.slice(0,t-e)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),e}();function d(e){return void 0===e?0:void 0!==e.size?e.size:e.length}var m=function(){function e(){s(this,e)}return c(e,[{key:"openFile",value:function(e,t){return(0,r.Z)()&&e&&void 0!==e.uri?(0,o.Z)(e.uri).then((function(e){return new u(e)})).catch((function(e){throw new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(e))})):"function"==typeof e.slice&&void 0!==e.size?Promise.resolve(new u(e)):"function"==typeof e.read?(t=+t,isFinite(t)?Promise.resolve(new p(e,t)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option"))):Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment"))}}]),e}()},41264:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(75908);function o(e,t){return(0,r.Z)()?Promise.resolve(function(e,t){var n=e.exif?function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t&=t}return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",n,t.endpoint].join("/")}(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}},56940:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}n.d(t,{Z:function(){return i}});var i=function(){function e(){r(this,e)}return a(e,[{key:"createRequest",value:function(e,t){return new s(e,t)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),e}(),s=function(){function e(t,n){r(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,n,!0),this._method=t,this._url=n,this._headers={}}return a(e,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(e,t){this._xhr.setRequestHeader(e,t),this._headers[e]=t}},{key:"getHeader",value:function(e){return this._headers[e]}},{key:"setProgressHandler",value:function(e){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(t){t.lengthComputable&&e(t.loaded)})}},{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise((function(n,r){e._xhr.onload=function(){n(new l(e._xhr))},e._xhr.onerror=function(e){r(e)},e._xhr.send(t)}))}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),l=function(){function e(t){r(this,e),this._xhr=t}return a(e,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(e){return this._xhr.getResponseHeader(e)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}()},99537:function(e,t,n){"use strict";n.d(t,{gq:function(){return b}});var r=n(63620),o=n(85799),a=n(15866),i=n(56940),s=n(23427),l=n(41264);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function d(e){return function(){var t,n=m(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var r=m(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,t)}}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var v=f({},r.Z.defaultOptions,{httpStack:new i.Z,fileReader:new s.Z,urlStorage:a.H?new a.n:new o.Z,fingerprint:l.Z}),b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(i,e);var t,n,o,a=d(i);function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),t=f({},v,{},t),a.call(this,e,t)}return t=i,o=[{key:"terminate",value:function(e,t,n){return t=f({},v,{},t),r.Z.terminate(e,t,n)}}],(n=null)&&u(t.prototype,n),o&&u(t,o),i}(r.Z),k=window,y=k.XMLHttpRequest,w=k.Blob;y&&w&&w.prototype.slice},85016:function(e,t){"use strict";t.Z=function(){return"undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)}},75908:function(e,t){"use strict";t.Z=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()}},11662:function(e,t,n){"use strict";function r(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){var e=new Uint8Array(r.result);t({value:e})},r.onerror=function(e){n(e)},r.readAsArrayBuffer(e)}))}n.d(t,{Z:function(){return r}})},9106:function(e,t,n){"use strict";function r(e){return new Promise((function(t,n){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var e=r.response;t(e)},r.onerror=function(e){n(e)},r.open("GET",e),r.send()}))}n.d(t,{Z:function(){return r}})},15866:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,{H:function(){return i},n:function(){return s}});var o=!1;try{o="localStorage"in window;var a="tusSupport";localStorage.setItem(a,localStorage.getItem(a))}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;o=!1}var i=o,s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,n=[{key:"findAllUploads",value:function(){var e=this._findEntries("tus::");return Promise.resolve(e)}},{key:"findUploadsByFingerprint",value:function(e){var t=this._findEntries("tus::".concat(e,"::"));return Promise.resolve(t)}},{key:"removeUpload",value:function(e){return localStorage.removeItem(e),Promise.resolve()}},{key:"addUpload",value:function(e,t){var n=Math.round(1e12*Math.random()),r="tus::".concat(e,"::").concat(n);return localStorage.setItem(r,JSON.stringify(t)),Promise.resolve(r)}},{key:"_findEntries",value:function(e){for(var t=[],n=0;n<localStorage.length;n++){var r=localStorage.key(n);if(0===r.indexOf(e))try{var o=JSON.parse(localStorage.getItem(r));o.urlStorageKey=r,t.push(o)}catch(e){}}return t}}],n&&r(t.prototype,n),o&&r(t,o),e}()},56971:function(e,t){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e){return function(){var t,r=l(e);if(i()){var o=l(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,t)}}function o(e){var t="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return a(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),s(r,e)},o(e)}function a(e,t,n){return a=i()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&s(o,n.prototype),o},a.apply(null,arguments)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(n,e);var t=r(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).originalRequest=a,r.originalResponse=i,r.causingError=o,null!=o&&(e+=", caused by ".concat(o.toString())),null!=a){var s=a.getHeader("X-Request-ID")||"n/a",l=a.getMethod(),c=a.getURL(),u=i?i.getStatus():"n/a",p=i?i.getBody()||"":"n/a";e+=", originated from request (method: ".concat(l,", url: ").concat(c,", response code: ").concat(u,", response text: ").concat(p,", request id: ").concat(s,")")}return r.message=e,r}return n}(o(Error));t.Z=c},51336:function(e,t,n){"use strict";n.d(t,{c:function(){return o}});var r=!1;function o(e){r&&console.log(e)}},85799:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,{Z:function(){return o}});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,(n=[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(e){return Promise.resolve([])}},{key:"removeUpload",value:function(e){return Promise.resolve()}},{key:"addUpload",value:function(e,t){return Promise.resolve(null)}}])&&r(t.prototype,n),o&&r(t,o),e}()},63620:function(e,t,n){"use strict";var r=n(84097),o=n(41294),a=n.n(o),i=n(56971),s=n(51336),l=n(98184);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var m={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,_onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:null,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null},h=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"resume"in n&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=n,this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}var t,n,r;return t=e,n=[{key:"findPreviousUploads",value:function(){var e=this;return this.options.fingerprint(this.file,this.options).then((function(t){return e._urlStorage.findUploadsByFingerprint(t)}))}},{key:"resumeFromPreviousUpload",value:function(e){this.url=e.uploadUrl||null,this._parallelUploadUrls=e.parallelUploadUrls||null,this._urlStorageKey=e.urlStorageKey}},{key:"start",value:function(){var e=this,t=this.file;if(t)if(this.options.endpoint||this.options.uploadUrl){var n=this.options.retryDelays;null==n||"[object Array]"===Object.prototype.toString.call(n)?(this.options.parallelUploads>1&&["uploadUrl","uploadSize","uploadLengthDeferred"].forEach((function(t){e.options[t]&&e._emitError(new Error("tus: cannot use the ".concat(t," option when parallelUploads is enabled")))})),this.options.fingerprint(t,this.options).then((function(n){return null==n?(0,s.c)("No fingerprint was calculated meaning that the upload cannot be stored in the URL storage."):(0,s.c)("Calculated fingerprint: ".concat(n)),e._fingerprint=n,e._source?e._source:e.options.fileReader.openFile(t,e.options.chunkSize)})).then((function(t){e._source=t,e.options.parallelUploads>1||null!=e._parallelUploadUrls?e._startParallelUpload():e._startSingleUpload()})).catch((function(t){e._emitError(t)}))):this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var t=this,n=this._size=this._source.size,r=0;this._parallelUploads=[];var o=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,a=function(e,t,n){for(var r=Math.floor(e/t),o=[],a=0;a<t;a++)o.push({start:r*a,end:r*(a+1)});return o[t-1].end=e,n&&o.forEach((function(e,t){e.uploadUrl=n[t]||null})),o}(this._source.size,o,this._parallelUploadUrls);this._parallelUploadUrls=new Array(a.length);var i,l=a.map((function(o,i){var s=0;return t._source.slice(o.start,o.end).then((function(l){var c=l.value;return new Promise((function(l,p){var d=u({},t.options,{uploadUrl:o.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,metadata:{},headers:u({},t.options.headers,{"Upload-Concat":"partial"}),onSuccess:l,onError:p,onProgress:function(e){r=r-s+e,s=e,t._emitProgress(r,n)},_onUploadUrlAvailable:function(){t._parallelUploadUrls[i]=m.url,t._parallelUploadUrls.filter((function(e){return!!e})).length===a.length&&t._saveUploadInUrlStorage()}}),m=new e(c,d);m.start(),t._parallelUploads.push(m)}))}))}));Promise.all(l).then((function(){(i=t._openRequest("POST",t.options.endpoint)).setHeader("Upload-Concat","final;".concat(t._parallelUploadUrls.join(" ")));var e=f(t.options.metadata);return""!==e&&i.setHeader("Upload-Metadata",e),t._sendRequest(i,null)})).then((function(e){if(g(e.getStatus(),200)){var n=e.getHeader("Location");null!=n?(t.url=y(t.options.endpoint,n),(0,s.c)("Created upload at ".concat(t.url)),t._emitSuccess()):t._emitHttpError(i,e,"tus: invalid or missing Location header")}else t._emitHttpError(i,e,"tus: unexpected response while creating upload")})).catch((function(e){t._emitError(e)}))}},{key:"_startSingleUpload",value:function(){if(this.options.uploadLengthDeferred)this._size=null;else if(null!=this.options.uploadSize){if(this._size=+this.options.uploadSize,isNaN(this._size))return void this._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(this._size=this._source.size,null==this._size)return void this._emitError(new Error("tus: cannot automatically derive upload's size from input and must be specified manually using the `uploadSize` option"));return this._aborted=!1,null!=this.url?((0,s.c)("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?((0,s.c)("Resuming upload from provided URL: ".concat(this.options.url)),this.url=this.options.uploadUrl,void this._resumeUpload()):((0,s.c)("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(t){var n=this;if(arguments.length>1&&"function"==typeof arguments[1])throw new Error("tus: the abort function does not accept a callback since v2 anymore; please use the returned Promise instead");return null!=this._parallelUploads&&this._parallelUploads.forEach((function(e){e.abort(t)})),null!==this._req&&(this._req.abort(),this._source.close()),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url?e.terminate(this.url,this.options).then((function(){return n._removeFromUrlStorage()})):Promise.resolve()}},{key:"_emitHttpError",value:function(e,t,n,r){this._emitError(new i.Z(n,r,e,t))}},{key:"_emitError",value:function(e){var t=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),k(e,this._retryAttempt,this.options))){var n=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout((function(){t.start()}),n))}if("function"!=typeof this.options.onError)throw e;this.options.onError(e)}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess()}},{key:"_emitProgress",value:function(e,t){"function"==typeof this.options.onProgress&&this.options.onProgress(e,t)}},{key:"_emitChunkComplete",value:function(e,t,n){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(e,t,n)}},{key:"_createUpload",value:function(){var e=this;if(this.options.endpoint){var t=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?t.setHeader("Upload-Defer-Length",1):t.setHeader("Upload-Length",this._size);var n,r=f(this.options.metadata);""!==r&&t.setHeader("Upload-Metadata",r),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,n=this._addChunkToRequest(t)):n=this._sendRequest(t,null),n.then((function(n){if(g(n.getStatus(),200)){var r=n.getHeader("Location");if(null!=r){if(e.url=y(e.options.endpoint,r),(0,s.c)("Created upload at ".concat(e.url)),"function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),0===e._size)return e._emitSuccess(),void e._source.close();e._saveUploadInUrlStorage(),e.options.uploadDataDuringCreation?e._handleUploadResponse(t,n):(e._offset=0,e._performUpload())}else e._emitHttpError(t,n,"tus: invalid or missing Location header")}else e._emitHttpError(t,n,"tus: unexpected response while creating upload")})).catch((function(n){e._emitHttpError(t,null,"tus: failed to create upload",n)}))}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var e=this,t=this._openRequest("HEAD",this.url);this._sendRequest(t,null).then((function(n){var r=n.getStatus();if(!g(r,200))return g(r,400)&&e._removeFromUrlStorage(),423===r?void e._emitHttpError(t,n,"tus: upload is currently locked; retry later"):e.options.endpoint?(e.url=null,void e._createUpload()):void e._emitHttpError(t,n,"tus: unable to resume upload (new upload cannot be created without an endpoint)");var o=parseInt(n.getHeader("Upload-Offset"),10);if(isNaN(o))e._emitHttpError(t,n,"tus: invalid or missing offset value");else{var a=parseInt(n.getHeader("Upload-Length"),10);if(!isNaN(a)||e.options.uploadLengthDeferred){if("function"==typeof e.options._onUploadUrlAvailable&&e.options._onUploadUrlAvailable(),o===a)return e._emitProgress(a,a),void e._emitSuccess();e._offset=o,e._performUpload()}else e._emitHttpError(t,n,"tus: invalid or missing length value")}})).catch((function(n){e._emitHttpError(t,null,"tus: failed to resume upload",n)}))}},{key:"_performUpload",value:function(){var e,t=this;this._aborted||(this.options.overridePatchMethod?(e=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):e=this._openRequest("PATCH",this.url),e.setHeader("Upload-Offset",this._offset),this._addChunkToRequest(e).then((function(n){g(n.getStatus(),200)?t._handleUploadResponse(e,n):t._emitHttpError(e,n,"tus: unexpected response while uploading chunk")})).catch((function(n){t._aborted||t._emitHttpError(e,null,"tus: failed to upload chunk at offset ".concat(t._offset),n)})))}},{key:"_addChunkToRequest",value:function(e){var t=this,n=this._offset,r=this._offset+this.options.chunkSize;return e.setProgressHandler((function(e){t._emitProgress(n+e,t._size)})),e.setHeader("Content-Type","application/offset+octet-stream"),(r===1/0||r>this._size)&&!this.options.uploadLengthDeferred&&(r=this._size),this._source.slice(n,r).then((function(n){var r=n.value,o=n.done;return t.options.uploadLengthDeferred&&o&&(t._size=t._offset+(r&&r.size?r.size:0),e.setHeader("Upload-Length",t._size)),null===r?t._sendRequest(e):(t._emitProgress(t._offset,t._size),t._sendRequest(e,r))}))}},{key:"_handleUploadResponse",value:function(e,t){var n=parseInt(t.getHeader("Upload-Offset"),10);if(isNaN(n))this._emitHttpError(e,t,"tus: invalid or missing offset value");else{if(this._emitProgress(n,this._size),this._emitChunkComplete(n-this._offset,n,this._size),this._offset=n,n==this._size)return this._emitSuccess(),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function(e,t){var n=v(e,t,this.options);return this._req=n,n}},{key:"_removeFromUrlStorage",value:function(){var e=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch((function(t){e._emitError(t)})),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var e=this;if(this.options.storeFingerprintForResuming&&this._fingerprint){var t={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};this._parallelUploads?t.parallelUploadUrls=this._parallelUploadUrls:t.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,t).then((function(t){return e._urlStorageKey=t})).catch((function(t){e._emitError(t)}))}}},{key:"_sendRequest",value:function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this.options)}}],r=[{key:"terminate",value:function(t,n){if(arguments.length>1&&"function"==typeof arguments[arguments.length-1])throw new Error("tus: the terminate function does not accept a callback since v2 anymore; please use the returned Promise instead");void 0===n&&(n={});var r=v("DELETE",t,n);return b(r,null,n).then((function(e){if(204!==e.getStatus())throw new i.Z("tus: unexpected response while terminating upload",null,r,e)})).catch((function(o){if(o instanceof i.Z||(o=new i.Z("tus: failed to terminate upload",o,r,null)),!k(o,0,n))throw o;var a=n.retryDelays[0],s=n.retryDelays.slice(1),l=u({},n,{retryDelays:s});return new Promise((function(e){return setTimeout(e,a)})).then((function(){return e.terminate(t,l)}))}))}}],n&&d(t.prototype,n),r&&d(t,r),e}();function f(e){var t=[];for(var n in e)t.push("".concat(n," ").concat(r.Base64.encode(e[n])));return t.join(",")}function g(e,t){return e>=t&&e<t+100}function v(e,t,n){var r=n.httpStack.createRequest(e,t);r.setHeader("Tus-Resumable","1.0.0");var o=n.headers||{};for(var a in o)r.setHeader(a,o[a]);if(n.addRequestId){var i=(0,l.Z)();r.setHeader("X-Request-ID",i)}return r}function b(e,t,n){return("function"==typeof n.onBeforeRequest?Promise.resolve(n.onBeforeRequest(e)):Promise.resolve()).then((function(){return e.send(t).then((function(t){return("function"==typeof n.onAfterResponse?Promise.resolve(n.onAfterResponse(e,t)):Promise.resolve()).then((function(){return t}))}))}))}function k(e,t,n){if(null==n.retryDelays||t>=n.retryDelays.length||null==e.originalRequest)return!1;if(n&&"function"==typeof n.onShouldRetry)return n.onShouldRetry(e,t,n);var r,o=e.originalResponse?e.originalResponse.getStatus():0;return(!g(o,400)||409===o||423===o)&&(r=!0,"undefined"!=typeof window&&"navigator"in window&&!1===window.navigator.onLine&&(r=!1),r)}function y(e,t){return new(a())(t,e).toString()}h.defaultOptions=m,t.Z=h},98184:function(e,t,n){"use strict";function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}n.d(t,{Z:function(){return r}})},19590:function(e){e.exports=/[\0-\x1F\x7F-\x9F]/},20994:function(e){e.exports=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},95162:function(e){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},59939:function(e){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},84353:function(e,t,n){"use strict";t.Any=n(44957),t.Cc=n(19590),t.Cf=n(20994),t.P=n(95162),t.Z=n(59939)},44957:function(e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},83078:function(e,t,n){"use strict";function r(e){return e.charAt(0).toUpperCase()+e.substr(1)}n.d(t,{l:function(){return r}})},48936:function(e,t,n){"use strict";n.d(t,{L:function(){return r}});function r(e){return e.toUpperCase()}},41294:function(e,t,n){"use strict";var r=n(82298),o=n(40142),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function p(e){return(e||"").toString().replace(a,"")}var d=[["#","hash"],["?","query"],function(e,t){return f(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],m={hash:1,query:1};function h(e){var t,n=("undefined"!=typeof window||"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).location||{},r={},o=typeof(e=e||n);if("blob:"===e.protocol)r=new v(unescape(e.pathname),{});else if("string"===o)for(t in r=new v(e,{}),m)delete r[t];else if("object"===o){for(t in e)t in m||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=s.test(e.href))}return r}function f(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function g(e,t){e=(e=p(e)).replace(i,""),t=t||{};var n,r=c.exec(e),o=r[1]?r[1].toLowerCase():"",a=!!r[2],s=!!r[3],l=0;return a?s?(n=r[2]+r[3]+r[4],l=r[2].length+r[3].length):(n=r[2]+r[4],l=r[2].length):s?(n=r[3]+r[4],l=r[3].length):n=r[4],"file:"===o?l>=2&&(n=n.slice(2)):f(o)?n=r[4]:o?a&&(n=n.slice(2)):l>=2&&f(t.protocol)&&(n=r[4]),{protocol:o,slashes:a||f(o),slashesCount:l,rest:n}}function v(e,t,n){if(e=(e=p(e)).replace(i,""),!(this instanceof v))return new v(e,t,n);var a,s,l,c,m,b,k=d.slice(),y=typeof t,w=this,E=0;for("object"!==y&&"string"!==y&&(n=t,t=null),n&&"function"!=typeof n&&(n=o.parse),a=!(s=g(e||"",t=h(t))).protocol&&!s.slashes,w.slashes=s.slashes||a&&t.slashes,w.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||u.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!f(w.protocol)))&&(k[3]=[/(.*)/,"pathname"]);E<k.length;E++)"function"!=typeof(c=k[E])?(l=c[0],b=c[1],l!=l?w[b]=e:"string"==typeof l?~(m="@"===l?e.lastIndexOf(l):e.indexOf(l))&&("number"==typeof c[2]?(w[b]=e.slice(0,m),e=e.slice(m+c[2])):(w[b]=e.slice(m),e=e.slice(0,m))):(m=l.exec(e))&&(w[b]=m[1],e=e.slice(0,m.index)),w[b]=w[b]||a&&c[3]&&t[b]||"",c[4]&&(w[b]=w[b].toLowerCase())):e=c(e,w);n&&(w.query=n(w.query)),a&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,o=n[r-1],a=!1,i=0;r--;)"."===n[r]?n.splice(r,1):".."===n[r]?(n.splice(r,1),i++):i&&(0===r&&(a=!0),n.splice(r,1),i--);return a&&n.unshift(""),"."!==o&&".."!==o||n.push(""),n.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&f(w.protocol)&&(w.pathname="/"+w.pathname),r(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(m=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,m),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(m+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&f(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}v.prototype={set:function(e,t,n){var a=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(n||o.parse)(t)),a[e]=t;break;case"port":a[e]=t,r(t,a.protocol)?t&&(a.host=a.hostname+":"+t):(a.host=a.hostname,a[e]="");break;case"hostname":a[e]=t,a.port&&(t+=":"+a.port),a.host=t;break;case"host":a[e]=t,l.test(t)?(t=t.split(":"),a.port=t.pop(),a.hostname=t.join(":")):(a.hostname=t,a.port="");break;case"protocol":a.protocol=t.toLowerCase(),a.slashes=!n;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";a[e]=t.charAt(0)!==i?i+t:t}else a[e]=t;break;case"username":case"password":a[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(a.username=t.slice(0,s),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=t.slice(s+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<d.length;c++){var u=d[c];u[4]&&(a[u[1]]=a[u[1]].toLowerCase())}return a.auth=a.password?a.username+":"+a.password:a.username,a.origin="file:"!==a.protocol&&f(a.protocol)&&a.host?a.protocol+"//"+a.host:"null",a.href=a.toString(),a},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,n=this,r=n.host,a=n.protocol;a&&":"!==a.charAt(a.length-1)&&(a+=":");var i=a+(n.protocol&&n.slashes||f(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):"file:"!==n.protocol&&f(n.protocol)&&!r&&"/"!==n.pathname&&(i+="@"),(":"===r[r.length-1]||l.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,(t="object"==typeof n.query?e(n.query):n.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),n.hash&&(i+=n.hash),i}},v.extractProtocol=g,v.location=h,v.trimLeft=p,v.qs=o,e.exports=v},8964:function(e,t,n){"use strict";e.exports=n.p+"images/eventbrite-in-page-example-c351ec80e4dd5d39433d.png"},96406:function(e,t,n){"use strict";e.exports=n.p+"images/map-preview-97bda80ebb6981457630.jpg"},80469:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_black_and_white-b6ad81a7dd09d09fb34d.jpg"},7247:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_black_and_white_mapkit-50e9383d59f6ad6a44ed.jpg"},13925:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_default-b53ccdf170e5ac873ff0.jpg"},24873:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_default_mapkit-0ed10cab18f62edff74e.jpg"},25685:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_satellite-cc50c608e244f90d18dc.jpg"},81667:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_satellite_mapkit-6062205f7c3804fae12c.jpg"},15387:function(e,t,n){"use strict";e.exports=n.p+"images/map-theme_terrain-ac291441b3461820747d.jpg"},23879:function(e,t,n){"use strict";e.exports=n.p+"images/paypal-button-2x-62cd99bcc3acbd1ff504.png"},22323:function(e,t,n){"use strict";e.exports=n.p+"images/paypal-button-a51d6c3207b0a904edb7.png"},60206:function(e,t,n){"use strict";e.exports=n.p+"images/simple-payments_example-1-0273eeccd8d120df4984.jpg"},65784:function(e,t,n){"use strict";e.exports=n.p+"images/slideshow_example-1-07a3f164621235df0419.jpg"},6425:function(e,t,n){"use strict";e.exports=n.p+"images/slideshow_example-2-2ee401e47066229bdac5.jpg"},85983:function(e,t,n){"use strict";e.exports=n.p+"images/slideshow_example-3-0682afca66c485f17ff6.jpg"},96606:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-1-d2817eb0e669267ab3eb.jpg"},85472:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-2-7d8f0cf8e262f0112691.jpg"},79009:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-3-07a3f164621235df0419.jpg"},10742:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-4-2ee401e47066229bdac5.jpg"},52642:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-5-a1935fd9cf1181168d90.jpg"},41145:function(e,t,n){"use strict";e.exports=n.p+"images/tiled-gallery_example-6-9f9d39c6af0fb4b0d99c.jpg"},41194:function(e,t,n){"use strict";e.exports=n.p+"images/videopress-block-example-image-da9ef73787adca8896f2.jpg"},80405:function(e,t,n){"use strict";e.exports=n.p+"images/example_160x600-ccbc594f54431dafa70d.png"},72473:function(e,t,n){"use strict";e.exports=n.p+"images/example_300x250-5b93e8174f02d48c40b7.png"},38511:function(e,t,n){"use strict";e.exports=n.p+"images/example_320x50-7110edf045141630a222.png"},52203:function(e,t,n){"use strict";e.exports=n.p+"images/example_728x90-d9de384932330b92e1c3.png"},92787:function(e){"use strict";if(void 0==={consumer_slug:"jetpack"}){var t=new Error('Cannot find module \'{"consumer_slug":"jetpack"}\'');throw t.code="MODULE_NOT_FOUND",t}e.exports={consumer_slug:"jetpack"}},99196:function(e){"use strict";e.exports=window.React},91850:function(e){"use strict";e.exports=window.ReactDOM},92819:function(e){"use strict";e.exports=window.lodash},76292:function(e){"use strict";e.exports=window.moment},86989:function(e){"use strict";e.exports=window.wp.apiFetch},11313:function(e){"use strict";e.exports=window.wp.blob},52175:function(e){"use strict";e.exports=window.wp.blockEditor},65391:function(e){"use strict";e.exports=window.wp.blockSerializationDefaultParser},4981:function(e){"use strict";e.exports=window.wp.blocks},55609:function(e){"use strict";e.exports=window.wp.components},94333:function(e){"use strict";e.exports=window.wp.compose},37798:function(e){"use strict";e.exports=window.wp.coreData},9818:function(e){"use strict";e.exports=window.wp.data},69771:function(e){"use strict";e.exports=window.wp.date},47701:function(e){"use strict";e.exports=window.wp.domReady},12238:function(e){"use strict";e.exports=window.wp.editor},69307:function(e){"use strict";e.exports=window.wp.element},81975:function(e){"use strict";e.exports=window.wp.escapeHtml},92694:function(e){"use strict";e.exports=window.wp.hooks},65736:function(e){"use strict";e.exports=window.wp.i18n},39630:function(e){"use strict";e.exports=window.wp.keycodes},53961:function(e){"use strict";e.exports=window.wp.notices},98817:function(e){"use strict";e.exports=window.wp.plugins},70444:function(e){"use strict";e.exports=window.wp.primitives},29512:function(e){"use strict";e.exports=window.wp.tokenList},96483:function(e){"use strict";e.exports=window.wp.url},90162:function(e){"use strict";e.exports=window.wp.viewport},6551:function(e){"use strict";e.exports=window.wp.widgets},82674:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},25877:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},80550:function(e){"use strict";e.exports=JSON.parse('{"O":{"White":"#fff","Black":"#000","Gray":"#646970","Gray 0":"#f6f7f7","Gray 5":"#dcdcde","Gray 10":"#c3c4c7","Gray 20":"#a7aaad","Gray 30":"#8c8f94","Gray 40":"#787c82","Gray 50":"#646970","Gray 60":"#50575e","Gray 70":"#3c434a","Gray 80":"#2c3338","Gray 90":"#1d2327","Gray 100":"#101517","Blue":"#0675c4","Blue 0":"#e9f0f5","Blue 5":"#bbe0fa","Blue 10":"#91caf2","Blue 20":"#68b3e8","Blue 30":"#399ce3","Blue 40":"#1689db","Blue 50":"#0675c4","Blue 60":"#055d9c","Blue 70":"#044b7a","Blue 80":"#02395c","Blue 90":"#01283d","Blue 100":"#001621","Purple":"#984a9c","Purple 0":"#f2e9ed","Purple 5":"#ebcee0","Purple 10":"#e3afd5","Purple 20":"#d48fc8","Purple 30":"#c475bd","Purple 40":"#b35eb1","Purple 50":"#984a9c","Purple 60":"#7c3982","Purple 70":"#662c6e","Purple 80":"#4d2054","Purple 90":"#35163b","Purple 100":"#1e0c21","Pink":"#c9356e","Pink 0":"#f5e9ed","Pink 5":"#f2ceda","Pink 10":"#f7a8c3","Pink 20":"#f283aa","Pink 30":"#eb6594","Pink 40":"#e34c84","Pink 50":"#c9356e","Pink 60":"#ab235a","Pink 70":"#8c1749","Pink 80":"#700f3b","Pink 90":"#4f092a","Pink 100":"#260415","Red":"#d63638","Red 0":"#f7ebec","Red 5":"#facfd2","Red 10":"#ffabaf","Red 20":"#ff8085","Red 30":"#f86368","Red 40":"#e65054","Red 50":"#d63638","Red 60":"#b32d2e","Red 70":"#8a2424","Red 80":"#691c1c","Red 90":"#451313","Red 100":"#240a0a","Orange":"#b26200","Orange 0":"#f5ece6","Orange 5":"#f7dcc6","Orange 10":"#ffbf86","Orange 20":"#faa754","Orange 30":"#e68b28","Orange 40":"#d67709","Orange 50":"#b26200","Orange 60":"#8a4d00","Orange 70":"#704000","Orange 80":"#543100","Orange 90":"#361f00","Orange 100":"#1f1200","Yellow":"#9d6e00","Yellow 0":"#f5f1e1","Yellow 5":"#f5e6b3","Yellow 10":"#f2d76b","Yellow 20":"#f0c930","Yellow 30":"#deb100","Yellow 40":"#c08c00","Yellow 50":"#9d6e00","Yellow 60":"#7d5600","Yellow 70":"#674600","Yellow 80":"#4f3500","Yellow 90":"#320","Yellow 100":"#1c1300","Green":"#008a20","Green 0":"#e6f2e8","Green 5":"#b8e6bf","Green 10":"#68de86","Green 20":"#1ed15a","Green 30":"#00ba37","Green 40":"#00a32a","Green 50":"#008a20","Green 60":"#007017","Green 70":"#005c12","Green 80":"#00450c","Green 90":"#003008","Green 100":"#001c05","Celadon":"#008763","Celadon 0":"#e4f2ed","Celadon 5":"#a7e8d3","Celadon 10":"#66deb9","Celadon 20":"#31cc9f","Celadon 30":"#09b585","Celadon 40":"#009e73","Celadon 50":"#008763","Celadon 60":"#007053","Celadon 70":"#005c44","Celadon 80":"#004533","Celadon 90":"#003024","Celadon 100":"#001c15","WordPress Blue":"#006088","WordPress Blue 0":"#e6f1f5","WordPress Blue 5":"#bedae6","WordPress Blue 10":"#98c6d9","WordPress Blue 20":"#6ab3d0","WordPress Blue 30":"#3895ba","WordPress Blue 40":"#187aa2","WordPress Blue 50":"#006088","WordPress Blue 60":"#004e6e","WordPress Blue 70":"#003c56","WordPress Blue 80":"#002c40","WordPress Blue 90":"#001d2d","WordPress Blue 100":"#00101c","Simplenote Blue":"#3361cc","Simplenote Blue 0":"#e9ecf5","Simplenote Blue 5":"#ced9f2","Simplenote Blue 10":"#abc1f5","Simplenote Blue 20":"#84a4f0","Simplenote Blue 30":"#618df2","Simplenote Blue 40":"#4678eb","Simplenote Blue 50":"#3361cc","Simplenote Blue 60":"#1d4fc4","Simplenote Blue 70":"#113ead","Simplenote Blue 80":"#0d2f85","Simplenote Blue 90":"#09205c","Simplenote Blue 100":"#05102e","WooCommerce Purple":"#7f54b3","WooCommerce Purple 0":"#f7edf7","WooCommerce Purple 5":"#e5cfe8","WooCommerce Purple 10":"#d6b4e0","WooCommerce Purple 20":"#c792e0","WooCommerce Purple 30":"#af7dd1","WooCommerce Purple 40":"#9a69c7","WooCommerce Purple 50":"#7f54b3","WooCommerce Purple 60":"#674399","WooCommerce Purple 70":"#533582","WooCommerce Purple 80":"#3c2861","WooCommerce Purple 90":"#271b3d","WooCommerce Purple 100":"#140e1f","Jetpack Green":"#069e08","Jetpack Green 0":"#f0f2eb","Jetpack Green 5":"#d0e6b8","Jetpack Green 10":"#9dd977","Jetpack Green 20":"#64ca43","Jetpack Green 30":"#2fb41f","Jetpack Green 40":"#069e08","Jetpack Green 50":"#008710","Jetpack Green 60":"#007117","Jetpack Green 70":"#005b18","Jetpack Green 80":"#004515","Jetpack Green 90":"#003010","Jetpack Green 100":"#001c09"}}')},84321:function(e){"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":" ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}')},23536:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/ai-assistant","title":"AI Assistant (Experimental)","description":"Elevate your content creation with our AI-powered Gutenberg Block, offering seamless customization and generation. Bear in mind that, as an evolving tool, occasional imprecision may occur. Your feedback is valuable in our commitment to refine and improve this feature.","keywords":["AI","GPT","AL","Magic","help","assistant"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg viewBox=\'0 0 32 32\' width=\'32\' height=\'32\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z\'/><path d=\'M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z\'/><path d=\'M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z\'/></svg>","supports":{"html":false,"multiple":true,"reusable":false},"attributes":{"content":{"type":"string"},"originalContent":{"type":"string"},"promptType":{"type":"string"},"originalMessages":{"type":"array","default":[]},"messages":{"type":"array","default":[]},"useGutenbergSyntax":{"type":"boolean","default":false},"useGpt4":{"type":"boolean","default":false},"customSystemPrompt":{"type":"string","default":""}},"example":{"attributes":{"content":"With **Jetpack AI Assistant**, you can provide a prompt, and it will generate high-quality blog posts, informative pages, well-organized lists, and thorough tables that meet your specific requirements.\\n\\nTo start using the **Jetpack AI Assistant**, type `/AI` in the block editor."}}}')},22023:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/business-hours","title":"Business Hours","description":"Display opening hours for your business.","keywords":["opening hours","closing time","schedule","working day"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z\'/></svg>","supports":{"html":true,"color":{"gradients":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true},"align":["wide","full"]},"attributes":{"days":{"type":"array","default":[{"name":"Sun","hours":[]},{"name":"Mon","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Tue","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Wed","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Thu","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Fri","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Sat","hours":[]}]}},"example":{"attributes":{"days":[{"name":"Sun","hours":[]},{"name":"Mon","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Tue","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Wed","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Thu","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Fri","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Sat","hours":[]}]}}}')},23329:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/calendly","title":"Calendly","description":"Embed a calendar for customers to schedule appointments.","keywords":["calendar","schedule","appointments","events","dates"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 23 24\' width=\'23\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z\'/></svg>","supports":{"align":true,"alignWide":false,"html":false},"attributes":{"backgroundColor":{"type":"string","default":"ffffff"},"hideEventTypeDetails":{"type":"boolean","default":false},"primaryColor":{"type":"string","default":"00A2FF"},"textColor":{"type":"string","default":"4D5055"},"style":{"type":"string","default":"inline","enum":["inline","link"]},"url":{"type":"string"}},"example":{"attributes":{"hideEventTypeDetails":false,"style":"inline","url":"https://calendly.com/wpcom/jetpack-block-example"},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"a","text":"Schedule time with me","uniqueId":"calendly-widget-id","url":"https://calendly.com/wpcom/jetpack-block-example"}}]}}')},58891:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/contact-info","title":"Contact Info","description":"Add an email address, phone number, and physical address with improved markup for better SEO results.","keywords":["email","phone","address"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19 5v14H5V5h14m0-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 9c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm6 10H6v-1.53c0-2.5 3.97-3.58 6-3.58s6 1.08 6 3.58V18zm-9.69-2h7.38c-.69-.56-2.38-1.12-3.69-1.12s-3.01.56-3.69 1.12z\'/></svg>","supports":{"align":["wide","full"],"html":false,"color":{"link":true,"gradients":true},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true}},"example":{"attributes":{},"innerBlocks":[{"name":"jetpack/email","attributes":{"email":"[email protected]"}},{"name":"jetpack/phone","attributes":{"phone":"123-456-7890"}},{"name":"jetpack/address","attributes":{"address":"987 Photon Drive","city":"Speedyville","region":"CA","postal":"12345","country":"USA"}}]}}')},98826:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/donations","title":"Donations Form","description":"Collect one-time, monthly, or annually recurring donations.","keywords":["charity","contribution","credit card","debit card","donate","earn","ecommerce","fundraising","fundraiser","gofundme","money","nonprofit","non-profit","paid","patreon","pay","payments","recurring","stripe","sponsor","square","tipping","venmo"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z\' /></svg>","supports":{"html":false},"attributes":{"currency":{"type":"string","default":""},"oneTimeDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100],"heading":"Make a one-time donation","extraText":"Your contribution is appreciated.","buttonText":"Donate"}},"monthlyDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100],"heading":"Make a monthly donation","extraText":"Your contribution is appreciated.","buttonText":"Donate monthly"}},"annualDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100],"heading":"Make a yearly donation","extraText":"Your contribution is appreciated.","buttonText":"Donate yearly"}},"showCustomAmount":{"type":"boolean","default":true},"chooseAmountText":{"type":"string","default":"Choose an amount"},"customAmountText":{"type":"string","default":"Or enter a custom amount"},"fallbackLinkUrl":{"type":"string"}},"example":{}}')},33711:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/eventbrite","title":"Eventbrite Checkout","description":"Embed Eventbrite event details and ticket checkout.","keywords":["events","tickets"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z\'/></svg>","supports":{"html":false,"align":true},"attributes":{"url":{"type":"string"},"eventId":{"type":"number"},"style":{"type":"string","default":"inline"}},"example":{"attributes":{"url":"https://www.eventbrite.com/e/test-event-tickets-123456789","eventId":123456789,"style":"modal"},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"a","text":"Register","uniqueId":"eventbrite-widget-id"}}]}}')},13625:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/gif","title":"GIF","description":"Search for and insert an animated image.","keywords":["animated","giphy","image"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path fill=\'none\' d=\'M0 0h24v24H0V0z\'/><path d=\'M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z\'/></svg>","supports":{"html":false,"align":true},"attributes":{"align":{"type":"string","default":"center"},"caption":{"type":"string"},"giphyUrl":{"type":"string"},"searchText":{"type":"string"},"paddingTop":{"type":"string","default":"56.2%"}},"example":{"attributes":{"align":"center","giphyUrl":"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc","paddingTop":"100%","searchText":"WordPress"}}}')},5416:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/google-calendar","title":"Google Calendar","description":"Embed a Google Calendar.","keywords":["events","dates","schedule","appointments"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 23\' width=\'24\' height=\'23\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z\'/></svg>","supports":{"align":true,"alignWide":true,"html":false},"attributes":{"url":{"type":"string"},"height":{"type":"integer","default":600}},"example":{"attributes":{"url":"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}')},88322:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/mailchimp","title":"Mailchimp","description":"Allow readers to join a Mailchimp audience.","keywords":["email","subscription","newsletter"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m16.88,11.25c.17-.02.34-.02.49,0,.09-.2.1-.55.02-.93-.12-.57-.28-.91-.61-.86-.33.05-.34.46-.22,1.03.07.32.19.59.32.76\'/><path d=\'m14.03,11.7c.24.1.38.17.44.11.04-.04.03-.11-.03-.2-.12-.19-.36-.38-.61-.49-.52-.22-1.14-.15-1.62.19-.16.12-.31.28-.29.37,0,.03.03.06.09.06.13.01.59-.22,1.11-.25.37-.02.68.09.92.2\'/><path d=\'m13.56,11.97c-.31.05-.48.15-.59.25-.09.08-.15.17-.15.23,0,.03.01.05.02.06.01.01.03.02.05.02.07,0,.23-.06.23-.06.43-.15.71-.13.99-.1.16.02.23.03.26-.03.01-.02.02-.05,0-.1-.07-.12-.38-.32-.81-.26\'/><path d=\'m15.92,12.97c.21.1.44.06.52-.09s-.03-.36-.24-.46c-.21-.1-.44-.06-.52.09-.08.15.03.36.24.46\'/><path d=\'m17.26,11.79c-.17,0-.31.18-.32.42s.13.42.3.43.31-.18.32-.42c0-.23-.13-.42-.3-.43\'/><path d=\'m5.83,16c-.04-.05-.11-.04-.18-.02-.05.01-.1.02-.16.02-.13,0-.23-.06-.29-.15-.08-.12-.07-.3.01-.5l.04-.09c.14-.31.36-.82.11-1.31-.19-.37-.51-.6-.89-.64-.36-.05-.74.09-.98.35-.38.42-.44.98-.36,1.18.03.07.07.09.1.1.06,0,.16-.04.22-.2l.02-.05c.03-.08.08-.24.16-.37.1-.15.25-.26.43-.29.18-.04.37,0,.52.1.26.17.37.5.25.8-.06.16-.15.46-.13.72.04.51.35.71.63.73.27.01.46-.14.51-.25.03-.07,0-.11-.01-.12\'/><path d=\'m8.42,6.69c.89-1.03,1.98-1.92,2.96-2.42.03-.02.07.02.05.05-.08.14-.23.44-.28.67,0,.04.03.06.06.04.61-.42,1.67-.86,2.6-.92.04,0,.06.05.03.07-.14.11-.3.26-.41.41-.02.03,0,.06.03.06.65,0,1.57.23,2.17.57.04.02.01.1-.03.09-.91-.21-2.4-.37-3.94.01-1.38.34-2.43.86-3.2,1.41-.04.03-.09-.02-.05-.06h0Zm4.43,9.95h0s0,0,0,0h0Zm3.67.43s.04-.04.04-.07c0-.04-.04-.06-.07-.06,0,0-1.9.28-3.69-.38.2-.63.71-.41,1.5-.34,1.41.08,2.68-.12,3.62-.39.81-.23,1.88-.69,2.71-1.35.28.61.38,1.29.38,1.29,0,0,.22-.04.4.07.17.11.3.32.21.89-.17,1.05-.62,1.91-1.38,2.7-.46.49-1.02.92-1.65,1.24-.34.18-.7.33-1.08.46-2.84.93-5.75-.09-6.69-2.28-.07-.16-.14-.34-.19-.52-.4-1.44-.06-3.17,1-4.27h0c.07-.07.13-.15.13-.25,0-.09-.05-.18-.1-.24-.37-.54-1.66-1.45-1.4-3.23.19-1.27,1.3-2.17,2.34-2.12l.26.02c.45.03.84.08,1.21.1.62.03,1.18-.06,1.84-.61.22-.19.4-.35.7-.4.03,0,.11-.03.27-.03.16,0,.31.05.45.14.53.35.6,1.21.63,1.83.02.36.06,1.22.07,1.47.03.57.18.65.48.75.17.06.33.1.56.16.7.2,1.12.4,1.38.65.16.16.23.33.25.49.08.6-.47,1.35-1.93,2.03-1.59.74-3.53.93-4.87.78l-.47-.05c-1.07-.14-1.68,1.24-1.04,2.18.41.61,1.54,1.01,2.67,1.01,2.58,0,4.57-1.1,5.31-2.06l.06-.08c.04-.05,0-.08-.04-.05-.6.41-3.28,2.05-6.15,1.56,0,0-.35-.06-.67-.18-.25-.1-.78-.34-.85-.88,2.31.72,3.77.04,3.77.04h0ZM3.8,11.57c-.8.16-1.51.61-1.95,1.24-.26-.22-.74-.63-.83-.8-.69-1.31.76-3.87,1.77-5.32C5.3,3.13,9.21.43,11.02.92c.29.08,1.27,1.21,1.27,1.21,0,0-1.81,1.01-3.49,2.41-2.26,1.74-3.97,4.28-5,7.03h0Zm1.35,6.03c-.12.02-.25.03-.37.03-1.21-.03-2.52-1.12-2.65-2.42-.14-1.43.59-2.53,1.88-2.79.15-.03.34-.05.54-.04.72.04,1.79.6,2.04,2.17.22,1.4-.13,2.82-1.44,3.04h0Zm16.4-2.53s-.08-.28-.17-.58c-.09-.3-.19-.51-.19-.51.37-.56.38-1.06.33-1.34-.05-.35-.2-.65-.49-.96-.29-.31-.89-.62-1.74-.86l-.44-.12s-.02-1.04-.04-1.48c-.01-.32-.04-.82-.2-1.31-.18-.66-.5-1.24-.9-1.61,1.1-1.14,1.79-2.4,1.79-3.48,0-2.08-2.56-2.71-5.7-1.4l-.67.28s-1.2-1.18-1.22-1.2C8.33-2.63-2.89,9.84.7,12.86l.78.66c-.2.53-.28,1.13-.22,1.78.08.83.51,1.63,1.21,2.25.66.59,1.53.96,2.37.96,1.4,3.21,4.58,5.19,8.32,5.3,4.01.12,7.37-1.76,8.78-5.14.09-.24.48-1.31.48-2.25s-.54-1.34-.88-1.34\'/></svg>","supports":{"align":["wide","full"],"color":{"gradients":true},"spacing":{"padding":true,"margin":true}},"attributes":{"emailPlaceholder":{"type":"string","default":"Enter your email"},"consentText":{"type":"string","default":"By clicking submit, you agree to share your email address with the site owner and Mailchimp to receive marketing, updates, and other emails from the site owner. Use the unsubscribe link in those emails to opt out at any time."},"interests":{"type":"array","default":[]},"processingLabel":{"type":"string","default":"Processing…"},"signupFieldTag":{"type":"string"},"signupFieldValue":{"type":"string"},"successLabel":{"type":"string","default":"Success! You\'re on the list."},"errorLabel":{"type":"string","default":"Whoops! There was an error and we couldn\'t process your subscription. Please reload the page and try again."},"preview":{"type":"boolean","default":false}},"example":{"attributes":{"preview":true},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"button","text":"Join my Mailchimp audience","uniqueId":"mailchimp-widget-id"}}]}}')},45388:function(e){"use strict";e.exports=JSON.parse('[{"id":"mapbox-gl-js","file":"node_modules/mapbox-gl/dist/mapbox-gl.js","version":"1.13.0"},{"id":"mapbox-gl-css","file":"node_modules/mapbox-gl/dist/mapbox-gl.css","version":"1.13.0"}]')},32334:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/map","title":"Map","description":"Add an interactive map showing one or more locations.","keywords":["maps","location","navigation"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path fill=\'none\' d=\'M0 0h24v24H0V0z\' /><path d=\'M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z\' /></svg>","supports":{"defaultStylePicker":false,"html":false},"attributes":{"align":{"type":"string"},"points":{"type":"array","default":[]},"address":{"type":"string","default":""},"mapDetails":{"type":"boolean","default":true},"zoom":{"type":"integer","default":13},"mapCenter":{"type":"object","default":{"longitude":-122.41941550000001,"latitude":37.7749295}},"markerColor":{"type":"string","default":"red"},"preview":{"type":"boolean","default":false},"scrollToZoom":{"type":"boolean","default":false},"mapHeight":{"type":"integer"},"showFullscreenButton":{"type":"boolean","default":true}},"example":{"attributes":{"preview":true}}}')},41549:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/markdown","title":"Markdown","description":"Add headings, lists, or links to plain text with ease.","keywords":["formatting","syntax","markup"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg viewBox=\'0 0 208 128\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><rect width=\'198\' height=\'118\' x=\'5\' y=\'5\' ry=\'10\' stroke=\'currentColor\' strokeWidth=\'10\' fill=\'none\' /><path d=\'M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z\' />","supports":{"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":true,"margin":true}}},"attributes":{"source":{"type":"string"}},"example":{"attributes":{"source":"## ## Try Markdown\\n\\nMarkdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters."}}}')},46385:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/opentable","title":"OpenTable","description":"Book a reservation with OpenTable.","keywords":["booking","reservation","restaurant"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 22 16\' width=\'22\' height=\'16\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z\' /></svg>","supports":{"align":true,"html":false},"attributes":{"rid":{"default":[],"type":"array"},"style":{"default":"standard","type":"string","enum":["button","standard","wide","tall"]},"iframe":{"default":true,"type":"boolean"},"domain":{"default":"com","type":"string"},"lang":{"default":"en-US","type":"string","enum":["en-US","fr-CA","de-DE","es-MX","ja-JP","nl-NL","it-IT"]},"newtab":{"default":false,"type":"boolean"},"negativeMargin":{"default":false,"type":"boolean"}},"example":{"attributes":{"rid":["1"],"style":"standard","iframe":true,"domain":"com","lang":"en-US","newtab":false,"negativeMargin":false}}}')},55388:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/pinterest","title":"Pinterest","description":"Embed a Pinterest pin, board, or user.","keywords":["social","pinboard","pins"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12,2C6.477,2,2,6.477,2,12c0,4.236,2.636,7.855,6.356,9.312c-0.087-0.791-0.166-2.005,0.035-2.869c0.182-0.78,1.173-4.971,1.173-4.971s-0.299-0.599-0.299-1.484c0-1.39,0.806-2.429,1.809-2.429c0.853,0,1.265,0.641,1.265,1.409c0,0.858-0.546,2.141-0.828,3.329c-0.236,0.996,0.499,1.807,1.481,1.807c1.777,0,3.144-1.874,3.144-4.579c0-2.394-1.72-4.068-4.177-4.068c-2.845,0-4.515,2.134-4.515,4.34c0,0.859,0.331,1.781,0.744,2.282c0.082,0.099,0.094,0.186,0.069,0.287C8.18,14.682,8.011,15.361,7.978,15.5c-0.044,0.183-0.145,0.222-0.334,0.134c-1.249-0.581-2.03-2.407-2.03-3.874c0-3.154,2.292-6.051,6.607-6.051c3.469,0,6.165,2.472,6.165,5.775c0,3.446-2.173,6.22-5.189,6.22c-1.013,0-1.966-0.526-2.292-1.148c0,0-0.501,1.909-0.623,2.377c-0.226,0.869-0.835,1.957-1.243,2.622C9.975,21.844,10.969,22,12,22c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2z\'/></svg>","supports":{"html":false,"align":false},"attributes":{"url":{"type":"string"}},"example":{"attributes":{"url":"https://pinterest.com/anapinskywalker/"}}}')},98477:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/rating-star","title":"Star Rating","description":"Rate movies, books, songs, recipes — anything you can put a number on.","keywords":["star","rating","review"],"version":"12.5.0","textdomain":"jetpack","category":"widgets","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z\'/></svg>","supports":{"html":false},"styles":[{"name":"filled","label":"Filled","isDefault":true},{"name":"outlined","label":"Outlined"}],"attributes":{"rating":{"type":"number","default":1},"maxRating":{"type":"number","default":5},"color":{"type":"string"},"ratingStyle":{"type":"string","default":"star"},"className":{"type":"string"},"align":{"type":"string","default":"left"}},"example":{}}')},25411:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/related-posts","title":"Related Posts","description":"Display a list of related posts.","keywords":["similar content","linked","connected"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m19.5,3.5H3.5v4.94s.01,6,.01,6v4s-.01,0-.01,0v1h15.97v-.06h.05l-.02-15.88Zm-11,1v3.94s-3.99,0-3.99,0v-3.94s3.99,0,3.99,0Zm.01,4.94v4h-4v-4h4Zm-3.99,9v-4s3.99,0,3.99,0v4s-3.99,0-3.99,0Zm13.98-13.94v3.94s-8.99,0-8.99,0v-3.94s8.99,0,8.99,0Zm.01,4.94v4h-9v-4h9Zm-8.99,9v-4s8.99,0,8.99,0v4s-8.99,0-8.99,0Z\'/></svg>","supports":{"html":false,"multiple":false,"reusable":false,"color":{"gradients":true,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"__experimentalFontFamily":true,"fontSize":true,"lineHeight":true},"align":["wide","full"]},"attributes":{"postLayout":{"type":"string","default":"grid"},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":true},"displayHeadline":{"type":"boolean","default":false},"displayThumbnails":{"type":"boolean","default":false},"displayContext":{"type":"boolean","default":false},"headline":{"type":"string","default":""},"postsToShow":{"type":"number","default":3}},"example":{"attributes":{"postLayout":"grid","displayAuthor":false,"displayDate":true,"displayHeadline":false,"displayThumbnails":true,"displayContext":false,"headline":"","postsToShow":2}}}')},18962:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/repeat-visitor","title":"Repeat Visitor","description":"Control block visibility based on how often a visitor has viewed the page.","keywords":["return","visitors","visibility"],"version":"12.5.0","textdomain":"jetpack","category":"widgets","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\'/></svg>","supports":{"align":["wide","full"],"html":false},"attributes":{"criteria":{"type":"string","default":"after-visits"},"threshold":{"type":"number","default":3}},"example":{"attributes":{"criteria":"after-visits","threshold":3},"innerBlocks":[{"name":"core/paragraph","attributes":"This block will only appear to a visitor who visited the page three or more times."}]}}')},26523:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/slideshow","title":"Slideshow","description":"Display multiple images in sequential order.","keywords":["story","image","video","gallery"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m19,21.5H6v-1h13c.83,0,1.5-.67,1.5-1.5v-11h1v11c0,1.38-1.12,2.5-2.5,2.5Z\'/><path d=\'m16.38,3.25H4.62c-.75,0-1.37.62-1.37,1.37v11.76c0,.75.62,1.37,1.37,1.37h11.76c.75,0,1.37-.62,1.37-1.37V4.62c0-.75-.62-1.37-1.37-1.37Zm.37,13.13c0,.2-.17.37-.37.37H4.62c-.2,0-.37-.17-.37-.37V4.62c0-.2.17-.37.37-.37h11.76c.2,0,.37.17.37.37v11.76Z\'/><path d=\'M9.39 7.51 12.73 11.04 9.31 14.32 8.61 13.6 11.34 10.99 8.67 8.2 9.39 7.51z\'/></svg>","supports":{"html":false,"align":["center","wide","full"]},"attributes":{"align":{"default":"center","type":"string"},"autoplay":{"type":"boolean","default":false},"delay":{"type":"number","default":3},"ids":{"default":[],"type":"array"},"images":{"type":"array","default":[],"source":"query","selector":".swiper-slide","query":{"alt":{"source":"attribute","selector":"img","attribute":"alt","default":""},"caption":{"type":"string","source":"html","selector":"figcaption"},"id":{"source":"attribute","selector":"img","attribute":"data-id"},"url":{"source":"attribute","selector":"img","attribute":"src"}}},"effect":{"type":"string","default":"slide"},"sizeSlug":{"type":"string"}},"example":{"align":"center","autoplay":true,"ids":[22,23,24],"images":[{"alt":"","caption":"","id":22,"url":"./slideshowExample1.png"},{"alt":"","caption":"","id":23,"url":"./slideshowExample2.png"},{"alt":"","caption":"","id":24,"url":"./slideshowExample3.png"}],"effect":"slide"}}')},99496:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/tiled-gallery","title":"Tiled Gallery","description":"Display multiple images in an elegantly organized tiled layout.","keywords":["columns","images","photos","pictures","square","circle","mosaic"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z\'/></svg>","supports":{"align":["center","wide","full"],"color":{"gradients":true,"text":false},"customClassName":false,"html":false,"spacing":{"margin":true,"padding":true},"__experimentalHideChildBlockControls":true},"providesContext":{"imageCrop":"imageCrop"},"styles":[{"name":"rectangular","label":"Tiled mosaic","isDefault":true},{"name":"circle","label":"Circles"},{"name":"square","label":"Square tiles"},{"name":"columns","label":"Tiled columns"}],"attributes":{"align":{"type":"string","default":"center"},"className":{"type":"string","default":"is-style-rectangular"},"columns":{"type":"number"},"columnWidths":{"type":"array","default":[]},"ids":{"type":"array","default":[]},"imageFilter":{"type":"string"},"images":{"type":"array","default":[],"source":"query","selector":".tiled-gallery__item","query":{"alt":{"attribute":"alt","default":"","selector":"img","source":"attribute"},"height":{"attribute":"data-height","type":"number","selector":"img","source":"attribute"},"id":{"attribute":"data-id","selector":"img","source":"attribute"},"link":{"attribute":"data-link","selector":"img","source":"attribute"},"url":{"attribute":"data-url","selector":"img","source":"attribute"},"width":{"attribute":"data-width","selector":"img","source":"attribute","type":"number"}}},"imageCrop":{"type":"boolean","default":true},"linkTo":{"default":"none","type":"string"},"roundedCorners":{"type":"integer","default":0}}}')},27508:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/tock","title":"Tock","description":"Reserve a table at your restaurant with Tock.","keywords":["booking","reservation","restaurant"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M10 15.619C6.84915 15.619 4.28572 13.0542 4.28572 9.90176C4.28572 7.24269 6.10957 5.00183 8.57143 4.36551V0C3.72557 0.693782 0 4.86162 0 9.90176C0 15.4274 4.47715 19.9069 10 19.9069C12.2461 19.9069 14.3193 19.1658 15.9887 17.9148L12.9003 14.825C12.0494 15.3287 11.0581 15.619 10 15.619 M15.7135 9.90176C15.7135 10.9604 15.4233 11.9522 14.9199 12.8035L18.0082 15.8935C19.2585 14.2232 19.9992 12.149 19.9992 9.90176C19.9992 4.86162 16.2736 0.693782 11.4277 0V4.36551C13.8896 5.00183 15.7135 7.24269 15.7135 9.90176\'/></svg>","supports":{"align":true,"html":false,"multiple":false},"attributes":{"url":{"type":"string"}},"example":{"attributes":{"url":"roister"},"viewportWidth":250}}')},99787:function(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":1,"name":"jetpack/wordads","title":"Ad","description":"Earn income by adding high quality ads to your post.","keywords":["ads","WordAds","advertisement"],"version":"12.5.0","textdomain":"jetpack","category":"earn","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M15,15.6L13,14H4V10H13L15,8.4V15.6M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z\'/></svg>","supports":{"align":["left","center","right"],"alignWide":false,"className":false,"customClassName":false,"html":false,"reusable":false},"attributes":{"align":{"type":"string","default":"center"},"format":{"type":"string","default":"mrec"},"hideMobile":{"type":"boolean","default":false}},"example":{}}')},1949:function(e){"use strict";e.exports=JSON.parse('{"production":["ai-assistant","ai-chat","ai-assistant-plugin","blogging-prompt","business-hours","button","calendly","cookie-consent","contact-form","contact-form/salesforce-lead-form","contact-info","donations","eventbrite","gif","google-calendar","image-compare","instagram-gallery","likes","mailchimp","map","markdown","opentable","payments","pinterest","podcast-player","premium-content","publicize","rating-star","recurring-payments","related-posts","repeat-visitor","send-a-message","whatsapp-button","seo","sharing","shortlinks","simple-payments","slideshow","social-previews","story","subscriptions","tiled-gallery","tock","videopress","wordads","payments-intro","post-publish-qr-post-panel","payment-buttons","site-editor-snackbars","videopress/video","ai-assistant-support","ai-assistant-form-support","paywall","ai-content-lens","blogroll","blogroll-item","nextdoor"],"beta":["amazon","google-docs-embed","launchpad-save-modal","recipe","v6-video-frame-poster","videopress/video-chapters","create-with-voice","ai-assistant-backend-prompts","ai-assistant-usage-panel"],"experimental":["ai-image","ai-paragraph"],"no-post-editor":["ai-assistant","business-hours","button","calendly","contact-form","contact-info","donations","eventbrite","gif","google-calendar","instagram-gallery","mailchimp","map","markdown","opentable","pinterest","rating-star","related-posts","repeat-visitor","simple-payments","slideshow","tiled-gallery","tock","videopress","wordads"]}')}},s={};function l(e){var t=s[e];if(void 0!==t)return t.exports;var n=s[e]={exports:{}};return i[e].call(n.exports,n,n.exports,l),n.exports}l.m=i,l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},l.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var o=Object.create(null);l.r(o);var a={};e=e||[null,t({}),t([]),t(t)];for(var i=2&r&&n;"object"==typeof i&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach((function(e){a[e]=function(){return n[e]}}));return a.default=function(){return n},l.d(o,a),o},l.d=function(e,t){for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.f={},l.e=function(e){return Promise.all(Object.keys(l.f).reduce((function(t,n){return l.f[n](e,t),t}),[]))},l.u=function(e){return(390===e?"swiper":e)+".js?minify=false&ver="+{390:"8b6480569f4846689039",958:"66c366212c053723820f"}[e]},l.miniCssF=function(e){return"swiper.css?minify=false&ver=250f2a70eef2093db46f"},function(){if(!l.miniCssF)throw new Error("MiniCSSWithRTLPlugin was loaded before MiniCSSExtractPlugin");var e;l.miniCssF=(e=l.miniCssF,function(t){var n="rtl"===document.dir,r=e(t);return n?r.replace(/\.css(?:$|\?)/,".rtl$&"):r})}(),l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n={},r="Jetpack:",l.l=function(e,t,o,a){if(n[e])n[e].push(t);else{var i,s;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var p=c[u];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(s=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,l.nc&&i.setAttribute("nonce",l.nc),i.setAttribute("data-webpack",r+o),i.src=e),n[e]=[t];var d=function(t,r){i.onerror=i.onload=null,clearTimeout(m);var o=n[e];if(delete n[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((function(e){return e(r)})),t)return t(r)},m=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),s&&document.head.appendChild(i)}},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e}(),o=function(e){return new Promise((function(t,n){var r=l.miniCssF(e),o=l.p+r;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var o=(i=n[r]).getAttribute("data-href")||i.getAttribute("href");if("stylesheet"===i.rel&&(o===e||o===t))return i}var a=document.getElementsByTagName("style");for(r=0;r<a.length;r++){var i;if((o=(i=a[r]).getAttribute("data-href"))===e||o===t)return i}}(r,o))return t();!function(e,t,n,r){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(a){if(o.onerror=o.onload=null,"load"===a.type)n();else{var i=a&&("load"===a.type?"missing":a.type),s=a&&a.target&&a.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");l.code="CSS_CHUNK_LOAD_FAILED",l.type=i,l.request=s,o.parentNode.removeChild(o),r(l)}},o.href=t,document.head.appendChild(o)}(e,o,t,n)}))},a={486:0},l.f.miniCss=function(e,t){a[e]?t.push(a[e]):0!==a[e]&&{390:1}[e]&&t.push(a[e]=o(e).then((function(){a[e]=0}),(function(t){throw delete a[e],t})))},function(){var e={486:0};l.f.j=function(t,n){var r=l.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else if(390!=t){var o=new Promise((function(n,o){r=e[t]=[n,o]}));n.push(r[2]=o);var a=l.p+l.u(t),i=new Error;l.l(a,(function(n){if(l.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;i.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,r[1](i)}}),"chunk-"+t,t)}else e[t]=0};var t=function(t,n){var r,o,a=n[0],i=n[1],s=n[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(r in i)l.o(i,r)&&(l.m[r]=i[r]);if(s)s(l)}for(t&&t(n);c<a.length;c++)o=a[c],l.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunkJetpack=self.webpackChunkJetpack||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}(),l(78680),l(27559),l(60866),l(48887),l(52020),l(82566),l(67140),l(83772),l(63139),l(58710),l(34575),l(61204),l(22055),l(49702),l(92482),l(7414),l(36836),l(89517),l(50323),l(36227),l(17013),l(47158),l(14035),l(37549);l(3432)}(); | |
| 52 | +__("Minimum allowed price is %s.","jetpack"),(0,n.vv)(y,b)),m),void o(!1);if(!(0,l.kF)(b,v))return(0,d.S)((0,c.W)("product requires a valid price",t),m),void o(!1);try{const n=await s()({path:"/wpcom/v2/memberships/product",method:"POST",data:e}),i={id:n.id,title:n.title,interval:n.interval,price:n.price,currency:n.currency},l=m.select(u.EF).getProducts();a(p(l.concat([i]))),r([i.id]),h&&(0,d.L)((0,c.W)("successfully created product",t),m),o(!0)}catch{(0,d.S)((0,c.W)("there was an error when adding the product",t),m),o(!1)}},v=e=>({type:"SET_SUBSCRIBER_COUNTS",subscriberCounts:e}),y=e=>({type:"SET_TOTAL_EMAILS_SENT_COUNT",totalEmailsSentCount:e}),k=e=>({type:"SET_NEWSLETTER_CATEGORIES",newsletterCategories:e}),w=(e,{email_sent_at:t,stats_on_send:r})=>({type:"SET_POST_EMAIL_SENT_STATE",postId:e,payload:{email_sent_at:t,stats_on_send:r}}),_=e=>({type:"SET_ALREADY_SENT_POST_MODIFIED_IN_SESSION",postId:e}),x=e=>({type:"SET_PUBLISHED_WITH_EMAIL_ENABLED_IN_SESSION",postId:e})},3696(e,t,r){"use strict";r.d(t,{EF:()=>n,JA:()=>s,an:()=>o,gI:()=>i,ky:()=>a});const n="jetpack/membership-products",o=0,s=1,i=2,a="tier"},16521(e,t,r){"use strict";r.d(t,{M:()=>l});var n=r(47143),o=r(66314),s=r(3696),i=r(91497),a=r(18410),c=r(92955);const l=(0,n.createReduxStore)(s.EF,{actions:o,reducer:i.A,resolvers:a,selectors:c,__experimentalUseThunks:!0});(0,n.register)(l)},91497(e,t,r){"use strict";r.d(t,{A:()=>o});const n={products:[],apiState:r(3696).an,connectUrl:null,siteSlug:"",connectedAccountDefaultCurrency:"",subscriberCounts:{totalSubscribers:null,socialFollowers:null,emailSubscribers:null,paidSubscribers:null},newsletterCategories:{enabled:!1,categories:[]},postEmailSentState:{},alreadySentPostModifiedInSession:{},publishedWithEmailEnabledInSession:{}};function o(e=n,t){switch(t.type){case"SET_PRODUCTS":return{...e,products:t.products};case"SET_CONNECT_URL":return{...e,connectUrl:t.connectUrl};case"SET_API_STATE":return{...e,apiState:t.apiState};case"SET_SITE_SLUG":return{...e,siteSlug:t.siteSlug};case"SET_CONNECTED_ACCOUNT_DEFAULT_CURRENCY":return{...e,connectedAccountDefaultCurrency:t.connectedAccountDefaultCurrency};case"SET_SUBSCRIBER_COUNTS":return{...e,subscriberCounts:t.subscriberCounts};case"SET_TOTAL_EMAILS_SENT_COUNT":return{...e,totalEmailsSentCount:t.totalEmailsSentCount};case"SET_NEWSLETTER_CATEGORIES":return{...e,newsletterCategories:t.newsletterCategories};case"SET_POST_EMAIL_SENT_STATE":return{...e,postEmailSentState:{...e.postEmailSentState,[t.postId]:{email_sent_at:t.payload.email_sent_at??null,stats_on_send:t.payload.stats_on_send??null}}};case"SET_ALREADY_SENT_POST_MODIFIED_IN_SESSION":return{...e,alreadySentPostModifiedInSession:{...e.alreadySentPostModifiedInSession,[t.postId]:!0}};case"SET_PUBLISHED_WITH_EMAIL_ENABLED_IN_SESSION":return{...e,publishedWithEmailEnabledInSession:{...e.publishedWithEmailEnabledInSession,[t.postId]:!0}}}return e}},18410(e,t,r){"use strict";r.r(t),r.d(t,{getNewsletterCategories:()=>A,getNewsletterTierProducts:()=>_,getPostEmailSentState:()=>S,getProducts:()=>x,getSubscriberCounts:()=>j,getTotalEmailsSentCount:()=>C});var n=r(97999),o=r(1455),s=r.n(o),i=r(43656),a=r(93832),c=r(29726),l=r(1990),u=r(56539),d=r(27574),p=r(66314),h=r(3696),m=r(34884);const g="membership-products-resolver-getProducts",f="membership-products-resolver-getSubscriberCounts",b="membership-products-resolver-getTotalEmailsSentCount",v="membership-products-resolver-getNewsletterCategories",y="membership-products-resolver-getPostEmailSentState";let k=!1;const w=(e,t,r)=>{if(e.length>0)return;const n=r.getProductsNoResolver()[0]?.id;n&&t([n])},_=(e=c._$,t=[],r=()=>{})=>x(e,t,r,!1),x=(e=c._$,t=[],r=()=>{},n=!0)=>async({dispatch:o,registry:c,select:f})=>{if(await u.A.blockExecution(g),k)return void w(t,r,f);const b=u.A.acquire(g);try{const u=await(async()=>{const e=(0,a.getQueryArg)(window.location.href,"origin"),t=(0,a.addQueryArgs)("/wpcom/v2/memberships/status",{source:"https://wordpress.com"===e?"gutenberg-wpcom":"gutenberg",type:"all",is_editable:!0}),r=await s()({path:t,method:"GET"});if(!r&&"object"!=typeof r)throw new Error("Unexpected API response");const n=r?.errors&&Object.values(r.errors)?.[0]?.[0];if(n)throw new Error(n);return r})();((e,t,r)=>{const n=t.select(i.store).getCurrentPostId();r((0,p.setConnectUrl)((0,d.A)(n,e.connect_url))),r((0,p.setSiteSlug)(e.site_slug)),r((0,p.setProducts)(e.products)),r((0,p.setConnectedAccountDefaultCurrency)(e.connected_account_default_currency)),r((0,p.setApiState)(e.connected_account_id?h.JA:h.gI))})(u,c,o),(e=>!e.products.length&&e.connected_account_id)(u)&&await(async(e,t,r,n)=>{await r((0,p.saveProduct)({title:(0,l.W)("default new product title",e),currency:"USD",price:5,interval:"1 month"},e,t,()=>{},n))})(e,r,o,n),w(t,r,f),k=!0}catch(e){o((0,p.setConnectUrl)(null)),o((0,p.setApiState)(h.gI)),(0,m.S)(e.message,c)}finally{u.A.release(b)}},j=()=>async({dispatch:e,registry:t})=>{await u.A.blockExecution(f);const r=u.A.acquire(f);try{const t=await(async()=>{const e=await s()({path:(0,a.addQueryArgs)("/wpcom/v2/subscribers/counts",{subscriber_status:"active",subscription_status:"active"})});if(!e||"object"!=typeof e)throw new Error("Unexpected API response");const t=e?.errors&&Object.values(e.errors)?.[0]?.[0];if(t)throw new Error(t);return e})();e((0,p.setSubscriberCounts)({totalSubscribers:t.counts.total_subscribers,socialFollowers:t.counts.social_followers,emailSubscribers:t.counts.email_subscribers,paidSubscribers:t.counts.paid_subscribers}))}catch(r){e((0,p.setApiState)(h.gI)),(0,m.S)(r.message,t)}finally{u.A.release(r)}},C=(e,t)=>async({dispatch:r})=>{await u.A.blockExecution(b);const o=u.A.acquire(b);try{const o=await(async(e,t)=>{if(!e||!t)return;const r=(0,n.isSimpleSite)()?"/rest/v1.1/sites":"/jetpack/v4/stats-app/sites",o=await s()({path:r+`/${e}/stats/opens/emails/${t}/rate`});if(!o||"object"!=typeof o)throw new Error("Unexpected API response");const i=o?.errors&&Object.values(o.errors)?.[0]?.[0];if(i)throw new Error(i);return o})(e,t);r((0,p.setTotalEmailsSentCount)(o?.total_sends))}catch(e){console.warn("Failed to fetch total emails sent count:",e?.message)}finally{u.A.release(o)}},A=()=>async({dispatch:e,registry:t})=>{await u.A.blockExecution(v);const r=u.A.acquire(v);try{const t=await(async()=>{const e=await s()({path:"/wpcom/v2/newsletter-categories"});if(!e||"object"!=typeof e)throw new Error("Unexpected API response");const t=e?.errors&&Object.values(e.errors)?.[0]?.[0];if(t)throw new Error(t);return e})();e((0,p.setNewsletterCategories)({enabled:t.enabled,categories:t.newsletter_categories}))}catch(r){e((0,p.setApiState)(h.gI)),(0,m.S)(r.message,t)}finally{u.A.release(r)}},S=e=>async({dispatch:t,registry:r})=>{if(!e)return;await u.A.blockExecution(y);const n=u.A.acquire(y);try{const r=await(async e=>{if(!e)return{email_sent_at:null,stats_on_send:null};const t=await s()({path:(0,a.addQueryArgs)("/wpcom/v2/newsletter-email-sent-status",{post_id:e}),method:"GET"});if(!t||"object"!=typeof t)throw new Error("Unexpected API response");const r=t?.errors&&Object.values(t.errors)?.[0]?.[0];if(r)throw new Error(r);return t})(e);t((0,p.setPostEmailSentState)(e,{email_sent_at:r.email_sent_at??null,stats_on_send:r.stats_on_send??null}))}catch(e){(0,m.S)(e.message,r)}finally{u.A.release(n)}}},92955(e,t,r){"use strict";r.r(t),r.d(t,{getAlreadySentPostModifiedInSession:()=>_,getApiState:()=>o,getConnectUrl:()=>s,getConnectedAccountDefaultCurrency:()=>i,getNewsletterCategories:()=>v,getNewsletterCategoriesEnabled:()=>y,getNewsletterTierProducts:()=>d,getPostEmailSentState:()=>w,getProduct:()=>l,getProducts:()=>a,getProductsNoResolver:()=>c,getPublishedWithEmailEnabledInSession:()=>x,getSelectedProducts:()=>u,getSiteSlug:()=>p,getSubscriberCounts:()=>f,getTotalEmailsSentCount:()=>b,hasInvalidProducts:()=>j,isApiStateConnected:()=>h,isApiStateLoading:()=>m,isInvalidProduct:()=>g});var n=r(3696);const o=e=>e.apiState,s=e=>e.connectUrl,i=e=>e.connectedAccountDefaultCurrency,a=e=>e.products,c=e=>a(e),l=(e,t)=>a(e).find(e=>e.id===t),u=(e,t)=>a(e).filter(e=>t.includes(e.id)),d=e=>e.products.filter(e=>e.type===n.ky),p=e=>e.siteSlug,h=e=>e.apiState===n.JA,m=e=>e.apiState===n.an,g=(e,t)=>!!t&&!l(e,t),f=e=>e.subscriberCounts,b=e=>e.totalEmailsSentCount,v=e=>e.newsletterCategories.categories,y=e=>e.newsletterCategories.enabled,k={email_sent_at:null,stats_on_send:null},w=(e,t)=>t?e.postEmailSentState?.[t]??k:k,_=(e,t)=>!(!e.alreadySentPostModifiedInSession||!e.alreadySentPostModifiedInSession[t]),x=(e,t)=>!(!e.publishedWithEmailEnabledInSession||!e.publishedWithEmailEnabledInSession[t]),j=(e,t)=>!!t&&t.some(t=>g(e,t))},34884(e,t,r){"use strict";r.d(t,{L:()=>s,S:()=>o});var n=r(692);const o=(e,t)=>t.dispatch(n.store).createErrorNotice(e,{type:"snackbar"}),s=(e,t)=>t.dispatch(n.store).createSuccessNotice(e,{type:"snackbar"})},26356(e,t,r){"use strict";r.d(t,{i:()=>o,y:()=>n});const n={AED:{symbol:"د.إ.",grouping:",",decimal:".",precision:2},AFN:{symbol:"؋",grouping:",",decimal:".",precision:2},ALL:{symbol:"Lek",grouping:".",decimal:",",precision:2},AMD:{symbol:"֏",grouping:",",decimal:".",precision:2},ANG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AOA:{symbol:"Kz",grouping:",",decimal:".",precision:2},ARS:{symbol:"$",grouping:".",decimal:",",precision:2},AUD:{symbol:"A$",grouping:",",decimal:".",precision:2},AWG:{symbol:"ƒ",grouping:",",decimal:".",precision:2},AZN:{symbol:"₼",grouping:" ",decimal:",",precision:2},BAM:{symbol:"КМ",grouping:".",decimal:",",precision:2},BBD:{symbol:"Bds$",grouping:",",decimal:".",precision:2},BDT:{symbol:"৳",grouping:",",decimal:".",precision:0},BGN:{symbol:"лв.",grouping:" ",decimal:",",precision:2},BHD:{symbol:"د.ب.",grouping:",",decimal:".",precision:3},BIF:{symbol:"FBu",grouping:",",decimal:".",precision:0},BMD:{symbol:"$",grouping:",",decimal:".",precision:2},BND:{symbol:"$",grouping:".",decimal:",",precision:0},BOB:{symbol:"Bs",grouping:".",decimal:",",precision:2},BRL:{symbol:"R$",grouping:".",decimal:",",precision:2},BSD:{symbol:"$",grouping:",",decimal:".",precision:2},BTC:{symbol:"Ƀ",grouping:",",decimal:".",precision:2},BTN:{symbol:"Nu.",grouping:",",decimal:".",precision:1},BWP:{symbol:"P",grouping:",",decimal:".",precision:2},BYR:{symbol:"р.",grouping:" ",decimal:",",precision:2},BZD:{symbol:"BZ$",grouping:",",decimal:".",precision:2},CAD:{symbol:"C$",grouping:",",decimal:".",precision:2},CDF:{symbol:"FC",grouping:",",decimal:".",precision:2},CHF:{symbol:"CHF",grouping:"'",decimal:".",precision:2},CLP:{symbol:"$",grouping:".",decimal:",",precision:2},CNY:{symbol:"¥",grouping:",",decimal:".",precision:2},COP:{symbol:"$",grouping:".",decimal:",",precision:2},CRC:{symbol:"₡",grouping:".",decimal:",",precision:2},CUC:{symbol:"CUC",grouping:",",decimal:".",precision:2},CUP:{symbol:"$MN",grouping:",",decimal:".",precision:2},CVE:{symbol:"$",grouping:",",decimal:".",precision:2},CZK:{symbol:"Kč",grouping:" ",decimal:",",precision:2},DJF:{symbol:"Fdj",grouping:",",decimal:".",precision:0},DKK:{symbol:"kr.",grouping:"",decimal:",",precision:2},DOP:{symbol:"RD$",grouping:",",decimal:".",precision:2},DZD:{symbol:"د.ج.",grouping:",",decimal:".",precision:2},EGP:{symbol:"ج.م.",grouping:",",decimal:".",precision:2},ERN:{symbol:"Nfk",grouping:",",decimal:".",precision:2},ETB:{symbol:"ETB",grouping:",",decimal:".",precision:2},EUR:{symbol:"€",grouping:".",decimal:",",precision:2},FJD:{symbol:"FJ$",grouping:",",decimal:".",precision:2},FKP:{symbol:"£",grouping:",",decimal:".",precision:2},GBP:{symbol:"£",grouping:",",decimal:".",precision:2},GEL:{symbol:"Lari",grouping:" ",decimal:",",precision:2},GHS:{symbol:"₵",grouping:",",decimal:".",precision:2},GIP:{symbol:"£",grouping:",",decimal:".",precision:2},GMD:{symbol:"D",grouping:",",decimal:".",precision:2},GNF:{symbol:"FG",grouping:",",decimal:".",precision:0},GTQ:{symbol:"Q",grouping:",",decimal:".",precision:2},GYD:{symbol:"G$",grouping:",",decimal:".",precision:2},HKD:{symbol:"HK$",grouping:",",decimal:".",precision:2},HNL:{symbol:"L.",grouping:",",decimal:".",precision:2},HRK:{symbol:"kn",grouping:".",decimal:",",precision:2},HTG:{symbol:"G",grouping:",",decimal:".",precision:2},HUF:{symbol:"Ft",grouping:".",decimal:",",precision:0},IDR:{symbol:"Rp",grouping:".",decimal:",",precision:0},ILS:{symbol:"₪",grouping:",",decimal:".",precision:2},INR:{symbol:"₹",grouping:",",decimal:".",precision:2},IQD:{symbol:"د.ع.",grouping:",",decimal:".",precision:2},IRR:{symbol:"﷼",grouping:",",decimal:"/",precision:2},ISK:{symbol:"kr.",grouping:".",decimal:",",precision:0},JMD:{symbol:"J$",grouping:",",decimal:".",precision:2},JOD:{symbol:"د.ا.",grouping:",",decimal:".",precision:3},JPY:{symbol:"¥",grouping:",",decimal:".",precision:0},KES:{symbol:"S",grouping:",",decimal:".",precision:2},KGS:{symbol:"сом",grouping:" ",decimal:"-",precision:2},KHR:{symbol:"៛",grouping:",",decimal:".",precision:0},KMF:{symbol:"CF",grouping:",",decimal:".",precision:2},KPW:{symbol:"₩",grouping:",",decimal:".",precision:0},KRW:{symbol:"₩",grouping:",",decimal:".",precision:0},KWD:{symbol:"د.ك.",grouping:",",decimal:".",precision:3},KYD:{symbol:"$",grouping:",",decimal:".",precision:2},KZT:{symbol:"₸",grouping:" ",decimal:"-",precision:2},LAK:{symbol:"₭",grouping:",",decimal:".",precision:0},LBP:{symbol:"ل.ل.",grouping:",",decimal:".",precision:2},LKR:{symbol:"₨",grouping:",",decimal:".",precision:0},LRD:{symbol:"L$",grouping:",",decimal:".",precision:2},LSL:{symbol:"M",grouping:",",decimal:".",precision:2},LYD:{symbol:"د.ل.",grouping:",",decimal:".",precision:3},MAD:{symbol:"د.م.",grouping:",",decimal:".",precision:2},MDL:{symbol:"lei",grouping:",",decimal:".",precision:2},MGA:{symbol:"Ar",grouping:",",decimal:".",precision:0},MKD:{symbol:"ден.",grouping:".",decimal:",",precision:2},MMK:{symbol:"K",grouping:",",decimal:".",precision:2},MNT:{symbol:"₮",grouping:" ",decimal:",",precision:2},MOP:{symbol:"MOP$",grouping:",",decimal:".",precision:2},MRO:{symbol:"UM",grouping:",",decimal:".",precision:2},MTL:{symbol:"₤",grouping:",",decimal:".",precision:2},MUR:{symbol:"₨",grouping:",",decimal:".",precision:2},MVR:{symbol:"MVR",grouping:",",decimal:".",precision:1},MWK:{symbol:"MK",grouping:",",decimal:".",precision:2},MXN:{symbol:"MX$",grouping:",",decimal:".",precision:2},MYR:{symbol:"RM",grouping:",",decimal:".",precision:2},MZN:{symbol:"MT",grouping:",",decimal:".",precision:0},NAD:{symbol:"N$",grouping:",",decimal:".",precision:2},NGN:{symbol:"₦",grouping:",",decimal:".",precision:2},NIO:{symbol:"C$",grouping:",",decimal:".",precision:2},NOK:{symbol:"kr",grouping:" ",decimal:",",precision:2},NPR:{symbol:"₨",grouping:",",decimal:".",precision:2},NZD:{symbol:"NZ$",grouping:",",decimal:".",precision:2},OMR:{symbol:"﷼",grouping:",",decimal:".",precision:3},PAB:{symbol:"B/.",grouping:",",decimal:".",precision:2},PEN:{symbol:"S/.",grouping:",",decimal:".",precision:2},PGK:{symbol:"K",grouping:",",decimal:".",precision:2},PHP:{symbol:"₱",grouping:",",decimal:".",precision:2},PKR:{symbol:"₨",grouping:",",decimal:".",precision:2},PLN:{symbol:"zł",grouping:" ",decimal:",",precision:2},PYG:{symbol:"₲",grouping:".",decimal:",",precision:2},QAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},RON:{symbol:"lei",grouping:".",decimal:",",precision:2},RSD:{symbol:"Дин.",grouping:".",decimal:",",precision:2},RUB:{symbol:"₽",grouping:" ",decimal:",",precision:2},RWF:{symbol:"RWF",grouping:" ",decimal:",",precision:2},SAR:{symbol:"﷼",grouping:",",decimal:".",precision:2},SBD:{symbol:"S$",grouping:",",decimal:".",precision:2},SCR:{symbol:"₨",grouping:",",decimal:".",precision:2},SDD:{symbol:"LSd",grouping:",",decimal:".",precision:2},SDG:{symbol:"£",grouping:",",decimal:".",precision:2},SEK:{symbol:"kr",grouping:",",decimal:".",precision:2},SGD:{symbol:"S$",grouping:",",decimal:".",precision:2},SHP:{symbol:"£",grouping:",",decimal:".",precision:2},SLL:{symbol:"Le",grouping:",",decimal:".",precision:2},SOS:{symbol:"S",grouping:",",decimal:".",precision:2},SRD:{symbol:"$",grouping:",",decimal:".",precision:2},STD:{symbol:"Db",grouping:",",decimal:".",precision:2},SVC:{symbol:"₡",grouping:",",decimal:".",precision:2},SYP:{symbol:"£",grouping:",",decimal:".",precision:2},SZL:{symbol:"E",grouping:",",decimal:".",precision:2},THB:{symbol:"฿",grouping:",",decimal:".",precision:2},TJS:{symbol:"TJS",grouping:" ",decimal:";",precision:2},TMT:{symbol:"m",grouping:" ",decimal:",",precision:0},TND:{symbol:"د.ت.",grouping:",",decimal:".",precision:3},TOP:{symbol:"T$",grouping:",",decimal:".",precision:2},TRY:{symbol:"TL",grouping:".",decimal:",",precision:2},TTD:{symbol:"TT$",grouping:",",decimal:".",precision:2},TVD:{symbol:"$T",grouping:",",decimal:".",precision:2},TWD:{symbol:"NT$",grouping:",",decimal:".",precision:2},TZS:{symbol:"TSh",grouping:",",decimal:".",precision:2},UAH:{symbol:"₴",grouping:" ",decimal:",",precision:2},UGX:{symbol:"USh",grouping:",",decimal:".",precision:2},USD:{symbol:"$",grouping:",",decimal:".",precision:2},UYU:{symbol:"$U",grouping:".",decimal:",",precision:2},UZS:{symbol:"сўм",grouping:" ",decimal:",",precision:2},VEB:{symbol:"Bs.",grouping:",",decimal:".",precision:2},VEF:{symbol:"Bs. F.",grouping:".",decimal:",",precision:2},VND:{symbol:"₫",grouping:".",decimal:",",precision:1},VUV:{symbol:"VT",grouping:",",decimal:".",precision:0},WST:{symbol:"WS$",grouping:",",decimal:".",precision:2},XAF:{symbol:"F",grouping:",",decimal:".",precision:2},XCD:{symbol:"$",grouping:",",decimal:".",precision:2},XOF:{symbol:"F",grouping:" ",decimal:",",precision:2},XPF:{symbol:"F",grouping:",",decimal:".",precision:2},YER:{symbol:"﷼",grouping:",",decimal:".",precision:2},ZAR:{symbol:"R",grouping:" ",decimal:",",precision:2},ZMW:{symbol:"ZK",grouping:",",decimal:".",precision:2},WON:{symbol:"₩",grouping:",",decimal:".",precision:2}};function o(e){return n[e]||{symbol:"$",grouping:",",decimal:".",precision:2}}},4567(e,t,r){"use strict";r.d(t,{Ay:()=>s});var n=r(26356),o=r(18360);function s(e,t,r={}){const s=(0,n.i)(t);if(!s||isNaN(e))return null;const{decimal:i,grouping:a,precision:c,symbol:l}={...s,...r},u=e<0?"-":"";let d=(0,o.A)(Math.abs(e),c,i,a);return r.stripZeros&&(d=function(e,t){const r=new RegExp(`\\${t}0+$`);return e.replace(r,"")}(d,i)),`${u}${l}${d}`}},18360(e,t,r){"use strict";function n(e,t=0,r=".",n=","){const o=(e+"").replace(/[^0-9+\-Ee.]/g,""),s=isFinite(+o)?+o:0,i=isFinite(+t)?Math.abs(t):0,a=(i?function(e,t){const r=Math.pow(10,t);return""+(Math.round(e*r)/r).toFixed(t)}(s,i):""+Math.round(s)).split(".");return a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,n)),(a[1]||"").length<i&&(a[1]=a[1]||"",a[1]+=new Array(i-a[1].length+1).join("0")),a.join(r)}r.d(t,{A:()=>n})},51119(e,t,r){"use strict";r.d(t,{A:()=>i});var n,o=r(2467);function s(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}n=s.prototype,Object.assign(n,o.EventEmitter.prototype),n.emitChange=function(){this.emit("change")},n.off=n.removeListener,s.prototype.open=function(e,t,r){return t=t||Date.now(),this.windowInstance=window.open(e,t,r),this.startMonitoring(t,this.windowInstance),window.addEventListener("message",this.onMessage,!1),this},s.prototype.getScreenCenterSpecs=function(e,t){const r=void 0!==window.screenTop?window.screenTop:window.screenY,n=void 0!==window.screenLeft?window.screenLeft:window.screenX;return["width="+e,"height="+t,"top="+(r+window.innerHeight/2-t/2),"left="+(n+window.innerWidth/2-e/2)].join()},s.prototype.isOpen=function(e){let t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(e){}return!t},s.prototype.checkStatus=function(){for(const e in this.intervals)this.intervals.hasOwnProperty(e)&&!this.isOpen(e)&&(this.emit("close",e),delete this.intervals[e]);0===Object.keys(this.intervals).length&&(clearInterval(this.monitorInterval),delete this.monitorInterval,window.removeEventListener("message",this.onMessage))},s.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t};const i=s},10067(e,t,r){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))}),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(78926)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},78926(e,t,r){e.exports=function(e){function t(e){let r,o,s,i=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),s=o-(r||o);n.diff=s,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(r,o)=>{if("%%"===r)return"%";i++;const s=t.formatters[o];if("function"==typeof s){const t=e[i];r=s.call(n,t),e.splice(i,1),i--}return r}),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{i=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e,t){let r=0,n=0,o=-1,s=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,s=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,s++,r=s}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of r)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const r of t.skips)if(o(e,r))return!1;for(const r of t.names)if(o(e,r))return!0;return!1},t.humanize=r(44997),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(r=>{t[r]=e[r]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},71218(e,t,r){"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,a=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,s),l=["gridicon","gridicons-star",a,!!function(e){return 0==e%18}(r)&&"needs-offset",!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:l,height:r,width:r,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.891 5.82 21l2.002-7.141L2 9.257l7.418-.304z"})))};var n,o=(n=r(51609))&&n.__esModule?n:{default:n},s=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])({}).hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(null,arguments)}},21147(e,t,r){"use strict";function n(e,t){return Array(t+1).join(e)}r.d(t,{A:()=>R});var o=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function s(e){return l(e,o)}var i=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function a(e){return l(e,i)}var c=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function l(e,t){return t.indexOf(e.nodeName)>=0}function u(e,t){return e.getElementsByTagName&&t.some(function(t){return e.getElementsByTagName(t).length})}var d={};function p(e){return e?e.replace(/(\n+\s*)+/g,"\n"):""}function h(e){for(var t in this.options=e,this._keep=[],this._remove=[],this.blankRule={replacement:e.blankReplacement},this.keepReplacement=e.keepReplacement,this.defaultRule={replacement:e.defaultReplacement},this.array=[],e.rules)this.array.push(e.rules[t])}function m(e,t,r){for(var n=0;n<e.length;n++){var o=e[n];if(g(o,t,r))return o}}function g(e,t,r){var n=e.filter;if("string"==typeof n){if(n===t.nodeName.toLowerCase())return!0}else if(Array.isArray(n)){if(n.indexOf(t.nodeName.toLowerCase())>-1)return!0}else{if("function"!=typeof n)throw new TypeError("`filter` needs to be a string, array, or function");if(n.call(e,t,r))return!0}}function f(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function b(e,t,r){return e&&e.parentNode===t||r(t)?t.nextSibling||t.parentNode:t.firstChild||t.nextSibling||t.parentNode}d.paragraph={filter:"p",replacement:function(e){return"\n\n"+e+"\n\n"}},d.lineBreak={filter:"br",replacement:function(e,t,r){return r.br+"\n"}},d.heading={filter:["h1","h2","h3","h4","h5","h6"],replacement:function(e,t,r){var o=Number(t.nodeName.charAt(1));return"setext"===r.headingStyle&&o<3?"\n\n"+e+"\n"+n(1===o?"=":"-",e.length)+"\n\n":"\n\n"+n("#",o)+" "+e+"\n\n"}},d.blockquote={filter:"blockquote",replacement:function(e){return"\n\n"+(e=(e=e.replace(/^\n+|\n+$/g,"")).replace(/^/gm,"> "))+"\n\n"}},d.list={filter:["ul","ol"],replacement:function(e,t){var r=t.parentNode;return"LI"===r.nodeName&&r.lastElementChild===t?"\n"+e:"\n\n"+e+"\n\n"}},d.listItem={filter:"li",replacement:function(e,t,r){e=e.replace(/^\n+/,"").replace(/\n+$/,"\n").replace(/\n/gm,"\n ");var n=r.bulletListMarker+" ",o=t.parentNode;if("OL"===o.nodeName){var s=o.getAttribute("start"),i=Array.prototype.indexOf.call(o.children,t);n=(s?Number(s)+i:i+1)+". "}return n+e+(t.nextSibling&&!/\n$/.test(e)?"\n":"")}},d.indentedCodeBlock={filter:function(e,t){return"indented"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){return"\n\n "+t.firstChild.textContent.replace(/\n/g,"\n ")+"\n\n"}},d.fencedCodeBlock={filter:function(e,t){return"fenced"===t.codeBlockStyle&&"PRE"===e.nodeName&&e.firstChild&&"CODE"===e.firstChild.nodeName},replacement:function(e,t,r){for(var o,s=((t.firstChild.getAttribute("class")||"").match(/language-(\S+)/)||[null,""])[1],i=t.firstChild.textContent,a=r.fence.charAt(0),c=3,l=new RegExp("^"+a+"{3,}","gm");o=l.exec(i);)o[0].length>=c&&(c=o[0].length+1);var u=n(a,c);return"\n\n"+u+s+"\n"+i.replace(/\n$/,"")+"\n"+u+"\n\n"}},d.horizontalRule={filter:"hr",replacement:function(e,t,r){return"\n\n"+r.hr+"\n\n"}},d.inlineLink={filter:function(e,t){return"inlined"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t){var r=t.getAttribute("href"),n=p(t.getAttribute("title"));return n&&(n=' "'+n+'"'),"["+e+"]("+r+n+")"}},d.referenceLink={filter:function(e,t){return"referenced"===t.linkStyle&&"A"===e.nodeName&&e.getAttribute("href")},replacement:function(e,t,r){var n,o,s=t.getAttribute("href"),i=p(t.getAttribute("title"));switch(i&&(i=' "'+i+'"'),r.linkReferenceStyle){case"collapsed":n="["+e+"][]",o="["+e+"]: "+s+i;break;case"shortcut":n="["+e+"]",o="["+e+"]: "+s+i;break;default:var a=this.references.length+1;n="["+e+"]["+a+"]",o="["+a+"]: "+s+i}return this.references.push(o),n},references:[],append:function(e){var t="";return this.references.length&&(t="\n\n"+this.references.join("\n")+"\n\n",this.references=[]),t}},d.emphasis={filter:["em","i"],replacement:function(e,t,r){return e.trim()?r.emDelimiter+e+r.emDelimiter:""}},d.strong={filter:["strong","b"],replacement:function(e,t,r){return e.trim()?r.strongDelimiter+e+r.strongDelimiter:""}},d.code={filter:function(e){var t=e.previousSibling||e.nextSibling,r="PRE"===e.parentNode.nodeName&&!t;return"CODE"===e.nodeName&&!r},replacement:function(e){if(!e)return"";e=e.replace(/\r?\n|\r/g," ");for(var t=/^`|^ .*?[^ ].* $|`$/.test(e)?" ":"",r="`",n=e.match(/`+/gm)||[];-1!==n.indexOf(r);)r+="`";return r+t+e+t+r}},d.image={filter:"img",replacement:function(e,t){var r=p(t.getAttribute("alt")),n=t.getAttribute("src")||"",o=p(t.getAttribute("title"));return n?"+")":""}},h.prototype={add:function(e,t){this.array.unshift(t)},keep:function(e){this._keep.unshift({filter:e,replacement:this.keepReplacement})},remove:function(e){this._remove.unshift({filter:e,replacement:function(){return""}})},forNode:function(e){return e.isBlank?this.blankRule:(t=m(this.array,e,this.options))||(t=m(this._keep,e,this.options))||(t=m(this._remove,e,this.options))?t:this.defaultRule;var t},forEach:function(e){for(var t=0;t<this.array.length;t++)e(this.array[t],t)}};var v="undefined"!=typeof window?window:{};var y,k,w=function(){var e=v.DOMParser,t=!1;try{(new e).parseFromString("","text/html")&&(t=!0)}catch(e){}return t}()?v.DOMParser:(y=function(){},function(){var e=!1;try{document.implementation.createHTMLDocument("").open()}catch(t){window.ActiveXObject&&(e=!0)}return e}()?y.prototype.parseFromString=function(e){var t=new window.ActiveXObject("htmlfile");return t.designMode="on",t.open(),t.write(e),t.close(),t}:y.prototype.parseFromString=function(e){var t=document.implementation.createHTMLDocument("");return t.open(),t.write(e),t.close(),t},y);function _(e,t){var r;"string"==typeof e?r=(k=k||new w).parseFromString('<x-turndown id="turndown-root">'+e+"</x-turndown>","text/html").getElementById("turndown-root"):r=e.cloneNode(!0);return function(e){var t=e.element,r=e.isBlock,n=e.isVoid,o=e.isPre||function(e){return"PRE"===e.nodeName};if(t.firstChild&&!o(t)){for(var s=null,i=!1,a=null,c=b(a,t,o);c!==t;){if(3===c.nodeType||4===c.nodeType){var l=c.data.replace(/[ \r\n\t]+/g," ");if(s&&!/ $/.test(s.data)||i||" "!==l[0]||(l=l.substr(1)),!l){c=f(c);continue}c.data=l,s=c}else{if(1!==c.nodeType){c=f(c);continue}r(c)||"BR"===c.nodeName?(s&&(s.data=s.data.replace(/ $/,"")),s=null,i=!1):n(c)||o(c)?(s=null,i=!0):s&&(i=!1)}var u=b(a,c,o);a=c,c=u}s&&(s.data=s.data.replace(/ $/,""),s.data||f(s))}}({element:r,isBlock:s,isVoid:a,isPre:t.preformattedCode?x:null}),r}function x(e){return"PRE"===e.nodeName||"CODE"===e.nodeName}function j(e,t){return e.isBlock=s(e),e.isCode="CODE"===e.nodeName||e.parentNode.isCode,e.isBlank=function(e){return!a(e)&&!function(e){return l(e,c)}(e)&&/^\s*$/i.test(e.textContent)&&!function(e){return u(e,i)}(e)&&!function(e){return u(e,c)}(e)}(e),e.flankingWhitespace=function(e,t){if(e.isBlock||t.preformattedCode&&e.isCode)return{leading:"",trailing:""};var r=(n=e.textContent,o=n.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/),{leading:o[1],leadingAscii:o[2],leadingNonAscii:o[3],trailing:o[4],trailingNonAscii:o[5],trailingAscii:o[6]});var n,o;r.leadingAscii&&C("left",e,t)&&(r.leading=r.leadingNonAscii);r.trailingAscii&&C("right",e,t)&&(r.trailing=r.trailingNonAscii);return{leading:r.leading,trailing:r.trailing}}(e,t),e}function C(e,t,r){var n,o,i;return"left"===e?(n=t.previousSibling,o=/ $/):(n=t.nextSibling,o=/^ /),n&&(3===n.nodeType?i=o.test(n.nodeValue):r.preformattedCode&&"CODE"===n.nodeName?i=!1:1!==n.nodeType||s(n)||(i=o.test(n.textContent))),i}var A=Array.prototype.reduce,S=[[/\\/g,"\\\\"],[/\*/g,"\\*"],[/^-/g,"\\-"],[/^\+ /g,"\\+ "],[/^(=+)/g,"\\$1"],[/^(#{1,6}) /g,"\\$1 "],[/`/g,"\\`"],[/^~~~/g,"\\~~~"],[/\[/g,"\\["],[/\]/g,"\\]"],[/^>/g,"\\>"],[/_/g,"\\_"],[/^(\d+)\. /g,"$1\\. "]];function E(e){if(!(this instanceof E))return new E(e);var t={rules:d,headingStyle:"setext",hr:"* * *",bulletListMarker:"*",codeBlockStyle:"indented",fence:"```",emDelimiter:"_",strongDelimiter:"**",linkStyle:"inlined",linkReferenceStyle:"full",br:" ",preformattedCode:!1,blankReplacement:function(e,t){return t.isBlock?"\n\n":""},keepReplacement:function(e,t){return t.isBlock?"\n\n"+t.outerHTML+"\n\n":t.outerHTML},defaultReplacement:function(e,t){return t.isBlock?"\n\n"+e+"\n\n":e}};this.options=function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}return e}({},t,e),this.rules=new h(this.options)}function T(e){var t=this;return A.call(e.childNodes,function(e,r){var n="";return 3===(r=new j(r,t.options)).nodeType?n=r.isCode?r.nodeValue:t.escape(r.nodeValue):1===r.nodeType&&(n=P.call(t,r)),B(e,n)},"")}function N(e){var t=this;return this.rules.forEach(function(r){"function"==typeof r.append&&(e=B(e,r.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function P(e){var t=this.rules.forNode(e),r=T.call(this,e),n=e.flankingWhitespace;return(n.leading||n.trailing)&&(r=r.trim()),n.leading+t.replacement(r,e,this.options)+n.trailing}function B(e,t){var r=function(e){for(var t=e.length;t>0&&"\n"===e[t-1];)t--;return e.substring(0,t)}(e),n=t.replace(/^\n*/,""),o=Math.max(e.length-r.length,t.length-n.length);return r+"\n\n".substring(0,o)+n}E.prototype={turndown:function(e){if(!function(e){return null!=e&&("string"==typeof e||e.nodeType&&(1===e.nodeType||9===e.nodeType||11===e.nodeType))}(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(""===e)return"";var t=T.call(this,new _(e,this.options));return N.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);else{if("function"!=typeof e)throw new TypeError("plugin must be a Function or an Array of Functions");e(this)}return this},addRule:function(e,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return S.reduce(function(e,t){return e.replace(t[0],t[1])},e)}};const R=E},91016(e,t,r){"use strict";r.d(t,{A:()=>p});var n=r(74085),o=r(55217),s=r(55950),i=r(30615);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},i=s.iterator||"@@iterator",l=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var s=t&&t.prototype instanceof y?t:y,i=Object.create(s.prototype),a=new B(n||[]);return o(i,"_invoke",{value:E(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var m="suspendedStart",g="suspendedYield",f="executing",b="completed",v={};function y(){}function k(){}function w(){}var _={};d(_,i,function(){return this});var x=Object.getPrototypeOf,j=x&&x(x(R([])));j&&j!==r&&n.call(j,i)&&(_=j);var C=w.prototype=y.prototype=Object.create(_);function A(e){["next","throw","return"].forEach(function(t){d(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){function r(o,s,i,c){var l=h(e[o],e,s);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==a(d)&&n.call(d,"__await")?t.resolve(d.__await).then(function(e){r("next",e,i,c)},function(e){r("throw",e,i,c)}):t.resolve(d).then(function(e){u.value=e,i(u)},function(e){return r("throw",e,i,c)})}c(l.arg)}var s;o(this,"_invoke",{value:function(e,n){function o(){return new t(function(t,o){r(e,n,t,o)})}return s=s?s.then(o,o):o()}})}function E(t,r,n){var o=m;return function(s,i){if(o===f)throw Error("Generator is already running");if(o===b){if("throw"===s)throw i;return{value:e,done:!0}}for(n.method=s,n.arg=i;;){var a=n.delegate;if(a){var c=T(a,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var l=h(t,r,n);if("normal"===l.type){if(o=n.done?b:g,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=b,n.method="throw",n.arg=l.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var s=h(o,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,v;var i=s.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function R(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}throw new TypeError(a(t)+" is not iterable")}return k.prototype=w,o(C,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:k,configurable:!0}),k.displayName=d(w,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,d(e,u,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},A(S.prototype),d(S.prototype,l,function(){return this}),t.AsyncIterator=S,t.async=function(e,r,n,o,s){void 0===s&&(s=Promise);var i=new S(p(e,r,n,o),s);return t.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},A(C),d(C,u,"Generator"),d(C,i,function(){return this}),d(C,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=R,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var s=this.tryEntries.length-1;s>=0;--s){var i=this.tryEntries[s],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var s=o;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var i=s?s.completion:{};return i.type=e,i.arg=t,s?(this.method="next",this.next=s.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:R(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function l(e,t,r,n,o,s,i){try{var a=e[s](i),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function d(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:t+""}var p=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"openFile",value:(a=c().mark(function e(t,r){var a;return c().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(0,n.A)()||!t||void 0===t.uri){e.next=11;break}return e.prev=1,e.next=4,(0,o.A)(t.uri);case 4:return a=e.sent,e.abrupt("return",new s.A(a));case 8:throw e.prev=8,e.t0=e.catch(1),new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(e.t0));case 11:if("function"!=typeof t.slice||void 0===t.size){e.next=13;break}return e.abrupt("return",Promise.resolve(new s.A(t)));case 13:if("function"!=typeof t.read){e.next=18;break}if(r=Number(r),Number.isFinite(r)){e.next=17;break}return e.abrupt("return",Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option")));case 17:return e.abrupt("return",Promise.resolve(new i.A(t,r)));case 18:return e.abrupt("return",Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment")));case 19:case"end":return e.stop()}},e,null,[[1,8]])}),d=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=a.apply(e,t);function s(e){l(o,r,n,s,i,"next",e)}function i(e){l(o,r,n,s,i,"throw",e)}s(void 0)})},function(_x,e){return d.apply(this,arguments)})}],t&&u(e.prototype,t),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,a,d}()},33765(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(74085);function o(e,t){return(0,n.A)()?Promise.resolve(function(e,t){var r=e.exif?function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t&=t}return t}(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",r,t.endpoint].join("/")}(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}},45369(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function i(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}r.d(t,{A:()=>c});var c=function(){return i(function e(){o(this,e)},[{key:"createRequest",value:function(e,t){return new l(e,t)}},{key:"getName",value:function(){return"XHRHttpStack"}}])}(),l=function(){return i(function e(t,r){o(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,r,!0),this._method=t,this._url=r,this._headers={}},[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(e,t){this._xhr.setRequestHeader(e,t),this._headers[e]=t}},{key:"getHeader",value:function(e){return this._headers[e]}},{key:"setProgressHandler",value:function(e){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(t){t.lengthComputable&&e(t.loaded)})}},{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new Promise(function(r,n){e._xhr.onload=function(){r(new u(e._xhr))},e._xhr.onerror=function(e){n(e)},e._xhr.send(t)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])}(),u=function(){return i(function e(t){o(this,e),this._xhr=t},[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(e){return this._xhr.getResponseHeader(e)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}])}()},10781(e,t,r){"use strict";r.d(t,{_O:()=>k});var n=r(52494),o=r(82701),s=r(91016),i=r(33765),a=r(45369),c=r(10851);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}function d(e,t,r){return t=h(t),function(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(e,t,r){return(t=v(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}var y=f(f({},o.A.defaultOptions),{},{httpStack:new a.A,fileReader:new s.A,urlStorage:c.o?new c.Y:new n.A,fingerprint:i.A}),k=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),d(this,t,[e,r=f(f({},y),r)])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),r=t,s=[{key:"terminate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t=f(f({},y),t),o.A.terminate(e,t)}}],(n=null)&&u(r.prototype,n),s&&u(r,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,s}(o.A);"function"==typeof XMLHttpRequest&&"function"==typeof Blob&&Blob.prototype.slice},74085(e,t,r){"use strict";r.d(t,{A:()=>n});const n=function(){return"undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase()}},55950(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(73716),o=r(79427);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}var c=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._file=t,this.size=t.size},(t=[{key:"slice",value:function(e,t){if((0,n.A)())return(0,o.A)(this._file.slice(e,t));var r=this._file.slice(e,t),s=t>=this.size;return Promise.resolve({value:r,done:s})}},{key:"close",value:function(){}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()},30615(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function i(e){return void 0===e?0:void 0!==e.size?e.size:e.length}r.d(t,{A:()=>a});var a=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1},(t=[{key:"slice",value:function(e,t){return e<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(e,t)}},{key:"_readUntilEnoughDataOrDone",value:function(e,t){var r=this,n=t<=this._bufferOffset+i(this._buffer);if(this._done||n){var o=this._getDataFromBuffer(e,t),s=null==o&&this._done;return Promise.resolve({value:o,done:s})}return this._reader.read().then(function(n){var o=n.value;return n.done?r._done=!0:void 0===r._buffer?r._buffer=o:r._buffer=function(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}throw new Error("Unknown data type")}(r._buffer,o),r._readUntilEnoughDataOrDone(e,t)})}},{key:"_getDataFromBuffer",value:function(e,t){e>this._bufferOffset&&(this._buffer=this._buffer.slice(e-this._bufferOffset),this._bufferOffset=e);var r=0===i(this._buffer);return this._done&&r?null:this._buffer.slice(0,t-e)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}])&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()},73716(e,t,r){"use strict";r.d(t,{A:()=>n});const n=function(){return"undefined"!=typeof window&&(void 0!==window.PhoneGap||void 0!==window.Cordova||void 0!==window.cordova)}},79427(e,t,r){"use strict";function n(e){return new Promise(function(t,r){var n=new FileReader;n.onload=function(){var e=new Uint8Array(n.result);t({value:e})},n.onerror=function(e){r(e)},n.readAsArrayBuffer(e)})}r.d(t,{A:()=>n})},55217(e,t,r){"use strict";function n(e){return new Promise(function(t,r){var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){var e=n.response;t(e)},n.onerror=function(e){r(e)},n.open("GET",e),n.send()})}r.d(t,{A:()=>n})},10851(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}r.d(t,{Y:()=>u,o:()=>l});var i=!1;try{i="localStorage"in window;var a="tusSupport",c=localStorage.getItem(a);localStorage.setItem(a,c),null===c&&localStorage.removeItem(a)}catch(e){if(e.code!==e.SECURITY_ERR&&e.code!==e.QUOTA_EXCEEDED_ERR)throw e;i=!1}var l=i,u=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"findAllUploads",value:function(){var e=this._findEntries("tus::");return Promise.resolve(e)}},{key:"findUploadsByFingerprint",value:function(e){var t=this._findEntries("tus::".concat(e,"::"));return Promise.resolve(t)}},{key:"removeUpload",value:function(e){return localStorage.removeItem(e),Promise.resolve()}},{key:"addUpload",value:function(e,t){var r=Math.round(1e12*Math.random()),n="tus::".concat(e,"::").concat(r);return localStorage.setItem(n,JSON.stringify(t)),Promise.resolve(n)}},{key:"_findEntries",value:function(e){for(var t=[],r=0;r<localStorage.length;r++){var n=localStorage.key(r);if(0===n.indexOf(e))try{var o=JSON.parse(localStorage.getItem(n));o.urlStorageKey=n,t.push(o)}catch(e){}}return t}}],t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()},33004(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}function i(e,t,r){return t=u(t),function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],u(e).constructor):t.apply(e,r))}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(c())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&l(o,r.prototype),o}(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)},a(e)}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}r.d(t,{A:()=>p});var d=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=i(this,t,[e])).originalRequest=o,r.originalResponse=s,r.causingError=n,null!=n&&(e+=", caused by ".concat(n.toString())),null!=o){var a=o.getHeader("X-Request-ID")||"n/a",c=o.getMethod(),l=o.getURL(),u=s?s.getStatus():"n/a",d=s?s.getBody()||"":"n/a";e+=", originated from request (method: ".concat(c,", url: ").concat(l,", response code: ").concat(u,", response text: ").concat(d,", request id: ").concat(a,")")}return r.message=e,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),r=t,n&&o(r.prototype,n),s&&o(r,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,s}(a(Error));const p=d},12380(e,t,r){"use strict";r.d(t,{R:()=>o});var n=!1;function o(e){n&&console.log(e)}},52494(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}r.d(t,{A:()=>i});var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},(t=[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(e){return Promise.resolve([])}},{key:"removeUpload",value:function(e){return Promise.resolve()}},{key:"addUpload",value:function(e,t){return Promise.resolve(null)}}])&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r}()},82701(e,t,r){"use strict";r.d(t,{A:()=>B});var n=r(59535),o=r(76580),s=r.n(o),i=r(33004),a=r(12380),c=r(17291);function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},i=s.iterator||"@@iterator",a=s.asyncIterator||"@@asyncIterator",c=s.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var s=t&&t.prototype instanceof y?t:y,i=Object.create(s.prototype),a=new B(n||[]);return o(i,"_invoke",{value:E(e,r,a)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var m="suspendedStart",g="suspendedYield",f="executing",b="completed",v={};function y(){}function k(){}function w(){}var _={};u(_,i,function(){return this});var x=Object.getPrototypeOf,j=x&&x(x(R([])));j&&j!==r&&n.call(j,i)&&(_=j);var C=w.prototype=y.prototype=Object.create(_);function A(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function S(e,t){function r(o,s,i,a){var c=h(e[o],e,s);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==p(u)&&n.call(u,"__await")?t.resolve(u.__await).then(function(e){r("next",e,i,a)},function(e){r("throw",e,i,a)}):t.resolve(u).then(function(e){l.value=e,i(l)},function(e){return r("throw",e,i,a)})}a(c.arg)}var s;o(this,"_invoke",{value:function(e,n){function o(){return new t(function(t,o){r(e,n,t,o)})}return s=s?s.then(o,o):o()}})}function E(t,r,n){var o=m;return function(s,i){if(o===f)throw Error("Generator is already running");if(o===b){if("throw"===s)throw i;return{value:e,done:!0}}for(n.method=s,n.arg=i;;){var a=n.delegate;if(a){var c=T(a,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var l=h(t,r,n);if("normal"===l.type){if(o=n.done?b:g,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=b,n.method="throw",n.arg=l.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var s=h(o,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,v;var i=s.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function R(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,s=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return s.next=s}}throw new TypeError(p(t)+" is not iterable")}return k.prototype=w,o(C,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:k,configurable:!0}),k.displayName=u(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,c,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},A(S.prototype),u(S.prototype,a,function(){return this}),t.AsyncIterator=S,t.async=function(e,r,n,o,s){void 0===s&&(s=Promise);var i=new S(d(e,r,n,o),s);return t.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},A(C),u(C,c,"Generator"),u(C,i,function(){return this}),u(C,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=R,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var s=this.tryEntries.length-1;s>=0;--s){var i=this.tryEntries[s],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var s=o;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var i=s?s.completion:{};return i.type=e,i.arg=t,s?(this.method="next",this.next=s.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:R(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function u(e,t,r,n,o,s,i){try{var a=e[s](i),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,s,i,a=[],c=!0,l=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return a}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach(function(t){b(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function b(e,t,r){return(t=y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:t+""}var k="tus-v1",w="ietf-draft-03",_={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:N,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:k},x=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"resume"in r&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=r,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return t=e,r=[{key:"findPreviousUploads",value:function(){var e=this;return this.options.fingerprint(this.file,this.options).then(function(t){return e._urlStorage.findUploadsByFingerprint(t)})}},{key:"resumeFromPreviousUpload",value:function(e){this.url=e.uploadUrl||null,this._parallelUploadUrls=e.parallelUploadUrls||null,this._urlStorageKey=e.urlStorageKey}},{key:"start",value:function(){var e=this,t=this.file;if(t)if([k,w].includes(this.options.protocol))if(this.options.endpoint||this.options.uploadUrl||this.url){var r=this.options.retryDelays;if(null==r||"[object Array]"===Object.prototype.toString.call(r)){if(this.options.parallelUploads>1)for(var n=0,o=["uploadUrl","uploadSize","uploadLengthDeferred"];n<o.length;n++){var s=o[n];if(this.options[s])return void this._emitError(new Error("tus: cannot use the ".concat(s," option when parallelUploads is enabled")))}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1)return void this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length)return void this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"))}this.options.fingerprint(t,this.options).then(function(r){return null==r?(0,a.R)("No fingerprint was calculated meaning that the upload cannot be stored in the URL storage."):(0,a.R)("Calculated fingerprint: ".concat(r)),e._fingerprint=r,e._source?e._source:e.options.fileReader.openFile(t,e.options.chunkSize)}).then(function(t){if(e._source=t,e.options.uploadLengthDeferred)e._size=null;else if(null!=e.options.uploadSize){if(e._size=Number(e.options.uploadSize),Number.isNaN(e._size))return void e._emitError(new Error("tus: cannot convert `uploadSize` option into a number"))}else if(e._size=e._source.size,null==e._size)return void e._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));e.options.parallelUploads>1||null!=e._parallelUploadUrls?e._startParallelUpload():e._startSingleUpload()}).catch(function(t){e._emitError(t)})}else this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"))}else this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));else this._emitError(new Error("tus: unsupported protocol ".concat(this.options.protocol)));else this._emitError(new Error("tus: no file or stream to upload provided"))}},{key:"_startParallelUpload",value:function(){var t,r=this,n=this._size,o=0;this._parallelUploads=[];var s=null!=this._parallelUploadUrls?this._parallelUploadUrls.length:this.options.parallelUploads,i=null!==(t=this.options.parallelUploadBoundaries)&&void 0!==t?t:function(e,t){for(var r=Math.floor(e/t),n=[],o=0;o<t;o++)n.push({start:r*o,end:r*(o+1)});return n[t-1].end=e,n}(this._source.size,s);this._parallelUploadUrls&&i.forEach(function(e,t){e.uploadUrl=r._parallelUploadUrls[t]||null}),this._parallelUploadUrls=new Array(i.length);var c,l=i.map(function(t,s){var a=0;return r._source.slice(t.start,t.end).then(function(c){var l=c.value;return new Promise(function(c,u){var d=f(f({},r.options),{},{uploadUrl:t.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:r.options.metadataForPartialUploads,headers:f(f({},r.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:c,onError:u,onProgress:function(e){o=o-a+e,a=e,r._emitProgress(o,n)},onUploadUrlAvailable:function(){r._parallelUploadUrls[s]=p.url,r._parallelUploadUrls.filter(function(e){return Boolean(e)}).length===i.length&&r._saveUploadInUrlStorage()}}),p=new e(l,d);p.start(),r._parallelUploads.push(p)})})});Promise.all(l).then(function(){(c=r._openRequest("POST",r.options.endpoint)).setHeader("Upload-Concat","final;".concat(r._parallelUploadUrls.join(" ")));var e=j(r.options.metadata);return""!==e&&c.setHeader("Upload-Metadata",e),r._sendRequest(c,null)}).then(function(e){if(C(e.getStatus(),200)){var t=e.getHeader("Location");null!=t?(r.url=P(r.options.endpoint,t),(0,a.R)("Created upload at ".concat(r.url)),r._emitSuccess(e)):r._emitHttpError(c,e,"tus: invalid or missing Location header")}else r._emitHttpError(c,e,"tus: unexpected response while creating upload")}).catch(function(e){r._emitError(e)})}},{key:"_startSingleUpload",value:function(){return this._aborted=!1,null!=this.url?((0,a.R)("Resuming upload from previous URL: ".concat(this.url)),void this._resumeUpload()):null!=this.options.uploadUrl?((0,a.R)("Resuming upload from provided URL: ".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,void this._resumeUpload()):((0,a.R)("Creating a new upload"),void this._createUpload())}},{key:"abort",value:function(t){var r=this;if(null!=this._parallelUploads){var n,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}(this._parallelUploads);try{for(o.s();!(n=o.n()).done;)n.value.abort(t)}catch(e){o.e(e)}finally{o.f()}}return null!==this._req&&this._req.abort(),this._aborted=!0,null!=this._retryTimeout&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),t&&null!=this.url?e.terminate(this.url,this.options).then(function(){return r._removeFromUrlStorage()}):Promise.resolve()}},{key:"_emitHttpError",value:function(e,t,r,n){this._emitError(new i.A(r,n,e,t))}},{key:"_emitError",value:function(e){var t=this;if(!this._aborted){if(null!=this.options.retryDelays&&(null!=this._offset&&this._offset>this._offsetBeforeRetry&&(this._retryAttempt=0),T(e,this._retryAttempt,this.options))){var r=this.options.retryDelays[this._retryAttempt++];return this._offsetBeforeRetry=this._offset,void(this._retryTimeout=setTimeout(function(){t.start()},r))}if("function"!=typeof this.options.onError)throw e;this.options.onError(e)}}},{key:"_emitSuccess",value:function(e){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),"function"==typeof this.options.onSuccess&&this.options.onSuccess({lastResponse:e})}},{key:"_emitProgress",value:function(e,t){"function"==typeof this.options.onProgress&&this.options.onProgress(e,t)}},{key:"_emitChunkComplete",value:function(e,t,r){"function"==typeof this.options.onChunkComplete&&this.options.onChunkComplete(e,t,r)}},{key:"_createUpload",value:function(){var e=this;if(this.options.endpoint){var t=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?t.setHeader("Upload-Defer-Length","1"):t.setHeader("Upload-Length","".concat(this._size));var r,n=j(this.options.metadata);""!==n&&t.setHeader("Upload-Metadata",n),this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,r=this._addChunkToRequest(t)):(this.options.protocol===w&&t.setHeader("Upload-Complete","?0"),r=this._sendRequest(t,null)),r.then(function(r){if(C(r.getStatus(),200)){var n=r.getHeader("Location");if(null!=n){if(e.url=P(e.options.endpoint,n),(0,a.R)("Created upload at ".concat(e.url)),"function"==typeof e.options.onUploadUrlAvailable&&e.options.onUploadUrlAvailable(),0===e._size)return e._emitSuccess(r),void e._source.close();e._saveUploadInUrlStorage().then(function(){e.options.uploadDataDuringCreation?e._handleUploadResponse(t,r):(e._offset=0,e._performUpload())})}else e._emitHttpError(t,r,"tus: invalid or missing Location header")}else e._emitHttpError(t,r,"tus: unexpected response while creating upload")}).catch(function(r){e._emitHttpError(t,null,"tus: failed to create upload",r)})}else this._emitError(new Error("tus: unable to create upload because no endpoint is provided"))}},{key:"_resumeUpload",value:function(){var e=this,t=this._openRequest("HEAD",this.url);this._sendRequest(t,null).then(function(r){var n=r.getStatus();if(!C(n,200))return 423===n?void e._emitHttpError(t,r,"tus: upload is currently locked; retry later"):(C(n,400)&&e._removeFromUrlStorage(),e.options.endpoint?(e.url=null,void e._createUpload()):void e._emitHttpError(t,r,"tus: unable to resume upload (new upload cannot be created without an endpoint)"));var o=Number.parseInt(r.getHeader("Upload-Offset"),10);if(Number.isNaN(o))e._emitHttpError(t,r,"tus: invalid or missing offset value");else{var s=Number.parseInt(r.getHeader("Upload-Length"),10);!Number.isNaN(s)||e.options.uploadLengthDeferred||e.options.protocol!==k?("function"==typeof e.options.onUploadUrlAvailable&&e.options.onUploadUrlAvailable(),e._saveUploadInUrlStorage().then(function(){if(o===s)return e._emitProgress(s,s),void e._emitSuccess(r);e._offset=o,e._performUpload()})):e._emitHttpError(t,r,"tus: invalid or missing length value")}}).catch(function(r){e._emitHttpError(t,null,"tus: failed to resume upload",r)})}},{key:"_performUpload",value:function(){var e,t=this;this._aborted||(this.options.overridePatchMethod?(e=this._openRequest("POST",this.url)).setHeader("X-HTTP-Method-Override","PATCH"):e=this._openRequest("PATCH",this.url),e.setHeader("Upload-Offset","".concat(this._offset)),this._addChunkToRequest(e).then(function(r){C(r.getStatus(),200)?t._handleUploadResponse(e,r):t._emitHttpError(e,r,"tus: unexpected response while uploading chunk")}).catch(function(r){t._aborted||t._emitHttpError(e,null,"tus: failed to upload chunk at offset ".concat(t._offset),r)}))}},{key:"_addChunkToRequest",value:function(e){var t=this,r=this._offset,n=this._offset+this.options.chunkSize;return e.setProgressHandler(function(e){t._emitProgress(r+e,t._size)}),e.setHeader("Content-Type","application/offset+octet-stream"),(n===Number.POSITIVE_INFINITY||n>this._size)&&!this.options.uploadLengthDeferred&&(n=this._size),this._source.slice(r,n).then(function(r){var n=r.value,o=r.done,s=null!=n&&n.size?n.size:0;t.options.uploadLengthDeferred&&o&&(t._size=t._offset+s,e.setHeader("Upload-Length","".concat(t._size)));var i=t._offset+s;return!t.options.uploadLengthDeferred&&o&&i!==t._size?Promise.reject(new Error("upload was configured with a size of ".concat(t._size," bytes, but the source is done after ").concat(i," bytes"))):null===n?t._sendRequest(e):(t.options.protocol===w&&e.setHeader("Upload-Complete",o?"?1":"?0"),t._emitProgress(t._offset,t._size),t._sendRequest(e,n))})}},{key:"_handleUploadResponse",value:function(e,t){var r=Number.parseInt(t.getHeader("Upload-Offset"),10);if(Number.isNaN(r))this._emitHttpError(e,t,"tus: invalid or missing offset value");else{if(this._emitProgress(r,this._size),this._emitChunkComplete(r-this._offset,r,this._size),this._offset=r,r===this._size)return this._emitSuccess(t),void this._source.close();this._performUpload()}}},{key:"_openRequest",value:function(e,t){var r=A(e,t,this.options);return this._req=r,r}},{key:"_removeFromUrlStorage",value:function(){var e=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(t){e._emitError(t)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var e=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||null!==this._urlStorageKey)return Promise.resolve();var t={size:this._size,metadata:this.options.metadata,creationTime:(new Date).toString()};return this._parallelUploads?t.parallelUploadUrls=this._parallelUploadUrls:t.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,t).then(function(t){e._urlStorageKey=t})}},{key:"_sendRequest",value:function(e){return S(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,this.options)}}],n=[{key:"terminate",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=A("DELETE",t,r);return S(n,null,r).then(function(e){if(204!==e.getStatus())throw new i.A("tus: unexpected response while terminating upload",null,n,e)}).catch(function(o){if(o instanceof i.A||(o=new i.A("tus: failed to terminate upload",o,n,null)),!T(o,0,r))throw o;var s=r.retryDelays[0],a=r.retryDelays.slice(1),c=f(f({},r),{},{retryDelays:a});return new Promise(function(e){return setTimeout(e,s)}).then(function(){return e.terminate(t,c)})})}}],r&&v(t.prototype,r),n&&v(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,n}();function j(e){return Object.entries(e).map(function(e){var t=d(e,2),r=t[0],o=t[1];return"".concat(r," ").concat(n.o4.encode(String(o)))}).join(",")}function C(e,t){return e>=t&&e<t+100}function A(e,t,r){var n=r.httpStack.createRequest(e,t);r.protocol===w?n.setHeader("Upload-Draft-Interop-Version","5"):n.setHeader("Tus-Resumable","1.0.0");for(var o=r.headers||{},s=0,i=Object.entries(o);s<i.length;s++){var a=d(i[s],2),l=a[0],u=a[1];n.setHeader(l,u)}if(r.addRequestId){var p=(0,c.A)();n.setHeader("X-Request-ID",p)}return n}function S(_x,e,t){return E.apply(this,arguments)}function E(){var e;return e=l().mark(function e(t,r,n){var o;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof n.onBeforeRequest){e.next=3;break}return e.next=3,n.onBeforeRequest(t);case 3:return e.next=5,t.send(r);case 5:if(o=e.sent,"function"!=typeof n.onAfterResponse){e.next=9;break}return e.next=9,n.onAfterResponse(t,o);case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}},e)}),E=function(){var t=this,r=arguments;return new Promise(function(n,o){var s=e.apply(t,r);function i(e){u(s,n,o,i,a,"next",e)}function a(e){u(s,n,o,i,a,"throw",e)}i(void 0)})},E.apply(this,arguments)}function T(e,t,r){return!(null==r.retryDelays||t>=r.retryDelays.length||null==e.originalRequest)&&(r&&"function"==typeof r.onShouldRetry?r.onShouldRetry(e,t,r):N(e))}function N(e){var t,r=e.originalResponse?e.originalResponse.getStatus():0;return(!C(r,400)||409===r||423===r)&&(t=!0,"undefined"!=typeof navigator&&!1===navigator.onLine&&(t=!1),t)}function P(e,t){return new(s())(t,e).toString()}x.defaultOptions=_;const B=x},17291(e,t,r){"use strict";function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}r.d(t,{A:()=>n})},76580(e,t,r){"use strict";var n=r(96811),o=r(24588),s=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i=/[\n\r\t]/g,a=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(s,"")}var p=[["#","hash"],["?","query"],function(e,t){return g(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function m(e){var t,r=("undefined"!=typeof window||"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).location||{},n={},o=typeof(e=e||r);if("blob:"===e.protocol)n=new b(unescape(e.pathname),{});else if("string"===o)for(t in n=new b(e,{}),h)delete n[t];else if("object"===o){for(t in e)t in h||(n[t]=e[t]);void 0===n.slashes&&(n.slashes=a.test(e.href))}return n}function g(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function f(e,t){e=(e=d(e)).replace(i,""),t=t||{};var r,n=l.exec(e),o=n[1]?n[1].toLowerCase():"",s=!!n[2],a=!!n[3],c=0;return s?a?(r=n[2]+n[3]+n[4],c=n[2].length+n[3].length):(r=n[2]+n[4],c=n[2].length):a?(r=n[3]+n[4],c=n[3].length):r=n[4],"file:"===o?c>=2&&(r=r.slice(2)):g(o)?r=n[4]:o?s&&(r=r.slice(2)):c>=2&&g(t.protocol)&&(r=n[4]),{protocol:o,slashes:s||g(o),slashesCount:c,rest:r}}function b(e,t,r){if(e=(e=d(e)).replace(i,""),!(this instanceof b))return new b(e,t,r);var s,a,c,l,h,v,y=p.slice(),k=typeof t,w=this,_=0;for("object"!==k&&"string"!==k&&(r=t,t=null),r&&"function"!=typeof r&&(r=o.parse),s=!(a=f(e||"",t=m(t))).protocol&&!a.slashes,w.slashes=a.slashes||s&&t.slashes,w.protocol=a.protocol||t.protocol||"",e=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||u.test(e))||!a.slashes&&(a.protocol||a.slashesCount<2||!g(w.protocol)))&&(y[3]=[/(.*)/,"pathname"]);_<y.length;_++)"function"!=typeof(l=y[_])?(c=l[0],v=l[1],c!=c?w[v]=e:"string"==typeof c?~(h="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"==typeof l[2]?(w[v]=e.slice(0,h),e=e.slice(h+l[2])):(w[v]=e.slice(h),e=e.slice(0,h))):(h=c.exec(e))&&(w[v]=h[1],e=e.slice(0,h.index)),w[v]=w[v]||s&&l[3]&&t[v]||"",l[4]&&(w[v]=w[v].toLowerCase())):e=l(e,w);r&&(w.query=r(w.query)),s&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,o=r[n-1],s=!1,i=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),i++):i&&(0===n&&(s=!0),r.splice(n,1),i--);return s&&r.unshift(""),"."!==o&&".."!==o||r.push(""),r.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&g(w.protocol)&&(w.pathname="/"+w.pathname),n(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(h=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,h),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(h+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&g(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}b.prototype={set:function(e,t,r){var s=this;switch(e){case"query":"string"==typeof t&&t.length&&(t=(r||o.parse)(t)),s[e]=t;break;case"port":s[e]=t,n(t,s.protocol)?t&&(s.host=s.hostname+":"+t):(s.host=s.hostname,s[e]="");break;case"hostname":s[e]=t,s.port&&(t+=":"+s.port),s.host=t;break;case"host":s[e]=t,c.test(t)?(t=t.split(":"),s.port=t.pop(),s.hostname=t.join(":")):(s.hostname=t,s.port="");break;case"protocol":s.protocol=t.toLowerCase(),s.slashes=!r;break;case"pathname":case"hash":if(t){var i="pathname"===e?"/":"#";s[e]=t.charAt(0)!==i?i+t:t}else s[e]=t;break;case"username":case"password":s[e]=encodeURIComponent(t);break;case"auth":var a=t.indexOf(":");~a?(s.username=t.slice(0,a),s.username=encodeURIComponent(decodeURIComponent(s.username)),s.password=t.slice(a+1),s.password=encodeURIComponent(decodeURIComponent(s.password))):s.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<p.length;l++){var u=p[l];u[4]&&(s[u[1]]=s[u[1]].toLowerCase())}return s.auth=s.password?s.username+":"+s.password:s.username,s.origin="file:"!==s.protocol&&g(s.protocol)&&s.host?s.protocol+"//"+s.host:"null",s.href=s.toString(),s},toString:function(e){e&&"function"==typeof e||(e=o.stringify);var t,r=this,n=r.host,s=r.protocol;s&&":"!==s.charAt(s.length-1)&&(s+=":");var i=s+(r.protocol&&r.slashes||g(r.protocol)?"//":"");return r.username?(i+=r.username,r.password&&(i+=":"+r.password),i+="@"):r.password?(i+=":"+r.password,i+="@"):"file:"!==r.protocol&&g(r.protocol)&&!n&&"/"!==r.pathname&&(i+="@"),(":"===n[n.length-1]||c.test(r.hostname)&&!r.port)&&(n+=":"),i+=n+r.pathname,(t="object"==typeof r.query?e(r.query):r.query)&&(i+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(i+=r.hash),i}},b.extractProtocol=f,b.location=m,b.trimLeft=d,b.qs=o,e.exports=b},36791(e,t,r){"use strict";e.exports=r.p+"images/jetpack-logo-0869ca6c8490d0aaecca.svg"},26076(e,t,r){"use strict";e.exports=r.p+"images/loader-0855308317756931a4f5.gif"},72660(e,t,r){"use strict";e.exports=r.p+"images/eventbrite-in-page-example-47588367313e644097c9.png"},25836(e,t,r){"use strict";e.exports=r.p+"images/map-preview-4b508c1a0f8ed700cb1e.jpg"},93797(e,t,r){"use strict";e.exports=r.p+"images/map-theme_black_and_white-a33452734cf5f59eb2f9.jpg"},49364(e,t,r){"use strict";e.exports=r.p+"images/map-theme_black_and_white_mapkit-50e9383d59f6ad6a44ed.jpg"},77971(e,t,r){"use strict";e.exports=r.p+"images/map-theme_default-d3a324cdc6ff2f461574.jpg"},98430(e,t,r){"use strict";e.exports=r.p+"images/map-theme_default_mapkit-0ed10cab18f62edff74e.jpg"},27415(e,t,r){"use strict";e.exports=r.p+"images/map-theme_satellite-58322e843e983f7397b5.jpg"},72386(e,t,r){"use strict";e.exports=r.p+"images/map-theme_satellite_mapkit-6062205f7c3804fae12c.jpg"},92747(e,t,r){"use strict";e.exports=r.p+"images/map-theme_terrain-a408b936442d6d33df07.jpg"},96374(e,t,r){"use strict";e.exports=r.p+"images/slideshow_example-1-8da367b68ecf24bac625.jpg"},88513(e,t,r){"use strict";e.exports=r.p+"images/slideshow_example-2-a24860116d0db2f2e068.jpg"},98564(e,t,r){"use strict";e.exports=r.p+"images/slideshow_example-3-521847023ffca361cfde.jpg"},32022(e,t,r){"use strict";e.exports=r.p+"images/tiled-gallery_example-1-8bfc86de615a17d80737.jpg"},2369(e,t,r){"use strict";e.exports=r.p+"images/tiled-gallery_example-2-a7b4b2a7613c2e8ba929.jpg"},24324(e,t,r){"use strict";e.exports=r.p+"images/tiled-gallery_example-3-8da367b68ecf24bac625.jpg"},49263(e,t,r){"use strict";e.exports=r.p+"images/tiled-gallery_example-4-a24860116d0db2f2e068.jpg"},76882(e,t,r){"use strict";e.exports=r.p+"images/tiled-gallery_example-5-e1e133942be4c7fa65d6.jpg"},86781(e,t,r){"use strict";e.exports=r.p+"images/tiled-gallery_example-6-235b99214c5a0dc1bd2b.jpg"},40932(e,t,r){"use strict";e.exports=r.p+"images/videopress-block-example-image-d7dd9fae6ff49181bfca.jpg"},60651(e,t,r){"use strict";e.exports=r.p+"images/example_160x600-4df685f9bf14f11d9012.png"},26408(e,t,r){"use strict";e.exports=r.p+"images/example_300x250-9e27534cd219e940abaf.png"},68364(e,t,r){"use strict";e.exports=r.p+"images/example_320x50-34c171b9cf96506c8fc4.png"},90244(e,t,r){"use strict";e.exports=r.p+"images/example_728x90-1a8de274d08ab4d07f48.png"},74277(e){"use strict";e.exports={consumer_slug:"jetpack"}},39384(e){"use strict";e.exports=window.JetpackConnection},97999(e){"use strict";e.exports=window.JetpackScriptDataModule},87687(e){"use strict";e.exports=window.JetpackSharedStores},51609(e){"use strict";e.exports=window.React},10790(e){"use strict";e.exports=window.ReactJSXRuntime},66087(e){"use strict";e.exports=window.lodash},20195(e){"use strict";e.exports=window.wp.a11y},1455(e){"use strict";e.exports=window.wp.apiFetch},63162(e){"use strict";e.exports=window.wp.blob},94715(e){"use strict";e.exports=window.wp.blockEditor},75994(e){"use strict";e.exports=window.wp.blockSerializationDefaultParser},74997(e){"use strict";e.exports=window.wp.blocks},56427(e){"use strict";e.exports=window.wp.components},29491(e){"use strict";e.exports=window.wp.compose},3582(e){"use strict";e.exports=window.wp.coreData},47143(e){"use strict";e.exports=window.wp.data},38443(e){"use strict";e.exports=window.wp.date},98490(e){"use strict";e.exports=window.wp.domReady},43656(e){"use strict";e.exports=window.wp.editor},86087(e){"use strict";e.exports=window.wp.element},89877(e){"use strict";e.exports=window.wp.escapeHtml},52619(e){"use strict";e.exports=window.wp.hooks},27723(e){"use strict";e.exports=window.wp.i18n},48558(e){"use strict";e.exports=window.wp.keycodes},692(e){"use strict";e.exports=window.wp.notices},92279(e){"use strict";e.exports=window.wp.plugins},5573(e){"use strict";e.exports=window.wp.primitives},36536(e){"use strict";e.exports=window.wp.tokenList},93832(e){"use strict";e.exports=window.wp.url},26873(e){"use strict";e.exports=window.wp.viewport},48816(e,t,r){"use strict";r.d(t,{$:()=>i});var n=r(51609),o=r(18762),s=r(15688);const i=n.forwardRef(function(e,t){const{render:r,className:n,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:c=!0,style:l,...u}=e,{getButtonProps:d,buttonRef:p}=(0,o.s)({disabled:i,focusableWhenDisabled:a,native:c}),h={disabled:i};return(0,s.o)("button",e,{state:h,ref:[t,p],props:[u,d]})})},1265(e,t,r){"use strict";r.d(t,{G:()=>i});var n=r(53169),o=r(51609);const s=o.createContext(void 0);function i(e=!1){const t=o.useContext(s);if(void 0===t&&!e)throw new Error((0,n.A)(16));return t}},37885(e,t,r){"use strict";function n(e,t){const r={};for(const n in e){const o=e[n];if(t?.hasOwnProperty(n)){const e=t[n](o);null!=e&&Object.assign(r,e);continue}!0===o?r[`data-${n.toLowerCase()}`]="":o&&(r[`data-${n.toLowerCase()}`]=o.toString())}return r}r.d(t,{v:()=>n})},18762(e,t,r){"use strict";r.d(t,{s:()=>d});var n=r(51609),o=r(81289),s=r(19288),i=r(12002),a=r(67720),c=r(1265),l=r(56200),u=r(2095);function d(e={}){const{disabled:t=!1,focusableWhenDisabled:r,tabIndex:d=0,native:h=!0,composite:m}=e,g=n.useRef(null),f=(0,c.G)(!0),b=m??void 0!==f,{props:v}=(0,l.S)({focusableWhenDisabled:r,disabled:t,composite:b,tabIndex:d,isNativeButton:h});const y=n.useCallback(()=>{const e=g.current;p(e)&&b&&t&&void 0===v.disabled&&e.disabled&&(e.disabled=!1)},[t,v.disabled,b]);(0,i.g)(y,[y]);return{getButtonProps:n.useCallback((e={})=>{const{onClick:r,onMouseDown:n,onKeyUp:s,onKeyDown:i,onPointerDown:c,...l}=e;return(0,a.v6)({onClick(e){t?e.preventDefault():r?.(e)},onMouseDown(e){t||n?.(e)},onKeyDown(e){if(t)return;if((0,a.PT)(e),i?.(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,n=e.currentTarget,s=p(n),c=!h&&(l=n,(0,o.sb)(l)&&"A"===l.tagName&&Boolean(l.href));var l;const d=r&&(h?s:!c),m="Enter"===e.key,g=" "===e.key,f=n.getAttribute("role"),v=f?.startsWith("menuitem")||"option"===f||"gridcell"===f;if(r&&b&&g){if(e.defaultPrevented&&v)return;return e.preventDefault(),void(h&&!s||(e.preventBaseUIHandler(),(0,u.B)(n,e)))}d&&!h&&(g||m)?e.defaultPrevented||(e.preventDefault(),m&&(e.preventBaseUIHandler(),(0,u.B)(n,e))):r&&c&&g&&e.preventDefault()},onKeyUp(e){t||((0,a.PT)(e),s?.(e),e.target===e.currentTarget&&h&&b&&p(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||h||b||e.defaultPrevented||" "!==e.key||(e.preventBaseUIHandler(),(0,u.B)(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():c?.(e)}},h?{type:"button"}:{role:"button"},v,l)},[t,v,b,h]),buttonRef:(0,s.K)(e=>{g.current=e,y()})}}function p(e){return(0,o.sb)(e)&&"BUTTON"===e.tagName}},15688(e,t,r){"use strict";r.d(t,{o:()=>h});var n=r(53169),o=r(51609),s=r(8970),i=r(28641),a=r(70071),c=r(12570),l=r(37885),u=r(51469),d=r(15015),p=r(67720);function h(e,t,r={}){let h=t.render;!1!==r.enabled&&(h=function(e){if(e?.$$typeof!==m)return e;const t=o.Children.toArray(e)[0];return o.isValidElement(t)?t:e}(h));const g=function(e,t,r){const{className:n,style:o}=e,{state:h=c.t0,ref:m,props:g,stateAttributesMapping:f,enabled:b=!0}=t,v=b?(0,u.S)(n,h):void 0,y=b?(0,d.m)(o,h):void 0,k=b?(0,l.v)(h,f):c.t0,w=b&&g?function(e){if(Array.isArray(e))return(0,p.lZ)(e);return(0,p.v6)(void 0,e)}(g):void 0,_=b?(0,a.r)(k,w)??{}:c.t0;"undefined"!=typeof document&&(b?Array.isArray(m)?_.ref=(0,s.U)([_.ref,(0,i.v)(r),...m]):_.ref=(0,s.a)(_.ref,(0,i.v)(r),m):(0,s.a)(null,null));if(!b)return c.t0;void 0!==v&&(_.className=(0,p.VN)(_.className,v));void 0!==y&&(_.style=(0,a.r)(_.style,y));return _}(t,r,h);if(!1===r.enabled)return null;return function(e,t,r,s){if(t){if("function"==typeof t)return t(r,s);const e=(0,p.v6)(r,t.props);return e.ref=r.ref,o.cloneElement(t,e)}if(e&&"string"==typeof e)return function(e,t){if("button"===e)return(0,o.createElement)("button",{type:"button",...t,key:t.key});if("img"===e)return(0,o.createElement)("img",{alt:"",...t,key:t.key});return o.createElement(e,t)}(e,r);throw new Error((0,n.A)(8))}(e,h,g,r.state??c.t0)}const m=Symbol.for("react.lazy")},67720(e,t,r){"use strict";r.d(t,{PT:()=>m,VN:()=>g,lZ:()=>i,v6:()=>s});var n=r(70071);const o={};function s(e,t,r,n,o){if(!(r||n||o||e))return a(t);let s=a(e);return t&&(s=c(s,t)),r&&(s=c(s,r)),n&&(s=c(s,n)),o&&(s=c(s,o)),s}function i(e){if(0===e.length)return o;if(1===e.length)return a(e[0]);let t=a(e[0]);for(let r=1;r<e.length;r+=1)t=c(t,e[r]);return t}function a(e){return u(e)?{...d(e,o)}:function(e){const t={...e};for(const e in t){const r=t[e];l(e,r)&&(t[e]=h(r))}return t}(e)}function c(e,t){return u(t)?d(t,e):function(e,t){if(!t)return e;for(const r in t){const o=t[r];switch(r){case"style":e[r]=(0,n.r)(e.style,o);break;case"className":e[r]=g(e.className,o);break;default:l(r,o)?e[r]=p(e[r],o):e[r]=o}}return e}(e,t)}function l(e,t){const r=e.charCodeAt(0),n=e.charCodeAt(1),o=e.charCodeAt(2);return 111===r&&110===n&&o>=65&&o<=90&&("function"==typeof t||void 0===t)}function u(e){return"function"==typeof e}function d(e,t){return u(e)?e(t):e??o}function p(e,t){return t?e?(...r)=>{const n=r[0];if(f(n)){const o=n;m(o);const s=t(...r);return o.baseUIHandlerPrevented||e?.(...r),s}const o=t(...r);return e?.(...r),o}:h(t):e}function h(e){return e?(...t)=>{const r=t[0];return f(r)&&m(r),e(...t)}:e}function m(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function g(e,t){return t?e?t+" "+e:t:e}function f(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}},23280(e,t,r){"use strict";r.d(t,{C:()=>o});var n=r(15688);function o(e){return(0,n.o)(e.defaultTagName??"div",e,e)}},2095(e,t,r){"use strict";r.d(t,{B:()=>o});var n=r(81289);function o(e,t,{detail:r=0}={}){e.dispatchEvent(new((0,n.zk)(e).PointerEvent)("click",{bubbles:!0,cancelable:!0,composed:!0,detail:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}},51469(e,t,r){"use strict";function n(e,t){return"function"==typeof e?e(t):e}r.d(t,{S:()=>n})},15015(e,t,r){"use strict";function n(e,t){return"function"==typeof e?e(t):e}r.d(t,{m:()=>n})},56200(e,t,r){"use strict";r.d(t,{S:()=>o});var n=r(51609);function o(e){const{focusableWhenDisabled:t,disabled:r,composite:o=!1,tabIndex:s=0,isNativeButton:i}=e,a=o&&!1!==t,c=o&&!1===t;return{props:n.useMemo(()=>{const e={onKeyDown(e){r&&t&&"Tab"!==e.key&&e.preventDefault()}};return o||(e.tabIndex=s,!i&&r&&(e.tabIndex=t?s:-1)),(i&&(t||a)||!i&&r)&&(e["aria-disabled"]=r),!i||t&&!c||(e.disabled=r),e},[o,r,t,a,c,i,s])}}},60266(e,t,r){"use strict";function n(e,t){const r={};for(const n in e){const o=e[n];if(t?.hasOwnProperty(n)){const e=t[n](o);null!=e&&Object.assign(r,e);continue}!0===o?r[`data-${n.toLowerCase()}`]="":o&&(r[`data-${n.toLowerCase()}`]=o.toString())}return r}r.d(t,{v:()=>n})},93307(e,t,r){"use strict";r.d(t,{o:()=>h});var n=r(53169),o=r(51609),s=r(8970),i=r(28641),a=r(70071),c=r(12570),l=r(60266),u=r(73850),d=r(21044),p=r(45339);function h(e,t,r={}){let h=t.render;!1!==r.enabled&&(h=function(e){if(e?.$$typeof!==m)return e;const t=o.Children.toArray(e)[0];return o.isValidElement(t)?t:e}(h));const g=function(e,t,r){const{className:n,style:o}=e,{state:h=c.t0,ref:m,props:g,stateAttributesMapping:f,enabled:b=!0}=t,v=b?(0,u.S)(n,h):void 0,y=b?(0,d.m)(o,h):void 0,k=b?(0,l.v)(h,f):c.t0,w=b&&g?function(e){if(Array.isArray(e))return(0,p.lZ)(e);return(0,p.v6)(void 0,e)}(g):void 0,_=b?(0,a.r)(k,w)??{}:c.t0;"undefined"!=typeof document&&(b?Array.isArray(m)?_.ref=(0,s.U)([_.ref,(0,i.v)(r),...m]):_.ref=(0,s.a)(_.ref,(0,i.v)(r),m):(0,s.a)(null,null));if(!b)return c.t0;void 0!==v&&(_.className=(0,p.VN)(_.className,v));void 0!==y&&(_.style=(0,a.r)(_.style,y));return _}(t,r,h);if(!1===r.enabled)return null;return function(e,t,r,s){if(t){if("function"==typeof t)return t(r,s);const e=(0,p.v6)(r,t.props);return e.ref=r.ref,o.cloneElement(t,e)}if(e&&"string"==typeof e)return function(e,t){if("button"===e)return(0,o.createElement)("button",{type:"button",...t,key:t.key});if("img"===e)return(0,o.createElement)("img",{alt:"",...t,key:t.key});return o.createElement(e,t)}(e,r);throw new Error((0,n.A)(8))}(e,h,g,r.state??c.t0)}const m=Symbol.for("react.lazy")},45339(e,t,r){"use strict";r.d(t,{VN:()=>g,lZ:()=>i,v6:()=>s});var n=r(70071);const o={};function s(e,t,r,n,o){if(!(r||n||o||e))return a(t);let s=a(e);return t&&(s=c(s,t)),r&&(s=c(s,r)),n&&(s=c(s,n)),o&&(s=c(s,o)),s}function i(e){if(0===e.length)return o;if(1===e.length)return a(e[0]);let t=a(e[0]);for(let r=1;r<e.length;r+=1)t=c(t,e[r]);return t}function a(e){return u(e)?{...d(e,o)}:function(e){const t={...e};for(const e in t){const r=t[e];l(e,r)&&(t[e]=h(r))}return t}(e)}function c(e,t){return u(t)?d(t,e):function(e,t){if(!t)return e;for(const r in t){const o=t[r];switch(r){case"style":e[r]=(0,n.r)(e.style,o);break;case"className":e[r]=g(e.className,o);break;default:l(r,o)?e[r]=p(e[r],o):e[r]=o}}return e}(e,t)}function l(e,t){const r=e.charCodeAt(0),n=e.charCodeAt(1),o=e.charCodeAt(2);return 111===r&&110===n&&o>=65&&o<=90&&("function"==typeof t||void 0===t)}function u(e){return"function"==typeof e}function d(e,t){return u(e)?e(t):e??o}function p(e,t){return t?e?(...r)=>{const n=r[0];if(f(n)){const o=n;m(o);const s=t(...r);return o.baseUIHandlerPrevented||e?.(...r),s}const o=t(...r);return e?.(...r),o}:h(t):e}function h(e){return e?(...t)=>{const r=t[0];return f(r)&&m(r),e(...t)}:e}function m(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function g(e,t){return t?e?t+" "+e:t:e}function f(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}},899(e,t,r){"use strict";r.d(t,{C:()=>o});var n=r(93307);function o(e){return(0,n.o)(e.defaultTagName??"div",e,e)}},73850(e,t,r){"use strict";function n(e,t){return"function"==typeof e?e(t):e}r.d(t,{S:()=>n})},21044(e,t,r){"use strict";function n(e,t){return"function"==typeof e?e(t):e}r.d(t,{m:()=>n})},12570(e,t,r){"use strict";r.d(t,{t0:()=>n});Object.freeze([]);const n=Object.freeze({})},53169(e,t,r){"use strict";r.d(t,{A:()=>s});var n,o;const s=(n="https://base-ui.com/production-error",o="Base UI",function(e,...t){const r=new URL(n);return r.searchParams.set("code",e.toString()),t.forEach(e=>r.searchParams.append("args[]",e)),`${o} error #${e}; visit ${r} for the full message.`})},28641(e,t,r){"use strict";r.d(t,{v:()=>s});var n=r(51609),o=r(83100);function s(e){if(!n.isValidElement(e))return null;const t=e,r=t.props;return((0,o._)(19)?r?.ref:t.ref)??null}},70071(e,t,r){"use strict";function n(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}r.d(t,{r:()=>n})},83100(e,t,r){"use strict";r.d(t,{_:()=>s});var n=r(51609);const o=parseInt(n.version,10);function s(e){return o>=e}},96233(e,t,r){"use strict";var n;r.d(t,{X:()=>s});var o=r(51609);const s={...n||(n=r.t(o,2))}},12002(e,t,r){"use strict";r.d(t,{g:()=>o});var n=r(51609);const o="undefined"!=typeof document?n.useLayoutEffect:()=>{}},8970(e,t,r){"use strict";r.d(t,{U:()=>s,a:()=>o});var n=r(31749);function o(e,t,r,o){const s=(0,n.j)(i).current;return function(e,t,r,n,o){return e.refs[0]!==t||e.refs[1]!==r||e.refs[2]!==n||e.refs[3]!==o}(s,e,t,r,o)&&a(s,[e,t,r,o]),s.callback}function s(e){const t=(0,n.j)(i).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,r)=>e!==t[r])}(t,e)&&a(t,e),t.callback}function i(){return{callback:null,cleanup:null,refs:[]}}function a(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=r=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=r){const n=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const o=t[e];if(null!=o)switch(typeof o){case"function":{const t=o(r);"function"==typeof t&&(n[e]=t);break}case"object":o.current=r}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const r=t[e];if(null!=r)switch(typeof r){case"function":{const t=n[e];"function"==typeof t?t():r(null);break}case"object":r.current=null}}}}}}},31749(e,t,r){"use strict";r.d(t,{j:()=>s});var n=r(51609);const o={};function s(e,t){const r=n.useRef(o);return r.current===o&&(r.current=e(t)),r}},19288(e,t,r){"use strict";r.d(t,{K:()=>a});var n=r(96233),o=r(31749);const s=n.X.useInsertionEffect,i=s&&s!==n.X.useLayoutEffect?s:e=>e();function a(e){const t=(0,o.j)(c).current;return t.next=e,i(t.effect),t.trampoline}function c(){const e={next:void 0,callback:l,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function l(){0}},81289(e,t,r){"use strict";function n(){return"undefined"!=typeof window}function o(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function s(e){return!!n()&&(e instanceof HTMLElement||e instanceof o(e).HTMLElement)}r.d(t,{sb:()=>s,zk:()=>o})},13109(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(86087),o=(0,n.forwardRef)(({icon:e,size:t=24,style:r,...o},s)=>{const i=e.props.style,a=i||r?{...i,...r}:void 0;return(0,n.cloneElement)(e,{width:t,height:t,...o,...a?{style:a}:{},ref:s})})},87756(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,o.jsx)(n.Path,{d:"M12 20L12 5M17 10L12 5L7 10",vectorEffect:"non-scaling-stroke"})})},55565(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z"})})},83147(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5.5h12a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5ZM4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6Zm4 10h2v-1.5H8V16Zm5 0h-2v-1.5h2V16Zm1 0h2v-1.5h-2V16Z"})})},84699(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsxs)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:[(0,o.jsx)(n.Path,{d:"M12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM12.75 8V13H11.25V8H12.75ZM12.75 14.5V16H11.25V14.5H12.75Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",stroke:"none"}),(0,o.jsx)(n.Path,{d:"M4.75 12C4.75 7.99593 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12Z",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]})},88901(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,o.jsx)(n.Path,{d:"M7 12L10 15L17 8",vectorEffect:"non-scaling-stroke"})})},48329(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,o.jsx)(n.Path,{d:"M10 6.5L15 12L10 17.5",vectorEffect:"non-scaling-stroke"})})},65995(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,o.jsx)(n.Path,{d:"M7.75 16.25L16.25 7.75M16.25 16.25L7.75 7.75",vectorEffect:"non-scaling-stroke"})})},1866(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"})})},42005(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M15.333 4C16.6677 4 17.75 5.0823 17.75 6.41699V6.75C17.75 7.20058 17.6394 7.62468 17.4473 8H18.5C19.2767 8 19.9154 8.59028 19.9922 9.34668L20 9.5V18.5C20 19.3284 19.3284 20 18.5 20H5.5C4.72334 20 4.08461 19.4097 4.00781 18.6533L4 18.5V9.5L4.00781 9.34668C4.07949 8.64069 4.64069 8.07949 5.34668 8.00781L5.5 8H6.55273C6.36065 7.62468 6.25 7.20058 6.25 6.75V6.41699C6.25 5.0823 7.3323 4 8.66699 4C10.0436 4.00011 11.2604 4.68183 12 5.72559C12.7396 4.68183 13.9564 4.00011 15.333 4ZM5.5 18.5H11.25V9.5H5.5V18.5ZM12.75 18.5H18.5V9.5H12.75V18.5ZM8.66699 5.5C8.16073 5.5 7.75 5.91073 7.75 6.41699V6.75C7.75 7.44036 8.30964 8 9 8H11.2461C11.2021 6.61198 10.0657 5.50017 8.66699 5.5ZM15.333 5.5C13.9343 5.50017 12.7979 6.61198 12.7539 8H15C15.6904 8 16.25 7.44036 16.25 6.75V6.41699C16.25 5.91073 15.8393 5.5 15.333 5.5Z"})})},41490(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8Zm6.5 8c0 .6 0 1.2-.2 1.8h-2.7c0-.6.2-1.1.2-1.8s0-1.2-.2-1.8h2.7c.2.6.2 1.1.2 1.8Zm-.9-3.2h-2.4c-.3-.9-.7-1.8-1.1-2.4-.1-.2-.2-.4-.3-.5 1.6.5 3 1.6 3.8 3ZM12.8 17c-.3.5-.6 1-.8 1.3-.2-.3-.5-.8-.8-1.3-.3-.5-.6-1.1-.8-1.7h3.3c-.2.6-.5 1.2-.8 1.7Zm-2.9-3.2c-.1-.6-.2-1.1-.2-1.8s0-1.2.2-1.8H14c.1.6.2 1.1.2 1.8s0 1.2-.2 1.8H9.9ZM11.2 7c.3-.5.6-1 .8-1.3.2.3.5.8.8 1.3.3.5.6 1.1.8 1.7h-3.3c.2-.6.5-1.2.8-1.7Zm-1-1.2c-.1.2-.2.3-.3.5-.4.7-.8 1.5-1.1 2.4H6.4c.8-1.4 2.2-2.5 3.8-3Zm-1.8 8H5.7c-.2-.6-.2-1.1-.2-1.8s0-1.2.2-1.8h2.7c0 .6-.2 1.1-.2 1.8s0 1.2.2 1.8Zm-2 1.4h2.4c.3.9.7 1.8 1.1 2.4.1.2.2.4.3.5-1.6-.5-3-1.6-3.8-3Zm7.4 3c.1-.2.2-.3.3-.5.4-.7.8-1.5 1.1-2.4h2.4c-.8 1.4-2.2 2.5-3.8 3Z"})})},28847(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,o.jsx)(n.Path,{d:"M12 16V11M12 9.5V8M19.25 12C19.25 16.0041 16.0041 19.25 12 19.25C7.99594 19.25 4.75 16.0041 4.75 12C4.75 7.99594 7.99594 4.75 12 4.75C16.0041 4.75 19.25 7.99594 19.25 12Z",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})})},375(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"m6.734 16.106 2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.158 1.093-1.028-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734Z"})})},33196(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})})},73493(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M4 6h12V4.5H4V6Zm16 4.5H4V9h16v1.5ZM4 15h16v-1.5H4V15Zm0 4.5h16V18H4v1.5Z"})})},93761(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M8.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H4v-3h4.001ZM4 20h9v-1.5H4V20Zm16-4H4v-1.5h16V16ZM13.001 3.984V9.47c0 1.518-.98 2.5-2.499 2.5h-.5v-1.5h.5c.69 0 1-.31 1-1V6.984H9v-3h4.001Z"})})},90437(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z"})})},48568(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M7 7.2h8.2L13.5 9l1.1 1.1 3.6-3.6-3.5-4-1.1 1 1.9 2.3H7c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.2-.5zm13.8 4V11h-1.5v.3c0 1.1 0 3.5-1 4.5-.3.3-.7.5-1.3.5H8.8l1.7-1.7-1.1-1.1L5.9 17l3.5 4 1.1-1-1.9-2.3H17c.9 0 1.7-.3 2.3-.9 1.5-1.4 1.5-4.2 1.5-5.6z"})})},80224(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M6.08 10.103h2.914L9.657 12h1.417L8.23 4H6.846L4 12h1.417l.663-1.897Zm1.463-4.137.994 2.857h-2l1.006-2.857ZM11 16H4v-1.5h7V16Zm1 0h8v-1.5h-8V16Zm-4 4H4v-1.5h4V20Zm7-1.5V20H9v-1.5h6Z"})})},57577(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M19.8 4h-1.5l1 8h1.5l-1-8ZM17 5.8c-.1-1-1-1.8-2-1.8H6.8c-.9 0-1.7.6-1.9 1.4l-1.8 6C2.7 12.7 3.7 14 5 14h4.4l-.8 3.6c-.3 1.3.7 2.4 1.9 2.4h.2c.6 0 1.2-.3 1.6-.8l5-6.6c.3-.4.5-.9.4-1.5L17 5.7Zm-.9 5.9-5 6.6c0 .1-.2.2-.4.2h-.2c-.3 0-.6-.3-.5-.6l.8-3.6c.1-.4 0-.9-.3-1.3s-.7-.6-1.2-.6H4.9c-.3 0-.6-.3-.5-.6l1.8-6c0-.2.3-.4.5-.4h8.2c.3 0 .5.2.5.4l.7 5.4v.4Z"})})},22201(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"m3 12 1 8h1.5l-1-8H3Zm15.8-2h-4.4l.8-3.6c.3-1.3-.7-2.4-1.9-2.4h-.2c-.6 0-1.2.3-1.6.8l-5 6.6c-.3.4-.4.8-.4 1.2v.2l.7 5.4v.2c.2.9 1 1.5 1.9 1.5h8.2c.9 0 1.7-.6 1.9-1.4l1.8-6c.4-1.3-.6-2.6-1.9-2.6Zm.5 2.1-1.8 6c0 .2-.3.4-.5.4H8.8c-.3 0-.5-.2-.5-.4l-.7-5.4v-.4l5-6.6c0-.1.2-.2.4-.2h.2c.3 0 .6.3.5.6l-.8 3.6c-.1.4 0 .9.3 1.3s.7.6 1.2.6h4.4c.3 0 .6.3.5.6Z"})})},55507(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"m4 5.5h2v6.5h1.5v-6.5h2v-1.5h-5.5zm16 10.5h-16v-1.5h16zm-7 4h-9v-1.5h9z"})})},57839(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z"})})},84701(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"})})},28755(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"M20.7 12.7s0-.1-.1-.2c0-.2-.2-.4-.4-.6-.3-.5-.9-1.2-1.6-1.8-.7-.6-1.5-1.3-2.6-1.8l-.6 1.4c.9.4 1.6 1 2.1 1.5.6.6 1.1 1.2 1.4 1.6.1.2.3.4.3.5v.1l.7-.3.7-.3Zm-5.2-9.3-1.8 4c-.5-.1-1.1-.2-1.7-.2-3 0-5.2 1.4-6.6 2.7-.7.7-1.2 1.3-1.6 1.8-.2.3-.3.5-.4.6 0 0 0 .1-.1.2s0 0 .7.3l.7.3V13c0-.1.2-.3.3-.5.3-.4.7-1 1.4-1.6 1.2-1.2 3-2.3 5.5-2.3H13v.3c-.4 0-.8-.1-1.1-.1-1.9 0-3.5 1.6-3.5 3.5s.6 2.3 1.6 2.9l-2 4.4.9.4 7.6-16.2-.9-.4Zm-3 12.6c1.7-.2 3-1.7 3-3.5s-.2-1.4-.6-1.9L12.4 16Z"})})},60484(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,o.jsx)(n.Path,{d:"m11.3 17.2-5-5c-.1-.1-.1-.3 0-.4l2.3-2.3-1.1-1-2.3 2.3c-.7.7-.7 1.8 0 2.5l5 5H7.5v1.5h5.3v-5.2h-1.5v2.6zm7.5-6.4-5-5h2.7V4.2h-5.2v5.2h1.5V6.8l5 5c.1.1.1.3 0 .4l-2.3 2.3 1.1 1.1 2.3-2.3c.6-.7.6-1.9-.1-2.5z"})})},58384(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(5573),o=r(10790),s=(0,o.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",style:{fill:"none"},stroke:"currentColor",strokeWidth:"1.5",children:(0,o.jsx)(n.Path,{d:"M4.75 15V19.25H12M12 19.25V4.5M12 19.25H19.25V15M17.5 10L12 4.5L6.5 10",vectorEffect:"non-scaling-stroke"})})},13022(e,t,r){"use strict";function n(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=n(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}r.d(t,{A:()=>o});const o=function(){for(var e,t,r=0,o="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=n(e))&&(o&&(o+=" "),o+=t);return o}},3175(e,t,r){"use strict";r.d(t,{Gz:()=>b,hl:()=>v});var n,o=r(25006),s=r(82826),i=r(72485);!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(n||(n={}));var a,c,l;function u(e){return e>=n.ZERO&&e<=n.NINE}function d(e){return e>=n.UPPER_A&&e<=n.UPPER_F||e>=n.LOWER_A&&e<=n.LOWER_F}function p(e){return e===n.EQUALS||function(e){return e>=n.UPPER_A&&e<=n.UPPER_Z||e>=n.LOWER_A&&e<=n.LOWER_Z||u(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(a||(a={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(c||(c={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(l||(l={}));class h{constructor(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=c.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=l.Strict}startEntity(e){this.decodeMode=e,this.state=c.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case c.EntityStart:return e.charCodeAt(t)===n.NUM?(this.state=c.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=c.NamedEntity,this.stateNamedEntity(e,t));case c.NumericStart:return this.stateNumericStart(e,t);case c.NumericDecimal:return this.stateNumericDecimal(e,t);case c.NumericHex:return this.stateNumericHex(e,t);case c.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===n.LOWER_X?(this.state=c.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=c.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,r,n){if(t!==r){const o=r-t;this.result=this.result*Math.pow(n,o)+parseInt(e.substr(t,o),n),this.consumed+=o}}stateNumericHex(e,t){const r=t;for(;t<e.length;){const n=e.charCodeAt(t);if(!u(n)&&!d(n))return this.addToNumericResult(e,r,t,16),this.emitNumericEntity(n,3);t+=1}return this.addToNumericResult(e,r,t,16),-1}stateNumericDecimal(e,t){const r=t;for(;t<e.length;){const n=e.charCodeAt(t);if(!u(n))return this.addToNumericResult(e,r,t,10),this.emitNumericEntity(n,2);t+=1}return this.addToNumericResult(e,r,t,10),-1}emitNumericEntity(e,t){var r;if(this.consumed<=t)return null===(r=this.errors)||void 0===r||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===n.SEMI)this.consumed+=1;else if(this.decodeMode===l.Strict)return 0;return this.emitCodePoint((0,i.y6)(this.result),this.consumed),this.errors&&(e!==n.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:r}=this;let o=r[this.treeIndex],s=(o&a.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const i=e.charCodeAt(t);if(this.treeIndex=g(r,o,this.treeIndex+Math.max(1,s),i),this.treeIndex<0)return 0===this.result||this.decodeMode===l.Attribute&&(0===s||p(i))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],s=(o&a.VALUE_LENGTH)>>14,0!==s){if(i===n.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==l.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:r}=this,n=(r[t]&a.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,n,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,r){const{decodeTree:n}=this;return this.emitCodePoint(1===t?n[e]&~a.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r}end(){var e;switch(this.state){case c.NamedEntity:return 0===this.result||this.decodeMode===l.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case c.NumericDecimal:return this.emitNumericEntity(0,2);case c.NumericHex:return this.emitNumericEntity(0,3);case c.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case c.EntityStart:return 0}}}function m(e){let t="";const r=new h(e,e=>t+=(0,i.MK)(e));return function(e,n){let o=0,s=0;for(;(s=e.indexOf("&",s))>=0;){t+=e.slice(o,s),r.startEntity(n);const i=r.write(e,s+1);if(i<0){o=s+r.end();break}o=s+i,s=0===i?o+1:o}const i=t+e.slice(o);return t="",i}}function g(e,t,r,n){const o=(t&a.BRANCH_LENGTH)>>7,s=t&a.JUMP_TABLE;if(0===o)return 0!==s&&n===s?r:-1;if(s){const t=n-s;return t<0||t>=o?-1:e[r+t]-1}let i=r,c=i+o-1;for(;i<=c;){const t=i+c>>>1,r=e[t];if(r<n)i=t+1;else{if(!(r>n))return e[t+o];c=t-1}}return-1}const f=m(o.A);m(s.A);function b(e,t=l.Legacy){return f(e,t)}function v(e){return f(e,l.Strict)}},72485(e,t,r){"use strict";var n;r.d(t,{MK:()=>s,y6:()=>i});const o=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),s=null!==(n=String.fromCodePoint)&&void 0!==n?n:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=o.get(e))&&void 0!==t?t:e}},97187(e,t,r){"use strict";r(47431),r(26834)},26834(){"use strict";const e=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);String.prototype.codePointAt;function t(e,t){return function(r){let n,o=0,s="";for(;n=e.exec(r);)o!==n.index&&(s+=r.substring(o,n.index)),s+=t.get(n[0].charCodeAt(0)),o=n.index+1;return s+r.substring(o)}}t(/[&<>'"]/g,e),t(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},25006(e,t,r){"use strict";r.d(t,{A:()=>n});const n=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0)))},82826(e,t,r){"use strict";r.d(t,{A:()=>n});const n=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)))},47431(){"use strict";function e(e){for(let t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}new Map(e([[9,"	"],[0,"
"],[22,"!"],[0,"""],[0,"#"],[0,"$"],[0,"%"],[0,"&"],[0,"'"],[0,"("],[0,")"],[0,"*"],[0,"+"],[0,","],[1,"."],[0,"/"],[10,":"],[0,";"],[0,{v:"<",n:8402,o:"<⃒"}],[0,{v:"=",n:8421,o:"=⃥"}],[0,{v:">",n:8402,o:">⃒"}],[0,"?"],[0,"@"],[26,"["],[0,"\"],[0,"]"],[0,"^"],[0,"_"],[0,"`"],[5,{n:106,o:"fj"}],[20,"{"],[0,"|"],[0,"}"],[34," "],[0,"¡"],[0,"¢"],[0,"£"],[0,"¤"],[0,"¥"],[0,"¦"],[0,"§"],[0,"¨"],[0,"©"],[0,"ª"],[0,"«"],[0,"¬"],[0,"­"],[0,"®"],[0,"¯"],[0,"°"],[0,"±"],[0,"²"],[0,"³"],[0,"´"],[0,"µ"],[0,"¶"],[0,"·"],[0,"¸"],[0,"¹"],[0,"º"],[0,"»"],[0,"¼"],[0,"½"],[0,"¾"],[0,"¿"],[0,"À"],[0,"Á"],[0,"Â"],[0,"Ã"],[0,"Ä"],[0,"Å"],[0,"Æ"],[0,"Ç"],[0,"È"],[0,"É"],[0,"Ê"],[0,"Ë"],[0,"Ì"],[0,"Í"],[0,"Î"],[0,"Ï"],[0,"Ð"],[0,"Ñ"],[0,"Ò"],[0,"Ó"],[0,"Ô"],[0,"Õ"],[0,"Ö"],[0,"×"],[0,"Ø"],[0,"Ù"],[0,"Ú"],[0,"Û"],[0,"Ü"],[0,"Ý"],[0,"Þ"],[0,"ß"],[0,"à"],[0,"á"],[0,"â"],[0,"ã"],[0,"ä"],[0,"å"],[0,"æ"],[0,"ç"],[0,"è"],[0,"é"],[0,"ê"],[0,"ë"],[0,"ì"],[0,"í"],[0,"î"],[0,"ï"],[0,"ð"],[0,"ñ"],[0,"ò"],[0,"ó"],[0,"ô"],[0,"õ"],[0,"ö"],[0,"÷"],[0,"ø"],[0,"ù"],[0,"ú"],[0,"û"],[0,"ü"],[0,"ý"],[0,"þ"],[0,"ÿ"],[0,"Ā"],[0,"ā"],[0,"Ă"],[0,"ă"],[0,"Ą"],[0,"ą"],[0,"Ć"],[0,"ć"],[0,"Ĉ"],[0,"ĉ"],[0,"Ċ"],[0,"ċ"],[0,"Č"],[0,"č"],[0,"Ď"],[0,"ď"],[0,"Đ"],[0,"đ"],[0,"Ē"],[0,"ē"],[2,"Ė"],[0,"ė"],[0,"Ę"],[0,"ę"],[0,"Ě"],[0,"ě"],[0,"Ĝ"],[0,"ĝ"],[0,"Ğ"],[0,"ğ"],[0,"Ġ"],[0,"ġ"],[0,"Ģ"],[1,"Ĥ"],[0,"ĥ"],[0,"Ħ"],[0,"ħ"],[0,"Ĩ"],[0,"ĩ"],[0,"Ī"],[0,"ī"],[2,"Į"],[0,"į"],[0,"İ"],[0,"ı"],[0,"IJ"],[0,"ij"],[0,"Ĵ"],[0,"ĵ"],[0,"Ķ"],[0,"ķ"],[0,"ĸ"],[0,"Ĺ"],[0,"ĺ"],[0,"Ļ"],[0,"ļ"],[0,"Ľ"],[0,"ľ"],[0,"Ŀ"],[0,"ŀ"],[0,"Ł"],[0,"ł"],[0,"Ń"],[0,"ń"],[0,"Ņ"],[0,"ņ"],[0,"Ň"],[0,"ň"],[0,"ʼn"],[0,"Ŋ"],[0,"ŋ"],[0,"Ō"],[0,"ō"],[2,"Ő"],[0,"ő"],[0,"Œ"],[0,"œ"],[0,"Ŕ"],[0,"ŕ"],[0,"Ŗ"],[0,"ŗ"],[0,"Ř"],[0,"ř"],[0,"Ś"],[0,"ś"],[0,"Ŝ"],[0,"ŝ"],[0,"Ş"],[0,"ş"],[0,"Š"],[0,"š"],[0,"Ţ"],[0,"ţ"],[0,"Ť"],[0,"ť"],[0,"Ŧ"],[0,"ŧ"],[0,"Ũ"],[0,"ũ"],[0,"Ū"],[0,"ū"],[0,"Ŭ"],[0,"ŭ"],[0,"Ů"],[0,"ů"],[0,"Ű"],[0,"ű"],[0,"Ų"],[0,"ų"],[0,"Ŵ"],[0,"ŵ"],[0,"Ŷ"],[0,"ŷ"],[0,"Ÿ"],[0,"Ź"],[0,"ź"],[0,"Ż"],[0,"ż"],[0,"Ž"],[0,"ž"],[19,"ƒ"],[34,"Ƶ"],[63,"ǵ"],[65,"ȷ"],[142,"ˆ"],[0,"ˇ"],[16,"˘"],[0,"˙"],[0,"˚"],[0,"˛"],[0,"˜"],[0,"˝"],[51,"̑"],[127,"Α"],[0,"Β"],[0,"Γ"],[0,"Δ"],[0,"Ε"],[0,"Ζ"],[0,"Η"],[0,"Θ"],[0,"Ι"],[0,"Κ"],[0,"Λ"],[0,"Μ"],[0,"Ν"],[0,"Ξ"],[0,"Ο"],[0,"Π"],[0,"Ρ"],[1,"Σ"],[0,"Τ"],[0,"Υ"],[0,"Φ"],[0,"Χ"],[0,"Ψ"],[0,"Ω"],[7,"α"],[0,"β"],[0,"γ"],[0,"δ"],[0,"ε"],[0,"ζ"],[0,"η"],[0,"θ"],[0,"ι"],[0,"κ"],[0,"λ"],[0,"μ"],[0,"ν"],[0,"ξ"],[0,"ο"],[0,"π"],[0,"ρ"],[0,"ς"],[0,"σ"],[0,"τ"],[0,"υ"],[0,"φ"],[0,"χ"],[0,"ψ"],[0,"ω"],[7,"ϑ"],[0,"ϒ"],[2,"ϕ"],[0,"ϖ"],[5,"Ϝ"],[0,"ϝ"],[18,"ϰ"],[0,"ϱ"],[3,"ϵ"],[0,"϶"],[10,"Ё"],[0,"Ђ"],[0,"Ѓ"],[0,"Є"],[0,"Ѕ"],[0,"І"],[0,"Ї"],[0,"Ј"],[0,"Љ"],[0,"Њ"],[0,"Ћ"],[0,"Ќ"],[1,"Ў"],[0,"Џ"],[0,"А"],[0,"Б"],[0,"В"],[0,"Г"],[0,"Д"],[0,"Е"],[0,"Ж"],[0,"З"],[0,"И"],[0,"Й"],[0,"К"],[0,"Л"],[0,"М"],[0,"Н"],[0,"О"],[0,"П"],[0,"Р"],[0,"С"],[0,"Т"],[0,"У"],[0,"Ф"],[0,"Х"],[0,"Ц"],[0,"Ч"],[0,"Ш"],[0,"Щ"],[0,"Ъ"],[0,"Ы"],[0,"Ь"],[0,"Э"],[0,"Ю"],[0,"Я"],[0,"а"],[0,"б"],[0,"в"],[0,"г"],[0,"д"],[0,"е"],[0,"ж"],[0,"з"],[0,"и"],[0,"й"],[0,"к"],[0,"л"],[0,"м"],[0,"н"],[0,"о"],[0,"п"],[0,"р"],[0,"с"],[0,"т"],[0,"у"],[0,"ф"],[0,"х"],[0,"ц"],[0,"ч"],[0,"ш"],[0,"щ"],[0,"ъ"],[0,"ы"],[0,"ь"],[0,"э"],[0,"ю"],[0,"я"],[1,"ё"],[0,"ђ"],[0,"ѓ"],[0,"є"],[0,"ѕ"],[0,"і"],[0,"ї"],[0,"ј"],[0,"љ"],[0,"њ"],[0,"ћ"],[0,"ќ"],[1,"ў"],[0,"џ"],[7074," "],[0," "],[0," "],[0," "],[1," "],[0," "],[0," "],[0," "],[0,"​"],[0,"‌"],[0,"‍"],[0,"‎"],[0,"‏"],[0,"‐"],[2,"–"],[0,"—"],[0,"―"],[0,"‖"],[1,"‘"],[0,"’"],[0,"‚"],[1,"“"],[0,"”"],[0,"„"],[1,"†"],[0,"‡"],[0,"•"],[2,"‥"],[0,"…"],[9,"‰"],[0,"‱"],[0,"′"],[0,"″"],[0,"‴"],[0,"‵"],[3,"‹"],[0,"›"],[3,"‾"],[2,"⁁"],[1,"⁃"],[0,"⁄"],[10,"⁏"],[7,"⁗"],[7,{v:" ",n:8202,o:"  "}],[0,"⁠"],[0,"⁡"],[0,"⁢"],[0,"⁣"],[72,"€"],[46,"⃛"],[0,"⃜"],[37,"ℂ"],[2,"℅"],[4,"ℊ"],[0,"ℋ"],[0,"ℌ"],[0,"ℍ"],[0,"ℎ"],[0,"ℏ"],[0,"ℐ"],[0,"ℑ"],[0,"ℒ"],[0,"ℓ"],[1,"ℕ"],[0,"№"],[0,"℗"],[0,"℘"],[0,"ℙ"],[0,"ℚ"],[0,"ℛ"],[0,"ℜ"],[0,"ℝ"],[0,"℞"],[3,"™"],[1,"ℤ"],[2,"℧"],[0,"ℨ"],[0,"℩"],[2,"ℬ"],[0,"ℭ"],[1,"ℯ"],[0,"ℰ"],[0,"ℱ"],[1,"ℳ"],[0,"ℴ"],[0,"ℵ"],[0,"ℶ"],[0,"ℷ"],[0,"ℸ"],[12,"ⅅ"],[0,"ⅆ"],[0,"ⅇ"],[0,"ⅈ"],[10,"⅓"],[0,"⅔"],[0,"⅕"],[0,"⅖"],[0,"⅗"],[0,"⅘"],[0,"⅙"],[0,"⅚"],[0,"⅛"],[0,"⅜"],[0,"⅝"],[0,"⅞"],[49,"←"],[0,"↑"],[0,"→"],[0,"↓"],[0,"↔"],[0,"↕"],[0,"↖"],[0,"↗"],[0,"↘"],[0,"↙"],[0,"↚"],[0,"↛"],[1,{v:"↝",n:824,o:"↝̸"}],[0,"↞"],[0,"↟"],[0,"↠"],[0,"↡"],[0,"↢"],[0,"↣"],[0,"↤"],[0,"↥"],[0,"↦"],[0,"↧"],[1,"↩"],[0,"↪"],[0,"↫"],[0,"↬"],[0,"↭"],[0,"↮"],[1,"↰"],[0,"↱"],[0,"↲"],[0,"↳"],[1,"↵"],[0,"↶"],[0,"↷"],[2,"↺"],[0,"↻"],[0,"↼"],[0,"↽"],[0,"↾"],[0,"↿"],[0,"⇀"],[0,"⇁"],[0,"⇂"],[0,"⇃"],[0,"⇄"],[0,"⇅"],[0,"⇆"],[0,"⇇"],[0,"⇈"],[0,"⇉"],[0,"⇊"],[0,"⇋"],[0,"⇌"],[0,"⇍"],[0,"⇎"],[0,"⇏"],[0,"⇐"],[0,"⇑"],[0,"⇒"],[0,"⇓"],[0,"⇔"],[0,"⇕"],[0,"⇖"],[0,"⇗"],[0,"⇘"],[0,"⇙"],[0,"⇚"],[0,"⇛"],[1,"⇝"],[6,"⇤"],[0,"⇥"],[15,"⇵"],[7,"⇽"],[0,"⇾"],[0,"⇿"],[0,"∀"],[0,"∁"],[0,{v:"∂",n:824,o:"∂̸"}],[0,"∃"],[0,"∄"],[0,"∅"],[1,"∇"],[0,"∈"],[0,"∉"],[1,"∋"],[0,"∌"],[2,"∏"],[0,"∐"],[0,"∑"],[0,"−"],[0,"∓"],[0,"∔"],[1,"∖"],[0,"∗"],[0,"∘"],[1,"√"],[2,"∝"],[0,"∞"],[0,"∟"],[0,{v:"∠",n:8402,o:"∠⃒"}],[0,"∡"],[0,"∢"],[0,"∣"],[0,"∤"],[0,"∥"],[0,"∦"],[0,"∧"],[0,"∨"],[0,{v:"∩",n:65024,o:"∩︀"}],[0,{v:"∪",n:65024,o:"∪︀"}],[0,"∫"],[0,"∬"],[0,"∭"],[0,"∮"],[0,"∯"],[0,"∰"],[0,"∱"],[0,"∲"],[0,"∳"],[0,"∴"],[0,"∵"],[0,"∶"],[0,"∷"],[0,"∸"],[1,"∺"],[0,"∻"],[0,{v:"∼",n:8402,o:"∼⃒"}],[0,{v:"∽",n:817,o:"∽̱"}],[0,{v:"∾",n:819,o:"∾̳"}],[0,"∿"],[0,"≀"],[0,"≁"],[0,{v:"≂",n:824,o:"≂̸"}],[0,"≃"],[0,"≄"],[0,"≅"],[0,"≆"],[0,"≇"],[0,"≈"],[0,"≉"],[0,"≊"],[0,{v:"≋",n:824,o:"≋̸"}],[0,"≌"],[0,{v:"≍",n:8402,o:"≍⃒"}],[0,{v:"≎",n:824,o:"≎̸"}],[0,{v:"≏",n:824,o:"≏̸"}],[0,{v:"≐",n:824,o:"≐̸"}],[0,"≑"],[0,"≒"],[0,"≓"],[0,"≔"],[0,"≕"],[0,"≖"],[0,"≗"],[1,"≙"],[0,"≚"],[1,"≜"],[2,"≟"],[0,"≠"],[0,{v:"≡",n:8421,o:"≡⃥"}],[0,"≢"],[1,{v:"≤",n:8402,o:"≤⃒"}],[0,{v:"≥",n:8402,o:"≥⃒"}],[0,{v:"≦",n:824,o:"≦̸"}],[0,{v:"≧",n:824,o:"≧̸"}],[0,{v:"≨",n:65024,o:"≨︀"}],[0,{v:"≩",n:65024,o:"≩︀"}],[0,{v:"≪",n:new Map(e([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(e([[824,"≫̸"],[7577,"≫⃒"]]))}],[0,"≬"],[0,"≭"],[0,"≮"],[0,"≯"],[0,"≰"],[0,"≱"],[0,"≲"],[0,"≳"],[0,"≴"],[0,"≵"],[0,"≶"],[0,"≷"],[0,"≸"],[0,"≹"],[0,"≺"],[0,"≻"],[0,"≼"],[0,"≽"],[0,"≾"],[0,{v:"≿",n:824,o:"≿̸"}],[0,"⊀"],[0,"⊁"],[0,{v:"⊂",n:8402,o:"⊂⃒"}],[0,{v:"⊃",n:8402,o:"⊃⃒"}],[0,"⊄"],[0,"⊅"],[0,"⊆"],[0,"⊇"],[0,"⊈"],[0,"⊉"],[0,{v:"⊊",n:65024,o:"⊊︀"}],[0,{v:"⊋",n:65024,o:"⊋︀"}],[1,"⊍"],[0,"⊎"],[0,{v:"⊏",n:824,o:"⊏̸"}],[0,{v:"⊐",n:824,o:"⊐̸"}],[0,"⊑"],[0,"⊒"],[0,{v:"⊓",n:65024,o:"⊓︀"}],[0,{v:"⊔",n:65024,o:"⊔︀"}],[0,"⊕"],[0,"⊖"],[0,"⊗"],[0,"⊘"],[0,"⊙"],[0,"⊚"],[0,"⊛"],[1,"⊝"],[0,"⊞"],[0,"⊟"],[0,"⊠"],[0,"⊡"],[0,"⊢"],[0,"⊣"],[0,"⊤"],[0,"⊥"],[1,"⊧"],[0,"⊨"],[0,"⊩"],[0,"⊪"],[0,"⊫"],[0,"⊬"],[0,"⊭"],[0,"⊮"],[0,"⊯"],[0,"⊰"],[1,"⊲"],[0,"⊳"],[0,{v:"⊴",n:8402,o:"⊴⃒"}],[0,{v:"⊵",n:8402,o:"⊵⃒"}],[0,"⊶"],[0,"⊷"],[0,"⊸"],[0,"⊹"],[0,"⊺"],[0,"⊻"],[1,"⊽"],[0,"⊾"],[0,"⊿"],[0,"⋀"],[0,"⋁"],[0,"⋂"],[0,"⋃"],[0,"⋄"],[0,"⋅"],[0,"⋆"],[0,"⋇"],[0,"⋈"],[0,"⋉"],[0,"⋊"],[0,"⋋"],[0,"⋌"],[0,"⋍"],[0,"⋎"],[0,"⋏"],[0,"⋐"],[0,"⋑"],[0,"⋒"],[0,"⋓"],[0,"⋔"],[0,"⋕"],[0,"⋖"],[0,"⋗"],[0,{v:"⋘",n:824,o:"⋘̸"}],[0,{v:"⋙",n:824,o:"⋙̸"}],[0,{v:"⋚",n:65024,o:"⋚︀"}],[0,{v:"⋛",n:65024,o:"⋛︀"}],[2,"⋞"],[0,"⋟"],[0,"⋠"],[0,"⋡"],[0,"⋢"],[0,"⋣"],[2,"⋦"],[0,"⋧"],[0,"⋨"],[0,"⋩"],[0,"⋪"],[0,"⋫"],[0,"⋬"],[0,"⋭"],[0,"⋮"],[0,"⋯"],[0,"⋰"],[0,"⋱"],[0,"⋲"],[0,"⋳"],[0,"⋴"],[0,{v:"⋵",n:824,o:"⋵̸"}],[0,"⋶"],[0,"⋷"],[1,{v:"⋹",n:824,o:"⋹̸"}],[0,"⋺"],[0,"⋻"],[0,"⋼"],[0,"⋽"],[0,"⋾"],[6,"⌅"],[0,"⌆"],[1,"⌈"],[0,"⌉"],[0,"⌊"],[0,"⌋"],[0,"⌌"],[0,"⌍"],[0,"⌎"],[0,"⌏"],[0,"⌐"],[1,"⌒"],[0,"⌓"],[1,"⌕"],[0,"⌖"],[5,"⌜"],[0,"⌝"],[0,"⌞"],[0,"⌟"],[2,"⌢"],[0,"⌣"],[9,"⌭"],[0,"⌮"],[7,"⌶"],[6,"⌽"],[1,"⌿"],[60,"⍼"],[51,"⎰"],[0,"⎱"],[2,"⎴"],[0,"⎵"],[0,"⎶"],[37,"⏜"],[0,"⏝"],[0,"⏞"],[0,"⏟"],[2,"⏢"],[4,"⏧"],[59,"␣"],[164,"Ⓢ"],[55,"─"],[1,"│"],[9,"┌"],[3,"┐"],[3,"└"],[3,"┘"],[3,"├"],[7,"┤"],[7,"┬"],[7,"┴"],[7,"┼"],[19,"═"],[0,"║"],[0,"╒"],[0,"╓"],[0,"╔"],[0,"╕"],[0,"╖"],[0,"╗"],[0,"╘"],[0,"╙"],[0,"╚"],[0,"╛"],[0,"╜"],[0,"╝"],[0,"╞"],[0,"╟"],[0,"╠"],[0,"╡"],[0,"╢"],[0,"╣"],[0,"╤"],[0,"╥"],[0,"╦"],[0,"╧"],[0,"╨"],[0,"╩"],[0,"╪"],[0,"╫"],[0,"╬"],[19,"▀"],[3,"▄"],[3,"█"],[8,"░"],[0,"▒"],[0,"▓"],[13,"□"],[8,"▪"],[0,"▫"],[1,"▭"],[0,"▮"],[2,"▱"],[1,"△"],[0,"▴"],[0,"▵"],[2,"▸"],[0,"▹"],[3,"▽"],[0,"▾"],[0,"▿"],[2,"◂"],[0,"◃"],[6,"◊"],[0,"○"],[32,"◬"],[2,"◯"],[8,"◸"],[0,"◹"],[0,"◺"],[0,"◻"],[0,"◼"],[8,"★"],[0,"☆"],[7,"☎"],[49,"♀"],[1,"♂"],[29,"♠"],[2,"♣"],[1,"♥"],[0,"♦"],[3,"♪"],[2,"♭"],[0,"♮"],[0,"♯"],[163,"✓"],[3,"✗"],[8,"✠"],[21,"✶"],[33,"❘"],[25,"❲"],[0,"❳"],[84,"⟈"],[0,"⟉"],[28,"⟦"],[0,"⟧"],[0,"⟨"],[0,"⟩"],[0,"⟪"],[0,"⟫"],[0,"⟬"],[0,"⟭"],[7,"⟵"],[0,"⟶"],[0,"⟷"],[0,"⟸"],[0,"⟹"],[0,"⟺"],[1,"⟼"],[2,"⟿"],[258,"⤂"],[0,"⤃"],[0,"⤄"],[0,"⤅"],[6,"⤌"],[0,"⤍"],[0,"⤎"],[0,"⤏"],[0,"⤐"],[0,"⤑"],[0,"⤒"],[0,"⤓"],[2,"⤖"],[2,"⤙"],[0,"⤚"],[0,"⤛"],[0,"⤜"],[0,"⤝"],[0,"⤞"],[0,"⤟"],[0,"⤠"],[2,"⤣"],[0,"⤤"],[0,"⤥"],[0,"⤦"],[0,"⤧"],[0,"⤨"],[0,"⤩"],[0,"⤪"],[8,{v:"⤳",n:824,o:"⤳̸"}],[1,"⤵"],[0,"⤶"],[0,"⤷"],[0,"⤸"],[0,"⤹"],[2,"⤼"],[0,"⤽"],[7,"⥅"],[2,"⥈"],[0,"⥉"],[0,"⥊"],[0,"⥋"],[2,"⥎"],[0,"⥏"],[0,"⥐"],[0,"⥑"],[0,"⥒"],[0,"⥓"],[0,"⥔"],[0,"⥕"],[0,"⥖"],[0,"⥗"],[0,"⥘"],[0,"⥙"],[0,"⥚"],[0,"⥛"],[0,"⥜"],[0,"⥝"],[0,"⥞"],[0,"⥟"],[0,"⥠"],[0,"⥡"],[0,"⥢"],[0,"⥣"],[0,"⥤"],[0,"⥥"],[0,"⥦"],[0,"⥧"],[0,"⥨"],[0,"⥩"],[0,"⥪"],[0,"⥫"],[0,"⥬"],[0,"⥭"],[0,"⥮"],[0,"⥯"],[0,"⥰"],[0,"⥱"],[0,"⥲"],[0,"⥳"],[0,"⥴"],[0,"⥵"],[0,"⥶"],[1,"⥸"],[0,"⥹"],[1,"⥻"],[0,"⥼"],[0,"⥽"],[0,"⥾"],[0,"⥿"],[5,"⦅"],[0,"⦆"],[4,"⦋"],[0,"⦌"],[0,"⦍"],[0,"⦎"],[0,"⦏"],[0,"⦐"],[0,"⦑"],[0,"⦒"],[0,"⦓"],[0,"⦔"],[0,"⦕"],[0,"⦖"],[3,"⦚"],[1,"⦜"],[0,"⦝"],[6,"⦤"],[0,"⦥"],[0,"⦦"],[0,"⦧"],[0,"⦨"],[0,"⦩"],[0,"⦪"],[0,"⦫"],[0,"⦬"],[0,"⦭"],[0,"⦮"],[0,"⦯"],[0,"⦰"],[0,"⦱"],[0,"⦲"],[0,"⦳"],[0,"⦴"],[0,"⦵"],[0,"⦶"],[0,"⦷"],[1,"⦹"],[1,"⦻"],[0,"⦼"],[1,"⦾"],[0,"⦿"],[0,"⧀"],[0,"⧁"],[0,"⧂"],[0,"⧃"],[0,"⧄"],[0,"⧅"],[3,"⧉"],[3,"⧍"],[0,"⧎"],[0,{v:"⧏",n:824,o:"⧏̸"}],[0,{v:"⧐",n:824,o:"⧐̸"}],[11,"⧜"],[0,"⧝"],[0,"⧞"],[4,"⧣"],[0,"⧤"],[0,"⧥"],[5,"⧫"],[8,"⧴"],[1,"⧶"],[9,"⨀"],[0,"⨁"],[0,"⨂"],[1,"⨄"],[1,"⨆"],[5,"⨌"],[0,"⨍"],[2,"⨐"],[0,"⨑"],[0,"⨒"],[0,"⨓"],[0,"⨔"],[0,"⨕"],[0,"⨖"],[0,"⨗"],[10,"⨢"],[0,"⨣"],[0,"⨤"],[0,"⨥"],[0,"⨦"],[0,"⨧"],[1,"⨩"],[0,"⨪"],[2,"⨭"],[0,"⨮"],[0,"⨯"],[0,"⨰"],[0,"⨱"],[1,"⨳"],[0,"⨴"],[0,"⨵"],[0,"⨶"],[0,"⨷"],[0,"⨸"],[0,"⨹"],[0,"⨺"],[0,"⨻"],[0,"⨼"],[2,"⨿"],[0,"⩀"],[1,"⩂"],[0,"⩃"],[0,"⩄"],[0,"⩅"],[0,"⩆"],[0,"⩇"],[0,"⩈"],[0,"⩉"],[0,"⩊"],[0,"⩋"],[0,"⩌"],[0,"⩍"],[2,"⩐"],[2,"⩓"],[0,"⩔"],[0,"⩕"],[0,"⩖"],[0,"⩗"],[0,"⩘"],[1,"⩚"],[0,"⩛"],[0,"⩜"],[0,"⩝"],[1,"⩟"],[6,"⩦"],[3,"⩪"],[2,{v:"⩭",n:824,o:"⩭̸"}],[0,"⩮"],[0,"⩯"],[0,{v:"⩰",n:824,o:"⩰̸"}],[0,"⩱"],[0,"⩲"],[0,"⩳"],[0,"⩴"],[0,"⩵"],[1,"⩷"],[0,"⩸"],[0,"⩹"],[0,"⩺"],[0,"⩻"],[0,"⩼"],[0,{v:"⩽",n:824,o:"⩽̸"}],[0,{v:"⩾",n:824,o:"⩾̸"}],[0,"⩿"],[0,"⪀"],[0,"⪁"],[0,"⪂"],[0,"⪃"],[0,"⪄"],[0,"⪅"],[0,"⪆"],[0,"⪇"],[0,"⪈"],[0,"⪉"],[0,"⪊"],[0,"⪋"],[0,"⪌"],[0,"⪍"],[0,"⪎"],[0,"⪏"],[0,"⪐"],[0,"⪑"],[0,"⪒"],[0,"⪓"],[0,"⪔"],[0,"⪕"],[0,"⪖"],[0,"⪗"],[0,"⪘"],[0,"⪙"],[0,"⪚"],[2,"⪝"],[0,"⪞"],[0,"⪟"],[0,"⪠"],[0,{v:"⪡",n:824,o:"⪡̸"}],[0,{v:"⪢",n:824,o:"⪢̸"}],[1,"⪤"],[0,"⪥"],[0,"⪦"],[0,"⪧"],[0,"⪨"],[0,"⪩"],[0,"⪪"],[0,"⪫"],[0,{v:"⪬",n:65024,o:"⪬︀"}],[0,{v:"⪭",n:65024,o:"⪭︀"}],[0,"⪮"],[0,{v:"⪯",n:824,o:"⪯̸"}],[0,{v:"⪰",n:824,o:"⪰̸"}],[2,"⪳"],[0,"⪴"],[0,"⪵"],[0,"⪶"],[0,"⪷"],[0,"⪸"],[0,"⪹"],[0,"⪺"],[0,"⪻"],[0,"⪼"],[0,"⪽"],[0,"⪾"],[0,"⪿"],[0,"⫀"],[0,"⫁"],[0,"⫂"],[0,"⫃"],[0,"⫄"],[0,{v:"⫅",n:824,o:"⫅̸"}],[0,{v:"⫆",n:824,o:"⫆̸"}],[0,"⫇"],[0,"⫈"],[2,{v:"⫋",n:65024,o:"⫋︀"}],[0,{v:"⫌",n:65024,o:"⫌︀"}],[2,"⫏"],[0,"⫐"],[0,"⫑"],[0,"⫒"],[0,"⫓"],[0,"⫔"],[0,"⫕"],[0,"⫖"],[0,"⫗"],[0,"⫘"],[0,"⫙"],[0,"⫚"],[0,"⫛"],[8,"⫤"],[1,"⫦"],[0,"⫧"],[0,"⫨"],[0,"⫩"],[1,"⫫"],[0,"⫬"],[0,"⫭"],[0,"⫮"],[0,"⫯"],[0,"⫰"],[0,"⫱"],[0,"⫲"],[0,"⫳"],[9,{v:"⫽",n:8421,o:"⫽⃥"}],[44343,{n:new Map(e([[56476,"𝒜"],[1,"𝒞"],[0,"𝒟"],[2,"𝒢"],[2,"𝒥"],[0,"𝒦"],[2,"𝒩"],[0,"𝒪"],[0,"𝒫"],[0,"𝒬"],[1,"𝒮"],[0,"𝒯"],[0,"𝒰"],[0,"𝒱"],[0,"𝒲"],[0,"𝒳"],[0,"𝒴"],[0,"𝒵"],[0,"𝒶"],[0,"𝒷"],[0,"𝒸"],[0,"𝒹"],[1,"𝒻"],[1,"𝒽"],[0,"𝒾"],[0,"𝒿"],[0,"𝓀"],[0,"𝓁"],[0,"𝓂"],[0,"𝓃"],[1,"𝓅"],[0,"𝓆"],[0,"𝓇"],[0,"𝓈"],[0,"𝓉"],[0,"𝓊"],[0,"𝓋"],[0,"𝓌"],[0,"𝓍"],[0,"𝓎"],[0,"𝓏"],[52,"𝔄"],[0,"𝔅"],[1,"𝔇"],[0,"𝔈"],[0,"𝔉"],[0,"𝔊"],[2,"𝔍"],[0,"𝔎"],[0,"𝔏"],[0,"𝔐"],[0,"𝔑"],[0,"𝔒"],[0,"𝔓"],[0,"𝔔"],[1,"𝔖"],[0,"𝔗"],[0,"𝔘"],[0,"𝔙"],[0,"𝔚"],[0,"𝔛"],[0,"𝔜"],[1,"𝔞"],[0,"𝔟"],[0,"𝔠"],[0,"𝔡"],[0,"𝔢"],[0,"𝔣"],[0,"𝔤"],[0,"𝔥"],[0,"𝔦"],[0,"𝔧"],[0,"𝔨"],[0,"𝔩"],[0,"𝔪"],[0,"𝔫"],[0,"𝔬"],[0,"𝔭"],[0,"𝔮"],[0,"𝔯"],[0,"𝔰"],[0,"𝔱"],[0,"𝔲"],[0,"𝔳"],[0,"𝔴"],[0,"𝔵"],[0,"𝔶"],[0,"𝔷"],[0,"𝔸"],[0,"𝔹"],[1,"𝔻"],[0,"𝔼"],[0,"𝔽"],[0,"𝔾"],[1,"𝕀"],[0,"𝕁"],[0,"𝕂"],[0,"𝕃"],[0,"𝕄"],[1,"𝕆"],[3,"𝕊"],[0,"𝕋"],[0,"𝕌"],[0,"𝕍"],[0,"𝕎"],[0,"𝕏"],[0,"𝕐"],[1,"𝕒"],[0,"𝕓"],[0,"𝕔"],[0,"𝕕"],[0,"𝕖"],[0,"𝕗"],[0,"𝕘"],[0,"𝕙"],[0,"𝕚"],[0,"𝕛"],[0,"𝕜"],[0,"𝕝"],[0,"𝕞"],[0,"𝕟"],[0,"𝕠"],[0,"𝕡"],[0,"𝕢"],[0,"𝕣"],[0,"𝕤"],[0,"𝕥"],[0,"𝕦"],[0,"𝕧"],[0,"𝕨"],[0,"𝕩"],[0,"𝕪"],[0,"𝕫"]]))}],[8906,"ff"],[0,"fi"],[0,"fl"],[0,"ffi"],[0,"ffl"]]))},9405(e,t,r){"use strict";r.d(t,{Gz:()=>s.Gz,hl:()=>s.hl});var n,o,s=r(3175);r(97187),r(26834);!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n||(n={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(o||(o={}))},37578(e,t,r){"use strict";r.d(t,{O:()=>u});const n="bits",o="bytes",s="",i="jedec",a="round",c="string",l={symbol:{iec:{bits:["bit","Kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["bit","Kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},fullform:{iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]}};function u(e,{bits:t=!1,pad:r=!1,base:u=-1,round:d=2,locale:p="",localeOptions:h={},separator:m="",spacer:g=" ",symbols:f={},standard:b="",output:v=c,fullform:y=!1,fullforms:k=[],exponent:w=-1,roundingMethod:_=a,precision:x=0}={}){let j=w,C=Number(e),A=[],S=0,E=s;"si"===b?(u=10,b=i):"iec"===b||b===i?u=2:2===u?b="iec":(u=10,b=i);const T=10===u?1e3:1024,N=!0===y,P=C<0,B=Math[_];if("bigint"!=typeof e&&isNaN(e))throw new TypeError("Invalid number");if("function"!=typeof B)throw new TypeError("Invalid rounding method");if(P&&(C=-C),(-1===j||isNaN(j))&&(j=Math.floor(Math.log(C)/Math.log(T)),j<0&&(j=0)),j>8&&(x>0&&(x+=8-j),j=8),"exponent"===v)return j;if(0===C)A[0]=0,E=A[1]=l.symbol[b][t?n:o][j];else{S=C/(2===u?Math.pow(2,10*j):Math.pow(1e3,j)),t&&(S*=8,S>=T&&j<8&&(S/=T,j++));const e=Math.pow(10,j>0?d:0);A[0]=B(S*e)/e,A[0]===T&&j<8&&-1===w&&(A[0]=1,j++),E=A[1]=10===u&&1===j?t?"kbit":"kB":l.symbol[b][t?n:o][j]}if(P&&(A[0]=-A[0]),x>0&&(A[0]=A[0].toPrecision(x)),A[1]=f[A[1]]||A[1],!0===p?A[0]=A[0].toLocaleString():p.length>0?A[0]=A[0].toLocaleString(p,h):m.length>0&&(A[0]=A[0].toString().replace(".",m)),r&&d>0){const e=A[0].toString(),t=m||(e.match(/(\D)/g)||[]).pop()||".",r=e.toString().split(t),n=r[1]||s,o=n.length,i=d-o;A[0]=`${r[0]}${t}${n.padEnd(o+i,"0")}`}return N&&(A[1]=k[j]?k[j]:l.fullform[b][j]+(t?"bit":"byte")+(1===A[0]?s:"s")),"array"===v?A:"object"===v?{value:A[0],symbol:A[1],exponent:j,unit:E}:A.join(g)}},59535(e,t,r){"use strict";r.d(t,{o4:()=>F});const n="3.9.3",o=n,s="function"==typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0}):void 0,i="function"==typeof TextEncoder?new TextEncoder:void 0,a=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),c=(e=>{let t={};return e.forEach((e,r)=>t[e]=r),t})(a),l=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,u=String.fromCharCode.bind(String),d="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),p=e=>e.replace(/=/g,"").replace(/[+\/]/g,e=>"+"==e?"-":"_"),h=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),m=e=>{let t,r,n,o,s="";const i=e.length%3;for(let i=0;i<e.length;){if((r=e.charCodeAt(i++))>255||(n=e.charCodeAt(i++))>255||(o=e.charCodeAt(i++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|o,s+=a[t>>18&63]+a[t>>12&63]+a[t>>6&63]+a[63&t]}return i?s.slice(0,i-3)+"===".substring(i):s},g="function"==typeof btoa?e=>btoa(e):m,f="function"==typeof Uint8Array.prototype.toBase64?e=>e.toBase64():e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(u.apply(null,e.subarray(r,r+4096)));return g(t.join(""))},b=(e,t=!1)=>t?p(f(e)):f(e),v=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?u(192|t>>>6)+u(128|63&t):u(224|t>>>12&15)+u(128|t>>>6&63)+u(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return u(240|t>>>18&7)+u(128|t>>>12&63)+u(128|t>>>6&63)+u(128|63&t)},y=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g,k=e=>e.replace(y,v),w=i?e=>f(i.encode(e)):e=>g(k(e)),_=(e,t=!1)=>t?p(w(e)):w(e),x=e=>_(e,!0),j=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return u((t>>>10)+55296)+u(56320+(1023&t));case 3:return u((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return u((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},A=e=>e.replace(j,C),S=e=>{if(e=e.replace(/\s+/g,""),!l.test(e))throw new TypeError("malformed base64.");let t,r,n;e+="==".slice(2-(3&e.length));let o=[];for(let s=0;s<e.length;)t=c[e.charAt(s++)]<<18|c[e.charAt(s++)]<<12|(r=c[e.charAt(s++)])<<6|(n=c[e.charAt(s++)]),64===r?o.push(u(t>>16&255)):64===n?o.push(u(t>>16&255,t>>8&255)):o.push(u(t>>16&255,t>>8&255,255&t));return o.join("")},E="function"==typeof atob?e=>atob(h(e)):S,T="function"==typeof Uint8Array.fromBase64?e=>Uint8Array.fromBase64(e):e=>d(E(e).split("").map(e=>e.charCodeAt(0))),N=e=>T(B(e)),P=s?e=>s.decode(T(e)):e=>A(E(e)),B=e=>h(e.replace(/[-_]/g,e=>"-"==e?"+":"/")),R=e=>P(B(e)),I=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),D=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,I(t));e("fromBase64",function(){return R(this)}),e("toBase64",function(e){return _(this,e)}),e("toBase64URI",function(){return _(this,!0)}),e("toBase64URL",function(){return _(this,!0)}),e("toUint8Array",function(){return N(this)})},L=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,I(t));e("toBase64",function(e){return b(this,e)}),e("toBase64URI",function(){return b(this,!0)}),e("toBase64URL",function(){return b(this,!0)})},F={version:n,VERSION:o,atob:E,atobPolyfill:S,btoa:g,btoaPolyfill:m,fromBase64:R,toBase64:_,encode:_,encodeURI:x,encodeURL:x,utob:k,btou:A,decode:R,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:b,toUint8Array:N,extendString:D,extendUint8Array:L,extendBuiltins:()=>{D(),L()}}},7237(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r(30724);function o(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(r){e[r]=t[r]})}),e}function s(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===s(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const c={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const l={"http:":{validate:function(e,t,r){const n=e.slice(t);return r.re.http||(r.re.http=new RegExp(`^\\/\\/${r.re.src_auth}${r.re.src_host_port_strict}${r.re.src_path}`,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){const n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+`(?:localhost|(?:(?:${r.re.src_domain})\\.)+${r.re.src_domain_root})`+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){const n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp(`^${r.re.src_email_name}@${r.re.src_host_strict}`,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function d(e){const t=e.re=(0,n.A)(e.__opts__),r=e.__tlds__.slice();function o(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||r.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),r.push(t.src_xn),t.src_tlds=r.join("|"),t.email_fuzzy=RegExp(o(t.tpl_email_fuzzy),"i"),t.email_fuzzy_global=RegExp(o(t.tpl_email_fuzzy),"ig"),t.link_fuzzy=RegExp(o(t.tpl_link_fuzzy),"i"),t.link_fuzzy_global=RegExp(o(t.tpl_link_fuzzy),"ig"),t.link_no_ip_fuzzy=RegExp(o(t.tpl_link_no_ip_fuzzy),"i"),t.link_no_ip_fuzzy_global=RegExp(o(t.tpl_link_no_ip_fuzzy),"ig"),t.host_fuzzy_test=RegExp(o(t.tpl_host_fuzzy_test),"i");const c=[];function l(e,t){throw new Error(`(LinkifyIt) Invalid schema "${e}": ${t}`)}e.__compiled__={},Object.keys(e.__schemas__).forEach(function(t){const r=e.__schemas__[t];if(null===r)return;const n={validate:null,link:null};if(e.__compiled__[t]=n,"[object Object]"===s(r))return!function(e){return"[object RegExp]"===s(e)}(r.validate)?i(r.validate)?n.validate=r.validate:l(t,r):n.validate=function(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}(r.validate),void(i(r.normalize)?n.normalize=r.normalize:r.normalize?l(t,r):n.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===s(e)}(r)?l(t,r):c.push(t)}),c.forEach(function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)}),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};const u=Object.keys(e.__compiled__).filter(function(t){return t.length>0&&e.__compiled__[t]}).map(a).join("|");e.re.schema_test=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${u})`,"i"),e.re.schema_search=RegExp(`(^|(?!_)(?:[><|]|${t.src_ZPCc}))(${u})`,"ig"),e.re.schema_at_start=RegExp(`^${e.re.schema_search.source}`,"i"),e.re.pretest=RegExp(`(${e.re.schema_test.source})|(${e.re.host_fuzzy_test.source})|@`,"i")}function p(e,t,r,n){const o=e.slice(r,n);this.schema=t.toLowerCase(),this.index=r,this.lastIndex=n,this.raw=o,this.text=o,this.url=o}function h(e,t){if(!(this instanceof h))return new h(e,t);var r;t||(r=e,Object.keys(r||{}).reduce(function(e,t){return e||c.hasOwnProperty(t)},!1)&&(t=e,e={})),this.__opts__=o({},c,t),this.__schemas__=o({},l,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},d(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},h.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},h.prototype.test=function(e){if(!e.length)return!1;let t,r;if(this.re.schema_test.test(e))for(r=this.re.schema_search,r.lastIndex=0;null!==(t=r.exec(e));)if(this.testSchemaAt(e,t[2],r.lastIndex))return!0;return!!(this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&e.search(this.re.host_fuzzy_test)>=0&&null!==e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))||!!(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==e.match(this.re.email_fuzzy))},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,r){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,r,this):0},h.prototype.match=function(e){const t=[],r=[],n=[],o=[];let s,i,a;function c(e,t){return e?t?e.index!==t.index?e.index<t.index?e:t:e.lastIndex>=t.lastIndex?e:t:e:t}if(!e.length)return null;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(s=a.exec(e));)i=this.testSchemaAt(e,s[2],a.lastIndex),i&&r.push({schema:s[2],index:s.index+s[1].length,lastIndex:s.index+s[0].length+i});if(this.__opts__.fuzzyLink&&this.__compiled__["http:"])for(a=this.__opts__.fuzzyIP?this.re.link_fuzzy_global:this.re.link_no_ip_fuzzy_global,a.lastIndex=0;null!==(s=a.exec(e));)n.push({schema:"",index:s.index+s[1].length,lastIndex:s.index+s[0].length});if(this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"])for(a=this.re.email_fuzzy_global,a.lastIndex=0;null!==(s=a.exec(e));)o.push({schema:"mailto:",index:s.index+s[1].length,lastIndex:s.index+s[0].length});const l=[0,0,0];let u=0;for(;;){const s=[r[l[0]],o[l[1]],n[l[2]]],i=c(c(s[0],s[1]),s[2]);if(!i)break;if(i===s[0]?l[0]++:i===s[1]?l[1]++:l[2]++,i.index<u)continue;const a=new p(e,i.schema,i.index,i.lastIndex);this.__compiled__[a.schema].normalize(a,this),t.push(a),u=i.lastIndex}return t.length?t:null},h.prototype.matchAtStart=function(e){if(!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const r=this.testSchemaAt(e,t[2],t[0].length);if(!r)return null;const n=new p(e,t[2],t.index+t[1].length,t.index+t[0].length+r);return this.__compiled__[n.schema].normalize(n,this),n},h.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(e,t,r){return e!==r[t-1]}).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},h.prototype.normalize=function(e){e.schema||(e.url=`http://${e.url}`),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url=`mailto:${e.url}`)},h.prototype.onCompile=function(){};const m=h},30724(e,t,r){"use strict";r.d(t,{A:()=>a}),r.dn(a);var n=r(60905),o=r(80786),s=r(60804),i=r(3506);function a(e){const t={};e=e||{},t.src_Any=n.A.source,t.src_Cc=o.A.source,t.src_Z=i.A.source,t.src_P=s.A.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const r="[><|]";return t.src_pseudo_letter=`(?:(?!${r}|${t.src_ZPCc})${t.src_Any})`,t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth=`(?:(?:(?!${t.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`,t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator=`(?=$|${r}|${t.src_ZPCc})(?!${e["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${t.src_ZPCc}))`,t.src_path=`(?:[/?#](?:(?!${t.src_ZCc}|${r}|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!${t.src_ZCc}|\\]).)*\\]|\\((?:(?!${t.src_ZCc}|[)]).)*\\)|\\{(?:(?!${t.src_ZCc}|[}]).)*\\}|\\"(?:(?!${t.src_ZCc}|["]).)+\\"|\\'(?:(?!${t.src_ZCc}|[']).)+\\'|\\'(?=${t.src_pseudo_letter}|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!${t.src_ZCc}|[.]|$)|`+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+`,(?!${t.src_ZCc}|$)|`+`;(?!${t.src_ZCc}|$)|`+`\\!+(?!${t.src_ZCc}|[!]|$)|`+`\\?(?!${t.src_ZCc}|[?]|$))+|\\/)?`,t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]{0,63}',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+`${t.src_pseudo_letter}{1,63})`,t.src_domain="(?:"+t.src_xn+"|"+`(?:${t.src_pseudo_letter})|`+`(?:${t.src_pseudo_letter}(?:-|${t.src_pseudo_letter}){0,61}${t.src_pseudo_letter}))`,t.src_host=`(?:(?:(?:(?:${t.src_domain})\\.)*${t.src_domain}))`,t.tpl_host_fuzzy="(?:"+t.src_ip4+"|"+`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%)))`,t.tpl_host_no_ip_fuzzy=`(?:(?:(?:${t.src_domain})\\.)+(?:%TLDS%))`,t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test=`localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:${t.src_ZPCc}|>|$))`,t.tpl_email_fuzzy=`(^|${r}|"|\\(|${t.src_ZCc})(${t.src_email_name}@${t.tpl_host_fuzzy_strict})`,t.tpl_link_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_fuzzy_strict}${t.src_path})`,t.tpl_link_no_ip_fuzzy=`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${t.src_ZPCc}))((?![$+<=>^\`||])${t.tpl_host_port_no_ip_fuzzy_strict}${t.src_path})`,t}},97158(e,t,r){"use strict";r.d(t,{A:()=>n.A});var n=r(56838)},84384(e,t,r){"use strict";r.d(t,{A:()=>n});const n=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"]},58105(e,t,r){"use strict";r.d(t,{l:()=>s,p:()=>i});const n="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",o="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",s=new RegExp("^(?:"+n+"|"+o+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)"),i=new RegExp("^(?:"+n+"|"+o+")")},54439(e,t,r){"use strict";r.r(t),r.d(t,{arrayReplaceAt:()=>p,asciiTrim:()=>I,assign:()=>d,escapeHtml:()=>j,escapeRE:()=>A,fromCodePoint:()=>m,has:()=>u,isMdAsciiPunct:()=>P,isPunctChar:()=>T,isPunctCharCode:()=>N,isSpace:()=>S,isString:()=>c,isValidEntityCode:()=>h,isWhiteSpace:()=>E,lib:()=>D,normalizeReference:()=>B,unescapeAll:()=>y,unescapeMd:()=>v});var n=r(25315),o=r(68407),s=r(60804),i=r(47795),a=r(9405);function c(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)}const l=Object.prototype.hasOwnProperty;function u(e,t){return l.call(e,t)}function d(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(r){e[r]=t[r]})}}),e}function p(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function h(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(!!(65535&~e&&65534!=(65535&e))&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function m(e){if(e>65535){const t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}const g=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,f=new RegExp(g.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),b=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function v(e){return e.indexOf("\\")<0?e:e.replace(g,"$1")}function y(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(f,function(e,t,r){return t||function(e,t){if(35===t.charCodeAt(0)&&b.test(t)){const r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return h(r)?m(r):e}const r=(0,a.Gz)(e);return r!==e?r:e}(e,r)})}const k=/[&<>"]/,w=/[&<>"]/g,_={"&":"&","<":"<",">":">",'"':"""};function x(e){return _[e]}function j(e){return k.test(e)?e.replace(w,x):e}const C=/[.?*+^$[\]\\(){}|-]/g;function A(e){return e.replace(C,"\\$&")}function S(e){switch(e){case 9:case 32:return!0}return!1}function E(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function T(e){return s.A.test(e)||i.A.test(e)}function N(e){return T(m(e))}function P(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function B(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}function R(e){return 32===e||9===e||10===e||13===e}function I(e){let t=0;for(;t<e.length&&R(e.charCodeAt(t));t++);let r=e.length-1;for(;r>=t&&R(e.charCodeAt(r));r--);return e.slice(t,r+1)}const D={mdurl:n,ucmicro:o}},80016(e,t,r){"use strict";r.r(t),r.d(t,{parseLinkDestination:()=>o.A,parseLinkLabel:()=>n.A,parseLinkTitle:()=>s.A});var n=r(65739),o=r(39945),s=r(8859)},39945(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t,r){let o,s=t;const i={ok:!1,pos:0,str:""};if(60===e.charCodeAt(s)){for(s++;s<r;){if(o=e.charCodeAt(s),10===o)return i;if(60===o)return i;if(62===o)return i.pos=s+1,i.str=(0,n.unescapeAll)(e.slice(t+1,s)),i.ok=!0,i;92===o&&s+1<r?s+=2:s++}return i}let a=0;for(;s<r&&(o=e.charCodeAt(s),32!==o)&&!(o<32||127===o);)if(92===o&&s+1<r){if(32===e.charCodeAt(s+1))break;s+=2}else{if(40===o&&(a++,a>32))return i;if(41===o){if(0===a)break;a--}s++}return t===s||0!==a||(i.str=(0,n.unescapeAll)(e.slice(t,s)),i.pos=s,i.ok=!0),i}},65739(e,t,r){"use strict";function n(e,t,r){let n,o,s,i;const a=e.posMax,c=e.pos;for(e.pos=t+1,n=1;e.pos<a;){if(s=e.src.charCodeAt(e.pos),93===s&&(n--,0===n)){o=!0;break}if(i=e.pos,e.md.inline.skipToken(e),91===s)if(i===e.pos-1)n++;else if(r)return e.pos=c,-1}let l=-1;return o&&(l=e.pos),e.pos=c,l}r.d(t,{A:()=>n})},8859(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t,r,o){let s,i=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(o)a.str=o.str,a.marker=o.marker;else{if(i>=r)return a;let n=e.charCodeAt(i);if(34!==n&&39!==n&&40!==n)return a;t++,i++,40===n&&(n=41),a.marker=n}for(;i<r;){if(s=e.charCodeAt(i),s===a.marker)return a.pos=i+1,a.str+=(0,n.unescapeAll)(e.slice(t,i)),a.ok=!0,a;if(40===s&&41===a.marker)return a;92===s&&i+1<r&&i++,i++}return a.can_continue=!0,a.str+=(0,n.unescapeAll)(e.slice(t,i)),a}},56838(e,t,r){"use strict";r.d(t,{A:()=>x});var n=r(54439),o=r(80016),s=r(71455),i=r(55439),a=r(60737),c=r(42813),l=r(7237),u=r(25315),d=r(87072),p=r(69404),h=r(8079),m=r(26881);const g={default:p.A,zero:h.A,commonmark:m.A},f=/^(vbscript|javascript|file|data):/,b=/^data:image\/(gif|png|jpeg|webp);/;function v(e){const t=e.trim().toLowerCase();return!f.test(t)||b.test(t)}const y=["http:","https:","mailto:"];function k(e){const t=u.parse(e,!0);if(t.hostname&&(!t.protocol||y.indexOf(t.protocol)>=0))try{t.hostname=d.Ay.toASCII(t.hostname)}catch(e){}return u.encode(u.format(t))}function w(e){const t=u.parse(e,!0);if(t.hostname&&(!t.protocol||y.indexOf(t.protocol)>=0))try{t.hostname=d.Ay.toUnicode(t.hostname)}catch(e){}return u.decode(u.format(t),u.decode.defaultChars+"%")}function _(e,t){if(!(this instanceof _))return new _(e,t);t||n.isString(e)||(t=e||{},e="default"),this.inline=new c.A,this.block=new a.A,this.core=new i.A,this.renderer=new s.A,this.linkify=new l.A,this.validateLink=v,this.normalizeLink=k,this.normalizeLinkText=w,this.utils=n,this.helpers=n.assign({},o),this.options={},this.configure(e),t&&this.set(t)}_.prototype.set=function(e){return n.assign(this.options,e),this},_.prototype.configure=function(e){const t=this;if(n.isString(e)){const t=e;if(!(e=g[t]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},_.prototype.enable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(e){return r.indexOf(e)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},_.prototype.disable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(t){r=r.concat(this[t].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(e){return r.indexOf(e)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},_.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},_.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},_.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},_.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},_.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const x=_},60737(e,t,r){"use strict";r.d(t,{A:()=>v});var n=r(79358),o=r(52961),s=r(20712),i=r(47103),a=r(36283),c=r(97537),l=r(79062),u=r(25792),d=r(43863),p=r(72577),h=r(13318),m=r(94206),g=r(94970);const f=[["table",s.A,["paragraph","reference"]],["code",i.A],["fence",a.A,["paragraph","reference","blockquote","list"]],["blockquote",c.A,["paragraph","reference","blockquote","list"]],["hr",l.A,["paragraph","reference","blockquote","list"]],["list",u.A,["paragraph","reference","blockquote"]],["reference",d.A],["html_block",p.A,["paragraph","reference","blockquote"]],["heading",h.A,["paragraph","reference","blockquote"]],["lheading",m.A],["paragraph",g.A]];function b(){this.ruler=new n.A;for(let e=0;e<f.length;e++)this.ruler.push(f[e][0],f[e][1],{alt:(f[e][2]||[]).slice()})}b.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),o=n.length,s=e.md.options.maxNesting;let i=t,a=!1;for(;i<r&&(e.line=i=e.skipEmptyLines(i),!(i>=r))&&!(e.sCount[i]<e.blkIndent);){if(e.level>=s){e.line=r;break}const t=e.line;let c=!1;for(let s=0;s<o;s++)if(c=n[s](e,i,r,!1),c){if(t>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),i=e.line,i<r&&e.isEmpty(i)&&(a=!0,i++,e.line=i)}},b.prototype.parse=function(e,t,r,n){if(!e)return;const o=new this.State(e,t,r,n);this.tokenize(o,o.line,o.lineMax)},b.prototype.State=o.A;const v=b},55439(e,t,r){"use strict";r.d(t,{A:()=>m});var n=r(79358),o=r(37569),s=r(2699),i=r(79417),a=r(85189),c=r(96084),l=r(48541),u=r(55834),d=r(11242);const p=[["normalize",s.A],["block",i.A],["inline",a.A],["linkify",c.A],["replacements",l.A],["smartquotes",u.A],["text_join",d.A]];function h(){this.ruler=new n.A;for(let e=0;e<p.length;e++)this.ruler.push(p[e][0],p[e][1])}h.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)},h.prototype.State=o.A;const m=h},42813(e,t,r){"use strict";r.d(t,{A:()=>_});var n=r(79358),o=r(60057),s=r(68597),i=r(44938),a=r(94076),c=r(17785),l=r(38797),u=r(50925),d=r(62206),p=r(22128),h=r(74427),m=r(85469),g=r(7105),f=r(41517),b=r(76014),v=r(70322);const y=[["text",s.A],["linkify",i.A],["newline",a.A],["escape",c.A],["backticks",l.A],["strikethrough",u.A.tokenize],["emphasis",d.A.tokenize],["link",p.A],["image",h.A],["autolink",m.A],["html_inline",g.A],["entity",f.A]],k=[["balance_pairs",b.A],["strikethrough",u.A.postProcess],["emphasis",d.A.postProcess],["fragments_join",v.A]];function w(){this.ruler=new n.A;for(let e=0;e<y.length;e++)this.ruler.push(y[e][0],y[e][1]);this.ruler2=new n.A;for(let e=0;e<k.length;e++)this.ruler2.push(k[e][0],k[e][1])}w.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,o=e.md.options.maxNesting,s=e.cache;if(void 0!==s[t])return void(e.pos=s[t]);let i=!1;if(e.level<o){for(let o=0;o<n;o++)if(e.level++,i=r[o](e,!0),e.level--,i){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;i||e.pos++,s[t]=e.pos},w.prototype.tokenize=function(e){const t=this.ruler.getRules(""),r=t.length,n=e.posMax,o=e.md.options.maxNesting;for(;e.pos<n;){const s=e.pos;let i=!1;if(e.level<o)for(let n=0;n<r;n++)if(i=t[n](e,!1),i){if(s>=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(i){if(e.pos>=n)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},w.prototype.parse=function(e,t,r,n){const o=new this.State(e,t,r,n);this.tokenize(o);const s=this.ruler2.getRules(""),i=s.length;for(let e=0;e<i;e++)s[e](o)},w.prototype.State=o.A;const _=w},26881(e,t,r){"use strict";r.d(t,{A:()=>n});const n={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},69404(e,t,r){"use strict";r.d(t,{A:()=>n});const n={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}}},8079(e,t,r){"use strict";r.d(t,{A:()=>n});const n={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}}},71455(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(54439);const o={};function s(){this.rules=(0,n.assign)({},o)}o.code_inline=function(e,t,r,o,s){const i=e[t];return"<code"+s.renderAttrs(i)+">"+(0,n.escapeHtml)(i.content)+"</code>"},o.code_block=function(e,t,r,o,s){const i=e[t];return"<pre"+s.renderAttrs(i)+"><code>"+(0,n.escapeHtml)(e[t].content)+"</code></pre>\n"},o.fence=function(e,t,r,o,s){const i=e[t],a=i.info?(0,n.unescapeAll)(i.info).trim():"";let c,l="",u="";if(a){const e=a.split(/(\s+)/g);l=e[0],u=e.slice(2).join("")}if(c=r.highlight&&r.highlight(i.content,l,u)||(0,n.escapeHtml)(i.content),0===c.indexOf("<pre"))return c+"\n";if(a){const e=i.attrIndex("class"),t=i.attrs?i.attrs.slice():[];e<0?t.push(["class",r.langPrefix+l]):(t[e]=t[e].slice(),t[e][1]+=" "+r.langPrefix+l);const n={attrs:t};return`<pre><code${s.renderAttrs(n)}>${c}</code></pre>\n`}return`<pre><code${s.renderAttrs(i)}>${c}</code></pre>\n`},o.image=function(e,t,r,n,o){const s=e[t];return s.attrs[s.attrIndex("alt")][1]=o.renderInlineAsText(s.children,r,n),o.renderToken(e,t,r)},o.hardbreak=function(e,t,r){return r.xhtmlOut?"<br />\n":"<br>\n"},o.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"<br />\n":"<br>\n":"\n"},o.text=function(e,t){return(0,n.escapeHtml)(e[t].content)},o.html_block=function(e,t){return e[t].content},o.html_inline=function(e,t){return e[t].content},s.prototype.renderAttrs=function(e){let t,r,o;if(!e.attrs)return"";for(o="",t=0,r=e.attrs.length;t<r;t++)o+=" "+(0,n.escapeHtml)(e.attrs[t][0])+'="'+(0,n.escapeHtml)(e.attrs[t][1])+'"';return o},s.prototype.renderToken=function(e,t,r){const n=e[t];let o="";if(n.hidden)return"";n.block&&-1!==n.nesting&&t&&e[t-1].hidden&&(o+="\n"),o+=(-1===n.nesting?"</":"<")+n.tag,o+=this.renderAttrs(n),0===n.nesting&&r.xhtmlOut&&(o+=" /");let s=!1;if(n.block&&(s=!0,1===n.nesting&&t+1<e.length)){const r=e[t+1];("inline"===r.type||r.hidden||-1===r.nesting&&r.tag===n.tag)&&(s=!1)}return o+=s?">\n":">",o},s.prototype.renderInline=function(e,t,r){let n="";const o=this.rules;for(let s=0,i=e.length;s<i;s++){const i=e[s].type;void 0!==o[i]?n+=o[i](e,s,t,r,this):n+=this.renderToken(e,s,t)}return n},s.prototype.renderInlineAsText=function(e,t,r){let n="";for(let o=0,s=e.length;o<s;o++)switch(e[o].type){case"text":case"html_inline":case"html_block":n+=e[o].content;break;case"image":n+=this.renderInlineAsText(e[o].children,t,r);break;case"softbreak":case"hardbreak":n+="\n"}return n},s.prototype.render=function(e,t,r){let n="";const o=this.rules;for(let s=0,i=e.length;s<i;s++){const i=e[s].type;"inline"===i?n+=this.renderInline(e[s].children,t,r):void 0!==o[i]?n+=o[i](e,s,t,r,this):n+=this.renderToken(e,s,t,r)}return n};const i=s},79358(e,t,r){"use strict";function n(){this.__rules__=[],this.__cache__=null}r.d(t,{A:()=>o}),n.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},n.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(e){e.enabled&&e.alt.forEach(function(e){t.indexOf(e)<0&&t.push(e)})}),e.__cache__={},t.forEach(function(t){e.__cache__[t]=[],e.__rules__.forEach(function(r){r.enabled&&(t&&r.alt.indexOf(t)<0||e.__cache__[t].push(r.fn))})})},n.prototype.at=function(e,t,r){const n=this.__find__(e),o=r||{};if(-1===n)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=o.alt||[],this.__cache__=null},n.prototype.before=function(e,t,r,n){const o=this.__find__(e),s=n||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null},n.prototype.after=function(e,t,r,n){const o=this.__find__(e),s=n||{};if(-1===o)throw new Error("Parser rule not found: "+e);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:r,alt:s.alt||[]}),this.__cache__=null},n.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null},n.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(e){const n=this.__find__(e);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!0,r.push(e)},this),this.__cache__=null,r},n.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(e){e.enabled=!1}),this.enable(e,t)},n.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(e){const n=this.__find__(e);if(n<0){if(t)return;throw new Error("Rules manager: invalid rule name "+e)}this.__rules__[n].enabled=!1,r.push(e)},this),this.__cache__=null,r},n.prototype.getRules=function(e){return null===this.__cache__&&this.__compile__(),this.__cache__[e]||[]};const o=n},97537(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t,r,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4)return!1;if(62!==e.src.charCodeAt(s))return!1;if(o)return!0;const c=[],l=[],u=[],d=[],p=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let m,g=!1;for(m=t;m<r;m++){const t=e.sCount[m]<e.blkIndent;if(s=e.bMarks[m]+e.tShift[m],i=e.eMarks[m],s>=i)break;if(62===e.src.charCodeAt(s++)&&!t){let t,r,o=e.sCount[m]+1;32===e.src.charCodeAt(s)?(s++,o++,r=!1,t=!0):9===e.src.charCodeAt(s)?(t=!0,(e.bsCount[m]+o)%4==3?(s++,o++,r=!1):r=!0):t=!1;let a=o;for(c.push(e.bMarks[m]),e.bMarks[m]=s;s<i;){const t=e.src.charCodeAt(s);if(!(0,n.isSpace)(t))break;9===t?a+=4-(a+e.bsCount[m]+(r?1:0))%4:a++,s++}g=s>=i,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(t?1:0),u.push(e.sCount[m]),e.sCount[m]=a-o,d.push(e.tShift[m]),e.tShift[m]=s-e.bMarks[m];continue}if(g)break;let o=!1;for(let t=0,n=p.length;t<n;t++)if(p[t](e,m,r,!0)){o=!0;break}if(o){e.lineMax=m,0!==e.blkIndent&&(c.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]-=e.blkIndent);break}c.push(e.bMarks[m]),l.push(e.bsCount[m]),d.push(e.tShift[m]),u.push(e.sCount[m]),e.sCount[m]=-1}const f=e.blkIndent;e.blkIndent=0;const b=e.push("blockquote_open","blockquote",1);b.markup=">";const v=[t,0];b.map=v,e.md.block.tokenize(e,t,m);e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=a,e.parentType=h,v[1]=e.line;for(let r=0;r<d.length;r++)e.bMarks[r+t]=c[r],e.tShift[r+t]=d[r],e.sCount[r+t]=u[r],e.bsCount[r+t]=l[r];return e.blkIndent=f,!0}},47103(e,t,r){"use strict";function n(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;let n=t+1,o=n;for(;n<r;)if(e.isEmpty(n))n++;else{if(!(e.sCount[n]-e.blkIndent>=4))break;n++,o=n}e.line=o;const s=e.push("code_block","code",0);return s.content=e.getLines(t,o,4+e.blkIndent,!1)+"\n",s.map=[t,e.line],!0}r.d(t,{A:()=>n})},36283(e,t,r){"use strict";function n(e,t,r,n){let o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(o+3>s)return!1;const i=e.src.charCodeAt(o);if(126!==i&&96!==i)return!1;let a=o;o=e.skipChars(o,i);let c=o-a;if(c<3)return!1;const l=e.src.slice(a,o),u=e.src.slice(o,s);if(96===i&&u.indexOf(String.fromCharCode(i))>=0)return!1;if(n)return!0;let d=t,p=!1;for(;(d++,!(d>=r))&&(o=a=e.bMarks[d]+e.tShift[d],s=e.eMarks[d],!(o<s&&e.sCount[d]<e.blkIndent));)if(e.src.charCodeAt(o)===i&&!(e.sCount[d]-e.blkIndent>=4||(o=e.skipChars(o,i),o-a<c||(o=e.skipSpaces(o),o<s)))){p=!0;break}c=e.sCount[t],e.line=d+(p?1:0);const h=e.push("fence","code",0);return h.info=u,h.content=e.getLines(t+1,d,c,!0),h.markup=l,h.map=[t,e.line],!0}r.d(t,{A:()=>n})},13318(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t,r,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(s);if(35!==a||s>=i)return!1;let c=1;for(a=e.src.charCodeAt(++s);35===a&&s<i&&c<=6;)c++,a=e.src.charCodeAt(++s);if(c>6||s<i&&!(0,n.isSpace)(a))return!1;if(o)return!0;i=e.skipSpacesBack(i,s);const l=e.skipCharsBack(i,35,s);l>s&&(0,n.isSpace)(e.src.charCodeAt(l-1))&&(i=l),e.line=t+1;const u=e.push("heading_open","h"+String(c),1);u.markup="########".slice(0,c),u.map=[t,e.line];const d=e.push("inline","",0);d.content=(0,n.asciiTrim)(e.src.slice(s,i)),d.map=[t,e.line],d.children=[];return e.push("heading_close","h"+String(c),-1).markup="########".slice(0,c),!0}},79062(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t,r,o){const s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let i=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(i++);if(42!==a&&45!==a&&95!==a)return!1;let c=1;for(;i<s;){const t=e.src.charCodeAt(i++);if(t!==a&&!(0,n.isSpace)(t))return!1;t===a&&c++}if(c<3)return!1;if(o)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(c+1).join(String.fromCharCode(a)),!0}},72577(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(84384),o=r(58105);const s=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+n.A.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(o.p.source+"\\s*$"),/^$/,!1]];function i(e,t,r,n){let o=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(o))return!1;let a=e.src.slice(o,i),c=0;for(;c<s.length&&!s[c][0].test(a);c++);if(c===s.length)return!1;if(n)return s[c][2];let l=t+1;const u=s[c][1].test("");if(!s[c][1].test(a))for(;l<r&&(!(e.sCount[l]<e.blkIndent)||!u&&e.isEmpty(l));l++)if(o=e.bMarks[l]+e.tShift[l],i=e.eMarks[l],a=e.src.slice(o,i),s[c][1].test(a)){0!==a.length&&l++;break}e.line=l;const d=e.push("html_block","",0);return d.map=[t,l],d.content=e.getLines(t,l,e.blkIndent,!0),!0}},94206(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t,r){const o=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const s=e.parentType;e.parentType="paragraph";let i,a=0,c=t+1;for(;c<r&&!e.isEmpty(c);c++){if(e.sCount[c]-e.blkIndent>3)continue;if(e.sCount[c]>=e.blkIndent){let t=e.bMarks[c]+e.tShift[c];const r=e.eMarks[c];if(t<r&&(i=e.src.charCodeAt(t),(45===i||61===i)&&(t=e.skipChars(t,i),t=e.skipSpaces(t),t>=r))){a=61===i?1:2;break}}if(e.sCount[c]<0)continue;let t=!1;for(let n=0,s=o.length;n<s;n++)if(o[n](e,c,r,!0)){t=!0;break}if(t)break}if(!a)return e.parentType=s,!1;const l=(0,n.asciiTrim)(e.getLines(t,c,e.blkIndent,!1));e.line=c+1;const u=e.push("heading_open","h"+String(a),1);u.markup=String.fromCharCode(i),u.map=[t,e.line];const d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];return e.push("heading_close","h"+String(a),-1).markup=String.fromCharCode(i),e.parentType=s,!0}},25792(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(54439);function o(e,t){const r=e.eMarks[t];let o=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(o++);if(42!==s&&45!==s&&43!==s)return-1;if(o<r){const t=e.src.charCodeAt(o);if(!(0,n.isSpace)(t))return-1}return o}function s(e,t){const r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];let s=r;if(s+1>=o)return-1;let i=e.src.charCodeAt(s++);if(i<48||i>57)return-1;for(;;){if(s>=o)return-1;if(i=e.src.charCodeAt(s++),!(i>=48&&i<=57)){if(41===i||46===i)break;return-1}if(s-r>=10)return-1}return s<o&&(i=e.src.charCodeAt(s),!(0,n.isSpace)(i))?-1:s}function i(e,t,r,n){let i,a,c,l,u=t,d=!0;if(e.sCount[u]-e.blkIndent>=4)return!1;if(e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]<e.blkIndent)return!1;let p,h,m,g=!1;if(n&&"paragraph"===e.parentType&&e.sCount[u]>=e.blkIndent&&(g=!0),(m=s(e,u))>=0){if(p=!0,c=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(c,m-1)),g&&1!==h)return!1}else{if(!((m=o(e,u))>=0))return!1;p=!1}if(g&&e.skipSpaces(m)>=e.eMarks[u])return!1;if(n)return!0;const f=e.src.charCodeAt(m-1),b=e.tokens.length;p?(l=e.push("ordered_list_open","ol",1),1!==h&&(l.attrs=[["start",h]])):l=e.push("bullet_list_open","ul",1);const v=[u,0];l.map=v,l.markup=String.fromCharCode(f);let y=!1;const k=e.md.block.ruler.getRules("list"),w=e.parentType;for(e.parentType="list";u<r;){a=m,i=e.eMarks[u];const t=e.sCount[u]+m-(e.bMarks[u]+e.tShift[u]);let n=t;for(;a<i;){const t=e.src.charCodeAt(a);if(9===t)n+=4-(n+e.bsCount[u])%4;else{if(32!==t)break;n++}a++}const h=a;let g;g=h>=i?1:n-t,g>4&&(g=1);const b=t+g;l=e.push("list_item_open","li",1),l.markup=String.fromCharCode(f);const v=[u,0];l.map=v,p&&(l.info=e.src.slice(c,m-1));const w=e.tight,_=e.tShift[u],x=e.sCount[u],j=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=b,e.tight=!0,e.tShift[u]=h-e.bMarks[u],e.sCount[u]=n,h>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,u,r,!0),e.tight&&!y||(d=!1),y=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=j,e.tShift[u]=_,e.sCount[u]=x,e.tight=w,l=e.push("list_item_close","li",-1),l.markup=String.fromCharCode(f),u=e.line,v[1]=u,u>=r)break;if(e.sCount[u]<e.blkIndent)break;if(e.sCount[u]-e.blkIndent>=4)break;let C=!1;for(let t=0,n=k.length;t<n;t++)if(k[t](e,u,r,!0)){C=!0;break}if(C)break;if(p){if(m=s(e,u),m<0)break;c=e.bMarks[u]+e.tShift[u]}else if(m=o(e,u),m<0)break;if(f!==e.src.charCodeAt(m-1))break}return l=p?e.push("ordered_list_close","ol",-1):e.push("bullet_list_close","ul",-1),l.markup=String.fromCharCode(f),v[1]=u,e.line=u,e.parentType=w,d&&function(e,t){const r=e.level+2;for(let n=t+2,o=e.tokens.length-2;n<o;n++)e.tokens[n].level===r&&"paragraph_open"===e.tokens[n].type&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}(e,b),!0}},94970(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t,r){const o=e.md.block.ruler.getRules("paragraph"),s=e.parentType;let i=t+1;for(e.parentType="paragraph";i<r&&!e.isEmpty(i);i++){if(e.sCount[i]-e.blkIndent>3)continue;if(e.sCount[i]<0)continue;let t=!1;for(let n=0,s=o.length;n<s;n++)if(o[n](e,i,r,!0)){t=!0;break}if(t)break}const a=(0,n.asciiTrim)(e.getLines(t,i,e.blkIndent,!1));e.line=i;e.push("paragraph_open","p",1).map=[t,e.line];const c=e.push("inline","",0);return c.content=a,c.map=[t,e.line],c.children=[],e.push("paragraph_close","p",-1),e.parentType=s,!0}},43863(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t,r,o){let s=e.bMarks[t]+e.tShift[t],i=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4)return!1;if(91!==e.src.charCodeAt(s))return!1;function c(t){const r=e.lineMax;if(t>=r||e.isEmpty(t))return null;let n=!1;if(e.sCount[t]-e.blkIndent>3&&(n=!0),e.sCount[t]<0&&(n=!0),!n){const n=e.md.block.ruler.getRules("reference"),o=e.parentType;e.parentType="reference";let s=!1;for(let o=0,i=n.length;o<i;o++)if(n[o](e,t,r,!0)){s=!0;break}if(e.parentType=o,s)return null}const o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];return e.src.slice(o,s+1)}let l=e.src.slice(s,i+1);i=l.length;let u=-1;for(s=1;s<i;s++){const e=l.charCodeAt(s);if(91===e)return!1;if(93===e){u=s;break}if(10===e){const e=c(a);null!==e&&(l+=e,i=l.length,a++)}else if(92===e&&(s++,s<i&&10===l.charCodeAt(s))){const e=c(a);null!==e&&(l+=e,i=l.length,a++)}}if(u<0||58!==l.charCodeAt(u+1))return!1;for(s=u+2;s<i;s++){const e=l.charCodeAt(s);if(10===e){const e=c(a);null!==e&&(l+=e,i=l.length,a++)}else if(!(0,n.isSpace)(e))break}const d=e.md.helpers.parseLinkDestination(l,s,i);if(!d.ok)return!1;const p=e.md.normalizeLink(d.str);if(!e.md.validateLink(p))return!1;s=d.pos;const h=s,m=a,g=s;for(;s<i;s++){const e=l.charCodeAt(s);if(10===e){const e=c(a);null!==e&&(l+=e,i=l.length,a++)}else if(!(0,n.isSpace)(e))break}let f,b=e.md.helpers.parseLinkTitle(l,s,i);for(;b.can_continue;){const t=c(a);if(null===t)break;l+=t,s=i,i=l.length,a++,b=e.md.helpers.parseLinkTitle(l,s,i,b)}for(s<i&&g!==s&&b.ok?(f=b.str,s=b.pos):(f="",s=h,a=m);s<i;){const e=l.charCodeAt(s);if(!(0,n.isSpace)(e))break;s++}if(s<i&&10!==l.charCodeAt(s)&&f)for(f="",s=h,a=m;s<i;){const e=l.charCodeAt(s);if(!(0,n.isSpace)(e))break;s++}if(s<i&&10!==l.charCodeAt(s))return!1;const v=(0,n.normalizeReference)(l.slice(1,u));return!!v&&(o||(void 0===e.env.references&&(e.env.references={}),void 0===e.env.references[v]&&(e.env.references[v]={title:f,href:p}),e.line=a),!0)}},52961(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(57997),o=r(54439);function s(e,t,r,n){this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const s=this.src;for(let e=0,t=0,r=0,n=0,i=s.length,a=!1;t<i;t++){const c=s.charCodeAt(t);if(!a){if((0,o.isSpace)(c)){r++,9===c?n+=4-n%4:n++;continue}a=!0}10!==c&&t!==i-1||(10!==c&&t++,this.bMarks.push(e),this.eMarks.push(t),this.tShift.push(r),this.sCount.push(n),this.bsCount.push(0),a=!1,r=0,n=0,e=t+1)}this.bMarks.push(s.length),this.eMarks.push(s.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}s.prototype.push=function(e,t,r){const o=new n.A(e,t,r);return o.block=!0,r<0&&this.level--,o.level=this.level,r>0&&this.level++,this.tokens.push(o),o},s.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},s.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},s.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const t=this.src.charCodeAt(e);if(!(0,o.isSpace)(t))break}return e},s.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!(0,o.isSpace)(this.src.charCodeAt(--e)))return e+1;return e},s.prototype.skipChars=function(e,t){for(let r=this.src.length;e<r&&this.src.charCodeAt(e)===t;e++);return e},s.prototype.skipCharsBack=function(e,t,r){if(e<=r)return e;for(;e>r;)if(t!==this.src.charCodeAt(--e))return e+1;return e},s.prototype.getLines=function(e,t,r,n){if(e>=t)return"";const s=new Array(t-e);for(let i=0,a=e;a<t;a++,i++){let e=0;const c=this.bMarks[a];let l,u=c;for(l=a+1<t||n?this.eMarks[a]+1:this.eMarks[a];u<l&&e<r;){const t=this.src.charCodeAt(u);if((0,o.isSpace)(t))9===t?e+=4-(e+this.bsCount[a])%4:e++;else{if(!(u-c<this.tShift[a]))break;e++}u++}s[i]=e>r?new Array(e-r+1).join(" ")+this.src.slice(u,l):this.src.slice(u,l)}return s.join("")},s.prototype.Token=n.A;const i=s},20712(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(54439);function o(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function s(e){const t=[],r=e.length;let n=0,o=e.charCodeAt(n),s=!1,i=0,a="";for(;n<r;)124===o&&(s?(a+=e.substring(i,n-1),i=n):(t.push(a+e.substring(i,n)),a="",i=n+1)),s=92===o,n++,o=e.charCodeAt(n);return t.push(a+e.substring(i)),t}function i(e,t,r,i){if(t+2>r)return!1;let a=t+1;if(e.sCount[a]<e.blkIndent)return!1;if(e.sCount[a]-e.blkIndent>=4)return!1;let c=e.bMarks[a]+e.tShift[a];if(c>=e.eMarks[a])return!1;const l=e.src.charCodeAt(c++);if(124!==l&&45!==l&&58!==l)return!1;if(c>=e.eMarks[a])return!1;const u=e.src.charCodeAt(c++);if(124!==u&&45!==u&&58!==u&&!(0,n.isSpace)(u))return!1;if(45===l&&(0,n.isSpace)(u))return!1;for(;c<e.eMarks[a];){const t=e.src.charCodeAt(c);if(124!==t&&45!==t&&58!==t&&!(0,n.isSpace)(t))return!1;c++}let d=o(e,t+1),p=d.split("|");const h=[];for(let e=0;e<p.length;e++){const t=p[e].trim();if(!t){if(0===e||e===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(t))return!1;58===t.charCodeAt(t.length-1)?h.push(58===t.charCodeAt(0)?"center":"right"):58===t.charCodeAt(0)?h.push("left"):h.push("")}if(d=o(e,t).trim(),-1===d.indexOf("|"))return!1;if(e.sCount[t]-e.blkIndent>=4)return!1;p=s(d),p.length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop();const m=p.length;if(0===m||m!==h.length)return!1;if(i)return!0;const g=e.parentType;e.parentType="table";const f=e.md.block.ruler.getRules("blockquote"),b=[t,0];e.push("table_open","table",1).map=b;e.push("thead_open","thead",1).map=[t,t+1];e.push("tr_open","tr",1).map=[t,t+1];for(let t=0;t<p.length;t++){const r=e.push("th_open","th",1);h[t]&&(r.attrs=[["style","text-align:"+h[t]]]);const n=e.push("inline","",0);n.content=p[t].trim(),n.children=[],e.push("th_close","th",-1)}let v;e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y=0;for(a=t+2;a<r&&!(e.sCount[a]<e.blkIndent);a++){let n=!1;for(let t=0,o=f.length;t<o;t++)if(f[t](e,a,r,!0)){n=!0;break}if(n)break;if(d=o(e,a).trim(),!d)break;if(e.sCount[a]-e.blkIndent>=4)break;if(p=s(d),p.length&&""===p[0]&&p.shift(),p.length&&""===p[p.length-1]&&p.pop(),y+=m-p.length,y>65536)break;if(a===t+2){e.push("tbody_open","tbody",1).map=v=[t+2,0]}e.push("tr_open","tr",1).map=[a,a+1];for(let t=0;t<m;t++){const r=e.push("td_open","td",1);h[t]&&(r.attrs=[["style","text-align:"+h[t]]]);const n=e.push("inline","",0);n.content=p[t]?p[t].trim():"",n.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return v&&(e.push("tbody_close","tbody",-1),v[1]=a),e.push("table_close","table",-1),b[1]=a,e.parentType=g,e.line=a,!0}},79417(e,t,r){"use strict";function n(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}r.d(t,{A:()=>n})},85189(e,t,r){"use strict";function n(e){const t=e.tokens;for(let r=0,n=t.length;r<n;r++){const n=t[r];"inline"===n.type&&e.md.inline.parse(n.content,e.md,e.env,n.children)}}r.d(t,{A:()=>n})},96084(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(54439);function o(e){return/^<a[>\s]/i.test(e)}function s(e){return/^<\/a\s*>/i.test(e)}function i(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,i=t.length;r<i;r++){if("inline"!==t[r].type||!e.md.linkify.pretest(t[r].content))continue;let i=t[r].children,a=0;for(let c=i.length-1;c>=0;c--){const l=i[c];if("link_close"!==l.type){if("html_inline"===l.type&&(o(l.content)&&a>0&&a--,s(l.content)&&a++),!(a>0)&&"text"===l.type&&e.md.linkify.test(l.content)){const o=l.content;let s=e.md.linkify.match(o);const a=[];let u=l.level,d=0;s.length>0&&0===s[0].index&&c>0&&"text_special"===i[c-1].type&&(s=s.slice(1));for(let t=0;t<s.length;t++){const r=s[t].url,n=e.md.normalizeLink(r);if(!e.md.validateLink(n))continue;let i=s[t].text;i=s[t].schema?"mailto:"!==s[t].schema||/^mailto:/i.test(i)?e.md.normalizeLinkText(i):e.md.normalizeLinkText("mailto:"+i).replace(/^mailto:/,""):e.md.normalizeLinkText("http://"+i).replace(/^http:\/\//,"");const c=s[t].index;if(c>d){const t=new e.Token("text","",0);t.content=o.slice(d,c),t.level=u,a.push(t)}const l=new e.Token("link_open","a",1);l.attrs=[["href",n]],l.level=u++,l.markup="linkify",l.info="auto",a.push(l);const p=new e.Token("text","",0);p.content=i,p.level=u,a.push(p);const h=new e.Token("link_close","a",-1);h.level=--u,h.markup="linkify",h.info="auto",a.push(h),d=s[t].lastIndex}if(d<o.length){const t=new e.Token("text","",0);t.content=o.slice(d),t.level=u,a.push(t)}t[r].children=i=(0,n.arrayReplaceAt)(i,c,a)}}else for(c--;i[c].level!==l.level&&"link_open"!==i[c].type;)c--}}}},2699(e,t,r){"use strict";r.d(t,{A:()=>s});const n=/\r\n?|\n/g,o=/\0/g;function s(e){let t;t=e.src.replace(n,"\n"),t=t.replace(o,"�"),e.src=t}},48541(e,t,r){"use strict";r.d(t,{A:()=>u});const n=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,o=/\((c|tm|r)\)/i,s=/\((c|tm|r)\)/gi,i={c:"©",r:"®",tm:"™"};function a(e,t){return i[t.toLowerCase()]}function c(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];"text"!==n.type||t||(n.content=n.content.replace(s,a)),"link_open"===n.type&&"auto"===n.info&&t--,"link_close"===n.type&&"auto"===n.info&&t++}}function l(e){let t=0;for(let r=e.length-1;r>=0;r--){const o=e[r];"text"!==o.type||t||n.test(o.content)&&(o.content=o.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===o.type&&"auto"===o.info&&t--,"link_close"===o.type&&"auto"===o.info&&t++}}function u(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&(o.test(e.tokens[t].content)&&c(e.tokens[t].children),n.test(e.tokens[t].content)&&l(e.tokens[t].children))}},55834(e,t,r){"use strict";r.d(t,{A:()=>c});var n=r(54439);const o=/['"]/,s=/['"]/g;function i(e,t,r,n){e[t]||(e[t]=[]),e[t].push({pos:r,ch:n})}function a(e,t){let r;const o=[],a={};for(let c=0;c<e.length;c++){const l=e[c],u=e[c].level;for(r=o.length-1;r>=0&&!(o[r].level<=u);r--);if(o.length=r+1,"text"!==l.type)continue;const d=l.content;let p=0;const h=d.length;e:for(;p<h;){s.lastIndex=p;const l=s.exec(d);if(!l)break;let m=!0,g=!0;p=l.index+1;const f="'"===l[0];let b=32;if(l.index-1>=0)b=d.charCodeAt(l.index-1);else for(r=c-1;r>=0&&("softbreak"!==e[r].type&&"hardbreak"!==e[r].type);r--)if(e[r].content){b=e[r].content.charCodeAt(e[r].content.length-1);break}let v=32;if(p<h)v=d.charCodeAt(p);else for(r=c+1;r<e.length&&("softbreak"!==e[r].type&&"hardbreak"!==e[r].type);r++)if(e[r].content){v=e[r].content.charCodeAt(0);break}const y=(0,n.isMdAsciiPunct)(b)||(0,n.isPunctCharCode)(b),k=(0,n.isMdAsciiPunct)(v)||(0,n.isPunctCharCode)(v),w=(0,n.isWhiteSpace)(b),_=(0,n.isWhiteSpace)(v);if(_?m=!1:k&&(w||y||(m=!1)),w?g=!1:y&&(_||k||(g=!1)),34===v&&'"'===l[0]&&b>=48&&b<=57&&(g=m=!1),m&&g&&(m=y,g=k),m||g){if(g)for(r=o.length-1;r>=0;r--){let e=o[r];if(o[r].level<u)break;if(e.single===f&&o[r].level===u){let n,s;e=o[r],f?(n=t.md.options.quotes[2],s=t.md.options.quotes[3]):(n=t.md.options.quotes[0],s=t.md.options.quotes[1]),i(a,c,l.index,s),i(a,e.token,e.pos,n),o.length=r;continue e}}m?o.push({token:c,pos:l.index,single:f,level:u}):g&&f&&i(a,c,l.index,"’")}else f&&i(a,c,l.index,"’")}}Object.keys(a).forEach(function(t){e[t].content=function(e,t){let r="",n=0;t.sort((e,t)=>e.pos-t.pos);for(let o=0;o<t.length;o++){const s=t[o];r+=e.slice(n,s.pos)+s.ch,n=s.pos+1}return r+e.slice(n)}(e[t].content,a[t])})}function c(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&o.test(e.tokens[t].content)&&a(e.tokens[t].children,e)}},37569(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(57997);function o(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}o.prototype.Token=n.A;const s=o},11242(e,t,r){"use strict";function n(e){let t,r;const n=e.tokens,o=n.length;for(let e=0;e<o;e++){if("inline"!==n[e].type)continue;const o=n[e].children,s=o.length;for(t=0;t<s;t++)"text_special"===o[t].type&&(o[t].type="text");for(t=r=0;t<s;t++)"text"===o[t].type&&t+1<s&&"text"===o[t+1].type?o[t+1].content=o[t].content+o[t+1].content:(t!==r&&(o[r]=o[t]),r++);t!==r&&(o.length=r)}}r.d(t,{A:()=>n})},85469(e,t,r){"use strict";r.d(t,{A:()=>s});const n=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,o=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function s(e,t){let r=e.pos;if(60!==e.src.charCodeAt(r))return!1;const s=e.pos,i=e.posMax;for(;;){if(++r>=i)return!1;const t=e.src.charCodeAt(r);if(60===t)return!1;if(62===t)break}const a=e.src.slice(s+1,r);if(o.test(a)){const r=e.md.normalizeLink(a);if(!e.md.validateLink(r))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",r]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(a);const n=e.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return e.pos+=a.length+2,!0}if(n.test(a)){const r=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(r))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",r]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(a);const n=e.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return e.pos+=a.length+2,!0}return!1}},38797(e,t,r){"use strict";function n(e,t){let r=e.pos;if(96!==e.src.charCodeAt(r))return!1;const n=r;r++;const o=e.posMax;for(;r<o&&96===e.src.charCodeAt(r);)r++;const s=e.src.slice(n,r),i=s.length;if(e.backticksScanned&&(e.backticks[i]||0)<=n)return t||(e.pending+=s),e.pos+=i,!0;let a,c=r;for(;-1!==(a=e.src.indexOf("`",c));){for(c=a+1;c<o&&96===e.src.charCodeAt(c);)c++;const n=c-a;if(n===i){if(!t){const t=e.push("code_inline","code",0);t.markup=s,t.content=e.src.slice(r,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=c,!0}e.backticks[n]=a}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=i,!0}r.d(t,{A:()=>n})},76014(e,t,r){"use strict";function n(e){const t={},r=e.length;if(!r)return;let n=0,o=-2;const s=[];for(let i=0;i<r;i++){const r=e[i];if(s.push(0),e[n].marker===r.marker&&o===r.token-1||(n=i),o=r.token,r.length=r.length||0,!r.close)continue;t.hasOwnProperty(r.marker)||(t[r.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[r.marker][(r.open?3:0)+r.length%3];let c=n-s[n]-1,l=c;for(;c>a;c-=s[c]+1){const t=e[c];if(t.marker===r.marker&&(t.open&&t.end<0)){let n=!1;if((t.close||r.open)&&(t.length+r.length)%3==0&&(t.length%3==0&&r.length%3==0||(n=!0)),!n){const n=c>0&&!e[c-1].open?s[c-1]+1:0;s[i]=i-c+n,s[c]=n,r.open=!1,t.end=i,t.close=!1,l=-1,o=-2;break}}}-1!==l&&(t[r.marker][(r.open?3:0)+(r.length||0)%3]=l)}}function o(e){const t=e.tokens_meta,r=e.tokens_meta.length;n(e.delimiters);for(let e=0;e<r;e++)t[e]&&t[e].delimiters&&n(t[e].delimiters)}r.d(t,{A:()=>o})},62206(e,t,r){"use strict";function n(e,t){for(let r=t.length-1;r>=0;r--){const n=t[r];if(95!==n.marker&&42!==n.marker)continue;if(-1===n.end)continue;const o=t[n.end],s=r>0&&t[r-1].end===n.end+1&&t[r-1].marker===n.marker&&t[r-1].token===n.token-1&&t[n.end+1].token===o.token+1,i=String.fromCharCode(n.marker),a=e.tokens[n.token];a.type=s?"strong_open":"em_open",a.tag=s?"strong":"em",a.nesting=1,a.markup=s?i+i:i,a.content="";const c=e.tokens[o.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?i+i:i,c.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[n.end+1].token].content="",r--)}}r.d(t,{A:()=>o});const o={tokenize:function(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t)return!1;if(95!==n&&42!==n)return!1;const o=e.scanDelims(e.pos,42===n);for(let t=0;t<o.length;t++){e.push("text","",0).content=String.fromCharCode(n),e.delimiters.push({marker:n,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0},postProcess:function(e){const t=e.tokens_meta,r=e.tokens_meta.length;n(e,e.delimiters);for(let o=0;o<r;o++)t[o]&&t[o].delimiters&&n(e,t[o].delimiters)}}},41517(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(9405),o=r(54439);const s=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,i=/^&([a-z][a-z0-9]{1,31});/i;function a(e,t){const r=e.pos,a=e.posMax;if(38!==e.src.charCodeAt(r))return!1;if(r+1>=a)return!1;if(35===e.src.charCodeAt(r+1)){const n=e.src.slice(r).match(s);if(n){if(!t){const t="x"===n[1][0].toLowerCase()?parseInt(n[1].slice(1),16):parseInt(n[1],10),r=e.push("text_special","",0);r.content=(0,o.isValidEntityCode)(t)?(0,o.fromCodePoint)(t):(0,o.fromCodePoint)(65533),r.markup=n[0],r.info="entity"}return e.pos+=n[0].length,!0}}else{const o=e.src.slice(r).match(i);if(o){const r=(0,n.hl)(o[0]);if(r!==o[0]){if(!t){const t=e.push("text_special","",0);t.content=r,t.markup=o[0],t.info="entity"}return e.pos+=o[0].length,!0}}}return!1}},17785(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(54439);const o=[];for(let e=0;e<256;e++)o.push(0);function s(e,t){let r=e.pos;const s=e.posMax;if(92!==e.src.charCodeAt(r))return!1;if(r++,r>=s)return!1;let i=e.src.charCodeAt(r);if(10===i){for(t||e.push("hardbreak","br",0),r++;r<s&&(i=e.src.charCodeAt(r),(0,n.isSpace)(i));)r++;return e.pos=r,!0}let a=e.src[r];if(i>=55296&&i<=56319&&r+1<s){const t=e.src.charCodeAt(r+1);t>=56320&&t<=57343&&(a+=e.src[r+1],r++)}const c="\\"+a;if(!t){const t=e.push("text_special","",0);i<256&&0!==o[i]?t.content=a:t.content=c,t.markup=c,t.info="escape"}return e.pos=r+1,!0}"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){o[e.charCodeAt(0)]=1})},70322(e,t,r){"use strict";function n(e){let t,r,n=0;const o=e.tokens,s=e.tokens.length;for(t=r=0;t<s;t++)o[t].nesting<0&&n--,o[t].level=n,o[t].nesting>0&&n++,"text"===o[t].type&&t+1<s&&"text"===o[t+1].type?o[t+1].content=o[t].content+o[t+1].content:(t!==r&&(o[r]=o[t]),r++);t!==r&&(o.length=r)}r.d(t,{A:()=>n})},7105(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(58105);function o(e,t){if(!e.md.options.html)return!1;const r=e.posMax,o=e.pos;if(60!==e.src.charCodeAt(o)||o+2>=r)return!1;const s=e.src.charCodeAt(o+1);if(33!==s&&63!==s&&47!==s&&!function(e){const t=32|e;return t>=97&&t<=122}(s))return!1;const i=e.src.slice(o).match(n.l);if(!i)return!1;if(!t){const t=e.push("html_inline","",0);t.content=i[0],a=t.content,/^<a[>\s]/i.test(a)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(t.content)&&e.linkLevel--}var a;return e.pos+=i[0].length,!0}},74427(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t){let r,o,s,i,a,c,l,u,d="";const p=e.pos,h=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;const m=e.pos+2,g=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(g<0)return!1;if(i=g+1,i<h&&40===e.src.charCodeAt(i)){for(i++;i<h&&(r=e.src.charCodeAt(i),(0,n.isSpace)(r)||10===r);i++);if(i>=h)return!1;for(u=i,c=e.md.helpers.parseLinkDestination(e.src,i,e.posMax),c.ok&&(d=e.md.normalizeLink(c.str),e.md.validateLink(d)?i=c.pos:d=""),u=i;i<h&&(r=e.src.charCodeAt(i),(0,n.isSpace)(r)||10===r);i++);if(c=e.md.helpers.parseLinkTitle(e.src,i,e.posMax),i<h&&u!==i&&c.ok)for(l=c.str,i=c.pos;i<h&&(r=e.src.charCodeAt(i),(0,n.isSpace)(r)||10===r);i++);else l="";if(i>=h||41!==e.src.charCodeAt(i))return e.pos=p,!1;i++}else{if(void 0===e.env.references)return!1;if(i<h&&91===e.src.charCodeAt(i)?(u=i+1,i=e.md.helpers.parseLinkLabel(e,i),i>=0?s=e.src.slice(u,i++):i=g+1):i=g+1,s||(s=e.src.slice(m,g)),a=e.env.references[(0,n.normalizeReference)(s)],!a)return e.pos=p,!1;d=a.href,l=a.title}if(!t){o=e.src.slice(m,g);const t=[];e.md.inline.parse(o,e.md,e.env,t);const r=e.push("image","img",0),n=[["src",d],["alt",""]];r.attrs=n,r.children=t,r.content=o,l&&n.push(["title",l])}return e.pos=i,e.posMax=h,!0}},22128(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t){let r,o,s,i,a="",c="",l=e.pos,u=!0;if(91!==e.src.charCodeAt(e.pos))return!1;const d=e.pos,p=e.posMax,h=e.pos+1,m=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(m<0)return!1;let g=m+1;if(g<p&&40===e.src.charCodeAt(g)){for(u=!1,g++;g<p&&(r=e.src.charCodeAt(g),(0,n.isSpace)(r)||10===r);g++);if(g>=p)return!1;if(l=g,s=e.md.helpers.parseLinkDestination(e.src,g,e.posMax),s.ok){for(a=e.md.normalizeLink(s.str),e.md.validateLink(a)?g=s.pos:a="",l=g;g<p&&(r=e.src.charCodeAt(g),(0,n.isSpace)(r)||10===r);g++);if(s=e.md.helpers.parseLinkTitle(e.src,g,e.posMax),g<p&&l!==g&&s.ok)for(c=s.str,g=s.pos;g<p&&(r=e.src.charCodeAt(g),(0,n.isSpace)(r)||10===r);g++);}(g>=p||41!==e.src.charCodeAt(g))&&(u=!0),g++}if(u){if(void 0===e.env.references)return!1;if(g<p&&91===e.src.charCodeAt(g)?(l=g+1,g=e.md.helpers.parseLinkLabel(e,g),g>=0?o=e.src.slice(l,g++):g=m+1):g=m+1,o||(o=e.src.slice(h,m)),i=e.env.references[(0,n.normalizeReference)(o)],!i)return e.pos=d,!1;a=i.href,c=i.title}if(!t){e.pos=h,e.posMax=m;const t=[["href",a]];e.push("link_open","a",1).attrs=t,c&&t.push(["title",c]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=g,e.posMax=p,!0}},44938(e,t,r){"use strict";r.d(t,{A:()=>o});const n=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function o(e,t){if(!e.md.options.linkify)return!1;if(e.linkLevel>0)return!1;const r=e.pos;if(r+3>e.posMax)return!1;if(58!==e.src.charCodeAt(r))return!1;if(47!==e.src.charCodeAt(r+1))return!1;if(47!==e.src.charCodeAt(r+2))return!1;const o=e.pending.match(n);if(!o)return!1;const s=o[1],i=e.md.linkify.matchAtStart(e.src.slice(r-s.length));if(!i)return!1;let a=i.url;if(a.length<=s.length)return!1;let c=a.length;for(;c>0&&42===a.charCodeAt(c-1);)c--;c!==a.length&&(a=a.slice(0,c));const l=e.md.normalizeLink(a);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const t=e.push("link_open","a",1);t.attrs=[["href",l]],t.markup="linkify",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(a);const r=e.push("link_close","a",-1);r.markup="linkify",r.info="auto"}return e.pos+=a.length-s.length,!0}},94076(e,t,r){"use strict";r.d(t,{A:()=>o});var n=r(54439);function o(e,t){let r=e.pos;if(10!==e.src.charCodeAt(r))return!1;const o=e.pending.length-1,s=e.posMax;if(!t)if(o>=0&&32===e.pending.charCodeAt(o))if(o>=1&&32===e.pending.charCodeAt(o-1)){let t=o-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(r++;r<s&&(0,n.isSpace)(e.src.charCodeAt(r));)r++;return e.pos=r,!0}},60057(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(57997),o=r(54439);function s(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}s.prototype.pushPending=function(){const e=new n.A("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},s.prototype.push=function(e,t,r){this.pending&&this.pushPending();const o=new n.A(e,t,r);let s=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),o.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],s={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(o),this.tokens_meta.push(s),o},s.prototype.scanDelims=function(e,t){const r=this.posMax,n=this.src.charCodeAt(e);let s;if(0===e)s=32;else if(1===e)s=this.src.charCodeAt(0),55296==(63488&s)&&(s=65533);else if(s=this.src.charCodeAt(e-1),56320==(64512&s)){const t=this.src.charCodeAt(e-2);s=55296==(64512&t)?65536+(t-55296<<10)+(s-56320):65533}else 55296==(64512&s)&&(s=65533);let i=e;for(;i<r&&this.src.charCodeAt(i)===n;)i++;const a=i-e;let c=i<r?this.src.charCodeAt(i):32;if(55296==(64512&c)){const e=this.src.charCodeAt(i+1);c=56320==(64512&e)?65536+(c-55296<<10)+(e-56320):65533}else 56320==(64512&c)&&(c=65533);const l=(0,o.isMdAsciiPunct)(s)||(0,o.isPunctCharCode)(s),u=(0,o.isMdAsciiPunct)(c)||(0,o.isPunctCharCode)(c),d=(0,o.isWhiteSpace)(s),p=(0,o.isWhiteSpace)(c),h=!p&&(!u||d||l),m=!d&&(!l||p||u);return{can_open:h&&(t||!m||l),can_close:m&&(t||!h||u),length:a}},s.prototype.Token=n.A;const i=s},50925(e,t,r){"use strict";function n(e,t){let r;const n=[],o=t.length;for(let s=0;s<o;s++){const o=t[s];if(126!==o.marker)continue;if(-1===o.end)continue;const i=t[o.end];r=e.tokens[o.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[i.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="","text"===e.tokens[i.token-1].type&&"~"===e.tokens[i.token-1].content&&n.push(i.token-1)}for(;n.length;){const t=n.pop();let o=t+1;for(;o<e.tokens.length&&"s_close"===e.tokens[o].type;)o++;o--,t!==o&&(r=e.tokens[o],e.tokens[o]=e.tokens[t],e.tokens[t]=r)}}r.d(t,{A:()=>o});const o={tokenize:function(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t)return!1;if(126!==n)return!1;const o=e.scanDelims(e.pos,!0);let s=o.length;const i=String.fromCharCode(n);if(s<2)return!1;let a;s%2&&(a=e.push("text","",0),a.content=i,s--);for(let t=0;t<s;t+=2)a=e.push("text","",0),a.content=i+i,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0},postProcess:function(e){const t=e.tokens_meta,r=e.tokens_meta.length;n(e,e.delimiters);for(let o=0;o<r;o++)t[o]&&t[o].delimiters&&n(e,t[o].delimiters)}}},68597(e,t,r){"use strict";function n(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function o(e,t){let r=e.pos;for(;r<e.posMax&&!n(e.src.charCodeAt(r));)r++;return r!==e.pos&&(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}r.d(t,{A:()=>o})},57997(e,t,r){"use strict";function n(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}r.d(t,{A:()=>o}),n.prototype.attrIndex=function(e){if(!this.attrs)return-1;const t=this.attrs;for(let r=0,n=t.length;r<n;r++)if(t[r][0]===e)return r;return-1},n.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]},n.prototype.attrSet=function(e,t){const r=this.attrIndex(e),n=[e,t];r<0?this.attrPush(n):this.attrs[r]=n},n.prototype.attrGet=function(e){const t=this.attrIndex(e);let r=null;return t>=0&&(r=this.attrs[t][1]),r},n.prototype.attrJoin=function(e,t){const r=this.attrIndex(e);r<0?this.attrPush([e,t]):this.attrs[r][1]=this.attrs[r][1]+" "+t};const o=n},25315(e,t,r){"use strict";r.r(t),r.d(t,{decode:()=>n.A,encode:()=>o.A,format:()=>s.A,parse:()=>i.A});var n=r(51227),o=r(10963),s=r(5840),i=r(26786)},51227(e,t,r){"use strict";r.d(t,{A:()=>s});const n={};function o(e,t){"string"!=typeof t&&(t=o.defaultChars);const r=function(e){let t=n[e];if(t)return t;t=n[e]=[];for(let e=0;e<128;e++){const r=String.fromCharCode(e);t.push(r)}for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);t[n]="%"+("0"+n.toString(16).toUpperCase()).slice(-2)}return t}(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(e){let t="";for(let n=0,o=e.length;n<o;n+=3){const s=parseInt(e.slice(n+1,n+3),16);if(s<128)t+=r[s];else{if(192==(224&s)&&n+3<o){const r=parseInt(e.slice(n+4,n+6),16);if(128==(192&r)){const e=s<<6&1984|63&r;t+=e<128?"��":String.fromCharCode(e),n+=3;continue}}if(224==(240&s)&&n+6<o){const r=parseInt(e.slice(n+4,n+6),16),o=parseInt(e.slice(n+7,n+9),16);if(128==(192&r)&&128==(192&o)){const e=s<<12&61440|r<<6&4032|63&o;t+=e<2048||e>=55296&&e<=57343?"���":String.fromCharCode(e),n+=6;continue}}if(240==(248&s)&&n+9<o){const r=parseInt(e.slice(n+4,n+6),16),o=parseInt(e.slice(n+7,n+9),16),i=parseInt(e.slice(n+10,n+12),16);if(128==(192&r)&&128==(192&o)&&128==(192&i)){let e=s<<18&1835008|r<<12&258048|o<<6&4032|63&i;e<65536||e>1114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),n+=9;continue}}t+="�"}}return t})}o.defaultChars=";/?:@&=+$,#",o.componentChars="";const s=o},10963(e,t,r){"use strict";r.d(t,{A:()=>s});const n={};function o(e,t,r){"string"!=typeof t&&(r=t,t=o.defaultChars),void 0===r&&(r=!0);const s=function(e){let t=n[e];if(t)return t;t=n[e]=[];for(let e=0;e<128;e++){const r=String.fromCharCode(e);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}(t);let i="";for(let t=0,n=e.length;t<n;t++){const o=e.charCodeAt(t);if(r&&37===o&&t+2<n&&/^[0-9a-f]{2}$/i.test(e.slice(t+1,t+3)))i+=e.slice(t,t+3),t+=2;else if(o<128)i+=s[o];else if(o>=55296&&o<=57343){if(o>=55296&&o<=56319&&t+1<n){const r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){i+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}i+="%EF%BF%BD"}else i+=encodeURIComponent(e[t])}return i}o.defaultChars=";/?:@&=+$,-_.!~*'()#",o.componentChars="-_.!~*'()";const s=o},5840(e,t,r){"use strict";function n(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}r.d(t,{A:()=>n})},26786(e,t,r){"use strict";function n(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}r.d(t,{A:()=>g});const o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,a=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(a),l=["%","/","?",";","#"].concat(c),u=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};n.prototype.parse=function(e,t){let r,n,s,a=e;if(a=a.trim(),!t&&1===e.split("#").length){const e=i.exec(a);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let c=o.exec(a);if(c&&(c=c[0],r=c.toLowerCase(),this.protocol=c,a=a.substr(c.length)),(t||c||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(s="//"===a.substr(0,2),!s||c&&h[c]||(a=a.substr(2),this.slashes=!0)),!h[c]&&(s||c&&!m[c])){let e,t,r=-1;for(let e=0;e<u.length;e++)n=a.indexOf(u[e]),-1!==n&&(-1===r||n<r)&&(r=n);t=-1===r?a.lastIndexOf("@"):a.lastIndexOf("@",r),-1!==t&&(e=a.slice(0,t),a=a.slice(t+1),this.auth=e),r=-1;for(let e=0;e<l.length;e++)n=a.indexOf(l[e]),-1!==n&&(-1===r||n<r)&&(r=n);-1===r&&(r=a.length),":"===a[r-1]&&r--;const o=a.slice(0,r);a=a.slice(r),this.parseHost(o),this.hostname=this.hostname||"";const s="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!s){const e=this.hostname.split(/\./);for(let t=0,r=e.length;t<r;t++){const r=e[t];if(r&&!r.match(d)){let n="";for(let e=0,t=r.length;e<t;e++)r.charCodeAt(e)>127?n+="x":n+=r[e];if(!n.match(d)){const n=e.slice(0,t),o=e.slice(t+1),s=r.match(p);s&&(n.push(s[1]),o.unshift(s[2])),o.length&&(a=o.join(".")+a),this.hostname=n.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),s&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const g=a.indexOf("#");-1!==g&&(this.hash=a.substr(g),a=a.slice(0,g));const f=a.indexOf("?");return-1!==f&&(this.search=a.substr(f),a=a.slice(0,f)),a&&(this.pathname=a),m[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this},n.prototype.parseHost=function(e){let t=s.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const g=function(e,t){if(e&&e instanceof n)return e;const r=new n;return r.parse(e,t),r}},51526(e,t,r){"use strict";r.d(t,{$:()=>b});var n=r(48816),o=r(13022),s=r(20195),i=r(86087),a=r(27723),c=r(10790),l="data-wp-hash";function u(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=u();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[r,n]of t.styles)d(e,r,n)}(document)),e.__wpStyleRuntime}function d(e,t,r){if(!e.head)return;const n=u();let o=n.injectedStyles.get(e);if(o||(o=new Set,n.injectedStyles.set(e,o)),o.has(t))return;if(function(e,t){if(!e.head)return!1;for(const r of e.head.querySelectorAll(`style[${l}]`))if(r.getAttribute(l)===t)return!0;return!1}(e,t))return void o.add(t);const s=e.createElement("style");s.setAttribute(l,t),s.appendChild(e.createTextNode(r)),e.head.appendChild(s),o.add(t)}function p(e,t){const r=u();r.styles.set(e,t);for(const n of r.documents.keys())d(n,e,t)}p("effc4e3032",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var h={button:"_97b0fc33c028be1a__button","is-unstyled":"abbb272e2ce49bd6__is-unstyled","is-loading":"_914b42f315c0e580__is-loading","is-small":"_908205475f9f2a92__is-small",icon:"_9f6fc6553aeb36fe__icon","is-brand":"dd460c965226cc77__is-brand","is-outline":"_62d5a778b7b258ee__is-outline","is-minimal":"ad0619a3217c6a5b__is-minimal","is-neutral":"e722a8f96726aa99__is-neutral","is-solid":"b50b3358c5fb4d0b__is-solid","is-compact":"cf59cf1b69629838__is-compact","loading-animation":"_5a1d53da6f830c8d__loading-animation"};p("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var m="_336cd3e4e743482f__box-sizing";p("08122b3d53","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var g="abc777e9713fa711__outset-ring--focus-except-active";p("e8e31009f5","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");var f="_6defc79820e382c6__button",b=(0,i.forwardRef)(function({tone:e="brand",variant:t="solid",size:r="default",className:l,focusableWhenDisabled:u=!0,disabled:d,loading:p,loadingAnnouncement:b=(0,a.__)("Loading","jetpack"),children:v,...y},k){const w=(0,o.A)(f,m,g,"unstyled"!==t&&h.button,h[`is-${e}`],h[`is-${t}`],h[`is-${r}`],p&&h["is-loading"],l);return(0,i.useEffect)(()=>{p&&b&&(0,s.speak)(b)},[p,b]),(0,c.jsx)(n.$,{ref:k,className:w,focusableWhenDisabled:u,disabled:d??p,...y,children:v})})},26313(e,t,r){"use strict";r.d(t,{a:()=>d});var n=r(13022),o=r(86087),s=r(71100),i=r(10790),a="data-wp-hash";function c(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=c();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[r,n]of t.styles)l(e,r,n)}(document)),e.__wpStyleRuntime}function l(e,t,r){if(!e.head)return;const n=c();let o=n.injectedStyles.get(e);if(o||(o=new Set,n.injectedStyles.set(e,o)),o.has(t))return;if(function(e,t){if(!e.head)return!1;for(const r of e.head.querySelectorAll(`style[${a}]`))if(r.getAttribute(a)===t)return!0;return!1}(e,t))return void o.add(t);const s=e.createElement("style");s.setAttribute(a,t),s.appendChild(e.createTextNode(r)),e.head.appendChild(s),o.add(t)}(function(e,t){const r=c();r.styles.set(e,t);for(const n of r.documents.keys())l(n,e,t)})("effc4e3032",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:var(--wpds-typography-font-weight-emphasis,600);--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-strong-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 93%,#000));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand-strong,#fff);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-strong-active,#fff);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-strong-disabled,#8d8d8d);--wp-ui-button-padding-block:var(--wpds-dimension-padding-xs,4px);--wp-ui-button-padding-inline:var(--wpds-dimension-padding-md,12px);--wp-ui-button-height:var(--wpds-dimension-size-lg,40px);--wp-ui-button-aspect-ratio:auto;--wp-ui-button-font-size:var(--wpds-typography-font-size-md,13px);--wp-ui-button-min-width:calc(4ch + var(--wp-ui-button-padding-inline)*2);--wp-ui-button-icon-margin:calc((var(--wpds-dimension-size-2xs, 16px) - var(--wpds-dimension-size-sm, 24px))/2);--wp-ui-button-border-color:var(--wp-ui-button-background-color);--wp-ui-button-border-color-active:var(--wp-ui-button-background-color-active);--wp-ui-button-border-color-disabled:var(--wp-ui-button-background-color-disabled);--_gcd-button-font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);--_gcd-button-font-size:var(--wp-ui-button-font-size);--_gcd-button-font-weight:var(--wp-ui-button-font-weight);align-items:center;aspect-ratio:var(--wp-ui-button-aspect-ratio);background-clip:border-box;background-color:var(--wp-ui-button-background-color);border-color:var(--wp-ui-button-border-color);border-radius:var(--wpds-border-radius-sm,2px);border-style:solid;border-width:1px;color:var(--wp-ui-button-foreground-color);display:inline-flex;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wp-ui-button-font-size);font-weight:var(--wp-ui-button-font-weight);gap:var(--wpds-dimension-gap-sm,8px);justify-content:center;line-height:var(--wpds-typography-line-height-sm,20px);max-width:100%;min-height:var(--wp-ui-button-height);min-width:var(--wp-ui-button-min-width);overflow-wrap:anywhere;padding-block:var(--wp-ui-button-padding-block);padding-inline:var(--wp-ui-button-padding-inline);position:relative;text-align:center;text-decoration:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}@media not (prefers-reduced-motion){transition:color .1s ease-out;*{transition:opacity .1s ease-out}}&[href]{cursor:pointer}[href]{color:inherit;text-decoration:inherit}&:not([data-disabled]):is(:hover,:active,:focus){background-color:var(--wp-ui-button-background-color-active);border-color:var(--wp-ui-button-border-color-active);color:var(--wp-ui-button-foreground-color-active)}&[data-disabled]:not(._914b42f315c0e580__is-loading){background-color:var(--wp-ui-button-background-color-disabled);border-color:var(--wp-ui-button-border-color-disabled);color:var(--wp-ui-button-foreground-color-disabled);@media (forced-colors:active){border-bottom-color:GrayText;border-left-color:GrayText;border-right-color:GrayText;border-top-color:GrayText;color:GrayText}}&:before{aspect-ratio:1;border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid;border-block-end-color:transparent;border-block-start-color:var(--wp-ui-button-foreground-color);border-inline-end-color:var(--wp-ui-button-foreground-color);border-inline-start-color:transparent;border-radius:50%;box-sizing:border-box;content:"";display:block;height:var(--wp-ui-button-font-size);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transform:translate(-50%,-50%);@media not (prefers-reduced-motion){transition:opacity .1s ease-out}@media (forced-colors:active){border-block-end-style:none;border-bottom-color:ButtonText;border-inline-start-style:none;border-left-color:ButtonText;border-right-color:ButtonText;border-top-color:ButtonText}}}._908205475f9f2a92__is-small{--wp-ui-button-padding-block:0px;--wp-ui-button-padding-inline:var(--wpds-dimension-padding-sm,8px);--wp-ui-button-height:var(--wpds-dimension-size-sm,24px)}._9f6fc6553aeb36fe__icon{margin:var(--wp-ui-button-icon-margin)}.dd460c965226cc77__is-brand{&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-brand-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-brand,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 85%,#000));--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-brand-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal{--wp-ui-button-background-color:var(--wpds-color-background-interactive-brand-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-brand-weak-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 12%,#fff));--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-brand-weak-disabled,#0000)}}.e722a8f96726aa99__is-neutral{&.ad0619a3217c6a5b__is-minimal[aria-pressed=true],&.b50b3358c5fb4d0b__is-solid{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-strong,#2d2d2d);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-strong-active,#1e1e1e);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-strong-disabled,#e6e6e6);--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral-strong,#f0f0f0);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-strong-active,#f0f0f0);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-strong-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline,&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-foreground-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);--wp-ui-button-foreground-color-active:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);--wp-ui-button-foreground-color-disabled:var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d)}&._62d5a778b7b258ee__is-outline{--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000);--wp-ui-button-border-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d);--wp-ui-button-border-color-active:var(--wpds-color-stroke-interactive-neutral-active,#6e6e6e);--wp-ui-button-border-color-disabled:var(--wpds-color-stroke-interactive-neutral-disabled,#dbdbdb)}&.ad0619a3217c6a5b__is-minimal:not([aria-pressed=true]){--wp-ui-button-background-color:var(--wpds-color-background-interactive-neutral-weak,#0000);--wp-ui-button-background-color-active:var(--wpds-color-background-interactive-neutral-weak-active,#ededed);--wp-ui-button-background-color-disabled:var(--wpds-color-background-interactive-neutral-weak-disabled,#0000)}}.abbb272e2ce49bd6__is-unstyled{background:none;border:none;min-width:unset}.cf59cf1b69629838__is-compact{--wp-ui-button-height:var(--wpds-dimension-size-md,32px)}._914b42f315c0e580__is-loading:not(.abbb272e2ce49bd6__is-unstyled){color:transparent;&:not([data-disabled]):is(:hover,:active,:focus){color:transparent}@media (forced-colors:active){color:ButtonFace}*{opacity:0}&:before{opacity:1;transition-delay:.05s;@media not (prefers-reduced-motion){animation:_5a1d53da6f830c8d__loading-animation 1s linear infinite}}}}@keyframes _5a1d53da6f830c8d__loading-animation{0%{transform:translate(-50%,-50%) rotate(0deg)}to{transform:translate(-50%,-50%) rotate(1turn)}}}');var u="_9f6fc6553aeb36fe__icon",d=(0,o.forwardRef)(function({className:e,icon:t,...r},o){return(0,i.jsx)(s.I,{ref:o,icon:t,className:(0,n.A)(u,e),size:24,...r})})},72326(e,t,r){"use strict";r.d(t,{$:()=>s});var n=r(51526),o=r(26313);o.a.displayName="Button.Icon";var s=Object.assign(n.$,{Icon:o.a})},71100(e,t,r){"use strict";r.d(t,{I:()=>i});var n=r(86087),o=r(5573),s=r(10790),i=(0,n.forwardRef)(function({icon:e,size:t=24,style:r,...n},i){const a=e.props.style||r?{...e.props.style,...r}:void 0;return(0,s.jsx)(o.SVG,{ref:i,...e.props,...n,...a?{style:a}:{},width:t,height:t})})},57273(e,t,r){"use strict";r.d(t,{N:()=>b});var n=r(23280),o=r(67720),s=r(13022),i=r(86087),a=r(27723),c=r(10790),l="data-wp-hash";function u(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=u();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[r,n]of t.styles)d(e,r,n)}(document)),e.__wpStyleRuntime}function d(e,t,r){if(!e.head)return;const n=u();let o=n.injectedStyles.get(e);if(o||(o=new Set,n.injectedStyles.set(e,o)),o.has(t))return;if(function(e,t){if(!e.head)return!1;for(const r of e.head.querySelectorAll(`style[${l}]`))if(r.getAttribute(l)===t)return!0;return!1}(e,t))return void o.add(t);const s=e.createElement("style");s.setAttribute(l,t),s.appendChild(e.createTextNode(r)),e.head.appendChild(s),o.add(t)}function p(e,t){const r=u();r.styles.set(e,t);for(const n of r.documents.keys())d(n,e,t)}p("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var h="_336cd3e4e743482f__box-sizing";p("08122b3d53","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var m="abc777e9713fa711__outset-ring--focus-except-active";p("e8e6a9be37",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');var g={link:"d4250949359b05ce__link","is-brand":"c6055659b8e2cd2c__is-brand","is-neutral":"_92e0dfcaeee15b88__is-neutral","is-unstyled":"cf122a9bf1035d42__is-unstyled","link-icon":"_0cb411afac4c86c7__link-icon"};p("e8e31009f5","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");var f="_2c0831b0499dbd6e__a",b=(0,i.forwardRef)(function({children:e,variant:t="default",tone:r="brand",openInNewTab:i=!1,target:l,render:u,className:d,...p},b){const v=i||/^_blank$/i.test(l??"");return(0,n.C)({render:u,defaultTagName:"a",ref:b,props:(0,o.v6)(p,{className:(0,s.A)(f,h,m,"unstyled"!==t&&g.link,"unstyled"!==t&&g[`is-${r}`],"unstyled"===t&&g["is-unstyled"],d),target:l??(i?"_blank":void 0),children:(0,c.jsxs)(c.Fragment,{children:[e,v&&(0,c.jsx)("span",{className:g["link-icon"],role:"img","aria-label":/* translators: accessibility text appended to link text */ /* translators: accessibility text appended to link text */(0,a.__)("(opens in a new tab)","jetpack")})]})})})})},21220(e,t,r){"use strict";r.d(t,{B:()=>d});var n=r(23280),o=r(67720),s=r(86087),i="data-wp-hash";function a(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=a();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[r,n]of t.styles)c(e,r,n)}(document)),e.__wpStyleRuntime}function c(e,t,r){if(!e.head)return;const n=a();let o=n.injectedStyles.get(e);if(o||(o=new Set,n.injectedStyles.set(e,o)),o.has(t))return;if(function(e,t){if(!e.head)return!1;for(const r of e.head.querySelectorAll(`style[${i}]`))if(r.getAttribute(i)===t)return!0;return!1}(e,t))return void o.add(t);const s=e.createElement("style");s.setAttribute(i,t),s.appendChild(e.createTextNode(r)),e.head.appendChild(s),o.add(t)}(function(e,t){const r=a();r.styles.set(e,t);for(const n of r.documents.keys())c(n,e,t)})("32aba35fe1","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{._19ce0419607e1896__stack{display:flex}}}");var l="_19ce0419607e1896__stack",u={xs:"var(--wpds-dimension-gap-xs, 4px)",sm:"var(--wpds-dimension-gap-sm, 8px)",md:"var(--wpds-dimension-gap-md, 12px)",lg:"var(--wpds-dimension-gap-lg, 16px)",xl:"var(--wpds-dimension-gap-xl, 24px)","2xl":"var(--wpds-dimension-gap-2xl, 32px)","3xl":"var(--wpds-dimension-gap-3xl, 40px)"},d=(0,s.forwardRef)(function({direction:e,gap:t,align:r,justify:s,wrap:i,render:a,...c},d){const p={gap:t&&u[t],alignItems:r,justifyContent:s,flexDirection:e,flexWrap:i};return(0,n.C)({render:a,ref:d,props:(0,o.v6)(c,{style:p,className:l})})})},79654(e,t,r){"use strict";r.d(t,{N:()=>b});var n=r(899),o=r(45339),s=r(13022),i=r(86087),a=r(27723),c=r(10790),l="data-wp-hash";function u(){const e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},"undefined"!=typeof document&&function(e){const t=u();t.documents.set(e,(t.documents.get(e)??0)+1);for(const[r,n]of t.styles)d(e,r,n)}(document)),e.__wpStyleRuntime}function d(e,t,r){if(!e.head)return;const n=u();let o=n.injectedStyles.get(e);if(o||(o=new Set,n.injectedStyles.set(e,o)),o.has(t))return;if(function(e,t){if(!e.head)return!1;for(const r of e.head.querySelectorAll(`style[${l}]`))if(r.getAttribute(l)===t)return!0;return!1}(e,t))return void o.add(t);const s=e.createElement("style");s.setAttribute(l,t),s.appendChild(e.createTextNode(r)),e.head.appendChild(s),o.add(t)}function p(e,t){const r=u();r.styles.set(e,t);for(const n of r.documents.keys())d(n,e,t)}p("10f3806643","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}}");var h="_336cd3e4e743482f__box-sizing";p("08122b3d53","@layer wp-ui{@layer utilities, components, compositions, overrides;@layer utilities{.af79fb116edb0dd7__outset-ring--focus:focus,.dfcfdc28396e5d98__outset-ring--focus-visible:focus-visible,.e5cd9ee879f6403a__outset-ring--focus-within:focus-within,:focus-visible ._81935a08e952f267__outset-ring--focus-parent-visible{--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within,.abc777e9713fa711__outset-ring--focus-except-active:focus{outline:none}._3c9f5ee9fc9c136d__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.abc777e9713fa711__outset-ring--focus-except-active:focus:not(:active){--_gcd-a-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));--_gcd-div-outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--focus-color,var(--wpds-color-stroke-focus,var(--wp-admin-theme-color,#3858e9)));outline-offset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}}");var m="abc777e9713fa711__outset-ring--focus-except-active";p("e8e6a9be37",'@layer wp-ui{@layer utilities, components, compositions, overrides;@layer components{.d4250949359b05ce__link{text-decoration-thickness:from-font;text-underline-offset:.2em}.c6055659b8e2cd2c__is-brand,.c6055659b8e2cd2c__is-brand:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9));color:var(--wpds-color-foreground-interactive-brand,var(--wp-admin-theme-color,#3858e9))}.c6055659b8e2cd2c__is-brand:active,.c6055659b8e2cd2c__is-brand:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000));color:var(--wpds-color-foreground-interactive-brand-active,color-mix(in oklch,var(--wp-admin-theme-color,#3858e9) 52%,#000))}._92e0dfcaeee15b88__is-neutral,._92e0dfcaeee15b88__is-neutral:visited{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral,#1e1e1e);text-decoration-color:var(--wpds-color-stroke-interactive-neutral,#8d8d8d)}._92e0dfcaeee15b88__is-neutral:active,._92e0dfcaeee15b88__is-neutral:hover{--_gcd-a-color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e);color:var(--wpds-color-foreground-interactive-neutral-active,#1e1e1e)}.cf122a9bf1035d42__is-unstyled{--_gcd-a-color:inherit;color:inherit;text-decoration:none}._0cb411afac4c86c7__link-icon{display:inline-block;font-weight:var(--wpds-typography-font-weight-default,400);line-height:1;margin-inline-start:var(--wpds-dimension-padding-xs,4px);text-decoration:none}._0cb411afac4c86c7__link-icon:after{content:"\\2197"}._0cb411afac4c86c7__link-icon:dir(rtl):after{content:"\\2196"}}}');var g={link:"d4250949359b05ce__link","is-brand":"c6055659b8e2cd2c__is-brand","is-neutral":"_92e0dfcaeee15b88__is-neutral","is-unstyled":"cf122a9bf1035d42__is-unstyled","link-icon":"_0cb411afac4c86c7__link-icon"};p("e8e31009f5","._6defc79820e382c6__button{box-sizing:var(--_gcd-button-box-sizing,border-box);font-family:var(--_gcd-button-font-family,inherit);font-size:var(--_gcd-button-font-size,inherit);font-weight:var(--_gcd-button-font-weight,inherit)}.d2cff2e5dea83bd1__input{box-sizing:var(--_gcd-input-box-sizing,border-box);font-family:var(--_gcd-input-font-family,inherit);font-size:var(--_gcd-input-font-size,inherit);font-weight:var(--_gcd-input-font-weight,inherit);margin:var(--_gcd-input-margin,0);&::placeholder{color:var(--_gcd-input-placeholder-color,var(--wpds-color-foreground-interactive-neutral-weak,#707070))}&:is(textarea,[type=text],[type=password],[type=color],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){background-color:var(--_gcd-input-background-color,transparent);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 transparent);color:var(--_gcd-input-color,var(--wpds-color-foreground-interactive-neutral,#1e1e1e));&:focus{border-color:var(--_gcd-input-border-color-focus,var(--wp-admin-theme-color));box-shadow:var(--_gcd-input-box-shadow-focus,none);outline:var(--_gcd-input-outline-focus,none)}&:disabled{background:var(--_gcd-input-background-disabled,transparent);border-color:var(--_gcd-input-border-color-disabled,transparent);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-foreground-interactive-neutral-disabled,#8d8d8d))}}&:is(textarea,[type=text],[type=password],[type=date],[type=datetime],[type=datetime-local],[type=email],[type=month],[type=number],[type=search],[type=tel],[type=time],[type=url],[type=week]){line-height:var(--_gcd-input-line-height,inherit);min-height:var(--_gcd-input-min-height,auto);padding:var(--_gcd-input-padding,0)}}._547d86373d02e108__textarea{box-sizing:var(--_gcd-textarea-box-sizing,border-box);overflow:var(--_gcd-textarea-overflow,auto);resize:var(--_gcd-textarea-resize,block)}._8c15fd0ed9f28ba4__div{outline:var(--_gcd-div-outline,0 solid transparent)}p._43cec3e1eec1066d__p{font-size:var(--_gcd-p-font-size,13px);line-height:var(--_gcd-p-line-height,1.5);margin:var(--_gcd-p-margin,0)}:is(h1,h2,h3,h4,h5,h6).e97669c6d9a38497__heading{color:var(--_gcd-heading-color,var(--wpds-color-foreground-content-neutral,#1e1e1e));font-size:var(--_gcd-heading-font-size,inherit);font-weight:var(--_gcd-heading-font-weight,var(--wpds-typography-font-weight-emphasis,600));margin:var(--_gcd-heading-margin,0)}._2c0831b0499dbd6e__a,._2c0831b0499dbd6e__a:is(:hover,:focus,:active){border-radius:var(--_gcd-a-border-radius,0);box-shadow:var(--_gcd-a-box-shadow,none);color:var(--_gcd-a-color,inherit);outline:var(--_gcd-a-outline,0 solid transparent);transition:var(--_gcd-a-transition,none)}.c59a0ebebd71fa4a__ol{list-style:var(--_gcd-ol-list-style,none);margin:var(--_gcd-ol-margin,0);padding-block:var(--_gcd-ol-padding-block,0);padding-inline:var(--_gcd-ol-padding-inline,0)}._46b5cb0c8e24e8c9__li{margin:var(--_gcd-li-margin,0)}");var f="_2c0831b0499dbd6e__a",b=(0,i.forwardRef)(function({children:e,variant:t="default",tone:r="brand",openInNewTab:i=!1,target:l,render:u,className:d,...p},b){const v=i||/^_blank$/i.test(l??"");return(0,n.C)({render:u,defaultTagName:"a",ref:b,props:(0,o.v6)(p,{className:(0,s.A)(f,h,m,"unstyled"!==t&&g.link,"unstyled"!==t&&g[`is-${r}`],"unstyled"===t&&g["is-unstyled"],d),target:l??(i?"_blank":void 0),children:(0,c.jsxs)(c.Fragment,{children:[e,v&&(0,c.jsx)("span",{className:g["link-icon"],role:"img","aria-label":/* translators: accessibility text appended to link text */ /* translators: accessibility text appended to link text */(0,a.__)("(opens in a new tab)","jetpack")})]})})})})},80786(e,t,r){"use strict";r.d(t,{A:()=>n});const n=/[\0-\x1F\x7F-\x9F]/},14935(e,t,r){"use strict";r.d(t,{A:()=>n});const n=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/},60804(e,t,r){"use strict";r.d(t,{A:()=>n});const n=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},47795(e,t,r){"use strict";r.d(t,{A:()=>n});const n=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/},3506(e,t,r){"use strict";r.d(t,{A:()=>n});const n=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},68407(e,t,r){"use strict";r.r(t),r.d(t,{Any:()=>n.A,Cc:()=>o.A,Cf:()=>s.A,P:()=>i.A,S:()=>a.A,Z:()=>c.A});var n=r(60905),o=r(80786),s=r(14935),i=r(60804),a=r(47795),c=r(3506)},60905(e,t,r){"use strict";r.d(t,{A:()=>n});const n=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},38377(e){"use strict";e.exports=JSON.parse('{"T":{"White":"#fff","Black":"#000","Gray 0":"#f6f7f7","Gray 5":"#dcdcde","Gray 10":"#c3c4c7","Gray 20":"#a7aaad","Gray 30":"#8c8f94","Gray 40":"#787c82","Gray 50":"#646970","Gray 60":"#50575e","Gray 70":"#3c434a","Gray 80":"#2c3338","Gray 90":"#1d2327","Gray 100":"#101517","Gray":"#646970","Blue 0":"#fbfcfe","Blue 5":"#f7f8fe","Blue 10":"#d6ddf9","Blue 20":"#adbaf3","Blue 30":"#7b90ff","Blue 40":"#546ff3","Blue 50":"#3858e9","Blue 60":"#2a46ce","Blue 70":"#1d35b4","Blue 80":"#1f3286","Blue 90":"#14215a","Blue 100":"#0a112d","Blue":"#3858e9","WordPress Blue 0":"#fbfcfe","WordPress Blue 5":"#f7f8fe","WordPress Blue 10":"#d6ddf9","WordPress Blue 20":"#adbaf3","WordPress Blue 30":"#7b90ff","WordPress Blue 40":"#546ff3","WordPress Blue 50":"#3858e9","WordPress Blue 60":"#2a46ce","WordPress Blue 70":"#1d35b4","WordPress Blue 80":"#1f3286","WordPress Blue 90":"#14215a","WordPress Blue 100":"#0a112d","WordPress Blue":"#3858e9","Purple 0":"#f2e9ed","Purple 5":"#ebcee0","Purple 10":"#e3afd5","Purple 20":"#d48fc8","Purple 30":"#c475bd","Purple 40":"#b35eb1","Purple 50":"#984a9c","Purple 60":"#7c3982","Purple 70":"#662c6e","Purple 80":"#4d2054","Purple 90":"#35163b","Purple 100":"#1e0c21","Purple":"#984a9c","Pink 0":"#f5e9ed","Pink 5":"#f2ceda","Pink 10":"#f7a8c3","Pink 20":"#f283aa","Pink 30":"#eb6594","Pink 40":"#e34c84","Pink 50":"#c9356e","Pink 60":"#ab235a","Pink 70":"#8c1749","Pink 80":"#700f3b","Pink 90":"#4f092a","Pink 100":"#260415","Pink":"#c9356e","Red 0":"#f7ebec","Red 5":"#facfd2","Red 10":"#ffabaf","Red 20":"#ff8085","Red 30":"#f86368","Red 40":"#e65054","Red 50":"#d63638","Red 60":"#b32d2e","Red 70":"#8a2424","Red 80":"#691c1c","Red 90":"#451313","Red 100":"#240a0a","Red":"#d63638","Orange 0":"#f5ece6","Orange 5":"#f7dcc6","Orange 10":"#ffbf86","Orange 20":"#faa754","Orange 30":"#e68b28","Orange 40":"#d67709","Orange 50":"#b26200","Orange 60":"#8a4d00","Orange 70":"#704000","Orange 80":"#543100","Orange 90":"#361f00","Orange 100":"#1f1200","Orange":"#b26200","Yellow 0":"#f5f1e1","Yellow 5":"#f5e6b3","Yellow 10":"#f2d76b","Yellow 20":"#f0c930","Yellow 30":"#deb100","Yellow 40":"#c08c00","Yellow 50":"#9d6e00","Yellow 60":"#7d5600","Yellow 70":"#674600","Yellow 80":"#4f3500","Yellow 90":"#320","Yellow 100":"#1c1300","Yellow":"#9d6e00","Green 0":"#e6f2e8","Green 5":"#b8e6bf","Green 10":"#68de86","Green 20":"#1ed15a","Green 30":"#00ba37","Green 40":"#00a32a","Green 50":"#008a20","Green 60":"#007017","Green 70":"#005c12","Green 80":"#00450c","Green 90":"#003008","Green 100":"#001c05","Green":"#008a20","Celadon 0":"#e4f2ed","Celadon 5":"#a7e8d3","Celadon 10":"#66deb9","Celadon 20":"#31cc9f","Celadon 30":"#09b585","Celadon 40":"#009e73","Celadon 50":"#008763","Celadon 60":"#007053","Celadon 70":"#005c44","Celadon 80":"#004533","Celadon 90":"#003024","Celadon 100":"#001c15","Celadon":"#008763","Automattic Blue 0":"#ebf4fa","Automattic Blue 5":"#c4e2f5","Automattic Blue 10":"#88ccf2","Automattic Blue 20":"#5ab7e8","Automattic Blue 30":"#24a3e0","Automattic Blue 40":"#1490c7","Automattic Blue 50":"#0277a8","Automattic Blue 60":"#036085","Automattic Blue 70":"#02506e","Automattic Blue 80":"#02384d","Automattic Blue 90":"#022836","Automattic Blue 100":"#021b24","Automattic Blue":"#24a3e0","Simplenote Blue 0":"#e9ecf5","Simplenote Blue 5":"#ced9f2","Simplenote Blue 10":"#abc1f5","Simplenote Blue 20":"#84a4f0","Simplenote Blue 30":"#618df2","Simplenote Blue 40":"#4678eb","Simplenote Blue 50":"#3361cc","Simplenote Blue 60":"#1d4fc4","Simplenote Blue 70":"#113ead","Simplenote Blue 80":"#0d2f85","Simplenote Blue 90":"#09205c","Simplenote Blue 100":"#05102e","Simplenote Blue":"#3361cc","WooCommerce Purple 0":"#f2edff","WooCommerce Purple 5":"#e1d7ff","WooCommerce Purple 10":"#d1c1ff","WooCommerce Purple 20":"#b999ff","WooCommerce Purple 30":"#a77eff","WooCommerce Purple 40":"#873eff","WooCommerce Purple 50":"#720eec","WooCommerce Purple 60":"#6108ce","WooCommerce Purple 70":"#5007aa","WooCommerce Purple 80":"#3c087e","WooCommerce Purple 90":"#2c045d","WooCommerce Purple 100":"#1f0342","WooCommerce Purple":"#720eec","Jetpack Green 0":"#f0f2eb","Jetpack Green 5":"#d0e6b8","Jetpack Green 10":"#9dd977","Jetpack Green 20":"#64ca43","Jetpack Green 30":"#2fb41f","Jetpack Green 40":"#069e08","Jetpack Green 50":"#008710","Jetpack Green 60":"#007117","Jetpack Green 70":"#005b18","Jetpack Green 80":"#004515","Jetpack Green 90":"#003010","Jetpack Green 100":"#001c09","Jetpack Green":"#069e08"}}')},54681(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/ai-assistant","title":"AI Assistant","description":"Elevate your content creation with our AI-powered Gutenberg Block, offering seamless customization and generation. Bear in mind that, as an evolving tool, occasional imprecision may occur.","keywords":["AI","GPT","AL","Magic","help","assistant"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg viewBox=\'0 0 32 32\' width=\'32\' height=\'32\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M9.33301 5.33325L10.4644 8.20188L13.333 9.33325L10.4644 10.4646L9.33301 13.3333L8.20164 10.4646L5.33301 9.33325L8.20164 8.20188L9.33301 5.33325Z\'/><path d=\'M21.3333 5.33333L22.8418 9.15817L26.6667 10.6667L22.8418 12.1752L21.3333 16L19.8248 12.1752L16 10.6667L19.8248 9.15817L21.3333 5.33333Z\'/><path d=\'M14.6667 13.3333L16.5523 18.1144L21.3333 20L16.5523 21.8856L14.6667 26.6667L12.781 21.8856L8 20L12.781 18.1144L14.6667 13.3333Z\'/></svg>","supports":{"html":false,"multiple":true,"reusable":false},"attributes":{"content":{"type":"string"},"originalContent":{"type":"string"},"promptType":{"type":"string"},"originalMessages":{"type":"array","default":[]},"messages":{"type":"array","default":[]},"userPrompt":{"type":"string","default":""},"requestingState":{"type":"string","default":"init"},"preTransformAction":{"type":"string","default":null}},"example":{"attributes":{"content":"With **Jetpack AI Assistant**, you can provide a prompt, and it will generate high-quality blog posts, informative pages, well-organized lists, and thorough tables that meet your specific requirements.\\n\\nTo start using the **Jetpack AI Assistant**, type `/AI` in the block editor."}}}')},9050(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/business-hours","title":"Business Hours","description":"Display opening hours for your business.","keywords":["opening hours","closing time","schedule","working day"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z\'/></svg>","supports":{"html":true,"color":{"gradients":true},"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true},"align":["wide","full"]},"attributes":{"days":{"type":"array","default":[{"name":"Sun","hours":[]},{"name":"Mon","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Tue","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Wed","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Thu","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Fri","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Sat","hours":[]}]}},"example":{"attributes":{"days":[{"name":"Sun","hours":[]},{"name":"Mon","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Tue","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Wed","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Thu","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Fri","hours":[{"opening":"09:00","closing":"17:00"}]},{"name":"Sat","hours":[]}]}}}')},13248(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/calendly","title":"Calendly","description":"Embed a calendar for customers to schedule appointments.","keywords":["calendar","schedule","appointments","events","dates"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 23 24\' width=\'23\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19,1h-2.3v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H8.6v0c0-0.6-0.4-1-1-1c-0.6,0-1,0.4-1,1v0H4C1.8,1,0,2.8,0,5 v15c0,2.2,1.8,4,4,4h15c2.2,0,4-1.8,4-4V5C23,2.8,21.2,1,19,1z M21,20c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V5c0-1.1,0.9-2,2-2h2.6 v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3h6.1v0.8c0,0.6,0.4,1,1,1c0.6,0,1-0.4,1-1V3H19c1.1,0,2,0.9,2,2V20z M13.9,14.8l1.4,1.4 c-0.9,0.9-2.1,1.3-3.5,1.3c-2.4,0-4.5-2.1-4.5-4.7s2.1-4.7,4.5-4.7c1.4,0,2.5,0.4,3.4,1.1L14,10.9c-0.5-0.4-1.2-0.6-2.1-0.6 c-1.2,0-2.5,1.1-2.5,2.7c0,1.6,1.3,2.7,2.5,2.7C12.7,15.5,13.4,15.3,13.9,14.8z\'/></svg>","supports":{"align":true,"alignWide":false,"html":false},"attributes":{"backgroundColor":{"type":"string","default":"ffffff"},"hideEventTypeDetails":{"type":"boolean","default":false},"primaryColor":{"type":"string","default":"00A2FF"},"textColor":{"type":"string","default":"4D5055"},"style":{"type":"string","default":"inline","enum":["inline","link"]},"url":{"type":"string"}},"example":{"attributes":{"hideEventTypeDetails":false,"style":"inline","url":"https://calendly.com/wpcom/jetpack-block-example"},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"a","text":"Schedule time with me","uniqueId":"calendly-widget-id","url":"https://calendly.com/wpcom/jetpack-block-example"}}]}}')},75173(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/contact-info","title":"Contact Info","description":"Add an email address, phone number, and physical address with improved markup for better SEO results.","keywords":["email","phone","address"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19 5v14H5V5h14m0-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 9c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm6 10H6v-1.53c0-2.5 3.97-3.58 6-3.58s6 1.08 6 3.58V18zm-9.69-2h7.38c-.69-.56-2.38-1.12-3.69-1.12s-3.01.56-3.69 1.12z\'/></svg>","supports":{"align":["wide","full"],"html":false,"color":{"link":true,"gradients":true},"spacing":{"padding":true,"margin":true},"typography":{"fontSize":true,"lineHeight":true}},"example":{"attributes":{},"innerBlocks":[{"name":"jetpack/email","attributes":{"email":"[email protected]"}},{"name":"jetpack/phone","attributes":{"phone":"123-456-7890"}},{"name":"jetpack/address","attributes":{"address":"987 Photon Drive","city":"Speedyville","region":"CA","postal":"12345","country":"USA"}}]}}')},87325(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/donations","title":"Donations Form","description":"Collect one-time, monthly, or annually recurring donations.","keywords":["charity","contribution","credit card","debit card","donate","earn","monetize","ecommerce","fundraising","fundraiser","gofundme","money","nonprofit","non-profit","paid","patreon","pay","payments","recurring","stripe","sponsor","square","tipping","venmo"],"version":"12.5.0","textdomain":"jetpack","category":"monetize","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><g transform=\'translate(1.2 1.2) scale(0.9)\'><path d=\'M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z\' /></g></svg>","supports":{"html":false,"color":{"background":true,"text":true,"button":true,"link":true,"gradients":false},"typography":{"fontSize":true,"fontFamily":true,"fontStyle":true,"fontWeight":true,"lineHeight":true,"letterSpacing":true}},"attributes":{"currency":{"type":"string","default":""},"oneTimeDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100]}},"monthlyDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100]}},"annualDonation":{"type":"object","default":{"show":true,"planId":null,"amounts":[5,15,100]}},"showCustomAmount":{"type":"boolean","default":true},"defaultInterval":{"type":"string"},"customAmountPlaceholder":{"type":"number"},"chooseAmountText":{"type":"string"},"customAmountText":{"type":"string"},"fallbackLinkUrl":{"type":"string"},"activeTabBackgroundColor":{"type":"string"},"activeTabTextColor":{"type":"string"},"inactiveTabBackgroundColor":{"type":"string"},"inactiveTabTextColor":{"type":"string"},"selectedAmountBackgroundColor":{"type":"string"},"selectedAmountTextColor":{"type":"string"},"selectedAmountOutlineColor":{"type":"string"},"tabsAppearance":{"type":"string","enum":["tabs","buttons"],"default":"tabs"},"tabBorderColor":{"type":"string"},"tabFontSize":{"type":"string"},"tabPadding":{"type":"object"},"buttonFontSize":{"type":"string"},"buttonPadding":{"type":"object"},"buttonAlignment":{"type":"string","enum":["","left","center","right","full"],"default":""},"amountFontSize":{"type":"string"},"amountBorder":{"type":"object"},"amountBorderRadius":{"type":["string","object"]},"buttonBorderRadius":{"type":["string","object"]},"contentAlignment":{"type":"string","enum":["","left","center","right"],"default":""},"minimumAmount":{"type":"number"},"maximumAmount":{"type":"number"},"displayMode":{"type":"string","enum":["inline","modal"],"default":"inline"},"triggerButtonText":{"type":"string"},"triggerIcon":{"type":"string","default":"heart"},"triggerSticky":{"type":"boolean","default":false},"blockBorder":{"type":"object"},"blockBorderRadius":{"type":["string","object"]},"variationName":{"type":"string","default":""}},"example":{}}')},82306(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/eventbrite","title":"Eventbrite Checkout","description":"Embed Eventbrite event details and ticket checkout.","keywords":["events","tickets"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M18.041,3.931L5.959,3C4.325,3,3,4.325,3,5.959v12.083C3,19.675,4.325,21,5.959,21l12.083-0.931C19.699,19.983,21,18.744,21,17.11V6.89C21,5.256,19.741,4.027,18.041,3.931zM16.933,8.17c-0.082,0.215-0.192,0.432-0.378,0.551c-0.188,0.122-0.489,0.132-0.799,0.132c-1.521,0-3.062-0.048-4.607-0.048c-0.152,0.708-0.304,1.416-0.451,2.128c0.932-0.004,1.873,0.005,2.81,0.005c0.726,0,1.462-0.069,1.586,0.525c0.04,0.189-0.001,0.426-0.052,0.615c-0.105,0.38-0.258,0.676-0.625,0.783c-0.185,0.054-0.408,0.058-0.646,0.058c-1.145,0-2.345,0.017-3.493,0.02c-0.169,0.772-0.328,1.553-0.489,2.333c1.57-0.005,3.067-0.041,4.633-0.058c0.627-0.007,1.085,0.194,1.009,0.85c-0.031,0.262-0.098,0.497-0.211,0.725c-0.102,0.208-0.248,0.376-0.488,0.452c-0.237,0.075-0.541,0.064-0.862,0.078c-0.304,0.014-0.614,0.008-0.924,0.016c-0.309,0.009-0.619,0.022-0.919,0.022c-1.253,0-2.429,0.08-3.683,0.073c-0.603-0.004-1.014-0.249-1.124-0.757c-0.059-0.273-0.018-0.58,0.036-0.841c0.541-2.592,1.083-5.176,1.629-7.763c0.056-0.265,0.114-0.511,0.225-0.714C9.279,7.051,9.534,6.834,9.9,6.735c0.368-0.099,0.883-0.047,1.344-0.047c0.305,0,0.612,0.008,0.914,0.016c0.925,0.026,1.817,0.03,2.747,0.053c0.304,0.007,0.615,0.016,0.915,0.016c0.621,0,1.17,0.073,1.245,0.614C17.104,7.675,17.014,7.954,16.933,8.17z\'/></svg>","supports":{"html":false,"align":true},"attributes":{"url":{"type":"string"},"eventId":{"type":"number"},"style":{"type":"string","default":"inline"}},"example":{"attributes":{"url":"https://www.eventbrite.com/e/test-event-tickets-123456789","eventId":123456789,"style":"modal"},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"a","text":"Register","uniqueId":"eventbrite-widget-id"}}]}}')},5564(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/gif","title":"GIF","description":"Search for and insert an animated image.","keywords":["animated","giphy","image"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path fill=\'none\' d=\'M0 0h24v24H0V0z\'/><path d=\'M18 13v7H4V6h5.02c.05-.71.22-1.38.48-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-5l-2-2zm-1.5 5h-11l2.75-3.53 1.96 2.36 2.75-3.54L16.5 18zm2.8-9.11c.44-.7.7-1.51.7-2.39C20 4.01 17.99 2 15.5 2S11 4.01 11 6.5s2.01 4.5 4.49 4.5c.88 0 1.7-.26 2.39-.7L21 13.42 22.42 12 19.3 8.89zM15.5 9C14.12 9 13 7.88 13 6.5S14.12 4 15.5 4 18 5.12 18 6.5 16.88 9 15.5 9z\'/></svg>","supports":{"html":false,"align":true},"attributes":{"align":{"type":"string","default":"center"},"caption":{"type":"string"},"giphyUrl":{"type":"string"},"searchText":{"type":"string"},"paddingTop":{"type":"string","default":"56.2%"}},"example":{"attributes":{"align":"center","giphyUrl":"https://giphy.com/embed/fxKWgoOG9hzPPkE1oc","paddingTop":"100%","searchText":"WordPress"}}}')},76862(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/google-calendar","title":"Google Calendar","description":"Embed a Google Calendar.","keywords":["events","dates","schedule","appointments"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 23\' width=\'24\' height=\'23\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19.5,23h-15c-2.2,0-4-1.8-4-4V4c0-2.2,1.8-4,4-4h15c2.2,0,4,1.8,4,4v15C23.5,21.2,21.7,23,19.5,23z M4.5,2 c-1.1,0-2,0.9-2,2v15c0,1.1,0.9,2,2,2h15c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2H4.5z M6.9,3.9L6.9,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0C6.5,5.9,6.1,5.5,6.1,5V4.7C6.1,4.3,6.5,3.9,6.9,3.9z M17,3.9L17,3.9c0.5,0,0.9,0.4,0.9,0.9V5 c0,0.5-0.4,0.9-0.9,0.9l0,0c-0.5,0-0.9-0.4-0.9-0.9V4.7C16.2,4.3,16.5,3.9,17,3.9z M8.8,17.6c1.8,0,3.2-1,3.2-2.4 c0-1.1-0.7-1.8-1.8-1.9v-0.1c0.9-0.2,1.5-0.9,1.5-1.8c0-1.3-1.2-2.2-2.9-2.2c-1.8,0-2.9,1-3,2.5h1.6c0-0.7,0.6-1.1,1.4-1.1 c0.8,0,1.3,0.4,1.3,1.1c0,0.7-0.5,1.1-1.3,1.1h-1v1.3h1c0.9,0,1.5,0.4,1.5,1.1c0,0.7-0.6,1.2-1.4,1.2c-0.9,0-1.4-0.4-1.5-1.1H5.7 C5.8,16.6,7,17.6,8.8,17.6z M17.6,17.4V9.3h-1.7l-2.1,1.4v1.6l2-1.4h0.1v6.4H17.6z\'/></svg>","supports":{"align":true,"alignWide":true,"html":false},"attributes":{"url":{"type":"string"},"height":{"type":"integer","default":600}},"example":{"attributes":{"url":"https://calendar.google.com/calendar/embed?src=jb4bu80jirp0u11a6niie21pp4%40group.calendar.google.com&ctz=America/New_York"}}}')},89525(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/instagram-gallery","title":"Latest Instagram Posts","description":"Display an automatically updating list of the latest posts from your Instagram feed.","keywords":["images","photos","pictures"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg width=\'24\' height=\'24\' viewBox=\'0 0 24 24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12 4.622c2.403 0 2.688.01 3.637.052.877.04 1.354.187 1.67.31.42.163.72.358 1.036.673.315.315.51.615.673 1.035.123.317.27.794.31 1.67.043.95.052 1.235.052 3.638s-.01 2.688-.052 3.637c-.04.877-.187 1.354-.31 1.67-.163.42-.358.72-.673 1.036-.315.315-.615.51-1.035.673-.317.123-.794.27-1.67.31-.95.043-1.234.052-3.638.052s-2.688-.01-3.637-.052c-.877-.04-1.354-.187-1.67-.31-.42-.163-.72-.358-1.036-.673-.315-.315-.51-.615-.673-1.035-.123-.317-.27-.794-.31-1.67-.043-.95-.052-1.235-.052-3.638s.01-2.688.052-3.637c.04-.877.187-1.354.31-1.67.163-.42.358-.72.673-1.036.315-.315.615-.51 1.035-.673.317-.123.794-.27 1.67-.31.95-.043 1.235-.052 3.638-.052M12 3c-2.444 0-2.75.01-3.71.054s-1.613.196-2.185.418c-.592.23-1.094.538-1.594 1.04-.5.5-.807 1-1.037 1.593-.223.572-.375 1.226-.42 2.184C3.01 9.25 3 9.555 3 12s.01 2.75.054 3.71.196 1.613.418 2.186c.23.592.538 1.094 1.038 1.594s1.002.808 1.594 1.038c.572.222 1.227.375 2.185.418.96.044 1.266.054 3.71.054s2.75-.01 3.71-.054 1.613-.196 2.186-.418c.592-.23 1.094-.538 1.594-1.038s.808-1.002 1.038-1.594c.222-.572.375-1.227.418-2.185.044-.96.054-1.266.054-3.71s-.01-2.75-.054-3.71-.196-1.613-.418-2.186c-.23-.592-.538-1.094-1.038-1.594s-1.002-.808-1.594-1.038c-.572-.222-1.227-.375-2.185-.418C14.75 3.01 14.445 3 12 3zm0 4.378c-2.552 0-4.622 2.07-4.622 4.622s2.07 4.622 4.622 4.622 4.622-2.07 4.622-4.622S14.552 7.378 12 7.378zM12 15c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3zm4.804-8.884c-.596 0-1.08.484-1.08 1.08s.484 1.08 1.08 1.08c.596 0 1.08-.484 1.08-1.08s-.483-1.08-1.08-1.08z\'></path></svg>","supports":{"align":true,"html":false},"attributes":{"accessToken":{"type":"string"},"instagramUser":{"type":"string"},"columns":{"type":"number","default":3,"min":1,"max":6},"count":{"type":"number","default":9,"min":1,"max":30},"spacing":{"type":"number","default":10,"min":0,"max":50},"isStackedOnMobile":{"type":"boolean","default":true}}}')},37120(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/mailchimp","title":"Mailchimp","description":"Allow readers to join a Mailchimp audience.","keywords":["email","subscription","newsletter"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m16.88,11.25c.17-.02.34-.02.49,0,.09-.2.1-.55.02-.93-.12-.57-.28-.91-.61-.86-.33.05-.34.46-.22,1.03.07.32.19.59.32.76\'/><path d=\'m14.03,11.7c.24.1.38.17.44.11.04-.04.03-.11-.03-.2-.12-.19-.36-.38-.61-.49-.52-.22-1.14-.15-1.62.19-.16.12-.31.28-.29.37,0,.03.03.06.09.06.13.01.59-.22,1.11-.25.37-.02.68.09.92.2\'/><path d=\'m13.56,11.97c-.31.05-.48.15-.59.25-.09.08-.15.17-.15.23,0,.03.01.05.02.06.01.01.03.02.05.02.07,0,.23-.06.23-.06.43-.15.71-.13.99-.1.16.02.23.03.26-.03.01-.02.02-.05,0-.1-.07-.12-.38-.32-.81-.26\'/><path d=\'m15.92,12.97c.21.1.44.06.52-.09s-.03-.36-.24-.46c-.21-.1-.44-.06-.52.09-.08.15.03.36.24.46\'/><path d=\'m17.26,11.79c-.17,0-.31.18-.32.42s.13.42.3.43.31-.18.32-.42c0-.23-.13-.42-.3-.43\'/><path d=\'m5.83,16c-.04-.05-.11-.04-.18-.02-.05.01-.1.02-.16.02-.13,0-.23-.06-.29-.15-.08-.12-.07-.3.01-.5l.04-.09c.14-.31.36-.82.11-1.31-.19-.37-.51-.6-.89-.64-.36-.05-.74.09-.98.35-.38.42-.44.98-.36,1.18.03.07.07.09.1.1.06,0,.16-.04.22-.2l.02-.05c.03-.08.08-.24.16-.37.1-.15.25-.26.43-.29.18-.04.37,0,.52.1.26.17.37.5.25.8-.06.16-.15.46-.13.72.04.51.35.71.63.73.27.01.46-.14.51-.25.03-.07,0-.11-.01-.12\'/><path d=\'m8.42,6.69c.89-1.03,1.98-1.92,2.96-2.42.03-.02.07.02.05.05-.08.14-.23.44-.28.67,0,.04.03.06.06.04.61-.42,1.67-.86,2.6-.92.04,0,.06.05.03.07-.14.11-.3.26-.41.41-.02.03,0,.06.03.06.65,0,1.57.23,2.17.57.04.02.01.1-.03.09-.91-.21-2.4-.37-3.94.01-1.38.34-2.43.86-3.2,1.41-.04.03-.09-.02-.05-.06h0Zm4.43,9.95h0s0,0,0,0h0Zm3.67.43s.04-.04.04-.07c0-.04-.04-.06-.07-.06,0,0-1.9.28-3.69-.38.2-.63.71-.41,1.5-.34,1.41.08,2.68-.12,3.62-.39.81-.23,1.88-.69,2.71-1.35.28.61.38,1.29.38,1.29,0,0,.22-.04.4.07.17.11.3.32.21.89-.17,1.05-.62,1.91-1.38,2.7-.46.49-1.02.92-1.65,1.24-.34.18-.7.33-1.08.46-2.84.93-5.75-.09-6.69-2.28-.07-.16-.14-.34-.19-.52-.4-1.44-.06-3.17,1-4.27h0c.07-.07.13-.15.13-.25,0-.09-.05-.18-.1-.24-.37-.54-1.66-1.45-1.4-3.23.19-1.27,1.3-2.17,2.34-2.12l.26.02c.45.03.84.08,1.21.1.62.03,1.18-.06,1.84-.61.22-.19.4-.35.7-.4.03,0,.11-.03.27-.03.16,0,.31.05.45.14.53.35.6,1.21.63,1.83.02.36.06,1.22.07,1.47.03.57.18.65.48.75.17.06.33.1.56.16.7.2,1.12.4,1.38.65.16.16.23.33.25.49.08.6-.47,1.35-1.93,2.03-1.59.74-3.53.93-4.87.78l-.47-.05c-1.07-.14-1.68,1.24-1.04,2.18.41.61,1.54,1.01,2.67,1.01,2.58,0,4.57-1.1,5.31-2.06l.06-.08c.04-.05,0-.08-.04-.05-.6.41-3.28,2.05-6.15,1.56,0,0-.35-.06-.67-.18-.25-.1-.78-.34-.85-.88,2.31.72,3.77.04,3.77.04h0ZM3.8,11.57c-.8.16-1.51.61-1.95,1.24-.26-.22-.74-.63-.83-.8-.69-1.31.76-3.87,1.77-5.32C5.3,3.13,9.21.43,11.02.92c.29.08,1.27,1.21,1.27,1.21,0,0-1.81,1.01-3.49,2.41-2.26,1.74-3.97,4.28-5,7.03h0Zm1.35,6.03c-.12.02-.25.03-.37.03-1.21-.03-2.52-1.12-2.65-2.42-.14-1.43.59-2.53,1.88-2.79.15-.03.34-.05.54-.04.72.04,1.79.6,2.04,2.17.22,1.4-.13,2.82-1.44,3.04h0Zm16.4-2.53s-.08-.28-.17-.58c-.09-.3-.19-.51-.19-.51.37-.56.38-1.06.33-1.34-.05-.35-.2-.65-.49-.96-.29-.31-.89-.62-1.74-.86l-.44-.12s-.02-1.04-.04-1.48c-.01-.32-.04-.82-.2-1.31-.18-.66-.5-1.24-.9-1.61,1.1-1.14,1.79-2.4,1.79-3.48,0-2.08-2.56-2.71-5.7-1.4l-.67.28s-1.2-1.18-1.22-1.2C8.33-2.63-2.89,9.84.7,12.86l.78.66c-.2.53-.28,1.13-.22,1.78.08.83.51,1.63,1.21,2.25.66.59,1.53.96,2.37.96,1.4,3.21,4.58,5.19,8.32,5.3,4.01.12,7.37-1.76,8.78-5.14.09-.24.48-1.31.48-2.25s-.54-1.34-.88-1.34\'/></svg>","supports":{"align":["wide","full"],"color":{"gradients":true},"spacing":{"padding":true,"margin":true}},"attributes":{"emailPlaceholder":{"type":"string"},"consentText":{"type":"string"},"interests":{"type":"array","default":[]},"processingLabel":{"type":"string"},"signupFieldTag":{"type":"string"},"signupFieldValue":{"type":"string"},"successLabel":{"type":"string"},"errorLabel":{"type":"string"},"preview":{"type":"boolean","default":false}},"example":{"attributes":{"preview":true},"innerBlocks":[{"name":"jetpack/button","attributes":{"element":"button","text":"Join my Mailchimp audience","uniqueId":"mailchimp-widget-id"}}]}}')},55740(e){"use strict";e.exports=JSON.parse('[{"id":"mapbox-gl-js","file":"node_modules/mapbox-gl/dist/mapbox-gl.js","version":"1.13.0"},{"id":"mapbox-gl-css","file":"node_modules/mapbox-gl/dist/mapbox-gl.css","version":"1.13.0"}]')},6852(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/map","title":"Map","description":"Add an interactive map showing one or more locations.","keywords":["maps","location","navigation"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM10 5.47l4 1.4v11.66l-4-1.4V5.47zm-5 .99l3-1.01v11.7l-3 1.16V6.46zm14 11.08l-3 1.01V6.86l3-1.16v11.84z\' /></svg>","supports":{"defaultStylePicker":false,"html":false,"align":["wide","full"]},"attributes":{"align":{"type":"string"},"points":{"type":"array","default":[]},"address":{"type":"string","default":""},"mapDetails":{"type":"boolean","default":true},"zoom":{"type":"integer","default":13},"mapCenter":{"type":"object","default":{"longitude":-122.41941550000001,"latitude":37.7749295}},"markerColor":{"type":"string","default":"red"},"scrollToZoom":{"type":"boolean","default":false},"mapHeight":{"type":"integer"},"showFullscreenButton":{"type":"boolean","default":true}},"example":{}}')},73431(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/markdown","title":"Markdown","description":"Add headings, lists, or links to plain text with ease.","keywords":["formatting","syntax","markup"],"version":"12.5.0","textdomain":"jetpack","category":"text","icon":"<svg viewBox=\'0 0 208 128\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><rect width=\'198\' height=\'118\' x=\'5\' y=\'5\' ry=\'10\' stroke=\'currentColor\' strokeWidth=\'10\' fill=\'none\' /><path d=\'M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z\' />","supports":{"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"padding":true,"margin":true}}},"attributes":{"source":{"type":"string"}},"example":{"attributes":{"source":"## ## Try Markdown\\n\\nMarkdown is a text formatting syntax that is converted into HTML. You can _emphasize_ text or **make it strong** with just a few characters."}}}')},79018(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/opentable","title":"OpenTable","description":"Book a reservation with OpenTable.","keywords":["booking","reservation","restaurant"],"version":"12.5.0","textdomain":"jetpack","category":"monetize","icon":"<svg viewBox=\'0 0 22 16\' width=\'22\' height=\'16\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m1.997 5.982c-.39457-.00039-.7804.11622-1.108699.33511-.328295.21888-.584312.5302-.735674.89459-.15136174.36439-.1912714.76548-.1146819 1.15254.0765899.38707.2662379.74274.5449639 1.02202.278726.27929.634011.46965 1.020921.54702.38692.07732.78809.03826 1.15278-.11238.36469-.15063.67652-.40602.89606-.73387.21954-.32786.33693-.71345.33733-1.10803v-.002c.001-1.1-.89-1.994-1.992-1.995zm12.006 3.988c-.3946.0004-.7805-.11625-1.1088-.33517-.3283-.21893-.5843-.53031-.7357-.89476-.1513-.36444-.1912-.76558-.1145-1.15268s.2664-.74276.5453-1.022c.2788-.27925.6342-.46953 1.0211-.54679.387-.07725.7882-.038 1.1529.11278.3647.15079.6764.40634.8959.73432.2194.32799.3366.71369.3368 1.1083v.003c.0003.52814-.2092 1.03477-.5824 1.4085s-.8795.58397-1.4076.5845zm0-9.96999843c-1.5777-.0009886-3.1203.46588743-4.43262 1.34158843-1.31236.8757-2.33558 2.1209-2.94025 3.57813-.60467 1.45722-.76365 3.06103-.45683 4.60861.30683 1.54757 1.06567 2.96947 2.18058 4.08577 1.1149 1.1163 2.53582 1.8769 4.08302 2.1856 1.5472.3088 3.1512.1518 4.6091-.451 1.458-.6028 2.7045-1.6245 3.5819-2.9358.8773-1.3112 1.3461-2.8532 1.3471-4.4309v-.005c.0008-2.11466-.8384-4.14304-2.3331-5.63899-1.4946-1.495952-3.5222-2.3369478-5.6369-2.33800843z\' /></svg>","supports":{"align":true,"html":false},"attributes":{"rid":{"default":[],"type":"array"},"style":{"default":"standard","type":"string","enum":["button","standard","wide","tall"]},"iframe":{"default":true,"type":"boolean"},"domain":{"default":"com","type":"string"},"lang":{"default":"en-US","type":"string","enum":["en-US","fr-CA","de-DE","es-MX","ja-JP","nl-NL","it-IT"]},"newtab":{"default":false,"type":"boolean"},"negativeMargin":{"default":false,"type":"boolean"}},"example":{"attributes":{"rid":["1"],"style":"standard","iframe":true,"domain":"com","lang":"en-US","newtab":false,"negativeMargin":false}}}')},73800(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/pinterest","title":"Pinterest","description":"Embed a Pinterest pin, board, or user.","keywords":["social","pinboard","pins"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12,2C6.477,2,2,6.477,2,12c0,4.236,2.636,7.855,6.356,9.312c-0.087-0.791-0.166-2.005,0.035-2.869c0.182-0.78,1.173-4.971,1.173-4.971s-0.299-0.599-0.299-1.484c0-1.39,0.806-2.429,1.809-2.429c0.853,0,1.265,0.641,1.265,1.409c0,0.858-0.546,2.141-0.828,3.329c-0.236,0.996,0.499,1.807,1.481,1.807c1.777,0,3.144-1.874,3.144-4.579c0-2.394-1.72-4.068-4.177-4.068c-2.845,0-4.515,2.134-4.515,4.34c0,0.859,0.331,1.781,0.744,2.282c0.082,0.099,0.094,0.186,0.069,0.287C8.18,14.682,8.011,15.361,7.978,15.5c-0.044,0.183-0.145,0.222-0.334,0.134c-1.249-0.581-2.03-2.407-2.03-3.874c0-3.154,2.292-6.051,6.607-6.051c3.469,0,6.165,2.472,6.165,5.775c0,3.446-2.173,6.22-5.189,6.22c-1.013,0-1.966-0.526-2.292-1.148c0,0-0.501,1.909-0.623,2.377c-0.226,0.869-0.835,1.957-1.243,2.622C9.975,21.844,10.969,22,12,22c5.523,0,10-4.477,10-10C22,6.477,17.523,2,12,2z\'/></svg>","supports":{"html":false,"align":false,"inserter":false},"attributes":{"url":{"type":"string"}},"example":{"attributes":{"url":"https://pinterest.com/anapinskywalker/"}}}')},8206(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/rating-star","title":"Star Rating","description":"Rate movies, books, songs, recipes — anything you can put a number on.","keywords":["star","rating","review"],"version":"12.5.0","textdomain":"jetpack","category":"widgets","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z\'/></svg>","supports":{"html":false},"styles":[{"name":"filled","label":"Filled","isDefault":true},{"name":"outlined","label":"Outlined"}],"attributes":{"rating":{"type":"number","default":1},"maxRating":{"type":"number","default":5},"color":{"type":"string"},"ratingStyle":{"type":"string","default":"star"},"className":{"type":"string"},"align":{"type":"string","default":"left"}},"example":{}}')},88795(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/related-posts","title":"Related Posts","description":"Display a list of related posts.","keywords":["similar content","linked","connected"],"version":"12.5.0","textdomain":"jetpack","category":"embed","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m19.5,3.5H3.5v4.94s.01,6,.01,6v4s-.01,0-.01,0v1h15.97v-.06h.05l-.02-15.88Zm-11,1v3.94s-3.99,0-3.99,0v-3.94s3.99,0,3.99,0Zm.01,4.94v4h-4v-4h4Zm-3.99,9v-4s3.99,0,3.99,0v4s-3.99,0-3.99,0Zm13.98-13.94v3.94s-8.99,0-8.99,0v-3.94s8.99,0,8.99,0Zm.01,4.94v4h-9v-4h9Zm-8.99,9v-4s8.99,0,8.99,0v4s-8.99,0-8.99,0Z\'/></svg>","supports":{"html":false,"multiple":false,"reusable":false,"color":{"gradients":true,"link":true},"spacing":{"margin":true,"padding":true},"typography":{"__experimentalFontFamily":true,"fontSize":true,"lineHeight":true},"align":["wide","full"]},"attributes":{"postLayout":{"type":"string","default":"grid"},"displayAuthor":{"type":"boolean","default":false},"displayDate":{"type":"boolean","default":true},"displayThumbnails":{"type":"boolean","default":false},"displayContext":{"type":"boolean","default":false},"postsToShow":{"type":"number","default":3}},"example":{"attributes":{"postLayout":"grid","displayAuthor":false,"displayDate":true,"displayThumbnails":true,"displayContext":false,"postsToShow":2}}}')},20242(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/repeat-visitor","title":"Repeat Visitor","description":"Control block visibility based on how often a visitor has viewed the page.","keywords":["return","visitors","visibility"],"version":"12.5.0","textdomain":"jetpack","category":"widgets","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\'/></svg>","supports":{"align":["wide","full"],"html":false},"attributes":{"criteria":{"type":"string","default":"after-visits"},"threshold":{"type":"number","default":3}},"example":{"attributes":{"criteria":"after-visits","threshold":3},"innerBlocks":[{"name":"core/paragraph","attributes":"This block will only appear to a visitor who visited the page three or more times."}]}}')},87762(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/slideshow","title":"Slideshow","description":"Display multiple images in sequential order.","keywords":["story","image","video","gallery"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'m19,21.5H6v-1h13c.83,0,1.5-.67,1.5-1.5v-11h1v11c0,1.38-1.12,2.5-2.5,2.5Z\'/><path d=\'m16.38,3.25H4.62c-.75,0-1.37.62-1.37,1.37v11.76c0,.75.62,1.37,1.37,1.37h11.76c.75,0,1.37-.62,1.37-1.37V4.62c0-.75-.62-1.37-1.37-1.37Zm.37,13.13c0,.2-.17.37-.37.37H4.62c-.2,0-.37-.17-.37-.37V4.62c0-.2.17-.37.37-.37h11.76c.2,0,.37.17.37.37v11.76Z\'/><path d=\'M9.39 7.51 12.73 11.04 9.31 14.32 8.61 13.6 11.34 10.99 8.67 8.2 9.39 7.51z\'/></svg>","supports":{"html":false,"align":["center","wide","full"]},"attributes":{"align":{"default":"center","type":"string"},"autoplay":{"type":"boolean","default":false},"delay":{"type":"number","default":3},"ids":{"default":[],"type":"array"},"images":{"type":"array","default":[],"source":"query","selector":".swiper-slide","query":{"alt":{"source":"attribute","selector":"img","attribute":"alt","default":""},"caption":{"type":"string","source":"html","selector":"figcaption"},"id":{"source":"attribute","selector":"img","attribute":"data-id"},"url":{"source":"attribute","selector":"img","attribute":"src"},"aspectRatio":{"source":"attribute","selector":"img","attribute":"data-aspect-ratio"}}},"effect":{"type":"string","default":"slide"},"sizeSlug":{"type":"string"}},"example":{"align":"center","autoplay":true,"ids":[22,23,24],"images":[{"alt":"","caption":"","id":22,"url":"./slideshowExample1.png"},{"alt":"","caption":"","id":23,"url":"./slideshowExample2.png"},{"alt":"","caption":"","id":24,"url":"./slideshowExample3.png"}],"effect":"slide"}}')},76585(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/tiled-gallery","title":"Tiled Gallery","description":"Display multiple images in an elegantly organized tiled layout.","keywords":["columns","images","photos","pictures","square","circle","mosaic"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M19 5v2h-4V5h4M9 5v6H5V5h4m10 8v6h-4v-6h4M9 17v2H5v-2h4M21 3h-8v6h8V3zM11 3H3v10h8V3zm10 8h-8v10h8V11zm-10 4H3v6h8v-6z\'/></svg>","supports":{"align":["center","wide","full"],"color":{"gradients":true,"text":false},"customClassName":false,"html":false,"spacing":{"margin":true,"padding":true},"__experimentalHideChildBlockControls":true},"providesContext":{"imageCrop":"imageCrop"},"styles":[{"name":"rectangular","label":"Tiled mosaic","isDefault":true},{"name":"circle","label":"Circles"},{"name":"square","label":"Square tiles"},{"name":"columns","label":"Tiled columns"}],"attributes":{"align":{"type":"string","default":"center"},"className":{"type":"string","default":"is-style-rectangular"},"columns":{"type":"number"},"columnWidths":{"type":"array","default":[]},"ids":{"type":"array","default":[]},"imageFilter":{"type":"string"},"images":{"type":"array","default":[],"source":"query","selector":".tiled-gallery__item","query":{"alt":{"attribute":"alt","default":"","selector":"img","source":"attribute"},"height":{"attribute":"data-height","type":"number","selector":"img","source":"attribute"},"id":{"attribute":"data-id","selector":"img","source":"attribute"},"link":{"attribute":"data-link","selector":"img","source":"attribute"},"customLink":{"attribute":"href","selector":"a","source":"attribute"},"url":{"attribute":"data-url","selector":"img","source":"attribute"},"width":{"attribute":"data-width","selector":"img","source":"attribute","type":"number"}}},"imageCrop":{"type":"boolean","default":true},"linkTo":{"default":"none","type":"string"},"roundedCorners":{"type":"integer","default":0}}}')},86525(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/tock","title":"Tock","description":"Reserve a table at your restaurant with Tock.","keywords":["booking","reservation","restaurant"],"version":"12.5.0","textdomain":"jetpack","category":"monetize","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><g transform=\'translate(3.7 3.45) scale(0.86)\'><path d=\'M10 15.619C6.84915 15.619 4.28572 13.0542 4.28572 9.90176C4.28572 7.24269 6.10957 5.00183 8.57143 4.36551V0C3.72557 0.693782 0 4.86162 0 9.90176C0 15.4274 4.47715 19.9069 10 19.9069C12.2461 19.9069 14.3193 19.1658 15.9887 17.9148L12.9003 14.825C12.0494 15.3287 11.0581 15.619 10 15.619 M15.7135 9.90176C15.7135 10.9604 15.4233 11.9522 14.9199 12.8035L18.0082 15.8935C19.2585 14.2232 19.9992 12.149 19.9992 9.90176C19.9992 4.86162 16.2736 0.693782 11.4277 0V4.36551C13.8896 5.00183 15.7135 7.24269 15.7135 9.90176\'/></g></svg>","supports":{"align":true,"html":false,"multiple":false},"attributes":{"url":{"type":"string"}},"example":{"attributes":{"url":"roister"},"viewportWidth":250}}')},15210(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/voice-to-content","title":"Voice to content","description":"Transform your spoken words into a post ready to publish with AI.","keywords":["AI","GPT","AL","Magic","help","assistant"],"version":"12.5.0","textdomain":"jetpack","category":"media","icon":"<svg viewBox=\'0 0 20 20\' width=\'20\' height=\'20\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12 9V3c0-1.1-.89-2-2-2-1.12 0-2 .94-2 2v6c0 1.1.9 2 2 2 1.13 0 2-.94 2-2zm4 0c0 2.97-2.16 5.43-5 5.91V17h2c.56 0 1 .45 1 1s-.44 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2v-2.09C6.17 14.43 4 11.97 4 9c0-.55.45-1 1-1 .56 0 1 .45 1 1 0 2.21 1.8 4 4 4 2.21 0 4-1.79 4-4 0-.55.45-1 1-1 .56 0 1 .45 1 1z\'/></svg>","supports":{"html":false,"multiple":true,"reusable":false},"attributes":{"content":{"type":"string"}}}')},16344(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/wordads","title":"Ad","description":"Earn income by adding high quality ads to your post.","keywords":["ads","WordAds","advertisement"],"version":"12.5.0","textdomain":"jetpack","category":"monetize","icon":"<svg viewBox=\'0 0 24 24\' width=\'24\' height=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M15,15.6L13,14H4V10H13L15,8.4V15.6M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z\'/></svg>","supports":{"align":["left","center","right"],"alignWide":false,"className":false,"customClassName":false,"html":false,"reusable":false},"attributes":{"align":{"type":"string","default":"center"},"format":{"type":"string","default":"mrec"},"hideMobile":{"type":"boolean","default":false}},"example":{}}')},79493(e){"use strict";e.exports=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"jetpack/zoom-scheduler","title":"Zoom Scheduler","description":"Embed a Zoom Scheduler booking page.","keywords":["scheduling","appointment","booking","schedule","calendar"],"version":"12.5.0","textdomain":"jetpack","category":"grow","icon":"<svg width=\'24\' height=\'24\' viewBox=\'0 0 150.0027008 150.0027008\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'><path fill=\'currentColor\' d=\'M100.0018005,64.5862427c-20.7117157,0-37.5006714,16.7895508-37.5006714,37.4997559,0,20.7103729,16.7889709,37.4998322,37.5006714,37.4998322,20.7112122,0,37.5006714-16.7894745,37.5006714-37.4998474,0-20.7102051-16.7894745-37.4997559-37.5006714-37.4997559v.0000153ZM114.7312317,116.8212738c-.8141785.8133545-1.8800354,1.2200165-2.9467163,1.2200165-1.0658569,0-2.1317139-.4066772-2.9458923-1.2200165l-11.7835388-11.7927094c-.7816925-.7808533-1.2208557-1.8392029-1.2208557-2.9458923v-20.8329468c0-2.3030396,1.8633728-4.1665802,4.166748-4.1665802,2.3025513,0,4.166748,1.8635254,4.166748,4.1665802v19.1079254l10.5635223,10.5710297c1.627533,1.6283722,1.627533,4.2642365,0,5.8926086l-.0000153-.0000153ZM97.9176025,39.5833817c-2.3033752,0-4.166748-1.8636169-4.166748-4.1666565V10.4167786c0-2.3030396,1.8633728-4.1666565,4.166748-4.1666565,2.3025513,0,4.166748,1.8636169,4.166748,4.1666565v24.9998627c0,2.3030396-1.8641968,4.1667404-4.166748,4.1667404ZM52.0832672,39.5833817c-2.3031311,0-4.166748-1.8636169-4.166748-4.1666565V10.4167786c0-2.3030396,1.8636169-4.1666565,4.166748-4.1666565s4.166748,1.8636169,4.166748,4.1666565v24.9998627c0,2.3030396-1.8636169,4.1667404-4.166748,4.1667404ZM112.5020294,18.7531738h-2.084198v16.6635513c0,6.9010391-5.5992584,12.4999771-12.5002289,12.4999771s-12.5002289-5.5989304-12.5002289-12.4999771v-16.6635513h-20.8338776v16.6635513c0,6.9010391-5.5991058,12.4999771-12.5002289,12.4999771s-12.5002289-5.5989304-12.5002289-12.4999771v-16.6635513h-2.0823669c-13.8074188,0-25.0004501,11.1927872-25.0004501,24.9998627v66.6664429c0,13.8069153,11.1930313,24.9996185,25.0004501,24.9996185h23.4715118c2.3010406,0,4.166748-1.86586,4.166748-4.166748,0-2.301712-1.8657074-4.166748-4.166748-4.166748l-23.4715118-.0008392c-9.2042465,0-16.6669693-7.4626312-16.6669693-16.6661377v-37.5001831c0-9.2039948,7.4627151-16.6664734,16.6669693-16.6664734h75.001358c6.157608,0,11.4802094,3.3742218,14.3585815,8.3434753.3441772.594101.8283539,1.0905151,1.3675232,1.5137024.0383301.0305023.0774994.0599976.1158295.0904999,3.7067413,2.9266357,9.158493.2289276,9.158493-4.4931641v-17.9534073c0-13.8070831-11.1927032-24.9999466-25.0004578-24.9999466l.0000305.0000458Z\'/></svg>","supports":{"align":true,"alignWide":false,"html":false},"attributes":{"url":{"type":"string"}},"example":{"attributes":{"url":"https://scheduler.zoom.us/wordpresscom/book-a-meeting"}}}')},73391(e){"use strict";e.exports=JSON.parse('{"production":["ai-assistant","ai-chat","ai-assistant-plugin","blogging-prompt","business-hours","button","calendly","cookie-consent","contact-form","contact-form/salesforce-lead-form","contact-info","donations","eventbrite","field-file","gif","google-calendar","image-compare","instagram-gallery","like","likes","mailchimp","map","markdown","opentable","payments","pinterest","podcast-episode","podcast-player","premium-content","rating-star","recurring-payments","related-posts","repeat-visitor","send-a-message","whatsapp-button","seo","sharing","shortlinks","simple-payments","slideshow","story","subscriber-login","subscriptions","tiled-gallery","tock","videopress","wordads","payments-intro","post-publish-qr-post-panel","payment-buttons","videopress/video","ai-assistant-support","ai-assistant-form-support","paywall","blogroll","blogroll-item","nextdoor","ai-assistant-usage-panel","sharing-button","sharing-buttons","ai-content-lens","blog-stats","top-posts","goodreads","voice-to-content","ai-featured-image-generator","ai-title-optimization","ai-assistant-experimental-image-generation-support","ai-general-purpose-image-generator","ai-proofread-breve","ai-assistant-site-logo-support","ai-title-optimization-keywords-support","ai-response-feedback","ai-assistant-image-extension","ai-sidebar-toolbar-button","ai-sidebar-agent-notice","ai-sidebar-agent-support","ai-seo-enhancer","ai-correct-spelling","paypal-payment-buttons","image-studio","zoom-scheduler"],"beta":["google-docs-embed","recipe","v6-video-frame-poster","videopress/video-chapters","ai-assistant-backend-prompts","ai-list-to-table-transform"],"experimental":[],"no-post-editor":["ai-assistant","business-hours","button","calendly","contact-form","contact-info","donations","eventbrite","gif","google-calendar","instagram-gallery","mailchimp","map","markdown","opentable","pinterest","rating-star","related-posts","repeat-visitor","simple-payments","slideshow","tiled-gallery","tock","videopress","voice-to-content","wordads","zoom-scheduler"]}')}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return r[e](s,s.exports,o),s.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var s=Object.create(null);o.r(s);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&r;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,o.d(s,i),s},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),o(72398),o(61351),o(14990),o(45878),o(60312),o(25907),o(46197),o(34590),o(55734),o(29280),o(92585),o(97618),o(12742),o(57809),o(71992),o(46010),o(8171),o(97453),o(79238),o(96764),o(25589),o(94881),o(15652),o(72718),o(99398);o(46471)})(); | |