initial
No files matched your search
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 31 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 39 KiB |
|
After Width: | Height: | Size: 135 KiB |
@@ -0,0 +1,2 @@
|
||||
declare module '*.png';
|
||||
declare module '*.webp';
|
||||
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 28 KiB |
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'jetpack-shared-stores', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url', 'wp-warning'), 'version' => 'e3ea52410693225343f6');
|
||||
@@ -0,0 +1 @@
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}:where(._fUXxnSp5pagKBp9gSN7) *{box-sizing:border-box}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var(--spacing-base)*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var(--spacing-base)*0);margin-right:calc(var(--spacing-base)*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var(--spacing-base)*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var(--spacing-base)*0)}.S8EwaXk1kyPizt6x4WH2{margin-right:calc(var(--spacing-base)*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var(--spacing-base)*0)}.cphJ8dCpfimnky7P2FHg{margin-left:calc(var(--spacing-base)*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var(--spacing-base)*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var(--spacing-base)*1);margin-right:calc(var(--spacing-base)*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var(--spacing-base)*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var(--spacing-base)*1)}.CQSkybjq2TcRM1Xo9COV{margin-right:calc(var(--spacing-base)*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var(--spacing-base)*1)}.I8MxZQYTbuu595yfesWA{margin-left:calc(var(--spacing-base)*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var(--spacing-base)*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var(--spacing-base)*2);margin-right:calc(var(--spacing-base)*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var(--spacing-base)*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var(--spacing-base)*2)}.YNZmHOuRo6hU7zzKfPdP{margin-right:calc(var(--spacing-base)*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var(--spacing-base)*2)}.ftsYE5J9hLzquQ0tA5dY{margin-left:calc(var(--spacing-base)*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var(--spacing-base)*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var(--spacing-base)*3);margin-right:calc(var(--spacing-base)*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var(--spacing-base)*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var(--spacing-base)*3)}.zSX59ziEaEWGjnpZa4uV{margin-right:calc(var(--spacing-base)*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var(--spacing-base)*3)}.UKtHPJnI2cXBWtPDm5hM{margin-left:calc(var(--spacing-base)*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var(--spacing-base)*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var(--spacing-base)*4);margin-right:calc(var(--spacing-base)*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var(--spacing-base)*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var(--spacing-base)*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-right:calc(var(--spacing-base)*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var(--spacing-base)*4)}.XXv4kDTGvEnQeuGKOPU3{margin-left:calc(var(--spacing-base)*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var(--spacing-base)*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var(--spacing-base)*5);margin-right:calc(var(--spacing-base)*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var(--spacing-base)*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var(--spacing-base)*5)}.g9emeCkuHvYhveiJbfXO{margin-right:calc(var(--spacing-base)*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var(--spacing-base)*5)}.r3yQECDQ9qX0XZzXlVAg{margin-left:calc(var(--spacing-base)*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var(--spacing-base)*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var(--spacing-base)*6);margin-right:calc(var(--spacing-base)*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var(--spacing-base)*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var(--spacing-base)*6)}.yIOniNe5E40C8fWvBm5V{margin-right:calc(var(--spacing-base)*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var(--spacing-base)*6)}.Nm_TyFkYCMhOoghoToKJ{margin-left:calc(var(--spacing-base)*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var(--spacing-base)*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var(--spacing-base)*7);margin-right:calc(var(--spacing-base)*7)}.fJj8k6gGJDks3cLine truncated
|
||||
@@ -0,0 +1,170 @@
|
||||
/*! For license information please see block-editor-jetpack.js.LICENSE.txt */
|
||||
(()=>{var e,t,n={98137(e,t,n){"use strict";n.d(t,{A:()=>o});var r,i=n(2467);function s(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}r=s.prototype,Object.assign(r,i.EventEmitter.prototype),r.emitChange=function(){this.emit("change")},r.off=r.removeListener,s.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},s.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()},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 o=s},7675(e,t,n){"use strict";n.d(t,{y:()=>a});var r=n(76416),i=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const s="text/event-stream",o="last-event-id";function a(e,t){var{signal:n,headers:a,onopen:l,onmessage:u,onclose:d,onerror:p,openWhenHidden:f,fetch:h}=t,m=i(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((t,i)=>{const g=Object.assign({},a);let v;function b(){v.abort(),document.hidden||j()}g.accept||(g.accept=s),f||document.addEventListener("visibilitychange",b);let w=1e3,x=0;function _(){document.removeEventListener("visibilitychange",b),window.clearTimeout(x),v.abort()}null==n||n.addEventListener("abort",()=>{_(),t()});const y=null!=h?h:window.fetch,k=null!=l?l:c;async function j(){var n;v=new AbortController;try{const n=await y(e,Object.assign(Object.assign({},m),{headers:g,signal:v.signal}));await k(n),await(0,r.q5)(n.body,(0,r.iv)((0,r.VL)(e=>{e?g[o]=e:delete g[o]},e=>{w=e},u))),null==d||d(),_(),t()}catch(e){if(!v.signal.aborted)try{const t=null!==(n=null==p?void 0:p(e))&&void 0!==n?n:w;window.clearTimeout(x),x=window.setTimeout(j,t)}catch(e){_(),i(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,n){"use strict";async function r(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function i(e){let t,n,r,i=!1;return function(s){void 0===t?(t=s,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,s);const o=t.length;let a=0;for(;n<o;){i&&(10===t[n]&&(a=++n),i=!1);let s=-1;for(;n<o&&-1===s;++n)switch(t[n]){case 58:-1===r&&(r=n-a);break;case 13:i=!0;case 10:s=n}if(-1===s)break;e(t.subarray(a,s),r),a=n,r=-1}a===o?t=void 0:0!==a&&(t=t.subarray(a),n-=a)}}function s(e,t,n){let r=o();const i=new TextDecoder;return function(s,a){if(0===s.length)null==n||n(r),r=o();else if(a>0){const n=i.decode(s.subarray(0,a)),o=a+(32===s[a+1]?2:1),c=i.decode(s.subarray(o));switch(n){case"data":r.data=r.data?r.data+"\n"+c:c;break;case"event":r.event=c;break;case"id":e(r.id=c);break;case"retry":const n=parseInt(c,10);isNaN(n)||t(r.retry=n)}}}}function o(){return{data:"",event:"",id:"",retry:void 0}}n.d(t,{VL:()=>s,iv:()=>i,q5:()=>r})},46941(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,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,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")||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.docuLine truncated
|
||||
// Translators: %d is the cost of one image.
|
||||
// Translators: %d is the cost of one image.
|
||||
(0,i.sprintf)(__("Requests needed: <counter>%d</counter>","jetpack-publicize-pkg"),n),{counter:(0,s.jsx)("span",{})}),c=(0,r.createInterpolateElement)((0,i.sprintf)(
|
||||
// Translators: %d is the current requests balance.
|
||||
__("Requests available: <counter>%d</counter>","jetpack-publicize-pkg"),o),{counter:o<n?(0,s.jsx)("span",{className:"ai-assistant-featured-image__usage-counter-no-limit"}):(0,s.jsx)("strong",{})});return(0,s.jsxs)("div",{className:"ai-assistant-featured-image__usage-counter",children:[(0,s.jsx)("span",{children:a}),(0,s.jsx)("span",{children:c})]})}},89289(e,t,n){"use strict";n(85985),n(56427),n(47143),n(43656),n(86087),n(27723);var r=n(46941),i=n.n(r);n(45817),n(43984),n(72448),n(71508),n(62038),n(96390),n(3620),n(35918),n(10790);i()("jetpack-ai-client:featured-image")},83158(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(85985),i=n(56427),s=n(86087),o=n(27723),a=n(46941),c=n.n(a),l=(n(45817),n(72448)),u=n(71508),d=n(62038),p=n(96390),f=n(3620),h=n(35918),m=n(75988),g=n(10790);const __=o.__,v=c()("jetpack-ai:general-purpose-image");function b({placement:e,onClose:t=()=>{},onSetImage:n=()=>{}}){const[a,c]=(0,s.useState)(!0),b=(0,h.A)(),{getPostContent:w}=(0,u.A)(),{saveToMediaLibrary:x}=(0,d.A)(),{tracks:_}=(0,r.st)(),{recordEvent:y}=_,[k,j]=(0,s.useState)(""),{requireUpgrade:C,requestsCount:A,requestsLimit:S,currentTier:E,costs:N}=(0,l.A)(),z=(0,r.Bd)(E),I=N?.[m.yP]?.activeModel??10,T=I===N?.[m.yP]?.stableDiffusion?m.Dk:m.bb,M=z===r.Ti,D=S-A<I,{current:R,setCurrent:P,processImageGeneration:F,handlePreviousImage:L,handleNextImage:O,currentImage:B,currentPointer:V,images:q,pointer:U,imageStyles:H,guessStyle:$}=(0,f.A)({cost:I,autoStart:!1,type:"general-image-generation",feature:m.yP}),W=k.length>=3,G=D||V?.generating||C,Z=G||!W,J=(0,s.useCallback)(()=>{c(!1),t?.()},[t]),K=(0,s.useCallback)(async({userPrompt:t,style:n})=>{v("handleGenerate",t,n),y("jetpack_ai_general_image_generation_generate_image",{placement:e,model:T,site_type:b,style:n}),F({userPrompt:t,postContent:w(),notEnoughRequests:D,style:n}).catch(t=>{y("jetpack_ai_general_image_generation_error",{placement:e,error:t?.message,model:T,site_type:b,style:n})})},[y,e,T,b,F,w,D]),Y=(0,s.useCallback)(({userPrompt:t,style:n})=>{v("handleRegenerate",t),y("jetpack_ai_general_image_generation_generate_another_image",{placement:e,model:T,site_type:b,style:n}),P(e=>e+1),F({userPrompt:t,postContent:w(),notEnoughRequests:D,style:n}).catch(t=>{y("jetpack_ai_general_image_generation_error",{placement:e,error:t?.message,model:T,site_type:b})})},[y,e,T,b,F,w,D,P]),X=(0,s.useCallback)(({userPrompt:t,style:n})=>{v("handleTryAgain",t),y("jetpack_ai_general_image_generation_try_again",{placement:e,model:T,site_type:b,style:n}),F({userPrompt:t,postContent:w(),notEnoughRequests:D,style:n}).catch(t=>{y("jetpack_ai_general_image_generation_error",{placement:e,error:t?.message,model:T,site_type:b})})},[y,e,T,b,F,w,D]),Q=(0,s.useCallback)(()=>{y("jetpack_ai_general_image_generation_use_image",{placement:e,model:T,site_type:b});const t=({id:e,url:t,mime:r})=>{n?.({id:e,url:t,mime:r}),J()};B?.libraryId?t({id:B?.libraryId,url:B?.libraryUrl,mime:"image/png"}):x(B?.image).then(e=>{t({id:e.id,url:e.url,mime:e.mime})})},[y,e,T,b,B?.libraryId,B?.libraryUrl,B?.image,n,J,x]),ee=__("Generate another image","jetpack-publicize-pkg"),te=__("Generate","jetpack-publicize-pkg"),ne=D?(0,o.sprintf)(
|
||||
// Translators: %d is the cost of generating a featured image.
|
||||
__("Image generation costs %d requests per image. You don't have enough requests to generate another image.","jetpack-publicize-pkg"),I):null,re=(0,g.jsx)(i.Button,{onClick:Q,variant:"primary",disabled:!B?.image||B?.generating,children:__("Insert image","jetpack-publicize-pkg")});return(0,g.jsx)(p.A,{images:q,currentIndex:R,title:__("Generate an image with AI","jetpack-publicize-pkg"),cost:I,open:a,placement:e,onClose:J,onTryAgain:X,onGenerate:U?.current>0?Y:K,generating:V?.generating,notEnoughRequests:D,requireUpgrade:C,upgradeDescription:ne,currentLimit:S,currentUsage:A,isUnlimited:M,hasError:Boolean(V?.error),handlePreviousImage:L,handleNextImage:O,acceptButton:re,generateButtonLabel:U?.current>0?ee:te,instructionsPlaceholder:__("Describe the image you'd like to create and select a style.","jetpack-publicize-pkg"),imageStyles:H,onGuessStyle:$,prompt:k,setPrompt:j,inputDisabled:G,actionDisabled:Z})}},3620(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(47143),i=n(86087),s=n(27723),o=n(93832),a=n(31439),c=n(72448),l=n(62614),u=n(62038),d=n(75988);const __=s.__;function p({feature:e,type:t,cost:n,autoStart:s=!0,previousMediaId:p}){const{generateImageWithParameters:f}=(0,l.Ay)(),{increaseRequestsCount:h,featuresControl:m}=(0,c.A)(),{saveToMediaLibrary:g}=(0,u.A)(),{createNotice:v}=(0,r.useDispatch)("core/notices"),b=(0,i.useRef)(0),[w,x]=(0,i.useState)(0),[_,y]=(0,i.useState)([{generating:s}]),k=e===d.oW?"featured-image":"image",j=m?.[k],C=j?.styles,A=(0,i.useCallback)((e,t)=>{y(n=>{const r=[...n];return r[t]={...r[t],...e},r})},[]),S=(0,r.useSelect)(e=>e("core")?.getEntityRecord?.("postType","attachment",p),[p]);(0,i.useEffect)(()=>{S&&A({image:S.source_url,libraryId:S.id,libraryUrl:S.source_url,generating:!1},b.current)},[S,A]);const E=(0,i.useCallback)(e=>{v("success",e,{type:"snackbar",isDismissible:!0})},[v]),N=(0,i.useCallback)(()=>{h(n)},[h,n]),z=(0,i.useCallback)(e=>{if(!e)return"image.png";const t=e.split(" ").slice(0,10).join(" ");return(0,o.cleanForSlug)(t)+".png"},[]),I=(0,i.useCallback)(({userPrompt:n,postContent:r,notEnoughRequests:i,style:s=null})=>new Promise((o,a)=>{if(p&&0===b.current&&b.current++,A({generating:!0,error:null},b.current),i)return A({generating:!1,error:new Error(__("You don't have enough requests to generate another image.","jetpack-publicize-pkg"))},b.current),void o({});const c=f({feature:e,size:"1792x1024",responseFormat:"b64_json",messages:[{role:"jetpack-ai",context:{type:t,request:n||null,content:r,style:s}}],style:s||""}),l=z(n);c.then(e=>{if(e.data.length>0){const t="data:image/png;base64,"+e.data[0].b64_json,r=n||null,i=e.data[0].revised_prompt||null;A({image:t,prompt:r,revisedPrompt:i},b.current),N(),g(t,l).then(e=>{E(__("Image saved to media library.","jetpack-publicize-pkg")),A({libraryId:e?.id,libraryUrl:e?.url,generating:!1},b.current),b.current+=1,o({image:t,libraryId:e?.id,libraryUrl:e?.url,revisedPrompt:i})}).catch(()=>{A({generating:!1},b.current),b.current+=1,o({image:t})})}}).catch(e=>{A({generating:!1,error:e},b.current),a(e)})}),[A,f,e,t,N,g,E,z,p]),T=(0,i.useCallback)(()=>{x(Math.max(w-1,0))},[w]),M=(0,i.useCallback)(()=>{x(Math.min(w+1,_.length-1))},[w,_.length]),D=(0,i.useCallback)(async function(e,t="",n=""){if(!C||!C.length)return null;const r=[{role:"jetpack-ai",context:{type:t||"general-image-guess-style",request:e,content:n}}];try{const e=await(0,a.A)(r,{feature:"jetpack-ai-image-generator"});if(!e)return null;const t=C.find(({value:t})=>t===e);return t?t.value:null}catch(e){Promise.reject(e)}},[C]);return{current:w,setCurrent:x,processImageGeneration:I,handlePreviousImage:T,handleNextImage:M,currentImage:_[w],currentPointer:_[b.current],images:_,pointer:b,imageStyles:C,guessStyle:D}}},35918(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(97999),i=n(86087);function s(){const[e]=(0,i.useState)((0,r.isWoASite)()?"atomic":(0,r.isSimpleSite)()?"simple":"jetpack");return e}},77089(e,t,n){"use strict";n.d(t,{OE:()=>r.A});n(89289);var r=n(83158)},75988(e,t,n){"use strict";n.d(t,{Dk:()=>s,bb:()=>o,oW:()=>r,yP:()=>i});const r="featured-post-image",i="general-image",s="stable-diffusion",o="dall-e-3"},46381(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),i=n(86087),s=n(27723),o=n(13109),a=n(28847),c=(n(28151),n(10790));const __=s.__;function l({onGuidelinesClick:e,onFeedbackClick:t}){const n=(0,i.useCallback)(()=>{e?.()},[e]),s=(0,i.useCallback)(()=>{t?.()},[t]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"ai-image-modal__footer-disclaimer",children:[(0,c.jsx)(o.A,{icon:a.A}),(0,c.jsx)("span",{children:__("Generated images could be inaccurate, biased or include text.","jetpack-publicize-pkg")}),(0,c.jsx)(r.Button,{variant:"link",className:"ai-image-modal__guidelines-button",href:"https://jetpack.com/redirect/?source=ai-guidelines",target:"_blank",onClick:n,children:(0,c.jsxs)("span",{children:[__("Guidelines","jetpack-publicize-pkg")," ↗"]})})]}),(0,c.jsx)(r.Button,{variant:"link",className:"ai-image-modal__feedback-button",href:"htLine truncated
|
||||
// Translators: %s is the date when the requests will reset.
|
||||
const n=__("Requests will reset on %s.","jetpack-publicize-pkg");return`${t} ${(0,c.sprintf)(n,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,h.jsx)("a",{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",target:"_blank",rel:"noreferrer"}),span:(0,h.jsx)("span",{})})})();return"muted"===e?(0,h.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,h.jsx)(o.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null},v=e=>{const{upgradeType:t,currentTier:n}=(0,p.A)();return 1===n?.value?(0,h.jsx)(g,{}):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{const n=t?f.U:s.cb,r=(0,a.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack-publicize-pkg"),{strong:(0,h.jsx)("strong",{})});return(0,h.jsx)(n,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||r,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:n=!1})=>{const o=n?f.U:s.cb,{checkoutUrl:l}=(0,d.A)(),u=(0,i.CP)(),{nextTier:g,tierPlansEnabled:v,currentTier:b,requestsCount:w}=(0,p.A)(),{tracks:x}=(0,i.st)(),_=(0,a.useCallback)(()=>{m("upgrade",e),x.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:b?.slug,requests_count:w,placement:e})},[b,w,x,e]),y=(0,a.useCallback)(()=>{m("contact us",e),x.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})},[x,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-publicize-pkg"),{strong:(0,h.jsx)("strong",{})});return(0,h.jsx)(o,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:t||e,visible:!0,align:null,title:null,context:null})}if(v){if(!g){const e=(0,r.A)("jetpack-ai-tiers-more-requests-contact"),n=__("You have reached the request limit for your current plan.","jetpack-publicize-pkg");return(0,h.jsx)(o,{buttonText:__("Contact Us","jetpack-publicize-pkg"),description:t||n,className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:y,target:"_blank"})}const e=(0,a.createInterpolateElement)((0,c.sprintf)(/* Translators: %d: the number of requests allowed */
|
||||
__("You have reached the requests limit for your current plan. <strong>Upgrade now to increase your requests limit to %d.</strong>","jetpack-publicize-pkg"),g.limit),{strong:(0,h.jsx)("strong",{})});return(0,h.jsx)(o,{buttonText:(0,c.sprintf)(/* Translators: %d: the number of requests */
|
||||
__("Upgrade to %d requests","jetpack-publicize-pkg"),g.limit),checkoutUrl:l,className:"jetpack-ai-upgrade-banner",description:t||e,goToCheckoutPage:_,visible:!0,align:"center",title:null,context:null,target:"_blank"})}return(0,h.jsx)(o,{buttonText:__("Upgrade","jetpack-publicize-pkg"),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-publicize-pkg"),{strong:(0,h.jsx)("strong",{})}),goToCheckoutPage:_,visible:!0,align:null,title:null,context:null,target:"_blank"})})(e)}},71567(e,t,n){"use strict";n.d(t,{U:()=>o});var r=n(56427),i=n(27723),s=(n(92051),n(10790));const __=i.__,o=({title:e,description:t,buttonText:n=null,checkoutUrl:i=null,goToCheckoutPage:o=null,isRedirecting:a=!1,showButton:c=!0,target:l="_top"})=>{const u=__("Redirecting…","jetpack-publicize-pkg");return(0,s.jsx)("div",{className:"jetpack-upgrade-plan-banner-light",children:(0,s.jsx)(r.Notice,{status:"error",isDismissible:!1,children:(0,s.jsxs)("p",{children:[e&&(0,s.jsx)("strong",{children:e}),t," ",c&&(0,s.jsx)(r.Button,{href:a?null:i,onClick:o,variant:"link",target:l,children:(0,s.jsx)("span",{children:a?u:n})})]})})})}},43984(e,t,n){"use strict";var r=n(27723);const __=r.__;__("English","jetpack-publicize-pkg"),__("Spanish","jetpack-publicize-pkg"),__("French","jetpack-publicize-pkg"),__("German","jetpack-publicize-pkg"),__("Italian","jetpack-publicize-pkg"),__("Portuguese","jetpack-publicize-pkg"),__("Russian","jetpack-publicize-pkg"),__("Chinese","jetpack-publicize-pkg"),__("Japanese","jetpack-publicize-pkg"),__("Arabic","jetpack-publicize-pkg"),__("Hindi","jetpack-publicize-pkg"),__("Korean","jetpack-publicize-pkg"),__("Formal","jetpack-publicize-pkg"),__("Informal","jetpack-publicize-pkg"),__("Optimistic","jetpack-publicize-pkg"),__("Humorous","jetpack-publicize-pkg"),__("Serious","jetpack-publicize-pkg"),__("Skeptical","jetpack-publicize-pkg"),__("Empathetic","jetpack-publicize-pkg"),__("Confident","jetpack-publicize-pkg"),__("Passionate","jetpack-publicize-pkg"),__("Provocative","jetpack-publicize-pkg"),__("Translate","jetpack-publicize-pkg"),__("Change tone","jetpack-publicize-pkg"),__("Correct spelling and grammar","jetpack-publicize-pkg"),__("Simplify","jetpack-publicize-pkg"),__("Summarize","jetpack-publicize-pkg"),__("Make shorter","jetpack-publicize-pkg"),__("Expand","jetpack-publicize-pkg"),__("Turn list into a table","jetpack-publicize-pkg"),__("Write a post from this list","jetpack-publicize-pkg"),__("Generate a post title","jetpack-publicize-pkg"),__("Summary based on title","jetpack-publicize-pkg"),__("Continue writing","jetpack-publicize-pkg")},2166(e,t,n){"use strict";n.d(t,{R:()=>o});var r=n(51609),i=n(10790);const s=(0,r.createContext)({}),o=({value:e,children:t})=>(0,i.jsx)(s.Provider,{value:e,children:t})},13965(e,t,n){"use strict";n.d(t,{Rb:()=>r.R});var r=n(2166);n(59886),n(53471)},53471(e,t,n){"use strict";n(51609),n(78836),n(13965)},59886(e,t,n){"use strict";var r=n(29491),i=n(86087),s=n(46219),o=n(13965),a=n(10790);(0,r.createHigherOrderComponent)(e=>t=>{const{suggestion:n,error:r,requestingState:c,request:l,stopSuggestion:u,eventSource:d}=(0,s.Ay)(),p=(0,i.useMemo)(()=>({suggestion:n,requestingError:r,requestingState:c,eventSource:d,requestSuggestion:l,stopSuggestion:u}),[n,r,c,d,l,u]);return(0,a.jsx)(o.Rb,{value:p,children:(0,a.jsx)(e,{...t})})},"withAiDataProvider")},42694(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(3924),i=n(97999),s=n(85985),o=n(72448);function a(){const{nextTier:e,tierPlansEnabled:t}=(0,o.A)(),n=(()=>{const e=new URLSearchParams(window.location.search),t=(0,s.GE)();return(0,i.isSimpleSite)()&&e.has("post")?`https://wordpress.com/post/${t}/${e.get("post")}`:`https://wordpress.com/home/${t}`})(),a=(0,r.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(n)}`}),c=(0,r.A)("jetpack-ai-upgrade-url-for-jetpack-sites",{site:(0,s.GE)(),path:"jetpack_ai_yearly"}),l=(0,i.isWpcomPlatformSite)()?a:c,{autosaveAndRedirect:u,isRedirecting:d}=(0,s.ZR)(l);return{checkoutUrl:l,autosaveAndRedirect:u,isRedirecting:d}}},72448(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(85985),i=n(47143),s=n(86087);function o(){const e=(0,i.useSelect)(e=>e("wordpress-com/plans").getAiAssistantFeature(),[]),t=(0,i.useSelect)(e=>e("wordpress-com/plans").getIsRequestingAiAssistantFeature(),[]),{fetchAiAssistantFeature:n,increaseAiAssistantRequestsCount:o,dequeueAiAssistantFeatureAsyncRequest:a}=(0,i.useDispatch)("wordpress-com/plans");return(0,s.useMemo)(()=>{const i=(0,r.Bd)(e?.currentTier),s=e?.currentTier?.limit||e?.requestsLimit,c=i===r._X?e?.requestsCount:e?.usagePeriod?.requestsCount,l=i===r._X?e?.requestsLimit:s;return{...e,requestsCount:c,requestsLimit:l,loading:t,error:null,refresh:n,increaseRequestsCount:o,dequeueAsyncRequest:a}Line truncated
|
||||
__("(opens in a new tab)","jetpack-publicize-pkg")})]}),C=v?"_blank":void 0,A=n?.[0]&&null!==n[0]&&"components-tooltip"!==n?.[0]?.props?.className,S={ref:t,target:C,variant:i,className:(0,a.A)(y,{"has-text":!!p&&A}),icon:v?void 0:p,iconSize:f,disabled:h,"aria-disabled":h,isDestructive:m,text:w,..._};return(0,u.jsxs)(r.Button,{...S,children:[g&&(0,u.jsx)(r.Spinner,{}),(0,u.jsx)("span",{children:n}),j]})});d.displayName="Button";const p=d},69222(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(29491),i=n(86087),s=n(27723),o=n(51112),a=n(78478),c=n(10790);const __=s.__,l=({buttonStyle:e="icon",textToCopy:t,onCopy:n,...s})=>{const[l,u]=(0,i.useState)(!1),d=(0,i.useRef)(),p=(0,r.useCopyToClipboard)(t,()=>{d.current&&clearTimeout(d.current),u(!0),n?.(),d.current=setTimeout(()=>{u(!1),d.current=void 0},3e3)});(0,i.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);let f=null,h=null;"text"!==e&&(f=l?(0,c.jsx)(a.Nr,{}):(0,c.jsx)(a.ui,{}));const m=__("Copy to clipboard","jetpack-publicize-pkg");return"icon"!==e&&(h=l?__("Copied!","jetpack-publicize-pkg"):m),(0,c.jsx)(o.A,{"aria-label":m,icon:f,children:h,ref:p,...s})}},63406(e,t,n){"use strict";n.d(t,{I:()=>s});var r=n(47143),i=n(692);function s(){const e=(0,r.useDispatch)(i.store),t=(0,r.useSelect)(e=>e(i.store).getNotices(),[]);return{...e,createNotice:(t,n,r)=>e.createNotice(t,n,{type:"snackbar",...r}),createErrorNotice:(t,n)=>e.createErrorNotice(t,{type:"snackbar",...n}),createInfoNotice:(t,n)=>e.createInfoNotice(t,{type:"snackbar",...n}),createSuccessNotice:(t,n)=>e.createSuccessNotice(t,{type:"snackbar",...n}),createWarningNotice:(t,n)=>e.createWarningNotice(t,{type:"snackbar",...n}),getNotices:()=>t}}},40597(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(56427),i=n(13109),s=n(28847),o=n(13022),a=n(51609),c=n(51112),l=(n(77191),n(10790));const u=e=>({"top-end":"top left",top:"top center","top-start":"top right","bottom-end":"bottom left",bottom:"bottom center","bottom-start":"bottom right"}[e]),d=({className:e="",iconClassName:t="",placement:n="bottom-end",animate:d=!0,iconCode:p=s.A,iconSize:f=18,offset:h=10,title:m,children:g,popoverAnchorStyle:v="icon",forceShow:b=!1,hoverShow:w=!1,wide:x=!1,inline:_=!0,shift:y=!1})=>{const[k,j]=(0,a.useState)(!1),[C,A]=(0,a.useState)(null),S=(0,a.useCallback)(()=>j(!1),[j]),E=(0,a.useCallback)(e=>{e.preventDefault(),j(!k)},[k,j]),N={position:u(n),placement:n,animate:d,noArrow:!1,resize:!1,flip:!1,offset:h,focusOnMount:"firstElement",onClose:S,className:"icon-tooltip-container",inline:_,shift:y},z="wrapper"===v,I=(0,o.A)("icon-tooltip-wrapper",e),T={left:z?0:-(62-f/2)+"px"},M=z&&b,D=(0,a.useCallback)(()=>{w&&(C&&(clearTimeout(C),A(null)),j(!0))},[w,C]),R=(0,a.useCallback)(()=>{if(w){const e=setTimeout(()=>{j(!1),A(null)},100);A(e)}},[w]);return(0,l.jsxs)("div",{className:I,"data-testid":"icon-tooltip_wrapper",onMouseEnter:D,onMouseLeave:R,children:[!z&&(0,l.jsx)(c.A,{variant:"link",onMouseDown:E,children:(0,l.jsx)(i.A,{className:t,icon:p,size:f})}),(0,l.jsx)("div",{className:(0,o.A)("icon-tooltip-helper",{"is-wide":x}),style:T,children:(M||k)&&(0,l.jsx)(r.Popover,{...N,children:(0,l.jsxs)("div",{children:[m&&(0,l.jsx)("div",{className:"icon-tooltip-title",children:m}),(0,l.jsx)("div",{className:"icon-tooltip-content",children:g})]})})})]})}},78478(e,t,n){"use strict";n.d(t,{M5:()=>d,Nr:()=>l,ui:()=>u});var r=n(56427),i=n(13022),s=n(84705),o=n(67400),a=n(10790);const c=({className:e,size:t=24,viewBox:n="0 0 24 24",opacity:s=1,color:c="#2C3338",children:l})=>{const u={className:(0,i.A)(o.A.iconWrapper,e),width:t,height:t,viewBox:n,opacity:s,fill:void 0};return c&&(u.fill=c),(0,a.jsx)(r.SVG,{...u,fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.G,{opacity:s,children:l})})},l=({size:e,className:t=o.A["checkmark-icon"],color:n})=>(0,a.jsx)(c,{className:t,size:e,color:n,children:(0,a.jsx)(r.Path,{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})}),u=({size:e,className:t=o.A["clipboard-icon"],color:n})=>(0,a.jsx)(c,{className:t,size:e,color:n,children:(0,a.jsx)(r.Path,{d:"M5.625 5.5H15.375C15.444 5.5 15.5 5.55596 15.5 5.625V15.375C15.5 15.444 15.444 15.5 15.375 15.5H5.625C5.55596 15.5 5.5 15.444 5.5 15.375V5.625C5.5 5.55596 5.55596 5.5 5.625 5.5ZM4 5.625C4 4.72754 4.72754 4 5.625 4H15.375C16.2725 4 17 4.72754 17 5.625V10V15.375C17 16.2725 16.2725 17 15.375 17C15.375 17 6.52246 17 5.625 17C4.72754 17 4 16.2725 4 15.375V5.625ZM18.5 17.2812V8.28125H20V17.2812C20 18.7995 18.7704 20 17.2511 20H6.25V18.5H17.2511C17.9409 18.5 18.5 17.9721 18.5 17.2812Z"})});const d=({serviceName:e,className:t,iconSize:n})=>(0,a.jsx)(s.d6,{className:(0,i.A)(o.A.socialIcon,o.A[e],t),icon:e,size:n||24})},67142(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(27723),i=n(13022),s=n(10790);const __=r.__,o=({logoColor:e="#069e08",showText:t=!0,className:n,height:r=32,title:o,...a})=>{constLine truncated
|
||||
// translators: Default description for a Facebook post
|
||||
__("Visit the post for more.","jetpack-publicize-pkg")]}),(0,f.jsx)("div",{className:"facebook-preview__info",children:(0,f.jsx)(p.A,{name:"info"})})]})})]})]}),(0,f.jsx)(u.A,{})]})}},66603(e,t,n){"use strict";n.d(t,{h:()=>l});var r=n(33853),i=n(30759),s=n(87446),o=n(44381),a=n(24795),c=(n(85708),n(10790));const l=({url:e,user:t,customText:n,media:l,imageMode:u})=>{const[d]=(0,s.A)({mode:u}),p="is-"+(d===r.q8?"portrait":"landscape");return(0,c.jsxs)("div",{className:"facebook-preview__post",children:[(0,c.jsx)(a.A,{user:t}),(0,c.jsxs)("div",{className:"facebook-preview__content",children:[n&&(0,c.jsx)(i.A,{text:n,url:e}),(0,c.jsx)("div",{className:"facebook-preview__body",children:l?(0,c.jsx)("div",{className:`facebook-preview__media ${p}`,children:l.map((e,t)=>(0,c.jsx)("div",{className:`facebook-preview__media-item ${p}`,children:e.type.startsWith("video/")?(0,c.jsx)("video",{controls:!0,children:(0,c.jsx)("source",{src:e.url,type:e.type})}):(0,c.jsx)("img",{alt:e.alt||"",src:e.url})},`facebook-preview__media-item-${t}`))}):null})]}),(0,c.jsx)(o.A,{})]})}},44381(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(27723),i=n(76333),s=(n(12948),n(10790));const __=r.__,o=()=>(0,s.jsx)("ul",{className:"facebook-preview__post-actions",children:[{icon:"like",
|
||||
// translators: Facebook "Like" action
|
||||
label:__("Like","jetpack-publicize-pkg")},{icon:"comment",
|
||||
// translators: Facebook "Comment" action
|
||||
label:__("Comment","jetpack-publicize-pkg")},{icon:"share",
|
||||
// translators: Facebook "Share" action
|
||||
label:__("Share","jetpack-publicize-pkg")}].map(({icon:e,label:t})=>(0,s.jsxs)("li",{children:[(0,s.jsx)(i.A,{name:e}),(0,s.jsx)("span",{children:t})]},e))})},24795(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(27723),i=n(50513),s=n(76333),o=(n(97498),n(10790));const __=r.__,_x=r._x,a=({user:e,timeElapsed:t,hideOptions:n})=>(0,o.jsxs)("div",{className:"facebook-preview__post-header",children:[(0,o.jsxs)("div",{className:"facebook-preview__post-header-content",children:[(0,o.jsx)(i._,{className:"facebook-preview__post-header-avatar",src:e?.avatarUrl}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"facebook-preview__post-header-name",children:e?.displayName||
|
||||
// translators: name of a fictional Facebook User
|
||||
__("Anonymous User","jetpack-publicize-pkg")}),(0,o.jsxs)("div",{className:"facebook-preview__post-header-share",children:[(0,o.jsx)("span",{className:"facebook-preview__post-header-time",children:t?__(
|
||||
// translators: short version of `1 hour`
|
||||
"1h","jetpack-publicize-pkg"):_x(
|
||||
// translators: temporal indication of when a post was published
|
||||
"Just now","","jetpack-publicize-pkg")}),(0,o.jsx)("span",{className:"facebook-preview__post-header-dot","aria-hidden":"true",children:"·"}),(0,o.jsx)(s.A,{name:"public"})]})]})]}),!n&&(0,o.jsx)("div",{className:"facebook-preview__post-header-more"})]})},76333(e,t,n){"use strict";n.d(t,{A:()=>i});n(18703);var r=n(10790);const i=({name:e})=>(0,r.jsx)("i",{className:`facebook-preview__post-icon facebook-preview__post-icon-${e}`})},54560(e,t,n){"use strict";n.d(t,{m:()=>u});var r=n(76223),i=n(92917),s=(n(97880),n(10790));const o=160,a=e=>{const t=e.startsWith("https://")?"https://":"http://",n=t+e.replace(t,"").split("/").join(" › ");return(0,r.RA)((0,r.f5)(68),(0,r.ZT)(68))(n)},c=(0,r.RA)((0,r.f5)(63),(0,r.y5)(23,73),(0,r.ZT)(63)),l=(0,r.RA)((0,r.f5)(o),(0,r.y5)(80,170),(0,r.ZT)(o)),u=({description:e="",siteIcon:t,siteTitle:n,title:o="",url:u=""})=>{const d=(0,r.GA)(u);return(0,s.jsx)("div",{className:"search-preview",children:(0,s.jsxs)("div",{className:"search-preview__display",children:[(0,s.jsxs)("div",{className:"search-preview__header",children:[(0,s.jsxs)("div",{className:"search-preview__branding",children:[(0,s.jsx)(i.F,{className:"search-preview__icon",src:t}),(0,s.jsxs)("div",{className:"search-preview__site",children:[(0,s.jsx)("div",{className:"search-preview__site--title",children:n||d}),(0,s.jsx)("div",{className:"search-preview__url",children:a(u)})]})]}),(0,s.jsx)("div",{className:"search-preview__menu",children:(0,s.jsx)("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})})})]}),(0,s.jsx)("div",{className:"search-preview__title",children:c(o)}),(0,s.jsx)("div",{className:"search-preview__description",children:l((0,r.$J)(e))})]})})}},76223(e,t,n){"use strict";n.d(t,{$J:()=>p,GA:()=>o,RA:()=>d,TR:()=>b,X2:()=>f,ZT:()=>u,f5:()=>c,hV:()=>v,p1:()=>_,tX:()=>m,ti:()=>h,vI:()=>g,x5:()=>k,y5:()=>l});var r=n(86087),i=n(27723),s=n(10790);const o=e=>{const t=e.replace(/^[^/]+:\/\//,""),n=t.indexOf("/");return-1===n?t:t.substring(0,n)},a=e=>Array.from(e).length,c=e=>t=>a(t)<=e&&t,l=(e,t)=>n=>{const r=n.slice(0,t),i=r.lastIndexOf(" ");return i>e&&i<t&&r.slice(0,i).concat("…")},u=e=>t=>{return(n=t,r=0,i=e,Array.from(n).slice(r,i).join("")).concat("…");var n,r,i},d=(...e)=>t=>e.find(e=>!1!==e(t))?.(t),p=(e,t=[])=>{const n=new RegExp(`(<([^${t.join("")}>]+)>)`,"gi");return e?e.replace(n,""):""},f=e=>p(e).substring(0,50),h=(e,t)=>new RegExp(`<${t}[^>]*>`,"gi").test(e),m=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short"}).format,g=new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"2-digit",year:"numeric"}).format,v=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format,b=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format,w=e=>e.replace(/\s+/g," ").trim(),x=(e,t)=>{let n=0;for(let r=e.indexOf(t);-1!==r;r=e.indexOf(t,r+1))n++;return n};function _(e){if(!e)return[];const t=document.implementation.createHTMLDocument("");t.body.innerHTML=e;const n=[];for(const e of Array.from(t.body.querySelectorAll("a[href]"))){const r=e.getAttribute("href")??"",i=w(e.textContent??"");if(!/^https?:\/\//i.test(r)||""===i||i===r)continue;const s=t.createRange();s.selectNodeContents(t.body),s.setEndBefore(e);const o=x(w(s.toString()),i);n.push({text:i,href:r,occurrence:o})}return n}const y={twitter:"https://twitter.com/hashtag/%1$s",facebook:"https://www.facebook.com/hashtag/%1$s",linkedin:"https://www.linkedin.com/feed/hashtag/?keywords=%1$s",instagram:"https://www.instagram.com/explore/tags/%1$s",mastodon:"https://%2$s/tags/%1$s",nextdoor:"https://nextdoor.com/hashtag/%1$s",threads:"https://www.threads.net/search?q=%1$s&serp_type=tags",tumblr:"https://www.tumblr.com/tagged/%1$s",bluesky:"https://bsky.app/hashtag/%1$s"};function k(e,t){const{platform:n,maxChars:o,maxLines:c,hyperlinkHashtags:l=!0,hyperlinkUrls:d="instagram"!==n,hyperlinks:f}=t;let h=p(e);if(h=h.replaceAll(/(?:\s*[\n\r]){2,}/g,"\n\n"),o&&a(h)>o&&(h=u(o)(h)),c){const e=h.split("\n");e.length>c&&(h=e.slice(0,c).join("\n"))}const m={};if(d){(h.match(/(https?:\/\/\S+)/g)||[]).forEach((e,t)=>{m[`Link${t}`]=(0,s.jsx)("a",{href:e,rel:"noopener noreferrer",target:"_blank",children:e}),h=h.replace(e,`<Link${t} />`)})}if(l&&y[n]){const e=h.matchAll(/(^|\s)#(\w+)/g),r=y[n];[...e].forEach(([e,n,o],a)=>{const c=(0,i.sprintf)(r,o,t.hashtagDomain);m[`Hashtag${a}`]=(0,s.jsx)("a",{href:c,rel:"noopener noreferrer",target:"_blank",children:`#${o}`}),h=h.replace(e,`${n}<Hashtag${a} />`)})}if(f?.length){const e=[];f.forEach(({text:t,href:n,occurrence:r=0},i)=>{if(!t)return;const s=((e,t,n)=>{let r=e.indexOf(t);for(;-1!==r&&n>0;)n--,r=e.indexOf(t,r+1);return r})(h,t,r);if(-1===s)return;e.some(e=>s<e.pos+e.text.length&&e.pos<s+t.length)||e.push({pos:s,text:t,href:n,index:i})}),e.sort((e,t)=>t.pos-e.pos);for(const{posLine truncated
|
||||
// translators: refers to the actor level of the post being shared, e.g. "1st", "2nd", "3rd", etc.
|
||||
__("1st","jetpack-publicize-pkg")})]}),u?(0,l.jsx)("div",{className:"linkedin-preview__header--profile-title",children:u}):null,(0,l.jsxs)("div",{className:"linkedin-preview__header--profile-meta",children:[(0,l.jsx)("span",{children:
|
||||
// translators: refers to the time since the post was published, e.g. "1h"
|
||||
__("1h","jetpack-publicize-pkg")}),(0,l.jsx)("span",{children:"•"}),(0,l.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",focusable:"false",children:(0,l.jsx)("path",{d:"M8 1a7 7 0 107 7 7 7 0 00-7-7zM3 8a5 5 0 011-3l.55.55A1.5 1.5 0 015 6.62v1.07a.75.75 0 00.22.53l.56.56a.75.75 0 00.53.22H7v.69a.75.75 0 00.22.53l.56.56a.75.75 0 01.22.53V13a5 5 0 01-5-5zm6.24 4.83l2-2.46a.75.75 0 00.09-.8l-.58-1.16A.76.76 0 0010 8H7v-.19a.51.51 0 01.28-.45l.38-.19a.74.74 0 01.68 0L9 7.5l.38-.7a1 1 0 00.12-.48v-.85a.78.78 0 01.21-.53l1.07-1.09a5 5 0 01-1.54 9z"})})]})]})]}),(0,l.jsxs)("div",{className:"linkedin-preview__content",children:[f?(0,l.jsxs)("div",{className:"linkedin-preview__caption",children:[(0,l.jsx)("span",{children:(0,l.jsx)(o.MW,{text:f,children:e=>(0,s.x5)(e,{platform:"linkedin",maxChars:c.v})})}),v&&g&&!f.includes(g)&&(0,l.jsxs)(l.Fragment,{children:[" - ",(0,l.jsx)("a",{href:g,rel:"nofollow noopener noreferrer",target:"_blank",children:g})]})]}):null,v?(0,l.jsx)("div",{className:"linkedin-preview__media",children:h.map((e,t)=>(0,l.jsx)("div",{className:"linkedin-preview__media-item",children:e.type.startsWith("video/")?(0,l.jsx)("video",{controls:!0,children:(0,l.jsx)("source",{src:e.url,type:e.type})}):(0,l.jsx)("img",{alt:e.alt||"",src:e.url})},`linkedin-preview__media-item-${t}`))}):(0,l.jsxs)("article",{children:[t?(0,l.jsx)(a.Q,{className:"linkedin-preview__image",src:t,alt:"",focalPoint:n}):null,g?(0,l.jsxs)("div",{className:"linkedin-preview__description",children:[(0,l.jsx)("h2",{className:"linkedin-preview__description--title",children:m||(0,s.X2)(f)}),(0,l.jsxs)("div",{className:"linkedin-preview__description--meta",children:[(0,l.jsx)("span",{className:"linkedin-preview__description--url",children:(0,s.GA)(g)}),(0,l.jsx)("span",{children:"•"}),(0,l.jsx)("span",{children:(0,r.sprintf)(
|
||||
// translators: %d is the number of minutes it takes to read the article
|
||||
__("%d min read","jetpack-publicize-pkg"),e)})]})]}):null]})]})]})})}},17562(e,t,n){"use strict";n.d(t,{w:()=>r});const r="mastodon.social"},50710(e,t,n){"use strict";n.d(t,{E6:()=>a,gD:()=>o,w0:()=>c});var r=n(76223),i=n(17562);const s=/^@([^@]*)@([^@]*)$/i,o=e=>(0,r.RA)((0,r.f5)(200),(0,r.ZT)(200))((0,r.$J)(e))||"",a=(e,t)=>{const{instance:n,offset:i}=t;return(0,r.x5)(e,{platform:"mastodon",maxChars:500-i,hashtagDomain:n})},c=e=>{const t=e.match(s);return{username:t?.[1]||"",instance:t?.[2]||i.w}}},5874(e,t,n){"use strict";n.d(t,{i:()=>a});var r=n(74822),i=n(23163),s=n(39490),o=(n(75312),n(10790));const a=e=>{const{user:t}=e;return(0,o.jsxs)("div",{className:"mastodon-preview__post",children:[(0,o.jsx)(s.A,{user:t}),(0,o.jsx)(i.A,{...e,customImage:""}),(0,o.jsx)(r.A,{})]})}},27300(e,t,n){"use strict";n.d(t,{_:()=>l});var r=n(13022),i=n(74822),s=n(30461),o=n(23163),a=n(39490),c=(n(75312),n(10790));const l=e=>{const{user:t,media:n}=e;return(0,c.jsxs)("div",{className:"mastodon-preview__post",children:[(0,c.jsx)(a.A,{user:t}),(0,c.jsx)(s.A,{...e,children:n?.length?(0,c.jsx)("div",{className:(0,r.A)("mastodon-preview__media",{"as-grid":n.length>1}),children:n.map((e,t)=>(0,c.jsx)("div",{className:"mastodon-preview__media-item",children:e.type.startsWith("video/")?(0,c.jsx)("video",{controls:!0,children:(0,c.jsx)("source",{src:e.url,type:e.type})}):(0,c.jsx)("img",{alt:e.alt||"",src:e.url})},`mastodon-preview__media-item-${t}`))}):null}),!n?.length&&e.customText?.includes(e.url)?(0,c.jsx)(o.A,{...e}):null,(0,c.jsx)(i.A,{})]})}},74822(e,t,n){"use strict";n.d(t,{A:()=>i});n(16307);var r=n(10790);const i=()=>(0,r.jsxs)("div",{className:"mastodon-preview__post-actions",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M760-200v-160q0-50-35-85t-85-35H273l144 144-57 56-240-240 240-240 57 56-144 144h367q83 0 141.5 58.5T840-360v160h-80Z"})})," ",(0,r.jsx)("span",{children:0})]}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M280-80 120-240l160-160 56 58-62 62h406v-160h80v240H274l62 62-56 58Zm-80-440v-240h486l-62-62 56-58 160 160-160 160-56-58 62-62H280v160h-80Z"})})}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z"})})}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M200-120v-640q0-33 23.5-56.5T280-840h400q33 0 56.5 23.5T760-760v640L480-240 200-120Zm80-122 200-86 200 86v-518H280v518Zm0-518h400-400Z"})})}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z"})})})]})},30461(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(76223),i=n(28469),s=n(50710),o=(n(88232),n(10790));const a=e=>{const{title:t,description:n,customText:a,user:c,children:l}=e,u={instance:c?.address?(0,s.w0)(c.address).instance:"",offset:0};let d;if(a)d=(0,o.jsx)("p",{children:(0,o.jsx)(i.MW,{text:a,children:e=>(0,s.E6)(e,u)})});else if(n)if(t){const e=(0,r.$J)(t);u.offset=e.length,d=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:e}),(0,o.jsx)("p",{children:(0,o.jsx)(i.MW,{text:n,children:e=>(0,s.E6)(e,u)})})]})}else d=(0,o.jsx)("p",{children:(0,o.jsx)(i.MW,{text:n,children:e=>(0,s.E6)(e,u)})});else d=(0,o.jsx)("p",{children:(0,s.E6)(t,u)});return(0,o.jsxs)("div",{className:"mastodon-preview__body",children:[d,l]})}},23163(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(27723),i=n(13022),s=n(76223),o=n(2909),a=n(50710),c=(n(84422),n(10790));const __=r.__,l=({siteName:e,title:t,description:n,url:r,image:l,customImage:u,imageFocalPoint:d})=>(0,c.jsxs)("div",{className:(0,i.A)("mastodon-preview__card",{"has-image":l}),children:[(0,c.jsx)("div",{className:"mastodon-preview__card-img",children:l||u?(0,c.jsx)(o.Q,{src:l||u,alt:__("Mastodon preview thumbnail","jetpack-publicize-pkg"),focalPoint:d}):(0,c.jsx)("div",{className:"mastodon-preview__card-img--fallback",children:(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,c.jsx)("path",{d:"M320-240h320v-80H320v80Line truncated
|
||||
// translators: username of a fictional Mastodon User
|
||||
__("anonymous-user","jetpack-publicize-pkg")}),(0,c.jsx)("div",{className:"mastodon-preview__post-header-username",children:n?.replace(`@${o.w}`,"")||"@username"})]})]}),(0,c.jsxs)("div",{className:"mastodon-preview__post-header-audience",children:[(0,c.jsx)(a.f,{}),(0,s.TR)(new Date)]})]})}},12625(e,t,n){"use strict";n.d(t,{f:()=>i});var r=n(10790);function i(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"15",viewBox:"0 -960 960 960",width:"15",role:"img",children:(0,r.jsx)("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm-40-82v-78q-33 0-56.5-23.5T360-320v-40L168-552q-3 18-5.5 36t-2.5 36q0 121 79.5 212T440-162Zm276-102q20-22 36-47.5t26.5-53q10.5-27.5 16-56.5t5.5-59q0-98-54.5-179T600-776v16q0 33-23.5 56.5T520-680h-80v80q0 17-11.5 28.5T400-560h-80v80h240q17 0 28.5 11.5T600-440v120h40q26 0 47 15.5t29 40.5Z"})})}},73192(e,t,n){"use strict";n.d(t,{v:()=>r});const r=65e3},28236(e,t,n){"use strict";n.d(t,{$:()=>c});var r=n(27723),i=n(38013),s=n(30073),o=n(78607),a=n(10790);const __=r.__;function c(){return(0,a.jsxs)("div",{className:"nextdoor-preview__footer--actions",children:[(0,a.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,a.jsx)(s.p,{}),(0,a.jsx)("span",{children:__("Like","jetpack-publicize-pkg")})]}),(0,a.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,a.jsx)(i.T,{}),(0,a.jsx)("span",{children:__("Comment","jetpack-publicize-pkg")})]}),(0,a.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,a.jsx)(o.l,{}),(0,a.jsx)("span",{children:__("Share","jetpack-publicize-pkg")})]})]})}},96739(e,t,n){"use strict";n.d(t,{z:()=>i});var r=n(10790);function i(){return(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"#dfe1e4",fillRule:"evenodd",d:"M7.127 13.876a.732.732 0 1 0 1.035 1.035l4.75-4.749a.732.732 0 0 0 0-1.035L8.123 4.34A.732.732 0 0 0 7.09 5.375l4.27 4.27-4.232 4.23Z"})})}},38013(e,t,n){"use strict";n.d(t,{T:()=>i});var r=n(10790);function i(){return(0,r.jsx)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 10.031C2 5.596 5.574 2 10 2h4c4.427 0 8 3.596 8 8.031 0 4.435-3.573 8.031-8 8.031h-1.52a17.033 17.033 0 0 1-1.377 1.467c-.991.938-2.456 2.079-4.086 2.437a1.403 1.403 0 0 1-1.458-.565 1.55 1.55 0 0 1-.195-1.394c.28-.823.395-1.734.434-2.464.014-.257.018-.485.018-.672A8.017 8.017 0 0 1 2 10.031Zm5.798 6.178a7.02 7.02 0 0 1 .016.418c.005.252.004.606-.019 1.023-.03.573-.103 1.285-.266 2.024.775-.377 1.54-.974 2.202-1.598a15.066 15.066 0 0 0 1.448-1.586l.017-.022.003-.004a1 1 0 0 1 .801-.402h2c3.314 0 6-2.692 6-6.03C20 6.691 17.314 4 14 4h-4c-3.314 0-6 2.692-6 6.031 0 2.336 1.32 4.36 3.258 5.359.308.159.515.474.54.82Z",clipRule:"evenodd"})})}},84247(e,t,n){"use strict";n.d(t,{z:()=>i});var r=n(10790);function i(){return(0,r.jsx)("div",{className:"nextdoor-preview__default-image",children:(0,r.jsxs)("svg",{width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",color:"#055c00",children:[(0,r.jsx)("path",{fill:"currentColor",d:"M13.207 5.207c1.51-1.51 4.076-1.51 5.586 0 1.51 1.51 1.51 4.076 0 5.586l-2.1 2.1c-1.51 1.51-4.077 1.51-5.586 0a1 1 0 1 0-1.414 1.414c2.29 2.29 6.123 2.29 8.414 0l2.1-2.1c2.29-2.29 2.29-6.124 0-8.414s-6.124-2.29-8.414 0l-.7.7a1 1 0 0 0 1.414 1.414l.7-.7Z"}),(0,r.jsx)("path",{fill:"currentColor",d:"M7.307 11.107c1.51-1.51 4.076-1.51 5.586 0a1 1 0 0 0 1.414-1.414c-2.29-2.29-6.124-2.29-8.414 0l-2.1 2.1c-2.29 2.29-2.29 6.123 0 8.414 2.29 2.29 6.124 2.29 8.414 0l.7-.7a1 1 0 0 0-1.414-1.414l-.7.7c-1.51 1.51-4.076 1.51-5.586 0-1.51-1.51-1.51-4.076 0-5.586l2.1-2.1Z"})]})})}},10569(e,t,n){"use strict";n.d(t,{f:()=>i});var r=n(10790);function i(){return(0,r.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.495-7.643c.286-.335.46-.357.505-.357.045 0 .219.022.505.357.282.33.581.868.852 1.619.464 1.283.79 3.034.872 5.024H9.771c.082-1.99.408-3.741.871-5.024.272-.751.571-1.289.854-1.62ZM7.77 11c.084-2.181.439-4.171.992-5.704.093-.255.192-.502.298-.738A8.009 8.009 0 0 0 4.062 11h3.707Zm-3.707 2h3.707c.084 2.181.439 4.171.992 5.704.093.255.192.502.298.738A8.009 8.009 0 0 1 4.062 13Zm15.876-2a8.009 8.009 0 0 0-4.997-6.442c.106.236.205.483.298.738.553 1.533.908 3.523.992 5.704h3.707Zm-3.707 2h3.707a8.009 8.009 0 0 1-4.997 6.442c.106-.236.205-.483.298-.738.553-1.533.908-3.523.992-5.704Zm-2.002 0c-.082 1.99-.408 3.741-.871 5.024-.272.751-.571 1.289-.854 1.62-.285.334-.46.356-.504.356-.045 0-.219-.022-.505-.357-.282-.33-.581-.868-.852-1.619-.464-1.283-.79-3.034-.872-5.024h4.458Z",clipRule:"eveLine truncated
|
||||
// translators: "Delete" action on a Tumblr post
|
||||
label:__("Delete","jetpack-publicize-pkg")},{icon:"edit",
|
||||
// translators: "Edit" action on a Tumblr post
|
||||
label:__("Edit","jetpack-publicize-pkg")}].map(({icon:e,label:t})=>(0,s.jsx)("li",{"aria-label":t,children:(0,s.jsx)(i.A,{name:e})},e))})]}),(0,s.jsxs)("div",{className:"tumblr-preview__post-social-actions",children:[(0,s.jsx)("div",{children:
|
||||
// translators: count of notes on a Tumblr post
|
||||
__("0 notes","jetpack-publicize-pkg")}),(0,s.jsx)("ul",{children:[{icon:"share",
|
||||
// translators: "Share" action on a Tumblr post
|
||||
label:__("Share","jetpack-publicize-pkg")},{icon:"reply",
|
||||
// translators: "Reply" action on a Tumblr post
|
||||
label:__("Reply","jetpack-publicize-pkg")},{icon:"reblog",
|
||||
// translators: "Reblog" action on a Tumblr post
|
||||
label:__("Reblog","jetpack-publicize-pkg")},{icon:"like",
|
||||
// translators: "Like" action on a Tumblr post
|
||||
label:__("Like","jetpack-publicize-pkg")}].map(({icon:e,label:t})=>(0,s.jsx)("li",{"aria-label":t,children:(0,s.jsx)(i.A,{name:e})},e))})]})]})},70793(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(27723),i=n(17712),s=(n(15264),n(10790));const __=r.__,o=({user:e})=>(0,s.jsxs)("div",{className:"tumblr-preview__post-header",children:[(0,s.jsx)("div",{className:"tumblr-preview__post-header-username",children:e?.displayName||
|
||||
// translators: username of a fictional Tumblr User
|
||||
__("anonymous-user","jetpack-publicize-pkg")}),(0,s.jsx)(i.A,{name:"ellipsis"})]})},17712(e,t,n){"use strict";n.d(t,{A:()=>i});n(67429);var r=n(10790);const i=({name:e})=>{let t;switch(e){case"blaze":t=(0,r.jsx)("svg",{viewBox:"0 0 25 22",children:(0,r.jsx)("path",{d:"m7.5059-0.24414c-0.79843 0.057223-1.2169 0.88587-1.1635 1.6128-0.2266 2.0449-1.4898 3.8696-3.1975 4.9778-3.0182 2.414-4.2201 6.8066-2.8033 10.411 0.92417 2.4679 2.9589 4.5674 5.4768 5.3928 0.95914 0.16102 1.7233-0.94358 1.3074-1.8059-0.11578-0.51062-0.17482-0.96516-0.17845-1.487 1.0413 1.5607 2.5484 2.8986 4.341 3.4975 1.0396-0.0154 1.98-0.64458 2.8516-1.1608 3.3821-2.1786 4.9604-6.7097 3.6597-10.518-0.49144-1.4599-1.2948-2.8935-2.5028-3.8698-0.7512-0.45498-1.661 0.09677-1.9202 0.86038-0.12274 0.16822-0.70352 1.1955-0.6191 0.61976 0.25488-3.4397-1.6789-7.0066-4.8123-8.4958-0.14322-0.037843-0.292-0.049464-0.43945-0.035156zm1.0586 3.5605c1.8947 2.0016 2.2326 5.1984 0.89062 7.5879-0.38498 0.96148 0.71762 2.0063 1.6567 1.5681 1.4159-0.4624 2.6998-1.3259 3.6577-2.4665 1.6442 2.5888 1.1465 6.2819-1.0629 8.3379-0.62378 0.60782-1.3666 1.0945-2.1754 1.4179-1.9543-0.989-3.3534-3.0966-3.5625-5.3125-0.25636-1.0253-1.81-1.2013-2.2852-0.25781-0.75058 1.3054-1.1846 2.7948-1.2305 4.3008-2.2396-1.9852-2.8468-5.4435-1.4609-8.0527 0.58926-1.239 1.651-2.13 2.724-2.9329 1.2958-1.1271 2.2791-2.62 2.7682-4.2683l0.071578 0.069832z"})});break;case"delete":t=(0,r.jsxs)("svg",{viewBox:"0 0 14 17",children:[(0,r.jsx)("path",{d:"M12 5v9c.1.7-.3 1-1 1H3c-.5 0-.9-.3-1-1V5c0-.6-.4-1-1-1-.5 0-1 .4-1 1v9.5C0 16.1 1.4 17 3 17h8c1.8 0 3-.8 3-2.5V5c0-.6-.5-1-1-1-.6 0-1 .5-1 1z"}),(0,r.jsx)("path",{d:"M4 12s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm4 0s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm5-10c.5 0 1-.4 1-1 0-.5-.4-.9-1-1H1C.5.1 0 .5 0 1c0 .6.6 1 1.1 1H13z"})]});break;case"edit":t=(0,r.jsx)("svg",{viewBox:"0 0 17.6 17.6",children:(0,r.jsx)("path",{d:"M5.3 13.8l-2.1.7.7-2.1L10.3 6l1.4 1.4-6.4 6.4zm6.4-9.3l-1.4-1.4-1.4 1.4-6.7 6.7-.2.5-2 5.9 3.8-1.3 2.1-.7.4-.1.3-.3 7.8-7.8c.1 0-2.7-2.9-2.7-2.9zm5.6-1.4L14.5.3c-.4-.4-1-.4-1.4 0l-1.4 1.4L15.9 6l1.4-1.4c.4-.5.4-1.1 0-1.5"})});break;case"share":t=(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12.6173 1.07612C12.991 0.921338 13.4211 1.00689 13.7071 1.29289L22.7071 10.2929C23.0832 10.669 23.0991 11.2736 22.7433 11.669L13.7433 21.669C13.4663 21.9767 13.0283 22.082 12.6417 21.9336C12.2552 21.7853 12 21.414 12 21V16H11.5C7.31775 16 3.92896 18.2486 2.95256 21.3044C2.80256 21.7738 2.33292 22.064 1.84598 21.9881C1.35904 21.9122 1 21.4928 1 21V18.5C1 12.3162 5.88069 7.27245 12 7.01067V2C12 1.59554 12.2436 1.2309 12.6173 1.07612ZM14 4.41421V8C14 8.55228 13.5523 9 13 9H12.5C7.64534 9 3.64117 12.6414 3.06988 17.3419C5.09636 15.2366 8.18218 14 11.5 14H13C13.5523 14 14 14.4477 14 15V18.394L20.622 11.0362L14 4.41421Z"})});break;case"reply":t=(0,r.jsx)("svg",{viewBox:"0 0 17 17",children:(0,r.jsx)("path",{d:"M8.7 0C4.1 0 .4 3.7.4 8.3c0 1.2.2 2.3.7 3.4-.2.6-.4 1.5-.7 2.5L0 15.8c-.2.7.5 1.4 1.2 1.2l1.6-.4 2.4-.7c1.1.5 2.2.7 3.4.7 4.6 0 8.3-3.7 8.3-8.3C17 3.7 13.3 0 8.7 0zM15 8.3c0 3.5-2.8 6.3-6.4 6.3-1.2 0-2.3-.3-3.2-.9l-3.2.9.9-3.2c-.5-.9-.9-2-.9-3.2.1-3.4 3-6.2 6.5-6.2S15 4.8 15 8.3z"})});break;case"reblog":t=(0,r.jsx)("svg",{viewBox:"0 0 17 18.1",children:(0,r.jsx)("path",{d:"M12.8.2c-.4-.4-.8-.2-.8.4v2H2c-2 0-2 2-2 2v5s0 1 1 1 1-1 1-1v-4c0-1 .5-1 1-1h9v2c0 .6.3.7.8.4L17 3.6 12.8.2zM4.2 17.9c.5.4.8.2.8-.3v-2h10c2 0 2-2 2-2v-5s0-1-1-1-1 1-1 1v4c0 1-.5 1-1 1H5v-2c0-.6-.3-.7-.8-.4L0 14.6l4.2 3.3z"})});break;case"like":t=(0,r.jsx)("svg",{viewBox:"0 0 20 18",children:(0,r.jsx)("path",{d:"M14.658 0c-1.625 0-3.21.767-4.463 2.156-.06.064-.127.138-.197.225-.074-.085-.137-.159-.196-.225C8.547.766 6.966 0 5.35 0 4.215 0 3.114.387 2.162 1.117c-2.773 2.13-2.611 5.89-1.017 8.5 2.158 3.535 6.556 7.18 7.416 7.875A2.3 2.3 0 0 0 9.998 18c.519 0 1.028-.18 1.436-.508.859-.695 5.257-4.34 7.416-7.875 1.595-2.616 1.765-6.376-1-8.5C16.895.387 15.792 0 14.657 0h.001zm0 2.124c.645 0 1.298.208 1.916.683 1.903 1.461 1.457 4.099.484 5.695-1.973 3.23-6.16 6.7-6.94 7.331a.191.191 0 0 1-.241 0c-.779-.631-4.966-4.101-6.94-7.332-.972-1.595-1.4-4.233.5-5.694.619-.475 1.27-.683 1.911-.683 1.064 0 2.095.574 2.898 1.461.495.549 1.658 2.082 1.753 2.203.095-.12 1.259-1.654 1.752-2.203.8-.887 1.842-1.461 2.908-1.461h-.001z"})});break;case"ellipsis":t=(0,r.jsx)("svg",{viewBox:"0 0 17.5 3.9",children:(0,r.jsx)("path",{d:"M17.5 1.9c0 1.1-.9 1.9-1.9 1.9-1.1 0-1.9-.9-1.9-1.9S14.5 0 15.6 0c1 0 1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 1.9-1.9 1.9-1.1.1-2-.8-2-1.9 0-1 .9-1.9 2-1.9s1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 2-2 2-1 0-1.9-.9-1.9-2S.9 0 1.9 0c1.1 0 2 .9 2 1.9"})})}return(0,r.jsx)("span",{className:`tumblr-preview__post-icon tumblr-preview__post-icon-${e}`,children:t})}},58513(e,t,n){"use strict";n.d(t,{Z:()=>c});var r=n(13022),i=n(76223),s=n(2909),o=n(10790);const a=(0,i.RA)((0,i.f5)(280),(0,i.ZT)(280)),c=({description:e,image:t,imageFocalPoint:n,title:c,cardType:l,urLine truncated
|
||||
// translators: %s: The name of the connection the user is disconnecting.
|
||||
__("Are you sure you want to disconnect <strong>%s</strong>?","jetpack-publicize-pkg"),e.display_name),{strong:(0,d.jsx)("strong",{})})}),"link"===t?(0,d.jsx)(a.N,{variant:"default",href:"#","aria-disabled":g||void 0,onClick:w,children:x}):(0,d.jsx)(c.$,{size:n,tone:p,variant:t,onClick:h,disabled:g,children:x})]})}},566(e,t,n){"use strict";n.d(t,{j:()=>l});var r=n(56427),i=n(47143),s=n(86087),o=n(27723),a=n(93294),c=n(10790);const __=o.__;function l({connection:e}){const{updateConnectionById:t}=(0,i.useDispatch)(a.M),{isUpdating:n}=(0,i.useSelect)(t=>{const{getUpdatingConnections:n}=t(a.M);return{isUpdating:n().includes(e.connection_id)}},[e.connection_id]),o=(0,s.useCallback)(n=>{t(e.connection_id,{shared:n})},[e.connection_id,t]);return(0,c.jsx)(r.CheckboxControl,{checked:e.shared??!1,onChange:o,disabled:n||"broken"===e.status,label:__("Mark the connection as shared","jetpack-publicize-pkg"),__nextHasNoMarginBottom:!0})}},18241(e,t,n){"use strict";n.d(t,{C:()=>d});var r=n(63406),i=n(47143),s=n(86087),o=n(27723),a=n(79654),c=n(93294),l=n(50272),u=n(10790);const __=o.__,_x=o._x;function d({connection:e,service:t}){const{fetchKeyringResult:n,setKeyringResult:o,openConnectionsModal:d,setReconnectingAccount:p,completeReconnect:f}=(0,i.useDispatch)(c.M),{createErrorNotice:h}=(0,r.I)(),{canManageConnection:m,isReconnectingThis:g}=(0,i.useSelect)(t=>{const{canUserManageConnection:n,getReconnectingAccount:r}=t(c.M);return{canManageConnection:n(e),isReconnectingThis:r()?.connection_id===e.connection_id}},[e]),[v,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>{g||b(!1)},[g]);const w=(0,s.useCallback)(async e=>{const t=await n(e);if(!t?.ID)return b(!1),p(void 0),void h(__("The reconnection could not be completed. Please try again.","jetpack-publicize-pkg"));await f(t)||(o(t),d())},[f,h,n,d,o,p]),x=(0,l.P)({service:t,onConfirm:w}),_=(0,s.useCallback)(async()=>{if(b(!0),await p(e),"bluesky"===t.id)return void d();const n=new FormData;"mastodon"===t.id&&n.set("instance",e.external_handle);await x(n,{refresh:!0,onAbort:()=>b(!1)})||(b(!1),p(void 0))},[e,d,x,t.id,p]),y=(0,s.useCallback)(e=>{e.preventDefault(),v||_()},[v,_]);return m?v?(0,u.jsx)(a.N,{href:"#",variant:"unstyled","aria-disabled":!0,children:__("Reconnecting…","jetpack-publicize-pkg")}):(0,u.jsx)(a.N,{href:"#",onClick:y,children:_x("Reconnect","Reconnect a social media account","jetpack-publicize-pkg")}):null}},58527(e,t,n){"use strict";n.d(t,{O:()=>h});var r=n(56427),i=n(27723),s=n(13022),o=n(51609),a=n(15132),c=n(36500),l=n(92216),u=n(72056),d=n(87876),p=n(10790);const __=i.__,f=()=>{};function h({onClickItem:e,getItemClassName:t}){const{canBeTurnedOn:n,shouldBeDisabled:i}=(0,u.j)(),{connections:h}=(0,a.A)(),m=(0,o.useCallback)(t=>()=>{e(t)},[e]);return(0,p.jsx)("div",{role:"group",className:d.A.wrapper,"aria-label":__("Connection toggles","jetpack-publicize-pkg"),children:h.map(e=>{const o=Boolean(n(e)&&e.enabled),a=i(e),u=(0,c.Wz)(e);return(0,p.jsx)(r.Button,{role:"switch",disabled:a,icon:(0,p.jsx)(l.s,{serviceName:e.service_name,label:e.display_name,profilePicture:e.profile_picture,disabled:a}),iconPosition:"right",onClick:m(e),"aria-label":u,"aria-checked":o,className:(0,s.A)(d.A.item,t?.(e)),children:(0,p.jsxs)("div",{className:d.A["connection-info"],children:[(0,p.jsx)(r.FormToggle,{tabIndex:-1,checked:o,onChange:f,disabled:a,"aria-label":u}),(0,p.jsx)("div",{className:d.A["display-name"],title:e.display_name,children:e.display_name})]})},e.connection_id)})})}},86836(e,t,n){"use strict";n.d(t,{J:()=>d});var r=n(85985),i=n(56427),s=n(27723),o=n(51609),a=n(15132),c=n(72056),l=n(57497),u=n(10790);const __=s.__;function d({connection:e}){const{toggleById:t}=(0,a.A)(),{recordEvent:n}=(0,r.st)(),{canBeTurnedOn:d,shouldBeDisabled:p}=(0,c.j)(),f=(0,o.useCallback)(()=>{t(e.connection_id),n("jetpack_social_connection_toggled",{location:"preview_modal",enabled:!e.enabled,service_name:e.service_name})},[e.connection_id,e.enabled,e.service_name,n,t]),h=Boolean(d(e)&&e.enabled),m=p(e);return(0,u.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.sprintf)(/* translators: %1$s: social media account name, %2$s: social media platform name (e.g. Facebook, LinkedIn) */
|
||||
__("Share to %1$s on %2$s","jetpack-publicize-pkg"),e.display_name,e.service_label),className:l.A["connection-toggle"],checked:h,onChange:f,disabled:m})}},92031(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(5488),i=n(38811),s=n(18031),o=n(10790);function a(){const e=(0,r.pq)();return(0,o.jsx)(i.o,{analyticsData:{location:"preview-modal"},isInsideNavigatorModal:!0,upgradeNotice:e?void 0:(0,o.jsx)(s.g,{})})}},62576(e,t,n){"use strict";n.d(t,{$:()=>p});var r=n(97999),i=n(47143),s=n(27723),o=n(51609),a=n(93294),c=n(44727),l=n(38811),u=n(10790);const d=(0,s.__)("A template will be used if this is empty.","jetpack-publicize-pkg");function p({connection:e}){const{customizeConnectionById:t}=(0,i.useDispatch)(a.M),n=(0,r.siteHasFeature)(c.q.MESSAGE_TEMPLATES),s=e.message??"",p=n?d:void 0,f=e.media_source,h=e.attached_media??[],m=(0,o.useCallback)(n=>{t(e.connection_id,{message:n})},[e.connection_id,t]),g=(0,o.useCallback)(n=>{t(e.connection_id,{attached_media:n.attached_media,media_source:n.media_source})},[e.connection_id,t]);return(0,u.jsx)(l.o,{analyticsData:{location:"preview-modal"},isInsideNavigatorModal:!0,disabled:!e.enabled,message:s,messageHelp:p,onMessageChange:m,attachedMedia:h,onMediaChange:g,mediaSource:f,attachmentToggleMode:"hidden"})}},38892(e,t,n){"use strict";n.d(t,{X:()=>h});var r=n(56427),i=n(86087),s=n(27723),o=n(5488),a=n(74622),c=n(92031),l=n(62576),u=n(55367),d=n(17329),p=n(10790);const __=s.__;function f({connection:e,usingPerNetworkCustomization:t}){if(!(0,o.pq)())return null;if(!t)return(0,p.jsx)("legend",{children:__("Customizing for all connections.","jetpack-publicize-pkg")});if(!e)return null;const{display_name:n}=e,a=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r.VisuallyHidden,{children:n}),(0,p.jsx)("b",{"aria-hidden":"true",title:n,children:n})]});return(0,p.jsx)("legend",{children:(0,i.createInterpolateElement)((0,s.sprintf)(/* translators: %s is the name of the social media account. */
|
||||
__("Customizing for %s.","jetpack-publicize-pkg"),"<accountName/>"),{accountName:a})})}function h({connection:e,usingPerNetworkCustomization:t}){return(0,p.jsxs)("fieldset",{className:d.A["customization-section"],"data-variant":t?"per-network":"global",children:[(0,p.jsx)(f,{connection:e,usingPerNetworkCustomization:t}),t?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l.$,{connection:e}),(0,p.jsx)(u.K,{connection:e})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.Z,{}),(0,p.jsx)(a.L,{})]})]})}},55367(e,t,n){"use strict";n.d(t,{K:()=>p});var r=n(3924),i=n(56427),s=n(27723),o=n(79654),a=n(75897),c=n(11851),l=n(32940),u=n(48896),d=n(10790);const __=s.__;function p({connection:e}){const{error:t,isConvertible:n}=(0,a.P)(e),p=(0,u.h)();if(!t||n)return null;if(t===c.k3)return(0,d.jsx)(l.q,{});const f=p(e.service_name);return(0,d.jsxs)(i.Notice,{status:"warning",isDismissible:!1,children:[(0,d.jsx)("p",{children:(0,s.sprintf)(/* translators: %s is the name of the social media platform (e.g., Facebook, Instagram). */
|
||||
__("The selected media cannot be shared to %s.","jetpack-publicize-pkg"),f)}),(0,d.jsx)("ul",{children:(0,d.jsx)("li",{children:(0,d.jsx)("i",{children:(0,c.$m)(t)})})}),(0,d.jsx)(o.N,{openInNewTab:!0,href:(0,r.A)("jetpack-social-media-support-information"),children:__("Troubleshooting tips","jetpack-publicize-pkg")})]})}},88283(e,t,n){"use strict";n.d(t,{_:()=>c});var r=n(56427),i=n(27723),s=n(81342),o=n(46756),a=n(10790);const _x=i._x;function c(){const{isEnabled:e,toggle:t}=(0,s.I)();return(0,a.jsxs)(r.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:_x("Customize","Verb: Customize the social preview","jetpack-publicize-pkg"),onChange:t,value:e?"each":"all",hideLabelFromVision:!0,className:o.A["customization-toggle"],children:[(0,a.jsx)(r.__experimentalToggleGroupControlOption,{label:_x("Same for all","An option to customize for all networks","jetpack-publicize-pkg"),value:"all"}),(0,a.jsx)(r.__experimentalToggleGroupControlOption,{label:_x("Customize each","An option to customize for each network","jetpack-publicize-pkg"),value:"each"})]})}},27192(e,t,n){"use strict";n.d(t,{d:()=>l});var r=n(44430),i=n(5488),s=n(88283),o=n(79537),a=n(34132),c=n(10790);function l(){const e=(0,i.pq)();return(0,r.T)(),(0,c.jsxs)("div",{className:o.A["customize-and-preview"],"data-plan":e?"paid":"free",children:[e&&(0,c.jsx)(s._,{}),(0,c.jsx)(a.R,{})]})}},41311(e,t,n){"use strict";n.d(t,{w:()=>f});var r=n(56427),i=n(27723),s=n(28847),o=n(13022),a=n(88730),c=n(54514),l=n(23316),u=n(10790);const __=i.__,_x=i._x;function d(){return(0,u.jsxs)("div",{className:l.A["preview-skeleton"],role:"status",children:[(0,u.jsx)(r.VisuallyHidden,{children:__("Loading post preview.","jetpack-publicize-pkg")}),(0,u.jsxs)("div",{className:l.A["preview-skeleton-header"],children:[(0,u.jsx)("div",{className:l.A["preview-skeleton-avatar"]}),(0,u.jsxs)("div",{className:l.A["preview-skeleton-lines"],children:[(0,u.jsx)("div",{className:l.A["preview-skeleton-line"]}),(0,u.jsx)("div",{className:(0,o.A)(l.A["preview-skeleton-line"],l.A["preview-skeleton-line-short"])})]})]}),(0,u.jsxs)("div",{className:l.A["preview-skeleton-copy"],children:[(0,u.jsx)("div",{className:l.A["preview-skeleton-line"]}),(0,u.jsx)("div",{className:(0,o.A)(l.A["preview-skeleton-line"],l.A["preview-skeleton-line-medium"])})]}),(0,u.jsx)("div",{className:l.A["preview-skeleton-media"]}),(0,u.jsx)("div",{className:(0,o.A)(l.A["preview-skeleton-line"],l.A["preview-skeleton-line-short"])})]})}function p({connection:e}){const t=(0,a.e)(e);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.VisuallyHidden,{as:"h2",children:_x("Preview","Noun: Post preview section heading","jetpack-publicize-pkg")}),(0,u.jsx)("div",{className:l.A["preview-wrapper"],"aria-busy":t.isLoading,children:t.isLoading?(0,u.jsx)(d,{}):(0,u.jsx)(c.z,{connection:e,previewData:t})})]})}function f({connection:e}){return(0,u.jsx)("section",{"aria-label":__("Post Preview","jetpack-publicize-pkg"),className:l.A["preview-section"],children:e.enabled?(0,u.jsx)(p,{connection:e}):(0,u.jsxs)("div",{className:l.A["inactive-preview"],children:[(0,u.jsx)(r.Icon,{icon:s.A,size:48}),(0,u.jsx)("div",{children:__("The post won't be shared to this account.","jetpack-publicize-pkg")})]})})}},54514(e,t,n){"use strict";n.d(t,{z:()=>x});var r=n(27365),i=n(51016),s=n(66901),o=n(1798),a=n(27300),c=n(94302),l=n(59028),u=n(35521),d=n(66603),p=n(3582),f=n(47143),h=n(86087),m=n(18537),g=n(27723),v=n(32940),b=n(10790);const __=g.__;function w(e,t){return`${e}\n\n${t.replace(/\n+/g," ")}`}function x({connection:e,previewData:t}){const n=(0,h.useMemo)(()=>({displayName:e.display_name,profileImage:e.profile_picture,externalName:e.external_handle}),[e]),{image:g,imageFocalPoint:x,media:_,title:y,description:k,url:j,excerpt:C,message:A,hyperlinks:S}=t,E=(0,h.useMemo)(()=>({description:k,image:g,imageFocalPoint:x,media:_,title:y,url:j,hyperlinks:S}),[S,k,g,x,_,y,j]),N=(0,f.useSelect)(e=>{const{getUnstableBase:t}=e(p.store);return(0,m.decodeEntities)(t(void 0)?.name)},[]),z=_?.some(({type:e})=>e.startsWith("image/")||e.startsWith("video/"));switch(e.service_name){case"bluesky":{const e=_?.[0],t=e?.type.startsWith("image/")?e.url:null;return(0,b.jsx)(i.O,{...E,description:(0,m.decodeEntities)(C),user:{avatarUrl:n.profileImage,address:n.externalName,displayName:n.displayName},customText:(0,m.decodeEntities)(A||`${y}\n\n${C.replaceAll(/[\s\n]/g," ")}`),customImage:t})}case"facebook":{let e=y;return A?e=A:y&&C&&(e=w(y,C)),z?(0,b.jsx)(d.h,{...E,type:"article",customText:e,user:{...n,avatarUrl:n.profileImage}}):(0,b.jsx)(s.l,{...E,type:"article",customText:e,user:{...n,avatarUrl:n.profileImage}})}case"instagram-business":{const e=Boolean(g);let t=y;return A?t=A:y&&C&&(t=w(y,C)),z||e?(0,b.jsx)(r.l,{...E,image:_?.[0]?.url||g,name:n.displayName,profileImage:n.profileImage,caption:t}):(0,b.jsx)(v.q,{})}case"linkedin":{let e=y;return A?e=A:y&&C&&(e=w(y,C)),(0,b.jsx)(o.$,{...E,jobTitle:__("Job Title (CompanLine truncated
|
||||
__('Customizing per account. Manage in "%s" above.',"jetpack-publicize-pkg"),x)}):null]})}},67372(e,t,n){"use strict";n.d(t,{C:()=>l});var r=n(56427),i=n(47143),s=n(27723),o=n(93294),a=n(94665),c=n(10790);const __=s.__;function l({label:e,variant:t="secondary"}){const{connections:n}=(0,i.useSelect)(e=>({connections:e(o.M).getConnections()}),[]),{openConnectionsModal:s}=(0,i.useDispatch)(o.M),l=e||__("Add a new account","jetpack-publicize-pkg"),u=n.length>0;return(0,c.jsx)(r.Button,{onClick:s,variant:u?"link":t,className:a.A["settings-button"],children:l})}},38811(e,t,n){"use strict";n.d(t,{o:()=>v});var r=n(56427),i=n(47143),s=n(27723),o=n(13022),a=n(51609),c=n(53372),l=n(93294),u=n(5488),d=n(42753),p=n(28641),f=n(93399),h=n(94665),m=n(5643),g=n(10790);const __=s.__,v=({analyticsData:e=null,isInsideNavigatorModal:t,message:n,onMessageChange:s,messagePlaceholder:v,messageHelp:b,attachedMedia:w,imageGeneratorSettings:x,mediaSource:_,onMediaChange:y,disabled:k=!1,attachmentToggleMode:j,upgradeNotice:C})=>{const{message:A,updateMessage:S,maxLength:E}=(0,c.A)(),N=(0,d.D)(),z=(0,u.pq)(),I=void 0!==n?n:A,T=s??S,M=void 0!==y,{openUnifiedModal:D}=(0,i.useDispatch)(l.M),R=(0,r.useNavigator)(),P=(0,a.useCallback)(()=>{t?R.goTo("/edit-template"):D({initialPath:"/edit-template",isScreenLocked:!0})},[D,t,R]);return(0,g.jsx)(r.Disabled,{isDisabled:k,children:(0,g.jsxs)("div",{className:h.A["share-post-form"],children:[!N&&(0,g.jsx)(f.Ay,{label:__("Message","jetpack-publicize-pkg"),maxLength:E,onChange:T,message:I,placeholder:v,help:b,analyticsData:e,disabled:k}),(0,g.jsx)("div",{className:(0,o.A)({[h.A["share-post-form-disabled"]]:k}),children:z?(0,g.jsx)(p.A,{analyticsData:e,onEditTemplate:P,attachmentToggleMode:j,...M&&{attachedMedia:w,imageGeneratorSettings:x,mediaSource:_,onMediaChange:y}}):C??(0,g.jsx)(m.d,{})})]})})}},18031(e,t,n){"use strict";n.d(t,{g:()=>u});var r=n(3924),i=n(97999),s=n(85985),o=n(56427),a=n(27723),c=n(51609),l=n(10790);const __=a.__;function u(){const{recordEvent:e}=(0,s.st)(),t=(0,c.useCallback)(()=>{e("jetpack_social_per_network_customization_upgrade_click")},[e]);if((0,i.isSimpleSite)())return null;const n=(0,r.A)("jetpack-social-basic-plan-block-editor",{site:(0,s.GE)()||"",query:"redirect_to="+encodeURIComponent(window.location.href)}),a=__("Customize images and messages for each account for better engagement.","jetpack-publicize-pkg");return(0,l.jsx)(o.Notice,{isDismissible:!1,status:"info",spokenMessage:a,children:(0,l.jsxs)(o.Flex,{direction:"column",children:[(0,l.jsx)(o.FlexItem,{children:a}),(0,l.jsx)(o.Flex,{children:(0,l.jsx)(o.Button,{variant:"primary",href:n,className:"is-compact",target:"_blank",rel:"noopener noreferrer",onClick:t,children:__("Upgrade now","jetpack-publicize-pkg")})})]})})}},5643(e,t,n){"use strict";n.d(t,{d:()=>l});var r=n(3924),i=n(97999),s=n(85985),o=n(56427),a=n(27723),c=n(10790);const __=a.__;function l(){if((0,i.isSimpleSite)())return null;const e=(0,r.A)("jetpack-social-basic-plan-block-editor",{site:(0,s.GE)()||"",query:"redirect_to="+encodeURIComponent(window.location.href)}),t=__("Choose your social media image or video to share.","jetpack-publicize-pkg");return(0,c.jsx)(o.Notice,{isDismissible:!1,status:"info",spokenMessage:t,children:(0,c.jsxs)(o.Flex,{direction:"column",children:[(0,c.jsx)(o.FlexItem,{children:t}),(0,c.jsxs)(o.Flex,{justify:"start",gap:3,children:[(0,c.jsx)(o.Button,{variant:"primary",className:"is-compact",href:e,target:"_blank",rel:"noopener noreferrer",children:__("Upgrade now","jetpack-publicize-pkg")}),(0,c.jsx)(o.Button,{variant:"secondary",href:(0,r.A)("jetpack-social-demo"),target:"_blank",className:"is-compact",rel:"noopener noreferrer",children:__("View demo","jetpack-publicize-pkg")})]})]})})}},72056(e,t,n){"use strict";n.d(t,{j:()=>p});var r=n(86087),i=n(51609),s=n(81669),o=n(53682),a=n(71615),c=n(51202),l=n(11851),u=n(52472),d=n(15132);const p=()=>{const{connections:e}=(0,d.A)(),{isPublicizeEnabled:t,isPublicizeDisabledBySitePlan:n}=(0,u.A)(),{attachedMedia:p}=(0,s.A)(),f=(0,o.A)(),h=p[0]?.id||f,{validationErrors:m,isConvertible:g}=(0,c.Ay)(e,(0,a.A)(h)[0]),v=(0,r.useCallback)(e=>{const{connection_id:t,status:n}=e,r="broken"!==n,i=void 0!==m[t]&&!g,s=m[t]===l.k3;return r&&!i&&!s},[g,m]),b=(0,r.useCallback)(e=>!t||!v(e),[v,t]),w=(0,r.useCallback)(e=>!n&&v(e),[v,n]);return(0,i.useMemo)(()=>({shouldBeDisabled:b,canBeTurnedOn:w}),[b,w])}},88909(e,t,n){"use strict";n.d(t,{c:()=>l});var r=n(39384),i=n(56427),s=n(47143),o=n(43656),a=n(27723),c=n(10790);const __=a.__,_x=a._x;function l(){const e=(0,s.useSelect)(e=>e(o.store).isCurrentPostPublished(),[]);return(0,c.jsx)(i.Notice,{status:"warning",isDismissible:!1,actions:[{url:(0,r.getUserConnectionUrl)(),label:__("Connect now","jetpack-publicize-pkg"),variant:"link"}],children:e?_x("You must connect your WordPress.com account to be able to re-share posts.","","jetpack-publicize-pkg"):__("You must connect your WordPress.com account to be able to connect social media accounts.","jLine truncated
|
||||
__("Preview for %s","jetpack-publicize-pkg"),e.title),showTooltip:!0,onClick:n,children:"function"==typeof e.icon?(0,a.jsx)(e.icon,{}):e.icon})}},69908(e,t,n){"use strict";n.d(t,{O:()=>g});var r=n(63406),i=n(3924),s=n(56427),o=n(47143),a=n(86087),c=n(27723),l=n(79654),u=n(93294),d=n(75265),p=n(12278),f=n(10790);const __=c.__,_x=c._x;function h({label:e,profile_picture:t}){return(0,f.jsxs)("div",{className:p.A["account-info"],children:[t?(0,f.jsx)("img",{className:p.A["profile-pic"],src:t,alt:e}):null,(0,f.jsx)("span",{children:e})]})}const m=()=>{};function g({keyringResult:e,onComplete:t,canMarkAsShared:n}){const c=(0,d.o)(),{existingConnections:g,reconnectingAccount:v}=(0,o.useSelect)(e=>{const t=e(u.M);return{existingConnections:t.getConnections(),reconnectingAccount:t.getReconnectingAccount()}},[]),{createErrorNotice:b}=(0,r.I)(),w=c.find(t=>t.id===e.service),x=(0,a.useCallback)(e=>g.some(t=>t.service_name===w?.id&&t.external_id===e),[g,w?.id]),_=(0,a.useMemo)(()=>{const t=[],n=[];if(!w)return{connected:t,not_connected:n};const r=[];if(w.supports.additional_users_only||r.push({label:e.external_display||e.external_name,value:e.external_ID,profile_picture:e.external_profile_picture}),w.supports.additional_users&&e.additional_external_users?.length)for(const t of e.additional_external_users)r.push({label:t.external_name,value:t.external_ID,profile_picture:t.external_profile_picture});for(const e of r)x(e.value)?t.push(e):n.push(e);return{connected:t,not_connected:n}},[x,e,w]),{createConnection:y,setReconnectingAccount:k}=(0,o.useDispatch)(u.M),j=(0,a.useCallback)(async n=>{n.preventDefault(),n.stopPropagation();const r=n.target,i=new FormData(r),s=i.get("external_user_ID");if(!s)return void b(__("Please select an account to connect.","jetpack-publicize-pkg"));const o={external_user_ID:w.supports.additional_users?s:void 0,keyring_connection_ID:e.ID,shared:"1"===i.get("shared")||void 0},a=_.not_connected.find(e=>e.value===s);v&&k(void 0),y(o,{display_name:a?.label,profile_picture:a?.profile_picture,service_name:w.id,external_id:s.toString()}),t()},[y,v,k,b,e.ID,t,w.supports,w.id,_.not_connected]);return(0,f.jsxs)("section",{className:p.A.confirmation,children:[_.not_connected.length?(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:p.A["header-text"],children:__("Select the account you'd like to connect. All your new blog posts will be automatically shared to this account. You'll be able to change this option in the editor sidebar when you're writing a post.","jetpack-publicize-pkg")}),e?.show_linkedin_warning&&(0,f.jsx)(s.Notice,{status:"warning",isDismissible:!1,children:(0,f.jsxs)("p",{children:[__("We could not retrieve which company pages you have access to. This is a known issue with the LinkedIn API. If you would like to connect a company page, please retry after 5 minutes.","jetpack-publicize-pkg")," ",(0,f.jsx)(l.N,{openInNewTab:!0,href:(0,i.A)("jetpack-linkedin-permissions-warning"),children:__("Learn more","jetpack-publicize-pkg")},"linkedin-api-documentaion")]})}),(0,f.jsxs)("form",{className:p.A.form,onSubmit:j,id:"connection-confirmation-form",children:[(0,f.jsx)("div",{className:p.A["accounts-list"],children:_.not_connected.map((e,t)=>{const n=v?v.service_name===w?.id&&v.external_id===e.value:0===t;return(0,f.jsxs)("label",{htmlFor:`external_user_ID__${e.value}`,className:p.A["account-label"],"aria-required":!0,children:[(0,f.jsx)("input",{type:"radio",id:`external_user_ID__${e.value}`,name:"external_user_ID",value:e.value,defaultChecked:n,className:p.A["account-input"],required:!0}),(0,f.jsx)(h,{label:e.label,profile_picture:e.profile_picture})]},e.value)})}),n?(0,f.jsx)(s.CheckboxControl,{name:"shared",value:"1",label:__("Mark the connection as shared","jetpack-publicize-pkg"),help:`${__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack-publicize-pkg")} ${__("You can change this later.","jetpack-publicize-pkg")}`,defaultChecked:!0,onChange:m}):null,(0,f.jsx)("input",{type:"hidden",name:"keyring_connection_ID",value:e.ID})]})]}):(0,f.jsx)("p",{className:p.A["header-text"],children:_.connected.length?_x("No more accounts/pages found.","Message shown when there are no connections found to connect","jetpack-publicize-pkg"):__("No accounts/pages found.","jetpack-publicize-pkg")}),_.connected.length?(0,f.jsxs)("section",{children:[(0,f.jsx)("h3",{children:__("Already connected","jetpack-publicize-pkg")}),(0,f.jsx)("ul",{children:_.connected.map((e,t)=>(0,f.jsx)("li",{children:(0,f.jsx)(h,{label:e.label,profile_picture:e.profile_picture})},e.label+t))})]}):null,(0,f.jsxs)("div",{className:p.A["submit-wrap"],children:[(0,f.jsx)(s.Button,{variant:"secondary",onClick:t,children:__("Cancel","jetpack-publicize-pkg")}),_.not_connected.length?(0,f.jsx)(s.Button,{form:"connection-confirmation-form",type:"submit",variant:"primary",children:__("Confirm","jetpack-publicize-pkg")}):null]})]})}},77419(e,t,n){"use strict";n.d(t,{R:()=>k});var r=n(3924),i=n(Line truncated
|
||||
__("Customize how this post is shared. Use placeholders like %1$s or %2$s - those will be filled in when the post is shared.","jetpack-publicize-pkg"),"{title}","{url}"):__("Write a custom message for your social audience here. This message will override your social post content.","jetpack-publicize-pkg")),C=n??(_?(0,o.createInterpolateElement)(__("Supports placeholders like <title/> and <url/>. See the list below for all the options.","jetpack-publicize-pkg"),{title:(0,p.jsx)("code",{children:"{title}"}),url:(0,p.jsx)("code",{children:"{url}"})}):(0,a.sprintf)(/* translators: %d: the number of characters remaining. */
|
||||
_n("%d character remaining","%d characters remaining",y,"jetpack-publicize-pkg"),y));return(0,p.jsxs)("div",{className:d.A["message-box-control"],children:[(0,p.jsx)(s.TextareaControl,{value:h,label:e,onChange:k,disabled:g,maxLength:_?void 0:v,placeholder:j,rows:4,help:C,__nextHasNoMarginBottom:!0}),_&&(0,p.jsx)(u.A,{})]})}},92572(e,t,n){"use strict";n.d(t,{h:()=>l});var r=n(56427),i=n(86087),s=n(27723),o=n(19076),a=n(67817),c=n(10790);const __=s.__;function l(e){const{value:t,onChange:n,label:l,placeholder:u,helpText:d,disabled:p,rows:f=4,showPlaceholders:h=!0}=e,m=l??__("Message template","jetpack-publicize-pkg"),g=u??(0,s.sprintf)(/* translators: %1$s and %2$s are placeholder tokens, e.g. {title} and {url}. */
|
||||
__("Write a default share message. Use placeholders like %1$s or %2$s — they’re filled in when posts are shared.","jetpack-publicize-pkg"),"{title}","{url}"),v=d??(0,i.createInterpolateElement)(__("Supports placeholders like <title/> and <url/>. See the list below for all the options.","jetpack-publicize-pkg"),{title:(0,c.jsx)("code",{children:"{title}"}),url:(0,c.jsx)("code",{children:"{url}"})});return(0,c.jsxs)("div",{className:a.A["message-template-editor"],children:[(0,c.jsx)(r.TextareaControl,{value:t,label:m,onChange:n,disabled:p,placeholder:g,rows:f,help:v,__nextHasNoMarginBottom:!0}),h&&(0,c.jsx)(o.A,{})]})}},40752(e,t,n){"use strict";n.d(t,{P:()=>l});var r=n(56427),i=n(47143),s=n(43656),o=n(27723),a=n(52472),c=n(10790);const __=o.__;function l(){const{isPublicizeEnabled:e,togglePublicizeFeature:t}=(0,a.A)();return(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[])?null:(0,c.jsx)(r.PanelRow,{children:(0,c.jsx)(r.ToggleControl,{label:__("Auto-share post","jetpack-publicize-pkg"),onChange:t,checked:e,__nextHasNoMarginBottom:!0})})}},14674(e,t,n){"use strict";n.d(t,{V:()=>d});var r=n(56427),i=n(47143),s=n(43656),o=n(27723),a=n(52472),c=n(15132),l=n(40533),u=n(10790);const __=o.__,_x=o._x;function d(){const{hasEnabledConnections:e}=(0,c.A)(),t=(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[]),{isPublicizeEnabled:n}=(0,a.A)();return(0,u.jsx)(r.PanelRow,{children:(0,u.jsx)(r.__experimentalText,{className:l.A.description,children:t?__('Enable the social media accounts where you want to re-share your post, then click on the "Preview and Share" button below.',"jetpack-publicize-pkg"):n&&e?__("When the post is published, it will be shared automatically on:","jetpack-publicize-pkg"):_x("After the post is published, you can preview, and manually share or schedule it.","","jetpack-publicize-pkg")})})}},82856(e,t,n){"use strict";n.d(t,{A:()=>x});var r=n(56427),i=n(47143),s=n(43656),o=n(86087),a=n(27723),c=n(52472),l=n(20905),u=n(59095),d=n(15132),p=n(8944),f=n(82751),h=n(95250),m=n(40752),g=n(14674),v=n(40533),b=n(73549),w=(n(10948),n(10790));const __=a.__,x=({prePublish:e})=>{const{refresh:t,hasConnections:n,hasEnabledConnections:a}=(0,d.A)(),x=(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[]),_=(0,l.A)(),{hidePublicizeFeature:y}=(0,c.A)();(0,u._)(function(){a&&t()},[a,t]);const k=e?o.Fragment:r.PanelBody,j=e?{}:{title:__("Share to social media","jetpack-publicize-pkg"),className:v.A.panel};return _(),(0,w.jsxs)(k,{...j,children:[(0,w.jsx)(b.M,{}),!y&&(0,w.jsxs)(o.Fragment,{children:[n?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(m.P,{}),(0,w.jsx)(g.V,{})]}):null,(0,w.jsx)(p.A,{})]}),x&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(h.E,{}),(0,w.jsx)(f.F,{})]})]})}},73549(e,t,n){"use strict";n.d(t,{M:()=>u});var r=n(85985),i=n(56427),s=n(47143),o=n(43656),a=n(27723),c=n(52472),l=n(10790);const __=a.__,_x=a._x;function u(){const{isRePublicizeFeatureAvailable:e}=(0,c.A)(),t=(0,r.tu)("republicize"),[,n,u,d]=(0,r._6)(`${t}`),p=(0,s.useSelect)(e=>e(o.store).isCurrentPostPublished(),[]);if(!p||p&&e)return null;const f=d?.product_name||_x("paid","The plan type - paid vs free","jetpack-publicize-pkg"),h=__("Upgrade now","jetpack-publicize-pkg");return(0,l.jsx)(i.Notice,{status:"info",isDismissible:!1,actions:[{label:u?__("Redirecting…","jetpack-publicize-pkg"):h,variant:"primary",className:"is-compact",onClick:n}],children:(0,a.sprintf)(/* translators: %s: the product name of the plan. */
|
||||
__("To re-share a post, you need to upgrade to the %s plan","jetpack-publicize-pkg"),f)})}},19076(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),i=n(27723),s=n(51609),o=n(40976),a=n(90437),c=n(10790);const __=i.__;function l(){const e=(0,o.nE)()?.message_templates?.placeholders,t=(0,s.useCallback)(({onToggle:e,isOpen:t})=>(0,c.jsx)(r.Button,{variant:"link",onClick:e,"aria-expanded":t,children:__("Available placeholders","jetpack-publicize-pkg")}),[]),n=(0,s.useCallback)(()=>(0,c.jsxs)("div",{className:a.A["placeholders-help-content"],children:[(0,c.jsx)("p",{children:__("Use placeholders to automatically insert post details.","jetpack-publicize-pkg")}),(0,c.jsx)("ul",{children:e?.map(({id:e,label:t})=>(0,c.jsxs)("li",{children:[(0,c.jsx)("code",{children:e}),(0,c.jsx)("span",{children:t})]},e))})]}),[e]);return e?.length?(0,c.jsx)(r.Dropdown,{focusOnMount:!0,popoverProps:{placement:"bottom-start"},renderToggle:t,renderContent:n,className:a.A["placeholders-help"],contentClassName:a.A["placeholders-help-popover"]}):null}},1150(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(82201),i=n(47143),s=n(43656),o=n(27723),a=n(53983),c=n(25538),l=n(60407),u=n(10790);const __=o.__;function d(){return(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[])?(0,u.jsxs)(s.PluginPostPublishPanel,{initialOpen:!0,title:__("Manual sharing","jetpack-publicize-pkg"),icon:(0,u.jsx)(r.jt,{}),children:[(0,u.jsx)(a.P,{className:l.A.description,variant:"body-small"}),(0,u.jsx)(c.R,{})]}):null}},85483(e,t,n){"use strict";n.d(t,{p:()=>m});var r=n(56427),i=n(47143),s=n(43656),o=n(27723),a=n(27157),c=n(83688),l=n(59382),u=n(59095),d=n(93294),p=n(84203),f=n(22899),h=n(10790);const __=o.__;function m(){const{isPublicizeEnabled:e}=(0,c.h)(),{pollForPostShareStatus:t}=(0,i.useDispatch)(d.M),{isPostPublished:n}=(0,i.useSelect)(e=>({isPostPublished:e(s.store).isCurrentPostPublished()}),[]),o=(0,l.z)((0,a.P)()),m=(0,l.z)((0,i.useSelect)(e=>e(d.M).getEnabledConnections(),[])),g=e&&m.length>0&&o&&n;return(0,u._)(()=>{g&&t({isRequestComplete:({postShareStatus:e})=>e.done})},[g]),g?(0,h.jsx)(s.PluginPostPublishPanel,{children:(0,h.jsx)(p.A,{fallback:(0,h.jsx)(r.Notice,{status:"error",isDismissible:!1,children:__("Unable to load the sharing status.","jetpack-publicize-pkg")}),children:(0,h.jsx)(f.q,{})})}):null}},22899(e,t,n){"use strict";n.d(t,{q:()=>u});var r=n(56427),i=n(47143),s=n(27723),o=n(93294),a=n(76470),c=n(98776),l=n(10790);const __=s.__,_n=s._n;function u({reShareTimestamp:e}){const t=(0,i.useSelect)(e=>e(o.M).getPostShareStatus(),[]),n=e?t.shares.filter(t=>t.timestamp>e):t.shares;if(t.polling)return(0,l.jsxs)("div",{className:c.A["loading-block"],children:[(0,l.jsx)(r.Spinner,{}),(0,l.jsx)("span",{className:c.A["loading-text"],children:__("Sharing to your social media…","jetpack-publicize-pkg")})]});const u=n.filter(e=>"failure"===e.status).length;return u>0?(0,l.jsxs)(r.Notice,{status:"warning",isDismissible:!1,children:[(0,l.jsx)("p",{children:(0,s.sprintf)(/* translators: %d: number of failed shares */
|
||||
_n("Your post was unable to be shared to %d connection.","Your post was unable to be shared to %d connections.",u,"jetpack-publicize-pkg"),u)}),(0,l.jsx)(a.J,{variant:"link",analyticsData:{location:"post-publish-panel"},children:__("Review status and try again","jetpack-publicize-pkg")})]}):t.done?n.length?(0,l.jsxs)(r.Notice,{status:"success",isDismissible:!1,children:[(0,l.jsx)("b",{children:__("Your post was shared.","jetpack-publicize-pkg")})," ",(0,l.jsx)("span",{"aria-hidden":"true",children:"🎉"}),(0,l.jsx)("p",{children:(0,s.sprintf)(/* translators: %d: number of connections to which a post was shared */
|
||||
_n("Your post was successfuly shared to %d connection.","Your post was successfuly shared to %d connections.",n.length,"jetpack-publicize-pkg"),n.length)}),(0,l.jsx)(a.J,{analyticsData:{location:e?"resharing-section":"post-publish-panel"}})]}):(0,l.jsx)(r.Notice,{isDismissible:!1,status:"warning",children:__("Your post was not shared.","jetpack-publicize-pkg")}):(0,l.jsxs)(r.Notice,{isDismissible:!1,children:[__("The request to share your post is still in progress.","jetpack-publicize-pkg"),(0,l.jsx)("br",{}),__("Please refresh and check again in a few minutes.","jetpack-publicize-pkg")]})}},61212(e,t,n){"use strict";n.d(t,{z:()=>l});var r=n(47143),i=n(51609),s=n(52472),o=n(15132),a=n(52208),c=n(93294);function l(){const{isPublicizeEnabled:e}=(0,s.A)(),{openUnifiedModal:t}=(0,r.useDispatch)(c.M),{hasConnections:n}=(0,o.A)(),l=(0,a.Q)(),u=e&&n&&!1!==l.data.showPrePublishConfirmation;return(0,i.useEffect)(()=>{u&&t()},[u,t]),null}},95250(e,t,n){"use strict";n.d(t,{E:()=>f});var r=n(56427),i=n(47143),s=n(27723),o=n(51609),a=n(93294),c=n(84203),l=n(22899),u=n(76470),d=n(68183),p=n(10790);const __=s.__,f=()=>{const e=(0,i.useSelect)(e=>e(a.M).getPostShareStatus(),[]),[t,n]=(0,o.useState)(null);return(0,o.useEffect)(()=>{e.polling&&n(Date.now()/1e3)},[e.polling]),(0,p.jsx)(c.A,{fallback:(0,p.jsx)(r.Notice,{status:"error",isDismissible:!1,children:__("Unable to load the sharing status.","jetpack-publicize-pkg")}),children:t?(0,p.jsx)("div",{className:d.A.wrapper,children:(0,p.jsx)(l.q,{reShareTimestamp:t})}):(0,p.jsx)(u.J,{withWrapper:!0,analyticsData:{location:"editor"}})})}},99106(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(56427),i=n(47143),s=n(38443),o=n(86087),a=n(27723),c=n(19657),l=n(20692),u=n(76424),d=n(93294),p=n(44835),f=n(10790);const __=a.__,_x=a._x,h=e=>{const t=new Date(e);return t.setDate(e.getDate()+1),!(0,s.isInTheFuture)(t)},m=({onClose:e,currentTimestamp:t,onTimestampChange:n,onConfirm:i})=>{const a=(0,o.useCallback)(()=>{i?.(t),e()},[e,i,t]),c=(0,o.useCallback)(e=>{const t=Math.floor((0,s.getDate)(e).getTime()/1e3);n(t)},[n]),l=(0,s.date)("Y-m-d\\TH:i:s",new Date(1e3*t),void 0);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(r.DateTimePicker,{onChange:c,currentDate:l,isInvalidDate:h}),(0,f.jsx)(r.Button,{variant:"primary",onClick:a,className:p.A.confirm,disabled:!(0,s.isInTheFuture)(l),children:_x("Confirm","Confirms the date and time selected to be used to share the post","jetpack-publicize-pkg")})]})},g=()=>{const e=Math.floor(Date.now()/1e3),[t,n]=(0,o.useState)(e),s=(0,l.C)(),a=(0,u.P)(),p=(0,i.useSelect)(e=>e(d.M).isSharingCurrentPost()),h=(0,i.useSelect)(e=>e(d.M).isSchedulingShares(),[]),g=!s||p,v=(0,o.useCallback)(async e=>{await a({timestamp:e})},[a]),b=(0,o.useCallback)(({onToggle:e,isOpen:t})=>(0,f.jsx)(r.Button,{onClick:h||g?null:e,"aria-expanded":t,"aria-live":"polite",icon:c.A,isSecondary:!0,isBusy:h,disabled:g,children:__("Schedule","jetpack-publicize-pkg")}),[h,g]),w=(0,o.useCallback)(({onClose:e})=>(0,f.jsx)(m,{onClose:e,currentTimestamp:t,onTimestampChange:n,onConfirm:v}),[t,v]);return(0,f.jsx)(r.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:b,renderContent:w})}},72313(e,t,n){"use strict";n.d(t,{$:()=>m});var r=n(47143),i=n(86087),s=n(27723),o=n(72326),a=n(13022),c=n(93856),l=n(93294),u=n(66415),d=n(29999),p=n(1872),f=n(50272),h=n(10790);const __=s.__;function m({service:e,isSmall:t,onSubmit:n,displayInputs:s,hasConnections:m,buttonLabel:g,compact:v}){const b=(0,c.x)(),{fetchKeyringResult:w,setKeyringResult:x,completeReconnect:_}=(0,r.useDispatch)(l.M);let y;v&&(y=s?"default":"compact");const{isConnectionsModalOpen:k}=(0,r.useSelect)(e=>e(l.M),[]),j=(0,r.useSelect)(e=>e(l.M).getReconnectingAccount(),[]),[C,A]=(0,i.useState)(!1),S=(0,r.useSelect)(e=>e(l.M).isFetchingServicesList(),[]),E=(0,r.useSelect)(e=>e(l.M).isFetchingKeyringResult(),[]),N=(0,i.useCallback)(async e=>{if(!k())return;const t=await w(e);!await _(t)&&t?.ID&&x(t)},[_,w,k,x]),z=(0,f.P)({service:e,onConfirm:N}),I=(0,i.useCallback)(async e=>{if(e.preventDefault(),e.stopPropagation(),n)return n();A(!0);const t=new FormData(e.target);await z(t,{refresh:Boolean(j)})},[n,j,z]);return(0,h.jsxs)("form",{className:(0,a.A)(p.A["connect-form"],{[p.A.small]:t}),onSubmit:I,children:[s?(0,h.jsx)("div",{className:(0,a.A)(p.A["fields-wrapper"],p.A.input),children:b?(0,h.jsx)(d.g,{service:e}):(0,h.jsx)(u.t,{service:e})}):null,(0,h.jsx)("div",{className:p.A["fields-wrapper"],children:(0,h.jsx)(o.$,{variant:m?"outline":"solid",size:y,type:"submit",disabled:S||E,children:(e=>{if(e)return e;if((S||E)&&C)return __("Connecting…","jetpack-publicize-pkg");const t=__("Connect more","jetpack-publicize-pkg"),n=__("Connect","jetpack-publicize-pkg");return m?t:n})(g)})})]})}},29999(e,t,n){"use strict";n.d(t,{g:()=>h});var r=n(56427),i=n(47143),s=n(86087),o=n(27723),a=n(79654),c=n(88050),l=n(61868),u=n(13022),d=n(93294),p=n(13168),f=n(10790);const __=o.__,_x=o._x;function h({service:e}){const[t,n]=(0,s.useState)(null),h=Line truncated
|
||||
__('Bluesky usernames cannot contain dots. If you are using a custom domain, enter it without "%s"',"jetpack-publicize-pkg"),".bsky.social")),!1}return n(null),!0},[]),g=(0,s.useCallback)(e=>m(e??""),[m]);if("mastodon"===e.id)return(0,f.jsx)("div",{className:p.A["fields-item"],children:(0,f.jsx)(r.__experimentalInputControl,{__next40pxDefaultSize:!0,required:!0,type:"text",name:"instance",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Mastodon handle","jetpack-publicize-pkg"),label:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg"),placeholder:"@mastodon@mastodon.social",help:__("You can find the handle in your Mastodon profile.","jetpack-publicize-pkg")})});if("bluesky"===e.id){const e=t?(0,f.jsx)("span",{className:p.A["error-text"],children:t}):(0,f.jsxs)(f.Fragment,{children:[__("You can find the handle in your Bluesky profile.","jetpack-publicize-pkg")," ",(0,s.createInterpolateElement)((0,o.sprintf)(/* translators: %s is the bluesky handle suffix like .bsky.social */
|
||||
__("This can either be %s or just the domain name if you are using a custom domain.","jetpack-publicize-pkg"),"<strong>username.bsky.social</strong>"),{strong:(0,f.jsx)("strong",{})})]});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:(0,u.A)(p.A["fields-item"],{[p.A["fields-item-error"]]:Boolean(t)}),children:(0,f.jsx)(r.__experimentalInputControl,{__next40pxDefaultSize:!0,required:!0,type:"text",name:"handle",defaultValue:"bluesky"===h?.service_name?h?.external_handle:void 0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Bluesky handle","jetpack-publicize-pkg"),label:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg"),placeholder:"username.bsky.social",onChange:g,help:e})}),(0,f.jsxs)("div",{className:p.A["fields-item"],children:[(0,f.jsx)(r.__experimentalInputControl,{__next40pxDefaultSize:!0,required:!0,type:"password",name:"app_password",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",label:__("App password","jetpack-publicize-pkg"),placeholder:"xxxx-xxxx-xxxx-xxxx",help:(0,s.createInterpolateElement)(__("App password is needed to safely connect your account. App password is different from your account password. You can <link>generate it in Bluesky</link>.","jetpack-publicize-pkg"),{link:(0,f.jsx)(a.N,{openInNewTab:!0,href:"https://bsky.app/settings/app-passwords",children:null})})}),"bluesky"===h?.service_name&&(0,f.jsx)(c.b,{intent:"error",children:(0,f.jsx)(l.V,{children:__("Please provide an app password to fix the connection.","jetpack-publicize-pkg")})})]})]})}return null}},66415(e,t,n){"use strict";n.d(t,{t:()=>p});var r=n(56427),i=n(47143),s=n(86087),o=n(27723),a=n(79654),c=n(13022),l=n(93294),u=n(1872),d=n(10790);const __=o.__,_x=o._x;function p({service:e}){const t=(0,s.useId)(),[n,p]=(0,s.useState)(null),f=(0,i.useSelect)(e=>e(l.M).getReconnectingAccount(),[]),h=(0,s.useCallback)(e=>{if(e.endsWith(".bsky.social")){if(e.replace(".bsky.social","").includes("."))return p((0,o.sprintf)(/* translators: %s is the handle suffix like .bsky.social */
|
||||
__('Bluesky usernames cannot contain dots. If you are using a custom domain, enter it without "%s"',"jetpack-publicize-pkg"),".bsky.social")),!1}return p(null),!0},[]),m=(0,s.useCallback)(e=>{h(e.target.value)},[h]);return"mastodon"===e.id?(0,d.jsxs)("div",{className:u.A["fields-item"],children:[(0,d.jsx)("label",{htmlFor:`${t}-handle`,children:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg")}),(0,d.jsx)("input",{id:`${t}-handle`,required:!0,type:"text",name:"instance",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Mastodon handle","jetpack-publicize-pkg"),"aria-describedby":`${t}-handle-description`,placeholder:"@mastodon@mastodon.social"}),(0,d.jsx)("p",{className:"description",id:`${t}-handle-description`,children:__("You can find the handle in your Mastodon profile.","jetpack-publicize-pkg")})]}):"bluesky"===e.id?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:u.A["fields-item"],children:[(0,d.jsx)("label",{htmlFor:`${t}-handle`,children:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg")}),(0,d.jsx)("input",{id:`${t}-handle`,required:!0,type:"text",name:"handle",defaultValue:"bluesky"===f?.service_name?f?.external_handle:void 0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Bluesky handle","jetpack-publicize-pkg"),"aria-describedby":`${t}-handle-description`,placeholder:"username.bsky.social",onChange:m,className:n?u.A.error:void 0}),(0,d.jsx)("p",{className:(0,c.A)("description",n&&u.A["error-text"]),id:`${t}-handle-description`,children:n||(0,d.jsxs)(d.Fragment,{children:[__("You can find the handle in your Bluesky profile.","jetpack-publicize-pkg")," ",(0,s.createInterpolateElement)((0,o.sprintf)(/* translators: %s is the bluesky handle suffix like .bsky.social */
|
||||
__("This can either be %s or just the domain name if you are using a custom domain.","jetpack-publicize-pkg"),"<strong>username.bsky.social</strong>"),{strong:(0,d.jsx)("strong",{})})]})})]}),(0,d.jsxs)("div",{className:u.A["fields-item"],children:[(0,d.jsx)("label",{htmlFor:`${t}-password`,children:__("App password","jetpack-publicize-pkg")}),(0,d.jsx)("input",{id:`${t}-password`,required:!0,type:"password",name:"app_password",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("App password","jetpack-publicize-pkg"),"aria-describedby":`${t}-password-description`,placeholder:"xxxx-xxxx-xxxx-xxxx"}),(0,d.jsx)("p",{className:"description",id:`${t}-password-description`,children:(0,s.createInterpolateElement)(__("App password is needed to safely connect your account. App password is different from your account password. You can <link>generate it in Bluesky</link>.","jetpack-publicize-pkg"),{link:(0,d.jsx)(a.N,{openInNewTab:!0,href:"https://bsky.app/settings/app-passwords",children:null})})}),"bluesky"===f?.service_name&&(0,d.jsx)(r.Notice,{status:"error",isDismissible:!1,children:__("Please provide an app password to fix the connection.","jetpack-publicize-pkg")})]})]}):null}},4985(e,t,n){"use strict";n.d(t,{f:()=>b});var r=n(47143),i=n(27723),s=n(28847),o=n(21220),a=n(33180),c=n(39968),l=n(93294),u=n(92216),d=n(30646),p=n(25737),f=n(51708),h=n(25394),m=n(566),g=n(13168),v=n(10790);const __=i.__,b=({connection:e,service:t,canMarkAsShared:n})=>{const i=(0,r.useSelect)(t=>t(l.M).canUserManageConnection(e),[e]);return(0,v.jsxs)(o.B,{direction:"column",gap:"lg",children:[(0,v.jsxs)(o.B,{direction:"row",gap:"lg",children:[(0,v.jsx)("div",{children:(0,v.jsx)(u.A,{className:g.A["profile-pic"],profilePicture:e.profile_picture,label:e.display_name})}),(0,v.jsxs)(o.B,{direction:"column",align:"flex-start",gap:"sm",className:g.A["connection-details"],children:[(0,v.jsx)(d.s,{connection:e,tone:"neutral"}),(e=>{if(("broken"===e.status||"must_reauth"===e.status)&&i)return(0,v.jsx)(p.v,{connection:e,service:t});if(n){const t=__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack-publicize-pkg");return(0,v.jsxs)(o.B,{direction:"row",align:"center",gap:"sm",children:[(0,v.jsx)(m.j,{connection:e}),(0,v.jsx)(a.K,{variant:"minimal",tone:"neutral",size:"small",label:t,icon:s.A})]})}return i?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c.E,{className:g.A.description,children:__("This connection is added by a site administrator.","jetpack-publicize-pkg")}),"broken"===e.status?(0,v.jsx)(p.v,{connection:e,service:t}):null]})})(e)]}),(0,v.jsx)("div",{className:g.A["connection-actions"],children:(0,v.jsx)(h.V,{connection:e,variant:"outline",size:"compact",tone:"neutral"})})]}),(0,v.jsx)(f.m,{connection:e})]})}},14217(e,t,n){"use strict";n.d(t,{e:()=>g});var r=n(40597),i=n(47425),s=n(47143),o=n(27723),a=n(93294),c=n(92216),l=n(30646),u=n(25737),d=n(51708),p=n(25394),f=n(566),h=n(1872),m=n(10790);const __=o.__,g=({connection:e,service:t,canMarkAsShared:n})=>{const o=(0,s.useSelect)(t=>t(a.M).canUserManageConnection(e),[e]);return(0,m.jsxs)("div",{className:h.A["service-connection-wrapper"],children:[(0,m.jsxs)("div",{className:h.A["service-connection"],children:[(0,m.jsx)("div",{children:(0,m.jsx)(c.A,{className:h.A["profile-pic"],profilePicture:e.profile_picture,label:e.display_name})}),(0,m.jsxs)("div",{className:h.A["connection-details"],children:[(0,m.jsx)(l.s,{connection:e}),(g=e,"broken"!==g.status&&"must_reauth"!==g.status||!o?n?(0,m.jsxs)("div",{className:h.A["mark-shared-wrap"],children:[(0,m.jsx)(f.j,{connection:g}),(0,m.jsx)(r.A,{placement:"top",inline:!1,shift:!0,children:__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack-publicize-pkg")})]}):o?null:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(i.Ay,{className:h.A.description,children:__("This connection is added by a site administrator.","jetpack-publicize-pkg")}),"broken"===g.status?(0,m.jsx)(u.v,{connection:g,service:t}):null]}):(0,m.jsx)(u.v,{connection:g,service:t}))]}),(0,m.jsx)("div",{className:h.A["connection-actions"],children:(0,m.jsx)(p.V,{connection:e,variant:"minimal"})})]}),(0,m.jsx)(d.m,{connection:e})]});var g}},95790(e,t,n){"use strict";n.d(t,{x:()=>h});var r=n(56427),i=n(29491),s=n(47143),o=n(13022),a=n(93856),c=n(66336),l=n(93294),u=n(14217),d=n(4985),p=n(1872),f=n(10790);function h({service:e,serviceConnections:t}){const n=(0,a.x)()?d.f:u.e,h=(0,i.useViewportMatch)("small","<"),{deletingConnections:m,updatingConnections:g}=(0,s.useSelect)(e=>{const{getDeletingConnections:t,getUpdatingConnections:n}=e(l.M);return{deletingConnections:t(),updatingConnections:n()}},[]),v=(0,c._)();return t.length?(0,f.jsx)("ul",{className:p.A["service-connection-list"],children:t.map(t=>{const i=g.includes(t.connection_id)||m.includes(t.connection_id);return(0,f.jsx)("li",{children:(0,f.jsx)(r.Disabled,{isDisabled:i,children:(0,f.jsx)(Line truncated
|
||||
// translators: %d: Number of connections
|
||||
__("%d connections","jetpack-publicize-pkg"),e.length):__("Connected","jetpack-publicize-pkg")})}},92043(e,t,n){"use strict";n.d(t,{M:()=>d});var r=n(47143),i=n(86087),s=n(71032),o=n(93294),a=n(26839),c=n(13168),l=n(75265),u=n(10790);function d(){const e=(0,l.o)(),t=(0,r.useSelect)(e=>e(o.M).getConnections(),[]),n=(0,i.useMemo)(()=>t.reduce((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e),{}),[t]),d=(0,r.useSelect)(e=>e(o.M).getReconnectingAccount(),[]);return(0,u.jsx)(s.b,{children:(0,u.jsx)("ul",{className:c.A.services,children:e.map(e=>(0,u.jsx)("li",{className:c.A["service-list-item"],children:(0,u.jsx)(a.q,{service:e,serviceConnections:n[e.id]||[],isPanelDefaultOpen:d?.service_name===e.id})},e.id))})})}},19123(e,t,n){"use strict";n.d(t,{b:()=>u});var r=n(47143),i=n(86087),s=n(93294),o=n(86663),a=n(1872),c=n(75265),l=n(10790);function u(){const e=(0,c.o)(),t=(0,r.useSelect)(e=>e(s.M).getConnections(),[]),n=(0,i.useMemo)(()=>t.reduce((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e),{}),[t]),u=(0,r.useSelect)(e=>e(s.M).getReconnectingAccount(),[]);return(0,l.jsx)("ul",{className:a.A.services,children:e.map(e=>(0,l.jsx)("li",{className:a.A["service-list-item"],children:(0,l.jsx)(o.j,{service:e,serviceConnections:n[e.id]||[],isPanelDefaultOpen:u?.service_name===e.id})},e.id))})}},50272(e,t,n){"use strict";n.d(t,{P:()=>u});var r=n(63406),i=n(97999),s=n(47143),o=n(86087),a=n(27723),c=n(93294),l=n(5488);const __=a.__;function u({service:e,onConfirm:t}){const{createErrorNotice:n}=(0,r.I)(),a=(0,s.useSelect)(e=>e(c.M).isMastodonAccountAlreadyConnected,[]),u=(0,s.useSelect)(e=>e(c.M).isBlueskyAccountAlreadyConnected,[]),{refreshServicesList:d}=(0,s.useDispatch)(c.M),{getService:p}=(0,s.useSelect)(e=>e(c.M),[]);return(0,o.useCallback)(async(r,s={})=>{let o=e.url;if(!o&&(await d(),o=p(e.id)?.url,!o))return n(__("Could not start the connection. Please refresh the page and try again.","jetpack-publicize-pkg")),!1;const c=new URL(o);switch(e.id){case"mastodon":{const e=r.get("instance").toString().trim();if(!/^@?\b([A-Z0-9_]+)@([A-Z0-9.-]+\.[A-Z]{2,})$/gi.test(e))return n(__("Invalid Mastodon username","jetpack-publicize-pkg")),!1;if(!s.refresh&&a?.(e))return n(__("This Mastodon account is already connected","jetpack-publicize-pkg")),!1;c.searchParams.set("instance",e);break}case"bluesky":{const e=(r.get("handle")?.toString()||"").trim().replace(/^@/,"");if(!function(e){const t=e.split(".").filter(Boolean);return!(t.length<2)&&t.every(e=>/^[a-z0-9_-]+$/i.test(e))}(e))return n(__("Invalid Bluesky handle","jetpack-publicize-pkg")),!1;if(!s.refresh&&u?.(e))return n(__("This Bluesky account is already connected","jetpack-publicize-pkg")),!1;c.searchParams.set("handle",e),c.searchParams.set("app_password",(r.get("app_password")?.toString()||"").trim());break}}const f=Math.random().toString(36).slice(2,12);c.searchParams.set("auth_flow","v2"),c.searchParams.set("request_id",f),c.searchParams.set("return_url",(0,i.getAdminUrl)("admin-post.php?action=jetpack_social_keyring_done")),s.refresh&&c.searchParams.set("refresh","1");const h=(0,l.x9)(c.toString(),()=>t(f),s.onAbort);return h||n(__("The connection window could not be opened. Please allow pop-ups for this site and try again.","jetpack-publicize-pkg")),h},[n,p,u,a,t,d,e])}},48896(e,t,n){"use strict";n.d(t,{h:()=>s});var r=n(51609),i=n(96015);function s(){const e=(0,i.h)();return(0,r.useCallback)(t=>e(t)?.label||t[0].toUpperCase()+t.substring(1),[e])}},96015(e,t,n){"use strict";n.d(t,{h:()=>s});var r=n(51609),i=n(75265);function s(){const e=(0,i.o)();return(0,r.useCallback)(t=>e.find(e=>e.id===t),[e])}},75265(e,t,n){"use strict";n.d(t,{o:()=>a});n(89097);var r=n(47143),i=n(86087),s=n(93294),o=n(43493);function a(){const e=(0,r.useSelect)(e=>e(s.M).getServicesList(),[]);return(0,i.useMemo)(()=>e.filter(({status:e})=>"ok"===e).map(e=>({...e,...(0,o.M)(e.id)})),[e])}},43493(e,t,n){"use strict";n.d(t,{M:()=>m});var r=n(78478),i=n(86087),s=n(27723),o=n(79654),a=n(5488),c=n(10790);const __=s.__,l=(0,a.uq)("connections-facebook.webp"),u=(0,a.uq)("connections-instagram-business.webp"),d=(0,a.uq)("connections-linkedin.webp"),p=(0,a.uq)("connections-nextdoor.webp"),f=(0,a.uq)("connections-threads.webp"),h=(0,a.uq)("connections-tumblr.webp");function m(e){switch(e){case"bluesky":return{needsCustomInputs:!0,icon:e=>(0,c.jsx)(r.M5,{serviceName:"bluesky",...e}),description:__("Share with your network.","jetpack-publicize-pkg"),examples:[()=>(0,c.jsx)(c.Fragment,{children:__("To share to Bluesky please enter your Bluesky handle and app password below, then click connect.","jetpack-publicize-pkg")})]};case"facebook":return{icon:e=>(0,c.jsx)(r.M5,{serviceName:"facebook",...e}),description:__("Share to your pages","jetpack-publicize-pkg"),examples:[()=>(0,c.jsx)(c.Fragment,{children:(0,i.createInterpolateElement)(__("<strong>Connect</strong> to automatically share posts on your Facebook page.","jetpack-publicize-pkg"),{strong:(0,Line truncated
|
||||
__("Share on %s","jetpack-publicize-pkg"),n),f=(0,h.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",onClick:v(a,{network:r})});return(0,h.jsx)("div",{className:p.A.container,children:"icon"===e?(0,h.jsx)(l.$,{"aria-label":d,className:(0,u.A)(p.A["icon-button"],p.A[r]),render:f,children:(0,h.jsx)(i.M5,{serviceName:r})}):(0,h.jsxs)(l.$,{"aria-label":d,className:"has-text",render:f,children:["icon-text"===e&&(0,h.jsx)(i.M5,{className:p.A[r],serviceName:r}),(0,h.jsx)(s.Ay,{className:p.A.label,component:"span",children:d})]})},r)}),(0,h.jsx)("div",{className:p.A.container,children:(0,h.jsx)(r.A,{buttonStyle:e,onCopy:m,textToCopy:g,className:"icon"===e?p.A.clipboard:" has-text",children:"icon"===e?null:(0,h.jsx)(s.Ay,{className:p.A.label,component:"span",children:__("Copy to clipboard","jetpack-publicize-pkg")})})})]})}},17204(e,t,n){"use strict";n.d(t,{i:()=>a});var r=n(47143),i=n(43656),s=n(86087),o=n(83688);function a(){const{shareMessage:e}=(0,o.h)(),{message:t,link:n}=(0,r.useSelect)(t=>{const{getEditedPostAttribute:n}=t(i.store);return{link:n("link"),message:e||n("meta")?.jetpack_seo_html_title||n("title")}},[e]);return(0,s.useCallback)((e,r=!0)=>{let i=t,s=n;return e.includes("{{url}}")||(i=i+"\n\n"+s,s=""),r&&(i=encodeURIComponent(i),s=encodeURIComponent(s)),e.replace("{{text}}",i).replace("{{url}}",s)},[n,t])}},10795(e,t,n){"use strict";n.d(t,{_:()=>h});var r=n(97999),i=n(85985),s=n(56427),o=n(47143),a=n(86087),c=n(27723),l=n(94157),u=n(20692),d=n(55610),p=n(93294),f=n(10790);const __=c.__;function h({onShareCompleted:e}){const t=(0,o.useSelect)(e=>e(p.M).isSharingCurrentPost()),{recordEvent:n}=(0,i.st)(),c=(0,o.useSelect)(e=>e(p.M).isSchedulingShares(),[]),h=(0,d.P)(),m=(0,u.C)(),g=(0,a.useCallback)(async()=>{n("jetpack_social_reshare_clicked",{location:"editor",environment:(0,r.isWoASite)()?"atomic":(0,r.isSimpleSite)()?"simple":"jetpack"});await h()&&e()},[n,h,e]);return(0,f.jsx)(s.Button,{variant:"primary",onClick:g,disabled:!m||c,isBusy:t,icon:l.A,children:__("Share","jetpack-publicize-pkg")})}},76470(e,t,n){"use strict";n.d(t,{J:()=>r.g});var r=n(34054)},34054(e,t,n){"use strict";n.d(t,{g:()=>p});var r=n(85985),i=n(56427),s=n(47143),o=n(27723),a=n(13022),c=n(51609),l=n(93294),u=n(76939),d=n(10790);const __=o.__,p=(0,c.forwardRef)(({withWrapper:e=!1,analyticsData:t=null,...n},o)=>{const{recordEvent:p}=(0,r.st)(),{openUnifiedModal:f}=(0,s.useDispatch)(l.M),h=(0,s.useSelect)(e=>e(l.M).getPostShareStatus(),[]),m=(0,c.useCallback)(()=>{p("jetpack_social_share_status_modal_opened",t),f({initialPath:"/sharing-activity",isScreenLocked:!0})},[t,f,p]);if(!h||!h.shares||0===h.shares.length)return null;const g=(0,d.jsx)(i.Button,{variant:"secondary",onClick:m,...n,className:(0,a.A)(u.A.trigger,n.className),ref:o,children:n.children||__("View sharing activity","jetpack-publicize-pkg")});return e?(0,d.jsx)("div",{className:u.A["trigger-wrapper"],children:g}):g})},60076(e,t,n){"use strict";n.d(t,{f:()=>m});var r=n(40597),i=n(85985),s=n(56427),o=n(47143),a=n(27723),c=n(51609),l=n(52472),u=n(55610),d=n(93294),p=n(51604),f=n(76939),h=n(10790);const __=a.__,_x=a._x;function m({shareItem:e}){const{recordEvent:t}=(0,i.st)(),n=(0,o.useSelect)(e=>e(d.M).getConnections(),[]),{isRePublicizeFeatureAvailable:a}=(0,l.A)(),m=n.some((0,p.eJ)(e)),g=(0,u.P)(),{pollForPostShareStatus:v}=(0,o.useDispatch)(d.M),[b,w]=(0,c.useState)(!1),x=(0,c.useCallback)(async()=>{t("jetpack_social_share_status_retry",{service:e.service,location:"modal"});const r=(0,p.eJ)(e),i=n.filter(e=>!r(e)).map(({connection_id:e})=>e);i.length!==n.length&&(w(!0),await g({connectionsToSkip:i}),await v({isRequestComplete({postShareStatus:t,lastTimestamp:n}){const r=t.shares.some(t=>t.timestamp>n&&(0,p.Ri)(e,t));return r&&w(!1),r}}))},[t,e,n,g,v]);return b?(0,h.jsx)(s.Spinner,{}):(0,h.jsx)("div",{className:f.A["retry-wrapper"],children:(_=m,y=a,_&&y?(0,h.jsx)(s.Button,{variant:"link",onClick:x,children:__("Retry","jetpack-publicize-pkg")}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s.Button,{variant:"tertiary",disabled:!0,children:__("Retry","jetpack-publicize-pkg")}),(0,h.jsx)(r.A,{shift:!0,placement:"bottom-end",children:y?e.external_id?_x("This connection has been removed.","Social media connection","jetpack-publicize-pkg"):_x("This connection has been reconnected or removed.","Social media connection","jetpack-publicize-pkg"):__("To re-share a post, you need to upgrade to a paid plan.","jetpack-publicize-pkg")})]}))});var _,y}},90888(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(86087),i=n(27723),s=n(13022),o=n(20893),a=n(51519),c=n(10790);const __=i.__,l=({value:e=null,onTemplateSelected:t=null,className:n=null})=>{const l=(0,r.useCallback)(e=>{const n=e.target.id;t?.(n)},[t]);return(0,c.jsx)("div",{className:(0,s.A)(o.A.templates,n),children:a.A.map(t=>(0,c.jsxs)("button",{onClick:l,id:t.name,className:(0,s.A)(o.A.template,{[o.A["template--active"]]:t.name===e}),children:[(0,c.jsx)("img",{src:t.image,alt:t.label}),(0,c.jsx)("span",{className:"scrLine truncated
|
||||
__("Pick the %s template","jetpack-publicize-pkg"),t.label)})]},t.name))})}},51519(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(5488);const i=e=>`${(0,r.nE)()?.assets_url??""}assets/sig-templates-${e}.jpg`,s=[{name:"highway",label:"Highway",image:i("highway")},{name:"dois",label:"Dois",image:i("dois")},{name:"edge",label:"Edge",image:i("edge")},{name:"fullscreen",label:"Fullscreen",image:i("fullscreen")}]},273(e,t,n){"use strict";n.d(t,{_:()=>b});var r=n(94715),i=n(56427),s=n(86087),o=n(27723),a=n(1034),c=n(56501),l=n(78896),u=n(71615),d=n(97342),p=n(811),f=n(10790);const __=o.__,h=["image/jpeg","image/png"];function m({option:e,isSelected:t,onSelect:n,onClose:r}){const o=(0,s.useCallback)(()=>{n(e.id,r)},[e.id,n,r]);return(0,f.jsx)(i.MenuItem,{icon:e.icon,isSelected:t,onClick:o,children:e.label},e.id)}function g({isSelected:e,onRemove:t,onClose:n}){const r=(0,s.useCallback)(()=>{t(),n()},[t,n]);return(0,f.jsx)(i.MenuGroup,{children:(0,f.jsx)(i.MenuItem,{isSelected:e,onClick:r,children:__("No image","jetpack-publicize-pkg")})})}function v(e){switch(e){case"default":return __("You are using the default image","jetpack-publicize-pkg");case"featured":default:return __("You are using your post featured image","jetpack-publicize-pkg");case"custom":return __("You are using a custom image","jetpack-publicize-pkg");case"none":return __("No background image","jetpack-publicize-pkg")}}function b({imageType:e,imageId:t,defaultImageId:n,featuredImageId:o,onImageTypeChange:b,onImageIdChange:w}){const x=(0,s.useRef)(()=>{}),_=(0,s.useMemo)(()=>function(e,t,n,r){switch(e){case"default":return r;case"featured":default:return n;case"custom":return t;case"none":return null}}(e,t,o,n),[e,t,o,n]),[y,k]=(0,u.A)(_),[,j]=(0,u.A)(_!==n?n:null),C=_===n?k:j,A=y?.mediaData?.sourceUrl,S=Boolean(_)&&!A&&!k,E="featured"===e&&!o,N=(0,s.useMemo)(()=>A||S?{id:_||0,url:A||"",type:"image"}:null,[A,S,_]);(0,s.useEffect)(()=>{"default"===e&&C&&b("none")},[e,C,b]);const z=Boolean(n)&&!C,I=(0,s.useMemo)(()=>{const e=[];return z&&e.push({id:"default",label:__("Default Image","jetpack-publicize-pkg"),icon:a.A}),e.push({id:"featured",label:__("Featured Image","jetpack-publicize-pkg"),icon:l.A}),e.push({id:"custom",label:__("Media Library","jetpack-publicize-pkg"),icon:c.A}),e},[z]),T=(0,s.useCallback)(e=>{b("custom"),w(e?.id||null)},[b,w]),M=(0,s.useCallback)(()=>{setTimeout(()=>{x.current()},0)},[]),D=(0,s.useCallback)(({open:e})=>(x.current=e,null),[]),R=(0,s.useCallback)((e,t)=>{"custom"===e?M():b(e),t()},[b,M]),P=(0,s.useCallback)(()=>{b("none"),w(null)},[b,w]),F=(0,s.useCallback)(({onClose:t})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(i.MenuGroup,{children:I.map(n=>(0,f.jsx)(m,{option:n,isSelected:e===n.id,onSelect:R,onClose:t},n.id))}),(0,f.jsx)(g,{isSelected:"none"===e,onRemove:P,onClose:t})]}),[I,e,R,P]),L=(0,s.useCallback)(({onToggle:e})=>(0,f.jsx)(i.Button,{__next40pxDefaultSize:!0,className:p.A.selectButton,variant:"secondary",onClick:e,children:__("Select image","jetpack-publicize-pkg")}),[]);return(0,f.jsxs)("div",{className:p.A.backgroundPicker,children:[(0,f.jsx)(r.MediaUpload,{title:__("Select Background Image","jetpack-publicize-pkg"),onSelect:T,allowedTypes:h,render:D}),(0,f.jsx)("p",{className:p.A.sourceLabel,children:v(e)}),N&&(0,f.jsx)(d.A,{media:N,isLoading:S}),E&&(0,f.jsx)(i.Notice,{status:"warning",isDismissible:!1,className:p.A.notice,children:__("Your post does not have a featured image.","jetpack-publicize-pkg")}),(0,f.jsx)(i.Dropdown,{className:p.A.selectDropdown,popoverProps:{placement:"bottom-start"},renderToggle:L,renderContent:F})]})}},76142(e,t,n){"use strict";n.d(t,{U:()=>c});var r=n(56427),i=n(27723),s=n(986),o=n(811),a=n(10790);const __=i.__;function c({localState:e}){const{url:t,isLoading:n}=(0,s.A)(!0,{shouldDebounce:!0,imageType:e.imageType,imageId:e.imageId,customText:e.customText,template:e.template||void 0,font:e.font});return(0,a.jsx)("div",{className:o.A.content,children:(0,a.jsx)("div",{className:o.A.preview,children:n?(0,a.jsx)(r.Spinner,{}):t&&(0,a.jsx)("img",{className:o.A.previewImage,src:t,alt:__("Generated preview","jetpack-publicize-pkg")})})})}},29770(e,t,n){"use strict";n.d(t,{B:()=>d});var r=n(56427),i=n(86087),s=n(27723),o=n(5637),a=n(90888),c=n(273),l=n(811),u=n(10790);const __=s.__;function d({localState:e,setLocalState:t,defaultImageId:n,featuredImageId:s}){const{isLoading:d,fontOptions:p}=(0,o.L)(),f=(0,i.useCallback)(e=>{t(t=>({...t,imageType:e}))},[t]),h=(0,i.useCallback)(e=>{t(t=>({...t,imageId:e}))},[t]),m=(0,i.useCallback)(e=>{t(t=>({...t,customText:e}))},[t]),g=(0,i.useCallback)(e=>{t(t=>({...t,template:e}))},[t]),v=(0,i.useCallback)(e=>{t(t=>({...t,font:e}))},[t]);return(0,u.jsxs)("div",{className:l.A.sidebar,children:[(0,u.jsxs)("fieldset",{className:l.A.section,children:[(0,u.jsx)("legend",{className:l.A.sectionLabel,children:__("Background image","jetpack-publicize-pkg")}),(0,u.jsx)(c._,{imageType:e.imageType,imageId:e.imageId,defaultImageId:n,featuredImageId:s,onImageTypeChanLine truncated
|
||||
_n("Ready to share to %d account.","Ready to share to %d accounts.",e.length,"jetpack-publicize-pkg"),e.length)," "]}):null,t?(0,p.jsx)(f,{}):null]})}function m(){return(0,i.useSelect)(e=>{const t=e(s.store);return!t.isCurrentPostPublished()&&t.isPublishSidebarOpened()},[])?(0,p.jsx)(d.A,{}):(0,p.jsx)(h,{})}},23653(e,t,n){"use strict";n.d(t,{e:()=>p});var r=n(56427),i=n(47143),s=n(43656),o=n(27723),a=n(51609),c=n(52472),l=n(99106),u=n(10795),d=n(10790);const __=o.__,_x=o._x;function p(){const e=(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[]),{isRePublicizeFeatureAvailable:t}=(0,c.A)(),n=(0,i.useSelect)(e=>{const t=e(s.store);return!t.isCurrentPostPublished()&&t.isPublishSidebarOpened()},[]);return(0,a.useMemo)(()=>e&&t?[()=>(0,d.jsx)(l.A,{},"schedule"),({navigate:e})=>(0,d.jsx)(u._,{onShareCompleted:e},"share")]:[({navigate:e})=>(0,d.jsx)(r.Button,{variant:"primary",onClick:e,children:n?__("Continue","jetpack-publicize-pkg"):_x("Close","Button text to close the modal.","jetpack-publicize-pkg")},"save")],[e,t,n])}},38406(e,t,n){"use strict";n.d(t,{V:()=>h});var r=n(62410),i=n(47143),s=n(43656),o=n(27723),a=n(51609),c=n(5488),l=n(75013),u=n(16501),d=n(91127),p=n(23653),f=n(10790);const __=o.__,_x=o._x;function h(){const e=(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[]),t=(0,p.e)(),n=(0,i.useSelect)(e=>{const t=e(s.store);return!t.isCurrentPostPublished()&&t.isPublishSidebarOpened()},[]),o=(0,a.useMemo)(()=>n?_x("Confirm social sharing","Modal title for pre-publish confirmation","jetpack-publicize-pkg"):e?__("Customize and share to social media","jetpack-publicize-pkg"):_x("Preview and customize","Title for social post preview modal","jetpack-publicize-pkg"),[n,e]);return(0,a.useMemo)(()=>({path:"/",title:o,isScreenLocked:!0,headerIcon:n?(0,f.jsx)(r.ux,{}):null,content:(0,f.jsx)(l.U,{}),footerContent:(0,f.jsx)(u.R,{}),footerActions:t,className:d.A["social-post-preview-screen"],"data-plan":(0,c.pq)()?"paid":"free"}),[n,t,o])}},37695(e,t,n){"use strict";n.d(t,{gj:()=>i.g,s$:()=>r.s});n(89050);var r=n(86611),i=n(51333)},86611(e,t,n){"use strict";n.d(t,{s:()=>u});var r=n(56427),i=n(27723),s=n(13022),o=(n(51609),n(3475)),a=n(29397),c=n(89050),l=n(10790);const __=i.__;function u({previewData:e,initialTabName:t,title:n,className:i,...u}){const d=(0,o.q)();return(0,l.jsx)(r.Modal,{title:n||__("Previews","jetpack-publicize-pkg"),size:"fill",className:(0,s.A)(a.A["link-preview-modal"],i),...u,children:(0,l.jsx)(c.T,{initialTabName:t,...d,...e})})}},89050(e,t,n){"use strict";n.d(t,{T:()=>a});var r=n(56427),i=n(29397),s=n(51333),o=n(10790);function a({initialTabName:e,...t}){const n=(0,s.g)();return(0,o.jsx)(r.TabPanel,{tabs:n,initialTabName:e,className:i.A["link-preview-tabs"],children:e=>(0,o.jsx)("div",{className:i.A["link-preview-tab"],children:(0,o.jsx)(e.preview,{...t})})})}},51333(e,t,n){"use strict";n.d(t,{g:()=>g});var r=n(54560),i=n(34900),s=n(8450),o=n(77123),a=n(26396),c=n(86587),l=n(5874),u=n(89014),d=n(66901),p=n(27723),f=n(51609),h=n(84705),m=n(10790);const __=p.__,_x=p._x;function g(){return(0,f.useMemo)(()=>[{title:__("Google Search","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"google"}),name:"google",preview:r.m},{title:__("X","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"x"}),name:"x",preview:i.E},{title:__("Facebook","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"facebook"}),name:"facebook",preview:d.l},{title:_x("Threads","The name of the social media network - threads.net","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"threads"}),name:"threads",preview:s.G},{title:__("LinkedIn","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"linkedin"}),name:"linkedin",preview:e=>(0,m.jsx)(o.X,{jobTitle:__("Job Title (Company Name)","jetpack-publicize-pkg"),...e})},{title:__("Nextdoor","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"nextdoor"}),name:"nextdoor",preview:a.g},{title:__("Tumblr","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"tumblr"}),name:"tumblr",preview:c.Z},{title:__("Mastodon","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"mastodon"}),name:"mastodon",preview:l.i},{title:__("Bluesky","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"bluesky"}),name:"bluesky",preview:u.c}],[])}},81669(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(83688);function i(){const{attachedMedia:e,updateJetpackSocialOptions:t}=(0,r.h)();return{attachedMedia:e,updateAttachedMedia:e=>t("attached_media",e)}}},75897(e,t,n){"use strict";n.d(t,{P:()=>c});var r=n(86087),i=n(53682),s=n(2442),o=n(71615),a=n(51202);function c(e){const t=(0,i.A)(),{isEnabled:n}=(0,s.A)(),c=e.media_source;let l,u=!1;switch(c){case"sig":case"none":l=void 0;break;case"featured-image":l=t;break;default:l=e.attached_media?.[0]?.id||t,u=(e.attached_media?.length??0)>0}const[d]=(0,o.A)(l);return(0,r.useMemo)(()=>{if("sig"===c)return{error:null,isConvertible:!1};const t=n&&"instagram-business"===e.service_name;return{error:(0,a.Wp)(d.metaData,d.mediaData,e.service_name,u,t)??null,isConvertible:(0,aLine truncated
|
||||
__("%s account connected successfully.","jetpack-publicize-pkg"),o.service_label),{type:"snackbar",isDismissible:!0}),n.select(a.store).getCurrentPostId()&&i(C()))}catch(e){let t=__("Error connecting account.","jetpack-publicize-pkg");"object"==typeof e&&"message"in e&&e.message&&(t=`${t} ${e.message}`),l(t,{type:"snackbar",isDismissible:!0})}finally{i(M(d,!1)),i(S(d))}}}function T(e,t){return{type:p.dw,connectionId:e,data:t}}function M(e,t=!0){return{type:p._6,connectionId:e,updating:t}}function D(e){return{type:p.Nv,reconnectingAccount:e}}function R(e){return async function({dispatch:t,select:n}){const i=n.getReconnectingAccount();if(!i||!e?.ID)return!1;if(![e.external_ID,...e.additional_external_users?.map(e=>e.external_ID)??[]].filter(Boolean).map(String).includes(i.external_id))return!1;await t(j());const s="ok"===n.getConnectionById(i.connection_id)?.status;t(D(void 0));const{createSuccessNotice:a,createErrorNotice:c}=(0,o.dispatch)(r.store);return s?a(__("Account reconnected successfully.","jetpack-publicize-pkg"),{type:"snackbar",isDismissible:!0}):c(__("The account could not be reconnected. Please try again.","jetpack-publicize-pkg"),{type:"snackbar",isDismissible:!0}),!0}}function P(e,t,n={}){return async function({dispatch:i,select:a}){const{createErrorNotice:c,createSuccessNotice:l}=(0,o.dispatch)(r.store),{silent:u=!1}=n,d=a.getConnectionById(e);try{const n=`/wpcom/v2/publicize/connections/${e}`;i(k()),i(T(e,t)),u||i(M(e));await s()({method:"POST",path:n,data:t})&&!u&&l(__("Account updated successfully.","jetpack-publicize-pkg"),{type:"snackbar",isDismissible:!0})}catch(t){let n=__("Error updating account.","jetpack-publicize-pkg");"object"==typeof t&&"message"in t&&t.message&&(n=`${n} ${t.message}`),i(T(e,d)),c(n,{type:"snackbar",isDismissible:!0})}finally{u||i(M(e,!1))}}}function F(e){return{type:p.xW,isOpen:e}}function L(){return F(!0)}function O(){return F(!1)}function B(e,t){return{type:p.JS,connectionId:e,data:t}}function V(e,t,n=!0){return async function({dispatch:r}){await r(B(e,t)),n&&await r(C())}}},65043(e,t,n){"use strict";n.d(t,{B4:()=>j,BN:()=>d,Bc:()=>i,DQ:()=>T,FF:()=>z,JB:()=>E,JS:()=>v,N6:()=>k,N8:()=>D,Nv:()=>u,Ob:()=>_,T7:()=>S,WB:()=>f,WH:()=>a,Wp:()=>h,_6:()=>l,_y:()=>w,aF:()=>x,aT:()=>I,af:()=>s,b5:()=>m,dA:()=>r,dw:()=>c,em:()=>A,fz:()=>b,gN:()=>C,gy:()=>N,nC:()=>o,oe:()=>M,pn:()=>y,rz:()=>g,xW:()=>p});const r="SET_CONNECTIONS",i="ADD_CONNECTION",s="TOGGLE_CONNECTION",o="DELETE_CONNECTION",a="DELETING_CONNECTION",c="UPDATE_CONNECTION",l="UPDATING_CONNECTION",u="SET_RECONNECTING_ACCOUNT",d="SET_KEYRING_RESULT",p="TOGGLE_CONNECTIONS_MODAL",f="ADD_ABORT_CONTROLLER",h="REMOVE_ABORT_CONTROLLERS",m="DEFAULT",g="REFRESH_CONNECTIONS",v="CUSTOMIZE_CONNECTION",b="FETCH_POST_SHARE_STATUS",w="RECEIVE_POST_SHARE_STATUS",x="POLLING_FOR_POST_SHARE_STATUS",_="TOGGLE_UNIFIED_MODAL",y="SET_UNIFIED_MODAL_INITIAL_PATH",k="SET_UNIFIED_MODAL_SCREEN_LOCK",j="SET_UNIFIED_MODAL_DATA",C="SET_IS_SHARING_CURRENT_POST",A="SET_IS_SCHEDULING_SHARES",S="START_RENDERING_MESSAGES",E="RECEIVE_RENDERED_MESSAGES",N="FINISH_RENDERING_MESSAGES",z="SET_TRAFFIC_INTERVAL",I="FETCH_TRAFFIC_REFERRERS",T="RECEIVE_TRAFFIC_REFERRERS",M="RECEIVE_TRAFFIC_REFERRERS_ERROR",D="FETCHING_KEYRING_RESULT"},84970(e,t,n){"use strict";n.d(t,{A:()=>m});var r=n(83373),i=n(17426),s=n(8926),o=n(68100),a=n(59168),c=n(82744),l=n(38251),u=n(82676),d=n(29715),p=n(32425),f=n(76473),h=n(80968);const m={...c,...a,...r,...l,...n(33998),...d,...p,...u,...o,...s,...f,...h,...i}},17426(e,t,n){"use strict";n.r(t),n.d(t,{finishRenderingMessages:()=>a,receiveRenderedMessages:()=>o,startRenderingMessages:()=>s});var r=n(69433),i=n(65043);function s(e,t,n={}){return{type:i.T7,cacheKey:(0,r.a)(e,t,n)}}function o(e,t,n,s={}){return{type:i.JB,cacheKey:(0,r.a)(e,t,s),batch:n}}function a(e,t,n={}){return{type:i.gy,cacheKey:(0,r.a)(e,t,n)}}},8926(e,t,n){"use strict";n.r(t),n.d(t,{createScheduledShare:()=>l,deleteScheduledShare:()=>u,scheduleShares:()=>p,setIsSchedulingShares:()=>d});var r=n(3582),i=n(43656),s=n(27723),o=n(692),a=n(65043);const __=s.__,c="social-scheduled-share";function l(e){return async function({registry:t}){const{saveEntityRecord:n}=t.dispatch(r.store),{getLastEntitySaveError:i}=t.select(r.store),{createErrorNotice:s}=t.dispatch(o.store),a=await n("wpcom/v2","publicize/scheduled-actions",e);if(!a){const e=i("wpcom/v2","publicize/scheduled-actions");let t=__("There was an error scheduling the post.","jetpack-publicize-pkg");e?.message&&(t+=" "+e.message),s(t,{type:"snackbar",id:c})}return a}}function u(e){return async function({registry:t}){const{deleteEntityRecord:n}=t.dispatch(r.store),{getLastEntityDeleteError:i}=t.select(r.store),{createErrorNotice:s}=t.dispatch(o.store);if(!await n("wpcom/v2","publicize/scheduled-actions",e)){const t=i("wpcom/v2","publicize/scheduled-actions",e);let n=__("There was an error deleting the item.","jetpack-publicize-pkg");t?.message&&(n+=" "+t.message),s(n,{type:"snackbar"})}}}function d(e){return{tyLine truncated
|
||||
__("Toggle connection: %1$s on %2$s","jetpack-publicize-pkg"),e.display_name,e.service_label)}},84039(e,t,n){"object"==typeof window&&window.JetpackScriptData?.social?.assets_url&&(n.p=window.JetpackScriptData.social.assets_url)},69433(e,t,n){"use strict";function r(e){let t=2166136261;for(let n=0;n<e.length;n++)t=(Math.imul(t,16777619)+e.charCodeAt(n))%4294967291;return`${e.length}:${t.toString(36)}`}function i(e,t,n={}){return`${e}|${function(e,t={}){return 0!==e.length||t.title||t.excerpt||t.content?JSON.stringify([e.map(e=>[e.connection_id,e.message??"",Boolean(e.is_social_post)]),t.title??"",t.excerpt??"",r(t.content??"")]):"[]"}(t,n)}`}n.d(t,{a:()=>i})},67808(e,t,n){"use strict";n.d(t,{x:()=>i});var r=n(98137);const i=(e,t,n)=>{const i=new r.A;i.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+i.getScreenCenterSpecs(780,700));const s=i.windowInstance;if(!s||s.closed||void 0===s.closed)return!1;const o=new URL(e).searchParams.get("request_id");if(o&&"undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("jetpack-social-keyring");let r=!1;const i=()=>{setTimeout(()=>{r||n?.()},1e3)},s=()=>{window.addEventListener("focus",i,{once:!0})},a=()=>{window.removeEventListener("blur",s),window.removeEventListener("focus",i)};e.addEventListener("message",n=>{"keyring-result"===n.data?.type&&n.data?.requestId===o&&(r=!0,clearTimeout(c),a(),e.close(),t())}),window.addEventListener("blur",s,{once:!0});const c=setTimeout(()=>{a(),e.close(),r||n?.()},3e5);return!0}let a;return i.once("close",()=>{t(a?.ID?a:{})}),i.on("message",e=>{a=e?.data}),!0}},40976(e,t,n){"use strict";n.d(t,{Jc:()=>a,nE:()=>s,pq:()=>o,uq:()=>c});var r=n(97999),i=n(44727);function s(){return(0,r.getScriptData)()?.social}function o(){return(0,r.siteHasFeature)(i.q.ENHANCED_PUBLISHING)}function a(){return(0,r.getAdminUrl)("admin.php?page=jetpack-social")}function c(e){return`${s()?.assets_url??""}assets/${e}`}},82772(e,t,n){"use strict";function r(e){if(!e||"object"!=typeof e)return!1;const t="code"in e&&"string"==typeof e.code,n="errors"in e&&Array.isArray(e.errors)&&e.errors.length>0;return t||n}n.d(t,{C:()=>r})},51604(e,t,n){"use strict";function r(e){return e&&"shares"in e&&e.done&&e.shares.sort((e,t)=>t.timestamp-e.timestamp),e}function i(e){return t=>t.service_name===e.service&&(e.external_id?t.external_id===e.external_id:t.connection_id===e.connection_id.toString())}function s(e,t){return e.service===t.service&&(e.connection_id===t.connection_id||!(!e.external_id&&!t.external_id)&&e.external_id===t.external_id)}n.d(t,{Ri:()=>s,eJ:()=>i,xA:()=>r})},42753(e,t,n){"use strict";n.d(t,{D:()=>s});var r=n(47143),i=n(43656);function s(){return(0,r.useSelect)(e=>"jetpack-social-note"===e(i.store).getCurrentPostType(),[])}},77571(e,t,n){"use strict";n.d(t,{Oc:()=>s});var r=n(39987),i=n(15132);function s(){const{enabledConnections:e}=(0,i.A)();return function(e=[]){const t=e.map(e=>r.mB[e]?.charLimit).filter(e=>void 0!==e);return t.length>0?Math.min(...t):255}(e.map(e=>e.service_name))}},21147(e,t,n){"use strict";function r(e,t){return Array(t+1).join(e)}n.d(t,{A:()=>M});var i=["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,i)}var o=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function a(e){return l(e,o)}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 f(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 h(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(m(i,t,n))return i}}function m(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 g(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function v(e,t,n){return e&&e.parentNode===t||n(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,n){return n.br+"\n"}},d.heading={filter:["h1","h2","h3","h4","h5","h6"Line truncated
|
||||
(0,s.__)("Unknown status for %1$s","jetpack-publicize-pkg"),n.name)};function v({filter:e,view:t,onChangeView:n}){const r=e.operators?.map(e=>({value:e,label:(0,d.bx)(e)?.label||e})),o=t.filters?.find(t=>t.field===e.field),a=o?.operator||e.operators[0];return r.length>1&&(0,f.jsxs)(c.B,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,f.jsx)(i.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,f.jsx)(i.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,s.__)("Conditions","jetpack-publicize-pkg"),value:a,options:r,onChange:r=>{const i=r,s=o?.operator,a=o?[...(t.filters??[]).map(t=>{if(t.field===e.field){const e=(0,d.bx)(s)?.selection,n=(0,d.bx)(i)?.selection,r=e!==n||[e,n].includes("custom");return{...t,value:r?void 0:t.value,operator:i}}return t})]:[...t.filters??[],{field:e.field,operator:i,value:void 0}];n({...t,page:1,filters:a})},size:"small",variant:"minimal",hideLabelFromVision:!0})]})}function b({addFilterRef:e,openedFilter:t,fields:n,...d}){const b=(0,o.useRef)(null),{filter:w,view:x,onChangeView:_}=d,y=x.filters?.find(e=>e.field===w.field);let k=[];const j=(0,o.useMemo)(()=>{const e=n.find(e=>e.id===w.field);return e?{...e,getValue:({item:t})=>t[e.id]}:e},[n,w.field]),{elements:C}=(0,p.A)({elements:w.elements,getElements:w.getElements});if(C.length>0)k=C.filter(e=>w.singleSelection?e.value===y?.value:y?.value?.includes(e.value));else if(Array.isArray(y?.value)){const e=y.value.map(e=>{const t=j?.getValueFormatted({item:{[j.id]:e},field:j});return t||String(e)});k=[{value:y.value,label:e}]}else if("object"==typeof y?.value)k=[{value:y.value,label:y.value}];else if(void 0!==y?.value){const e=void 0!==j?j.getValueFormatted({item:{[j.id]:y.value},field:j}):String(y.value);k=[{value:y.value,label:e}]}const A=w.isPrimary,S=y?.isLocked,E=!S&&void 0!==y?.value,N=!S&&(!A||E);return(0,f.jsx)(i.Dropdown,{defaultOpen:t===w.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{b.current?.focus()},renderToggle:({isOpen:t,onToggle:n})=>(0,f.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,f.jsx)(i.Tooltip,{text:(0,s.sprintf)(/* translators: 1: Filter name. */ /* translators: 1: Filter name. */
|
||||
(0,s.__)("Filter by: %1$s","jetpack-publicize-pkg"),w.name.toLowerCase()),placement:"top",children:(0,f.jsx)("div",{className:(0,r.A)("dataviews-filters__summary-chip",{"has-reset":N,"has-values":E,"is-not-clickable":S}),role:"button",tabIndex:S?-1:0,onClick:()=>{S||n()},onKeyDown:e=>{!S&&[h,m].includes(e.key)&&(n(),e.preventDefault())},"aria-disabled":S,"aria-pressed":t,"aria-expanded":t,ref:b,children:(0,f.jsx)(g,{activeElements:k,filterInView:y,filter:w})})}),N&&(0,f.jsx)(i.Tooltip,{text:A?(0,s.__)("Reset","jetpack-publicize-pkg"):(0,s.__)("Remove","jetpack-publicize-pkg"),placement:"top",children:(0,f.jsx)("button",{className:(0,r.A)("dataviews-filters__summary-chip-remove",{"has-values":E}),onClick:()=>{_({...x,page:1,filters:x.filters?.filter(e=>e.field!==w.field)}),A?b.current?.focus():e.current?.focus()},children:(0,f.jsx)(i.Icon,{icon:a.A})})})]}),renderContent:()=>(0,f.jsxs)(c.B,{direction:"column",justify:"flex-start",children:[(0,f.jsx)(v,{...d}),d.filter.hasElements?(0,f.jsx)(l.A,{...d,filter:{...d.filter,elements:C}}):(0,f.jsx)(u.A,{...d,fields:n})]})})}},40497(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(86087),i=n(62427),s=n(15670),o=n(10790);var a=function(e){const{isShowingFilter:t}=(0,r.useContext)(i.A);return t?(0,o.jsx)(s.A,{...e}):null}},15670(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(86087),i=n(98839),s=n(24463),o=n(17381),a=n(56496),c=n(17580),l=n(62427),u=n(10790);var d=(0,r.memo)(function({className:e}){const{fields:t,view:n,onChangeView:d,openedFilter:p,setOpenedFilter:f}=(0,r.useContext)(l.A),h=(0,r.useRef)(null),m=(0,c.A)(t,n),g=(0,u.jsx)(o.A,{filters:m,view:n,onChangeView:d,ref:h,setOpenedFilter:f},"add-filter"),v=m.filter(e=>e.isVisible);if(0===v.length)return null;const b=[...v.map(e=>(0,u.jsx)(s.A,{filter:e,view:n,fields:t,onChangeView:d,addFilterRef:h,openedFilter:p},e.field)),g];return b.push((0,u.jsx)(a.A,{filters:m,view:n,onChangeView:d},"reset-filters")),(0,u.jsx)(i.B,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:b})})},78264(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(64168),i=n(29491),s=n(86087),o=n(56427),a=n(68416),c=n(10790);function l({filter:e,view:t,onChangeView:n,fields:l}){const u=t.filters?.find(t=>t.field===e.field),d=(0,a.L)(e,u),p=(0,s.useMemo)(()=>{const t=l.find(t=>t.id===e.field);return t?{...t,isValid:{},isDisabled:()=>!1,isVisible:()=>!0,getValue:({item:e})=>e[t.id],setValue:({value:e})=>({[t.id]:e})}:t},[l,e.field]),f=(0,s.useMemo)(()=>(t.filters??[]).reduce((e,t)=>(e[t.field]=t.value,e),{}),[t.filters]),h=(0,i.useEvent)(i=>{if(!p||!u)return;const s=p.getValue({item:i});r(s,d)||n({...t,filters:(t.filters??[]).map(t=>t.field===e.field?{...t,operator:u.operator||e.operators[0],value:""===s?void 0:s}:t)})});return p&&p.Edit&&u?(0,c.jsx)(o.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,c.jsx)(p.Edit,{hideLabelFromVision:!0,data:f,field:p,operator:u.operator,onChange:h})}):null}},56496(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),i=n(27723),s=n(10790);function o({filters:e,view:t,onChangeView:n}){const o=!t.search&&!t.filters?.some(t=>{return!(t.isLocked||void 0===t.value&&(n=t.field,e.some(e=>e.field===n&&e.isPrimary)));var n});return(0,s.jsx)(r.Button,{disabled:o,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{n({...t,page:1,search:"",filters:t.filters?.filter(e=>!!e.isLocked)||[]})},children:(0,i.__)("Reset","jetpack-publicize-pkg")})}},33818(e,t,n){"use strict";n.d(t,{A:()=>E});var r=n(85370),i=n(39448),s=n(51216),o=n(63541),a=n(867),c=n(9962),l=n(44775),u=n(13022),d=n(29491),p=n(27723),f=n(86087),h=n(56427),m=n(88901),g=n(20907),v=n(16064),b=n(68416),w=n(32869),x=n(10790);function _(e=""){return l(e.trim().toLowerCase())}var y=(e,t,n)=>e.singleSelection?n:Array.isArray(t?.value)?t.value.includes(n)?t.value.filter(e=>e!==n):[...t.value,n]:[n];function k(e,t){return`${e}-${t}`}var j=({selected:e})=>(0,x.jsx)("span",{className:(0,u.A)("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,x.jsx)(h.Icon,{icon:m.A})}),C=({selected:e})=>(0,x.jsx)("span",{className:(0,u.A)("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function A({view:e,filter:t,onChangeView:n}){const r=(0,d.useInstanceId)(A,"dataviews-filter-list-box"),[i,s]=(0,f.useState)(1===t.operators?.length?void 0:null),o=e.filters?.find(e=>e.field===t.field),a=(0,b.L)(t,o);return(0,x.jsx)(h.Composite,{virtualFocus:!0,focusLoop:!0,activeId:i,setActiveId:s,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,p.sprintf)(/* translators: List of items for a filter. 1: Filter name. e.g.: "List of: Author". */ /* translators: List of items for a filter. 1: Filter name. e.g.: "List of: Author". */
|
||||
(0,p.__)("List of: %1$s","jetpack-publicize-pkg"),t.name),onFocusVisible:()=>{!i&&t.elements.length&&s(k(r,t.elements[0].value))},render:(0,x.jsx)(h.Composite.Typeahead,{}),children:t.elements.map(i=>(0,x.jsxs)(h.Composite.Hover,{render:(0,x.jsx)(h.Composite.Item,{id:k(r,i.value),render:(0,x.jsx)("div",{"aria-label":i.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{const r=o?[...(e.filters??[]).map(e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:y(t,o,i.value)}:e)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:y(t,o,i.value)}];n({...e,page:1,filters:r})}}),children:[t.singleSelection&&(0,x.jsx)(C,{selected:a===i.value}),!t.singleSelection&&(0,x.jsx)(j,{selected:a.includes(i.value)}),(0,x.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:i.label,children:i.label})]},i.value))})}function S({view:e,filter:t,onChangeView:n}){const[l,u]=(0,f.useState)(""),d=(0,f.useDeferredValue)(l),m=e.filters?.find(e=>e.field===t.field),w=(0,b.L)(t,m),y=(0,f.useMemo)(()=>{const e=_(d);return t.elements.filter(t=>_(t.label).includes(e))},[t.elements,d]);return(0,x.jsxs)(c.v,{selectedValue:w,setSelectedValue:r=>{const i=m?[...(e.filters??[]).map(e=>e.field===t.field?{...e,operator:m.operator||t.operators[0],value:r}:e)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:r}];n({...e,page:1,filters:i})},setValue:u,children:[(0,x.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,x.jsx)(v.s,{render:(0,x.jsx)(o.u,{}),children:(0,p.__)("Search items","jetpack-publicize-pkg")}),(0,x.jsx)(r.G,{autoSelect:"always",placeholder:(0,p.__)("Search","jetpack-publicize-pkg"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,x.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,x.jsx)(h.Icon,{icon:g.A})})]}),(0,x.jsxs)(a.e,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[y.map(e=>(0,x.jsxs)(i.x,{resetValueOnSelect:!1,value:e.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,x.jsx)(C,{selected:w===e.value}),!t.singleSelection&&(0,x.jsx)(j,{selected:w.includes(e.value)}),(0,x.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:e.label,children:[(0,x.jsx)(s.K,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,x.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:e.description})]})]},e.value)),!y.length&&(0,x.jsx)("p",{children:(0,p.__)("No results found","jetpack-publicize-pkg")})]})]})}function E(e){const{elements:t,isLoading:n}=(0,w.A)({elements:e.filter.elements,getElements:e.filter.getElements});if(n)return(0,x.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,x.jsx)(h.Spinner,{})});if(0===t.length)return(0,x.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,p.__)("No elements found","jetpack-publicize-pkg")});const r=t.length>10?S:A;return(0,x.jsx)(r,{...e,filter:{...e.filter,elements:t}})}},40333(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(86087),i=n(56427),s=n(63371),o=n(27723),a=n(17381),c=n(62427),l=n(10790);function u({buttonRef:e,filtersCount:t,children:n}){return(0,r.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,l.jsxs)(l.Fragment,{children:[n,!!t&&(0,l.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var d=function(){const{filters:e,view:t,onChangeView:n,setOpenedFilter:d,isShowingFilter:p,setIsShowingFilter:f}=(0,r.useContext)(c.A),h=(0,r.useRef)(null),m=(0,r.useCallback)(e=>{n(e),f(!0)},[n,f]);if(0===e.length)return null;const g=e.some(e=>e.isVisible),v={label:(0,o.__)("Add filter","jetpack-publicize-pkg"),"aria-expanded":!1,isPressed:!1},b={label:(0,o._x)("Filter","verb","jetpack-publicize-pkg"),"aria-expanded":p,isPressed:p,onClick:()=>{p||d(null),f(!p)}},w=e.some(e=>e.isPrimary||e.isLocked),x=(0,l.jsx)(i.Button,{ref:h,className:"dataviews-filters__visibility-toggle",size:"compact",icon:s.A,disabled:w,accessibleWhenDisabled:!0,...g?b:v});return(0,l.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:g?(0,l.jsx)(u,{buttonRef:h,filtersCount:t.filters?.length,children:x}):(0,l.jsx)(a.L,{filters:e,view:t,onChangeView:m,setOpenedFilter:d,triggerProps:{render:x}})})}},17580(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(86087),i=n(71e3);var s=function(e,t){return(0,r.useMemo)(()=>{const n=[];return e.forEach(e=>{if(!1===e.filterBy||!e.hasElements&&!e.Edit)return;const r=e.filterBy.operators,s=!!e.filterBy?.isPrimary,o=t.filters?.some(t=>t.field===e.id&&!!t.isLocked)??!1;n.push({field:e.id,name:e.label,elements:e.elements,getElements:e.getElements,hasElements:e.hasElements,singleSelection:r.some(e=>(0,i.LX)(e)),operators:r,isVisible:o||s||!!t.filtLine truncated
|
||||
// translators: %s: The label of the field e.g. "Status".
|
||||
// translators: %s: The label of the field e.g. "Status".
|
||||
(0,r.sprintf)((0,r.__)("%s: <groupName />","jetpack-publicize-pkg"),n.label).trim(),{groupName:(0,o.jsx)(n.render,{item:t[0],field:n})}):(0,o.jsx)(n.render,{item:t[0],field:n});return(0,o.jsxs)(s.B,{direction:"column",className:"dataviews-view-activity__group",children:[(0,o.jsx)("h3",{className:"dataviews-view-activity__group-header",children:l}),c]},e)}},19890(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(13022),i=n(86087),s=n(47143),o=n(29491),a=n(98839),c=n(16064),l=n(87895),u=n(62427),d=n(75411),p=n(10790);var f=function(e){const{view:t,actions:n,item:f,titleField:h,mediaField:m,descriptionField:g,otherFields:v,posinset:b,onClickItem:w,renderItemLink:x,isItemClickable:_}=e,{showTitle:y=!0,showMedia:k=!0,showDescription:j=!0,infiniteScrollEnabled:C}=t,A=(0,i.useRef)(null),S=(0,s.useRegistry)(),{paginationInfo:E}=(0,i.useContext)(u.A),{primaryActions:N,eligibleActions:z}=(0,i.useMemo)(()=>{const e=n.filter(e=>!e.isEligible||e.isEligible(f));return{primaryActions:e.filter(e=>e.isPrimary),eligibleActions:e}},[n,f]),I=(0,o.useViewportMatch)("medium","<"),T=t.layout?.density??"balanced",M=k&&"compact"!==T&&m?.render?(0,p.jsx)(m.render,{item:f,field:m,config:{sizes:"comfortable"===T?"32px":"24px"}}):null,D=(0,p.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:M||(0,p.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),R=y&&h?.render?(0,p.jsx)(h.render,{item:f,field:h}):null,P=(0,i.useMemo)(()=>"comfortable"===T?"md":"sm",[T]);return(0,p.jsx)("div",{ref:A,role:C?"article":void 0,"aria-posinset":b,"aria-setsize":C?E.totalItems:void 0,className:(0,r.A)("dataviews-view-activity__item","compact"===T&&"is-compact","balanced"===T&&"is-balanced","comfortable"===T&&"is-comfortable"),children:(0,p.jsxs)(a.B,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,p.jsx)(a.B,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:D}),(0,p.jsxs)(a.B,{direction:"column",gap:P,align:"flex-start",className:"dataviews-view-activity__item-content",children:[R&&(0,p.jsx)(d.V,{item:f,isItemClickable:_,onClickItem:w,renderItemLink:x,className:"dataviews-view-activity__item-title",children:R}),j&&g&&(0,p.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,p.jsx)(g.render,{item:f,field:g})}),(0,p.jsx)("div",{className:"dataviews-view-activity__item-fields",children:v.map(e=>(0,p.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,p.jsx)(c.s,{className:"dataviews-view-activity__item-field-label",render:(0,p.jsx)("span",{}),children:e.label}),(0,p.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,p.jsx)(e.render,{item:f,field:e})})]},e.id))}),!!N?.length&&(0,p.jsx)(l.UV,{item:f,actions:N,registry:S,buttonVariant:"secondary"})]}),(N.length<z.length||I&&z.length>0)&&(0,p.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,p.jsx)(l.Ay,{item:f,actions:z,isCompact:!0})})]})})}},25065(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(19890),i=n(51609);function s(e){return!!e}function o(e){const{data:t,fields:n,getItemId:o,view:a}=e,c=n.find(e=>e.id===a.titleField),l=n.find(e=>e.id===a.mediaField),u=n.find(e=>e.id===a.descriptionField),d=(a?.fields??[]).map(e=>n.find(t=>e===t.id)).filter(s);return t.map((t,n)=>(0,i.createElement)(r.A,{...e,key:o(t),item:t,mediaField:l,titleField:c,descriptionField:u,otherFields:d,posinset:a.infiniteScrollEnabled?n+1:void 0}))}},78935(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(13022),i=n(56427),s=n(98839),o=n(29494),a=n(56400),c=n(25065),l=n(29183),u=n(10790);function d(e){const{empty:t,data:n,fields:d,isLoading:p,view:f,className:h}=e,m=(0,l.o)(!!p),g=!!n?.length,v=f.groupBy?.field?d.find(e=>e.id===f.groupBy?.field):null,b=g&&v?(0,o.A)(n,v):null,w=f.infiniteScrollEnabled&&!b;if(!g)return(0,u.jsx)("div",{className:(0,r.A)("dataviews-no-results",{"is-refreshing":m}),children:t});const x=!w&&!!p,_=(0,r.A)("dataviews-view-activity",h,{"is-refreshing":!w&&m}),y=b?Array.from(b.entries()):[];return g&&v&&b?(0,u.jsx)(s.B,{direction:"column",gap:"sm",className:_,inert:x?"true":void 0,children:y.map(([t,n])=>(0,u.jsx)(a.A,{groupName:t,groupData:n,groupField:v,showLabel:!1!==f.groupBy?.showLabel,children:(0,u.jsx)(c.A,{...e,data:n})},t))}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:_,role:f.infiniteScrollEnabled?"feed":void 0,inert:x?"true":void 0,children:(0,u.jsx)(c.A,{...e})}),w&&p&&(0,u.jsx)("p",{className:"dataviews-loading-more",children:(0,u.jsx)(i.Spinner,{})})]})}},20478(e,t,n){"use strict";n.d(t,{A:()=>k});var r=n(13022),i=n(56427),s=n(98839),o=n(27723),a=n(29491),c=n(48558),l=n(86087),u=n(80115),d=n(87895),p=n(31020),f=n(62427),h=n(51638),m=n(75411),g=n(48069),v=n(73388),b=n(86937),w=n(10790),{Badge:x}=(0,u.T)(i.privateApis);function _(e,t){const n=[];for(let r=0,i=e.length;r<i;r+=t)n.push(e.slice(r,r+t));return n}var y=(0,l.forwardRef)(function e({view:t,selection:n,onChangeSeLine truncated
|
||||
(0,o.__)("Row %d","jetpack-publicize-pkg"),t+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${N}, minmax(0, 1fr) )`}}),children:e.map(e=>{const t=C(e);return(0,w.jsx)(i.Composite.Item,{render:n=>(0,w.jsx)(y,{...n,id:t,role:"gridcell",view:u,selection:p,onChangeSelection:m,onClickItem:x,isItemClickable:k,renderItemLink:j,getItemId:C,item:e,actions:A,mediaField:T,titleField:I,descriptionField:M,regularFields:R,badgeFields:P,hasBulkActions:z,config:{sizes:F}})},t)})},t))})]})}},78936(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(13022),i=n(56427),s=n(27723),o=n(98839),a=n(29494),c=n(20478),l=n(29183),u=n(10790);var d=function({actions:e,data:t,fields:n,getItemId:d,isLoading:p,onChangeSelection:f,onClickItem:h,isItemClickable:m,renderItemLink:g,selection:v,view:b,className:w,empty:x}){const _=(0,l.o)(!!p),y=!!t?.length,k=b.groupBy?.field?n.find(e=>e.id===b.groupBy?.field):null,j=k?(0,a.A)(t,k):null,C=b.infiniteScrollEnabled&&!j;if(!y)return(0,u.jsx)("div",{className:(0,r.A)("dataviews-no-results",{"is-refreshing":_}),children:x});const A={className:(0,r.A)(w,{"is-refreshing":!C&&_}),inert:!C&&p?"true":void 0,isLoading:p,view:b,fields:n,selection:v,onChangeSelection:f,onClickItem:h,isItemClickable:m,renderItemLink:g,getItemId:d,actions:e};return(0,u.jsxs)(u.Fragment,{children:[y&&k&&j&&(0,u.jsx)(o.B,{direction:"column",gap:"lg",children:Array.from(j.entries()).map(([e,t])=>(0,u.jsxs)(o.B,{direction:"column",gap:"sm",children:[(0,u.jsx)("h3",{className:"dataviews-view-grid__group-header",children:!1===b.groupBy?.showLabel?e:(0,s.sprintf)(
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,s.__)("%1$s: %2$s","jetpack-publicize-pkg"),k.label,e)}),(0,u.jsx)(c.A,{...A,data:t,isInfiniteScroll:!1})]},e))}),!j&&(0,u.jsx)(c.A,{...A,data:t,isInfiniteScroll:!!C}),C&&p&&(0,u.jsx)("p",{className:"dataviews-loading-more",children:(0,u.jsx)(i.Spinner,{})})]})}},48069(e,t,n){"use strict";n.d(t,{Z:()=>a});n(56427),n(27723);var r=n(86087),i=n(62427),s=(n(10790),[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}]),o=s[2].value;function a(){const e=(0,r.useContext)(i.A),t=e.view;return(0,r.useMemo)(()=>{const n=e.containerWidth,r=t.layout?.previewSize??o,i=Math.floor((n+32)/(r+32));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}},73123(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(27723),i=n(55565),s=n(40599),o=n(77174),a=n(40743),c=n(55620),l=n(78774),u=n(78936),d=n(45704),p=n(78935),f=n(39881),h=n(65581),m=n(66310),g=n(6660),v=n(44491),b=[{type:m.Ad,label:(0,r.__)("Table","jetpack-publicize-pkg"),component:l.A,icon:i.A,viewConfigOptions:g.A},{type:m.Ul,label:(0,r.__)("Grid","jetpack-publicize-pkg"),component:u.A,icon:s.A,viewConfigOptions:v.A},{type:m.mA,label:(0,r.__)("List","jetpack-publicize-pkg"),component:d.A,icon:(0,r.isRTL)()?o.A:a.A,viewConfigOptions:g.A},{type:m.br,label:(0,r.__)("Activity","jetpack-publicize-pkg"),component:p.A,icon:c.A,viewConfigOptions:g.A},{type:m.dL,label:(0,r.__)("Grid","jetpack-publicize-pkg"),component:f.A,icon:s.A,viewConfigOptions:v.A,isPicker:!0},{type:m.Ry,label:(0,r.__)("Table","jetpack-publicize-pkg"),component:h.A,icon:i.A,viewConfigOptions:g.A,isPicker:!0}]},45704(e,t,n){"use strict";n.d(t,{A:()=>j});var r=n(13022),i=n(29491),s=n(56427),o=n(86087),a=n(27723),c=n(57855),l=n(47143),u=n(98839),d=n(16064),p=n(80115),f=n(87895),h=n(62427),m=n(29183),g=n(29494),v=n(10790),{Menu:b}=(0,p.T)(s.privateApis);function w(e){return`${e}-item-wrapper`}function x(e){return`${e}-dropdown`}function _({idPrefix:e,primaryAction:t,item:n}){const r=(0,l.useRegistry)(),[i,a]=(0,o.useState)(!1),c=function(e,t){return`${e}-primary-action-${t}`}(e,t.id),u="string"==typeof t.label?t.label:t.label([n]);return"RenderModal"in t?(0,v.jsx)("div",{role:"gridcell",children:(0,v.jsx)(s.Composite.Item,{id:c,render:(0,v.jsx)(s.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:u,size:"small",onClick:()=>a(!0)}),children:i&&(0,v.jsx)(f.cX,{action:t,items:[n],closeModal:()=>a(!1)})})},t.id):(0,v.jsx)("div",{role:"gridcell",children:(0,v.jsx)(s.Composite.Item,{id:c,render:(0,v.jsx)(s.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([n],{registry:r})},children:u})})},t.id)}function y({view:e,actions:t,idPrefix:n,isSelected:i,item:p,titleField:m,mediaField:g,descriptionField:y,onSelect:k,otherFields:j,onDropdownTriggerKeyDown:C,posinset:A}){const{showTitle:S=!0,showMedia:E=!0,showDescription:N=!0,infiniteScrollEnabled:z}=e,I=(0,o.useRef)(null),T=`${n}-label`,M=`${n}-description`,D=(0,l.useRegistry)(),[R,P]=(0,o.useState)(!1),[F,L]=(0,o.useState)(null),O=({type:e})=>{P("mouseenter"===e)},{paginationInfo:B}=(0,o.useContext)(h.A);(0,o.useEffect)(()=>{i&&I.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[i]);const{primaryAction:V,eligibleActions:q}=(0,o.useMemo)(()=>{const e=t.filter(e=>!e.isEligible||e.isEligible(p));return{primaryAction:e.filter(e=>e.isPrimary)[0],eligibleActions:e}},[t,p]),U=V&&1===t.length,H=E&&g?.render?(0,v.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,v.jsx)(g.render,{item:p,field:g,config:{sizes:"52px"}})}):null,$=S&&m?.render?(0,v.jsx)(m.render,{item:p,field:m}):null,W=N&&y?.render,G=!!H&&!W&&!j.length,Z=q?.length>0&&(0,v.jsxs)(u.B,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[V&&(0,v.jsx)(_,{idPrefix:n,primaryAction:V,item:p}),!U&&(0,v.jsxs)("div",{role:"gridcell",children:[(0,v.jsxs)(b,{placement:"bottom-end",children:[(0,v.jsx)(b.TriggerButton,{render:(0,v.jsx)(s.Composite.Item,{id:x(n),render:(0,v.jsx)(s.Button,{size:"small",icon:c.A,label:(0,a.__)("Actions","jetpack-publicize-pkg"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:C})})}),(0,v.jsx)(b.Popover,{children:(0,v.jsx)(f.oK,{actions:q,item:p,registry:D,setActiveModalAction:L})})]}),!!F&&(0,v.jsx)(f.cX,{action:F,items:[p],closeModal:()=>L(null)})]})]});return(0,v.jsx)(s.Composite.Row,{ref:I,render:(0,v.jsx)("div",{"aria-posinset":A,"aria-setsize":z?B.totalItems:void 0}),role:z?"article":"row",className:(0,r.A)({"is-selected":i,"is-hovered":R}),onMouseEnter:O,onMouseLeave:O,children:(0,v.jsxs)(u.B,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,v.jsx)("div",{role:"gridcell",children:(0,v.jsx)(s.Composite.Item,{id:w(n),"aria-pressed":i,"aria-labelledby":T,"aria-describedby":M,className:"dataviews-view-list__item",onClick:()=>k(p)})}),(0,v.jsxs)(u.B,{direction:"row",gap:"md",justify:"start",align:G?"center":"flex-start",style:{Line truncated
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,a.__)("%1$s: %2$s","jetpack-publicize-pkg"),H.label,e)}),n.map(e=>{const n=M(e);return(0,v.jsx)(y,{view:h,idPrefix:n,actions:t,item:e,isSelected:e===S,onSelect:T,mediaField:N,titleField:E,descriptionField:z,otherFields:I,onDropdownTriggerKeyDown:q},n)})]},e))})}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(s.Composite,{ref:F,id:C,render:(0,v.jsx)("div",{}),className:(0,r.A)("dataviews-view-list",b,{[`has-${h.layout?.density}-density`]:h.layout?.density&&["compact","comfortable"].includes(h.layout.density),"is-refreshing":!W&&A}),role:h.infiniteScrollEnabled?"feed":"grid",activeId:R,setActiveId:P,inert:!W&&d?"true":void 0,children:n.map((e,n)=>{const r=M(e);return(0,v.jsx)(y,{view:h,idPrefix:r,actions:t,item:e,isSelected:e===S,onSelect:T,mediaField:N,titleField:E,descriptionField:z,otherFields:I,onDropdownTriggerKeyDown:q,posinset:h.infiniteScrollEnabled?n+1:void 0},r)})}),W&&d&&(0,v.jsx)("p",{className:"dataviews-loading-more",children:(0,v.jsx)(s.Spinner,{})})]}):(0,v.jsx)("div",{className:(0,r.A)("dataviews-no-results",{"is-refreshing":A}),children:_})}},39881(e,t,n){"use strict";n.d(t,{A:()=>_});var r=n(13022),i=n(56427),s=n(27723),o=n(29491),a=n(86087),c=n(98839),l=n(80115),u=n(31020),d=n(62427),p=n(14820),f=n(73388),h=n(29494),m=n(48069),g=n(86937),v=n(10790),{Badge:b}=(0,l.T)(i.privateApis);function w({view:e,multiselect:t,selection:n,onChangeSelection:o,getItemId:l,item:d,mediaField:p,titleField:f,descriptionField:h,regularFields:m,badgeFields:w,config:x,posinset:_,setsize:y}){const{showTitle:k=!0,showMedia:j=!0,showDescription:C=!0}=e,A=l(d),S=(0,a.useRef)(null),E=n.includes(A);(0,g.B)(S,_);const N=p?.render?(0,v.jsx)(p.render,{item:d,field:p,config:x}):null,z=k&&f?.render?(0,v.jsx)(f.render,{item:d,field:f}):null;return(0,v.jsxs)(i.Composite.Item,{ref:S,"aria-label":f?f.getValue({item:d})||(0,s.__)("(no title)","jetpack-publicize-pkg"):void 0,render:({children:e,...t})=>(0,v.jsx)(c.B,{direction:"column",children:e,...t}),role:"option","aria-posinset":_,"aria-setsize":y,className:(0,r.A)("dataviews-view-picker-grid__card",{"is-selected":E}),"aria-selected":E,onClick:()=>{if(E)o(n.filter(e=>A!==e));else{const e=t?[...n,A]:[A];o(e)}},children:[j&&N&&(0,v.jsx)("div",{className:"dataviews-view-picker-grid__media",children:N}),j&&N&&(0,v.jsx)(u.A,{item:d,selection:n,onChangeSelection:o,getItemId:l,titleField:f,disabled:!1,"aria-hidden":!0,tabIndex:-1}),k&&(0,v.jsx)(c.B,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,v.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:z})}),(0,v.jsxs)(c.B,{direction:"column",gap:"xs",children:[C&&h?.render&&(0,v.jsx)(h.render,{item:d,field:h}),!!w?.length&&(0,v.jsx)(c.B,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:w.map(e=>(0,v.jsx)(b,{className:"dataviews-view-picker-grid__field-value",children:(0,v.jsx)(e.render,{item:d,field:e})},e.id))}),!!m?.length&&(0,v.jsx)(c.B,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:m.map(e=>(0,v.jsx)(i.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(i.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:e.header}),(0,v.jsx)(i.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,v.jsx)(e.render,{item:d,field:e})})]})},e.id))})]})]},A)}function x({groupName:e,groupField:t,showLabel:n=!0,children:r}){const i=(0,o.useInstanceId)(x,"dataviews-view-picker-grid-group__header");return(0,v.jsxs)(c.B,{direction:"column",gap:"sm",role:"group","aria-labelledby":i,children:[(0,v.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:i,children:n?(0,s.sprintf)(
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,s.__)("%1$s: %2$s","jetpack-publicize-pkg"),t.label,e):e}),r]},e)}var _=function({actions:e,data:t,fields:n,getItemId:s,isLoading:o,onChangeSelection:l,selection:u,view:b,className:_,empty:y}){const{resizeObserverRef:k,paginationInfo:j,itemListLabel:C}=(0,a.useContext)(d.A),A=n.find(e=>e.id===b?.titleField),S=n.find(e=>e.id===b?.mediaField),E=n.find(e=>e.id===b?.descriptionField),N=b.fields??[],{regularFields:z,badgeFields:I}=N.reduce((e,t)=>{const r=n.find(e=>e.id===t);if(!r)return e;return e[b.layout?.badgeFields?.includes(t)?"badgeFields":"regularFields"].push(r),e},{regularFields:[],badgeFields:[]}),T=!!t?.length,M=b.layout?.previewSize,D=(0,p.T)(e),R="900px",P=b.groupBy?.field?n.find(e=>e.id===b.groupBy?.field):null,F=P?(0,h.A)(t,P):null,L=(b.infiniteScrollEnabled&&!F)??!1,O=b?.page??1,B=b?.perPage??0,V=L?j?.totalItems:void 0,q=(0,m.Z)(),U=(0,g.N)(t,L,q);return(0,v.jsxs)(v.Fragment,{children:[T&&P&&F&&(0,v.jsx)(i.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":D,className:(0,r.A)("dataviews-view-picker-grid",_,{[`has-${b.layout?.density}-density`]:b.layout?.density&&["compact","comfortable"].includes(b.layout.density)}),"aria-label":C,render:({children:e,...t})=>(0,v.jsx)(c.B,{direction:"column",gap:"lg",children:e,...t}),children:Array.from(F.entries()).map(([e,n])=>(0,v.jsx)(x,{groupName:e,groupField:P,showLabel:!1!==b.groupBy?.showLabel,children:(0,v.jsx)(f.L,{previewSize:M,style:{gridTemplateColumns:M&&`repeat(auto-fill, minmax(${M}px, 1fr))`},"aria-busy":o,ref:k,children:n.map(e=>{const n=e.position??(O-1)*B+t.indexOf(e)+1;return(0,v.jsx)(w,{view:b,multiselect:D,selection:u,onChangeSelection:l,getItemId:s,item:e,mediaField:S,titleField:A,descriptionField:E,regularFields:z,badgeFields:I,config:{sizes:R},posinset:n,setsize:V},s(e))})})},e))}),T&&!F&&(0,v.jsxs)(i.Composite,{render:(0,v.jsx)(f.L,{className:(0,r.A)("dataviews-view-picker-grid",_,{[`has-${b.layout?.density}-density`]:b.layout?.density&&["compact","comfortable"].includes(b.layout.density)}),previewSize:M,"aria-busy":o,ref:k}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":D,"aria-label":C,children:[Array.from({length:U}).map((e,t)=>(0,v.jsx)(i.Composite.Item,{render:({children:e,...t})=>(0,v.jsx)(c.B,{direction:"column",children:e,...t}),role:"option","aria-hidden":!0,tabIndex:-1,className:"dataviews-view-picker-grid__card dataviews-view-picker-grid__placeholder"},`placeholder-${t}`)),t.map(e=>{const t=e.position;return(0,v.jsx)(w,{view:b,multiselect:D,selection:u,onChangeSelection:l,getItemId:s,item:e,mediaField:S,titleField:A,descriptionField:E,regularFields:z,badgeFields:I,config:{sizes:R},posinset:t,setsize:V},s(e))})]}),!T&&(0,v.jsx)("div",{className:(0,r.A)({"dataviews-loading":o,"dataviews-no-results":!o}),children:o?(0,v.jsx)("p",{children:(0,v.jsx)(i.Spinner,{})}):y}),T&&o&&(0,v.jsx)("p",{className:"dataviews-loading-more",children:(0,v.jsx)(i.Spinner,{})})]})}},65581(e,t,n){"use strict";n.d(t,{A:()=>w});var r=n(13022),i=n(27723),s=n(56427),o=n(86087),a=n(62427),c=n(31020),l=n(14820),u=n(51638),d=n(66310),p=n(9306),f=n(95753),h=n(29494),m=n(86937),g=n(10790);function v({item:e,fields:t,column:n,align:i}){const s=t.find(e=>e.id===n);if(!s)return null;const o=(0,r.A)("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":"end"===i,"dataviews-view-table__cell-align-center":"center"===i});return(0,g.jsx)("div",{className:o,children:(0,g.jsx)(s.render,{item:e,field:s})})}function b({item:e,fields:t,id:n,view:i,titleField:l,mediaField:u,descriptionField:d,selection:p,getItemId:h,onChangeSelection:b,multiselect:w,posinset:x}){const{paginationInfo:_}=(0,o.useContext)(a.A),y=p.includes(n),[k,j]=(0,o.useState)(!1),C=(0,o.useRef)(null);(0,m.B)(C,x);const{showTitle:A=!0,showMedia:S=!0,showDescription:E=!0,infiniteScrollEnabled:N}=i,z=()=>{j(!0)},I=()=>{j(!1)},T=i.fields??[],M=l&&A||u&&S||d&&E;return(0,g.jsxs)(s.Composite.Item,{ref:C,render:({children:e,...t})=>(0,g.jsx)("tr",{className:(0,r.A)("dataviews-view-table__row",{"is-selected":y,"is-hovered":k}),onMouseEnter:z,onMouseLeave:I,children:e,...t}),"aria-selected":y,"aria-setsize":_.totalItems||void 0,"aria-posinset":x,role:N?"article":"option",onClick:()=>{if(y)b(p.filter(e=>n!==e));else{const e=w?[...p,n]:[n];b(e)}},children:[(0,g.jsx)("td",{className:"dataviews-view-table__checkbox-column",role:"presentation",children:(0,g.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,g.jsx)(c.A,{item:e,selection:p,onChangeSelection:b,getItemId:h,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1})})}),M&&(0,g.jsx)("td",{role:"presentation",children:(0,g.jsx)(f.A,{item:e,titleField:A?l:void 0,mediaField:S?u:void 0,descriptionField:E?d:void 0,isItemClickable:()=>!1})}),T.map(n=>{const{width:r,maxWidth:s,minWidth:o,align:a}=i.layout?.styles?.[n]??{};return(0,g.jsx)("td",{style:{width:r,maxWidth:s,minWidth:o},role:"presentation",children:(0,g.jsx)(v,{fields:t,iteLine truncated
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,i.__)("%1$s: %2$s","jetpack-publicize-pkg"),E.label,e)})}),t.map((e,t)=>(0,g.jsx)(b,{item:e,fields:n,id:a(e)||t.toString(),view:x,titleField:D,mediaField:R,descriptionField:P,selection:v,getItemId:a,onChangeSelection:m,multiselect:S},a(e)))]},`group-${e}`)):(0,g.jsx)(s.Composite,{render:(0,g.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:M&&t.map((e,t)=>{const r=a(e),i=e.position;return(0,g.jsx)(b,{item:e,fields:n,id:r||t.toString(),view:x,titleField:D,mediaField:R,descriptionField:P,selection:v,getItemId:a,onChangeSelection:m,multiselect:S,posinset:i},r)})})]}),(0,g.jsxs)("div",{className:(0,r.A)({"dataviews-loading":c,"dataviews-no-results":!M&&!c}),id:I,children:[!M&&(c?(0,g.jsx)("p",{children:(0,g.jsx)(s.Spinner,{})}):y),M&&c&&(0,g.jsx)("p",{className:"dataviews-loading-more",children:(0,g.jsx)(s.Spinner,{})})]})]})}},9306(e,t,n){"use strict";n.d(t,{A:()=>v});var r=n(27723),i=n(62344),s=n(98595),o=n(63371),a=n(28755),c=n(56427),l=n(86087),u=n(80115),d=n(66310),p=n(62427),f=n(41338),h=n(10790),{Menu:m}=(0,u.T)(c.privateApis);function g({children:e}){return l.Children.toArray(e).filter(Boolean).map((e,t)=>(0,h.jsxs)(l.Fragment,{children:[t>0&&(0,h.jsx)(m.Separator,{}),e]},t))}var v=(0,l.forwardRef)(function({fieldId:e,view:t,fields:n,onChangeView:u,onHide:v,setOpenedFilter:b,canMove:w=!0,canInsertLeft:x=!0,canInsertRight:_=!0},y){const k=t.fields??[],j=k?.indexOf(e),C=t.sort?.field===e;let A=!1,S=!1,E=!1,N=[];const z=n.find(t=>t.id===e),{setIsShowingFilter:I}=(0,l.useContext)(p.A);if(!z)return null;A=!1!==z.enableHiding,S=!1!==z.enableSorting;const T=z.header;if(N=!!z.filterBy&&z.filterBy?.operators||[],E=!(t.filters?.some(t=>e===t.field)||!z.hasElements&&!z.Edit||!1===z.filterBy||z.filterBy?.isPrimary),!(S||w||A||E))return T;const M=(0,f.A)(t,n).filter(e=>!k.includes(e.id)),D=(x||_)&&!!M.length,R=(0,r.isRTL)();return(0,h.jsxs)(m,{children:[(0,h.jsxs)(m.TriggerButton,{render:(0,h.jsx)(c.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:y,variant:"tertiary"}),children:[T,t.sort&&C&&(0,h.jsx)("span",{"aria-hidden":"true",children:d.vI[t.sort.direction]})]}),(0,h.jsx)(m.Popover,{style:{minWidth:"240px"},children:(0,h.jsxs)(g,{children:[S&&(0,h.jsx)(m.Group,{children:d.GJ.map(n=>{const r=t.sort&&C&&t.sort.direction===n,i=`${e}-${n}`;return(0,h.jsx)(m.RadioItem,{name:"view-table-sorting",value:i,checked:r,onChange:()=>{u({...t,sort:{field:e,direction:n},showLevels:!1})},children:(0,h.jsx)(m.ItemLabel,{children:d.CL[n]})},i)})}),E&&(0,h.jsx)(m.Group,{children:(0,h.jsx)(m.Item,{prefix:(0,h.jsx)(c.Icon,{icon:o.A}),onClick:()=>{b(e),I(!0),u({...t,page:1,filters:[...t.filters||[],{field:e,value:void 0,operator:N[0]}]})},children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Add filter","jetpack-publicize-pkg")})})}),(w||A||D)&&z&&(0,h.jsxs)(m.Group,{children:[w&&(0,h.jsx)(m.Item,{prefix:(0,h.jsx)(c.Icon,{icon:i.A}),disabled:R?j>=k.length-1:j<1,onClick:()=>{const n=R?j+1:j-1,r=[...k];r.splice(j,1),r.splice(n,0,e),u({...t,fields:r})},children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Move left","jetpack-publicize-pkg")})}),w&&(0,h.jsx)(m.Item,{prefix:(0,h.jsx)(c.Icon,{icon:s.A}),disabled:R?j<1:j>=k.length-1,onClick:()=>{const n=R?j-1:j+1,r=[...k];r.splice(j,1),r.splice(n,0,e),u({...t,fields:r})},children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Move right","jetpack-publicize-pkg")})}),x&&!!M.length&&(0,h.jsxs)(m,{children:[(0,h.jsx)(m.SubmenuTriggerItem,{children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Insert left","jetpack-publicize-pkg")})}),(0,h.jsx)(m.Popover,{children:M.map(e=>{const n=R?j+1:j;return(0,h.jsx)(m.Item,{onClick:()=>{u({...t,fields:[...k.slice(0,n),e.id,...k.slice(n)]})},children:(0,h.jsx)(m.ItemLabel,{children:e.label})},e.id)})})]}),_&&!!M.length&&(0,h.jsxs)(m,{children:[(0,h.jsx)(m.SubmenuTriggerItem,{children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Insert right","jetpack-publicize-pkg")})}),(0,h.jsx)(m.Popover,{children:M.map(e=>{const n=R?j:j+1;return(0,h.jsx)(m.Item,{onClick:()=>{u({...t,fields:[...k.slice(0,n),e.id,...k.slice(n)]})},children:(0,h.jsx)(m.ItemLabel,{children:e.label})},e.id)})})]}),A&&z&&(0,h.jsx)(m.Item,{prefix:(0,h.jsx)(c.Icon,{icon:a.A}),onClick:()=>{v(z),u({...t,fields:k.filter(t=>t!==e)})},children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Hide column","jetpack-publicize-pkg")})})]})]})})]})})},95753(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(98839),i=n(75411),s=n(10790);var o=function({item:e,level:t,titleField:n,mediaField:o,descriptionField:a,onClickItem:c,renderItemLink:l,isItemClickable:u}){return(0,s.jsxs)(r.B,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,s.jsx)(i.V,{item:e,isItemClickable:u,onClickItem:c,renderItemLink:l,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":u(e)&&(c||l)&&n?n.getValue?.({item:e}):void 0,children:(0,s.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,s.jsxs)(r.B,{direction:"coluLine truncated
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,i.__)("%1$s: %2$s","jetpack-publicize-pkg"),J.label,t)})}),r.map((t,r)=>(0,w.jsx)(y,{item:t,level:E.showLevels&&"function"==typeof l?l(t):void 0,hasBulkActions:q,actions:e,fields:n,id:a(t)||r.toString(),view:E,titleField:W,mediaField:G,descriptionField:Z,selection:k,getItemId:a,onChangeSelection:_,onClickItem:C,renderItemLink:S,isItemClickable:A,isActionsColumnSticky:!B},a(t)))]},`group-${t}`)):(0,w.jsx)("tbody",{children:$&&t.map((t,r)=>(0,w.jsx)(y,{item:t,level:E.showLevels&&"function"==typeof l?l(t):void 0,hasBulkActions:q,actions:e,fields:n,id:a(t)||r.toString(),view:E,titleField:W,mediaField:G,descriptionField:Z,selection:k,getItemId:a,onChangeSelection:_,onClickItem:C,renderItemLink:S,isItemClickable:A,isActionsColumnSticky:!B,posinset:re?r+1:void 0},a(t)))})]}),re&&u&&(0,w.jsx)("div",{className:"dataviews-loading",id:O,children:(0,w.jsx)("p",{className:"dataviews-loading-more",children:(0,w.jsx)(s.Spinner,{})})})]}):(0,w.jsx)("div",{className:(0,r.A)("dataviews-no-results",{"is-refreshing":T}),id:O,children:z})}},24751(e,t,n){"use strict";n.d(t,{Y:()=>s});var r=n(86087),i=n(27723);function s({scrollContainerRef:e,enabledHorizontal:t=!1}){const[n,s]=(0,r.useState)(!1),[o,a]=(0,r.useState)(!1),c=(0,r.useCallback)(()=>{const n=e.current;n&&(t&&s((e=>{if((0,i.isRTL)())return Math.abs(e.scrollLeft)<=1;return e.scrollLeft+e.clientWidth>=e.scrollWidth-1})(n)),a(n.scrollTop>0))},[e,t]);return(0,r.useEffect)(()=>{if("undefined"==typeof window||!e.current)return()=>{};const t=e.current;return c(),t.addEventListener("scroll",c),window.addEventListener("resize",c),()=>{t.removeEventListener("scroll",c),window.removeEventListener("resize",c)}},[e,t,c]),{isHorizontalScrollEnd:n,isVerticallyScrolled:o}}},6660(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(56427),i=n(27723),s=n(86087),o=n(62427),a=n(10790);function c(){const e=(0,s.useContext)(o.A),t=e.view;return(0,a.jsxs)(r.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,i.__)("Density","jetpack-publicize-pkg"),value:t.layout?.density||"balanced",onChange:n=>{e.onChangeView({...t,layout:{...t.layout,density:n}})},isBlock:!0,children:[(0,a.jsx)(r.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,i._x)("Comfortable","Density option for DataView layout","jetpack-publicize-pkg")},"comfortable"),(0,a.jsx)(r.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,i._x)("Balanced","Density option for DataView layout","jetpack-publicize-pkg")},"balanced"),(0,a.jsx)(r.__experimentalToggleGroupControlOption,{value:"compact",label:(0,i._x)("Compact","Density option for DataView layout","jetpack-publicize-pkg")},"compact")]})}},29494(e,t,n){"use strict";function r(e,t){return e.reduce((e,n)=>{const r=t.getValue({item:n});return e.has(r)||e.set(r,[]),e.get(r)?.push(n),e},new Map)}n.d(t,{A:()=>r})},44491(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6660),i=n(2760),s=n(10790);function o(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.A,{}),(0,s.jsx)(i.A,{})]})}},73388(e,t,n){"use strict";n.d(t,{L:()=>o});var r=n(86087),i=n(13022),s=n(10790),o=(0,r.forwardRef)(({className:e,previewSize:t,...n},r)=>(0,s.jsx)("div",{ref:r,className:(0,i.A)("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...n}))},75411(e,t,n){"use strict";n.d(t,{V:()=>s});var r=n(86087),i=n(10790);function s({item:e,isItemClickable:t,onClickItem:n,renderItemLink:s,className:o,children:a,...c}){if(!t(e))return(0,i.jsx)("div",{className:o,...c,children:a});if(s){const t=s({item:e,className:`${o} ${o}--clickable`,...c,children:a});return(0,r.cloneElement)(t,{onClick:e=>{e.stopPropagation(),t.props.onClick&&t.props.onClick(e)},onKeyDown:e=>{"Enter"!==e.key&&""!==e.key&&" "!==e.key||(e.stopPropagation(),t.props.onKeyDown&&t.props.onKeyDown(e))}})}const l=function({item:e,isItemClickable:t,onClickItem:n,className:r}){return t(e)&&n?{className:r?`${r} ${r}--clickable`:void 0,role:"button",tabIndex:0,onClick:t=>{t.stopPropagation(),n(e)},onKeyDown:t=>{"Enter"!==t.key&&""!==t.key&&" "!==t.key||(t.stopPropagation(),n(e))}}:{className:r}}({item:e,isItemClickable:t,onClickItem:n,className:o});return(0,i.jsx)("div",{...l,...c,children:a})}},2760(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),i=n(27723),s=n(86087),o=n(62427),a=n(10790),c=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function l(){const e=(0,s.useContext)(o.A),t=e.view,n=c.filter(t=>e.containerWidth>=t.breakpoint),l=t.layout?.previewSize??230,u=n.map((e,t)=>({...e,index:t})).filter(e=>e.value<=l).sort((e,t)=>t.value-e.value)[0]?.index??0,d=n.map((e,t)=>({value:t}));return(0,a.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,showTooltip:!1,label:(0,i.__)("Preview size","jetpack-publicize-pkg"),value:u,min:0,max:n.length-1,withInputField:!1,onChange:(r=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:n[r].value}})},step:1,marks:d})}},86Line truncated
|
||||
// translators: 1: current page number. 2: total number of pages.
|
||||
// translators: 1: current page number. 2: total number of pages.
|
||||
(0,s.__)("Page %1$d of %2$d","jetpack-publicize-pkg"),p,d):n.toString()}});return!!n&&1!==d&&(0,u.jsxs)(c.B,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,u.jsx)(c.B,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,i.createInterpolateElement)((0,s.sprintf)(
|
||||
// translators: 1: Current page number, 2: Total number of pages.
|
||||
// translators: 1: Current page number, 2: Total number of pages.
|
||||
(0,s._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging","jetpack-publicize-pkg"),"<CurrentPage />",d),{div:(0,u.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,u.jsx)(r.SelectControl,{"aria-label":(0,s.__)("Current page","jetpack-publicize-pkg"),value:p.toString(),options:f,onChange:n=>{t({...e,page:+n})},size:"small",variant:"minimal"})})}),(0,u.jsxs)(c.B,{direction:"row",gap:"xs",align:"center",children:[(0,u.jsx)(r.Button,{onClick:()=>t({...e,page:p-1}),disabled:1===p,accessibleWhenDisabled:!0,label:(0,s.__)("Previous page","jetpack-publicize-pkg"),icon:(0,s.isRTL)()?o.A:a.A,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,u.jsx)(r.Button,{onClick:()=>t({...e,page:p+1}),disabled:p>=d,accessibleWhenDisabled:!0,label:(0,s.__)("Next page","jetpack-publicize-pkg"),icon:(0,s.isRTL)()?a.A:o.A,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var p=(0,i.memo)(d)},14820(e,t,n){"use strict";n.d(t,{T:()=>i});n(56427),n(47143);var r=n(86087);n(27723),n(10790);function i(e){return(0,r.useMemo)(()=>e?.every(e=>e.supportsBulk),[e])}},29212(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(27723),i=n(86087),s=n(56427),o=n(29491),a=n(62427),c=n(10790),l=(0,i.memo)(function({label:e}){const{view:t,onChangeView:n}=(0,i.useContext)(a.A),[l,u,d]=(0,o.useDebouncedInput)(t.search);(0,i.useEffect)(()=>{t.search!==d&&u(t.search??"")},[t.search,u]);const p=(0,i.useRef)(n),f=(0,i.useRef)(t);(0,i.useEffect)(()=>{p.current=n,f.current=t},[n,t]),(0,i.useEffect)(()=>{d!==f.current?.search&&p.current({...f.current,page:t.page?1:void 0,startPosition:t.startPosition?1:void 0,search:d})},[d]);const h=e||(0,r.__)("Search","jetpack-publicize-pkg");return(0,c.jsx)(s.SearchControl,{className:"dataviews-search",onChange:u,value:l,label:h,placeholder:h,size:"compact"})})},31020(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),i=n(27723),s=n(10790);function o({selection:e,onChangeSelection:t,item:n,getItemId:o,titleField:a,disabled:c,...l}){const u=o(n),d=e.includes(u),p=!c&&d,f=a?.getValue?.({item:n})||(0,i.__)("(no title)","jetpack-publicize-pkg");return(0,s.jsx)(r.CheckboxControl,{className:"dataviews-selection-checkbox","aria-label":f,"aria-disabled":c,checked:p,onChange:()=>{c||t(d?e.filter(e=>u!==e):[...e,u])},...l})}},17160(e,t,n){"use strict";n.d(t,{Ay:()=>C,DM:()=>k,hn:()=>b});var r=n(56427),i=n(27723),s=n(86087),o=n(93312),a=n(10979),c=n(29491),l=n(98839),u=n(66310),d=n(73123),p=n(62427),f=n(83393),h=n(80115),m=n(10790),{Menu:g}=(0,h.T)(r.privateApis),v={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function b(){const{view:e,onChangeView:t,defaultLayouts:n}=(0,s.useContext)(p.A),o=Object.keys(n);if(o.length<=1)return null;const c=d.A.find(t=>e.type===t.type);return(0,m.jsxs)(g,{children:[(0,m.jsx)(g.TriggerButton,{render:(0,m.jsx)(r.Button,{size:"compact",icon:c?.icon,label:(0,i.__)("Layout","jetpack-publicize-pkg")})}),(0,m.jsx)(g.Popover,{children:o.map(r=>{const i=d.A.find(e=>e.type===r);return i?(0,m.jsx)(g.RadioItem,{value:r,name:"view-actions-available-view",checked:r===e.type,hideOnClick:!0,onChange:r=>{switch(r.target.value){case"list":case"grid":case"table":case"pickerGrid":case"pickerTable":case"activity":const i={...e};return"layout"in i&&delete i.layout,t({...i,type:r.target.value,...n[r.target.value]})}a("Invalid dataview")},children:(0,m.jsx)(g.ItemLabel,{children:i.label})},r):null})})]})}function w(){const{view:e,fields:t,onChangeView:n}=(0,s.useContext)(p.A),o=(0,s.useMemo)(()=>t.filter(e=>!1!==e.enableSorting).map(e=>({label:e.label,value:e.id})),[t]);return(0,m.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,label:(0,i.__)("Sort by","jetpack-publicize-pkg"),value:e.sort?.field,options:o,onChange:t=>{n({...e,sort:{direction:e?.sort?.direction||"desc",field:t},showLevels:!1})}})}function x(){const{view:e,fields:t,onChangeView:n}=(0,s.useContext)(p.A);if(0===t.filter(e=>!1!==e.enableSorting).length)return null;let o=e.sort?.direction;return!o&&e.sort?.field&&(o="desc"),(0,m.jsx)(r.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__next40pxDefaultSize:!0,isBlock:!0,label:(0,i.__)("Order","jetpack-publicize-pkg"),value:o,onChange:r=>{"asc"!==r&&"desc"!==r?a("Invalid direction"):n({...e,sort:{direction:r,field:e.sort?.field||t.find(e=>!1!==e.enableSorting)?.id||""},showLevels:!1})},children:u.GJ.map(e=>(0,m.jsx)(r.__experimentalToggleGroupControlOptionIcon,{value:e,icon:u.ls[e],label:u.CL[e]},e))})}function _(){const{view:e,config:t,onChangeView:n}=(0,s.useContext)(p.A),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,m.jsx)(r.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,i.__)("Items per page","jetpack-publicize-pkg"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:t=>{const r="number"==typeof t||void 0===t?t:parseInt(t,10);n({...e,perPage:r,page:1})},children:t.perPageSizes.map(e=>(0,m.jsx)(r.__experimentalToggleGroupControlOption,{value:e,laLine truncated
|
||||
(0,r._n)("%d Item selected","%d Items selected",e,"jetpack-publicize-pkg"),e):i||n<=t?(0,r.sprintf)(/* translators: %d: number of items. */ /* translators: %d: number of items. */
|
||||
(0,r._n)("%d Item","%d Items",n,"jetpack-publicize-pkg"),n):(0,r.sprintf)(/* translators: %1$d: number of items. %2$d: total number of items. */ /* translators: %1$d: number of items. %2$d: total number of items. */
|
||||
(0,r._n)("%1$d of %2$d Item","%1$d of %2$d Items",n,"jetpack-publicize-pkg"),t,n)}},41338(e,t,n){"use strict";function r(e,t){const n=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean);return t.filter(e=>!n.includes(e.id)&&"media"!==e.type&&!1!==e.enableHiding)}n.d(t,{A:()=>r})},71e3(e,t,n){"use strict";n.d(t,{Df:()=>w,LX:()=>b,bx:()=>g,os:()=>v});var r=n(23403),i=n(53899),s=n(79719),o=n(21988),a=n(27723),c=n(86087),l=n(38443),u=n(66310),d=n(10790),p={Name:(0,d.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,d.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function f(e,t){switch(t){case"days":return(0,r.e)(new Date,e);case"weeks":return(0,s.k)(new Date,e);case"months":return(0,i.a)(new Date,e);case"years":return(0,o.d)(new Date,e);default:return new Date}}var h={
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Is none of","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */
|
||||
(0,a.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t.map(e=>e.label).join(", ")),p),filter:(e,t,n)=>{if(!n?.length)return!0;const r=t.getValue({item:e});return Array.isArray(r)?!n.some(e=>r.includes(e)):"string"==typeof r&&!n.includes(r)},selection:"multi"},m=[{name:u.ld,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Includes","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */
|
||||
(0,a.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t.map(e=>e.label).join(", ")),p),filter(e,t,n){if(!n?.length)return!0;const r=t.getValue({item:e});return Array.isArray(r)?n.some(e=>r.includes(e)):"string"==typeof r&&n.includes(r)},selection:"multi"},{name:u.Vw,...h},{name:u.y5,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Includes all","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */
|
||||
(0,a.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t.map(e=>e.label).join(", ")),p),filter:(e,t,n)=>!n?.length||n.every(n=>t.getValue({item:e})?.includes(n)),selection:"multi"},{name:u.UX,...h},{name:u.CX,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Between (inc)","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */ /* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */
|
||||
(0,a.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label[0],t[0].label[1]),p),filter(e,t,n){if(!Array.isArray(n)||2!==n.length||void 0===n[0]||void 0===n[1])return!0;const r=t.getValue({item:e});return("number"==typeof r||r instanceof Date||"string"==typeof r)&&(r>=n[0]&&r<=n[1])},selection:"custom"},{name:u._h,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("In the past","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */
|
||||
(0,a.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,`${t[0].value.value} ${t[0].value.unit}`),p),filter(e,t,n){if(void 0===n?.value||void 0===n?.unit)return!0;const r=f(n.value,n.unit),i=(0,l.getDate)(t.getValue({item:e}));return i>=r&&i<=new Date},selection:"custom"},{name:u.MD,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Over","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */
|
||||
(0,a.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,`${t[0].value.value} ${t[0].value.unit}`),p),filter(e,t,n){if(void 0===n?.value||void 0===n?.unit)return!0;const r=f(n.value,n.unit);return(0,l.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:u.gm,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Is","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */
|
||||
(0,a.__)("<Name>%1$s is: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter:(e,t,n)=>n===t.getValue({item:e})||void 0===n,selection:"single"},{name:u._k,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Is not","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */
|
||||
(0,a.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter:(e,t,n)=>n!==t.getValue({item:e}),selection:"single"},{name:u.X4,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Less than","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */
|
||||
(0,a.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})<n},selection:"single"},{name:u.u5,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Greater than","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */
|
||||
(0,a.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})>n},selection:"single"},{name:u.Ie,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Less than or equal","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */
|
||||
(0,a.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})<=n},selection:"single"},{name:u.x4,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Greater than or equal","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */
|
||||
(0,a.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})>=n},selection:"single"},{name:u.Xd,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Before","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n);return(0,l.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:u.QF,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("After","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n);return(0,l.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:u.o8,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Before (inc)","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n);return(0,l.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:u.NN,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("After (inc)","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n);return(0,l.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:u.Py,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Contains","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */ /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */
|
||||
(0,a.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=t.getValue({item:e});return"string"==typeof r&&n&&r.toLowerCase().includes(String(n).toLowerCase())},selection:"single"},{name:u.Vm,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Doesn't contain","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */ /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */
|
||||
(0,a.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=t.getValue({item:e});return"string"==typeof r&&n&&!r.toLowerCase().includes(String(n).toLowerCase())},selection:"single"},{name:u.YH,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Starts with","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */ /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */
|
||||
(0,a.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=t.getValue({item:e});return"string"==typeof r&&n&&r.toLowerCase().startsWith(String(n).toLowerCase())},selection:"single"},{name:u.xz,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("On","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n),i=(0,l.getDate)(t.getValue({item:e}));return r.getTime()===i.getTime()},selection:"single"},{name:u.Ld,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Not on","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n),i=(0,l.getDate)(t.getValue({item:e}));return r.getTime()!==i.getTime()},selection:"single"}],g=e=>m.find(t=>t.name===e),v=()=>m.map(e=>e.name),b=e=>m.filter(e=>"single"===e.selection).some(t=>t.name===e),w=e=>m.some(t=>t.name===e)},98839(e,t,n){"use strict";n.d(t,{B:()=>d});var r=n(70815),i=n(26919),s=n(86087),o="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[n,r]of t.styles)c(e,n,r)}(document)),e.__wpStyleRuntime}function c(e,t,n){if(!e.head)return;const r=a();let i=r.injectedStyles.get(e);if(i||(i=new Set,r.injectedStyles.set(e,i)),i.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${o}]`))if(n.getAttribute(o)===t)return!0;return!1}(e,t))return void i.add(t);const s=e.createElement("style");s.setAttribute(o,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),i.add(t)}(function(e,t){const n=a();n.styles.set(e,t);for(const r of n.documents.keys())c(r,e,t)})("b51ff41489","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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:n,justify:s,wrap:o,render:a,...c},d){const p={gap:t&&u[t],alignItems:n,justifyContent:s,flexDirection:e,flexWrap:o};return(0,r.C)({render:a,ref:d,props:(0,i.v6)(c,{style:p,className:l})})})},16064(e,t,n){"use strict";n.d(t,{s:()=>u});var r=n(70815),i=n(26919),s=n(86087),o="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[n,r]of t.styles)c(e,n,r)}(document)),e.__wpStyleRuntime}function c(e,t,n){if(!e.head)return;const r=a();let i=r.injectedStyles.get(e);if(i||(i=new Set,r.injectedStyles.set(e,i)),i.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${o}]`))if(n.getAttribute(o)===t)return!0;return!1}(e,t))return void i.add(t);const s=e.createElement("style");s.setAttribute(o,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),i.add(t)}(function(e,t){const n=a();n.styles.set(e,t);for(const r of n.documents.keys())c(r,e,t)})("c46e8cb841","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}");var l="f37b9e2e191ebd66__visually-hidden",u=(0,s.forwardRef)(function({render:e,...t},n){return(0,r.C)({render:e,ref:n,props:(0,i.v6)({className:l},t,{"data-visually-hidden":""})})})},51526(e,t,n){"use strict";n.d(t,{$:()=>v});var r=n(20733),i=n(13022),s=n(20195),o=n(86087),a=n(27723),c=n(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[n,r]of t.styles)d(e,n,r)}(document)),e.__wpStyleRuntime}function d(e,t,n){if(!e.head)return;const r=u();let i=r.injectedStyles.get(e);if(i||(i=new Set,r.injectedStyles.set(e,i)),i.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${l}]`))if(n.getAttribute(l)===t)return!0;return!1}(e,t))return void i.add(t);const s=e.createElement("style");s.setAttribute(l,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),i.add(t)}function p(e,t){const n=u();n.styles.set(e,t);for(const r of n.documents.keys())d(r,e,t)}p("26d90ece4e",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:499;--wp-ui-button-background-color:var(--wpds-color-bg-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-bg-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-bg-interactive-neutral-strong-disabled,#Line truncated
|
||||
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* tabbable 6.4.0
|
||||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
@@ -0,0 +1 @@
|
||||
.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}:where(._fUXxnSp5pagKBp9gSN7) *{box-sizing:border-box}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var(--spacing-base)*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var(--spacing-base)*0);margin-right:calc(var(--spacing-base)*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var(--spacing-base)*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var(--spacing-base)*0)}.S8EwaXk1kyPizt6x4WH2{margin-left:calc(var(--spacing-base)*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var(--spacing-base)*0)}.cphJ8dCpfimnky7P2FHg{margin-right:calc(var(--spacing-base)*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var(--spacing-base)*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var(--spacing-base)*1);margin-right:calc(var(--spacing-base)*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var(--spacing-base)*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var(--spacing-base)*1)}.CQSkybjq2TcRM1Xo9COV{margin-left:calc(var(--spacing-base)*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var(--spacing-base)*1)}.I8MxZQYTbuu595yfesWA{margin-right:calc(var(--spacing-base)*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var(--spacing-base)*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var(--spacing-base)*2);margin-right:calc(var(--spacing-base)*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var(--spacing-base)*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var(--spacing-base)*2)}.YNZmHOuRo6hU7zzKfPdP{margin-left:calc(var(--spacing-base)*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var(--spacing-base)*2)}.ftsYE5J9hLzquQ0tA5dY{margin-right:calc(var(--spacing-base)*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var(--spacing-base)*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var(--spacing-base)*3);margin-right:calc(var(--spacing-base)*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var(--spacing-base)*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var(--spacing-base)*3)}.zSX59ziEaEWGjnpZa4uV{margin-left:calc(var(--spacing-base)*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var(--spacing-base)*3)}.UKtHPJnI2cXBWtPDm5hM{margin-right:calc(var(--spacing-base)*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var(--spacing-base)*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var(--spacing-base)*4);margin-right:calc(var(--spacing-base)*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var(--spacing-base)*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var(--spacing-base)*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-left:calc(var(--spacing-base)*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var(--spacing-base)*4)}.XXv4kDTGvEnQeuGKOPU3{margin-right:calc(var(--spacing-base)*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var(--spacing-base)*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var(--spacing-base)*5);margin-right:calc(var(--spacing-base)*5)}.GdfSmGwHlFnN2S6xBn1f{margin-bottom:calc(var(--spacing-base)*5)}.GdfSmGwHlFnN2S6xBn1f,.yqeuzwyGQ7zG0avrGqi_{margin-top:calc(var(--spacing-base)*5)}.g9emeCkuHvYhveiJbfXO{margin-left:calc(var(--spacing-base)*5)}.Lvk3dqcyHbZ07QCRlrUQ{margin-bottom:calc(var(--spacing-base)*5)}.r3yQECDQ9qX0XZzXlVAg{margin-right:calc(var(--spacing-base)*5)}.aQhlPwht2Cz1X_63Miw0{margin:calc(var(--spacing-base)*6)}.JyHb0vK3wJgpblL9s5j8{margin-left:calc(var(--spacing-base)*6);margin-right:calc(var(--spacing-base)*6)}.cY2gULL1lAv6WPNIRuf3{margin-bottom:calc(var(--spacing-base)*6)}.NBWQ9Lwhh_fnry3lg_p7,.cY2gULL1lAv6WPNIRuf3{margin-top:calc(var(--spacing-base)*6)}.yIOniNe5E40C8fWvBm5V{margin-left:calc(var(--spacing-base)*6)}.t30usboNSyqfQWIwHvT3{margin-bottom:calc(var(--spacing-base)*6)}.Nm_TyFkYCMhOoghoToKJ{margin-right:calc(var(--spacing-base)*6)}.C4qJKoBXpgKtpmrqtEKB{margin:calc(var(--spacing-base)*7)}.S93Srbu6NQ_PBr7DmTiD{margin-left:calc(var(--spacing-base)*7);margin-right:calc(var(--spacing-base)*7)}.fJj8k6gGJDks3cLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'jetpack-shared-stores', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url', 'wp-warning'), 'version' => '6189a635a5490a067c27');
|
||||
@@ -0,0 +1 @@
|
||||
.cuoSlhSNrqf1dozY22Xb{fill:#000}.JLquNpQVlysAamuh5lJO,.lAIiifeLMmZAPlQ9n9ZR{fill:var(--jp-green-primary)}.cbOwD8Y4tFjwimmtchQI{fill:#757575}.cbOwD8Y4tFjwimmtchQI.aLWBKY0yRghEk7tNCgK3{fill:#0085ff}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw{fill:#0866ff}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw.social-logo{border-radius:50%}.cbOwD8Y4tFjwimmtchQI.af4Y_zItXvLAOEoSDPSv{fill:#55acee}.cbOwD8Y4tFjwimmtchQI.f68aqF3XSD1OBvXR1get{fill:#0976b4}.cbOwD8Y4tFjwimmtchQI.xFI0dt3UiXRlRQdqPWkx{fill:#35465c}.cbOwD8Y4tFjwimmtchQI.q7JEoyymveP6kF747M43{fill:var(--color-gplus)}.cbOwD8Y4tFjwimmtchQI.DKOBOTVmTLbh26gUH_73{fill:#6364ff}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw{fill:#8ed500}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw.social-logo{border-radius:50%}.cbOwD8Y4tFjwimmtchQI.cL3m0xBYTYhIKI7lCqDB{fill:#d93174}.cbOwD8Y4tFjwimmtchQI.fftumuc_lJ6v0tq4UMVR{fill:#43d854}.cbOwD8Y4tFjwimmtchQI.inzgC27qxdt7hSdhTWRI{fill:#000}.cbOwD8Y4tFjwimmtchQI.inzgC27qxdt7hSdhTWRI.social-logo{border-radius:40%}.cbOwD8Y4tFjwimmtchQI.PW9A5OHnDYBX0yNn9RHO{fill:#000}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}:where(._fUXxnSp5pagKBp9gSN7) *{box-sizing:border-box}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var(--spacing-base)*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var(--spacing-base)*0);margin-right:calc(var(--spacing-base)*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var(--spacing-base)*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var(--spacing-base)*0)}.S8EwaXk1kyPizt6x4WH2{margin-right:calc(var(--spacing-base)*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var(--spacing-base)*0)}.cphJ8dCpfimnky7P2FHg{margin-left:calc(var(--spacing-base)*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var(--spacing-base)*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var(--spacing-base)*1);margin-right:calc(var(--spacing-base)*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var(--spacing-base)*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var(--spacing-base)*1)}.CQSkybjq2TcRM1Xo9COV{margin-right:calc(var(--spacing-base)*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var(--spacing-base)*1)}.I8MxZQYTbuu595yfesWA{margin-left:calc(var(--spacing-base)*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var(--spacing-base)*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var(--spacing-base)*2);margin-right:calc(var(--spacing-base)*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var(--spacing-base)*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var(--spacing-base)*2)}.YNZmHOuRo6hU7zzKfPdP{margin-right:calc(var(--spacing-base)*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var(--spacing-base)*2)}.ftsYE5J9hLzquQ0tA5dY{margin-left:calc(var(--spacing-base)*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var(--spacing-base)*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var(--spacing-base)*3);margin-right:calc(var(--spacing-base)*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var(--spacing-base)*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var(--spacing-base)*3)}.zSX59ziEaEWGjnpZa4uV{margin-right:calc(var(--spacing-base)*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var(--spacing-base)*3)}.UKtHPJnI2cXBWtPDm5hM{margin-left:calc(var(--spacing-base)*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var(--spacing-base)*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var(--spacing-base)*4);margin-right:calc(var(--spacing-base)*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var(--spacing-base)*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var(--spacing-base)*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-right:calc(var(--spacing-base)*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var(--spacing-base)*4)}.XXv4kDTGvEnQeuGKOPU3{margin-left:calc(var(--spacing-base)*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var(--spacing-base)*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var(--spacing-base)*5);margin-rightLine truncated
|
||||
@@ -0,0 +1,170 @@
|
||||
/*! For license information please see block-editor-social.js.LICENSE.txt */
|
||||
(()=>{var e,t,n={98137(e,t,n){"use strict";n.d(t,{A:()=>o});var r,i=n(2467);function s(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}r=s.prototype,Object.assign(r,i.EventEmitter.prototype),r.emitChange=function(){this.emit("change")},r.off=r.removeListener,s.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},s.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()},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 o=s},7675(e,t,n){"use strict";n.d(t,{y:()=>a});var r=n(76416),i=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const s="text/event-stream",o="last-event-id";function a(e,t){var{signal:n,headers:a,onopen:l,onmessage:u,onclose:d,onerror:p,openWhenHidden:f,fetch:h}=t,m=i(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((t,i)=>{const g=Object.assign({},a);let v;function b(){v.abort(),document.hidden||j()}g.accept||(g.accept=s),f||document.addEventListener("visibilitychange",b);let w=1e3,x=0;function _(){document.removeEventListener("visibilitychange",b),window.clearTimeout(x),v.abort()}null==n||n.addEventListener("abort",()=>{_(),t()});const y=null!=h?h:window.fetch,k=null!=l?l:c;async function j(){var n;v=new AbortController;try{const n=await y(e,Object.assign(Object.assign({},m),{headers:g,signal:v.signal}));await k(n),await(0,r.q5)(n.body,(0,r.iv)((0,r.VL)(e=>{e?g[o]=e:delete g[o]},e=>{w=e},u))),null==d||d(),_(),t()}catch(e){if(!v.signal.aborted)try{const t=null!==(n=null==p?void 0:p(e))&&void 0!==n?n:w;window.clearTimeout(x),x=window.setTimeout(j,t)}catch(e){_(),i(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,n){"use strict";async function r(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function i(e){let t,n,r,i=!1;return function(s){void 0===t?(t=s,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,s);const o=t.length;let a=0;for(;n<o;){i&&(10===t[n]&&(a=++n),i=!1);let s=-1;for(;n<o&&-1===s;++n)switch(t[n]){case 58:-1===r&&(r=n-a);break;case 13:i=!0;case 10:s=n}if(-1===s)break;e(t.subarray(a,s),r),a=n,r=-1}a===o?t=void 0:0!==a&&(t=t.subarray(a),n-=a)}}function s(e,t,n){let r=o();const i=new TextDecoder;return function(s,a){if(0===s.length)null==n||n(r),r=o();else if(a>0){const n=i.decode(s.subarray(0,a)),o=a+(32===s[a+1]?2:1),c=i.decode(s.subarray(o));switch(n){case"data":r.data=r.data?r.data+"\n"+c:c;break;case"event":r.event=c;break;case"id":e(r.id=c);break;case"retry":const n=parseInt(c,10);isNaN(n)||t(r.retry=n)}}}}function o(){return{data:"",event:"",id:"",retry:void 0}}n.d(t,{VL:()=>s,iv:()=>i,q5:()=>r})},46941(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,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,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")||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.docuLine truncated
|
||||
// Translators: %d is the cost of one image.
|
||||
// Translators: %d is the cost of one image.
|
||||
(0,i.sprintf)(__("Requests needed: <counter>%d</counter>","jetpack-publicize-pkg"),n),{counter:(0,s.jsx)("span",{})}),c=(0,r.createInterpolateElement)((0,i.sprintf)(
|
||||
// Translators: %d is the current requests balance.
|
||||
__("Requests available: <counter>%d</counter>","jetpack-publicize-pkg"),o),{counter:o<n?(0,s.jsx)("span",{className:"ai-assistant-featured-image__usage-counter-no-limit"}):(0,s.jsx)("strong",{})});return(0,s.jsxs)("div",{className:"ai-assistant-featured-image__usage-counter",children:[(0,s.jsx)("span",{children:a}),(0,s.jsx)("span",{children:c})]})}},89289(e,t,n){"use strict";n(85985),n(56427),n(47143),n(43656),n(86087),n(27723);var r=n(46941),i=n.n(r);n(45817),n(43984),n(72448),n(71508),n(62038),n(96390),n(3620),n(35918),n(10790);i()("jetpack-ai-client:featured-image")},83158(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(85985),i=n(56427),s=n(86087),o=n(27723),a=n(46941),c=n.n(a),l=(n(45817),n(72448)),u=n(71508),d=n(62038),p=n(96390),f=n(3620),h=n(35918),m=n(75988),g=n(10790);const __=o.__,v=c()("jetpack-ai:general-purpose-image");function b({placement:e,onClose:t=()=>{},onSetImage:n=()=>{}}){const[a,c]=(0,s.useState)(!0),b=(0,h.A)(),{getPostContent:w}=(0,u.A)(),{saveToMediaLibrary:x}=(0,d.A)(),{tracks:_}=(0,r.st)(),{recordEvent:y}=_,[k,j]=(0,s.useState)(""),{requireUpgrade:C,requestsCount:A,requestsLimit:S,currentTier:E,costs:N}=(0,l.A)(),z=(0,r.Bd)(E),I=N?.[m.yP]?.activeModel??10,T=I===N?.[m.yP]?.stableDiffusion?m.Dk:m.bb,M=z===r.Ti,D=S-A<I,{current:R,setCurrent:P,processImageGeneration:F,handlePreviousImage:L,handleNextImage:O,currentImage:B,currentPointer:V,images:q,pointer:U,imageStyles:H,guessStyle:$}=(0,f.A)({cost:I,autoStart:!1,type:"general-image-generation",feature:m.yP}),W=k.length>=3,G=D||V?.generating||C,Z=G||!W,J=(0,s.useCallback)(()=>{c(!1),t?.()},[t]),K=(0,s.useCallback)(async({userPrompt:t,style:n})=>{v("handleGenerate",t,n),y("jetpack_ai_general_image_generation_generate_image",{placement:e,model:T,site_type:b,style:n}),F({userPrompt:t,postContent:w(),notEnoughRequests:D,style:n}).catch(t=>{y("jetpack_ai_general_image_generation_error",{placement:e,error:t?.message,model:T,site_type:b,style:n})})},[y,e,T,b,F,w,D]),Y=(0,s.useCallback)(({userPrompt:t,style:n})=>{v("handleRegenerate",t),y("jetpack_ai_general_image_generation_generate_another_image",{placement:e,model:T,site_type:b,style:n}),P(e=>e+1),F({userPrompt:t,postContent:w(),notEnoughRequests:D,style:n}).catch(t=>{y("jetpack_ai_general_image_generation_error",{placement:e,error:t?.message,model:T,site_type:b})})},[y,e,T,b,F,w,D,P]),X=(0,s.useCallback)(({userPrompt:t,style:n})=>{v("handleTryAgain",t),y("jetpack_ai_general_image_generation_try_again",{placement:e,model:T,site_type:b,style:n}),F({userPrompt:t,postContent:w(),notEnoughRequests:D,style:n}).catch(t=>{y("jetpack_ai_general_image_generation_error",{placement:e,error:t?.message,model:T,site_type:b})})},[y,e,T,b,F,w,D]),Q=(0,s.useCallback)(()=>{y("jetpack_ai_general_image_generation_use_image",{placement:e,model:T,site_type:b});const t=({id:e,url:t,mime:r})=>{n?.({id:e,url:t,mime:r}),J()};B?.libraryId?t({id:B?.libraryId,url:B?.libraryUrl,mime:"image/png"}):x(B?.image).then(e=>{t({id:e.id,url:e.url,mime:e.mime})})},[y,e,T,b,B?.libraryId,B?.libraryUrl,B?.image,n,J,x]),ee=__("Generate another image","jetpack-publicize-pkg"),te=__("Generate","jetpack-publicize-pkg"),ne=D?(0,o.sprintf)(
|
||||
// Translators: %d is the cost of generating a featured image.
|
||||
__("Image generation costs %d requests per image. You don't have enough requests to generate another image.","jetpack-publicize-pkg"),I):null,re=(0,g.jsx)(i.Button,{onClick:Q,variant:"primary",disabled:!B?.image||B?.generating,children:__("Insert image","jetpack-publicize-pkg")});return(0,g.jsx)(p.A,{images:q,currentIndex:R,title:__("Generate an image with AI","jetpack-publicize-pkg"),cost:I,open:a,placement:e,onClose:J,onTryAgain:X,onGenerate:U?.current>0?Y:K,generating:V?.generating,notEnoughRequests:D,requireUpgrade:C,upgradeDescription:ne,currentLimit:S,currentUsage:A,isUnlimited:M,hasError:Boolean(V?.error),handlePreviousImage:L,handleNextImage:O,acceptButton:re,generateButtonLabel:U?.current>0?ee:te,instructionsPlaceholder:__("Describe the image you'd like to create and select a style.","jetpack-publicize-pkg"),imageStyles:H,onGuessStyle:$,prompt:k,setPrompt:j,inputDisabled:G,actionDisabled:Z})}},3620(e,t,n){"use strict";n.d(t,{A:()=>p});var r=n(47143),i=n(86087),s=n(27723),o=n(93832),a=n(31439),c=n(72448),l=n(62614),u=n(62038),d=n(75988);const __=s.__;function p({feature:e,type:t,cost:n,autoStart:s=!0,previousMediaId:p}){const{generateImageWithParameters:f}=(0,l.Ay)(),{increaseRequestsCount:h,featuresControl:m}=(0,c.A)(),{saveToMediaLibrary:g}=(0,u.A)(),{createNotice:v}=(0,r.useDispatch)("core/notices"),b=(0,i.useRef)(0),[w,x]=(0,i.useState)(0),[_,y]=(0,i.useState)([{generating:s}]),k=e===d.oW?"featured-image":"image",j=m?.[k],C=j?.styles,A=(0,i.useCallback)((e,t)=>{y(n=>{const r=[...n];return r[t]={...r[t],...e},r})},[]),S=(0,r.useSelect)(e=>e("core")?.getEntityRecord?.("postType","attachment",p),[p]);(0,i.useEffect)(()=>{S&&A({image:S.source_url,libraryId:S.id,libraryUrl:S.source_url,generating:!1},b.current)},[S,A]);const E=(0,i.useCallback)(e=>{v("success",e,{type:"snackbar",isDismissible:!0})},[v]),N=(0,i.useCallback)(()=>{h(n)},[h,n]),z=(0,i.useCallback)(e=>{if(!e)return"image.png";const t=e.split(" ").slice(0,10).join(" ");return(0,o.cleanForSlug)(t)+".png"},[]),I=(0,i.useCallback)(({userPrompt:n,postContent:r,notEnoughRequests:i,style:s=null})=>new Promise((o,a)=>{if(p&&0===b.current&&b.current++,A({generating:!0,error:null},b.current),i)return A({generating:!1,error:new Error(__("You don't have enough requests to generate another image.","jetpack-publicize-pkg"))},b.current),void o({});const c=f({feature:e,size:"1792x1024",responseFormat:"b64_json",messages:[{role:"jetpack-ai",context:{type:t,request:n||null,content:r,style:s}}],style:s||""}),l=z(n);c.then(e=>{if(e.data.length>0){const t="data:image/png;base64,"+e.data[0].b64_json,r=n||null,i=e.data[0].revised_prompt||null;A({image:t,prompt:r,revisedPrompt:i},b.current),N(),g(t,l).then(e=>{E(__("Image saved to media library.","jetpack-publicize-pkg")),A({libraryId:e?.id,libraryUrl:e?.url,generating:!1},b.current),b.current+=1,o({image:t,libraryId:e?.id,libraryUrl:e?.url,revisedPrompt:i})}).catch(()=>{A({generating:!1},b.current),b.current+=1,o({image:t})})}}).catch(e=>{A({generating:!1,error:e},b.current),a(e)})}),[A,f,e,t,N,g,E,z,p]),T=(0,i.useCallback)(()=>{x(Math.max(w-1,0))},[w]),M=(0,i.useCallback)(()=>{x(Math.min(w+1,_.length-1))},[w,_.length]),D=(0,i.useCallback)(async function(e,t="",n=""){if(!C||!C.length)return null;const r=[{role:"jetpack-ai",context:{type:t||"general-image-guess-style",request:e,content:n}}];try{const e=await(0,a.A)(r,{feature:"jetpack-ai-image-generator"});if(!e)return null;const t=C.find(({value:t})=>t===e);return t?t.value:null}catch(e){Promise.reject(e)}},[C]);return{current:w,setCurrent:x,processImageGeneration:I,handlePreviousImage:T,handleNextImage:M,currentImage:_[w],currentPointer:_[b.current],images:_,pointer:b,imageStyles:C,guessStyle:D}}},35918(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(97999),i=n(86087);function s(){const[e]=(0,i.useState)((0,r.isWoASite)()?"atomic":(0,r.isSimpleSite)()?"simple":"jetpack");return e}},77089(e,t,n){"use strict";n.d(t,{OE:()=>r.A});n(89289);var r=n(83158)},75988(e,t,n){"use strict";n.d(t,{Dk:()=>s,bb:()=>o,oW:()=>r,yP:()=>i});const r="featured-post-image",i="general-image",s="stable-diffusion",o="dall-e-3"},46381(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),i=n(86087),s=n(27723),o=n(13109),a=n(28847),c=(n(28151),n(10790));const __=s.__;function l({onGuidelinesClick:e,onFeedbackClick:t}){const n=(0,i.useCallback)(()=>{e?.()},[e]),s=(0,i.useCallback)(()=>{t?.()},[t]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"ai-image-modal__footer-disclaimer",children:[(0,c.jsx)(o.A,{icon:a.A}),(0,c.jsx)("span",{children:__("Generated images could be inaccurate, biased or include text.","jetpack-publicize-pkg")}),(0,c.jsx)(r.Button,{variant:"link",className:"ai-image-modal__guidelines-button",href:"https://jetpack.com/redirect/?source=ai-guidelines",target:"_blank",onClick:n,children:(0,c.jsxs)("span",{children:[__("Guidelines","jetpack-publicize-pkg")," ↗"]})})]}),(0,c.jsx)(r.Button,{variant:"link",className:"ai-image-modal__feedback-button",href:"htLine truncated
|
||||
// Translators: %s is the date when the requests will reset.
|
||||
const n=__("Requests will reset on %s.","jetpack-publicize-pkg");return`${t} ${(0,c.sprintf)(n,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,h.jsx)("a",{href:"https://jetpack.com/redirect/?source=ai-assistant-fair-usage-policy",target:"_blank",rel:"noreferrer"}),span:(0,h.jsx)("span",{})})})();return"muted"===e?(0,h.jsx)("span",{className:"jetpack-ai-fair-usage-notice-muted-variant",children:t}):"error"===e?(0,h.jsx)(o.Notice,{status:"error",isDismissible:!1,className:"jetpack-ai-fair-usage-notice",children:t}):null},v=e=>{const{upgradeType:t,currentTier:n}=(0,p.A)();return 1===n?.value?(0,h.jsx)(g,{}):"vip"===t?(({description:e=null,useLightNudge:t=!1})=>{const n=t?f.U:s.cb,r=(0,a.createInterpolateElement)(__("You've reached the Jetpack AI rate limit. <strong>Please reach out to your VIP account team.</strong>","jetpack-publicize-pkg"),{strong:(0,h.jsx)("strong",{})});return(0,h.jsx)(n,{buttonText:null,checkoutUrl:null,className:"jetpack-ai-upgrade-banner",description:e||r,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:n=!1})=>{const o=n?f.U:s.cb,{checkoutUrl:l}=(0,d.A)(),u=(0,i.CP)(),{nextTier:g,tierPlansEnabled:v,currentTier:b,requestsCount:w}=(0,p.A)(),{tracks:x}=(0,i.st)(),_=(0,a.useCallback)(()=>{m("upgrade",e),x.recordEvent("jetpack_ai_upgrade_button",{current_tier_slug:b?.slug,requests_count:w,placement:e})},[b,w,x,e]),y=(0,a.useCallback)(()=>{m("contact us",e),x.recordEvent("jetpack_ai_upgrade_contact_us",{placement:e})},[x,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-publicize-pkg"),{strong:(0,h.jsx)("strong",{})});return(0,h.jsx)(o,{showButton:!1,className:"jetpack-ai-upgrade-banner",description:t||e,visible:!0,align:null,title:null,context:null})}if(v){if(!g){const e=(0,r.A)("jetpack-ai-tiers-more-requests-contact"),n=__("You have reached the request limit for your current plan.","jetpack-publicize-pkg");return(0,h.jsx)(o,{buttonText:__("Contact Us","jetpack-publicize-pkg"),description:t||n,className:"jetpack-ai-upgrade-banner",checkoutUrl:e,visible:!0,align:null,title:null,context:null,goToCheckoutPage:y,target:"_blank"})}const e=(0,a.createInterpolateElement)((0,c.sprintf)(/* Translators: %d: the number of requests allowed */
|
||||
__("You have reached the requests limit for your current plan. <strong>Upgrade now to increase your requests limit to %d.</strong>","jetpack-publicize-pkg"),g.limit),{strong:(0,h.jsx)("strong",{})});return(0,h.jsx)(o,{buttonText:(0,c.sprintf)(/* Translators: %d: the number of requests */
|
||||
__("Upgrade to %d requests","jetpack-publicize-pkg"),g.limit),checkoutUrl:l,className:"jetpack-ai-upgrade-banner",description:t||e,goToCheckoutPage:_,visible:!0,align:"center",title:null,context:null,target:"_blank"})}return(0,h.jsx)(o,{buttonText:__("Upgrade","jetpack-publicize-pkg"),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-publicize-pkg"),{strong:(0,h.jsx)("strong",{})}),goToCheckoutPage:_,visible:!0,align:null,title:null,context:null,target:"_blank"})})(e)}},71567(e,t,n){"use strict";n.d(t,{U:()=>o});var r=n(56427),i=n(27723),s=(n(92051),n(10790));const __=i.__,o=({title:e,description:t,buttonText:n=null,checkoutUrl:i=null,goToCheckoutPage:o=null,isRedirecting:a=!1,showButton:c=!0,target:l="_top"})=>{const u=__("Redirecting…","jetpack-publicize-pkg");return(0,s.jsx)("div",{className:"jetpack-upgrade-plan-banner-light",children:(0,s.jsx)(r.Notice,{status:"error",isDismissible:!1,children:(0,s.jsxs)("p",{children:[e&&(0,s.jsx)("strong",{children:e}),t," ",c&&(0,s.jsx)(r.Button,{href:a?null:i,onClick:o,variant:"link",target:l,children:(0,s.jsx)("span",{children:a?u:n})})]})})})}},43984(e,t,n){"use strict";var r=n(27723);const __=r.__;__("English","jetpack-publicize-pkg"),__("Spanish","jetpack-publicize-pkg"),__("French","jetpack-publicize-pkg"),__("German","jetpack-publicize-pkg"),__("Italian","jetpack-publicize-pkg"),__("Portuguese","jetpack-publicize-pkg"),__("Russian","jetpack-publicize-pkg"),__("Chinese","jetpack-publicize-pkg"),__("Japanese","jetpack-publicize-pkg"),__("Arabic","jetpack-publicize-pkg"),__("Hindi","jetpack-publicize-pkg"),__("Korean","jetpack-publicize-pkg"),__("Formal","jetpack-publicize-pkg"),__("Informal","jetpack-publicize-pkg"),__("Optimistic","jetpack-publicize-pkg"),__("Humorous","jetpack-publicize-pkg"),__("Serious","jetpack-publicize-pkg"),__("Skeptical","jetpack-publicize-pkg"),__("Empathetic","jetpack-publicize-pkg"),__("Confident","jetpack-publicize-pkg"),__("Passionate","jetpack-publicize-pkg"),__("Provocative","jetpack-publicize-pkg"),__("Translate","jetpack-publicize-pkg"),__("Change tone","jetpack-publicize-pkg"),__("Correct spelling and grammar","jetpack-publicize-pkg"),__("Simplify","jetpack-publicize-pkg"),__("Summarize","jetpack-publicize-pkg"),__("Make shorter","jetpack-publicize-pkg"),__("Expand","jetpack-publicize-pkg"),__("Turn list into a table","jetpack-publicize-pkg"),__("Write a post from this list","jetpack-publicize-pkg"),__("Generate a post title","jetpack-publicize-pkg"),__("Summary based on title","jetpack-publicize-pkg"),__("Continue writing","jetpack-publicize-pkg")},2166(e,t,n){"use strict";n.d(t,{R:()=>o});var r=n(51609),i=n(10790);const s=(0,r.createContext)({}),o=({value:e,children:t})=>(0,i.jsx)(s.Provider,{value:e,children:t})},13965(e,t,n){"use strict";n.d(t,{Rb:()=>r.R});var r=n(2166);n(59886),n(53471)},53471(e,t,n){"use strict";n(51609),n(78836),n(13965)},59886(e,t,n){"use strict";var r=n(29491),i=n(86087),s=n(46219),o=n(13965),a=n(10790);(0,r.createHigherOrderComponent)(e=>t=>{const{suggestion:n,error:r,requestingState:c,request:l,stopSuggestion:u,eventSource:d}=(0,s.Ay)(),p=(0,i.useMemo)(()=>({suggestion:n,requestingError:r,requestingState:c,eventSource:d,requestSuggestion:l,stopSuggestion:u}),[n,r,c,d,l,u]);return(0,a.jsx)(o.Rb,{value:p,children:(0,a.jsx)(e,{...t})})},"withAiDataProvider")},42694(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(3924),i=n(97999),s=n(85985),o=n(72448);function a(){const{nextTier:e,tierPlansEnabled:t}=(0,o.A)(),n=(()=>{const e=new URLSearchParams(window.location.search),t=(0,s.GE)();return(0,i.isSimpleSite)()&&e.has("post")?`https://wordpress.com/post/${t}/${e.get("post")}`:`https://wordpress.com/home/${t}`})(),a=(0,r.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(n)}`}),c=(0,r.A)("jetpack-ai-upgrade-url-for-jetpack-sites",{site:(0,s.GE)(),path:"jetpack_ai_yearly"}),l=(0,i.isWpcomPlatformSite)()?a:c,{autosaveAndRedirect:u,isRedirecting:d}=(0,s.ZR)(l);return{checkoutUrl:l,autosaveAndRedirect:u,isRedirecting:d}}},72448(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(85985),i=n(47143),s=n(86087);function o(){const e=(0,i.useSelect)(e=>e("wordpress-com/plans").getAiAssistantFeature(),[]),t=(0,i.useSelect)(e=>e("wordpress-com/plans").getIsRequestingAiAssistantFeature(),[]),{fetchAiAssistantFeature:n,increaseAiAssistantRequestsCount:o,dequeueAiAssistantFeatureAsyncRequest:a}=(0,i.useDispatch)("wordpress-com/plans");return(0,s.useMemo)(()=>{const i=(0,r.Bd)(e?.currentTier),s=e?.currentTier?.limit||e?.requestsLimit,c=i===r._X?e?.requestsCount:e?.usagePeriod?.requestsCount,l=i===r._X?e?.requestsLimit:s;return{...e,requestsCount:c,requestsLimit:l,loading:t,error:null,refresh:n,increaseRequestsCount:o,dequeueAsyncRequest:a}Line truncated
|
||||
__("(opens in a new tab)","jetpack-publicize-pkg")})]}),C=v?"_blank":void 0,A=n?.[0]&&null!==n[0]&&"components-tooltip"!==n?.[0]?.props?.className,S={ref:t,target:C,variant:i,className:(0,a.A)(y,{"has-text":!!p&&A}),icon:v?void 0:p,iconSize:f,disabled:h,"aria-disabled":h,isDestructive:m,text:w,..._};return(0,u.jsxs)(r.Button,{...S,children:[g&&(0,u.jsx)(r.Spinner,{}),(0,u.jsx)("span",{children:n}),j]})});d.displayName="Button";const p=d},69222(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(29491),i=n(86087),s=n(27723),o=n(51112),a=n(78478),c=n(10790);const __=s.__,l=({buttonStyle:e="icon",textToCopy:t,onCopy:n,...s})=>{const[l,u]=(0,i.useState)(!1),d=(0,i.useRef)(),p=(0,r.useCopyToClipboard)(t,()=>{d.current&&clearTimeout(d.current),u(!0),n?.(),d.current=setTimeout(()=>{u(!1),d.current=void 0},3e3)});(0,i.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);let f=null,h=null;"text"!==e&&(f=l?(0,c.jsx)(a.Nr,{}):(0,c.jsx)(a.ui,{}));const m=__("Copy to clipboard","jetpack-publicize-pkg");return"icon"!==e&&(h=l?__("Copied!","jetpack-publicize-pkg"):m),(0,c.jsx)(o.A,{"aria-label":m,icon:f,children:h,ref:p,...s})}},63406(e,t,n){"use strict";n.d(t,{I:()=>s});var r=n(47143),i=n(692);function s(){const e=(0,r.useDispatch)(i.store),t=(0,r.useSelect)(e=>e(i.store).getNotices(),[]);return{...e,createNotice:(t,n,r)=>e.createNotice(t,n,{type:"snackbar",...r}),createErrorNotice:(t,n)=>e.createErrorNotice(t,{type:"snackbar",...n}),createInfoNotice:(t,n)=>e.createInfoNotice(t,{type:"snackbar",...n}),createSuccessNotice:(t,n)=>e.createSuccessNotice(t,{type:"snackbar",...n}),createWarningNotice:(t,n)=>e.createWarningNotice(t,{type:"snackbar",...n}),getNotices:()=>t}}},40597(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(56427),i=n(13109),s=n(28847),o=n(13022),a=n(51609),c=n(51112),l=(n(77191),n(10790));const u=e=>({"top-end":"top left",top:"top center","top-start":"top right","bottom-end":"bottom left",bottom:"bottom center","bottom-start":"bottom right"}[e]),d=({className:e="",iconClassName:t="",placement:n="bottom-end",animate:d=!0,iconCode:p=s.A,iconSize:f=18,offset:h=10,title:m,children:g,popoverAnchorStyle:v="icon",forceShow:b=!1,hoverShow:w=!1,wide:x=!1,inline:_=!0,shift:y=!1})=>{const[k,j]=(0,a.useState)(!1),[C,A]=(0,a.useState)(null),S=(0,a.useCallback)(()=>j(!1),[j]),E=(0,a.useCallback)(e=>{e.preventDefault(),j(!k)},[k,j]),N={position:u(n),placement:n,animate:d,noArrow:!1,resize:!1,flip:!1,offset:h,focusOnMount:"firstElement",onClose:S,className:"icon-tooltip-container",inline:_,shift:y},z="wrapper"===v,I=(0,o.A)("icon-tooltip-wrapper",e),T={left:z?0:-(62-f/2)+"px"},M=z&&b,D=(0,a.useCallback)(()=>{w&&(C&&(clearTimeout(C),A(null)),j(!0))},[w,C]),R=(0,a.useCallback)(()=>{if(w){const e=setTimeout(()=>{j(!1),A(null)},100);A(e)}},[w]);return(0,l.jsxs)("div",{className:I,"data-testid":"icon-tooltip_wrapper",onMouseEnter:D,onMouseLeave:R,children:[!z&&(0,l.jsx)(c.A,{variant:"link",onMouseDown:E,children:(0,l.jsx)(i.A,{className:t,icon:p,size:f})}),(0,l.jsx)("div",{className:(0,o.A)("icon-tooltip-helper",{"is-wide":x}),style:T,children:(M||k)&&(0,l.jsx)(r.Popover,{...N,children:(0,l.jsxs)("div",{children:[m&&(0,l.jsx)("div",{className:"icon-tooltip-title",children:m}),(0,l.jsx)("div",{className:"icon-tooltip-content",children:g})]})})})]})}},78478(e,t,n){"use strict";n.d(t,{M5:()=>p,Nr:()=>u,b6:()=>l,ui:()=>d});var r=n(56427),i=n(13022),s=n(84705),o=n(67400),a=n(10790);const c=({className:e,size:t=24,viewBox:n="0 0 24 24",opacity:s=1,color:c="#2C3338",children:l})=>{const u={className:(0,i.A)(o.A.iconWrapper,e),width:t,height:t,viewBox:n,opacity:s,fill:void 0};return c&&(u.fill=c),(0,a.jsx)(r.SVG,{...u,fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(r.G,{opacity:s,children:l})})},l=({opacity:e=1,size:t,color:n})=>(0,a.jsx)(c,{size:t,opacity:e,color:n,children:(0,a.jsx)(r.Path,{d:"M15.5 3.97809V18.0219L7.5 15.5977V20H6V15.1431L3.27498 14.3173C2.22086 13.9979 1.5 13.0262 1.5 11.9248V10.0752C1.5 8.97375 2.22087 8.00207 3.27498 7.68264L15.5 3.97809ZM14 16L7.5 14.0303L7.5 7.96969L14 5.99999V16ZM6 8.42423L6 13.5757L3.70999 12.8818C3.28835 12.754 3 12.3654 3 11.9248V10.0752C3 9.63462 3.28835 9.24595 3.70999 9.11818L6 8.42423ZM17.5 11.75H21.5V10.25H17.5V11.75ZM21.5 16L17.5 15V13.5L21.5 14.5V16ZM17.5 8.5L21.5 7.5V6L17.5 7V8.5Z"})}),u=({size:e,className:t=o.A["checkmark-icon"],color:n})=>(0,a.jsx)(c,{className:t,size:e,color:n,children:(0,a.jsx)(r.Path,{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})}),d=({size:e,className:t=o.A["clipboard-icon"],color:n})=>(0,a.jsx)(c,{className:t,size:e,color:n,children:(0,a.jsx)(r.Path,{d:"M5.625 5.5H15.375C15.444 5.5 15.5 5.55596 15.5 5.625V15.375C15.5 15.444 15.444 15.5 15.375 15.5H5.625C5.55596 15.5 5.5 15.444 5.5 15.375V5.625C5.5 5.55596 5.55596 5.5 5.625 5.5ZM4 5.625C4 4.72754 4.72754 4 5.625 4H15.375C16.2725 4 17 4Line truncated
|
||||
// translators: Default description for a Facebook post
|
||||
__("Visit the post for more.","jetpack-publicize-pkg")]}),(0,f.jsx)("div",{className:"facebook-preview__info",children:(0,f.jsx)(p.A,{name:"info"})})]})})]})]}),(0,f.jsx)(u.A,{})]})}},66603(e,t,n){"use strict";n.d(t,{h:()=>l});var r=n(33853),i=n(30759),s=n(87446),o=n(44381),a=n(24795),c=(n(85708),n(10790));const l=({url:e,user:t,customText:n,media:l,imageMode:u})=>{const[d]=(0,s.A)({mode:u}),p="is-"+(d===r.q8?"portrait":"landscape");return(0,c.jsxs)("div",{className:"facebook-preview__post",children:[(0,c.jsx)(a.A,{user:t}),(0,c.jsxs)("div",{className:"facebook-preview__content",children:[n&&(0,c.jsx)(i.A,{text:n,url:e}),(0,c.jsx)("div",{className:"facebook-preview__body",children:l?(0,c.jsx)("div",{className:`facebook-preview__media ${p}`,children:l.map((e,t)=>(0,c.jsx)("div",{className:`facebook-preview__media-item ${p}`,children:e.type.startsWith("video/")?(0,c.jsx)("video",{controls:!0,children:(0,c.jsx)("source",{src:e.url,type:e.type})}):(0,c.jsx)("img",{alt:e.alt||"",src:e.url})},`facebook-preview__media-item-${t}`))}):null})]}),(0,c.jsx)(o.A,{})]})}},44381(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(27723),i=n(76333),s=(n(12948),n(10790));const __=r.__,o=()=>(0,s.jsx)("ul",{className:"facebook-preview__post-actions",children:[{icon:"like",
|
||||
// translators: Facebook "Like" action
|
||||
label:__("Like","jetpack-publicize-pkg")},{icon:"comment",
|
||||
// translators: Facebook "Comment" action
|
||||
label:__("Comment","jetpack-publicize-pkg")},{icon:"share",
|
||||
// translators: Facebook "Share" action
|
||||
label:__("Share","jetpack-publicize-pkg")}].map(({icon:e,label:t})=>(0,s.jsxs)("li",{children:[(0,s.jsx)(i.A,{name:e}),(0,s.jsx)("span",{children:t})]},e))})},24795(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(27723),i=n(50513),s=n(76333),o=(n(97498),n(10790));const __=r.__,_x=r._x,a=({user:e,timeElapsed:t,hideOptions:n})=>(0,o.jsxs)("div",{className:"facebook-preview__post-header",children:[(0,o.jsxs)("div",{className:"facebook-preview__post-header-content",children:[(0,o.jsx)(i._,{className:"facebook-preview__post-header-avatar",src:e?.avatarUrl}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"facebook-preview__post-header-name",children:e?.displayName||
|
||||
// translators: name of a fictional Facebook User
|
||||
__("Anonymous User","jetpack-publicize-pkg")}),(0,o.jsxs)("div",{className:"facebook-preview__post-header-share",children:[(0,o.jsx)("span",{className:"facebook-preview__post-header-time",children:t?__(
|
||||
// translators: short version of `1 hour`
|
||||
"1h","jetpack-publicize-pkg"):_x(
|
||||
// translators: temporal indication of when a post was published
|
||||
"Just now","","jetpack-publicize-pkg")}),(0,o.jsx)("span",{className:"facebook-preview__post-header-dot","aria-hidden":"true",children:"·"}),(0,o.jsx)(s.A,{name:"public"})]})]})]}),!n&&(0,o.jsx)("div",{className:"facebook-preview__post-header-more"})]})},76333(e,t,n){"use strict";n.d(t,{A:()=>i});n(18703);var r=n(10790);const i=({name:e})=>(0,r.jsx)("i",{className:`facebook-preview__post-icon facebook-preview__post-icon-${e}`})},54560(e,t,n){"use strict";n.d(t,{m:()=>u});var r=n(76223),i=n(92917),s=(n(97880),n(10790));const o=160,a=e=>{const t=e.startsWith("https://")?"https://":"http://",n=t+e.replace(t,"").split("/").join(" › ");return(0,r.RA)((0,r.f5)(68),(0,r.ZT)(68))(n)},c=(0,r.RA)((0,r.f5)(63),(0,r.y5)(23,73),(0,r.ZT)(63)),l=(0,r.RA)((0,r.f5)(o),(0,r.y5)(80,170),(0,r.ZT)(o)),u=({description:e="",siteIcon:t,siteTitle:n,title:o="",url:u=""})=>{const d=(0,r.GA)(u);return(0,s.jsx)("div",{className:"search-preview",children:(0,s.jsxs)("div",{className:"search-preview__display",children:[(0,s.jsxs)("div",{className:"search-preview__header",children:[(0,s.jsxs)("div",{className:"search-preview__branding",children:[(0,s.jsx)(i.F,{className:"search-preview__icon",src:t}),(0,s.jsxs)("div",{className:"search-preview__site",children:[(0,s.jsx)("div",{className:"search-preview__site--title",children:n||d}),(0,s.jsx)("div",{className:"search-preview__url",children:a(u)})]})]}),(0,s.jsx)("div",{className:"search-preview__menu",children:(0,s.jsx)("svg",{focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})})})]}),(0,s.jsx)("div",{className:"search-preview__title",children:c(o)}),(0,s.jsx)("div",{className:"search-preview__description",children:l((0,r.$J)(e))})]})})}},76223(e,t,n){"use strict";n.d(t,{$J:()=>p,GA:()=>o,RA:()=>d,TR:()=>b,X2:()=>f,ZT:()=>u,f5:()=>c,hV:()=>v,p1:()=>_,tX:()=>m,ti:()=>h,vI:()=>g,x5:()=>k,y5:()=>l});var r=n(86087),i=n(27723),s=n(10790);const o=e=>{const t=e.replace(/^[^/]+:\/\//,""),n=t.indexOf("/");return-1===n?t:t.substring(0,n)},a=e=>Array.from(e).length,c=e=>t=>a(t)<=e&&t,l=(e,t)=>n=>{const r=n.slice(0,t),i=r.lastIndexOf(" ");return i>e&&i<t&&r.slice(0,i).concat("…")},u=e=>t=>{return(n=t,r=0,i=e,Array.from(n).slice(r,i).join("")).concat("…");var n,r,i},d=(...e)=>t=>e.find(e=>!1!==e(t))?.(t),p=(e,t=[])=>{const n=new RegExp(`(<([^${t.join("")}>]+)>)`,"gi");return e?e.replace(n,""):""},f=e=>p(e).substring(0,50),h=(e,t)=>new RegExp(`<${t}[^>]*>`,"gi").test(e),m=new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"short"}).format,g=new Intl.DateTimeFormat("en-US",{day:"2-digit",month:"2-digit",year:"numeric"}).format,v=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format,b=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format,w=e=>e.replace(/\s+/g," ").trim(),x=(e,t)=>{let n=0;for(let r=e.indexOf(t);-1!==r;r=e.indexOf(t,r+1))n++;return n};function _(e){if(!e)return[];const t=document.implementation.createHTMLDocument("");t.body.innerHTML=e;const n=[];for(const e of Array.from(t.body.querySelectorAll("a[href]"))){const r=e.getAttribute("href")??"",i=w(e.textContent??"");if(!/^https?:\/\//i.test(r)||""===i||i===r)continue;const s=t.createRange();s.selectNodeContents(t.body),s.setEndBefore(e);const o=x(w(s.toString()),i);n.push({text:i,href:r,occurrence:o})}return n}const y={twitter:"https://twitter.com/hashtag/%1$s",facebook:"https://www.facebook.com/hashtag/%1$s",linkedin:"https://www.linkedin.com/feed/hashtag/?keywords=%1$s",instagram:"https://www.instagram.com/explore/tags/%1$s",mastodon:"https://%2$s/tags/%1$s",nextdoor:"https://nextdoor.com/hashtag/%1$s",threads:"https://www.threads.net/search?q=%1$s&serp_type=tags",tumblr:"https://www.tumblr.com/tagged/%1$s",bluesky:"https://bsky.app/hashtag/%1$s"};function k(e,t){const{platform:n,maxChars:o,maxLines:c,hyperlinkHashtags:l=!0,hyperlinkUrls:d="instagram"!==n,hyperlinks:f}=t;let h=p(e);if(h=h.replaceAll(/(?:\s*[\n\r]){2,}/g,"\n\n"),o&&a(h)>o&&(h=u(o)(h)),c){const e=h.split("\n");e.length>c&&(h=e.slice(0,c).join("\n"))}const m={};if(d){(h.match(/(https?:\/\/\S+)/g)||[]).forEach((e,t)=>{m[`Link${t}`]=(0,s.jsx)("a",{href:e,rel:"noopener noreferrer",target:"_blank",children:e}),h=h.replace(e,`<Link${t} />`)})}if(l&&y[n]){const e=h.matchAll(/(^|\s)#(\w+)/g),r=y[n];[...e].forEach(([e,n,o],a)=>{const c=(0,i.sprintf)(r,o,t.hashtagDomain);m[`Hashtag${a}`]=(0,s.jsx)("a",{href:c,rel:"noopener noreferrer",target:"_blank",children:`#${o}`}),h=h.replace(e,`${n}<Hashtag${a} />`)})}if(f?.length){const e=[];f.forEach(({text:t,href:n,occurrence:r=0},i)=>{if(!t)return;const s=((e,t,n)=>{let r=e.indexOf(t);for(;-1!==r&&n>0;)n--,r=e.indexOf(t,r+1);return r})(h,t,r);if(-1===s)return;e.some(e=>s<e.pos+e.text.length&&e.pos<s+t.length)||e.push({pos:s,text:t,href:n,index:i})}),e.sort((e,t)=>t.pos-e.pos);for(const{posLine truncated
|
||||
// translators: refers to the actor level of the post being shared, e.g. "1st", "2nd", "3rd", etc.
|
||||
__("1st","jetpack-publicize-pkg")})]}),u?(0,l.jsx)("div",{className:"linkedin-preview__header--profile-title",children:u}):null,(0,l.jsxs)("div",{className:"linkedin-preview__header--profile-meta",children:[(0,l.jsx)("span",{children:
|
||||
// translators: refers to the time since the post was published, e.g. "1h"
|
||||
__("1h","jetpack-publicize-pkg")}),(0,l.jsx)("span",{children:"•"}),(0,l.jsx)("svg",{viewBox:"0 0 16 16",fill:"currentColor",width:"16",height:"16",focusable:"false",children:(0,l.jsx)("path",{d:"M8 1a7 7 0 107 7 7 7 0 00-7-7zM3 8a5 5 0 011-3l.55.55A1.5 1.5 0 015 6.62v1.07a.75.75 0 00.22.53l.56.56a.75.75 0 00.53.22H7v.69a.75.75 0 00.22.53l.56.56a.75.75 0 01.22.53V13a5 5 0 01-5-5zm6.24 4.83l2-2.46a.75.75 0 00.09-.8l-.58-1.16A.76.76 0 0010 8H7v-.19a.51.51 0 01.28-.45l.38-.19a.74.74 0 01.68 0L9 7.5l.38-.7a1 1 0 00.12-.48v-.85a.78.78 0 01.21-.53l1.07-1.09a5 5 0 01-1.54 9z"})})]})]})]}),(0,l.jsxs)("div",{className:"linkedin-preview__content",children:[f?(0,l.jsxs)("div",{className:"linkedin-preview__caption",children:[(0,l.jsx)("span",{children:(0,l.jsx)(o.MW,{text:f,children:e=>(0,s.x5)(e,{platform:"linkedin",maxChars:c.v})})}),v&&g&&!f.includes(g)&&(0,l.jsxs)(l.Fragment,{children:[" - ",(0,l.jsx)("a",{href:g,rel:"nofollow noopener noreferrer",target:"_blank",children:g})]})]}):null,v?(0,l.jsx)("div",{className:"linkedin-preview__media",children:h.map((e,t)=>(0,l.jsx)("div",{className:"linkedin-preview__media-item",children:e.type.startsWith("video/")?(0,l.jsx)("video",{controls:!0,children:(0,l.jsx)("source",{src:e.url,type:e.type})}):(0,l.jsx)("img",{alt:e.alt||"",src:e.url})},`linkedin-preview__media-item-${t}`))}):(0,l.jsxs)("article",{children:[t?(0,l.jsx)(a.Q,{className:"linkedin-preview__image",src:t,alt:"",focalPoint:n}):null,g?(0,l.jsxs)("div",{className:"linkedin-preview__description",children:[(0,l.jsx)("h2",{className:"linkedin-preview__description--title",children:m||(0,s.X2)(f)}),(0,l.jsxs)("div",{className:"linkedin-preview__description--meta",children:[(0,l.jsx)("span",{className:"linkedin-preview__description--url",children:(0,s.GA)(g)}),(0,l.jsx)("span",{children:"•"}),(0,l.jsx)("span",{children:(0,r.sprintf)(
|
||||
// translators: %d is the number of minutes it takes to read the article
|
||||
__("%d min read","jetpack-publicize-pkg"),e)})]})]}):null]})]})]})})}},17562(e,t,n){"use strict";n.d(t,{w:()=>r});const r="mastodon.social"},50710(e,t,n){"use strict";n.d(t,{E6:()=>a,gD:()=>o,w0:()=>c});var r=n(76223),i=n(17562);const s=/^@([^@]*)@([^@]*)$/i,o=e=>(0,r.RA)((0,r.f5)(200),(0,r.ZT)(200))((0,r.$J)(e))||"",a=(e,t)=>{const{instance:n,offset:i}=t;return(0,r.x5)(e,{platform:"mastodon",maxChars:500-i,hashtagDomain:n})},c=e=>{const t=e.match(s);return{username:t?.[1]||"",instance:t?.[2]||i.w}}},5874(e,t,n){"use strict";n.d(t,{i:()=>a});var r=n(74822),i=n(23163),s=n(39490),o=(n(75312),n(10790));const a=e=>{const{user:t}=e;return(0,o.jsxs)("div",{className:"mastodon-preview__post",children:[(0,o.jsx)(s.A,{user:t}),(0,o.jsx)(i.A,{...e,customImage:""}),(0,o.jsx)(r.A,{})]})}},27300(e,t,n){"use strict";n.d(t,{_:()=>l});var r=n(13022),i=n(74822),s=n(30461),o=n(23163),a=n(39490),c=(n(75312),n(10790));const l=e=>{const{user:t,media:n}=e;return(0,c.jsxs)("div",{className:"mastodon-preview__post",children:[(0,c.jsx)(a.A,{user:t}),(0,c.jsx)(s.A,{...e,children:n?.length?(0,c.jsx)("div",{className:(0,r.A)("mastodon-preview__media",{"as-grid":n.length>1}),children:n.map((e,t)=>(0,c.jsx)("div",{className:"mastodon-preview__media-item",children:e.type.startsWith("video/")?(0,c.jsx)("video",{controls:!0,children:(0,c.jsx)("source",{src:e.url,type:e.type})}):(0,c.jsx)("img",{alt:e.alt||"",src:e.url})},`mastodon-preview__media-item-${t}`))}):null}),!n?.length&&e.customText?.includes(e.url)?(0,c.jsx)(o.A,{...e}):null,(0,c.jsx)(i.A,{})]})}},74822(e,t,n){"use strict";n.d(t,{A:()=>i});n(16307);var r=n(10790);const i=()=>(0,r.jsxs)("div",{className:"mastodon-preview__post-actions",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M760-200v-160q0-50-35-85t-85-35H273l144 144-57 56-240-240 240-240 57 56-144 144h367q83 0 141.5 58.5T840-360v160h-80Z"})})," ",(0,r.jsx)("span",{children:0})]}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M280-80 120-240l160-160 56 58-62 62h406v-160h80v240H274l62 62-56 58Zm-80-440v-240h486l-62-62 56-58 160 160-160 160-56-58 62-62H280v160h-80Z"})})}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"m354-287 126-76 126 77-33-144 111-96-146-13-58-136-58 135-146 13 111 97-33 143ZM233-120l65-281L80-590l288-25 112-265 112 265 288 25-218 189 65 281-247-149-247 149Zm247-350Z"})})}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M200-120v-640q0-33 23.5-56.5T280-840h400q33 0 56.5 23.5T760-760v640L480-240 200-120Zm80-122 200-86 200 86v-518H280v518Zm0-518h400-400Z"})})}),(0,r.jsx)("div",{children:(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,r.jsx)("path",{d:"M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z"})})})]})},30461(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(76223),i=n(28469),s=n(50710),o=(n(88232),n(10790));const a=e=>{const{title:t,description:n,customText:a,user:c,children:l}=e,u={instance:c?.address?(0,s.w0)(c.address).instance:"",offset:0};let d;if(a)d=(0,o.jsx)("p",{children:(0,o.jsx)(i.MW,{text:a,children:e=>(0,s.E6)(e,u)})});else if(n)if(t){const e=(0,r.$J)(t);u.offset=e.length,d=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{children:e}),(0,o.jsx)("p",{children:(0,o.jsx)(i.MW,{text:n,children:e=>(0,s.E6)(e,u)})})]})}else d=(0,o.jsx)("p",{children:(0,o.jsx)(i.MW,{text:n,children:e=>(0,s.E6)(e,u)})});else d=(0,o.jsx)("p",{children:(0,s.E6)(t,u)});return(0,o.jsxs)("div",{className:"mastodon-preview__body",children:[d,l]})}},23163(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(27723),i=n(13022),s=n(76223),o=n(2909),a=n(50710),c=(n(84422),n(10790));const __=r.__,l=({siteName:e,title:t,description:n,url:r,image:l,customImage:u,imageFocalPoint:d})=>(0,c.jsxs)("div",{className:(0,i.A)("mastodon-preview__card",{"has-image":l}),children:[(0,c.jsx)("div",{className:"mastodon-preview__card-img",children:l||u?(0,c.jsx)(o.Q,{src:l||u,alt:__("Mastodon preview thumbnail","jetpack-publicize-pkg"),focalPoint:d}):(0,c.jsx)("div",{className:"mastodon-preview__card-img--fallback",children:(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24","aria-hidden":"true",children:(0,c.jsx)("path",{d:"M320-240h320v-80H320v80Line truncated
|
||||
// translators: username of a fictional Mastodon User
|
||||
__("anonymous-user","jetpack-publicize-pkg")}),(0,c.jsx)("div",{className:"mastodon-preview__post-header-username",children:n?.replace(`@${o.w}`,"")||"@username"})]})]}),(0,c.jsxs)("div",{className:"mastodon-preview__post-header-audience",children:[(0,c.jsx)(a.f,{}),(0,s.TR)(new Date)]})]})}},12625(e,t,n){"use strict";n.d(t,{f:()=>i});var r=n(10790);function i(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"15",viewBox:"0 -960 960 960",width:"15",role:"img",children:(0,r.jsx)("path",{d:"M480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm-40-82v-78q-33 0-56.5-23.5T360-320v-40L168-552q-3 18-5.5 36t-2.5 36q0 121 79.5 212T440-162Zm276-102q20-22 36-47.5t26.5-53q10.5-27.5 16-56.5t5.5-59q0-98-54.5-179T600-776v16q0 33-23.5 56.5T520-680h-80v80q0 17-11.5 28.5T400-560h-80v80h240q17 0 28.5 11.5T600-440v120h40q26 0 47 15.5t29 40.5Z"})})}},73192(e,t,n){"use strict";n.d(t,{v:()=>r});const r=65e3},28236(e,t,n){"use strict";n.d(t,{$:()=>c});var r=n(27723),i=n(38013),s=n(30073),o=n(78607),a=n(10790);const __=r.__;function c(){return(0,a.jsxs)("div",{className:"nextdoor-preview__footer--actions",children:[(0,a.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,a.jsx)(s.p,{}),(0,a.jsx)("span",{children:__("Like","jetpack-publicize-pkg")})]}),(0,a.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,a.jsx)(i.T,{}),(0,a.jsx)("span",{children:__("Comment","jetpack-publicize-pkg")})]}),(0,a.jsxs)("div",{className:"nextdoor-preview__footer--actions-item",children:[(0,a.jsx)(o.l,{}),(0,a.jsx)("span",{children:__("Share","jetpack-publicize-pkg")})]})]})}},96739(e,t,n){"use strict";n.d(t,{z:()=>i});var r=n(10790);function i(){return(0,r.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"#dfe1e4",fillRule:"evenodd",d:"M7.127 13.876a.732.732 0 1 0 1.035 1.035l4.75-4.749a.732.732 0 0 0 0-1.035L8.123 4.34A.732.732 0 0 0 7.09 5.375l4.27 4.27-4.232 4.23Z"})})}},38013(e,t,n){"use strict";n.d(t,{T:()=>i});var r=n(10790);function i(){return(0,r.jsx)("svg",{width:"20",height:"20",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 10.031C2 5.596 5.574 2 10 2h4c4.427 0 8 3.596 8 8.031 0 4.435-3.573 8.031-8 8.031h-1.52a17.033 17.033 0 0 1-1.377 1.467c-.991.938-2.456 2.079-4.086 2.437a1.403 1.403 0 0 1-1.458-.565 1.55 1.55 0 0 1-.195-1.394c.28-.823.395-1.734.434-2.464.014-.257.018-.485.018-.672A8.017 8.017 0 0 1 2 10.031Zm5.798 6.178a7.02 7.02 0 0 1 .016.418c.005.252.004.606-.019 1.023-.03.573-.103 1.285-.266 2.024.775-.377 1.54-.974 2.202-1.598a15.066 15.066 0 0 0 1.448-1.586l.017-.022.003-.004a1 1 0 0 1 .801-.402h2c3.314 0 6-2.692 6-6.03C20 6.691 17.314 4 14 4h-4c-3.314 0-6 2.692-6 6.031 0 2.336 1.32 4.36 3.258 5.359.308.159.515.474.54.82Z",clipRule:"evenodd"})})}},84247(e,t,n){"use strict";n.d(t,{z:()=>i});var r=n(10790);function i(){return(0,r.jsx)("div",{className:"nextdoor-preview__default-image",children:(0,r.jsxs)("svg",{width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",color:"#055c00",children:[(0,r.jsx)("path",{fill:"currentColor",d:"M13.207 5.207c1.51-1.51 4.076-1.51 5.586 0 1.51 1.51 1.51 4.076 0 5.586l-2.1 2.1c-1.51 1.51-4.077 1.51-5.586 0a1 1 0 1 0-1.414 1.414c2.29 2.29 6.123 2.29 8.414 0l2.1-2.1c2.29-2.29 2.29-6.124 0-8.414s-6.124-2.29-8.414 0l-.7.7a1 1 0 0 0 1.414 1.414l.7-.7Z"}),(0,r.jsx)("path",{fill:"currentColor",d:"M7.307 11.107c1.51-1.51 4.076-1.51 5.586 0a1 1 0 0 0 1.414-1.414c-2.29-2.29-6.124-2.29-8.414 0l-2.1 2.1c-2.29 2.29-2.29 6.123 0 8.414 2.29 2.29 6.124 2.29 8.414 0l.7-.7a1 1 0 0 0-1.414-1.414l-.7.7c-1.51 1.51-4.076 1.51-5.586 0-1.51-1.51-1.51-4.076 0-5.586l2.1-2.1Z"})]})})}},10569(e,t,n){"use strict";n.d(t,{f:()=>i});var r=n(10790);function i(){return(0,r.jsx)("svg",{width:"14",height:"14",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,r.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10-4.477 10-10 10S2 17.523 2 12Zm9.495-7.643c.286-.335.46-.357.505-.357.045 0 .219.022.505.357.282.33.581.868.852 1.619.464 1.283.79 3.034.872 5.024H9.771c.082-1.99.408-3.741.871-5.024.272-.751.571-1.289.854-1.62ZM7.77 11c.084-2.181.439-4.171.992-5.704.093-.255.192-.502.298-.738A8.009 8.009 0 0 0 4.062 11h3.707Zm-3.707 2h3.707c.084 2.181.439 4.171.992 5.704.093.255.192.502.298.738A8.009 8.009 0 0 1 4.062 13Zm15.876-2a8.009 8.009 0 0 0-4.997-6.442c.106.236.205.483.298.738.553 1.533.908 3.523.992 5.704h3.707Zm-3.707 2h3.707a8.009 8.009 0 0 1-4.997 6.442c.106-.236.205-.483.298-.738.553-1.533.908-3.523.992-5.704Zm-2.002 0c-.082 1.99-.408 3.741-.871 5.024-.272.751-.571 1.289-.854 1.62-.285.334-.46.356-.504.356-.045 0-.219-.022-.505-.357-.282-.33-.581-.868-.852-1.619-.464-1.283-.79-3.034-.872-5.024h4.458Z",clipRule:"eveLine truncated
|
||||
// translators: "Delete" action on a Tumblr post
|
||||
label:__("Delete","jetpack-publicize-pkg")},{icon:"edit",
|
||||
// translators: "Edit" action on a Tumblr post
|
||||
label:__("Edit","jetpack-publicize-pkg")}].map(({icon:e,label:t})=>(0,s.jsx)("li",{"aria-label":t,children:(0,s.jsx)(i.A,{name:e})},e))})]}),(0,s.jsxs)("div",{className:"tumblr-preview__post-social-actions",children:[(0,s.jsx)("div",{children:
|
||||
// translators: count of notes on a Tumblr post
|
||||
__("0 notes","jetpack-publicize-pkg")}),(0,s.jsx)("ul",{children:[{icon:"share",
|
||||
// translators: "Share" action on a Tumblr post
|
||||
label:__("Share","jetpack-publicize-pkg")},{icon:"reply",
|
||||
// translators: "Reply" action on a Tumblr post
|
||||
label:__("Reply","jetpack-publicize-pkg")},{icon:"reblog",
|
||||
// translators: "Reblog" action on a Tumblr post
|
||||
label:__("Reblog","jetpack-publicize-pkg")},{icon:"like",
|
||||
// translators: "Like" action on a Tumblr post
|
||||
label:__("Like","jetpack-publicize-pkg")}].map(({icon:e,label:t})=>(0,s.jsx)("li",{"aria-label":t,children:(0,s.jsx)(i.A,{name:e})},e))})]})]})},70793(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(27723),i=n(17712),s=(n(15264),n(10790));const __=r.__,o=({user:e})=>(0,s.jsxs)("div",{className:"tumblr-preview__post-header",children:[(0,s.jsx)("div",{className:"tumblr-preview__post-header-username",children:e?.displayName||
|
||||
// translators: username of a fictional Tumblr User
|
||||
__("anonymous-user","jetpack-publicize-pkg")}),(0,s.jsx)(i.A,{name:"ellipsis"})]})},17712(e,t,n){"use strict";n.d(t,{A:()=>i});n(67429);var r=n(10790);const i=({name:e})=>{let t;switch(e){case"blaze":t=(0,r.jsx)("svg",{viewBox:"0 0 25 22",children:(0,r.jsx)("path",{d:"m7.5059-0.24414c-0.79843 0.057223-1.2169 0.88587-1.1635 1.6128-0.2266 2.0449-1.4898 3.8696-3.1975 4.9778-3.0182 2.414-4.2201 6.8066-2.8033 10.411 0.92417 2.4679 2.9589 4.5674 5.4768 5.3928 0.95914 0.16102 1.7233-0.94358 1.3074-1.8059-0.11578-0.51062-0.17482-0.96516-0.17845-1.487 1.0413 1.5607 2.5484 2.8986 4.341 3.4975 1.0396-0.0154 1.98-0.64458 2.8516-1.1608 3.3821-2.1786 4.9604-6.7097 3.6597-10.518-0.49144-1.4599-1.2948-2.8935-2.5028-3.8698-0.7512-0.45498-1.661 0.09677-1.9202 0.86038-0.12274 0.16822-0.70352 1.1955-0.6191 0.61976 0.25488-3.4397-1.6789-7.0066-4.8123-8.4958-0.14322-0.037843-0.292-0.049464-0.43945-0.035156zm1.0586 3.5605c1.8947 2.0016 2.2326 5.1984 0.89062 7.5879-0.38498 0.96148 0.71762 2.0063 1.6567 1.5681 1.4159-0.4624 2.6998-1.3259 3.6577-2.4665 1.6442 2.5888 1.1465 6.2819-1.0629 8.3379-0.62378 0.60782-1.3666 1.0945-2.1754 1.4179-1.9543-0.989-3.3534-3.0966-3.5625-5.3125-0.25636-1.0253-1.81-1.2013-2.2852-0.25781-0.75058 1.3054-1.1846 2.7948-1.2305 4.3008-2.2396-1.9852-2.8468-5.4435-1.4609-8.0527 0.58926-1.239 1.651-2.13 2.724-2.9329 1.2958-1.1271 2.2791-2.62 2.7682-4.2683l0.071578 0.069832z"})});break;case"delete":t=(0,r.jsxs)("svg",{viewBox:"0 0 14 17",children:[(0,r.jsx)("path",{d:"M12 5v9c.1.7-.3 1-1 1H3c-.5 0-.9-.3-1-1V5c0-.6-.4-1-1-1-.5 0-1 .4-1 1v9.5C0 16.1 1.4 17 3 17h8c1.8 0 3-.8 3-2.5V5c0-.6-.5-1-1-1-.6 0-1 .5-1 1z"}),(0,r.jsx)("path",{d:"M4 12s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm4 0s0 1 1 1 1-1 1-1V5c0-.5-.4-1-1-1-.5 0-1 .5-1 1v7zm5-10c.5 0 1-.4 1-1 0-.5-.4-.9-1-1H1C.5.1 0 .5 0 1c0 .6.6 1 1.1 1H13z"})]});break;case"edit":t=(0,r.jsx)("svg",{viewBox:"0 0 17.6 17.6",children:(0,r.jsx)("path",{d:"M5.3 13.8l-2.1.7.7-2.1L10.3 6l1.4 1.4-6.4 6.4zm6.4-9.3l-1.4-1.4-1.4 1.4-6.7 6.7-.2.5-2 5.9 3.8-1.3 2.1-.7.4-.1.3-.3 7.8-7.8c.1 0-2.7-2.9-2.7-2.9zm5.6-1.4L14.5.3c-.4-.4-1-.4-1.4 0l-1.4 1.4L15.9 6l1.4-1.4c.4-.5.4-1.1 0-1.5"})});break;case"share":t=(0,r.jsx)("svg",{viewBox:"0 0 24 24",children:(0,r.jsx)("path",{d:"M12.6173 1.07612C12.991 0.921338 13.4211 1.00689 13.7071 1.29289L22.7071 10.2929C23.0832 10.669 23.0991 11.2736 22.7433 11.669L13.7433 21.669C13.4663 21.9767 13.0283 22.082 12.6417 21.9336C12.2552 21.7853 12 21.414 12 21V16H11.5C7.31775 16 3.92896 18.2486 2.95256 21.3044C2.80256 21.7738 2.33292 22.064 1.84598 21.9881C1.35904 21.9122 1 21.4928 1 21V18.5C1 12.3162 5.88069 7.27245 12 7.01067V2C12 1.59554 12.2436 1.2309 12.6173 1.07612ZM14 4.41421V8C14 8.55228 13.5523 9 13 9H12.5C7.64534 9 3.64117 12.6414 3.06988 17.3419C5.09636 15.2366 8.18218 14 11.5 14H13C13.5523 14 14 14.4477 14 15V18.394L20.622 11.0362L14 4.41421Z"})});break;case"reply":t=(0,r.jsx)("svg",{viewBox:"0 0 17 17",children:(0,r.jsx)("path",{d:"M8.7 0C4.1 0 .4 3.7.4 8.3c0 1.2.2 2.3.7 3.4-.2.6-.4 1.5-.7 2.5L0 15.8c-.2.7.5 1.4 1.2 1.2l1.6-.4 2.4-.7c1.1.5 2.2.7 3.4.7 4.6 0 8.3-3.7 8.3-8.3C17 3.7 13.3 0 8.7 0zM15 8.3c0 3.5-2.8 6.3-6.4 6.3-1.2 0-2.3-.3-3.2-.9l-3.2.9.9-3.2c-.5-.9-.9-2-.9-3.2.1-3.4 3-6.2 6.5-6.2S15 4.8 15 8.3z"})});break;case"reblog":t=(0,r.jsx)("svg",{viewBox:"0 0 17 18.1",children:(0,r.jsx)("path",{d:"M12.8.2c-.4-.4-.8-.2-.8.4v2H2c-2 0-2 2-2 2v5s0 1 1 1 1-1 1-1v-4c0-1 .5-1 1-1h9v2c0 .6.3.7.8.4L17 3.6 12.8.2zM4.2 17.9c.5.4.8.2.8-.3v-2h10c2 0 2-2 2-2v-5s0-1-1-1-1 1-1 1v4c0 1-.5 1-1 1H5v-2c0-.6-.3-.7-.8-.4L0 14.6l4.2 3.3z"})});break;case"like":t=(0,r.jsx)("svg",{viewBox:"0 0 20 18",children:(0,r.jsx)("path",{d:"M14.658 0c-1.625 0-3.21.767-4.463 2.156-.06.064-.127.138-.197.225-.074-.085-.137-.159-.196-.225C8.547.766 6.966 0 5.35 0 4.215 0 3.114.387 2.162 1.117c-2.773 2.13-2.611 5.89-1.017 8.5 2.158 3.535 6.556 7.18 7.416 7.875A2.3 2.3 0 0 0 9.998 18c.519 0 1.028-.18 1.436-.508.859-.695 5.257-4.34 7.416-7.875 1.595-2.616 1.765-6.376-1-8.5C16.895.387 15.792 0 14.657 0h.001zm0 2.124c.645 0 1.298.208 1.916.683 1.903 1.461 1.457 4.099.484 5.695-1.973 3.23-6.16 6.7-6.94 7.331a.191.191 0 0 1-.241 0c-.779-.631-4.966-4.101-6.94-7.332-.972-1.595-1.4-4.233.5-5.694.619-.475 1.27-.683 1.911-.683 1.064 0 2.095.574 2.898 1.461.495.549 1.658 2.082 1.753 2.203.095-.12 1.259-1.654 1.752-2.203.8-.887 1.842-1.461 2.908-1.461h-.001z"})});break;case"ellipsis":t=(0,r.jsx)("svg",{viewBox:"0 0 17.5 3.9",children:(0,r.jsx)("path",{d:"M17.5 1.9c0 1.1-.9 1.9-1.9 1.9-1.1 0-1.9-.9-1.9-1.9S14.5 0 15.6 0c1 0 1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 1.9-1.9 1.9-1.1.1-2-.8-2-1.9 0-1 .9-1.9 2-1.9s1.9.9 1.9 1.9m-6.8 0c0 1.1-.9 2-2 2-1 0-1.9-.9-1.9-2S.9 0 1.9 0c1.1 0 2 .9 2 1.9"})})}return(0,r.jsx)("span",{className:`tumblr-preview__post-icon tumblr-preview__post-icon-${e}`,children:t})}},58513(e,t,n){"use strict";n.d(t,{Z:()=>c});var r=n(13022),i=n(76223),s=n(2909),o=n(10790);const a=(0,i.RA)((0,i.f5)(280),(0,i.ZT)(280)),c=({description:e,image:t,imageFocalPoint:n,title:c,cardType:l,urLine truncated
|
||||
// translators: %s: The name of the connection the user is disconnecting.
|
||||
__("Are you sure you want to disconnect <strong>%s</strong>?","jetpack-publicize-pkg"),e.display_name),{strong:(0,d.jsx)("strong",{})})}),"link"===t?(0,d.jsx)(a.N,{variant:"default",href:"#","aria-disabled":g||void 0,onClick:w,children:x}):(0,d.jsx)(c.$,{size:n,tone:p,variant:t,onClick:h,disabled:g,children:x})]})}},566(e,t,n){"use strict";n.d(t,{j:()=>l});var r=n(56427),i=n(47143),s=n(86087),o=n(27723),a=n(93294),c=n(10790);const __=o.__;function l({connection:e}){const{updateConnectionById:t}=(0,i.useDispatch)(a.M),{isUpdating:n}=(0,i.useSelect)(t=>{const{getUpdatingConnections:n}=t(a.M);return{isUpdating:n().includes(e.connection_id)}},[e.connection_id]),o=(0,s.useCallback)(n=>{t(e.connection_id,{shared:n})},[e.connection_id,t]);return(0,c.jsx)(r.CheckboxControl,{checked:e.shared??!1,onChange:o,disabled:n||"broken"===e.status,label:__("Mark the connection as shared","jetpack-publicize-pkg"),__nextHasNoMarginBottom:!0})}},18241(e,t,n){"use strict";n.d(t,{C:()=>d});var r=n(63406),i=n(47143),s=n(86087),o=n(27723),a=n(79654),c=n(93294),l=n(50272),u=n(10790);const __=o.__,_x=o._x;function d({connection:e,service:t}){const{fetchKeyringResult:n,setKeyringResult:o,openConnectionsModal:d,setReconnectingAccount:p,completeReconnect:f}=(0,i.useDispatch)(c.M),{createErrorNotice:h}=(0,r.I)(),{canManageConnection:m,isReconnectingThis:g}=(0,i.useSelect)(t=>{const{canUserManageConnection:n,getReconnectingAccount:r}=t(c.M);return{canManageConnection:n(e),isReconnectingThis:r()?.connection_id===e.connection_id}},[e]),[v,b]=(0,s.useState)(!1);(0,s.useEffect)(()=>{g||b(!1)},[g]);const w=(0,s.useCallback)(async e=>{const t=await n(e);if(!t?.ID)return b(!1),p(void 0),void h(__("The reconnection could not be completed. Please try again.","jetpack-publicize-pkg"));await f(t)||(o(t),d())},[f,h,n,d,o,p]),x=(0,l.P)({service:t,onConfirm:w}),_=(0,s.useCallback)(async()=>{if(b(!0),await p(e),"bluesky"===t.id)return void d();const n=new FormData;"mastodon"===t.id&&n.set("instance",e.external_handle);await x(n,{refresh:!0,onAbort:()=>b(!1)})||(b(!1),p(void 0))},[e,d,x,t.id,p]),y=(0,s.useCallback)(e=>{e.preventDefault(),v||_()},[v,_]);return m?v?(0,u.jsx)(a.N,{href:"#",variant:"unstyled","aria-disabled":!0,children:__("Reconnecting…","jetpack-publicize-pkg")}):(0,u.jsx)(a.N,{href:"#",onClick:y,children:_x("Reconnect","Reconnect a social media account","jetpack-publicize-pkg")}):null}},58527(e,t,n){"use strict";n.d(t,{O:()=>h});var r=n(56427),i=n(27723),s=n(13022),o=n(51609),a=n(15132),c=n(36500),l=n(92216),u=n(72056),d=n(87876),p=n(10790);const __=i.__,f=()=>{};function h({onClickItem:e,getItemClassName:t}){const{canBeTurnedOn:n,shouldBeDisabled:i}=(0,u.j)(),{connections:h}=(0,a.A)(),m=(0,o.useCallback)(t=>()=>{e(t)},[e]);return(0,p.jsx)("div",{role:"group",className:d.A.wrapper,"aria-label":__("Connection toggles","jetpack-publicize-pkg"),children:h.map(e=>{const o=Boolean(n(e)&&e.enabled),a=i(e),u=(0,c.Wz)(e);return(0,p.jsx)(r.Button,{role:"switch",disabled:a,icon:(0,p.jsx)(l.s,{serviceName:e.service_name,label:e.display_name,profilePicture:e.profile_picture,disabled:a}),iconPosition:"right",onClick:m(e),"aria-label":u,"aria-checked":o,className:(0,s.A)(d.A.item,t?.(e)),children:(0,p.jsxs)("div",{className:d.A["connection-info"],children:[(0,p.jsx)(r.FormToggle,{tabIndex:-1,checked:o,onChange:f,disabled:a,"aria-label":u}),(0,p.jsx)("div",{className:d.A["display-name"],title:e.display_name,children:e.display_name})]})},e.connection_id)})})}},86836(e,t,n){"use strict";n.d(t,{J:()=>d});var r=n(85985),i=n(56427),s=n(27723),o=n(51609),a=n(15132),c=n(72056),l=n(57497),u=n(10790);const __=s.__;function d({connection:e}){const{toggleById:t}=(0,a.A)(),{recordEvent:n}=(0,r.st)(),{canBeTurnedOn:d,shouldBeDisabled:p}=(0,c.j)(),f=(0,o.useCallback)(()=>{t(e.connection_id),n("jetpack_social_connection_toggled",{location:"preview_modal",enabled:!e.enabled,service_name:e.service_name})},[e.connection_id,e.enabled,e.service_name,n,t]),h=Boolean(d(e)&&e.enabled),m=p(e);return(0,u.jsx)(i.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,s.sprintf)(/* translators: %1$s: social media account name, %2$s: social media platform name (e.g. Facebook, LinkedIn) */
|
||||
__("Share to %1$s on %2$s","jetpack-publicize-pkg"),e.display_name,e.service_label),className:l.A["connection-toggle"],checked:h,onChange:f,disabled:m})}},92031(e,t,n){"use strict";n.d(t,{Z:()=>a});var r=n(5488),i=n(38811),s=n(18031),o=n(10790);function a(){const e=(0,r.pq)();return(0,o.jsx)(i.o,{analyticsData:{location:"preview-modal"},isInsideNavigatorModal:!0,upgradeNotice:e?void 0:(0,o.jsx)(s.g,{})})}},62576(e,t,n){"use strict";n.d(t,{$:()=>p});var r=n(97999),i=n(47143),s=n(27723),o=n(51609),a=n(93294),c=n(44727),l=n(38811),u=n(10790);const d=(0,s.__)("A template will be used if this is empty.","jetpack-publicize-pkg");function p({connection:e}){const{customizeConnectionById:t}=(0,i.useDispatch)(a.M),n=(0,r.siteHasFeature)(c.q.MESSAGE_TEMPLATES),s=e.message??"",p=n?d:void 0,f=e.media_source,h=e.attached_media??[],m=(0,o.useCallback)(n=>{t(e.connection_id,{message:n})},[e.connection_id,t]),g=(0,o.useCallback)(n=>{t(e.connection_id,{attached_media:n.attached_media,media_source:n.media_source})},[e.connection_id,t]);return(0,u.jsx)(l.o,{analyticsData:{location:"preview-modal"},isInsideNavigatorModal:!0,disabled:!e.enabled,message:s,messageHelp:p,onMessageChange:m,attachedMedia:h,onMediaChange:g,mediaSource:f,attachmentToggleMode:"hidden"})}},38892(e,t,n){"use strict";n.d(t,{X:()=>h});var r=n(56427),i=n(86087),s=n(27723),o=n(5488),a=n(74622),c=n(92031),l=n(62576),u=n(55367),d=n(17329),p=n(10790);const __=s.__;function f({connection:e,usingPerNetworkCustomization:t}){if(!(0,o.pq)())return null;if(!t)return(0,p.jsx)("legend",{children:__("Customizing for all connections.","jetpack-publicize-pkg")});if(!e)return null;const{display_name:n}=e,a=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r.VisuallyHidden,{children:n}),(0,p.jsx)("b",{"aria-hidden":"true",title:n,children:n})]});return(0,p.jsx)("legend",{children:(0,i.createInterpolateElement)((0,s.sprintf)(/* translators: %s is the name of the social media account. */
|
||||
__("Customizing for %s.","jetpack-publicize-pkg"),"<accountName/>"),{accountName:a})})}function h({connection:e,usingPerNetworkCustomization:t}){return(0,p.jsxs)("fieldset",{className:d.A["customization-section"],"data-variant":t?"per-network":"global",children:[(0,p.jsx)(f,{connection:e,usingPerNetworkCustomization:t}),t?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l.$,{connection:e}),(0,p.jsx)(u.K,{connection:e})]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(c.Z,{}),(0,p.jsx)(a.L,{})]})]})}},55367(e,t,n){"use strict";n.d(t,{K:()=>p});var r=n(3924),i=n(56427),s=n(27723),o=n(79654),a=n(75897),c=n(11851),l=n(32940),u=n(48896),d=n(10790);const __=s.__;function p({connection:e}){const{error:t,isConvertible:n}=(0,a.P)(e),p=(0,u.h)();if(!t||n)return null;if(t===c.k3)return(0,d.jsx)(l.q,{});const f=p(e.service_name);return(0,d.jsxs)(i.Notice,{status:"warning",isDismissible:!1,children:[(0,d.jsx)("p",{children:(0,s.sprintf)(/* translators: %s is the name of the social media platform (e.g., Facebook, Instagram). */
|
||||
__("The selected media cannot be shared to %s.","jetpack-publicize-pkg"),f)}),(0,d.jsx)("ul",{children:(0,d.jsx)("li",{children:(0,d.jsx)("i",{children:(0,c.$m)(t)})})}),(0,d.jsx)(o.N,{openInNewTab:!0,href:(0,r.A)("jetpack-social-media-support-information"),children:__("Troubleshooting tips","jetpack-publicize-pkg")})]})}},88283(e,t,n){"use strict";n.d(t,{_:()=>c});var r=n(56427),i=n(27723),s=n(81342),o=n(46756),a=n(10790);const _x=i._x;function c(){const{isEnabled:e,toggle:t}=(0,s.I)();return(0,a.jsxs)(r.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,__next40pxDefaultSize:!0,isBlock:!0,label:_x("Customize","Verb: Customize the social preview","jetpack-publicize-pkg"),onChange:t,value:e?"each":"all",hideLabelFromVision:!0,className:o.A["customization-toggle"],children:[(0,a.jsx)(r.__experimentalToggleGroupControlOption,{label:_x("Same for all","An option to customize for all networks","jetpack-publicize-pkg"),value:"all"}),(0,a.jsx)(r.__experimentalToggleGroupControlOption,{label:_x("Customize each","An option to customize for each network","jetpack-publicize-pkg"),value:"each"})]})}},27192(e,t,n){"use strict";n.d(t,{d:()=>l});var r=n(44430),i=n(5488),s=n(88283),o=n(79537),a=n(34132),c=n(10790);function l(){const e=(0,i.pq)();return(0,r.T)(),(0,c.jsxs)("div",{className:o.A["customize-and-preview"],"data-plan":e?"paid":"free",children:[e&&(0,c.jsx)(s._,{}),(0,c.jsx)(a.R,{})]})}},41311(e,t,n){"use strict";n.d(t,{w:()=>f});var r=n(56427),i=n(27723),s=n(28847),o=n(13022),a=n(88730),c=n(54514),l=n(23316),u=n(10790);const __=i.__,_x=i._x;function d(){return(0,u.jsxs)("div",{className:l.A["preview-skeleton"],role:"status",children:[(0,u.jsx)(r.VisuallyHidden,{children:__("Loading post preview.","jetpack-publicize-pkg")}),(0,u.jsxs)("div",{className:l.A["preview-skeleton-header"],children:[(0,u.jsx)("div",{className:l.A["preview-skeleton-avatar"]}),(0,u.jsxs)("div",{className:l.A["preview-skeleton-lines"],children:[(0,u.jsx)("div",{className:l.A["preview-skeleton-line"]}),(0,u.jsx)("div",{className:(0,o.A)(l.A["preview-skeleton-line"],l.A["preview-skeleton-line-short"])})]})]}),(0,u.jsxs)("div",{className:l.A["preview-skeleton-copy"],children:[(0,u.jsx)("div",{className:l.A["preview-skeleton-line"]}),(0,u.jsx)("div",{className:(0,o.A)(l.A["preview-skeleton-line"],l.A["preview-skeleton-line-medium"])})]}),(0,u.jsx)("div",{className:l.A["preview-skeleton-media"]}),(0,u.jsx)("div",{className:(0,o.A)(l.A["preview-skeleton-line"],l.A["preview-skeleton-line-short"])})]})}function p({connection:e}){const t=(0,a.e)(e);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.VisuallyHidden,{as:"h2",children:_x("Preview","Noun: Post preview section heading","jetpack-publicize-pkg")}),(0,u.jsx)("div",{className:l.A["preview-wrapper"],"aria-busy":t.isLoading,children:t.isLoading?(0,u.jsx)(d,{}):(0,u.jsx)(c.z,{connection:e,previewData:t})})]})}function f({connection:e}){return(0,u.jsx)("section",{"aria-label":__("Post Preview","jetpack-publicize-pkg"),className:l.A["preview-section"],children:e.enabled?(0,u.jsx)(p,{connection:e}):(0,u.jsxs)("div",{className:l.A["inactive-preview"],children:[(0,u.jsx)(r.Icon,{icon:s.A,size:48}),(0,u.jsx)("div",{children:__("The post won't be shared to this account.","jetpack-publicize-pkg")})]})})}},54514(e,t,n){"use strict";n.d(t,{z:()=>x});var r=n(27365),i=n(51016),s=n(66901),o=n(1798),a=n(27300),c=n(94302),l=n(59028),u=n(35521),d=n(66603),p=n(3582),f=n(47143),h=n(86087),m=n(18537),g=n(27723),v=n(32940),b=n(10790);const __=g.__;function w(e,t){return`${e}\n\n${t.replace(/\n+/g," ")}`}function x({connection:e,previewData:t}){const n=(0,h.useMemo)(()=>({displayName:e.display_name,profileImage:e.profile_picture,externalName:e.external_handle}),[e]),{image:g,imageFocalPoint:x,media:_,title:y,description:k,url:j,excerpt:C,message:A,hyperlinks:S}=t,E=(0,h.useMemo)(()=>({description:k,image:g,imageFocalPoint:x,media:_,title:y,url:j,hyperlinks:S}),[S,k,g,x,_,y,j]),N=(0,f.useSelect)(e=>{const{getUnstableBase:t}=e(p.store);return(0,m.decodeEntities)(t(void 0)?.name)},[]),z=_?.some(({type:e})=>e.startsWith("image/")||e.startsWith("video/"));switch(e.service_name){case"bluesky":{const e=_?.[0],t=e?.type.startsWith("image/")?e.url:null;return(0,b.jsx)(i.O,{...E,description:(0,m.decodeEntities)(C),user:{avatarUrl:n.profileImage,address:n.externalName,displayName:n.displayName},customText:(0,m.decodeEntities)(A||`${y}\n\n${C.replaceAll(/[\s\n]/g," ")}`),customImage:t})}case"facebook":{let e=y;return A?e=A:y&&C&&(e=w(y,C)),z?(0,b.jsx)(d.h,{...E,type:"article",customText:e,user:{...n,avatarUrl:n.profileImage}}):(0,b.jsx)(s.l,{...E,type:"article",customText:e,user:{...n,avatarUrl:n.profileImage}})}case"instagram-business":{const e=Boolean(g);let t=y;return A?t=A:y&&C&&(t=w(y,C)),z||e?(0,b.jsx)(r.l,{...E,image:_?.[0]?.url||g,name:n.displayName,profileImage:n.profileImage,caption:t}):(0,b.jsx)(v.q,{})}case"linkedin":{let e=y;return A?e=A:y&&C&&(e=w(y,C)),(0,b.jsx)(o.$,{...E,jobTitle:__("Job Title (CompanLine truncated
|
||||
__('Customizing per account. Manage in "%s" above.',"jetpack-publicize-pkg"),x)}):null]})}},67372(e,t,n){"use strict";n.d(t,{C:()=>l});var r=n(56427),i=n(47143),s=n(27723),o=n(93294),a=n(94665),c=n(10790);const __=s.__;function l({label:e,variant:t="secondary"}){const{connections:n}=(0,i.useSelect)(e=>({connections:e(o.M).getConnections()}),[]),{openConnectionsModal:s}=(0,i.useDispatch)(o.M),l=e||__("Add a new account","jetpack-publicize-pkg"),u=n.length>0;return(0,c.jsx)(r.Button,{onClick:s,variant:u?"link":t,className:a.A["settings-button"],children:l})}},38811(e,t,n){"use strict";n.d(t,{o:()=>v});var r=n(56427),i=n(47143),s=n(27723),o=n(13022),a=n(51609),c=n(53372),l=n(93294),u=n(5488),d=n(42753),p=n(28641),f=n(93399),h=n(94665),m=n(5643),g=n(10790);const __=s.__,v=({analyticsData:e=null,isInsideNavigatorModal:t,message:n,onMessageChange:s,messagePlaceholder:v,messageHelp:b,attachedMedia:w,imageGeneratorSettings:x,mediaSource:_,onMediaChange:y,disabled:k=!1,attachmentToggleMode:j,upgradeNotice:C})=>{const{message:A,updateMessage:S,maxLength:E}=(0,c.A)(),N=(0,d.D)(),z=(0,u.pq)(),I=void 0!==n?n:A,T=s??S,M=void 0!==y,{openUnifiedModal:D}=(0,i.useDispatch)(l.M),R=(0,r.useNavigator)(),P=(0,a.useCallback)(()=>{t?R.goTo("/edit-template"):D({initialPath:"/edit-template",isScreenLocked:!0})},[D,t,R]);return(0,g.jsx)(r.Disabled,{isDisabled:k,children:(0,g.jsxs)("div",{className:h.A["share-post-form"],children:[!N&&(0,g.jsx)(f.Ay,{label:__("Message","jetpack-publicize-pkg"),maxLength:E,onChange:T,message:I,placeholder:v,help:b,analyticsData:e,disabled:k}),(0,g.jsx)("div",{className:(0,o.A)({[h.A["share-post-form-disabled"]]:k}),children:z?(0,g.jsx)(p.A,{analyticsData:e,onEditTemplate:P,attachmentToggleMode:j,...M&&{attachedMedia:w,imageGeneratorSettings:x,mediaSource:_,onMediaChange:y}}):C??(0,g.jsx)(m.d,{})})]})})}},18031(e,t,n){"use strict";n.d(t,{g:()=>u});var r=n(3924),i=n(97999),s=n(85985),o=n(56427),a=n(27723),c=n(51609),l=n(10790);const __=a.__;function u(){const{recordEvent:e}=(0,s.st)(),t=(0,c.useCallback)(()=>{e("jetpack_social_per_network_customization_upgrade_click")},[e]);if((0,i.isSimpleSite)())return null;const n=(0,r.A)("jetpack-social-basic-plan-block-editor",{site:(0,s.GE)()||"",query:"redirect_to="+encodeURIComponent(window.location.href)}),a=__("Customize images and messages for each account for better engagement.","jetpack-publicize-pkg");return(0,l.jsx)(o.Notice,{isDismissible:!1,status:"info",spokenMessage:a,children:(0,l.jsxs)(o.Flex,{direction:"column",children:[(0,l.jsx)(o.FlexItem,{children:a}),(0,l.jsx)(o.Flex,{children:(0,l.jsx)(o.Button,{variant:"primary",href:n,className:"is-compact",target:"_blank",rel:"noopener noreferrer",onClick:t,children:__("Upgrade now","jetpack-publicize-pkg")})})]})})}},5643(e,t,n){"use strict";n.d(t,{d:()=>l});var r=n(3924),i=n(97999),s=n(85985),o=n(56427),a=n(27723),c=n(10790);const __=a.__;function l(){if((0,i.isSimpleSite)())return null;const e=(0,r.A)("jetpack-social-basic-plan-block-editor",{site:(0,s.GE)()||"",query:"redirect_to="+encodeURIComponent(window.location.href)}),t=__("Choose your social media image or video to share.","jetpack-publicize-pkg");return(0,c.jsx)(o.Notice,{isDismissible:!1,status:"info",spokenMessage:t,children:(0,c.jsxs)(o.Flex,{direction:"column",children:[(0,c.jsx)(o.FlexItem,{children:t}),(0,c.jsxs)(o.Flex,{justify:"start",gap:3,children:[(0,c.jsx)(o.Button,{variant:"primary",className:"is-compact",href:e,target:"_blank",rel:"noopener noreferrer",children:__("Upgrade now","jetpack-publicize-pkg")}),(0,c.jsx)(o.Button,{variant:"secondary",href:(0,r.A)("jetpack-social-demo"),target:"_blank",className:"is-compact",rel:"noopener noreferrer",children:__("View demo","jetpack-publicize-pkg")})]})]})})}},72056(e,t,n){"use strict";n.d(t,{j:()=>p});var r=n(86087),i=n(51609),s=n(81669),o=n(53682),a=n(71615),c=n(51202),l=n(11851),u=n(52472),d=n(15132);const p=()=>{const{connections:e}=(0,d.A)(),{isPublicizeEnabled:t,isPublicizeDisabledBySitePlan:n}=(0,u.A)(),{attachedMedia:p}=(0,s.A)(),f=(0,o.A)(),h=p[0]?.id||f,{validationErrors:m,isConvertible:g}=(0,c.Ay)(e,(0,a.A)(h)[0]),v=(0,r.useCallback)(e=>{const{connection_id:t,status:n}=e,r="broken"!==n,i=void 0!==m[t]&&!g,s=m[t]===l.k3;return r&&!i&&!s},[g,m]),b=(0,r.useCallback)(e=>!t||!v(e),[v,t]),w=(0,r.useCallback)(e=>!n&&v(e),[v,n]);return(0,i.useMemo)(()=>({shouldBeDisabled:b,canBeTurnedOn:w}),[b,w])}},88909(e,t,n){"use strict";n.d(t,{c:()=>l});var r=n(39384),i=n(56427),s=n(47143),o=n(43656),a=n(27723),c=n(10790);const __=a.__,_x=a._x;function l(){const e=(0,s.useSelect)(e=>e(o.store).isCurrentPostPublished(),[]);return(0,c.jsx)(i.Notice,{status:"warning",isDismissible:!1,actions:[{url:(0,r.getUserConnectionUrl)(),label:__("Connect now","jetpack-publicize-pkg"),variant:"link"}],children:e?_x("You must connect your WordPress.com account to be able to re-share posts.","","jetpack-publicize-pkg"):__("You must connect your WordPress.com account to be able to connect social media accounts.","jLine truncated
|
||||
__("Preview for %s","jetpack-publicize-pkg"),e.title),showTooltip:!0,onClick:n,children:"function"==typeof e.icon?(0,a.jsx)(e.icon,{}):e.icon})}},69908(e,t,n){"use strict";n.d(t,{O:()=>g});var r=n(63406),i=n(3924),s=n(56427),o=n(47143),a=n(86087),c=n(27723),l=n(79654),u=n(93294),d=n(75265),p=n(12278),f=n(10790);const __=c.__,_x=c._x;function h({label:e,profile_picture:t}){return(0,f.jsxs)("div",{className:p.A["account-info"],children:[t?(0,f.jsx)("img",{className:p.A["profile-pic"],src:t,alt:e}):null,(0,f.jsx)("span",{children:e})]})}const m=()=>{};function g({keyringResult:e,onComplete:t,canMarkAsShared:n}){const c=(0,d.o)(),{existingConnections:g,reconnectingAccount:v}=(0,o.useSelect)(e=>{const t=e(u.M);return{existingConnections:t.getConnections(),reconnectingAccount:t.getReconnectingAccount()}},[]),{createErrorNotice:b}=(0,r.I)(),w=c.find(t=>t.id===e.service),x=(0,a.useCallback)(e=>g.some(t=>t.service_name===w?.id&&t.external_id===e),[g,w?.id]),_=(0,a.useMemo)(()=>{const t=[],n=[];if(!w)return{connected:t,not_connected:n};const r=[];if(w.supports.additional_users_only||r.push({label:e.external_display||e.external_name,value:e.external_ID,profile_picture:e.external_profile_picture}),w.supports.additional_users&&e.additional_external_users?.length)for(const t of e.additional_external_users)r.push({label:t.external_name,value:t.external_ID,profile_picture:t.external_profile_picture});for(const e of r)x(e.value)?t.push(e):n.push(e);return{connected:t,not_connected:n}},[x,e,w]),{createConnection:y,setReconnectingAccount:k}=(0,o.useDispatch)(u.M),j=(0,a.useCallback)(async n=>{n.preventDefault(),n.stopPropagation();const r=n.target,i=new FormData(r),s=i.get("external_user_ID");if(!s)return void b(__("Please select an account to connect.","jetpack-publicize-pkg"));const o={external_user_ID:w.supports.additional_users?s:void 0,keyring_connection_ID:e.ID,shared:"1"===i.get("shared")||void 0},a=_.not_connected.find(e=>e.value===s);v&&k(void 0),y(o,{display_name:a?.label,profile_picture:a?.profile_picture,service_name:w.id,external_id:s.toString()}),t()},[y,v,k,b,e.ID,t,w.supports,w.id,_.not_connected]);return(0,f.jsxs)("section",{className:p.A.confirmation,children:[_.not_connected.length?(0,f.jsxs)("div",{children:[(0,f.jsx)("p",{className:p.A["header-text"],children:__("Select the account you'd like to connect. All your new blog posts will be automatically shared to this account. You'll be able to change this option in the editor sidebar when you're writing a post.","jetpack-publicize-pkg")}),e?.show_linkedin_warning&&(0,f.jsx)(s.Notice,{status:"warning",isDismissible:!1,children:(0,f.jsxs)("p",{children:[__("We could not retrieve which company pages you have access to. This is a known issue with the LinkedIn API. If you would like to connect a company page, please retry after 5 minutes.","jetpack-publicize-pkg")," ",(0,f.jsx)(l.N,{openInNewTab:!0,href:(0,i.A)("jetpack-linkedin-permissions-warning"),children:__("Learn more","jetpack-publicize-pkg")},"linkedin-api-documentaion")]})}),(0,f.jsxs)("form",{className:p.A.form,onSubmit:j,id:"connection-confirmation-form",children:[(0,f.jsx)("div",{className:p.A["accounts-list"],children:_.not_connected.map((e,t)=>{const n=v?v.service_name===w?.id&&v.external_id===e.value:0===t;return(0,f.jsxs)("label",{htmlFor:`external_user_ID__${e.value}`,className:p.A["account-label"],"aria-required":!0,children:[(0,f.jsx)("input",{type:"radio",id:`external_user_ID__${e.value}`,name:"external_user_ID",value:e.value,defaultChecked:n,className:p.A["account-input"],required:!0}),(0,f.jsx)(h,{label:e.label,profile_picture:e.profile_picture})]},e.value)})}),n?(0,f.jsx)(s.CheckboxControl,{name:"shared",value:"1",label:__("Mark the connection as shared","jetpack-publicize-pkg"),help:`${__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack-publicize-pkg")} ${__("You can change this later.","jetpack-publicize-pkg")}`,defaultChecked:!0,onChange:m}):null,(0,f.jsx)("input",{type:"hidden",name:"keyring_connection_ID",value:e.ID})]})]}):(0,f.jsx)("p",{className:p.A["header-text"],children:_.connected.length?_x("No more accounts/pages found.","Message shown when there are no connections found to connect","jetpack-publicize-pkg"):__("No accounts/pages found.","jetpack-publicize-pkg")}),_.connected.length?(0,f.jsxs)("section",{children:[(0,f.jsx)("h3",{children:__("Already connected","jetpack-publicize-pkg")}),(0,f.jsx)("ul",{children:_.connected.map((e,t)=>(0,f.jsx)("li",{children:(0,f.jsx)(h,{label:e.label,profile_picture:e.profile_picture})},e.label+t))})]}):null,(0,f.jsxs)("div",{className:p.A["submit-wrap"],children:[(0,f.jsx)(s.Button,{variant:"secondary",onClick:t,children:__("Cancel","jetpack-publicize-pkg")}),_.not_connected.length?(0,f.jsx)(s.Button,{form:"connection-confirmation-form",type:"submit",variant:"primary",children:__("Confirm","jetpack-publicize-pkg")}):null]})]})}},77419(e,t,n){"use strict";n.d(t,{R:()=>k});var r=n(3924),i=n(Line truncated
|
||||
__("Customize how this post is shared. Use placeholders like %1$s or %2$s - those will be filled in when the post is shared.","jetpack-publicize-pkg"),"{title}","{url}"):__("Write a custom message for your social audience here. This message will override your social post content.","jetpack-publicize-pkg")),C=n??(_?(0,o.createInterpolateElement)(__("Supports placeholders like <title/> and <url/>. See the list below for all the options.","jetpack-publicize-pkg"),{title:(0,p.jsx)("code",{children:"{title}"}),url:(0,p.jsx)("code",{children:"{url}"})}):(0,a.sprintf)(/* translators: %d: the number of characters remaining. */
|
||||
_n("%d character remaining","%d characters remaining",y,"jetpack-publicize-pkg"),y));return(0,p.jsxs)("div",{className:d.A["message-box-control"],children:[(0,p.jsx)(s.TextareaControl,{value:h,label:e,onChange:k,disabled:g,maxLength:_?void 0:v,placeholder:j,rows:4,help:C,__nextHasNoMarginBottom:!0}),_&&(0,p.jsx)(u.A,{})]})}},92572(e,t,n){"use strict";n.d(t,{h:()=>l});var r=n(56427),i=n(86087),s=n(27723),o=n(19076),a=n(67817),c=n(10790);const __=s.__;function l(e){const{value:t,onChange:n,label:l,placeholder:u,helpText:d,disabled:p,rows:f=4,showPlaceholders:h=!0}=e,m=l??__("Message template","jetpack-publicize-pkg"),g=u??(0,s.sprintf)(/* translators: %1$s and %2$s are placeholder tokens, e.g. {title} and {url}. */
|
||||
__("Write a default share message. Use placeholders like %1$s or %2$s — they’re filled in when posts are shared.","jetpack-publicize-pkg"),"{title}","{url}"),v=d??(0,i.createInterpolateElement)(__("Supports placeholders like <title/> and <url/>. See the list below for all the options.","jetpack-publicize-pkg"),{title:(0,c.jsx)("code",{children:"{title}"}),url:(0,c.jsx)("code",{children:"{url}"})});return(0,c.jsxs)("div",{className:a.A["message-template-editor"],children:[(0,c.jsx)(r.TextareaControl,{value:t,label:m,onChange:n,disabled:p,placeholder:g,rows:f,help:v,__nextHasNoMarginBottom:!0}),h&&(0,c.jsx)(o.A,{})]})}},40752(e,t,n){"use strict";n.d(t,{P:()=>l});var r=n(56427),i=n(47143),s=n(43656),o=n(27723),a=n(52472),c=n(10790);const __=o.__;function l(){const{isPublicizeEnabled:e,togglePublicizeFeature:t}=(0,a.A)();return(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[])?null:(0,c.jsx)(r.PanelRow,{children:(0,c.jsx)(r.ToggleControl,{label:__("Auto-share post","jetpack-publicize-pkg"),onChange:t,checked:e,__nextHasNoMarginBottom:!0})})}},14674(e,t,n){"use strict";n.d(t,{V:()=>d});var r=n(56427),i=n(47143),s=n(43656),o=n(27723),a=n(52472),c=n(15132),l=n(40533),u=n(10790);const __=o.__,_x=o._x;function d(){const{hasEnabledConnections:e}=(0,c.A)(),t=(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[]),{isPublicizeEnabled:n}=(0,a.A)();return(0,u.jsx)(r.PanelRow,{children:(0,u.jsx)(r.__experimentalText,{className:l.A.description,children:t?__('Enable the social media accounts where you want to re-share your post, then click on the "Preview and Share" button below.',"jetpack-publicize-pkg"):n&&e?__("When the post is published, it will be shared automatically on:","jetpack-publicize-pkg"):_x("After the post is published, you can preview, and manually share or schedule it.","","jetpack-publicize-pkg")})})}},82856(e,t,n){"use strict";n.d(t,{A:()=>x});var r=n(56427),i=n(47143),s=n(43656),o=n(86087),a=n(27723),c=n(52472),l=n(20905),u=n(59095),d=n(15132),p=n(8944),f=n(82751),h=n(95250),m=n(40752),g=n(14674),v=n(40533),b=n(73549),w=(n(10948),n(10790));const __=a.__,x=({prePublish:e})=>{const{refresh:t,hasConnections:n,hasEnabledConnections:a}=(0,d.A)(),x=(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[]),_=(0,l.A)(),{hidePublicizeFeature:y}=(0,c.A)();(0,u._)(function(){a&&t()},[a,t]);const k=e?o.Fragment:r.PanelBody,j=e?{}:{title:__("Share to social media","jetpack-publicize-pkg"),className:v.A.panel};return _(),(0,w.jsxs)(k,{...j,children:[(0,w.jsx)(b.M,{}),!y&&(0,w.jsxs)(o.Fragment,{children:[n?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(m.P,{}),(0,w.jsx)(g.V,{})]}):null,(0,w.jsx)(p.A,{})]}),x&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(h.E,{}),(0,w.jsx)(f.F,{})]})]})}},73549(e,t,n){"use strict";n.d(t,{M:()=>u});var r=n(85985),i=n(56427),s=n(47143),o=n(43656),a=n(27723),c=n(52472),l=n(10790);const __=a.__,_x=a._x;function u(){const{isRePublicizeFeatureAvailable:e}=(0,c.A)(),t=(0,r.tu)("republicize"),[,n,u,d]=(0,r._6)(`${t}`),p=(0,s.useSelect)(e=>e(o.store).isCurrentPostPublished(),[]);if(!p||p&&e)return null;const f=d?.product_name||_x("paid","The plan type - paid vs free","jetpack-publicize-pkg"),h=__("Upgrade now","jetpack-publicize-pkg");return(0,l.jsx)(i.Notice,{status:"info",isDismissible:!1,actions:[{label:u?__("Redirecting…","jetpack-publicize-pkg"):h,variant:"primary",className:"is-compact",onClick:n}],children:(0,a.sprintf)(/* translators: %s: the product name of the plan. */
|
||||
__("To re-share a post, you need to upgrade to the %s plan","jetpack-publicize-pkg"),f)})}},19076(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),i=n(27723),s=n(51609),o=n(40976),a=n(90437),c=n(10790);const __=i.__;function l(){const e=(0,o.nE)()?.message_templates?.placeholders,t=(0,s.useCallback)(({onToggle:e,isOpen:t})=>(0,c.jsx)(r.Button,{variant:"link",onClick:e,"aria-expanded":t,children:__("Available placeholders","jetpack-publicize-pkg")}),[]),n=(0,s.useCallback)(()=>(0,c.jsxs)("div",{className:a.A["placeholders-help-content"],children:[(0,c.jsx)("p",{children:__("Use placeholders to automatically insert post details.","jetpack-publicize-pkg")}),(0,c.jsx)("ul",{children:e?.map(({id:e,label:t})=>(0,c.jsxs)("li",{children:[(0,c.jsx)("code",{children:e}),(0,c.jsx)("span",{children:t})]},e))})]}),[e]);return e?.length?(0,c.jsx)(r.Dropdown,{focusOnMount:!0,popoverProps:{placement:"bottom-start"},renderToggle:t,renderContent:n,className:a.A["placeholders-help"],contentClassName:a.A["placeholders-help-popover"]}):null}},1150(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(82201),i=n(47143),s=n(43656),o=n(27723),a=n(53983),c=n(25538),l=n(60407),u=n(10790);const __=o.__;function d(){return(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[])?(0,u.jsxs)(s.PluginPostPublishPanel,{initialOpen:!0,title:__("Manual sharing","jetpack-publicize-pkg"),icon:(0,u.jsx)(r.jt,{}),children:[(0,u.jsx)(a.P,{className:l.A.description,variant:"body-small"}),(0,u.jsx)(c.R,{})]}):null}},85483(e,t,n){"use strict";n.d(t,{p:()=>m});var r=n(56427),i=n(47143),s=n(43656),o=n(27723),a=n(27157),c=n(83688),l=n(59382),u=n(59095),d=n(93294),p=n(84203),f=n(22899),h=n(10790);const __=o.__;function m(){const{isPublicizeEnabled:e}=(0,c.h)(),{pollForPostShareStatus:t}=(0,i.useDispatch)(d.M),{isPostPublished:n}=(0,i.useSelect)(e=>({isPostPublished:e(s.store).isCurrentPostPublished()}),[]),o=(0,l.z)((0,a.P)()),m=(0,l.z)((0,i.useSelect)(e=>e(d.M).getEnabledConnections(),[])),g=e&&m.length>0&&o&&n;return(0,u._)(()=>{g&&t({isRequestComplete:({postShareStatus:e})=>e.done})},[g]),g?(0,h.jsx)(s.PluginPostPublishPanel,{children:(0,h.jsx)(p.A,{fallback:(0,h.jsx)(r.Notice,{status:"error",isDismissible:!1,children:__("Unable to load the sharing status.","jetpack-publicize-pkg")}),children:(0,h.jsx)(f.q,{})})}):null}},22899(e,t,n){"use strict";n.d(t,{q:()=>u});var r=n(56427),i=n(47143),s=n(27723),o=n(93294),a=n(76470),c=n(98776),l=n(10790);const __=s.__,_n=s._n;function u({reShareTimestamp:e}){const t=(0,i.useSelect)(e=>e(o.M).getPostShareStatus(),[]),n=e?t.shares.filter(t=>t.timestamp>e):t.shares;if(t.polling)return(0,l.jsxs)("div",{className:c.A["loading-block"],children:[(0,l.jsx)(r.Spinner,{}),(0,l.jsx)("span",{className:c.A["loading-text"],children:__("Sharing to your social media…","jetpack-publicize-pkg")})]});const u=n.filter(e=>"failure"===e.status).length;return u>0?(0,l.jsxs)(r.Notice,{status:"warning",isDismissible:!1,children:[(0,l.jsx)("p",{children:(0,s.sprintf)(/* translators: %d: number of failed shares */
|
||||
_n("Your post was unable to be shared to %d connection.","Your post was unable to be shared to %d connections.",u,"jetpack-publicize-pkg"),u)}),(0,l.jsx)(a.J,{variant:"link",analyticsData:{location:"post-publish-panel"},children:__("Review status and try again","jetpack-publicize-pkg")})]}):t.done?n.length?(0,l.jsxs)(r.Notice,{status:"success",isDismissible:!1,children:[(0,l.jsx)("b",{children:__("Your post was shared.","jetpack-publicize-pkg")})," ",(0,l.jsx)("span",{"aria-hidden":"true",children:"🎉"}),(0,l.jsx)("p",{children:(0,s.sprintf)(/* translators: %d: number of connections to which a post was shared */
|
||||
_n("Your post was successfuly shared to %d connection.","Your post was successfuly shared to %d connections.",n.length,"jetpack-publicize-pkg"),n.length)}),(0,l.jsx)(a.J,{analyticsData:{location:e?"resharing-section":"post-publish-panel"}})]}):(0,l.jsx)(r.Notice,{isDismissible:!1,status:"warning",children:__("Your post was not shared.","jetpack-publicize-pkg")}):(0,l.jsxs)(r.Notice,{isDismissible:!1,children:[__("The request to share your post is still in progress.","jetpack-publicize-pkg"),(0,l.jsx)("br",{}),__("Please refresh and check again in a few minutes.","jetpack-publicize-pkg")]})}},61212(e,t,n){"use strict";n.d(t,{z:()=>l});var r=n(47143),i=n(51609),s=n(52472),o=n(15132),a=n(52208),c=n(93294);function l(){const{isPublicizeEnabled:e}=(0,s.A)(),{openUnifiedModal:t}=(0,r.useDispatch)(c.M),{hasConnections:n}=(0,o.A)(),l=(0,a.Q)(),u=e&&n&&!1!==l.data.showPrePublishConfirmation;return(0,i.useEffect)(()=>{u&&t()},[u,t]),null}},95250(e,t,n){"use strict";n.d(t,{E:()=>f});var r=n(56427),i=n(47143),s=n(27723),o=n(51609),a=n(93294),c=n(84203),l=n(22899),u=n(76470),d=n(68183),p=n(10790);const __=s.__,f=()=>{const e=(0,i.useSelect)(e=>e(a.M).getPostShareStatus(),[]),[t,n]=(0,o.useState)(null);return(0,o.useEffect)(()=>{e.polling&&n(Date.now()/1e3)},[e.polling]),(0,p.jsx)(c.A,{fallback:(0,p.jsx)(r.Notice,{status:"error",isDismissible:!1,children:__("Unable to load the sharing status.","jetpack-publicize-pkg")}),children:t?(0,p.jsx)("div",{className:d.A.wrapper,children:(0,p.jsx)(l.q,{reShareTimestamp:t})}):(0,p.jsx)(u.J,{withWrapper:!0,analyticsData:{location:"editor"}})})}},99106(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(56427),i=n(47143),s=n(38443),o=n(86087),a=n(27723),c=n(19657),l=n(20692),u=n(76424),d=n(93294),p=n(44835),f=n(10790);const __=a.__,_x=a._x,h=e=>{const t=new Date(e);return t.setDate(e.getDate()+1),!(0,s.isInTheFuture)(t)},m=({onClose:e,currentTimestamp:t,onTimestampChange:n,onConfirm:i})=>{const a=(0,o.useCallback)(()=>{i?.(t),e()},[e,i,t]),c=(0,o.useCallback)(e=>{const t=Math.floor((0,s.getDate)(e).getTime()/1e3);n(t)},[n]),l=(0,s.date)("Y-m-d\\TH:i:s",new Date(1e3*t),void 0);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(r.DateTimePicker,{onChange:c,currentDate:l,isInvalidDate:h}),(0,f.jsx)(r.Button,{variant:"primary",onClick:a,className:p.A.confirm,disabled:!(0,s.isInTheFuture)(l),children:_x("Confirm","Confirms the date and time selected to be used to share the post","jetpack-publicize-pkg")})]})},g=()=>{const e=Math.floor(Date.now()/1e3),[t,n]=(0,o.useState)(e),s=(0,l.C)(),a=(0,u.P)(),p=(0,i.useSelect)(e=>e(d.M).isSharingCurrentPost()),h=(0,i.useSelect)(e=>e(d.M).isSchedulingShares(),[]),g=!s||p,v=(0,o.useCallback)(async e=>{await a({timestamp:e})},[a]),b=(0,o.useCallback)(({onToggle:e,isOpen:t})=>(0,f.jsx)(r.Button,{onClick:h||g?null:e,"aria-expanded":t,"aria-live":"polite",icon:c.A,isSecondary:!0,isBusy:h,disabled:g,children:__("Schedule","jetpack-publicize-pkg")}),[h,g]),w=(0,o.useCallback)(({onClose:e})=>(0,f.jsx)(m,{onClose:e,currentTimestamp:t,onTimestampChange:n,onConfirm:v}),[t,v]);return(0,f.jsx)(r.Dropdown,{popoverProps:{placement:"bottom-start"},renderToggle:b,renderContent:w})}},72313(e,t,n){"use strict";n.d(t,{$:()=>m});var r=n(47143),i=n(86087),s=n(27723),o=n(72326),a=n(13022),c=n(93856),l=n(93294),u=n(66415),d=n(29999),p=n(1872),f=n(50272),h=n(10790);const __=s.__;function m({service:e,isSmall:t,onSubmit:n,displayInputs:s,hasConnections:m,buttonLabel:g,compact:v}){const b=(0,c.x)(),{fetchKeyringResult:w,setKeyringResult:x,completeReconnect:_}=(0,r.useDispatch)(l.M);let y;v&&(y=s?"default":"compact");const{isConnectionsModalOpen:k}=(0,r.useSelect)(e=>e(l.M),[]),j=(0,r.useSelect)(e=>e(l.M).getReconnectingAccount(),[]),[C,A]=(0,i.useState)(!1),S=(0,r.useSelect)(e=>e(l.M).isFetchingServicesList(),[]),E=(0,r.useSelect)(e=>e(l.M).isFetchingKeyringResult(),[]),N=(0,i.useCallback)(async e=>{if(!k())return;const t=await w(e);!await _(t)&&t?.ID&&x(t)},[_,w,k,x]),z=(0,f.P)({service:e,onConfirm:N}),I=(0,i.useCallback)(async e=>{if(e.preventDefault(),e.stopPropagation(),n)return n();A(!0);const t=new FormData(e.target);await z(t,{refresh:Boolean(j)})},[n,j,z]);return(0,h.jsxs)("form",{className:(0,a.A)(p.A["connect-form"],{[p.A.small]:t}),onSubmit:I,children:[s?(0,h.jsx)("div",{className:(0,a.A)(p.A["fields-wrapper"],p.A.input),children:b?(0,h.jsx)(d.g,{service:e}):(0,h.jsx)(u.t,{service:e})}):null,(0,h.jsx)("div",{className:p.A["fields-wrapper"],children:(0,h.jsx)(o.$,{variant:m?"outline":"solid",size:y,type:"submit",disabled:S||E,children:(e=>{if(e)return e;if((S||E)&&C)return __("Connecting…","jetpack-publicize-pkg");const t=__("Connect more","jetpack-publicize-pkg"),n=__("Connect","jetpack-publicize-pkg");return m?t:n})(g)})})]})}},29999(e,t,n){"use strict";n.d(t,{g:()=>h});var r=n(56427),i=n(47143),s=n(86087),o=n(27723),a=n(79654),c=n(88050),l=n(61868),u=n(13022),d=n(93294),p=n(13168),f=n(10790);const __=o.__,_x=o._x;function h({service:e}){const[t,n]=(0,s.useState)(null),h=Line truncated
|
||||
__('Bluesky usernames cannot contain dots. If you are using a custom domain, enter it without "%s"',"jetpack-publicize-pkg"),".bsky.social")),!1}return n(null),!0},[]),g=(0,s.useCallback)(e=>m(e??""),[m]);if("mastodon"===e.id)return(0,f.jsx)("div",{className:p.A["fields-item"],children:(0,f.jsx)(r.__experimentalInputControl,{__next40pxDefaultSize:!0,required:!0,type:"text",name:"instance",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Mastodon handle","jetpack-publicize-pkg"),label:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg"),placeholder:"@mastodon@mastodon.social",help:__("You can find the handle in your Mastodon profile.","jetpack-publicize-pkg")})});if("bluesky"===e.id){const e=t?(0,f.jsx)("span",{className:p.A["error-text"],children:t}):(0,f.jsxs)(f.Fragment,{children:[__("You can find the handle in your Bluesky profile.","jetpack-publicize-pkg")," ",(0,s.createInterpolateElement)((0,o.sprintf)(/* translators: %s is the bluesky handle suffix like .bsky.social */
|
||||
__("This can either be %s or just the domain name if you are using a custom domain.","jetpack-publicize-pkg"),"<strong>username.bsky.social</strong>"),{strong:(0,f.jsx)("strong",{})})]});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:(0,u.A)(p.A["fields-item"],{[p.A["fields-item-error"]]:Boolean(t)}),children:(0,f.jsx)(r.__experimentalInputControl,{__next40pxDefaultSize:!0,required:!0,type:"text",name:"handle",defaultValue:"bluesky"===h?.service_name?h?.external_handle:void 0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Bluesky handle","jetpack-publicize-pkg"),label:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg"),placeholder:"username.bsky.social",onChange:g,help:e})}),(0,f.jsxs)("div",{className:p.A["fields-item"],children:[(0,f.jsx)(r.__experimentalInputControl,{__next40pxDefaultSize:!0,required:!0,type:"password",name:"app_password",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",label:__("App password","jetpack-publicize-pkg"),placeholder:"xxxx-xxxx-xxxx-xxxx",help:(0,s.createInterpolateElement)(__("App password is needed to safely connect your account. App password is different from your account password. You can <link>generate it in Bluesky</link>.","jetpack-publicize-pkg"),{link:(0,f.jsx)(a.N,{openInNewTab:!0,href:"https://bsky.app/settings/app-passwords",children:null})})}),"bluesky"===h?.service_name&&(0,f.jsx)(c.b,{intent:"error",children:(0,f.jsx)(l.V,{children:__("Please provide an app password to fix the connection.","jetpack-publicize-pkg")})})]})]})}return null}},66415(e,t,n){"use strict";n.d(t,{t:()=>p});var r=n(56427),i=n(47143),s=n(86087),o=n(27723),a=n(79654),c=n(13022),l=n(93294),u=n(1872),d=n(10790);const __=o.__,_x=o._x;function p({service:e}){const t=(0,s.useId)(),[n,p]=(0,s.useState)(null),f=(0,i.useSelect)(e=>e(l.M).getReconnectingAccount(),[]),h=(0,s.useCallback)(e=>{if(e.endsWith(".bsky.social")){if(e.replace(".bsky.social","").includes("."))return p((0,o.sprintf)(/* translators: %s is the handle suffix like .bsky.social */
|
||||
__('Bluesky usernames cannot contain dots. If you are using a custom domain, enter it without "%s"',"jetpack-publicize-pkg"),".bsky.social")),!1}return p(null),!0},[]),m=(0,s.useCallback)(e=>{h(e.target.value)},[h]);return"mastodon"===e.id?(0,d.jsxs)("div",{className:u.A["fields-item"],children:[(0,d.jsx)("label",{htmlFor:`${t}-handle`,children:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg")}),(0,d.jsx)("input",{id:`${t}-handle`,required:!0,type:"text",name:"instance",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Mastodon handle","jetpack-publicize-pkg"),"aria-describedby":`${t}-handle-description`,placeholder:"@mastodon@mastodon.social"}),(0,d.jsx)("p",{className:"description",id:`${t}-handle-description`,children:__("You can find the handle in your Mastodon profile.","jetpack-publicize-pkg")})]}):"bluesky"===e.id?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:u.A["fields-item"],children:[(0,d.jsx)("label",{htmlFor:`${t}-handle`,children:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg")}),(0,d.jsx)("input",{id:`${t}-handle`,required:!0,type:"text",name:"handle",defaultValue:"bluesky"===f?.service_name?f?.external_handle:void 0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Bluesky handle","jetpack-publicize-pkg"),"aria-describedby":`${t}-handle-description`,placeholder:"username.bsky.social",onChange:m,className:n?u.A.error:void 0}),(0,d.jsx)("p",{className:(0,c.A)("description",n&&u.A["error-text"]),id:`${t}-handle-description`,children:n||(0,d.jsxs)(d.Fragment,{children:[__("You can find the handle in your Bluesky profile.","jetpack-publicize-pkg")," ",(0,s.createInterpolateElement)((0,o.sprintf)(/* translators: %s is the bluesky handle suffix like .bsky.social */
|
||||
__("This can either be %s or just the domain name if you are using a custom domain.","jetpack-publicize-pkg"),"<strong>username.bsky.social</strong>"),{strong:(0,d.jsx)("strong",{})})]})})]}),(0,d.jsxs)("div",{className:u.A["fields-item"],children:[(0,d.jsx)("label",{htmlFor:`${t}-password`,children:__("App password","jetpack-publicize-pkg")}),(0,d.jsx)("input",{id:`${t}-password`,required:!0,type:"password",name:"app_password",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("App password","jetpack-publicize-pkg"),"aria-describedby":`${t}-password-description`,placeholder:"xxxx-xxxx-xxxx-xxxx"}),(0,d.jsx)("p",{className:"description",id:`${t}-password-description`,children:(0,s.createInterpolateElement)(__("App password is needed to safely connect your account. App password is different from your account password. You can <link>generate it in Bluesky</link>.","jetpack-publicize-pkg"),{link:(0,d.jsx)(a.N,{openInNewTab:!0,href:"https://bsky.app/settings/app-passwords",children:null})})}),"bluesky"===f?.service_name&&(0,d.jsx)(r.Notice,{status:"error",isDismissible:!1,children:__("Please provide an app password to fix the connection.","jetpack-publicize-pkg")})]})]}):null}},4985(e,t,n){"use strict";n.d(t,{f:()=>b});var r=n(47143),i=n(27723),s=n(28847),o=n(21220),a=n(33180),c=n(39968),l=n(93294),u=n(92216),d=n(30646),p=n(25737),f=n(51708),h=n(25394),m=n(566),g=n(13168),v=n(10790);const __=i.__,b=({connection:e,service:t,canMarkAsShared:n})=>{const i=(0,r.useSelect)(t=>t(l.M).canUserManageConnection(e),[e]);return(0,v.jsxs)(o.B,{direction:"column",gap:"lg",children:[(0,v.jsxs)(o.B,{direction:"row",gap:"lg",children:[(0,v.jsx)("div",{children:(0,v.jsx)(u.A,{className:g.A["profile-pic"],profilePicture:e.profile_picture,label:e.display_name})}),(0,v.jsxs)(o.B,{direction:"column",align:"flex-start",gap:"sm",className:g.A["connection-details"],children:[(0,v.jsx)(d.s,{connection:e,tone:"neutral"}),(e=>{if(("broken"===e.status||"must_reauth"===e.status)&&i)return(0,v.jsx)(p.v,{connection:e,service:t});if(n){const t=__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack-publicize-pkg");return(0,v.jsxs)(o.B,{direction:"row",align:"center",gap:"sm",children:[(0,v.jsx)(m.j,{connection:e}),(0,v.jsx)(a.K,{variant:"minimal",tone:"neutral",size:"small",label:t,icon:s.A})]})}return i?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c.E,{className:g.A.description,children:__("This connection is added by a site administrator.","jetpack-publicize-pkg")}),"broken"===e.status?(0,v.jsx)(p.v,{connection:e,service:t}):null]})})(e)]}),(0,v.jsx)("div",{className:g.A["connection-actions"],children:(0,v.jsx)(h.V,{connection:e,variant:"outline",size:"compact",tone:"neutral"})})]}),(0,v.jsx)(f.m,{connection:e})]})}},14217(e,t,n){"use strict";n.d(t,{e:()=>g});var r=n(40597),i=n(47425),s=n(47143),o=n(27723),a=n(93294),c=n(92216),l=n(30646),u=n(25737),d=n(51708),p=n(25394),f=n(566),h=n(1872),m=n(10790);const __=o.__,g=({connection:e,service:t,canMarkAsShared:n})=>{const o=(0,s.useSelect)(t=>t(a.M).canUserManageConnection(e),[e]);return(0,m.jsxs)("div",{className:h.A["service-connection-wrapper"],children:[(0,m.jsxs)("div",{className:h.A["service-connection"],children:[(0,m.jsx)("div",{children:(0,m.jsx)(c.A,{className:h.A["profile-pic"],profilePicture:e.profile_picture,label:e.display_name})}),(0,m.jsxs)("div",{className:h.A["connection-details"],children:[(0,m.jsx)(l.s,{connection:e}),(g=e,"broken"!==g.status&&"must_reauth"!==g.status||!o?n?(0,m.jsxs)("div",{className:h.A["mark-shared-wrap"],children:[(0,m.jsx)(f.j,{connection:g}),(0,m.jsx)(r.A,{placement:"top",inline:!1,shift:!0,children:__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack-publicize-pkg")})]}):o?null:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(i.Ay,{className:h.A.description,children:__("This connection is added by a site administrator.","jetpack-publicize-pkg")}),"broken"===g.status?(0,m.jsx)(u.v,{connection:g,service:t}):null]}):(0,m.jsx)(u.v,{connection:g,service:t}))]}),(0,m.jsx)("div",{className:h.A["connection-actions"],children:(0,m.jsx)(p.V,{connection:e,variant:"minimal"})})]}),(0,m.jsx)(d.m,{connection:e})]});var g}},95790(e,t,n){"use strict";n.d(t,{x:()=>h});var r=n(56427),i=n(29491),s=n(47143),o=n(13022),a=n(93856),c=n(66336),l=n(93294),u=n(14217),d=n(4985),p=n(1872),f=n(10790);function h({service:e,serviceConnections:t}){const n=(0,a.x)()?d.f:u.e,h=(0,i.useViewportMatch)("small","<"),{deletingConnections:m,updatingConnections:g}=(0,s.useSelect)(e=>{const{getDeletingConnections:t,getUpdatingConnections:n}=e(l.M);return{deletingConnections:t(),updatingConnections:n()}},[]),v=(0,c._)();return t.length?(0,f.jsx)("ul",{className:p.A["service-connection-list"],children:t.map(t=>{const i=g.includes(t.connection_id)||m.includes(t.connection_id);return(0,f.jsx)("li",{children:(0,f.jsx)(r.Disabled,{isDisabled:i,children:(0,f.jsx)(Line truncated
|
||||
// translators: %d: Number of connections
|
||||
__("%d connections","jetpack-publicize-pkg"),e.length):__("Connected","jetpack-publicize-pkg")})}},92043(e,t,n){"use strict";n.d(t,{M:()=>d});var r=n(47143),i=n(86087),s=n(71032),o=n(93294),a=n(26839),c=n(13168),l=n(75265),u=n(10790);function d(){const e=(0,l.o)(),t=(0,r.useSelect)(e=>e(o.M).getConnections(),[]),n=(0,i.useMemo)(()=>t.reduce((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e),{}),[t]),d=(0,r.useSelect)(e=>e(o.M).getReconnectingAccount(),[]);return(0,u.jsx)(s.b,{children:(0,u.jsx)("ul",{className:c.A.services,children:e.map(e=>(0,u.jsx)("li",{className:c.A["service-list-item"],children:(0,u.jsx)(a.q,{service:e,serviceConnections:n[e.id]||[],isPanelDefaultOpen:d?.service_name===e.id})},e.id))})})}},19123(e,t,n){"use strict";n.d(t,{b:()=>u});var r=n(47143),i=n(86087),s=n(93294),o=n(86663),a=n(1872),c=n(75265),l=n(10790);function u(){const e=(0,c.o)(),t=(0,r.useSelect)(e=>e(s.M).getConnections(),[]),n=(0,i.useMemo)(()=>t.reduce((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e),{}),[t]),u=(0,r.useSelect)(e=>e(s.M).getReconnectingAccount(),[]);return(0,l.jsx)("ul",{className:a.A.services,children:e.map(e=>(0,l.jsx)("li",{className:a.A["service-list-item"],children:(0,l.jsx)(o.j,{service:e,serviceConnections:n[e.id]||[],isPanelDefaultOpen:u?.service_name===e.id})},e.id))})}},50272(e,t,n){"use strict";n.d(t,{P:()=>u});var r=n(63406),i=n(97999),s=n(47143),o=n(86087),a=n(27723),c=n(93294),l=n(5488);const __=a.__;function u({service:e,onConfirm:t}){const{createErrorNotice:n}=(0,r.I)(),a=(0,s.useSelect)(e=>e(c.M).isMastodonAccountAlreadyConnected,[]),u=(0,s.useSelect)(e=>e(c.M).isBlueskyAccountAlreadyConnected,[]),{refreshServicesList:d}=(0,s.useDispatch)(c.M),{getService:p}=(0,s.useSelect)(e=>e(c.M),[]);return(0,o.useCallback)(async(r,s={})=>{let o=e.url;if(!o&&(await d(),o=p(e.id)?.url,!o))return n(__("Could not start the connection. Please refresh the page and try again.","jetpack-publicize-pkg")),!1;const c=new URL(o);switch(e.id){case"mastodon":{const e=r.get("instance").toString().trim();if(!/^@?\b([A-Z0-9_]+)@([A-Z0-9.-]+\.[A-Z]{2,})$/gi.test(e))return n(__("Invalid Mastodon username","jetpack-publicize-pkg")),!1;if(!s.refresh&&a?.(e))return n(__("This Mastodon account is already connected","jetpack-publicize-pkg")),!1;c.searchParams.set("instance",e);break}case"bluesky":{const e=(r.get("handle")?.toString()||"").trim().replace(/^@/,"");if(!function(e){const t=e.split(".").filter(Boolean);return!(t.length<2)&&t.every(e=>/^[a-z0-9_-]+$/i.test(e))}(e))return n(__("Invalid Bluesky handle","jetpack-publicize-pkg")),!1;if(!s.refresh&&u?.(e))return n(__("This Bluesky account is already connected","jetpack-publicize-pkg")),!1;c.searchParams.set("handle",e),c.searchParams.set("app_password",(r.get("app_password")?.toString()||"").trim());break}}const f=Math.random().toString(36).slice(2,12);c.searchParams.set("auth_flow","v2"),c.searchParams.set("request_id",f),c.searchParams.set("return_url",(0,i.getAdminUrl)("admin-post.php?action=jetpack_social_keyring_done")),s.refresh&&c.searchParams.set("refresh","1");const h=(0,l.x9)(c.toString(),()=>t(f),s.onAbort);return h||n(__("The connection window could not be opened. Please allow pop-ups for this site and try again.","jetpack-publicize-pkg")),h},[n,p,u,a,t,d,e])}},48896(e,t,n){"use strict";n.d(t,{h:()=>s});var r=n(51609),i=n(96015);function s(){const e=(0,i.h)();return(0,r.useCallback)(t=>e(t)?.label||t[0].toUpperCase()+t.substring(1),[e])}},96015(e,t,n){"use strict";n.d(t,{h:()=>s});var r=n(51609),i=n(75265);function s(){const e=(0,i.o)();return(0,r.useCallback)(t=>e.find(e=>e.id===t),[e])}},75265(e,t,n){"use strict";n.d(t,{o:()=>a});n(89097);var r=n(47143),i=n(86087),s=n(93294),o=n(43493);function a(){const e=(0,r.useSelect)(e=>e(s.M).getServicesList(),[]);return(0,i.useMemo)(()=>e.filter(({status:e})=>"ok"===e).map(e=>({...e,...(0,o.M)(e.id)})),[e])}},43493(e,t,n){"use strict";n.d(t,{M:()=>m});var r=n(78478),i=n(86087),s=n(27723),o=n(79654),a=n(5488),c=n(10790);const __=s.__,l=(0,a.uq)("connections-facebook.webp"),u=(0,a.uq)("connections-instagram-business.webp"),d=(0,a.uq)("connections-linkedin.webp"),p=(0,a.uq)("connections-nextdoor.webp"),f=(0,a.uq)("connections-threads.webp"),h=(0,a.uq)("connections-tumblr.webp");function m(e){switch(e){case"bluesky":return{needsCustomInputs:!0,icon:e=>(0,c.jsx)(r.M5,{serviceName:"bluesky",...e}),description:__("Share with your network.","jetpack-publicize-pkg"),examples:[()=>(0,c.jsx)(c.Fragment,{children:__("To share to Bluesky please enter your Bluesky handle and app password below, then click connect.","jetpack-publicize-pkg")})]};case"facebook":return{icon:e=>(0,c.jsx)(r.M5,{serviceName:"facebook",...e}),description:__("Share to your pages","jetpack-publicize-pkg"),examples:[()=>(0,c.jsx)(c.Fragment,{children:(0,i.createInterpolateElement)(__("<strong>Connect</strong> to automatically share posts on your Facebook page.","jetpack-publicize-pkg"),{strong:(0,Line truncated
|
||||
__("Share on %s","jetpack-publicize-pkg"),n),f=(0,h.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",onClick:v(a,{network:r})});return(0,h.jsx)("div",{className:p.A.container,children:"icon"===e?(0,h.jsx)(l.$,{"aria-label":d,className:(0,u.A)(p.A["icon-button"],p.A[r]),render:f,children:(0,h.jsx)(i.M5,{serviceName:r})}):(0,h.jsxs)(l.$,{"aria-label":d,className:"has-text",render:f,children:["icon-text"===e&&(0,h.jsx)(i.M5,{className:p.A[r],serviceName:r}),(0,h.jsx)(s.Ay,{className:p.A.label,component:"span",children:d})]})},r)}),(0,h.jsx)("div",{className:p.A.container,children:(0,h.jsx)(r.A,{buttonStyle:e,onCopy:m,textToCopy:g,className:"icon"===e?p.A.clipboard:" has-text",children:"icon"===e?null:(0,h.jsx)(s.Ay,{className:p.A.label,component:"span",children:__("Copy to clipboard","jetpack-publicize-pkg")})})})]})}},17204(e,t,n){"use strict";n.d(t,{i:()=>a});var r=n(47143),i=n(43656),s=n(86087),o=n(83688);function a(){const{shareMessage:e}=(0,o.h)(),{message:t,link:n}=(0,r.useSelect)(t=>{const{getEditedPostAttribute:n}=t(i.store);return{link:n("link"),message:e||n("meta")?.jetpack_seo_html_title||n("title")}},[e]);return(0,s.useCallback)((e,r=!0)=>{let i=t,s=n;return e.includes("{{url}}")||(i=i+"\n\n"+s,s=""),r&&(i=encodeURIComponent(i),s=encodeURIComponent(s)),e.replace("{{text}}",i).replace("{{url}}",s)},[n,t])}},10795(e,t,n){"use strict";n.d(t,{_:()=>h});var r=n(97999),i=n(85985),s=n(56427),o=n(47143),a=n(86087),c=n(27723),l=n(94157),u=n(20692),d=n(55610),p=n(93294),f=n(10790);const __=c.__;function h({onShareCompleted:e}){const t=(0,o.useSelect)(e=>e(p.M).isSharingCurrentPost()),{recordEvent:n}=(0,i.st)(),c=(0,o.useSelect)(e=>e(p.M).isSchedulingShares(),[]),h=(0,d.P)(),m=(0,u.C)(),g=(0,a.useCallback)(async()=>{n("jetpack_social_reshare_clicked",{location:"editor",environment:(0,r.isWoASite)()?"atomic":(0,r.isSimpleSite)()?"simple":"jetpack"});await h()&&e()},[n,h,e]);return(0,f.jsx)(s.Button,{variant:"primary",onClick:g,disabled:!m||c,isBusy:t,icon:l.A,children:__("Share","jetpack-publicize-pkg")})}},76470(e,t,n){"use strict";n.d(t,{J:()=>r.g});var r=n(34054)},34054(e,t,n){"use strict";n.d(t,{g:()=>p});var r=n(85985),i=n(56427),s=n(47143),o=n(27723),a=n(13022),c=n(51609),l=n(93294),u=n(76939),d=n(10790);const __=o.__,p=(0,c.forwardRef)(({withWrapper:e=!1,analyticsData:t=null,...n},o)=>{const{recordEvent:p}=(0,r.st)(),{openUnifiedModal:f}=(0,s.useDispatch)(l.M),h=(0,s.useSelect)(e=>e(l.M).getPostShareStatus(),[]),m=(0,c.useCallback)(()=>{p("jetpack_social_share_status_modal_opened",t),f({initialPath:"/sharing-activity",isScreenLocked:!0})},[t,f,p]);if(!h||!h.shares||0===h.shares.length)return null;const g=(0,d.jsx)(i.Button,{variant:"secondary",onClick:m,...n,className:(0,a.A)(u.A.trigger,n.className),ref:o,children:n.children||__("View sharing activity","jetpack-publicize-pkg")});return e?(0,d.jsx)("div",{className:u.A["trigger-wrapper"],children:g}):g})},60076(e,t,n){"use strict";n.d(t,{f:()=>m});var r=n(40597),i=n(85985),s=n(56427),o=n(47143),a=n(27723),c=n(51609),l=n(52472),u=n(55610),d=n(93294),p=n(51604),f=n(76939),h=n(10790);const __=a.__,_x=a._x;function m({shareItem:e}){const{recordEvent:t}=(0,i.st)(),n=(0,o.useSelect)(e=>e(d.M).getConnections(),[]),{isRePublicizeFeatureAvailable:a}=(0,l.A)(),m=n.some((0,p.eJ)(e)),g=(0,u.P)(),{pollForPostShareStatus:v}=(0,o.useDispatch)(d.M),[b,w]=(0,c.useState)(!1),x=(0,c.useCallback)(async()=>{t("jetpack_social_share_status_retry",{service:e.service,location:"modal"});const r=(0,p.eJ)(e),i=n.filter(e=>!r(e)).map(({connection_id:e})=>e);i.length!==n.length&&(w(!0),await g({connectionsToSkip:i}),await v({isRequestComplete({postShareStatus:t,lastTimestamp:n}){const r=t.shares.some(t=>t.timestamp>n&&(0,p.Ri)(e,t));return r&&w(!1),r}}))},[t,e,n,g,v]);return b?(0,h.jsx)(s.Spinner,{}):(0,h.jsx)("div",{className:f.A["retry-wrapper"],children:(_=m,y=a,_&&y?(0,h.jsx)(s.Button,{variant:"link",onClick:x,children:__("Retry","jetpack-publicize-pkg")}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s.Button,{variant:"tertiary",disabled:!0,children:__("Retry","jetpack-publicize-pkg")}),(0,h.jsx)(r.A,{shift:!0,placement:"bottom-end",children:y?e.external_id?_x("This connection has been removed.","Social media connection","jetpack-publicize-pkg"):_x("This connection has been reconnected or removed.","Social media connection","jetpack-publicize-pkg"):__("To re-share a post, you need to upgrade to a paid plan.","jetpack-publicize-pkg")})]}))});var _,y}},90888(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(86087),i=n(27723),s=n(13022),o=n(20893),a=n(51519),c=n(10790);const __=i.__,l=({value:e=null,onTemplateSelected:t=null,className:n=null})=>{const l=(0,r.useCallback)(e=>{const n=e.target.id;t?.(n)},[t]);return(0,c.jsx)("div",{className:(0,s.A)(o.A.templates,n),children:a.A.map(t=>(0,c.jsxs)("button",{onClick:l,id:t.name,className:(0,s.A)(o.A.template,{[o.A["template--active"]]:t.name===e}),children:[(0,c.jsx)("img",{src:t.image,alt:t.label}),(0,c.jsx)("span",{className:"scrLine truncated
|
||||
__("Pick the %s template","jetpack-publicize-pkg"),t.label)})]},t.name))})}},51519(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(5488);const i=e=>`${(0,r.nE)()?.assets_url??""}assets/sig-templates-${e}.jpg`,s=[{name:"highway",label:"Highway",image:i("highway")},{name:"dois",label:"Dois",image:i("dois")},{name:"edge",label:"Edge",image:i("edge")},{name:"fullscreen",label:"Fullscreen",image:i("fullscreen")}]},273(e,t,n){"use strict";n.d(t,{_:()=>b});var r=n(94715),i=n(56427),s=n(86087),o=n(27723),a=n(1034),c=n(56501),l=n(78896),u=n(71615),d=n(97342),p=n(811),f=n(10790);const __=o.__,h=["image/jpeg","image/png"];function m({option:e,isSelected:t,onSelect:n,onClose:r}){const o=(0,s.useCallback)(()=>{n(e.id,r)},[e.id,n,r]);return(0,f.jsx)(i.MenuItem,{icon:e.icon,isSelected:t,onClick:o,children:e.label},e.id)}function g({isSelected:e,onRemove:t,onClose:n}){const r=(0,s.useCallback)(()=>{t(),n()},[t,n]);return(0,f.jsx)(i.MenuGroup,{children:(0,f.jsx)(i.MenuItem,{isSelected:e,onClick:r,children:__("No image","jetpack-publicize-pkg")})})}function v(e){switch(e){case"default":return __("You are using the default image","jetpack-publicize-pkg");case"featured":default:return __("You are using your post featured image","jetpack-publicize-pkg");case"custom":return __("You are using a custom image","jetpack-publicize-pkg");case"none":return __("No background image","jetpack-publicize-pkg")}}function b({imageType:e,imageId:t,defaultImageId:n,featuredImageId:o,onImageTypeChange:b,onImageIdChange:w}){const x=(0,s.useRef)(()=>{}),_=(0,s.useMemo)(()=>function(e,t,n,r){switch(e){case"default":return r;case"featured":default:return n;case"custom":return t;case"none":return null}}(e,t,o,n),[e,t,o,n]),[y,k]=(0,u.A)(_),[,j]=(0,u.A)(_!==n?n:null),C=_===n?k:j,A=y?.mediaData?.sourceUrl,S=Boolean(_)&&!A&&!k,E="featured"===e&&!o,N=(0,s.useMemo)(()=>A||S?{id:_||0,url:A||"",type:"image"}:null,[A,S,_]);(0,s.useEffect)(()=>{"default"===e&&C&&b("none")},[e,C,b]);const z=Boolean(n)&&!C,I=(0,s.useMemo)(()=>{const e=[];return z&&e.push({id:"default",label:__("Default Image","jetpack-publicize-pkg"),icon:a.A}),e.push({id:"featured",label:__("Featured Image","jetpack-publicize-pkg"),icon:l.A}),e.push({id:"custom",label:__("Media Library","jetpack-publicize-pkg"),icon:c.A}),e},[z]),T=(0,s.useCallback)(e=>{b("custom"),w(e?.id||null)},[b,w]),M=(0,s.useCallback)(()=>{setTimeout(()=>{x.current()},0)},[]),D=(0,s.useCallback)(({open:e})=>(x.current=e,null),[]),R=(0,s.useCallback)((e,t)=>{"custom"===e?M():b(e),t()},[b,M]),P=(0,s.useCallback)(()=>{b("none"),w(null)},[b,w]),F=(0,s.useCallback)(({onClose:t})=>(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(i.MenuGroup,{children:I.map(n=>(0,f.jsx)(m,{option:n,isSelected:e===n.id,onSelect:R,onClose:t},n.id))}),(0,f.jsx)(g,{isSelected:"none"===e,onRemove:P,onClose:t})]}),[I,e,R,P]),L=(0,s.useCallback)(({onToggle:e})=>(0,f.jsx)(i.Button,{__next40pxDefaultSize:!0,className:p.A.selectButton,variant:"secondary",onClick:e,children:__("Select image","jetpack-publicize-pkg")}),[]);return(0,f.jsxs)("div",{className:p.A.backgroundPicker,children:[(0,f.jsx)(r.MediaUpload,{title:__("Select Background Image","jetpack-publicize-pkg"),onSelect:T,allowedTypes:h,render:D}),(0,f.jsx)("p",{className:p.A.sourceLabel,children:v(e)}),N&&(0,f.jsx)(d.A,{media:N,isLoading:S}),E&&(0,f.jsx)(i.Notice,{status:"warning",isDismissible:!1,className:p.A.notice,children:__("Your post does not have a featured image.","jetpack-publicize-pkg")}),(0,f.jsx)(i.Dropdown,{className:p.A.selectDropdown,popoverProps:{placement:"bottom-start"},renderToggle:L,renderContent:F})]})}},76142(e,t,n){"use strict";n.d(t,{U:()=>c});var r=n(56427),i=n(27723),s=n(986),o=n(811),a=n(10790);const __=i.__;function c({localState:e}){const{url:t,isLoading:n}=(0,s.A)(!0,{shouldDebounce:!0,imageType:e.imageType,imageId:e.imageId,customText:e.customText,template:e.template||void 0,font:e.font});return(0,a.jsx)("div",{className:o.A.content,children:(0,a.jsx)("div",{className:o.A.preview,children:n?(0,a.jsx)(r.Spinner,{}):t&&(0,a.jsx)("img",{className:o.A.previewImage,src:t,alt:__("Generated preview","jetpack-publicize-pkg")})})})}},29770(e,t,n){"use strict";n.d(t,{B:()=>d});var r=n(56427),i=n(86087),s=n(27723),o=n(5637),a=n(90888),c=n(273),l=n(811),u=n(10790);const __=s.__;function d({localState:e,setLocalState:t,defaultImageId:n,featuredImageId:s}){const{isLoading:d,fontOptions:p}=(0,o.L)(),f=(0,i.useCallback)(e=>{t(t=>({...t,imageType:e}))},[t]),h=(0,i.useCallback)(e=>{t(t=>({...t,imageId:e}))},[t]),m=(0,i.useCallback)(e=>{t(t=>({...t,customText:e}))},[t]),g=(0,i.useCallback)(e=>{t(t=>({...t,template:e}))},[t]),v=(0,i.useCallback)(e=>{t(t=>({...t,font:e}))},[t]);return(0,u.jsxs)("div",{className:l.A.sidebar,children:[(0,u.jsxs)("fieldset",{className:l.A.section,children:[(0,u.jsx)("legend",{className:l.A.sectionLabel,children:__("Background image","jetpack-publicize-pkg")}),(0,u.jsx)(c._,{imageType:e.imageType,imageId:e.imageId,defaultImageId:n,featuredImageId:s,onImageTypeChanLine truncated
|
||||
_n("Ready to share to %d account.","Ready to share to %d accounts.",e.length,"jetpack-publicize-pkg"),e.length)," "]}):null,t?(0,p.jsx)(f,{}):null]})}function m(){return(0,i.useSelect)(e=>{const t=e(s.store);return!t.isCurrentPostPublished()&&t.isPublishSidebarOpened()},[])?(0,p.jsx)(d.A,{}):(0,p.jsx)(h,{})}},23653(e,t,n){"use strict";n.d(t,{e:()=>p});var r=n(56427),i=n(47143),s=n(43656),o=n(27723),a=n(51609),c=n(52472),l=n(99106),u=n(10795),d=n(10790);const __=o.__,_x=o._x;function p(){const e=(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[]),{isRePublicizeFeatureAvailable:t}=(0,c.A)(),n=(0,i.useSelect)(e=>{const t=e(s.store);return!t.isCurrentPostPublished()&&t.isPublishSidebarOpened()},[]);return(0,a.useMemo)(()=>e&&t?[()=>(0,d.jsx)(l.A,{},"schedule"),({navigate:e})=>(0,d.jsx)(u._,{onShareCompleted:e},"share")]:[({navigate:e})=>(0,d.jsx)(r.Button,{variant:"primary",onClick:e,children:n?__("Continue","jetpack-publicize-pkg"):_x("Close","Button text to close the modal.","jetpack-publicize-pkg")},"save")],[e,t,n])}},38406(e,t,n){"use strict";n.d(t,{V:()=>h});var r=n(62410),i=n(47143),s=n(43656),o=n(27723),a=n(51609),c=n(5488),l=n(75013),u=n(16501),d=n(91127),p=n(23653),f=n(10790);const __=o.__,_x=o._x;function h(){const e=(0,i.useSelect)(e=>e(s.store).isCurrentPostPublished(),[]),t=(0,p.e)(),n=(0,i.useSelect)(e=>{const t=e(s.store);return!t.isCurrentPostPublished()&&t.isPublishSidebarOpened()},[]),o=(0,a.useMemo)(()=>n?_x("Confirm social sharing","Modal title for pre-publish confirmation","jetpack-publicize-pkg"):e?__("Customize and share to social media","jetpack-publicize-pkg"):_x("Preview and customize","Title for social post preview modal","jetpack-publicize-pkg"),[n,e]);return(0,a.useMemo)(()=>({path:"/",title:o,isScreenLocked:!0,headerIcon:n?(0,f.jsx)(r.ux,{}):null,content:(0,f.jsx)(l.U,{}),footerContent:(0,f.jsx)(u.R,{}),footerActions:t,className:d.A["social-post-preview-screen"],"data-plan":(0,c.pq)()?"paid":"free"}),[n,t,o])}},37695(e,t,n){"use strict";n.d(t,{gj:()=>i.g,s$:()=>r.s});n(89050);var r=n(86611),i=n(51333)},86611(e,t,n){"use strict";n.d(t,{s:()=>u});var r=n(56427),i=n(27723),s=n(13022),o=(n(51609),n(3475)),a=n(29397),c=n(89050),l=n(10790);const __=i.__;function u({previewData:e,initialTabName:t,title:n,className:i,...u}){const d=(0,o.q)();return(0,l.jsx)(r.Modal,{title:n||__("Previews","jetpack-publicize-pkg"),size:"fill",className:(0,s.A)(a.A["link-preview-modal"],i),...u,children:(0,l.jsx)(c.T,{initialTabName:t,...d,...e})})}},89050(e,t,n){"use strict";n.d(t,{T:()=>a});var r=n(56427),i=n(29397),s=n(51333),o=n(10790);function a({initialTabName:e,...t}){const n=(0,s.g)();return(0,o.jsx)(r.TabPanel,{tabs:n,initialTabName:e,className:i.A["link-preview-tabs"],children:e=>(0,o.jsx)("div",{className:i.A["link-preview-tab"],children:(0,o.jsx)(e.preview,{...t})})})}},51333(e,t,n){"use strict";n.d(t,{g:()=>g});var r=n(54560),i=n(34900),s=n(8450),o=n(77123),a=n(26396),c=n(86587),l=n(5874),u=n(89014),d=n(66901),p=n(27723),f=n(51609),h=n(84705),m=n(10790);const __=p.__,_x=p._x;function g(){return(0,f.useMemo)(()=>[{title:__("Google Search","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"google"}),name:"google",preview:r.m},{title:__("X","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"x"}),name:"x",preview:i.E},{title:__("Facebook","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"facebook"}),name:"facebook",preview:d.l},{title:_x("Threads","The name of the social media network - threads.net","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"threads"}),name:"threads",preview:s.G},{title:__("LinkedIn","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"linkedin"}),name:"linkedin",preview:e=>(0,m.jsx)(o.X,{jobTitle:__("Job Title (Company Name)","jetpack-publicize-pkg"),...e})},{title:__("Nextdoor","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"nextdoor"}),name:"nextdoor",preview:a.g},{title:__("Tumblr","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"tumblr"}),name:"tumblr",preview:c.Z},{title:__("Mastodon","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"mastodon"}),name:"mastodon",preview:l.i},{title:__("Bluesky","jetpack-publicize-pkg"),icon:(0,m.jsx)(h.d6,{icon:"bluesky"}),name:"bluesky",preview:u.c}],[])}},81669(e,t,n){"use strict";n.d(t,{A:()=>i});var r=n(83688);function i(){const{attachedMedia:e,updateJetpackSocialOptions:t}=(0,r.h)();return{attachedMedia:e,updateAttachedMedia:e=>t("attached_media",e)}}},75897(e,t,n){"use strict";n.d(t,{P:()=>c});var r=n(86087),i=n(53682),s=n(2442),o=n(71615),a=n(51202);function c(e){const t=(0,i.A)(),{isEnabled:n}=(0,s.A)(),c=e.media_source;let l,u=!1;switch(c){case"sig":case"none":l=void 0;break;case"featured-image":l=t;break;default:l=e.attached_media?.[0]?.id||t,u=(e.attached_media?.length??0)>0}const[d]=(0,o.A)(l);return(0,r.useMemo)(()=>{if("sig"===c)return{error:null,isConvertible:!1};const t=n&&"instagram-business"===e.service_name;return{error:(0,a.Wp)(d.metaData,d.mediaData,e.service_name,u,t)??null,isConvertible:(0,aLine truncated
|
||||
__("%s account connected successfully.","jetpack-publicize-pkg"),o.service_label),{type:"snackbar",isDismissible:!0}),n.select(a.store).getCurrentPostId()&&i(C()))}catch(e){let t=__("Error connecting account.","jetpack-publicize-pkg");"object"==typeof e&&"message"in e&&e.message&&(t=`${t} ${e.message}`),l(t,{type:"snackbar",isDismissible:!0})}finally{i(M(d,!1)),i(S(d))}}}function T(e,t){return{type:p.dw,connectionId:e,data:t}}function M(e,t=!0){return{type:p._6,connectionId:e,updating:t}}function D(e){return{type:p.Nv,reconnectingAccount:e}}function R(e){return async function({dispatch:t,select:n}){const i=n.getReconnectingAccount();if(!i||!e?.ID)return!1;if(![e.external_ID,...e.additional_external_users?.map(e=>e.external_ID)??[]].filter(Boolean).map(String).includes(i.external_id))return!1;await t(j());const s="ok"===n.getConnectionById(i.connection_id)?.status;t(D(void 0));const{createSuccessNotice:a,createErrorNotice:c}=(0,o.dispatch)(r.store);return s?a(__("Account reconnected successfully.","jetpack-publicize-pkg"),{type:"snackbar",isDismissible:!0}):c(__("The account could not be reconnected. Please try again.","jetpack-publicize-pkg"),{type:"snackbar",isDismissible:!0}),!0}}function P(e,t,n={}){return async function({dispatch:i,select:a}){const{createErrorNotice:c,createSuccessNotice:l}=(0,o.dispatch)(r.store),{silent:u=!1}=n,d=a.getConnectionById(e);try{const n=`/wpcom/v2/publicize/connections/${e}`;i(k()),i(T(e,t)),u||i(M(e));await s()({method:"POST",path:n,data:t})&&!u&&l(__("Account updated successfully.","jetpack-publicize-pkg"),{type:"snackbar",isDismissible:!0})}catch(t){let n=__("Error updating account.","jetpack-publicize-pkg");"object"==typeof t&&"message"in t&&t.message&&(n=`${n} ${t.message}`),i(T(e,d)),c(n,{type:"snackbar",isDismissible:!0})}finally{u||i(M(e,!1))}}}function F(e){return{type:p.xW,isOpen:e}}function L(){return F(!0)}function O(){return F(!1)}function B(e,t){return{type:p.JS,connectionId:e,data:t}}function V(e,t,n=!0){return async function({dispatch:r}){await r(B(e,t)),n&&await r(C())}}},65043(e,t,n){"use strict";n.d(t,{B4:()=>j,BN:()=>d,Bc:()=>i,DQ:()=>T,FF:()=>z,JB:()=>E,JS:()=>v,N6:()=>k,N8:()=>D,Nv:()=>u,Ob:()=>_,T7:()=>S,WB:()=>f,WH:()=>a,Wp:()=>h,_6:()=>l,_y:()=>w,aF:()=>x,aT:()=>I,af:()=>s,b5:()=>m,dA:()=>r,dw:()=>c,em:()=>A,fz:()=>b,gN:()=>C,gy:()=>N,nC:()=>o,oe:()=>M,pn:()=>y,rz:()=>g,xW:()=>p});const r="SET_CONNECTIONS",i="ADD_CONNECTION",s="TOGGLE_CONNECTION",o="DELETE_CONNECTION",a="DELETING_CONNECTION",c="UPDATE_CONNECTION",l="UPDATING_CONNECTION",u="SET_RECONNECTING_ACCOUNT",d="SET_KEYRING_RESULT",p="TOGGLE_CONNECTIONS_MODAL",f="ADD_ABORT_CONTROLLER",h="REMOVE_ABORT_CONTROLLERS",m="DEFAULT",g="REFRESH_CONNECTIONS",v="CUSTOMIZE_CONNECTION",b="FETCH_POST_SHARE_STATUS",w="RECEIVE_POST_SHARE_STATUS",x="POLLING_FOR_POST_SHARE_STATUS",_="TOGGLE_UNIFIED_MODAL",y="SET_UNIFIED_MODAL_INITIAL_PATH",k="SET_UNIFIED_MODAL_SCREEN_LOCK",j="SET_UNIFIED_MODAL_DATA",C="SET_IS_SHARING_CURRENT_POST",A="SET_IS_SCHEDULING_SHARES",S="START_RENDERING_MESSAGES",E="RECEIVE_RENDERED_MESSAGES",N="FINISH_RENDERING_MESSAGES",z="SET_TRAFFIC_INTERVAL",I="FETCH_TRAFFIC_REFERRERS",T="RECEIVE_TRAFFIC_REFERRERS",M="RECEIVE_TRAFFIC_REFERRERS_ERROR",D="FETCHING_KEYRING_RESULT"},84970(e,t,n){"use strict";n.d(t,{A:()=>m});var r=n(83373),i=n(17426),s=n(8926),o=n(68100),a=n(59168),c=n(82744),l=n(38251),u=n(82676),d=n(29715),p=n(32425),f=n(76473),h=n(80968);const m={...c,...a,...r,...l,...n(33998),...d,...p,...u,...o,...s,...f,...h,...i}},17426(e,t,n){"use strict";n.r(t),n.d(t,{finishRenderingMessages:()=>a,receiveRenderedMessages:()=>o,startRenderingMessages:()=>s});var r=n(69433),i=n(65043);function s(e,t,n={}){return{type:i.T7,cacheKey:(0,r.a)(e,t,n)}}function o(e,t,n,s={}){return{type:i.JB,cacheKey:(0,r.a)(e,t,s),batch:n}}function a(e,t,n={}){return{type:i.gy,cacheKey:(0,r.a)(e,t,n)}}},8926(e,t,n){"use strict";n.r(t),n.d(t,{createScheduledShare:()=>l,deleteScheduledShare:()=>u,scheduleShares:()=>p,setIsSchedulingShares:()=>d});var r=n(3582),i=n(43656),s=n(27723),o=n(692),a=n(65043);const __=s.__,c="social-scheduled-share";function l(e){return async function({registry:t}){const{saveEntityRecord:n}=t.dispatch(r.store),{getLastEntitySaveError:i}=t.select(r.store),{createErrorNotice:s}=t.dispatch(o.store),a=await n("wpcom/v2","publicize/scheduled-actions",e);if(!a){const e=i("wpcom/v2","publicize/scheduled-actions");let t=__("There was an error scheduling the post.","jetpack-publicize-pkg");e?.message&&(t+=" "+e.message),s(t,{type:"snackbar",id:c})}return a}}function u(e){return async function({registry:t}){const{deleteEntityRecord:n}=t.dispatch(r.store),{getLastEntityDeleteError:i}=t.select(r.store),{createErrorNotice:s}=t.dispatch(o.store);if(!await n("wpcom/v2","publicize/scheduled-actions",e)){const t=i("wpcom/v2","publicize/scheduled-actions",e);let n=__("There was an error deleting the item.","jetpack-publicize-pkg");t?.message&&(n+=" "+t.message),s(n,{type:"snackbar"})}}}function d(e){return{tyLine truncated
|
||||
__("Toggle connection: %1$s on %2$s","jetpack-publicize-pkg"),e.display_name,e.service_label)}},84039(e,t,n){"object"==typeof window&&window.JetpackScriptData?.social?.assets_url&&(n.p=window.JetpackScriptData.social.assets_url)},69433(e,t,n){"use strict";function r(e){let t=2166136261;for(let n=0;n<e.length;n++)t=(Math.imul(t,16777619)+e.charCodeAt(n))%4294967291;return`${e.length}:${t.toString(36)}`}function i(e,t,n={}){return`${e}|${function(e,t={}){return 0!==e.length||t.title||t.excerpt||t.content?JSON.stringify([e.map(e=>[e.connection_id,e.message??"",Boolean(e.is_social_post)]),t.title??"",t.excerpt??"",r(t.content??"")]):"[]"}(t,n)}`}n.d(t,{a:()=>i})},67808(e,t,n){"use strict";n.d(t,{x:()=>i});var r=n(98137);const i=(e,t,n)=>{const i=new r.A;i.open(e,null,"toolbar=0,location=0,status=0,menubar=0,"+i.getScreenCenterSpecs(780,700));const s=i.windowInstance;if(!s||s.closed||void 0===s.closed)return!1;const o=new URL(e).searchParams.get("request_id");if(o&&"undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("jetpack-social-keyring");let r=!1;const i=()=>{setTimeout(()=>{r||n?.()},1e3)},s=()=>{window.addEventListener("focus",i,{once:!0})},a=()=>{window.removeEventListener("blur",s),window.removeEventListener("focus",i)};e.addEventListener("message",n=>{"keyring-result"===n.data?.type&&n.data?.requestId===o&&(r=!0,clearTimeout(c),a(),e.close(),t())}),window.addEventListener("blur",s,{once:!0});const c=setTimeout(()=>{a(),e.close(),r||n?.()},3e5);return!0}let a;return i.once("close",()=>{t(a?.ID?a:{})}),i.on("message",e=>{a=e?.data}),!0}},40976(e,t,n){"use strict";n.d(t,{Jc:()=>a,nE:()=>s,pq:()=>o,uq:()=>c});var r=n(97999),i=n(44727);function s(){return(0,r.getScriptData)()?.social}function o(){return(0,r.siteHasFeature)(i.q.ENHANCED_PUBLISHING)}function a(){return(0,r.getAdminUrl)("admin.php?page=jetpack-social")}function c(e){return`${s()?.assets_url??""}assets/${e}`}},82772(e,t,n){"use strict";function r(e){if(!e||"object"!=typeof e)return!1;const t="code"in e&&"string"==typeof e.code,n="errors"in e&&Array.isArray(e.errors)&&e.errors.length>0;return t||n}n.d(t,{C:()=>r})},51604(e,t,n){"use strict";function r(e){return e&&"shares"in e&&e.done&&e.shares.sort((e,t)=>t.timestamp-e.timestamp),e}function i(e){return t=>t.service_name===e.service&&(e.external_id?t.external_id===e.external_id:t.connection_id===e.connection_id.toString())}function s(e,t){return e.service===t.service&&(e.connection_id===t.connection_id||!(!e.external_id&&!t.external_id)&&e.external_id===t.external_id)}n.d(t,{Ri:()=>s,eJ:()=>i,xA:()=>r})},42753(e,t,n){"use strict";n.d(t,{D:()=>s});var r=n(47143),i=n(43656);function s(){return(0,r.useSelect)(e=>"jetpack-social-note"===e(i.store).getCurrentPostType(),[])}},77571(e,t,n){"use strict";n.d(t,{Oc:()=>s});var r=n(39987),i=n(15132);function s(){const{enabledConnections:e}=(0,i.A)();return function(e=[]){const t=e.map(e=>r.mB[e]?.charLimit).filter(e=>void 0!==e);return t.length>0?Math.min(...t):255}(e.map(e=>e.service_name))}},21147(e,t,n){"use strict";function r(e,t){return Array(t+1).join(e)}n.d(t,{A:()=>M});var i=["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,i)}var o=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function a(e){return l(e,o)}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 f(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 h(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(m(i,t,n))return i}}function m(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 g(e){var t=e.nextSibling||e.parentNode;return e.parentNode.removeChild(e),t}function v(e,t,n){return e&&e.parentNode===t||n(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,n){return n.br+"\n"}},d.heading={filter:["h1","h2","h3","h4","h5","h6"Line truncated
|
||||
(0,s.__)("Unknown status for %1$s","jetpack-publicize-pkg"),n.name)};function v({filter:e,view:t,onChangeView:n}){const r=e.operators?.map(e=>({value:e,label:(0,d.bx)(e)?.label||e})),o=t.filters?.find(t=>t.field===e.field),a=o?.operator||e.operators[0];return r.length>1&&(0,f.jsxs)(c.B,{direction:"row",gap:"sm",justify:"flex-start",className:"dataviews-filters__summary-operators-container",align:"center",children:[(0,f.jsx)(i.FlexItem,{className:"dataviews-filters__summary-operators-filter-name",children:e.name}),(0,f.jsx)(i.SelectControl,{className:"dataviews-filters__summary-operators-filter-select",label:(0,s.__)("Conditions","jetpack-publicize-pkg"),value:a,options:r,onChange:r=>{const i=r,s=o?.operator,a=o?[...(t.filters??[]).map(t=>{if(t.field===e.field){const e=(0,d.bx)(s)?.selection,n=(0,d.bx)(i)?.selection,r=e!==n||[e,n].includes("custom");return{...t,value:r?void 0:t.value,operator:i}}return t})]:[...t.filters??[],{field:e.field,operator:i,value:void 0}];n({...t,page:1,filters:a})},size:"small",variant:"minimal",hideLabelFromVision:!0})]})}function b({addFilterRef:e,openedFilter:t,fields:n,...d}){const b=(0,o.useRef)(null),{filter:w,view:x,onChangeView:_}=d,y=x.filters?.find(e=>e.field===w.field);let k=[];const j=(0,o.useMemo)(()=>{const e=n.find(e=>e.id===w.field);return e?{...e,getValue:({item:t})=>t[e.id]}:e},[n,w.field]),{elements:C}=(0,p.A)({elements:w.elements,getElements:w.getElements});if(C.length>0)k=C.filter(e=>w.singleSelection?e.value===y?.value:y?.value?.includes(e.value));else if(Array.isArray(y?.value)){const e=y.value.map(e=>{const t=j?.getValueFormatted({item:{[j.id]:e},field:j});return t||String(e)});k=[{value:y.value,label:e}]}else if("object"==typeof y?.value)k=[{value:y.value,label:y.value}];else if(void 0!==y?.value){const e=void 0!==j?j.getValueFormatted({item:{[j.id]:y.value},field:j}):String(y.value);k=[{value:y.value,label:e}]}const A=w.isPrimary,S=y?.isLocked,E=!S&&void 0!==y?.value,N=!S&&(!A||E);return(0,f.jsx)(i.Dropdown,{defaultOpen:t===w.field,contentClassName:"dataviews-filters__summary-popover",popoverProps:{placement:"bottom-start",role:"dialog"},onClose:()=>{b.current?.focus()},renderToggle:({isOpen:t,onToggle:n})=>(0,f.jsxs)("div",{className:"dataviews-filters__summary-chip-container",children:[(0,f.jsx)(i.Tooltip,{text:(0,s.sprintf)(/* translators: 1: Filter name. */ /* translators: 1: Filter name. */
|
||||
(0,s.__)("Filter by: %1$s","jetpack-publicize-pkg"),w.name.toLowerCase()),placement:"top",children:(0,f.jsx)("div",{className:(0,r.A)("dataviews-filters__summary-chip",{"has-reset":N,"has-values":E,"is-not-clickable":S}),role:"button",tabIndex:S?-1:0,onClick:()=>{S||n()},onKeyDown:e=>{!S&&[h,m].includes(e.key)&&(n(),e.preventDefault())},"aria-disabled":S,"aria-pressed":t,"aria-expanded":t,ref:b,children:(0,f.jsx)(g,{activeElements:k,filterInView:y,filter:w})})}),N&&(0,f.jsx)(i.Tooltip,{text:A?(0,s.__)("Reset","jetpack-publicize-pkg"):(0,s.__)("Remove","jetpack-publicize-pkg"),placement:"top",children:(0,f.jsx)("button",{className:(0,r.A)("dataviews-filters__summary-chip-remove",{"has-values":E}),onClick:()=>{_({...x,page:1,filters:x.filters?.filter(e=>e.field!==w.field)}),A?b.current?.focus():e.current?.focus()},children:(0,f.jsx)(i.Icon,{icon:a.A})})})]}),renderContent:()=>(0,f.jsxs)(c.B,{direction:"column",justify:"flex-start",children:[(0,f.jsx)(v,{...d}),d.filter.hasElements?(0,f.jsx)(l.A,{...d,filter:{...d.filter,elements:C}}):(0,f.jsx)(u.A,{...d,fields:n})]})})}},40497(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(86087),i=n(62427),s=n(15670),o=n(10790);var a=function(e){const{isShowingFilter:t}=(0,r.useContext)(i.A);return t?(0,o.jsx)(s.A,{...e}):null}},15670(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(86087),i=n(98839),s=n(24463),o=n(17381),a=n(56496),c=n(17580),l=n(62427),u=n(10790);var d=(0,r.memo)(function({className:e}){const{fields:t,view:n,onChangeView:d,openedFilter:p,setOpenedFilter:f}=(0,r.useContext)(l.A),h=(0,r.useRef)(null),m=(0,c.A)(t,n),g=(0,u.jsx)(o.A,{filters:m,view:n,onChangeView:d,ref:h,setOpenedFilter:f},"add-filter"),v=m.filter(e=>e.isVisible);if(0===v.length)return null;const b=[...v.map(e=>(0,u.jsx)(s.A,{filter:e,view:n,fields:t,onChangeView:d,addFilterRef:h,openedFilter:p},e.field)),g];return b.push((0,u.jsx)(a.A,{filters:m,view:n,onChangeView:d},"reset-filters")),(0,u.jsx)(i.B,{direction:"row",justify:"flex-start",gap:"sm",style:{width:"fit-content"},wrap:"wrap",className:e,children:b})})},78264(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(64168),i=n(29491),s=n(86087),o=n(56427),a=n(68416),c=n(10790);function l({filter:e,view:t,onChangeView:n,fields:l}){const u=t.filters?.find(t=>t.field===e.field),d=(0,a.L)(e,u),p=(0,s.useMemo)(()=>{const t=l.find(t=>t.id===e.field);return t?{...t,isValid:{},isDisabled:()=>!1,isVisible:()=>!0,getValue:({item:e})=>e[t.id],setValue:({value:e})=>({[t.id]:e})}:t},[l,e.field]),f=(0,s.useMemo)(()=>(t.filters??[]).reduce((e,t)=>(e[t.field]=t.value,e),{}),[t.filters]),h=(0,i.useEvent)(i=>{if(!p||!u)return;const s=p.getValue({item:i});r(s,d)||n({...t,filters:(t.filters??[]).map(t=>t.field===e.field?{...t,operator:u.operator||e.operators[0],value:""===s?void 0:s}:t)})});return p&&p.Edit&&u?(0,c.jsx)(o.Flex,{className:"dataviews-filters__user-input-widget",gap:2.5,direction:"column",children:(0,c.jsx)(p.Edit,{hideLabelFromVision:!0,data:f,field:p,operator:u.operator,onChange:h})}):null}},56496(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),i=n(27723),s=n(10790);function o({filters:e,view:t,onChangeView:n}){const o=!t.search&&!t.filters?.some(t=>{return!(t.isLocked||void 0===t.value&&(n=t.field,e.some(e=>e.field===n&&e.isPrimary)));var n});return(0,s.jsx)(r.Button,{disabled:o,accessibleWhenDisabled:!0,size:"compact",variant:"tertiary",className:"dataviews-filters__reset-button",onClick:()=>{n({...t,page:1,search:"",filters:t.filters?.filter(e=>!!e.isLocked)||[]})},children:(0,i.__)("Reset","jetpack-publicize-pkg")})}},33818(e,t,n){"use strict";n.d(t,{A:()=>E});var r=n(85370),i=n(39448),s=n(51216),o=n(63541),a=n(867),c=n(9962),l=n(44775),u=n(13022),d=n(29491),p=n(27723),f=n(86087),h=n(56427),m=n(88901),g=n(20907),v=n(16064),b=n(68416),w=n(32869),x=n(10790);function _(e=""){return l(e.trim().toLowerCase())}var y=(e,t,n)=>e.singleSelection?n:Array.isArray(t?.value)?t.value.includes(n)?t.value.filter(e=>e!==n):[...t.value,n]:[n];function k(e,t){return`${e}-${t}`}var j=({selected:e})=>(0,x.jsx)("span",{className:(0,u.A)("dataviews-filters__search-widget-listitem-multi-selection",{"is-selected":e}),children:e&&(0,x.jsx)(h.Icon,{icon:m.A})}),C=({selected:e})=>(0,x.jsx)("span",{className:(0,u.A)("dataviews-filters__search-widget-listitem-single-selection",{"is-selected":e})});function A({view:e,filter:t,onChangeView:n}){const r=(0,d.useInstanceId)(A,"dataviews-filter-list-box"),[i,s]=(0,f.useState)(1===t.operators?.length?void 0:null),o=e.filters?.find(e=>e.field===t.field),a=(0,b.L)(t,o);return(0,x.jsx)(h.Composite,{virtualFocus:!0,focusLoop:!0,activeId:i,setActiveId:s,role:"listbox",className:"dataviews-filters__search-widget-listbox","aria-label":(0,p.sprintf)(/* translators: List of items for a filter. 1: Filter name. e.g.: "List of: Author". */ /* translators: List of items for a filter. 1: Filter name. e.g.: "List of: Author". */
|
||||
(0,p.__)("List of: %1$s","jetpack-publicize-pkg"),t.name),onFocusVisible:()=>{!i&&t.elements.length&&s(k(r,t.elements[0].value))},render:(0,x.jsx)(h.Composite.Typeahead,{}),children:t.elements.map(i=>(0,x.jsxs)(h.Composite.Hover,{render:(0,x.jsx)(h.Composite.Item,{id:k(r,i.value),render:(0,x.jsx)("div",{"aria-label":i.label,role:"option",className:"dataviews-filters__search-widget-listitem"}),onClick:()=>{const r=o?[...(e.filters??[]).map(e=>e.field===t.field?{...e,operator:o.operator||t.operators[0],value:y(t,o,i.value)}:e)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:y(t,o,i.value)}];n({...e,page:1,filters:r})}}),children:[t.singleSelection&&(0,x.jsx)(C,{selected:a===i.value}),!t.singleSelection&&(0,x.jsx)(j,{selected:a.includes(i.value)}),(0,x.jsx)("span",{className:"dataviews-filters__search-widget-listitem-value",title:i.label,children:i.label})]},i.value))})}function S({view:e,filter:t,onChangeView:n}){const[l,u]=(0,f.useState)(""),d=(0,f.useDeferredValue)(l),m=e.filters?.find(e=>e.field===t.field),w=(0,b.L)(t,m),y=(0,f.useMemo)(()=>{const e=_(d);return t.elements.filter(t=>_(t.label).includes(e))},[t.elements,d]);return(0,x.jsxs)(c.v,{selectedValue:w,setSelectedValue:r=>{const i=m?[...(e.filters??[]).map(e=>e.field===t.field?{...e,operator:m.operator||t.operators[0],value:r}:e)]:[...e.filters??[],{field:t.field,operator:t.operators[0],value:r}];n({...e,page:1,filters:i})},setValue:u,children:[(0,x.jsxs)("div",{className:"dataviews-filters__search-widget-filter-combobox__wrapper",children:[(0,x.jsx)(v.s,{render:(0,x.jsx)(o.u,{}),children:(0,p.__)("Search items","jetpack-publicize-pkg")}),(0,x.jsx)(r.G,{autoSelect:"always",placeholder:(0,p.__)("Search","jetpack-publicize-pkg"),className:"dataviews-filters__search-widget-filter-combobox__input"}),(0,x.jsx)("div",{className:"dataviews-filters__search-widget-filter-combobox__icon",children:(0,x.jsx)(h.Icon,{icon:g.A})})]}),(0,x.jsxs)(a.e,{className:"dataviews-filters__search-widget-filter-combobox-list",alwaysVisible:!0,children:[y.map(e=>(0,x.jsxs)(i.x,{resetValueOnSelect:!1,value:e.value,className:"dataviews-filters__search-widget-listitem",hideOnClick:!1,setValueOnClick:!1,focusOnHover:!0,children:[t.singleSelection&&(0,x.jsx)(C,{selected:w===e.value}),!t.singleSelection&&(0,x.jsx)(j,{selected:w.includes(e.value)}),(0,x.jsxs)("span",{className:"dataviews-filters__search-widget-listitem-value",title:e.label,children:[(0,x.jsx)(s.K,{className:"dataviews-filters__search-widget-filter-combobox-item-value",value:e.label}),!!e.description&&(0,x.jsx)("span",{className:"dataviews-filters__search-widget-listitem-description",children:e.description})]})]},e.value)),!y.length&&(0,x.jsx)("p",{children:(0,p.__)("No results found","jetpack-publicize-pkg")})]})]})}function E(e){const{elements:t,isLoading:n}=(0,w.A)({elements:e.filter.elements,getElements:e.filter.getElements});if(n)return(0,x.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,x.jsx)(h.Spinner,{})});if(0===t.length)return(0,x.jsx)("div",{className:"dataviews-filters__search-widget-no-elements",children:(0,p.__)("No elements found","jetpack-publicize-pkg")});const r=t.length>10?S:A;return(0,x.jsx)(r,{...e,filter:{...e.filter,elements:t}})}},40333(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(86087),i=n(56427),s=n(63371),o=n(27723),a=n(17381),c=n(62427),l=n(10790);function u({buttonRef:e,filtersCount:t,children:n}){return(0,r.useEffect)(()=>()=>{e.current?.focus()},[e]),(0,l.jsxs)(l.Fragment,{children:[n,!!t&&(0,l.jsx)("span",{className:"dataviews-filters-toggle__count",children:t})]})}var d=function(){const{filters:e,view:t,onChangeView:n,setOpenedFilter:d,isShowingFilter:p,setIsShowingFilter:f}=(0,r.useContext)(c.A),h=(0,r.useRef)(null),m=(0,r.useCallback)(e=>{n(e),f(!0)},[n,f]);if(0===e.length)return null;const g=e.some(e=>e.isVisible),v={label:(0,o.__)("Add filter","jetpack-publicize-pkg"),"aria-expanded":!1,isPressed:!1},b={label:(0,o._x)("Filter","verb","jetpack-publicize-pkg"),"aria-expanded":p,isPressed:p,onClick:()=>{p||d(null),f(!p)}},w=e.some(e=>e.isPrimary||e.isLocked),x=(0,l.jsx)(i.Button,{ref:h,className:"dataviews-filters__visibility-toggle",size:"compact",icon:s.A,disabled:w,accessibleWhenDisabled:!0,...g?b:v});return(0,l.jsx)("div",{className:"dataviews-filters__container-visibility-toggle",children:g?(0,l.jsx)(u,{buttonRef:h,filtersCount:t.filters?.length,children:x}):(0,l.jsx)(a.L,{filters:e,view:t,onChangeView:m,setOpenedFilter:d,triggerProps:{render:x}})})}},17580(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(86087),i=n(71e3);var s=function(e,t){return(0,r.useMemo)(()=>{const n=[];return e.forEach(e=>{if(!1===e.filterBy||!e.hasElements&&!e.Edit)return;const r=e.filterBy.operators,s=!!e.filterBy?.isPrimary,o=t.filters?.some(t=>t.field===e.id&&!!t.isLocked)??!1;n.push({field:e.id,name:e.label,elements:e.elements,getElements:e.getElements,hasElements:e.hasElements,singleSelection:r.some(e=>(0,i.LX)(e)),operators:r,isVisible:o||s||!!t.filtLine truncated
|
||||
// translators: %s: The label of the field e.g. "Status".
|
||||
// translators: %s: The label of the field e.g. "Status".
|
||||
(0,r.sprintf)((0,r.__)("%s: <groupName />","jetpack-publicize-pkg"),n.label).trim(),{groupName:(0,o.jsx)(n.render,{item:t[0],field:n})}):(0,o.jsx)(n.render,{item:t[0],field:n});return(0,o.jsxs)(s.B,{direction:"column",className:"dataviews-view-activity__group",children:[(0,o.jsx)("h3",{className:"dataviews-view-activity__group-header",children:l}),c]},e)}},19890(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(13022),i=n(86087),s=n(47143),o=n(29491),a=n(98839),c=n(16064),l=n(87895),u=n(62427),d=n(75411),p=n(10790);var f=function(e){const{view:t,actions:n,item:f,titleField:h,mediaField:m,descriptionField:g,otherFields:v,posinset:b,onClickItem:w,renderItemLink:x,isItemClickable:_}=e,{showTitle:y=!0,showMedia:k=!0,showDescription:j=!0,infiniteScrollEnabled:C}=t,A=(0,i.useRef)(null),S=(0,s.useRegistry)(),{paginationInfo:E}=(0,i.useContext)(u.A),{primaryActions:N,eligibleActions:z}=(0,i.useMemo)(()=>{const e=n.filter(e=>!e.isEligible||e.isEligible(f));return{primaryActions:e.filter(e=>e.isPrimary),eligibleActions:e}},[n,f]),I=(0,o.useViewportMatch)("medium","<"),T=t.layout?.density??"balanced",M=k&&"compact"!==T&&m?.render?(0,p.jsx)(m.render,{item:f,field:m,config:{sizes:"comfortable"===T?"32px":"24px"}}):null,D=(0,p.jsx)("div",{className:"dataviews-view-activity__item-type-icon",children:M||(0,p.jsx)("span",{className:"dataviews-view-activity__item-bullet","aria-hidden":"true"})}),R=y&&h?.render?(0,p.jsx)(h.render,{item:f,field:h}):null,P=(0,i.useMemo)(()=>"comfortable"===T?"md":"sm",[T]);return(0,p.jsx)("div",{ref:A,role:C?"article":void 0,"aria-posinset":b,"aria-setsize":C?E.totalItems:void 0,className:(0,r.A)("dataviews-view-activity__item","compact"===T&&"is-compact","balanced"===T&&"is-balanced","comfortable"===T&&"is-comfortable"),children:(0,p.jsxs)(a.B,{direction:"row",gap:"lg",justify:"start",align:"flex-start",children:[(0,p.jsx)(a.B,{direction:"column",gap:"xs",align:"center",className:"dataviews-view-activity__item-type",children:D}),(0,p.jsxs)(a.B,{direction:"column",gap:P,align:"flex-start",className:"dataviews-view-activity__item-content",children:[R&&(0,p.jsx)(d.V,{item:f,isItemClickable:_,onClickItem:w,renderItemLink:x,className:"dataviews-view-activity__item-title",children:R}),j&&g&&(0,p.jsx)("div",{className:"dataviews-view-activity__item-description",children:(0,p.jsx)(g.render,{item:f,field:g})}),(0,p.jsx)("div",{className:"dataviews-view-activity__item-fields",children:v.map(e=>(0,p.jsxs)("div",{className:"dataviews-view-activity__item-field",children:[(0,p.jsx)(c.s,{className:"dataviews-view-activity__item-field-label",render:(0,p.jsx)("span",{}),children:e.label}),(0,p.jsx)("span",{className:"dataviews-view-activity__item-field-value",children:(0,p.jsx)(e.render,{item:f,field:e})})]},e.id))}),!!N?.length&&(0,p.jsx)(l.UV,{item:f,actions:N,registry:S,buttonVariant:"secondary"})]}),(N.length<z.length||I&&z.length>0)&&(0,p.jsx)("div",{className:"dataviews-view-activity__item-actions",children:(0,p.jsx)(l.Ay,{item:f,actions:z,isCompact:!0})})]})})}},25065(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(19890),i=n(51609);function s(e){return!!e}function o(e){const{data:t,fields:n,getItemId:o,view:a}=e,c=n.find(e=>e.id===a.titleField),l=n.find(e=>e.id===a.mediaField),u=n.find(e=>e.id===a.descriptionField),d=(a?.fields??[]).map(e=>n.find(t=>e===t.id)).filter(s);return t.map((t,n)=>(0,i.createElement)(r.A,{...e,key:o(t),item:t,mediaField:l,titleField:c,descriptionField:u,otherFields:d,posinset:a.infiniteScrollEnabled?n+1:void 0}))}},78935(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(13022),i=n(56427),s=n(98839),o=n(29494),a=n(56400),c=n(25065),l=n(29183),u=n(10790);function d(e){const{empty:t,data:n,fields:d,isLoading:p,view:f,className:h}=e,m=(0,l.o)(!!p),g=!!n?.length,v=f.groupBy?.field?d.find(e=>e.id===f.groupBy?.field):null,b=g&&v?(0,o.A)(n,v):null,w=f.infiniteScrollEnabled&&!b;if(!g)return(0,u.jsx)("div",{className:(0,r.A)("dataviews-no-results",{"is-refreshing":m}),children:t});const x=!w&&!!p,_=(0,r.A)("dataviews-view-activity",h,{"is-refreshing":!w&&m}),y=b?Array.from(b.entries()):[];return g&&v&&b?(0,u.jsx)(s.B,{direction:"column",gap:"sm",className:_,inert:x?"true":void 0,children:y.map(([t,n])=>(0,u.jsx)(a.A,{groupName:t,groupData:n,groupField:v,showLabel:!1!==f.groupBy?.showLabel,children:(0,u.jsx)(c.A,{...e,data:n})},t))}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:_,role:f.infiniteScrollEnabled?"feed":void 0,inert:x?"true":void 0,children:(0,u.jsx)(c.A,{...e})}),w&&p&&(0,u.jsx)("p",{className:"dataviews-loading-more",children:(0,u.jsx)(i.Spinner,{})})]})}},20478(e,t,n){"use strict";n.d(t,{A:()=>k});var r=n(13022),i=n(56427),s=n(98839),o=n(27723),a=n(29491),c=n(48558),l=n(86087),u=n(80115),d=n(87895),p=n(31020),f=n(62427),h=n(51638),m=n(75411),g=n(48069),v=n(73388),b=n(86937),w=n(10790),{Badge:x}=(0,u.T)(i.privateApis);function _(e,t){const n=[];for(let r=0,i=e.length;r<i;r+=t)n.push(e.slice(r,r+t));return n}var y=(0,l.forwardRef)(function e({view:t,selection:n,onChangeSeLine truncated
|
||||
(0,o.__)("Row %d","jetpack-publicize-pkg"),t+1),className:"dataviews-view-grid__row",style:{gridTemplateColumns:`repeat( ${N}, minmax(0, 1fr) )`}}),children:e.map(e=>{const t=C(e);return(0,w.jsx)(i.Composite.Item,{render:n=>(0,w.jsx)(y,{...n,id:t,role:"gridcell",view:u,selection:p,onChangeSelection:m,onClickItem:x,isItemClickable:k,renderItemLink:j,getItemId:C,item:e,actions:A,mediaField:T,titleField:I,descriptionField:M,regularFields:R,badgeFields:P,hasBulkActions:z,config:{sizes:F}})},t)})},t))})]})}},78936(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(13022),i=n(56427),s=n(27723),o=n(98839),a=n(29494),c=n(20478),l=n(29183),u=n(10790);var d=function({actions:e,data:t,fields:n,getItemId:d,isLoading:p,onChangeSelection:f,onClickItem:h,isItemClickable:m,renderItemLink:g,selection:v,view:b,className:w,empty:x}){const _=(0,l.o)(!!p),y=!!t?.length,k=b.groupBy?.field?n.find(e=>e.id===b.groupBy?.field):null,j=k?(0,a.A)(t,k):null,C=b.infiniteScrollEnabled&&!j;if(!y)return(0,u.jsx)("div",{className:(0,r.A)("dataviews-no-results",{"is-refreshing":_}),children:x});const A={className:(0,r.A)(w,{"is-refreshing":!C&&_}),inert:!C&&p?"true":void 0,isLoading:p,view:b,fields:n,selection:v,onChangeSelection:f,onClickItem:h,isItemClickable:m,renderItemLink:g,getItemId:d,actions:e};return(0,u.jsxs)(u.Fragment,{children:[y&&k&&j&&(0,u.jsx)(o.B,{direction:"column",gap:"lg",children:Array.from(j.entries()).map(([e,t])=>(0,u.jsxs)(o.B,{direction:"column",gap:"sm",children:[(0,u.jsx)("h3",{className:"dataviews-view-grid__group-header",children:!1===b.groupBy?.showLabel?e:(0,s.sprintf)(
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,s.__)("%1$s: %2$s","jetpack-publicize-pkg"),k.label,e)}),(0,u.jsx)(c.A,{...A,data:t,isInfiniteScroll:!1})]},e))}),!j&&(0,u.jsx)(c.A,{...A,data:t,isInfiniteScroll:!!C}),C&&p&&(0,u.jsx)("p",{className:"dataviews-loading-more",children:(0,u.jsx)(i.Spinner,{})})]})}},48069(e,t,n){"use strict";n.d(t,{Z:()=>a});n(56427),n(27723);var r=n(86087),i=n(62427),s=(n(10790),[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}]),o=s[2].value;function a(){const e=(0,r.useContext)(i.A),t=e.view;return(0,r.useMemo)(()=>{const n=e.containerWidth,r=t.layout?.previewSize??o,i=Math.floor((n+32)/(r+32));return Math.max(1,i)},[e.containerWidth,t.layout?.previewSize])}},73123(e,t,n){"use strict";n.d(t,{A:()=>b});var r=n(27723),i=n(55565),s=n(40599),o=n(77174),a=n(40743),c=n(55620),l=n(78774),u=n(78936),d=n(45704),p=n(78935),f=n(39881),h=n(65581),m=n(66310),g=n(6660),v=n(44491),b=[{type:m.Ad,label:(0,r.__)("Table","jetpack-publicize-pkg"),component:l.A,icon:i.A,viewConfigOptions:g.A},{type:m.Ul,label:(0,r.__)("Grid","jetpack-publicize-pkg"),component:u.A,icon:s.A,viewConfigOptions:v.A},{type:m.mA,label:(0,r.__)("List","jetpack-publicize-pkg"),component:d.A,icon:(0,r.isRTL)()?o.A:a.A,viewConfigOptions:g.A},{type:m.br,label:(0,r.__)("Activity","jetpack-publicize-pkg"),component:p.A,icon:c.A,viewConfigOptions:g.A},{type:m.dL,label:(0,r.__)("Grid","jetpack-publicize-pkg"),component:f.A,icon:s.A,viewConfigOptions:v.A,isPicker:!0},{type:m.Ry,label:(0,r.__)("Table","jetpack-publicize-pkg"),component:h.A,icon:i.A,viewConfigOptions:g.A,isPicker:!0}]},45704(e,t,n){"use strict";n.d(t,{A:()=>j});var r=n(13022),i=n(29491),s=n(56427),o=n(86087),a=n(27723),c=n(57855),l=n(47143),u=n(98839),d=n(16064),p=n(80115),f=n(87895),h=n(62427),m=n(29183),g=n(29494),v=n(10790),{Menu:b}=(0,p.T)(s.privateApis);function w(e){return`${e}-item-wrapper`}function x(e){return`${e}-dropdown`}function _({idPrefix:e,primaryAction:t,item:n}){const r=(0,l.useRegistry)(),[i,a]=(0,o.useState)(!1),c=function(e,t){return`${e}-primary-action-${t}`}(e,t.id),u="string"==typeof t.label?t.label:t.label([n]);return"RenderModal"in t?(0,v.jsx)("div",{role:"gridcell",children:(0,v.jsx)(s.Composite.Item,{id:c,render:(0,v.jsx)(s.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,text:u,size:"small",onClick:()=>a(!0)}),children:i&&(0,v.jsx)(f.cX,{action:t,items:[n],closeModal:()=>a(!1)})})},t.id):(0,v.jsx)("div",{role:"gridcell",children:(0,v.jsx)(s.Composite.Item,{id:c,render:(0,v.jsx)(s.Button,{disabled:!!t.disabled,accessibleWhenDisabled:!0,size:"small",onClick:()=>{t.callback([n],{registry:r})},children:u})})},t.id)}function y({view:e,actions:t,idPrefix:n,isSelected:i,item:p,titleField:m,mediaField:g,descriptionField:y,onSelect:k,otherFields:j,onDropdownTriggerKeyDown:C,posinset:A}){const{showTitle:S=!0,showMedia:E=!0,showDescription:N=!0,infiniteScrollEnabled:z}=e,I=(0,o.useRef)(null),T=`${n}-label`,M=`${n}-description`,D=(0,l.useRegistry)(),[R,P]=(0,o.useState)(!1),[F,L]=(0,o.useState)(null),O=({type:e})=>{P("mouseenter"===e)},{paginationInfo:B}=(0,o.useContext)(h.A);(0,o.useEffect)(()=>{i&&I.current?.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"})},[i]);const{primaryAction:V,eligibleActions:q}=(0,o.useMemo)(()=>{const e=t.filter(e=>!e.isEligible||e.isEligible(p));return{primaryAction:e.filter(e=>e.isPrimary)[0],eligibleActions:e}},[t,p]),U=V&&1===t.length,H=E&&g?.render?(0,v.jsx)("div",{className:"dataviews-view-list__media-wrapper",children:(0,v.jsx)(g.render,{item:p,field:g,config:{sizes:"52px"}})}):null,$=S&&m?.render?(0,v.jsx)(m.render,{item:p,field:m}):null,W=N&&y?.render,G=!!H&&!W&&!j.length,Z=q?.length>0&&(0,v.jsxs)(u.B,{direction:"row",gap:"md",className:"dataviews-view-list__item-actions",children:[V&&(0,v.jsx)(_,{idPrefix:n,primaryAction:V,item:p}),!U&&(0,v.jsxs)("div",{role:"gridcell",children:[(0,v.jsxs)(b,{placement:"bottom-end",children:[(0,v.jsx)(b.TriggerButton,{render:(0,v.jsx)(s.Composite.Item,{id:x(n),render:(0,v.jsx)(s.Button,{size:"small",icon:c.A,label:(0,a.__)("Actions","jetpack-publicize-pkg"),accessibleWhenDisabled:!0,disabled:!t.length,onKeyDown:C})})}),(0,v.jsx)(b.Popover,{children:(0,v.jsx)(f.oK,{actions:q,item:p,registry:D,setActiveModalAction:L})})]}),!!F&&(0,v.jsx)(f.cX,{action:F,items:[p],closeModal:()=>L(null)})]})]});return(0,v.jsx)(s.Composite.Row,{ref:I,render:(0,v.jsx)("div",{"aria-posinset":A,"aria-setsize":z?B.totalItems:void 0}),role:z?"article":"row",className:(0,r.A)({"is-selected":i,"is-hovered":R}),onMouseEnter:O,onMouseLeave:O,children:(0,v.jsxs)(u.B,{direction:"row",className:"dataviews-view-list__item-wrapper",children:[(0,v.jsx)("div",{role:"gridcell",children:(0,v.jsx)(s.Composite.Item,{id:w(n),"aria-pressed":i,"aria-labelledby":T,"aria-describedby":M,className:"dataviews-view-list__item",onClick:()=>k(p)})}),(0,v.jsxs)(u.B,{direction:"row",gap:"md",justify:"start",align:G?"center":"flex-start",style:{Line truncated
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,a.__)("%1$s: %2$s","jetpack-publicize-pkg"),H.label,e)}),n.map(e=>{const n=M(e);return(0,v.jsx)(y,{view:h,idPrefix:n,actions:t,item:e,isSelected:e===S,onSelect:T,mediaField:N,titleField:E,descriptionField:z,otherFields:I,onDropdownTriggerKeyDown:q},n)})]},e))})}):(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(s.Composite,{ref:F,id:C,render:(0,v.jsx)("div",{}),className:(0,r.A)("dataviews-view-list",b,{[`has-${h.layout?.density}-density`]:h.layout?.density&&["compact","comfortable"].includes(h.layout.density),"is-refreshing":!W&&A}),role:h.infiniteScrollEnabled?"feed":"grid",activeId:R,setActiveId:P,inert:!W&&d?"true":void 0,children:n.map((e,n)=>{const r=M(e);return(0,v.jsx)(y,{view:h,idPrefix:r,actions:t,item:e,isSelected:e===S,onSelect:T,mediaField:N,titleField:E,descriptionField:z,otherFields:I,onDropdownTriggerKeyDown:q,posinset:h.infiniteScrollEnabled?n+1:void 0},r)})}),W&&d&&(0,v.jsx)("p",{className:"dataviews-loading-more",children:(0,v.jsx)(s.Spinner,{})})]}):(0,v.jsx)("div",{className:(0,r.A)("dataviews-no-results",{"is-refreshing":A}),children:_})}},39881(e,t,n){"use strict";n.d(t,{A:()=>_});var r=n(13022),i=n(56427),s=n(27723),o=n(29491),a=n(86087),c=n(98839),l=n(80115),u=n(31020),d=n(62427),p=n(14820),f=n(73388),h=n(29494),m=n(48069),g=n(86937),v=n(10790),{Badge:b}=(0,l.T)(i.privateApis);function w({view:e,multiselect:t,selection:n,onChangeSelection:o,getItemId:l,item:d,mediaField:p,titleField:f,descriptionField:h,regularFields:m,badgeFields:w,config:x,posinset:_,setsize:y}){const{showTitle:k=!0,showMedia:j=!0,showDescription:C=!0}=e,A=l(d),S=(0,a.useRef)(null),E=n.includes(A);(0,g.B)(S,_);const N=p?.render?(0,v.jsx)(p.render,{item:d,field:p,config:x}):null,z=k&&f?.render?(0,v.jsx)(f.render,{item:d,field:f}):null;return(0,v.jsxs)(i.Composite.Item,{ref:S,"aria-label":f?f.getValue({item:d})||(0,s.__)("(no title)","jetpack-publicize-pkg"):void 0,render:({children:e,...t})=>(0,v.jsx)(c.B,{direction:"column",children:e,...t}),role:"option","aria-posinset":_,"aria-setsize":y,className:(0,r.A)("dataviews-view-picker-grid__card",{"is-selected":E}),"aria-selected":E,onClick:()=>{if(E)o(n.filter(e=>A!==e));else{const e=t?[...n,A]:[A];o(e)}},children:[j&&N&&(0,v.jsx)("div",{className:"dataviews-view-picker-grid__media",children:N}),j&&N&&(0,v.jsx)(u.A,{item:d,selection:n,onChangeSelection:o,getItemId:l,titleField:f,disabled:!1,"aria-hidden":!0,tabIndex:-1}),k&&(0,v.jsx)(c.B,{direction:"row",justify:"space-between",className:"dataviews-view-picker-grid__title-actions",children:(0,v.jsx)("div",{className:"dataviews-view-picker-grid__title-field dataviews-title-field",children:z})}),(0,v.jsxs)(c.B,{direction:"column",gap:"xs",children:[C&&h?.render&&(0,v.jsx)(h.render,{item:d,field:h}),!!w?.length&&(0,v.jsx)(c.B,{direction:"row",className:"dataviews-view-picker-grid__badge-fields",gap:"sm",wrap:"wrap",align:"top",justify:"flex-start",children:w.map(e=>(0,v.jsx)(b,{className:"dataviews-view-picker-grid__field-value",children:(0,v.jsx)(e.render,{item:d,field:e})},e.id))}),!!m?.length&&(0,v.jsx)(c.B,{direction:"column",className:"dataviews-view-picker-grid__fields",gap:"xs",children:m.map(e=>(0,v.jsx)(i.Flex,{className:"dataviews-view-picker-grid__field",gap:1,justify:"flex-start",expanded:!0,style:{height:"auto"},direction:"row",children:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(i.FlexItem,{className:"dataviews-view-picker-grid__field-name",children:e.header}),(0,v.jsx)(i.FlexItem,{className:"dataviews-view-picker-grid__field-value",style:{maxHeight:"none"},children:(0,v.jsx)(e.render,{item:d,field:e})})]})},e.id))})]})]},A)}function x({groupName:e,groupField:t,showLabel:n=!0,children:r}){const i=(0,o.useInstanceId)(x,"dataviews-view-picker-grid-group__header");return(0,v.jsxs)(c.B,{direction:"column",gap:"sm",role:"group","aria-labelledby":i,children:[(0,v.jsx)("h3",{className:"dataviews-view-picker-grid-group__header",id:i,children:n?(0,s.sprintf)(
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,s.__)("%1$s: %2$s","jetpack-publicize-pkg"),t.label,e):e}),r]},e)}var _=function({actions:e,data:t,fields:n,getItemId:s,isLoading:o,onChangeSelection:l,selection:u,view:b,className:_,empty:y}){const{resizeObserverRef:k,paginationInfo:j,itemListLabel:C}=(0,a.useContext)(d.A),A=n.find(e=>e.id===b?.titleField),S=n.find(e=>e.id===b?.mediaField),E=n.find(e=>e.id===b?.descriptionField),N=b.fields??[],{regularFields:z,badgeFields:I}=N.reduce((e,t)=>{const r=n.find(e=>e.id===t);if(!r)return e;return e[b.layout?.badgeFields?.includes(t)?"badgeFields":"regularFields"].push(r),e},{regularFields:[],badgeFields:[]}),T=!!t?.length,M=b.layout?.previewSize,D=(0,p.T)(e),R="900px",P=b.groupBy?.field?n.find(e=>e.id===b.groupBy?.field):null,F=P?(0,h.A)(t,P):null,L=(b.infiniteScrollEnabled&&!F)??!1,O=b?.page??1,B=b?.perPage??0,V=L?j?.totalItems:void 0,q=(0,m.Z)(),U=(0,g.N)(t,L,q);return(0,v.jsxs)(v.Fragment,{children:[T&&P&&F&&(0,v.jsx)(i.Composite,{virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":D,className:(0,r.A)("dataviews-view-picker-grid",_,{[`has-${b.layout?.density}-density`]:b.layout?.density&&["compact","comfortable"].includes(b.layout.density)}),"aria-label":C,render:({children:e,...t})=>(0,v.jsx)(c.B,{direction:"column",gap:"lg",children:e,...t}),children:Array.from(F.entries()).map(([e,n])=>(0,v.jsx)(x,{groupName:e,groupField:P,showLabel:!1!==b.groupBy?.showLabel,children:(0,v.jsx)(f.L,{previewSize:M,style:{gridTemplateColumns:M&&`repeat(auto-fill, minmax(${M}px, 1fr))`},"aria-busy":o,ref:k,children:n.map(e=>{const n=e.position??(O-1)*B+t.indexOf(e)+1;return(0,v.jsx)(w,{view:b,multiselect:D,selection:u,onChangeSelection:l,getItemId:s,item:e,mediaField:S,titleField:A,descriptionField:E,regularFields:z,badgeFields:I,config:{sizes:R},posinset:n,setsize:V},s(e))})})},e))}),T&&!F&&(0,v.jsxs)(i.Composite,{render:(0,v.jsx)(f.L,{className:(0,r.A)("dataviews-view-picker-grid",_,{[`has-${b.layout?.density}-density`]:b.layout?.density&&["compact","comfortable"].includes(b.layout.density)}),previewSize:M,"aria-busy":o,ref:k}),virtualFocus:!0,orientation:"horizontal",role:"listbox","aria-multiselectable":D,"aria-label":C,children:[Array.from({length:U}).map((e,t)=>(0,v.jsx)(i.Composite.Item,{render:({children:e,...t})=>(0,v.jsx)(c.B,{direction:"column",children:e,...t}),role:"option","aria-hidden":!0,tabIndex:-1,className:"dataviews-view-picker-grid__card dataviews-view-picker-grid__placeholder"},`placeholder-${t}`)),t.map(e=>{const t=e.position;return(0,v.jsx)(w,{view:b,multiselect:D,selection:u,onChangeSelection:l,getItemId:s,item:e,mediaField:S,titleField:A,descriptionField:E,regularFields:z,badgeFields:I,config:{sizes:R},posinset:t,setsize:V},s(e))})]}),!T&&(0,v.jsx)("div",{className:(0,r.A)({"dataviews-loading":o,"dataviews-no-results":!o}),children:o?(0,v.jsx)("p",{children:(0,v.jsx)(i.Spinner,{})}):y}),T&&o&&(0,v.jsx)("p",{className:"dataviews-loading-more",children:(0,v.jsx)(i.Spinner,{})})]})}},65581(e,t,n){"use strict";n.d(t,{A:()=>w});var r=n(13022),i=n(27723),s=n(56427),o=n(86087),a=n(62427),c=n(31020),l=n(14820),u=n(51638),d=n(66310),p=n(9306),f=n(95753),h=n(29494),m=n(86937),g=n(10790);function v({item:e,fields:t,column:n,align:i}){const s=t.find(e=>e.id===n);if(!s)return null;const o=(0,r.A)("dataviews-view-table__cell-content-wrapper",{"dataviews-view-table__cell-align-end":"end"===i,"dataviews-view-table__cell-align-center":"center"===i});return(0,g.jsx)("div",{className:o,children:(0,g.jsx)(s.render,{item:e,field:s})})}function b({item:e,fields:t,id:n,view:i,titleField:l,mediaField:u,descriptionField:d,selection:p,getItemId:h,onChangeSelection:b,multiselect:w,posinset:x}){const{paginationInfo:_}=(0,o.useContext)(a.A),y=p.includes(n),[k,j]=(0,o.useState)(!1),C=(0,o.useRef)(null);(0,m.B)(C,x);const{showTitle:A=!0,showMedia:S=!0,showDescription:E=!0,infiniteScrollEnabled:N}=i,z=()=>{j(!0)},I=()=>{j(!1)},T=i.fields??[],M=l&&A||u&&S||d&&E;return(0,g.jsxs)(s.Composite.Item,{ref:C,render:({children:e,...t})=>(0,g.jsx)("tr",{className:(0,r.A)("dataviews-view-table__row",{"is-selected":y,"is-hovered":k}),onMouseEnter:z,onMouseLeave:I,children:e,...t}),"aria-selected":y,"aria-setsize":_.totalItems||void 0,"aria-posinset":x,role:N?"article":"option",onClick:()=>{if(y)b(p.filter(e=>n!==e));else{const e=w?[...p,n]:[n];b(e)}},children:[(0,g.jsx)("td",{className:"dataviews-view-table__checkbox-column",role:"presentation",children:(0,g.jsx)("div",{className:"dataviews-view-table__cell-content-wrapper",children:(0,g.jsx)(c.A,{item:e,selection:p,onChangeSelection:b,getItemId:h,titleField:l,disabled:!1,"aria-hidden":!0,tabIndex:-1})})}),M&&(0,g.jsx)("td",{role:"presentation",children:(0,g.jsx)(f.A,{item:e,titleField:A?l:void 0,mediaField:S?u:void 0,descriptionField:E?d:void 0,isItemClickable:()=>!1})}),T.map(n=>{const{width:r,maxWidth:s,minWidth:o,align:a}=i.layout?.styles?.[n]??{};return(0,g.jsx)("td",{style:{width:r,maxWidth:s,minWidth:o},role:"presentation",children:(0,g.jsx)(v,{fields:t,iteLine truncated
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,i.__)("%1$s: %2$s","jetpack-publicize-pkg"),E.label,e)})}),t.map((e,t)=>(0,g.jsx)(b,{item:e,fields:n,id:a(e)||t.toString(),view:x,titleField:D,mediaField:R,descriptionField:P,selection:v,getItemId:a,onChangeSelection:m,multiselect:S},a(e)))]},`group-${e}`)):(0,g.jsx)(s.Composite,{render:(0,g.jsx)("tbody",{role:"presentation"}),virtualFocus:!0,orientation:"vertical",children:M&&t.map((e,t)=>{const r=a(e),i=e.position;return(0,g.jsx)(b,{item:e,fields:n,id:r||t.toString(),view:x,titleField:D,mediaField:R,descriptionField:P,selection:v,getItemId:a,onChangeSelection:m,multiselect:S,posinset:i},r)})})]}),(0,g.jsxs)("div",{className:(0,r.A)({"dataviews-loading":c,"dataviews-no-results":!M&&!c}),id:I,children:[!M&&(c?(0,g.jsx)("p",{children:(0,g.jsx)(s.Spinner,{})}):y),M&&c&&(0,g.jsx)("p",{className:"dataviews-loading-more",children:(0,g.jsx)(s.Spinner,{})})]})]})}},9306(e,t,n){"use strict";n.d(t,{A:()=>v});var r=n(27723),i=n(62344),s=n(98595),o=n(63371),a=n(28755),c=n(56427),l=n(86087),u=n(80115),d=n(66310),p=n(62427),f=n(41338),h=n(10790),{Menu:m}=(0,u.T)(c.privateApis);function g({children:e}){return l.Children.toArray(e).filter(Boolean).map((e,t)=>(0,h.jsxs)(l.Fragment,{children:[t>0&&(0,h.jsx)(m.Separator,{}),e]},t))}var v=(0,l.forwardRef)(function({fieldId:e,view:t,fields:n,onChangeView:u,onHide:v,setOpenedFilter:b,canMove:w=!0,canInsertLeft:x=!0,canInsertRight:_=!0},y){const k=t.fields??[],j=k?.indexOf(e),C=t.sort?.field===e;let A=!1,S=!1,E=!1,N=[];const z=n.find(t=>t.id===e),{setIsShowingFilter:I}=(0,l.useContext)(p.A);if(!z)return null;A=!1!==z.enableHiding,S=!1!==z.enableSorting;const T=z.header;if(N=!!z.filterBy&&z.filterBy?.operators||[],E=!(t.filters?.some(t=>e===t.field)||!z.hasElements&&!z.Edit||!1===z.filterBy||z.filterBy?.isPrimary),!(S||w||A||E))return T;const M=(0,f.A)(t,n).filter(e=>!k.includes(e.id)),D=(x||_)&&!!M.length,R=(0,r.isRTL)();return(0,h.jsxs)(m,{children:[(0,h.jsxs)(m.TriggerButton,{render:(0,h.jsx)(c.Button,{size:"compact",className:"dataviews-view-table-header-button",ref:y,variant:"tertiary"}),children:[T,t.sort&&C&&(0,h.jsx)("span",{"aria-hidden":"true",children:d.vI[t.sort.direction]})]}),(0,h.jsx)(m.Popover,{style:{minWidth:"240px"},children:(0,h.jsxs)(g,{children:[S&&(0,h.jsx)(m.Group,{children:d.GJ.map(n=>{const r=t.sort&&C&&t.sort.direction===n,i=`${e}-${n}`;return(0,h.jsx)(m.RadioItem,{name:"view-table-sorting",value:i,checked:r,onChange:()=>{u({...t,sort:{field:e,direction:n},showLevels:!1})},children:(0,h.jsx)(m.ItemLabel,{children:d.CL[n]})},i)})}),E&&(0,h.jsx)(m.Group,{children:(0,h.jsx)(m.Item,{prefix:(0,h.jsx)(c.Icon,{icon:o.A}),onClick:()=>{b(e),I(!0),u({...t,page:1,filters:[...t.filters||[],{field:e,value:void 0,operator:N[0]}]})},children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Add filter","jetpack-publicize-pkg")})})}),(w||A||D)&&z&&(0,h.jsxs)(m.Group,{children:[w&&(0,h.jsx)(m.Item,{prefix:(0,h.jsx)(c.Icon,{icon:i.A}),disabled:R?j>=k.length-1:j<1,onClick:()=>{const n=R?j+1:j-1,r=[...k];r.splice(j,1),r.splice(n,0,e),u({...t,fields:r})},children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Move left","jetpack-publicize-pkg")})}),w&&(0,h.jsx)(m.Item,{prefix:(0,h.jsx)(c.Icon,{icon:s.A}),disabled:R?j<1:j>=k.length-1,onClick:()=>{const n=R?j-1:j+1,r=[...k];r.splice(j,1),r.splice(n,0,e),u({...t,fields:r})},children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Move right","jetpack-publicize-pkg")})}),x&&!!M.length&&(0,h.jsxs)(m,{children:[(0,h.jsx)(m.SubmenuTriggerItem,{children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Insert left","jetpack-publicize-pkg")})}),(0,h.jsx)(m.Popover,{children:M.map(e=>{const n=R?j+1:j;return(0,h.jsx)(m.Item,{onClick:()=>{u({...t,fields:[...k.slice(0,n),e.id,...k.slice(n)]})},children:(0,h.jsx)(m.ItemLabel,{children:e.label})},e.id)})})]}),_&&!!M.length&&(0,h.jsxs)(m,{children:[(0,h.jsx)(m.SubmenuTriggerItem,{children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Insert right","jetpack-publicize-pkg")})}),(0,h.jsx)(m.Popover,{children:M.map(e=>{const n=R?j:j+1;return(0,h.jsx)(m.Item,{onClick:()=>{u({...t,fields:[...k.slice(0,n),e.id,...k.slice(n)]})},children:(0,h.jsx)(m.ItemLabel,{children:e.label})},e.id)})})]}),A&&z&&(0,h.jsx)(m.Item,{prefix:(0,h.jsx)(c.Icon,{icon:a.A}),onClick:()=>{v(z),u({...t,fields:k.filter(t=>t!==e)})},children:(0,h.jsx)(m.ItemLabel,{children:(0,r.__)("Hide column","jetpack-publicize-pkg")})})]})]})})]})})},95753(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(98839),i=n(75411),s=n(10790);var o=function({item:e,level:t,titleField:n,mediaField:o,descriptionField:a,onClickItem:c,renderItemLink:l,isItemClickable:u}){return(0,s.jsxs)(r.B,{direction:"row",gap:"md",align:"flex-start",justify:"flex-start",children:[o&&(0,s.jsx)(i.V,{item:e,isItemClickable:u,onClickItem:c,renderItemLink:l,className:"dataviews-view-table__cell-content-wrapper dataviews-column-primary__media","aria-label":u(e)&&(c||l)&&n?n.getValue?.({item:e}):void 0,children:(0,s.jsx)(o.render,{item:e,field:o,config:{sizes:"32px"}})}),(0,s.jsxs)(r.B,{direction:"coluLine truncated
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
// translators: 1: The label of the field e.g. "Date". 2: The value of the field, e.g.: "May 2022".
|
||||
(0,i.__)("%1$s: %2$s","jetpack-publicize-pkg"),J.label,t)})}),r.map((t,r)=>(0,w.jsx)(y,{item:t,level:E.showLevels&&"function"==typeof l?l(t):void 0,hasBulkActions:q,actions:e,fields:n,id:a(t)||r.toString(),view:E,titleField:W,mediaField:G,descriptionField:Z,selection:k,getItemId:a,onChangeSelection:_,onClickItem:C,renderItemLink:S,isItemClickable:A,isActionsColumnSticky:!B},a(t)))]},`group-${t}`)):(0,w.jsx)("tbody",{children:$&&t.map((t,r)=>(0,w.jsx)(y,{item:t,level:E.showLevels&&"function"==typeof l?l(t):void 0,hasBulkActions:q,actions:e,fields:n,id:a(t)||r.toString(),view:E,titleField:W,mediaField:G,descriptionField:Z,selection:k,getItemId:a,onChangeSelection:_,onClickItem:C,renderItemLink:S,isItemClickable:A,isActionsColumnSticky:!B,posinset:re?r+1:void 0},a(t)))})]}),re&&u&&(0,w.jsx)("div",{className:"dataviews-loading",id:O,children:(0,w.jsx)("p",{className:"dataviews-loading-more",children:(0,w.jsx)(s.Spinner,{})})})]}):(0,w.jsx)("div",{className:(0,r.A)("dataviews-no-results",{"is-refreshing":T}),id:O,children:z})}},24751(e,t,n){"use strict";n.d(t,{Y:()=>s});var r=n(86087),i=n(27723);function s({scrollContainerRef:e,enabledHorizontal:t=!1}){const[n,s]=(0,r.useState)(!1),[o,a]=(0,r.useState)(!1),c=(0,r.useCallback)(()=>{const n=e.current;n&&(t&&s((e=>{if((0,i.isRTL)())return Math.abs(e.scrollLeft)<=1;return e.scrollLeft+e.clientWidth>=e.scrollWidth-1})(n)),a(n.scrollTop>0))},[e,t]);return(0,r.useEffect)(()=>{if("undefined"==typeof window||!e.current)return()=>{};const t=e.current;return c(),t.addEventListener("scroll",c),window.addEventListener("resize",c),()=>{t.removeEventListener("scroll",c),window.removeEventListener("resize",c)}},[e,t,c]),{isHorizontalScrollEnd:n,isVerticallyScrolled:o}}},6660(e,t,n){"use strict";n.d(t,{A:()=>c});var r=n(56427),i=n(27723),s=n(86087),o=n(62427),a=n(10790);function c(){const e=(0,s.useContext)(o.A),t=e.view;return(0,a.jsxs)(r.__experimentalToggleGroupControl,{size:"__unstable-large",label:(0,i.__)("Density","jetpack-publicize-pkg"),value:t.layout?.density||"balanced",onChange:n=>{e.onChangeView({...t,layout:{...t.layout,density:n}})},isBlock:!0,children:[(0,a.jsx)(r.__experimentalToggleGroupControlOption,{value:"comfortable",label:(0,i._x)("Comfortable","Density option for DataView layout","jetpack-publicize-pkg")},"comfortable"),(0,a.jsx)(r.__experimentalToggleGroupControlOption,{value:"balanced",label:(0,i._x)("Balanced","Density option for DataView layout","jetpack-publicize-pkg")},"balanced"),(0,a.jsx)(r.__experimentalToggleGroupControlOption,{value:"compact",label:(0,i._x)("Compact","Density option for DataView layout","jetpack-publicize-pkg")},"compact")]})}},29494(e,t,n){"use strict";function r(e,t){return e.reduce((e,n)=>{const r=t.getValue({item:n});return e.has(r)||e.set(r,[]),e.get(r)?.push(n),e},new Map)}n.d(t,{A:()=>r})},44491(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6660),i=n(2760),s=n(10790);function o(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.A,{}),(0,s.jsx)(i.A,{})]})}},73388(e,t,n){"use strict";n.d(t,{L:()=>o});var r=n(86087),i=n(13022),s=n(10790),o=(0,r.forwardRef)(({className:e,previewSize:t,...n},r)=>(0,s.jsx)("div",{ref:r,className:(0,i.A)("dataviews-view-grid-items",e),style:{gridTemplateColumns:t&&`repeat(auto-fill, minmax(${t}px, 1fr))`},...n}))},75411(e,t,n){"use strict";n.d(t,{V:()=>s});var r=n(86087),i=n(10790);function s({item:e,isItemClickable:t,onClickItem:n,renderItemLink:s,className:o,children:a,...c}){if(!t(e))return(0,i.jsx)("div",{className:o,...c,children:a});if(s){const t=s({item:e,className:`${o} ${o}--clickable`,...c,children:a});return(0,r.cloneElement)(t,{onClick:e=>{e.stopPropagation(),t.props.onClick&&t.props.onClick(e)},onKeyDown:e=>{"Enter"!==e.key&&""!==e.key&&" "!==e.key||(e.stopPropagation(),t.props.onKeyDown&&t.props.onKeyDown(e))}})}const l=function({item:e,isItemClickable:t,onClickItem:n,className:r}){return t(e)&&n?{className:r?`${r} ${r}--clickable`:void 0,role:"button",tabIndex:0,onClick:t=>{t.stopPropagation(),n(e)},onKeyDown:t=>{"Enter"!==t.key&&""!==t.key&&" "!==t.key||(t.stopPropagation(),n(e))}}:{className:r}}({item:e,isItemClickable:t,onClickItem:n,className:o});return(0,i.jsx)("div",{...l,...c,children:a})}},2760(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(56427),i=n(27723),s=n(86087),o=n(62427),a=n(10790),c=[{value:120,breakpoint:1},{value:170,breakpoint:1},{value:230,breakpoint:1},{value:290,breakpoint:1112},{value:350,breakpoint:1636},{value:430,breakpoint:588}];function l(){const e=(0,s.useContext)(o.A),t=e.view,n=c.filter(t=>e.containerWidth>=t.breakpoint),l=t.layout?.previewSize??230,u=n.map((e,t)=>({...e,index:t})).filter(e=>e.value<=l).sort((e,t)=>t.value-e.value)[0]?.index??0,d=n.map((e,t)=>({value:t}));return(0,a.jsx)(r.RangeControl,{__next40pxDefaultSize:!0,showTooltip:!1,label:(0,i.__)("Preview size","jetpack-publicize-pkg"),value:u,min:0,max:n.length-1,withInputField:!1,onChange:(r=0)=>{e.onChangeView({...t,layout:{...t.layout,previewSize:n[r].value}})},step:1,marks:d})}},86Line truncated
|
||||
// translators: 1: current page number. 2: total number of pages.
|
||||
// translators: 1: current page number. 2: total number of pages.
|
||||
(0,s.__)("Page %1$d of %2$d","jetpack-publicize-pkg"),p,d):n.toString()}});return!!n&&1!==d&&(0,u.jsxs)(c.B,{direction:"row",className:"dataviews-pagination",justify:"end",align:"center",gap:"xl",children:[(0,u.jsx)(c.B,{direction:"row",justify:"flex-start",align:"center",gap:"xs",className:"dataviews-pagination__page-select",children:(0,i.createInterpolateElement)((0,s.sprintf)(
|
||||
// translators: 1: Current page number, 2: Total number of pages.
|
||||
// translators: 1: Current page number, 2: Total number of pages.
|
||||
(0,s._x)("<div>Page</div>%1$s<div>of %2$d</div>","paging","jetpack-publicize-pkg"),"<CurrentPage />",d),{div:(0,u.jsx)("div",{"aria-hidden":!0}),CurrentPage:(0,u.jsx)(r.SelectControl,{"aria-label":(0,s.__)("Current page","jetpack-publicize-pkg"),value:p.toString(),options:f,onChange:n=>{t({...e,page:+n})},size:"small",variant:"minimal"})})}),(0,u.jsxs)(c.B,{direction:"row",gap:"xs",align:"center",children:[(0,u.jsx)(r.Button,{onClick:()=>t({...e,page:p-1}),disabled:1===p,accessibleWhenDisabled:!0,label:(0,s.__)("Previous page","jetpack-publicize-pkg"),icon:(0,s.isRTL)()?o.A:a.A,showTooltip:!0,size:"compact",tooltipPosition:"top"}),(0,u.jsx)(r.Button,{onClick:()=>t({...e,page:p+1}),disabled:p>=d,accessibleWhenDisabled:!0,label:(0,s.__)("Next page","jetpack-publicize-pkg"),icon:(0,s.isRTL)()?a.A:o.A,showTooltip:!0,size:"compact",tooltipPosition:"top"})]})]})}var p=(0,i.memo)(d)},14820(e,t,n){"use strict";n.d(t,{T:()=>i});n(56427),n(47143);var r=n(86087);n(27723),n(10790);function i(e){return(0,r.useMemo)(()=>e?.every(e=>e.supportsBulk),[e])}},29212(e,t,n){"use strict";n.d(t,{A:()=>l});var r=n(27723),i=n(86087),s=n(56427),o=n(29491),a=n(62427),c=n(10790),l=(0,i.memo)(function({label:e}){const{view:t,onChangeView:n}=(0,i.useContext)(a.A),[l,u,d]=(0,o.useDebouncedInput)(t.search);(0,i.useEffect)(()=>{t.search!==d&&u(t.search??"")},[t.search,u]);const p=(0,i.useRef)(n),f=(0,i.useRef)(t);(0,i.useEffect)(()=>{p.current=n,f.current=t},[n,t]),(0,i.useEffect)(()=>{d!==f.current?.search&&p.current({...f.current,page:t.page?1:void 0,startPosition:t.startPosition?1:void 0,search:d})},[d]);const h=e||(0,r.__)("Search","jetpack-publicize-pkg");return(0,c.jsx)(s.SearchControl,{className:"dataviews-search",onChange:u,value:l,label:h,placeholder:h,size:"compact"})})},31020(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(56427),i=n(27723),s=n(10790);function o({selection:e,onChangeSelection:t,item:n,getItemId:o,titleField:a,disabled:c,...l}){const u=o(n),d=e.includes(u),p=!c&&d,f=a?.getValue?.({item:n})||(0,i.__)("(no title)","jetpack-publicize-pkg");return(0,s.jsx)(r.CheckboxControl,{className:"dataviews-selection-checkbox","aria-label":f,"aria-disabled":c,checked:p,onChange:()=>{c||t(d?e.filter(e=>u!==e):[...e,u])},...l})}},17160(e,t,n){"use strict";n.d(t,{Ay:()=>C,DM:()=>k,hn:()=>b});var r=n(56427),i=n(27723),s=n(86087),o=n(93312),a=n(10979),c=n(29491),l=n(98839),u=n(66310),d=n(73123),p=n(62427),f=n(83393),h=n(80115),m=n(10790),{Menu:g}=(0,h.T)(r.privateApis),v={className:"dataviews-config__popover",placement:"bottom-end",offset:9};function b(){const{view:e,onChangeView:t,defaultLayouts:n}=(0,s.useContext)(p.A),o=Object.keys(n);if(o.length<=1)return null;const c=d.A.find(t=>e.type===t.type);return(0,m.jsxs)(g,{children:[(0,m.jsx)(g.TriggerButton,{render:(0,m.jsx)(r.Button,{size:"compact",icon:c?.icon,label:(0,i.__)("Layout","jetpack-publicize-pkg")})}),(0,m.jsx)(g.Popover,{children:o.map(r=>{const i=d.A.find(e=>e.type===r);return i?(0,m.jsx)(g.RadioItem,{value:r,name:"view-actions-available-view",checked:r===e.type,hideOnClick:!0,onChange:r=>{switch(r.target.value){case"list":case"grid":case"table":case"pickerGrid":case"pickerTable":case"activity":const i={...e};return"layout"in i&&delete i.layout,t({...i,type:r.target.value,...n[r.target.value]})}a("Invalid dataview")},children:(0,m.jsx)(g.ItemLabel,{children:i.label})},r):null})})]})}function w(){const{view:e,fields:t,onChangeView:n}=(0,s.useContext)(p.A),o=(0,s.useMemo)(()=>t.filter(e=>!1!==e.enableSorting).map(e=>({label:e.label,value:e.id})),[t]);return(0,m.jsx)(r.SelectControl,{__next40pxDefaultSize:!0,label:(0,i.__)("Sort by","jetpack-publicize-pkg"),value:e.sort?.field,options:o,onChange:t=>{n({...e,sort:{direction:e?.sort?.direction||"desc",field:t},showLevels:!1})}})}function x(){const{view:e,fields:t,onChangeView:n}=(0,s.useContext)(p.A);if(0===t.filter(e=>!1!==e.enableSorting).length)return null;let o=e.sort?.direction;return!o&&e.sort?.field&&(o="desc"),(0,m.jsx)(r.__experimentalToggleGroupControl,{className:"dataviews-view-config__sort-direction",__next40pxDefaultSize:!0,isBlock:!0,label:(0,i.__)("Order","jetpack-publicize-pkg"),value:o,onChange:r=>{"asc"!==r&&"desc"!==r?a("Invalid direction"):n({...e,sort:{direction:r,field:e.sort?.field||t.find(e=>!1!==e.enableSorting)?.id||""},showLevels:!1})},children:u.GJ.map(e=>(0,m.jsx)(r.__experimentalToggleGroupControlOptionIcon,{value:e,icon:u.ls[e],label:u.CL[e]},e))})}function _(){const{view:e,config:t,onChangeView:n}=(0,s.useContext)(p.A),{infiniteScrollEnabled:o}=e;return!t||!t.perPageSizes||t.perPageSizes.length<2||t.perPageSizes.length>6||o?null:(0,m.jsx)(r.__experimentalToggleGroupControl,{__next40pxDefaultSize:!0,isBlock:!0,label:(0,i.__)("Items per page","jetpack-publicize-pkg"),value:e.perPage||10,disabled:!e?.sort?.field,onChange:t=>{const r="number"==typeof t||void 0===t?t:parseInt(t,10);n({...e,perPage:r,page:1})},children:t.perPageSizes.map(e=>(0,m.jsx)(r.__experimentalToggleGroupControlOption,{value:e,laLine truncated
|
||||
(0,r._n)("%d Item selected","%d Items selected",e,"jetpack-publicize-pkg"),e):i||n<=t?(0,r.sprintf)(/* translators: %d: number of items. */ /* translators: %d: number of items. */
|
||||
(0,r._n)("%d Item","%d Items",n,"jetpack-publicize-pkg"),n):(0,r.sprintf)(/* translators: %1$d: number of items. %2$d: total number of items. */ /* translators: %1$d: number of items. %2$d: total number of items. */
|
||||
(0,r._n)("%1$d of %2$d Item","%1$d of %2$d Items",n,"jetpack-publicize-pkg"),t,n)}},41338(e,t,n){"use strict";function r(e,t){const n=[e?.titleField,e?.mediaField,e?.descriptionField].filter(Boolean);return t.filter(e=>!n.includes(e.id)&&"media"!==e.type&&!1!==e.enableHiding)}n.d(t,{A:()=>r})},71e3(e,t,n){"use strict";n.d(t,{Df:()=>w,LX:()=>b,bx:()=>g,os:()=>v});var r=n(23403),i=n(53899),s=n(79719),o=n(21988),a=n(27723),c=n(86087),l=n(38443),u=n(66310),d=n(10790),p={Name:(0,d.jsx)("span",{className:"dataviews-filters__summary-filter-text-name"}),Value:(0,d.jsx)("span",{className:"dataviews-filters__summary-filter-text-value"})};function f(e,t){switch(t){case"days":return(0,r.e)(new Date,e);case"weeks":return(0,s.k)(new Date,e);case"months":return(0,i.a)(new Date,e);case"years":return(0,o.d)(new Date,e);default:return new Date}}var h={
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Is none of","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is none of: Admin, Editor". */
|
||||
(0,a.__)("<Name>%1$s is none of: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t.map(e=>e.label).join(", ")),p),filter:(e,t,n)=>{if(!n?.length)return!0;const r=t.getValue({item:e});return Array.isArray(r)?!n.some(e=>r.includes(e)):"string"==typeof r&&!n.includes(r)},selection:"multi"},m=[{name:u.ld,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Includes","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is any: Admin, Editor". */
|
||||
(0,a.__)("<Name>%1$s includes: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t.map(e=>e.label).join(", ")),p),filter(e,t,n){if(!n?.length)return!0;const r=t.getValue({item:e});return Array.isArray(r)?n.some(e=>r.includes(e)):"string"==typeof r&&n.includes(r)},selection:"multi"},{name:u.Vw,...h},{name:u.y5,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Includes all","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author includes all: Admin, Editor". */
|
||||
(0,a.__)("<Name>%1$s includes all: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t.map(e=>e.label).join(", ")),p),filter:(e,t,n)=>!n?.length||n.every(n=>t.getValue({item:e})?.includes(n)),selection:"multi"},{name:u.UX,...h},{name:u.CX,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Between (inc)","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */ /* translators: 1: Filter name (e.g. "Item count"). 2: Filter value min. 3: Filter value max. e.g.: "Item count between (inc): 10 and 180". */
|
||||
(0,a.__)("<Name>%1$s between (inc): </Name><Value>%2$s and %3$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label[0],t[0].label[1]),p),filter(e,t,n){if(!Array.isArray(n)||2!==n.length||void 0===n[0]||void 0===n[1])return!0;const r=t.getValue({item:e});return("number"==typeof r||r instanceof Date||"string"==typeof r)&&(r>=n[0]&&r<=n[1])},selection:"custom"},{name:u._h,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("In the past","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is in the past: 7 days". */
|
||||
(0,a.__)("<Name>%1$s is in the past: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,`${t[0].value.value} ${t[0].value.unit}`),p),filter(e,t,n){if(void 0===n?.value||void 0===n?.unit)return!0;const r=f(n.value,n.unit),i=(0,l.getDate)(t.getValue({item:e}));return i>=r&&i<=new Date},selection:"custom"},{name:u.MD,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Over","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "7 days"): "Date is over: 7 days". */
|
||||
(0,a.__)("<Name>%1$s is over: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,`${t[0].value.value} ${t[0].value.unit}`),p),filter(e,t,n){if(void 0===n?.value||void 0===n?.unit)return!0;const r=f(n.value,n.unit);return(0,l.getDate)(t.getValue({item:e}))<r},selection:"custom"},{name:u.gm,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Is","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is: Admin". */
|
||||
(0,a.__)("<Name>%1$s is: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter:(e,t,n)=>n===t.getValue({item:e})||void 0===n,selection:"single"},{name:u._k,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Is not","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */ /* translators: 1: Filter name (e.g. "Author"). 2: Filter value (e.g. "Admin"): "Author is not: Admin". */
|
||||
(0,a.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter:(e,t,n)=>n!==t.getValue({item:e}),selection:"single"},{name:u.X4,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Less than","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than: 10". */
|
||||
(0,a.__)("<Name>%1$s is less than: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})<n},selection:"single"},{name:u.u5,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Greater than","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than: 10". */
|
||||
(0,a.__)("<Name>%1$s is greater than: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})>n},selection:"single"},{name:u.Ie,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Less than or equal","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is less than or equal to: 10". */
|
||||
(0,a.__)("<Name>%1$s is less than or equal to: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})<=n},selection:"single"},{name:u.x4,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Greater than or equal","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */ /* translators: 1: Filter name (e.g. "Count"). 2: Filter value (e.g. "10"): "Count is greater than or equal to: 10". */
|
||||
(0,a.__)("<Name>%1$s is greater than or equal to: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;return t.getValue({item:e})>=n},selection:"single"},{name:u.Xd,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Before","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is before: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is before: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n);return(0,l.getDate)(t.getValue({item:e}))<r},selection:"single"},{name:u.QF,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("After","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is after: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is after: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n);return(0,l.getDate)(t.getValue({item:e}))>r},selection:"single"},{name:u.o8,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Before (inc)","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or before: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is on or before: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n);return(0,l.getDate)(t.getValue({item:e}))<=r},selection:"single"},{name:u.NN,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("After (inc)","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is on or after: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is on or after: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n);return(0,l.getDate)(t.getValue({item:e}))>=r},selection:"single"},{name:u.Py,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Contains","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */ /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title contains: Hello". */
|
||||
(0,a.__)("<Name>%1$s contains: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=t.getValue({item:e});return"string"==typeof r&&n&&r.toLowerCase().includes(String(n).toLowerCase())},selection:"single"},{name:u.Vm,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Doesn't contain","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */ /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title doesn't contain: Hello". */
|
||||
(0,a.__)("<Name>%1$s doesn't contain: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=t.getValue({item:e});return"string"==typeof r&&n&&!r.toLowerCase().includes(String(n).toLowerCase())},selection:"single"},{name:u.YH,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Starts with","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */ /* translators: 1: Filter name (e.g. "Title"). 2: Filter value (e.g. "Hello"): "Title starts with: Hello". */
|
||||
(0,a.__)("<Name>%1$s starts with: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=t.getValue({item:e});return"string"==typeof r&&n&&r.toLowerCase().startsWith(String(n).toLowerCase())},selection:"single"},{name:u.xz,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("On","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n),i=(0,l.getDate)(t.getValue({item:e}));return r.getTime()===i.getTime()},selection:"single"},{name:u.Ld,
|
||||
/* translators: DataViews operator name */
|
||||
label:(0,a.__)("Not on","jetpack-publicize-pkg"),filterText:(e,t)=>(0,c.createInterpolateElement)((0,a.sprintf)(/* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */ /* translators: 1: Filter name (e.g. "Date"). 2: Filter value (e.g. "2024-01-01"): "Date is not: 2024-01-01". */
|
||||
(0,a.__)("<Name>%1$s is not: </Name><Value>%2$s</Value>","jetpack-publicize-pkg"),e.name,t[0].label),p),filter(e,t,n){if(void 0===n)return!0;const r=(0,l.getDate)(n),i=(0,l.getDate)(t.getValue({item:e}));return r.getTime()!==i.getTime()},selection:"single"}],g=e=>m.find(t=>t.name===e),v=()=>m.map(e=>e.name),b=e=>m.filter(e=>"single"===e.selection).some(t=>t.name===e),w=e=>m.some(t=>t.name===e)},98839(e,t,n){"use strict";n.d(t,{B:()=>d});var r=n(70815),i=n(26919),s=n(86087),o="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[n,r]of t.styles)c(e,n,r)}(document)),e.__wpStyleRuntime}function c(e,t,n){if(!e.head)return;const r=a();let i=r.injectedStyles.get(e);if(i||(i=new Set,r.injectedStyles.set(e,i)),i.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${o}]`))if(n.getAttribute(o)===t)return!0;return!1}(e,t))return void i.add(t);const s=e.createElement("style");s.setAttribute(o,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),i.add(t)}(function(e,t){const n=a();n.styles.set(e,t);for(const r of n.documents.keys())c(r,e,t)})("b51ff41489","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-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:n,justify:s,wrap:o,render:a,...c},d){const p={gap:t&&u[t],alignItems:n,justifyContent:s,flexDirection:e,flexWrap:o};return(0,r.C)({render:a,ref:d,props:(0,i.v6)(c,{style:p,className:l})})})},16064(e,t,n){"use strict";n.d(t,{s:()=>u});var r=n(70815),i=n(26919),s=n(86087),o="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[n,r]of t.styles)c(e,n,r)}(document)),e.__wpStyleRuntime}function c(e,t,n){if(!e.head)return;const r=a();let i=r.injectedStyles.get(e);if(i||(i=new Set,r.injectedStyles.set(e,i)),i.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${o}]`))if(n.getAttribute(o)===t)return!0;return!1}(e,t))return void i.add(t);const s=e.createElement("style");s.setAttribute(o,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),i.add(t)}(function(e,t){const n=a();n.styles.set(e,t);for(const r of n.documents.keys())c(r,e,t)})("c46e8cb841","@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.f37b9e2e191ebd66__visually-hidden{word-wrap:normal;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-break:normal}}");var l="f37b9e2e191ebd66__visually-hidden",u=(0,s.forwardRef)(function({render:e,...t},n){return(0,r.C)({render:e,ref:n,props:(0,i.v6)({className:l},t,{"data-visually-hidden":""})})})},51526(e,t,n){"use strict";n.d(t,{$:()=>v});var r=n(20733),i=n(13022),s=n(20195),o=n(86087),a=n(27723),c=n(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[n,r]of t.styles)d(e,n,r)}(document)),e.__wpStyleRuntime}function d(e,t,n){if(!e.head)return;const r=u();let i=r.injectedStyles.get(e);if(i||(i=new Set,r.injectedStyles.set(e,i)),i.has(t))return;if(function(e,t){if(!e.head)return!1;for(const n of e.head.querySelectorAll(`style[${l}]`))if(n.getAttribute(l)===t)return!0;return!1}(e,t))return void i.add(t);const s=e.createElement("style");s.setAttribute(l,t),s.appendChild(e.createTextNode(n)),e.head.appendChild(s),i.add(t)}function p(e,t){const n=u();n.styles.set(e,t);for(const r of n.documents.keys())d(r,e,t)}p("26d90ece4e",'@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._97b0fc33c028be1a__button,.abbb272e2ce49bd6__is-unstyled{appearance:none;padding:0}._97b0fc33c028be1a__button{--wp-ui-button-font-weight:499;--wp-ui-button-background-color:var(--wpds-color-bg-interactive-brand-strong,var(--wp-admin-theme-color,#3858e9));--wp-ui-button-background-color-active:var(--wpds-color-bg-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-bg-interactive-neutral-strong-disabled,#Line truncated
|
||||
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* tabbable 6.4.0
|
||||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
@@ -0,0 +1 @@
|
||||
.cuoSlhSNrqf1dozY22Xb{fill:#000}.JLquNpQVlysAamuh5lJO,.lAIiifeLMmZAPlQ9n9ZR{fill:var(--jp-green-primary)}.cbOwD8Y4tFjwimmtchQI{fill:#757575}.cbOwD8Y4tFjwimmtchQI.aLWBKY0yRghEk7tNCgK3{fill:#0085ff}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw{fill:#0866ff}.cbOwD8Y4tFjwimmtchQI.aHOlEBGD5EA8NKRw3xTw.social-logo{border-radius:50%}.cbOwD8Y4tFjwimmtchQI.af4Y_zItXvLAOEoSDPSv{fill:#55acee}.cbOwD8Y4tFjwimmtchQI.f68aqF3XSD1OBvXR1get{fill:#0976b4}.cbOwD8Y4tFjwimmtchQI.xFI0dt3UiXRlRQdqPWkx{fill:#35465c}.cbOwD8Y4tFjwimmtchQI.q7JEoyymveP6kF747M43{fill:var(--color-gplus)}.cbOwD8Y4tFjwimmtchQI.DKOBOTVmTLbh26gUH_73{fill:#6364ff}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw{fill:#8ed500}.cbOwD8Y4tFjwimmtchQI.n5XodNsuMfMAAvqHFmbw.social-logo{border-radius:50%}.cbOwD8Y4tFjwimmtchQI.cL3m0xBYTYhIKI7lCqDB{fill:#d93174}.cbOwD8Y4tFjwimmtchQI.fftumuc_lJ6v0tq4UMVR{fill:#43d854}.cbOwD8Y4tFjwimmtchQI.inzgC27qxdt7hSdhTWRI{fill:#000}.cbOwD8Y4tFjwimmtchQI.inzgC27qxdt7hSdhTWRI.social-logo{border-radius:40%}.cbOwD8Y4tFjwimmtchQI.PW9A5OHnDYBX0yNn9RHO{fill:#000}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive>*{pointer-events:auto;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.block-editor-block-list__layout .block-editor-block-list__block.has-warning.is-interactive:after{content:none}:where(._fUXxnSp5pagKBp9gSN7) *{box-sizing:border-box}.WQVtrU6q0L1Igcj7wCrQ{margin:0;padding:0}.UujoBFTnQNY2cWU2SIsH{font-size:var(--font-headline-medium);font-weight:700;line-height:52px}.TeGO5V_thHw5lDAm1_2M{font-weight:700}.TeGO5V_thHw5lDAm1_2M,.WolQzb2MsSgiNmLtc7_j{font-size:var(--font-headline-small);line-height:40px}.WolQzb2MsSgiNmLtc7_j{font-weight:400}.hUB0JT8p1T2Hw28N6qC8{font-weight:500}.gKZWDv5chz3_O3Syp74H,.hUB0JT8p1T2Hw28N6qC8{font-size:var(--font-title-medium);line-height:32px}.gKZWDv5chz3_O3Syp74H{font-weight:600}.zY2No8Ga4b8shbOQGhnv{font-size:var(--font-title-small);font-weight:500;line-height:30px}.tIj0D1t8Cc892ikmgFPZ{font-size:var(--font-body);font-weight:400;line-height:24px}.KdcN0BnOaVeVhyLRKqhS{font-size:var(--font-body-small);font-weight:400;line-height:24px}.dso3Rh3tl3Xv1GumBktz{font-weight:400}.dso3Rh3tl3Xv1GumBktz,.mQ1UlbN9u4Mg9byO8m7v{font-size:var(--font-body-extra-small);line-height:20px}.mQ1UlbN9u4Mg9byO8m7v{font-weight:700}.PItlW5vRExLnTj4a8eLE{font-size:var(--font-body-extra-small);font-weight:600;line-height:16px}.TwRpPlktzxhmFVeua7P5{margin:calc(var(--spacing-base)*0)}.zVfqx7gyb3o9mxfGynn1{margin-left:calc(var(--spacing-base)*0);margin-right:calc(var(--spacing-base)*0)}.iSHVzNiB9iVleGljaQxy{margin-bottom:calc(var(--spacing-base)*0)}.iSHVzNiB9iVleGljaQxy,.xqDIp6cNVr_E6RXaiPyD{margin-top:calc(var(--spacing-base)*0)}.S8EwaXk1kyPizt6x4WH2{margin-left:calc(var(--spacing-base)*0)}.ODX5Vr1TARoLFkDDFooD{margin-bottom:calc(var(--spacing-base)*0)}.cphJ8dCpfimnky7P2FHg{margin-right:calc(var(--spacing-base)*0)}.PFgIhNxIyiSuNvQjAIYj{margin:calc(var(--spacing-base)*1)}.M2jKmUzDxvJjjVEPU3zn{margin-left:calc(var(--spacing-base)*1);margin-right:calc(var(--spacing-base)*1)}.io15gAh8tMTNbSEfwJKk{margin-bottom:calc(var(--spacing-base)*1)}.io15gAh8tMTNbSEfwJKk,.rcTN5uw9xIEeMEGL3Xi_{margin-top:calc(var(--spacing-base)*1)}.CQSkybjq2TcRM1Xo9COV{margin-left:calc(var(--spacing-base)*1)}.hfqOWgq6_MEGdFE82eOY{margin-bottom:calc(var(--spacing-base)*1)}.I8MxZQYTbuu595yfesWA{margin-right:calc(var(--spacing-base)*1)}.kQkc6rmdpvLKPkyoJtVQ{margin:calc(var(--spacing-base)*2)}.j6vFPxWuu4Jan2ldoxpp{margin-left:calc(var(--spacing-base)*2);margin-right:calc(var(--spacing-base)*2)}.hqr39dC4H_AbactPAkCG{margin-bottom:calc(var(--spacing-base)*2)}.c3dQnMi16C6J6Ecy4283,.hqr39dC4H_AbactPAkCG{margin-top:calc(var(--spacing-base)*2)}.YNZmHOuRo6hU7zzKfPdP{margin-left:calc(var(--spacing-base)*2)}.Db8lbak1_wunpPk8NwKU{margin-bottom:calc(var(--spacing-base)*2)}.ftsYE5J9hLzquQ0tA5dY{margin-right:calc(var(--spacing-base)*2)}.Det4MHzLUW7EeDnafPzq{margin:calc(var(--spacing-base)*3)}.h_8EEAztC29Vve1datb5{margin-left:calc(var(--spacing-base)*3);margin-right:calc(var(--spacing-base)*3)}.YXIXJ0h1k47u6hzK8KcM{margin-bottom:calc(var(--spacing-base)*3)}.YXIXJ0h1k47u6hzK8KcM,.soADBBkcIKCBXzCTuV9_{margin-top:calc(var(--spacing-base)*3)}.zSX59ziEaEWGjnpZa4uV{margin-left:calc(var(--spacing-base)*3)}.yrVTnq_WBMbejg89c2ZQ{margin-bottom:calc(var(--spacing-base)*3)}.UKtHPJnI2cXBWtPDm5hM{margin-right:calc(var(--spacing-base)*3)}.guexok_Tqd5Tf52hRlbT{margin:calc(var(--spacing-base)*4)}.oS1E2KfTBZkJ3F0tN7T6{margin-left:calc(var(--spacing-base)*4);margin-right:calc(var(--spacing-base)*4)}.DN1OhhXi6AoBgEdDSbGd{margin-bottom:calc(var(--spacing-base)*4)}.DN1OhhXi6AoBgEdDSbGd,.ot2kkMcYHv53hLZ4LSn0{margin-top:calc(var(--spacing-base)*4)}.A1krOZZhlQ6Sp8Cy4bly{margin-left:calc(var(--spacing-base)*4)}.pkDbXXXL32237M0hokEh{margin-bottom:calc(var(--spacing-base)*4)}.XXv4kDTGvEnQeuGKOPU3{margin-right:calc(var(--spacing-base)*4)}.yGqHk1a57gaISwkXwXe6{margin:calc(var(--spacing-base)*5)}.X8cghM358X3DkXLc9aNK{margin-left:calc(var(--spacing-base)*5);margin-rightLine truncated
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* Main entry point for auto-generated asset registration.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
// Load script module registration.
|
||||
$modules_file = __DIR__ . '/modules.php';
|
||||
if ( file_exists( $modules_file ) ) {
|
||||
require_once $modules_file;
|
||||
}
|
||||
|
||||
// Load script registration.
|
||||
$scripts_file = __DIR__ . '/scripts.php';
|
||||
if ( file_exists( $scripts_file ) ) {
|
||||
require_once $scripts_file;
|
||||
}
|
||||
|
||||
// Load style registration.
|
||||
$styles_file = __DIR__ . '/styles.php';
|
||||
if ( file_exists( $styles_file ) ) {
|
||||
require_once $styles_file;
|
||||
}
|
||||
|
||||
// Load routes registration.
|
||||
$routes_file = __DIR__ . '/routes.php';
|
||||
if ( file_exists( $routes_file ) ) {
|
||||
require_once $routes_file;
|
||||
}
|
||||
|
||||
// Load widgets registration.
|
||||
$widgets_file = __DIR__ . '/widgets.php';
|
||||
if ( file_exists( $widgets_file ) ) {
|
||||
require_once $widgets_file;
|
||||
}
|
||||
|
||||
// Load pages registration.
|
||||
$pages_file = __DIR__ . '/pages.php';
|
||||
if ( file_exists( $pages_file ) ) {
|
||||
require_once $pages_file;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('jquery', 'wp-api-fetch', 'wp-i18n', 'wp-polyfill'), 'version' => 'fe54c09896a5ae30d0fa');
|
||||
@@ -0,0 +1,3 @@
|
||||
(()=>{var e={941(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 o=0,r=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(o++,"%c"===e&&(r=o))}),t.splice(r,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")||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=n(212)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},212(e,t,n){e.exports=function(e){function t(e){let n,r,s,i=null;function a(...e){if(!a.enabled)return;const o=a,r=Number(new Date),s=r-(n||r);o.diff=s,o.prev=n,o.curr=r,n=r,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,(n,r)=>{if("%%"===n)return"%";i++;const s=t.formatters[r];if("function"==typeof s){const t=e[i];n=s.call(o,t),e.splice(i,1),i--}return n}),t.formatArgs.call(o,e);(o.log||t.log).apply(o,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=o,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(r!==t.namespaces&&(r=t.namespaces,s=t.enabled(e)),s),set:e=>{i=e}}),"function"==typeof t.init&&t.init(a),a}function o(e,n){const o=t(this.namespace+(void 0===n?":":n)+e);return o.log=this.log,o}function r(e,t){let n=0,o=0,r=-1,s=0;for(;n<e.length;)if(o<t.length&&(t[o]===e[n]||"*"===t[o]))"*"===t[o]?(r=o,s=n,o++):(n++,o++);else{if(-1===r)return!1;o=r+1,s++,n=s}for(;o<t.length&&"*"===t[o];)o++;return o===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 n=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of n)"-"===e[0]?t.skips.push(e.slice(1)):t.names.push(e)},t.enabled=function(e){for(const n of t.skips)if(r(e,n))return!1;for(const n of t.names)if(r(e,n))return!0;return!1},t.humanize=n(997),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}},997(e){var t=1e3,n=60*t,o=60*n,r=24*o,s=7*r,i=365.25*r;function a(e,t,n,o){var r=t>=1.5*n;return Math.round(e/n)+" "+o+(r?"s":"")}e.exports=function(e,c){c=c||{};var d=typeof e;if("string"===d&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(millisecondLine truncated
|
||||
/* translators: %s is the link to the connections page */
|
||||
const e=_n('One of your social connections needs attention. You can fix it on the <a href="%s" rel="noopener noreferrer" target="_blank">connection management</a> page.','Some of your social connections need attention. You can fix them on the <a href="%s" rel="noopener noreferrer" target="_blank">connection management</a> page.',o,"jetpack-publicize-pkg");n.addClass("below-h2").addClass("error").addClass("publicize-token-refresh-message").append(e.replace("%s",a))}};e("#pub-connection-tests").length&&r();const c=e("#publicize-share-now"),C=e("#publicize-share-now-notice"),w=e("#publicize-form").find('li input[type="checkbox"]'),h=(e,t="warning")=>{C.removeClass("notice-warning notice-success hidden").addClass("publicize__notice-warning notice-"+t).text(e)};c.on("click",function(t){if(t.preventDefault(),!l)return;if(C.removeClass("publicize__notice-warning").addClass("hidden").text(""),!w.filter((t,n)=>e(n).prop("checked")).length)return void h(__("Please select at least one connection to share with.","jetpack-publicize-pkg"));const n=e('input[name="post_ID"]').val(),r=d.replace("{postId}",n),s=w.filter((t,n)=>!e(n).prop("checked")).map((t,n)=>e(n).data("id")).toArray(),i=e('textarea[name="wpas_title"]').val();c.prop("disabled",!0).text(__("Sharing…","jetpack-publicize-pkg")),g("jetpack_social_reshare_clicked",{location:"classic-editor",environment:p}),o()({path:r,method:"POST",data:{message:i,skipped_connections:s,async:!0}}).then(()=>{h(__("Request submitted successfully.","jetpack-publicize-pkg"),"success")}).catch(()=>{h(__("An error occurred while sharing your post.","jetpack-publicize-pkg"))}).finally(()=>{c.prop("disabled",!1).text(__("Share now","jetpack-publicize-pkg"))})})})})()})();
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin constants - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* Returns an array of constants for use in other templates.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
return array(
|
||||
'version' => '0.83.4',
|
||||
'build_url' => plugin_dir_url( __FILE__ ),
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 363 592"><mask id="a" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="363" height="666"><path d="M0 0h359a4 4 0 0 1 4 4v657.075c0 4.16-5.56 5.556-7.525 1.89L0 0Z" fill="#F9F9F6"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="290.5" cy="288.048" rx="151.5" ry="143.048" fill="#069E08" fill-opacity=".15"/></g><g filter="url(#c)"><ellipse cx="256.5" cy="132.5" rx="131.5" ry="124.5" fill="#F5E6B3"/></g><g opacity=".7" filter="url(#d)"><ellipse cx="173" cy="-64" rx="213" ry="201" fill="#CED9F2"/></g><g opacity=".9" filter="url(#e)"><ellipse cx="4.5" cy="67" rx="100.5" ry="95" fill="#fff"/></g></g><defs><filter id="b" x="55" y="61" width="471" height="454.096" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur stdDeviation="42" result="effect1_foregroundBlur_2494_14129"/></filter><filter id="c" x="-29" y="-146" width="571" height="557" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur stdDeviation="77" result="effect1_foregroundBlur_2494_14129"/></filter><filter id="d" x="-134" y="-359" width="614" height="590" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur stdDeviation="47" result="effect1_foregroundBlur_2494_14129"/></filter><filter id="e" x="-190" y="-122" width="389" height="378" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur stdDeviation="47" result="effect1_foregroundBlur_2494_14129"/></filter></defs></svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -0,0 +1,17 @@
|
||||
<svg width="380" height="183" viewBox="0 0 380 183" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.75" filter="url(#filter0_f_5953_11924)">
|
||||
<path d="M360 -60C360 7.93102 304.931 63 237 63C169.069 63 114 7.93102 114 -60C114 -127.931 169.069 -183 237 -183C304.931 -183 360 -127.931 360 -60Z" fill="url(#paint0_linear_5953_11924)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<filter id="filter0_f_5953_11924" x="-6" y="-303" width="486" height="486" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||
<feGaussianBlur stdDeviation="60" result="effect1_foregroundBlur_5953_11924"/>
|
||||
</filter>
|
||||
<linearGradient id="paint0_linear_5953_11924" x1="360" y1="-60" x2="114" y2="-60" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#48FF50"/>
|
||||
<stop offset="0.471846" stop-color="#108642"/>
|
||||
<stop offset="1" stop-color="#2E38FA"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 990 B |
|
After Width: | Height: | Size: 135 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="32" height="33" viewBox="0 0 32 33" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16 32.5C24.8366 32.5 32 25.3366 32 16.5C32 7.66344 24.8366 0.5 16 0.5C7.16344 0.5 0 7.66344 0 16.5C0 25.3366 7.16344 32.5 16 32.5Z" fill="#069E08"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.3295 3.67557V19.1565H7.36005L15.3295 3.67557ZM16.9478 29.3244V13.813H24.9478L16.9478 29.3244Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 427 B |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 34 KiB |
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* Script module registration - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
/**
|
||||
* Register all script modules.
|
||||
*/
|
||||
function jetpack_social_register_script_modules() {
|
||||
// Ensure this only runs once. wp_default_scripts can fire multiple times,
|
||||
// and each wp_deregister_script_module() call also dequeues the module.
|
||||
// If a module was enqueued between calls, repeated deregister/register
|
||||
// cycles would lose the enqueue state.
|
||||
static $already_registered = false;
|
||||
if ( $already_registered ) {
|
||||
return;
|
||||
}
|
||||
$already_registered = true;
|
||||
|
||||
// Load build constants
|
||||
$constants_file = __DIR__ . '/constants.php';
|
||||
if ( ! file_exists( $constants_file ) ) {
|
||||
return;
|
||||
}
|
||||
$build_constants = require $constants_file;
|
||||
$modules_dir = __DIR__ . '/modules';
|
||||
$modules_file = $modules_dir . '/registry.php';
|
||||
|
||||
if ( ! file_exists( $modules_file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$modules = require $modules_file;
|
||||
$base_url = $build_constants['build_url'] . 'modules/';
|
||||
|
||||
foreach ( $modules as $module ) {
|
||||
// WASM-only modules (e.g., vips worker) only have .min.js; use it even when SCRIPT_DEBUG is `true`.
|
||||
$extension = '.min.js';
|
||||
|
||||
$asset_path = $modules_dir . '/' . $module['asset'];
|
||||
$asset = file_exists( $asset_path ) ? require $asset_path : array();
|
||||
|
||||
// Deregister first to override any previously registered version
|
||||
// (e.g., Core's default modules when running as a plugin).
|
||||
wp_deregister_script_module( $module['id'] );
|
||||
|
||||
wp_register_script_module(
|
||||
$module['id'],
|
||||
$base_url . $module['path'] . $extension,
|
||||
$asset['module_dependencies'] ?? array(),
|
||||
$asset['version'] ?? false,
|
||||
array(
|
||||
'fetchpriority' => 'low',
|
||||
'in_footer' => true,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_default_scripts', 'jetpack_social_register_script_modules' );
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-commands', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/lazy-editor', 'import' => 'dynamic'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '188faf6c64fdd1b4');
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Script module registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
return array(
|
||||
|
||||
);
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Pages loader - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
foreach ( [
|
||||
__DIR__ . '/pages/jetpack-social-dashboard/page.php',
|
||||
__DIR__ . '/pages/jetpack-social-dashboard/page-wp-admin.php',
|
||||
] as $file ) {
|
||||
if ( file_exists( $file ) ) {
|
||||
require_once $file;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// Empty module loader for page dependencies
|
||||
@@ -0,0 +1,317 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: jetpack-social-dashboard (wp-admin integrated)
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* This version integrates with the standard WordPress admin interface,
|
||||
* keeping the wp-admin sidebar and scripts/styles intact.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
// Global storage for jetpack-social-dashboard routes and menu items
|
||||
global $jetpack_social_jetpack_social_dashboard_wp_admin_routes, $jetpack_social_jetpack_social_dashboard_wp_admin_menu_items;
|
||||
$jetpack_social_jetpack_social_dashboard_wp_admin_routes = array();
|
||||
$jetpack_social_jetpack_social_dashboard_wp_admin_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the jetpack-social-dashboard-wp-admin page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
function jetpack_social_register_jetpack_social_dashboard_wp_admin_route( $path, $content_module = null, $route_module = null ) {
|
||||
global $jetpack_social_jetpack_social_dashboard_wp_admin_routes;
|
||||
|
||||
$route = array( 'path' => $path );
|
||||
if ( ! empty( $content_module ) ) {
|
||||
$route['content_module'] = $content_module;
|
||||
}
|
||||
if ( ! empty( $route_module ) ) {
|
||||
$route['route_module'] = $route_module;
|
||||
}
|
||||
|
||||
$jetpack_social_jetpack_social_dashboard_wp_admin_routes[] = $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the jetpack-social-dashboard-wp-admin page.
|
||||
* Note: Menu items are registered but not displayed in single-page mode.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
*/
|
||||
function jetpack_social_register_jetpack_social_dashboard_wp_admin_menu_item( $id, $label, $to, $parent_id = '' ) {
|
||||
global $jetpack_social_jetpack_social_dashboard_wp_admin_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
$jetpack_social_jetpack_social_dashboard_wp_admin_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the jetpack-social-dashboard-wp-admin page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function jetpack_social_get_jetpack_social_dashboard_wp_admin_routes() {
|
||||
global $jetpack_social_jetpack_social_dashboard_wp_admin_routes;
|
||||
return $jetpack_social_jetpack_social_dashboard_wp_admin_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the jetpack-social-dashboard-wp-admin page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function jetpack_social_get_jetpack_social_dashboard_wp_admin_menu_items() {
|
||||
global $jetpack_social_jetpack_social_dashboard_wp_admin_menu_items;
|
||||
return $jetpack_social_jetpack_social_dashboard_wp_admin_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the jetpack-social-dashboard-wp-admin page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function jetpack_social_jetpack_social_dashboard_wp_admin_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles for the jetpack-social-dashboard-wp-admin page.
|
||||
* Hooked to admin_enqueue_scripts.
|
||||
*
|
||||
* @param string $hook_suffix The current admin page.
|
||||
*/
|
||||
function jetpack_social_jetpack_social_dashboard_wp_admin_enqueue_scripts( $hook_suffix ) {
|
||||
// Check all possible ways this page can be accessed:
|
||||
// 1. Menu page via admin.php?page=jetpack-social-dashboard-wp-admin (plugin)
|
||||
// 2. Direct file via jetpack-social-dashboard.php (Core) - screen ID will be 'jetpack-social-dashboard'
|
||||
$current_screen = get_current_screen();
|
||||
$is_our_page = (
|
||||
( isset( $_GET['page'] ) && 'jetpack-social-dashboard-wp-admin' === $_GET['page'] ) || // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
( $current_screen && 'jetpack-social-dashboard' === $current_screen->id )
|
||||
);
|
||||
|
||||
if ( ! $is_our_page ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
/**
|
||||
* Fires when the jetpack-social-dashboard admin page is initialized so extensions can register routes and menu items.
|
||||
*/
|
||||
do_action( 'jetpack-social-dashboard-wp-admin_init' );
|
||||
|
||||
// Preload REST API data
|
||||
jetpack_social_jetpack_social_dashboard_wp_admin_preload_data();
|
||||
|
||||
// Get all registered routes
|
||||
$routes = jetpack_social_get_jetpack_social_dashboard_wp_admin_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = __DIR__ . '/../../modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'jetpack-social-dashboard-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
/*
|
||||
* Add inline script to initialize the app using initSinglePage (no menuItems).
|
||||
* The dynamic import is deferred until DOMContentLoaded so that all classic
|
||||
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
|
||||
* wp-theme, etc.) have finished parsing and executing before the boot module
|
||||
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
|
||||
* against the classic-script-printing pass on fast CDN-fronted hosts in
|
||||
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
|
||||
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
|
||||
*/
|
||||
$init_js_function = <<<'JS'
|
||||
( mountId, routes ) => {
|
||||
const run = async () => {
|
||||
const mod = await import( "@wordpress/boot" );
|
||||
mod.initSinglePage( { mountId, routes } );
|
||||
};
|
||||
if ( document.readyState === "loading" ) {
|
||||
document.addEventListener( "DOMContentLoaded", run );
|
||||
} else {
|
||||
run();
|
||||
}
|
||||
}
|
||||
JS;
|
||||
wp_add_inline_script(
|
||||
'jetpack-social-dashboard-wp-admin-prerequisites',
|
||||
sprintf(
|
||||
'( %s )( %s, %s );',
|
||||
$init_js_function,
|
||||
wp_json_encode( 'jetpack-social-dashboard-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'jetpack-social-dashboard-wp-admin-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for jetpack-social-dashboard-wp-admin module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the boot script-module dependencies for the
|
||||
* jetpack-social-dashboard-wp-admin page.
|
||||
*
|
||||
* Surfaces extending this page can append entries to the boot
|
||||
* dependency list. Each entry is an array with 'import' (string
|
||||
* 'static' or 'dynamic') and 'id' (script-module handle) keys.
|
||||
*
|
||||
* @param array $boot_dependencies Boot dependencies for the page.
|
||||
*/
|
||||
$boot_dependencies = apply_filters(
|
||||
'jetpack-social-dashboard-wp-admin_boot_dependencies',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'jetpack-social-dashboard-wp-admin',
|
||||
$build_constants['build_url'] . 'pages/jetpack-social-dashboard/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'jetpack-social-dashboard-wp-admin-prerequisites' );
|
||||
wp_enqueue_script_module( 'jetpack-social-dashboard-wp-admin' );
|
||||
wp_enqueue_style( 'jetpack-social-dashboard-wp-admin-prerequisites' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the jetpack-social-dashboard-wp-admin page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
* This renders within the normal WordPress admin interface.
|
||||
*/
|
||||
function jetpack_social_jetpack_social_dashboard_wp_admin_render_page() {
|
||||
?>
|
||||
<style>
|
||||
/* Critical styles to prevent layout shifts - inlined for immediate application */
|
||||
|
||||
#wpwrap {
|
||||
overflow-y: auto;
|
||||
}
|
||||
body {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* Reset wp-admin padding */
|
||||
#wpcontent {
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
#wpbody-content {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* Hide legacy admin elements */
|
||||
#wpbody-content > div:not(.boot-layout-container):not(#screen-meta) {
|
||||
display: none;
|
||||
}
|
||||
#wpfooter {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Accessibility regions */
|
||||
.a11y-speak-region {
|
||||
inset-inline-start: -1px;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
/* Admin menu indicators */
|
||||
ul#adminmenu a.wp-has-current-submenu::after,
|
||||
ul#adminmenu > li.current > a.current::after {
|
||||
border-inline-end-color: #fff;
|
||||
}
|
||||
|
||||
/* Media frame fix */
|
||||
.media-frame select.attachment-filters:last-of-type {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Responsive overflow fix for #wpwrap */
|
||||
@media (min-width: 782px) {
|
||||
#wpwrap {
|
||||
overflow-y: initial;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<div id="jetpack-social-dashboard-wp-admin-app" class="boot-layout-container"></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
// Hook the enqueue function to admin_enqueue_scripts
|
||||
add_action( 'admin_enqueue_scripts', 'jetpack_social_jetpack_social_dashboard_wp_admin_enqueue_scripts' );
|
||||
|
||||
@@ -0,0 +1,318 @@
|
||||
<?php
|
||||
/**
|
||||
* Page: jetpack-social-dashboard
|
||||
* Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
// Global storage for jetpack-social-dashboard routes and menu items
|
||||
global $jetpack_social_jetpack_social_dashboard_routes, $jetpack_social_jetpack_social_dashboard_menu_items;
|
||||
$jetpack_social_jetpack_social_dashboard_routes = array();
|
||||
$jetpack_social_jetpack_social_dashboard_menu_items = array();
|
||||
|
||||
/**
|
||||
* Register a route for the jetpack-social-dashboard page.
|
||||
*
|
||||
* @param string $path Route path (e.g., '/types/$type/edit/$id').
|
||||
* @param string|null $content_module Script module ID for content (stage/inspector).
|
||||
* @param string|null $route_module Script module ID for route lifecycle hooks.
|
||||
*/
|
||||
function jetpack_social_register_jetpack_social_dashboard_route( $path, $content_module = null, $route_module = null ) {
|
||||
global $jetpack_social_jetpack_social_dashboard_routes;
|
||||
|
||||
$route = array( 'path' => $path );
|
||||
if ( ! empty( $content_module ) ) {
|
||||
$route['content_module'] = $content_module;
|
||||
}
|
||||
if ( ! empty( $route_module ) ) {
|
||||
$route['route_module'] = $route_module;
|
||||
}
|
||||
|
||||
$jetpack_social_jetpack_social_dashboard_routes[] = $route;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a menu item for the jetpack-social-dashboard page.
|
||||
*
|
||||
* @param string $id Menu item ID.
|
||||
* @param string $label Display label.
|
||||
* @param string $to Route path to navigate to.
|
||||
* @param string $parent_id Optional. Parent menu item ID.
|
||||
* @param string $parent_type Optional. Parent type: 'drilldown' or 'dropdown'.
|
||||
*/
|
||||
function jetpack_social_register_jetpack_social_dashboard_menu_item( $id, $label, $to, $parent_id = '', $parent_type = '' ) {
|
||||
global $jetpack_social_jetpack_social_dashboard_menu_items;
|
||||
|
||||
$menu_item = array(
|
||||
'id' => $id,
|
||||
'label' => $label,
|
||||
'to' => $to,
|
||||
);
|
||||
|
||||
if ( ! empty( $parent_id ) ) {
|
||||
$menu_item['parent'] = $parent_id;
|
||||
}
|
||||
|
||||
if ( ! empty( $parent_type ) && in_array( $parent_type, array( 'drilldown', 'dropdown' ), true ) ) {
|
||||
$menu_item['parent_type'] = $parent_type;
|
||||
}
|
||||
|
||||
$jetpack_social_jetpack_social_dashboard_menu_items[] = $menu_item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered routes for the jetpack-social-dashboard page.
|
||||
*
|
||||
* @return array Array of route objects.
|
||||
*/
|
||||
function jetpack_social_get_jetpack_social_dashboard_routes() {
|
||||
global $jetpack_social_jetpack_social_dashboard_routes;
|
||||
return $jetpack_social_jetpack_social_dashboard_routes ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all registered menu items for the jetpack-social-dashboard page.
|
||||
*
|
||||
* @return array Array of menu item objects.
|
||||
*/
|
||||
function jetpack_social_get_jetpack_social_dashboard_menu_items() {
|
||||
global $jetpack_social_jetpack_social_dashboard_menu_items;
|
||||
return $jetpack_social_jetpack_social_dashboard_menu_items ?? array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Preload REST API data for the jetpack-social-dashboard page.
|
||||
* Automatically called during page rendering.
|
||||
*/
|
||||
function jetpack_social_jetpack_social_dashboard_preload_data() {
|
||||
// Define paths to preload - same for all pages
|
||||
// Please also change packages/core-data/src/entities.js when changing this.
|
||||
$preload_paths = array(
|
||||
'/?_fields=description,gmt_offset,home,image_sizes,image_size_threshold,name,site_icon,site_icon_url,site_logo,timezone_string,url,page_for_posts,page_on_front,show_on_front',
|
||||
array( '/wp/v2/settings', 'OPTIONS' ),
|
||||
);
|
||||
|
||||
// Use rest_preload_api_request to gather the preloaded data
|
||||
$preload_data = array_reduce(
|
||||
$preload_paths,
|
||||
'rest_preload_api_request',
|
||||
array()
|
||||
);
|
||||
|
||||
// Register the preloading middleware with wp-api-fetch
|
||||
wp_add_inline_script(
|
||||
'wp-api-fetch',
|
||||
sprintf(
|
||||
'wp.apiFetch.use( wp.apiFetch.createPreloadingMiddleware( %s ) );',
|
||||
wp_json_encode( $preload_data )
|
||||
),
|
||||
'after'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Render the jetpack-social-dashboard page.
|
||||
* Call this function from add_menu_page or add_submenu_page.
|
||||
*/
|
||||
function jetpack_social_jetpack_social_dashboard_render_page() {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/../../constants.php';
|
||||
|
||||
// Set current screen
|
||||
set_current_screen();
|
||||
|
||||
// Remove unwanted deprecated handler
|
||||
remove_action( 'admin_head', 'wp_admin_bar_header' );
|
||||
|
||||
// Remove unwanted scripts and styles that were enqueued during `admin_init`
|
||||
foreach ( wp_scripts()->queue as $script ) {
|
||||
wp_dequeue_script( $script );
|
||||
}
|
||||
foreach ( wp_styles()->queue as $style ) {
|
||||
wp_dequeue_style( $style );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires when the jetpack-social-dashboard page is initialized so extensions can register routes and menu items.
|
||||
*/
|
||||
do_action( 'jetpack-social-dashboard_init' );
|
||||
|
||||
// Enqueue command palette assets for boot-based pages
|
||||
if ( function_exists( 'wp_enqueue_command_palette_assets' ) ) {
|
||||
wp_enqueue_command_palette_assets();
|
||||
}
|
||||
|
||||
// Preload REST API data
|
||||
jetpack_social_jetpack_social_dashboard_preload_data();
|
||||
|
||||
// Get all registered routes and menu items
|
||||
$menu_items = jetpack_social_get_jetpack_social_dashboard_menu_items();
|
||||
$routes = jetpack_social_get_jetpack_social_dashboard_routes();
|
||||
|
||||
// Get boot module asset file for dependencies
|
||||
$asset_file = __DIR__ . '/../../modules/boot/index.min.asset.php';
|
||||
if ( file_exists( $asset_file ) ) {
|
||||
$asset = require $asset_file;
|
||||
|
||||
// This script serves two purposes:
|
||||
// 1. It ensures all the globals that are made available to the modules are loaded.
|
||||
// 2. It initializes the boot module as an inline script.
|
||||
wp_register_script( 'jetpack-social-dashboard-prerequisites', '', $asset['dependencies'], $asset['version'], true );
|
||||
|
||||
// Add inline script to initialize the app
|
||||
$init_modules = [];
|
||||
wp_add_inline_script(
|
||||
'jetpack-social-dashboard-prerequisites',
|
||||
sprintf(
|
||||
'import("@wordpress/boot").then(mod => mod.init({mountId: "%s", menuItems: %s, routes: %s, initModules: %s, dashboardLink: "%s"}));',
|
||||
'jetpack-social-dashboard-app',
|
||||
wp_json_encode( $menu_items, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
wp_json_encode( $init_modules, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
|
||||
esc_url( admin_url( '/' ) )
|
||||
)
|
||||
);
|
||||
|
||||
// Register prerequisites style by filtering script dependencies to find registered styles
|
||||
$style_dependencies = array_filter(
|
||||
$asset['dependencies'],
|
||||
function ( $handle ) {
|
||||
return wp_style_is( $handle, 'registered' );
|
||||
}
|
||||
);
|
||||
wp_register_style( 'jetpack-social-dashboard-prerequisites', false, $style_dependencies, $asset['version'] );
|
||||
|
||||
// Build dependencies for jetpack-social-dashboard module
|
||||
$boot_dependencies = array(
|
||||
array(
|
||||
'import' => 'static',
|
||||
'id' => '@wordpress/boot',
|
||||
),
|
||||
);
|
||||
|
||||
// Add init modules as static dependencies
|
||||
// No init modules configured
|
||||
|
||||
// Add all registered routes as dependencies
|
||||
foreach ( $routes as $route ) {
|
||||
if ( isset( $route['route_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'static',
|
||||
'id' => $route['route_module'],
|
||||
);
|
||||
}
|
||||
if ( isset( $route['content_module'] ) ) {
|
||||
$boot_dependencies[] = array(
|
||||
'import' => 'dynamic',
|
||||
'id' => $route['content_module'],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the boot script-module dependencies for the
|
||||
* jetpack-social-dashboard page.
|
||||
*
|
||||
* Surfaces extending this page can append entries to the boot
|
||||
* dependency list. Each entry is an array with 'import' (string
|
||||
* 'static' or 'dynamic') and 'id' (script-module handle) keys.
|
||||
*
|
||||
* @param array $boot_dependencies Boot dependencies for the page.
|
||||
*/
|
||||
$boot_dependencies = apply_filters(
|
||||
'jetpack-social-dashboard_boot_dependencies',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Dummy script module to ensure dependencies are loaded
|
||||
wp_register_script_module(
|
||||
'jetpack-social-dashboard',
|
||||
$build_constants['build_url'] . 'pages/jetpack-social-dashboard/loader.js',
|
||||
$boot_dependencies
|
||||
);
|
||||
|
||||
// Enqueue the boot scripts and styles
|
||||
wp_enqueue_script( 'jetpack-social-dashboard-prerequisites' );
|
||||
wp_enqueue_script_module( 'jetpack-social-dashboard' );
|
||||
wp_enqueue_style( 'jetpack-social-dashboard-prerequisites' );
|
||||
}
|
||||
|
||||
// Output the HTML
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?php echo esc_html( get_admin_page_title() ); ?></title>
|
||||
<style>
|
||||
html {
|
||||
background: #f1f1f1;
|
||||
color: #444;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#wpadminbar { display: none; }
|
||||
</style>
|
||||
<?php
|
||||
global $hook_suffix;
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited
|
||||
$hook_suffix = 'jetpack-social-dashboard';
|
||||
|
||||
// BEGIN see wp-admin/admin-header.php
|
||||
print_admin_styles();
|
||||
print_head_scripts();
|
||||
|
||||
/** This action is documented in wp-admin/admin-header.php */
|
||||
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
|
||||
/** This action is documented in wp-admin/admin-header.php */
|
||||
do_action( 'admin_head' );
|
||||
// END see wp-admin/admin-header.php
|
||||
?>
|
||||
</head>
|
||||
<body class="jetpack-social-dashboard">
|
||||
<div id="jetpack-social-dashboard-app" style="height: 100vh; box-sizing: border-box;"></div>
|
||||
<?php
|
||||
// BEGIN see wp-admin/admin-footer.php
|
||||
|
||||
/** This action is documented in wp-admin/admin-footer.php */
|
||||
do_action( 'admin_footer', '' );
|
||||
|
||||
// Print import map first so it's available for inline scripts
|
||||
wp_script_modules()->print_import_map();
|
||||
print_footer_scripts();
|
||||
wp_script_modules()->print_enqueued_script_modules();
|
||||
wp_script_modules()->print_script_module_preloads();
|
||||
wp_script_modules()->print_script_module_data();
|
||||
|
||||
/** This action is documented in wp-admin/admin-footer.php */
|
||||
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
// END see wp-admin/admin-footer.php
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Intercept admin_init to render the page early.
|
||||
* This bypasses the default WordPress admin template.
|
||||
*/
|
||||
function jetpack_social_jetpack_social_dashboard_intercept_render() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['page'] ) && 'jetpack-social-dashboard' === $_GET['page'] ) {
|
||||
jetpack_social_jetpack_social_dashboard_render_page();
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Hook the interceptor to admin_init
|
||||
add_action( 'admin_init', 'jetpack_social_jetpack_social_dashboard_intercept_render' );
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* Routes registration - Auto-generated by build process.
|
||||
* Registers all routes on their respective page init hooks.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
// Load routes registry
|
||||
$routes_file = __DIR__ . '/routes/registry.php';
|
||||
if ( ! file_exists( $routes_file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$routes = require $routes_file;
|
||||
|
||||
// Group routes by page and store in globals for page-specific functions
|
||||
$routes_by_page = array();
|
||||
foreach ( $routes as $route ) {
|
||||
$page_slug = $route['page'];
|
||||
if ( ! isset( $routes_by_page[ $page_slug ] ) ) {
|
||||
$routes_by_page[ $page_slug ] = array();
|
||||
}
|
||||
$routes_by_page[ $page_slug ][] = $route;
|
||||
}
|
||||
|
||||
// Store routes data in globals for each page
|
||||
foreach ( $routes_by_page as $page_slug => $page_routes ) {
|
||||
$page_slug_underscore = str_replace( '-', '_', $page_slug );
|
||||
$global_name = 'jetpack_social_' . $page_slug_underscore . '_routes_data';
|
||||
$GLOBALS[ $global_name ] = $page_routes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic helper function to register routes for a page.
|
||||
*
|
||||
* @param array $page_routes Array of route data for the page.
|
||||
* @param string $register_function_name Name of the function to call for registering each route.
|
||||
*/
|
||||
function jetpack_social_register_page_routes( $page_routes, $register_function_name ) {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/constants.php';
|
||||
|
||||
foreach ( $page_routes as $route ) {
|
||||
$content_handle = null;
|
||||
$route_handle = null;
|
||||
|
||||
// Register content module if exists
|
||||
if ( $route['has_content'] ) {
|
||||
$content_asset_path = __DIR__ . "/routes/{$route['name']}/content.min.asset.php";
|
||||
if ( file_exists( $content_asset_path ) ) {
|
||||
$content_asset = require $content_asset_path;
|
||||
$content_handle = 'jetpack-social/routes/' . $route['name'] . '/content';
|
||||
$extension = '.min.js';
|
||||
// Deregister first to override any previously registered version
|
||||
// (e.g., Core's default modules when running as a plugin).
|
||||
wp_deregister_script_module( $content_handle );
|
||||
wp_register_script_module(
|
||||
$content_handle,
|
||||
$build_constants['build_url'] . 'routes/' . $route['name'] . '/content' . $extension,
|
||||
$content_asset['module_dependencies'] ?? array(),
|
||||
$content_asset['version'] ?? false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Register route module if exists
|
||||
if ( $route['has_route'] ) {
|
||||
$route_asset_path = __DIR__ . "/routes/{$route['name']}/route.min.asset.php";
|
||||
if ( file_exists( $route_asset_path ) ) {
|
||||
$route_asset = require $route_asset_path;
|
||||
$route_handle = 'jetpack-social/routes/' . $route['name'] . '/route';
|
||||
$extension = '.min.js';
|
||||
// Deregister first to override any previously registered version
|
||||
// (e.g., Core's default modules when running as a plugin).
|
||||
wp_deregister_script_module( $route_handle );
|
||||
wp_register_script_module(
|
||||
$route_handle,
|
||||
$build_constants['build_url'] . 'routes/' . $route['name'] . '/route' . $extension,
|
||||
$route_asset['module_dependencies'] ?? array(),
|
||||
$route_asset['version'] ?? false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Register route with page
|
||||
if ( function_exists( $register_function_name ) ) {
|
||||
call_user_func( $register_function_name, $route['path'], $content_handle, $route_handle );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Page-specific route registration functions
|
||||
// Page-specific route registration functions for jetpack-social-dashboard
|
||||
/**
|
||||
* Register routes for jetpack-social-dashboard page (full-page mode).
|
||||
*/
|
||||
function jetpack_social_register_jetpack_social_dashboard_page_routes() {
|
||||
global $jetpack_social_jetpack_social_dashboard_routes_data;
|
||||
jetpack_social_register_page_routes( $jetpack_social_jetpack_social_dashboard_routes_data, 'jetpack_social_register_jetpack_social_dashboard_route' );
|
||||
}
|
||||
add_action( 'jetpack-social-dashboard_init', 'jetpack_social_register_jetpack_social_dashboard_page_routes' );
|
||||
|
||||
/**
|
||||
* Register routes for jetpack-social-dashboard page (wp-admin mode).
|
||||
*/
|
||||
function jetpack_social_register_jetpack_social_dashboard_wp_admin_page_routes() {
|
||||
global $jetpack_social_jetpack_social_dashboard_routes_data;
|
||||
jetpack_social_register_page_routes( $jetpack_social_jetpack_social_dashboard_routes_data, 'jetpack_social_register_jetpack_social_dashboard_wp_admin_route' );
|
||||
}
|
||||
add_action( 'jetpack-social-dashboard-wp-admin_init', 'jetpack_social_register_jetpack_social_dashboard_wp_admin_page_routes' );
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'module_dependencies' => array(array('id' => '@wordpress/a11y', 'import' => 'static'), array('id' => '@wordpress/route', 'import' => 'static')), 'version' => '6949d5866d460d880f3c');
|
||||
@@ -0,0 +1,130 @@
|
||||
var lX=Object.create;var Pw=Object.defineProperty;var dX=Object.getOwnPropertyDescriptor;var uX=Object.getOwnPropertyNames;var fX=Object.getPrototypeOf,pX=Object.prototype.hasOwnProperty;var mX=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var ze=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},lt=(e,t)=>{for(var r in t)Pw(e,r,{get:t[r],enumerable:!0})},Aw=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of uX(t))!pX.call(e,o)&&o!==r&&Pw(e,o,{get:()=>t[o],enumerable:!(n=dX(t,o))||n.enumerable});return e},k0=(e,t,r)=>(Aw(e,t,"default"),r&&Aw(r,t,"default")),m=(e,t,r)=>(r=e!=null?lX(fX(e)):{},Aw(t||!e||!e.__esModule?Pw(r,"default",{value:e,enumerable:!0}):r,e));var nk=ze((lye,rk)=>{var ru=1e3,nu=ru*60,ou=nu*60,Tl=ou*24,hX=Tl*7,gX=Tl*365.25;rk.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return bX(e);if(r==="number"&&isFinite(e))return t.long?yX(e):_X(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function bX(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\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(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*gX;case"weeks":case"week":case"w":return r*hX;case"days":case"day":case"d":return r*Tl;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ou;case"minutes":case"minute":case"mins":case"min":case"m":return r*nu;case"seconds":case"second":case"secs":case"sec":case"s":return r*ru;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function _X(e){var t=Math.abs(e);return t>=Tl?Math.round(e/Tl)+"d":t>=ou?Math.round(e/ou)+"h":t>=nu?Math.round(e/nu)+"m":t>=ru?Math.round(e/ru)+"s":e+"ms"}function yX(e){var t=Math.abs(e);return t>=Tl?T0(e,t,Tl,"day"):t>=ou?T0(e,t,ou,"hour"):t>=nu?T0(e,t,nu,"minute"):t>=ru?T0(e,t,ru,"second"):e+" ms"}function T0(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var ik=ze((dye,ok)=>{function vX(e){r.debug=r,r.default=r,r.coerce=l,r.disable=a,r.enable=o,r.enabled=s,r.humanize=nk(),r.destroy=c,Object.keys(e).forEach(d=>{r[d]=e[d]}),r.names=[],r.skips=[],r.formatters={};function t(d){let u=0;for(let f=0;f<d.length;f++)u=(u<<5)-u+d.charCodeAt(f),u|=0;return r.colors[Math.abs(u)%r.colors.length]}r.selectColor=t;function r(d){let u,f=null,h,p;function g(...y){if(!g.enabled)return;let b=g,_=Number(new Date),v=_-(u||_);b.diff=v,b.prev=u,b.curr=_,u=_,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let x=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(w,S)=>{if(w==="%%")return"%";x++;let k=r.formatters[S];if(typeof k=="function"){let E=y[x];w=k.call(b,E),y.splice(x,1),x--}return w}),r.formatArgs.call(b,y),(b.log||r.log).apply(b,y)}return g.namespace=d,g.useColors=r.useColors(),g.color=r.selectColor(d),g.extend=n,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(h!==r.namespaces&&(h=r.namespaces,p=r.enabled(d)),p),set:y=>{f=y}}),typeof r.init=="function"&&r.init(g),g}function n(d,u){let f=r(this.namespace+(typeof u>"u"?":":u)+d);return f.log=this.log,f}function o(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let u=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of u)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function i(d,u){let f=0,h=0,p=-1,g=0;for(;f<d.length;)if(h<u.length&&(u[h]===d[f]||u[h]==="*"))u[h]==="*"?(p=h,g=f,h++):(f++,h++);else if(p!==-1)h=p+1,g++,f=g;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function a(){let d=[...r.names,...r.skips.map(u=>"-"+u)].join(",");return r.enable(""),d}function s(d){for(let u of r.skips)if(i(d,u))return!1;for(let u of r.names)if(i(d,u))return!0;return!1}function l(d){return d instanceof Error?d.stack||d.message:d}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}ok.exports=vX});var Hp=ze((Zn,R0)=>{Zn.formatArgs=wX;Zn.save=SX;Zn.load=CX;Zn.useColors=xX;Zn.storage=EX();Zn.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`."))}})();Zn.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","#6633FLine truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T=!0,I=!1,A;return{s:function(){k=w[Symbol.iterator]()},n:function(){var N=k.next();return T=N.done,N},e:function(N){I=!0,A=N},f:function(){try{!T&&k.return!=null&&k.return()}finally{if(I)throw A}}}}function l(w,S){var k=[],E=[];function P(T,I){if(T.length===1)k.push(T[0]),E.push(T[0]);else{for(var A=Array(T.length-1),N=0;N<A.length;N++)N===0&&k.push(T[0]),N===A.length-1&&E.push(T[N+1]),A[N]=[(1-I)*T[N][0]+I*T[N+1][0],(1-I)*T[N][1]+I*T[N+1][1]];P(A,I)}}return w.length&&P(w,S),{left:k,right:E.reverse()}}function c(w){var S={};return w.length===4&&(S.x2=w[2][0],S.y2=w[2][1]),w.length>=3&&(S.x1=w[1][0],S.y1=w[1][1]),S.x=w[w.length-1][0],S.y=w[w.length-1][1],w.length===4?S.type="C":w.length===3?S.type="Q":S.type="L",S}function d(w,S){S=S||2;for(var k=[],E=w,P=1/S,T=0;T<S-1;T++){var I=P/(1-P*T),A=l(E,I);k.push(A.left),E=A.right}return k.push(E),k}function u(w,S,k){var E=[[w.x,w.y]];return S.x1!=null&&E.push([S.x1,S.y1]),S.x2!=null&&E.push([S.x2,S.y2]),E.push([S.x,S.y]),d(E,k).map(c)}var f=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,h={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(h).forEach(function(w){h[w.toLowerCase()]=h[w]});function p(w,S){for(var k=Array(w),E=0;E<w;E++)k[E]=S;return k}function g(w){return"".concat(w.type).concat(h[w.type].map(function(S){return w[S]}).join(","))}function y(w,S){var k={x1:"x",y1:"y",x2:"x",y2:"y"},E=["xAxisRotation","largeArcFlag","sweepFlag"];if(w.type!==S.type&&S.type.toUpperCase()!=="M"){var P={};Object.keys(S).forEach(function(T){var I=S[T],A=w[T];A===void 0&&(E.includes(T)?A=I:(A===void 0&&k[T]&&(A=w[k[T]]),A===void 0&&(A=0))),P[T]=A}),P.type=S.type,w=P}return w}function b(w,S,k){var E=[];if(S.type==="L"||S.type==="Q"||S.type==="C")E=E.concat(u(w,S,k));else{var P=r({},w);P.type==="M"&&(P.type="L"),E=E.concat(p(k-1).map(function(){return P})),E.push(S)}return E}function _(w,S,k){var E=w.length-1,P=S.length-1,T=E/P,I=p(P).reduce(function(N,D,F){var B=Math.floor(T*F);if(k&&B<w.length-1&&k(w[B],w[B+1])){var V=T*F%1<.5;N[B]&&(V?B>0?B-=1:B<w.length-1&&(B+=1):B<w.length-1?B+=1:B>0&&(B-=1))}return N[B]=(N[B]||0)+1,N},[]),A=I.reduce(function(N,D,F){if(F===w.length-1){var B=p(D,r({},w[w.length-1]));return B[0].type==="M"&&B.forEach(function(V){V.type="L"}),N.concat(B)}return N.concat(b(w[F],w[F+1],D))},[]);return A.unshift(w[0]),A}function v(w){for(var S=(w||"").match(f)||[],k=[],E,P,T=0;T<S.length;++T)if(E=h[S[T]],E){P={type:S[T]};for(var I=0;I<E.length;++I)P[E[I]]=+S[T+I+1];T+=E.length,k.push(P)}return k}function x(w,S,k){var E=w==null?[]:w.slice(),P=S==null?[]:S.slice();if(!E.length&&!P.length)return function(){return[]};var T=(E.length===0||E[E.length-1].type==="Z")&&(P.length===0||P[P.length-1].type==="Z");E.length>0&&E[E.length-1].type==="Z"&&E.pop(),P.length>0&&P[P.length-1].type==="Z"&&P.pop(),E.length?P.length||P.push(E[0]):E.push(P[0]);var I=Math.abs(P.length-E.length);I!==0&&(P.length>E.length?E=_(E,P,k):P.length<E.length&&(P=_(P,E,k))),E=E.map(function(N,D){return y(N,P[D])});var A=E.map(function(N){return o({},N)});return T&&A.push({type:"Z"}),function(D){if(D===1)return S??[];if(D>0)for(var F=0;F<A.length;++F){var B=E[F],V=P[F],H=A[F],$=s(h[H.type]),q;try{for($.s();!(q=$.n()).done;){var ee=q.value;H[ee]=(1-D)*B[ee]+D*V[ee],(ee==="largeArcFlag"||ee==="sweepFlag")&&(H[ee]=Math.round(H[ee]))}}catch(te){$.e(te)}finally{$.f()}}return A}}function C(w,S,k){var E=v(w),P=v(S);if(!E.length&&!P.length)return function(){return""};var T=x(E,P,k);return function(A){if(A===1)return S??"";var N=T(A),D="",F=s(N),B;try{for(F.s();!(B=F.n()).done;){var V=B.value;D+=g(V)}}catch(H){F.e(H)}finally{F.f()}return D}}e.interpolatePath=C,e.interpolatePathCommands=x,e.pathCommandsFromString=v,Object.defineProperty(e,"__esModule",{value:!0})}))});var jW=ze((kbt,DW)=>{"use strict";var Hme=function(t){return Bme(t)&&!Ume(t)};function Bme(e){return!!e&&typeof e=="object"}function Ume(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Wme(e)}var Vme=typeof Symbol=="function"&&Symbol.for,$me=Vme?Symbol.for("react.element"):60103;function Wme(e){return e.$$typeof===$me}function Gme(e){return Array.isArray(e)?[]:{}}function Wg(e,t){return t.clone!==!1&&t.isMergeableObject(e)?mp(Gme(e),e,t):e}function Yme(e,t,r){return e.concat(t).map(function(n){return Wg(n,r)})}function qme(e,t){if(!t.customMerge)return mp;var r=t.customMerge(e);return typeof r=="function"?r:mp}function Xme(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function MW(e){return Object.keys(e).concat(Xme(e))}function IW(e,t){try{return t in e}catch{return!1}}function Kme(e,t){return IW(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t
Line truncated
|
||||
&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;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(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]
|
||||
[role=tab]:is([aria-selected=true])
|
||||
&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}`);var Fm={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},lI=1,fI=(0,$l.forwardRef)(function({children:t,variant:r="default",className:n,activateOnFocus:o,...i},a){let[s,l]=(0,$l.useState)(null),[c,d]=(0,$l.useState)({first:!1,last:!1,isScrolling:!1});(0,$l.useEffect)(()=>{if(!s)return;let f=()=>{let{scrollWidth:y,clientWidth:b,scrollLeft:_}=s,v=Math.max(y-b,0),C=(s.dir||(typeof window<"u"?window.getComputedStyle(s).direction:"ltr"))==="rtl"&&_<0?-_:_;d({first:C>lI,last:C<v-lI,isScrolling:y>b})},h=new ResizeObserver(f);h.observe(s);let p=!1,g=()=>{p||(requestAnimationFrame(()=>{f(),p=!1}),p=!0)};return s.addEventListener("scroll",g,{passive:!0}),f(),()=>{s.removeEventListener("scroll",g),h.disconnect()}},[s]);let u=(0,dI.useMergeRefs)([a,f=>l(f)]);return(0,Qb.jsxs)(Ii.List,{ref:u,activateOnFocus:o,"data-select-on-move":o?"true":"false",className:Y(Fm.tablist,c.first&&Fm["is-overflowing-first"],c.last&&Fm["is-overflowing-last"],Fm[`is-${r}-variant`],n),...i,tabIndex:i.tabIndex??(c.isScrolling?-1:void 0),children:[t,(0,Qb.jsx)(Ii.Indicator,{className:Fm.indicator})]})});var gI=m(le(),1);var yn=m(le(),1);var zm=m(R(),1),Jb=!1,h6=Jb?(0,yn.createContext)(null):null;function rre(){let e=(0,yn.useContext)(h6);(0,yn.useEffect)(()=>{if(e)return e.registerTab()},[e])}function nre(){}var pI=Jb?rre:nre;function ore(){let e=(0,yn.useContext)(h6);(0,yn.useEffect)(()=>{if(e)return e.registerPanel()},[e])}function ire(){}var mI=Jb?ore:ire;function are({children:e}){let t=(0,yn.useRef)(0),r=(0,yn.useRef)(0),n=Yb(()=>{let s=t.current,l=r.current;if(s!==l)throw new Error(`Tabs: Tab/Panel count mismatch (${s} Tabs, ${l} Panels). Each Tab must be associated with exactly one Panel. Mismatched or missing associations can break screen reader navigation and violate WAI-ARIA Tabs pattern requirements.`)}),o=(0,yn.useCallback)(()=>(t.current+=1,n(),()=>{t.current-=1,n()}),[n]),i=(0,yn.useCallback)(()=>(r.current+=1,n(),()=>{r.current-=1,n()}),[n]),a=(0,yn.useMemo)(()=>({registerTab:o,registerPanel:i}),[o,i]);return(0,zm.jsx)(h6.Provider,{value:a,children:e})}function sre({children:e}){return(0,zm.jsx)(zm.Fragment,{children:e})}var hI=Jb?are:sre;var yI=m(R(),1),g6="data-wp-hash";function b6(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&lre(document)),e.__wpStyleRuntime}function cre(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${g6}]`))if(r.getAttribute(g6)===t)return!0;return!1}function bI(e,t,r){if(!e.head)return;let n=b6(),o=n.injectedStyles.get(e);if(o||(o=new Set,n.injectedStyles.set(e,o)),o.has(t))return;if(cre(e,t)){o.add(t);return}let i=e.createElement("style");i.setAttribute(g6,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),o.add(t)}function lre(e){let t=b6();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,n]of t.styles)bI(e,r,n);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function _I(e,t){let r=b6();r.styles.set(e,t);for(let n of r.documents.keys())bI(n,e,t)}typeof process>"u",_I("1fb29d3a3c","._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);&: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,#0000);border:var(--_gcd-input-border,none);border-radius:var(--_gcd-input-border-radius,0);box-shadow:var(--_gcd-input-box-shadow,0 0 0 #0000);color:var(--_gcd-input-color,var(--wpds-color-fg-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,#0000);border-color:var(--_gcd-input-border-color-disabled,#0000);box-shadow:var(--_gcd-input-box-shadow-disabled,none);color:var(--_gcd-input-color-disabled,var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d))}&::placeholder{col
Line truncated
|
||||
&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;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(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]
|
||||
[role=tab]:is([aria-selected=true])
|
||||
&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}}`);var y6={tablist:"_7313adbc8a112e90__tablist","is-overflowing-first":"_9f2ac729c68a735a__is-overflowing-first","is-overflowing-last":"_81c799c1f3cdd261__is-overflowing-last","is-minimal-variant":"_59228b5227f38a99__is-minimal-variant",indicator:"_1c37dcfaa1ad8cda__indicator",tab:"a5fd8814f195aa5e__tab","tab-children":"_5dfc77e6edd345d4__tab-children","tab-chevron":"_4a20e969d15e5ac1__tab-chevron"},EI=(0,SI.forwardRef)(function({className:t,children:r,...n},o){return pI(),(0,Hm.jsxs)(Ii.Tab,{ref:o,className:Y(y6.tab,t),...n,children:[(0,Hm.jsx)("span",{className:y6["tab-children"],children:r}),(0,Hm.jsx)(jn,{icon:Nm,className:y6["tab-chevron"]})]})});var i_=m(ke(),1);var co=m(qt(),1),Wl=m(ke(),1),so=m(w6(),1);var S6="data-wp-hash";function C6(){let e=globalThis;return e.__wpStyleRuntime||(e.__wpStyleRuntime={documents:new Map,styles:new Map,injectedStyles:new WeakMap},typeof document<"u"&&_re(document)),e.__wpStyleRuntime}function bre(e,t){if(!e.head)return!1;for(let r of e.head.querySelectorAll(`style[${S6}]`))if(r.getAttribute(S6)===t)return!0;return!1}function II(e,t,r){if(!e.head)return;let n=C6(),o=n.injectedStyles.get(e);if(o||(o=new Set,n.injectedStyles.set(e,o)),o.has(t))return;if(bre(e,t)){o.add(t);return}let i=e.createElement("style");i.setAttribute(S6,t),i.appendChild(e.createTextNode(r)),e.head.appendChild(i),o.add(t)}function _re(e){let t=C6();t.documents.set(e,(t.documents.get(e)??0)+1);for(let[r,n]of t.styles)II(e,r,n);return()=>{let r=t.documents.get(e);if(r!==void 0){if(r<=1){t.documents.delete(e);return}t.documents.set(e,r-1)}}}function Ye(e,t){let r=C6();r.styles.set(e,t);for(let n of r.documents.keys())II(n,e,t)}typeof process>"u",Ye("674d318580","._5e65e0797d01538f__heading{margin-bottom:0}.f9e89f084ba7d3fd__notice{border:1px solid var(--jp-gray);border-left:6px solid var(--jp-red-50);border-radius:var(--jp-border-radius);box-shadow:0 4px 8px rgba(0,0,0,.03),0 1px 2px rgba(0,0,0,.06);box-sizing:border-box;color:var(--jp-gray-80);font-size:16px;line-height:22px;margin:0;padding:calc(var(--spacing-base)*2) calc(var(--spacing-base)*3) calc(var(--spacing-base)*2) calc(var(--spacing-base)*3)}.f9e89f084ba7d3fd__notice.is-error{background-color:var(--jp-white)}.f9e89f084ba7d3fd__notice .components-notice__content{align-items:center;display:flex;flex-direction:column;margin:0;padding:12px 4px}.f9e89f084ba7d3fd__notice .is-link{color:var(--jp-black);font-size:16px;font-weight:600}.f9e89f084ba7d3fd__notice .components-notice__dismiss{align-self:center}.f9e89f084ba7d3fd__notice ._27d866373bbcf4b8__button,.f9e89f084ba7d3fd__notice ._27d866373bbcf4b8__button:active,.f9e89f084ba7d3fd__notice ._27d866373bbcf4b8__button:hover,.f9e89f084ba7d3fd__notice ._27d866373bbcf4b8__button:visited{align-items:center;border-radius:var(--jp-border-radius);cursor:pointer;display:inline-block;font-size:16px;font-weight:600;justify-content:center;letter-spacing:-.01em;line-height:24px;margin-left:calc(var(--spacing-base)*2 + 24px);margin-top:24px;padding:8px 24px;text-decoration:none}.f9e89f084ba7d3fd__notice ._1fafd49e40342dae__primary,.f9e89f084ba7d3fd__notice ._1fafd49e40342dae__primary:active,.f9e89f084ba7d3fd__notice ._1fafd49e40342dae__primary:hover,.f9e89f084ba7d3fd__notice ._1fafd49e40342dae__primary:visited{background:var(--jp-black);border:1px solid transparent;color:var(--jp-white)}.f9e89f084ba7d3fd__notice .f94192aa2bdba4dd__secondary,.f9e89f084ba7d3fd__notice .f94192aa2bdba4dd__secondary:active,.f9e89f084ba7d3fd__notice .f94192aa2bdba4dd__secondary:hover,.f9e89f084ba7d3fd__notice .f94192aa2bdba4dd__secondary:visited{background:transparent;border:1px solid var(--jp-gray-30);color:var(--jp-gray-80)}.f9e89f084ba7d3fd__notice .f94192aa2bdba4dd__secondary:active:hover,.f9e89f084ba7d3fd__notice .f94192aa2bdba4dd__secondary:hover,.f9e89f084ba7d3fd__notice .f94192aa2bdba4dd__secondary:hover:hover,.f9e89f084ba7d3fd__notice .f94192aa2bdba4dd__secondary:visited:hover{border-color:var(--jp-gray-50);color:var(--jp-gray-100)}.f9e89f084ba7d3fd__notice .a57dcd4ffef2edde__actions{display:flex;flex-direction:column;gap:calc(var(--spacing-base)*2);margin-top:calc(var(--spacing-base)*2);text-align:center}.f9e89f084ba7d3fd__notice .a57dcd4ffef2edde__actions ._27d866373bbcf4b8__button,.f9e89f084ba7d3fd__notice .a57dcd4ffef2edde__actions ._27d866373bbcf4b8__button:active,.f9e89f084ba7d3fd__notice .a57dcd4ffef2edde__actions ._27d866373bbcf4b8__button:hover,.f9e89f084ba7d3fd__notice .a57dcd4ffef2edde__actions ._27d866373bbcf4b8__button:visited{margin:0;max-width:300px;width:100%}@media (min-width:1100px){.f9e89f084ba7d3fd__notice .a57dcd4ffef2edde__actions{align-items:center;flex-direction:row;margin-left:0;margin-top:0}.f9e89f084ba7d3fd__notice .a57dcd4ffef2edde__actions ._27d866373bbcf4b8__button,.f9e89f084ba7d3fd__notice .a57dcd4ffef2edde__actions ._27d866373bbcf4b8__button:active,.f9e89f084ba7d3fd__notice .a57dcd4ffef2edde__actions ._27d866373bbcf4b8__butto
Line truncated
|
||||
s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1
|
||||
c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1
|
||||
c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0
|
||||
L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0
|
||||
c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5
|
||||
l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4
|
||||
c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1
|
||||
c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z`}),(0,Ke.jsx)(jt.Path,{d:`M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1
|
||||
s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1
|
||||
c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1
|
||||
c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0
|
||||
L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1l-0.1,0.1c-0.1,0-0.1,0-0.2,0H4.1c-0.1,0-0.1,0-0.1,0
|
||||
c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1L4,19c0,0,0.1,0,0.1,0C5.2,19,5.5,18.5,6,17.5
|
||||
l5.4-12.4c0.2-0.5,0.8-1,1.3-1C13,4.2,13.1,4.4,13.2,4.7z M9.1,13.1c0,0.1-0.1,0.1-0.1,0.2c0,0.1,0.1,0.1,0.1,0.1h4.4
|
||||
c0.3,0,0.4-0.1,0.4-0.3c0-0.1,0-0.2-0.1-0.3l-1.2-3.5c-0.3-0.8-0.8-1.9-0.8-2.7c0-0.1,0-0.1-0.1-0.1c0,0-0.1,0-0.1,0.1
|
||||
c-0.1,0.6-0.4,1.2-0.7,1.7L9.1,13.1z`}),(0,Ke.jsx)(jt.Path,{d:"M21.6,12.5c0,0.6-0.3,1-0.9,1c-0.6,0-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1C21.3,11.7,21.6,12.1,21.6,12.5z"}),(0,Ke.jsx)(jt.Path,{d:"M4.1,12.5c0,0.6-0.3,1-0.9,1s-0.8-0.3-0.8-0.8c0-0.6,0.4-1,0.9-1S4.1,12.1,4.1,12.5z"})]}),Fne=({opacity:e=1,size:t,color:r})=>(0,Ke.jsx)(Fn,{size:t,opacity:e,color:r,children:(0,Ke.jsx)(jt.Path,{d:`M2.1,5.8c0-0.1,0-0.1,0-0.2c0-0.2,0.1-0.5,0.1-0.7c0.1-0.4,0.4-0.6,0.7-0.8l8.3-2.9c0.1-0.1,0.3-0.1,0.4-0.1l0.5,0.1
|
||||
l8.3,2.9c0.3,0.2,0.5,0.4,0.7,0.7c0.2,0.2,0.2,0.4,0.2,0.7c0,0.1,0,0.1,0,0.2v0.1c-0.1,0.5-0.2,0.9-0.3,1.4
|
||||
c-0.2,0.4-0.3,1.2-0.7,2.2c-0.3,1-0.7,2.1-1.1,3.1c-0.5,1-1,2.1-1.6,3.3s-1.4,2.3-2.2,3.5c-0.9,1.1-1.8,2.2-2.8,3.1
|
||||
c-0.2,0.2-0.5,0.4-0.9,0.4c-0.3,0-0.6-0.1-0.9-0.4c-1.2-1.1-2.4-2.4-3.5-4c-1-1.6-1.9-3-2.5-4.3c-0.6-1.3-1.1-2.7-1.6-4
|
||||
C2.8,8.7,2.5,7.6,2.3,7C2.3,6.5,2.1,6.1,2.1,5.8z M2.9,5.9c0,0.2,0.1,0.4,0.1,0.8C3.1,7,3.2,7.5,3.5,8.2C3.7,9,3.9,9.7,4.2,10.6
|
||||
c0.3,0.7,0.7,1.7,1.1,2.7c0.4,1,1,2,1.5,2.9c0.5,1,1.2,1.9,1.9,2.9c0.8,1,1.6,1.9,2.4,2.6c0.2,0.2,0.4,0.2,0.5,0.2
|
||||
c0.2,0,0.4-0.1,0.5-0.2c1.2-1,2.2-2.3,3.2-3.8c1-1.5,1.8-2.8,2.3-4c0.6-1.3,1.1-2.5,1.5-3.9c0.4-1.3,0.7-2.2,0.9-2.8
|
||||
c0.1-0.5,0.2-1,0.3-1.3c0-0.1,0-0.1,0-0.1c0-0.2,0-0.3-0.1-0.4C20.3,5.2,20.2,5.1,20,5L12,2.1c0,0-0.1,0-0.2,0s-0.1,0-0.1,0h-0.2
|
||||
l-8,2.8C3.2,5,3.1,5.2,3,5.3C2.9,5.5,2.9,5.6,2.9,5.8C2.9,5.8,2.9,5.8,2.9,5.9z M5.9,6.7h3l2.8,7l2.8-7h3c-0.1,0.1-0.2,0.5-0.3,0.8
|
||||
C17,7.8,17,8.2,16.8,8.4c-0.1,0.3-0.2,0.5-0.4,0.8c0,0.1-0.1,0.1-0.1,0.1s-0.1,0.1-0.2,0.1c-0.1,0-0.1,0-0.1,0
|
||||
c-0.1,0-0.2,0.1-0.2,0.2c0,0-0.1,0.1-0.1,0.1s-0.1,0.1-0.1,0.1c0,0,0,0.1-0.1,0.2c0,0.1-0.1,0.1-0.1,0.1l-0.4,1.1
|
||||
c-1.3,3.3-2.1,5.2-2.3,5.8h-2.2l-1-2.4c-0.1-0.3-0.3-0.8-0.5-1.3c-0.1-0.3-0.3-0.8-0.5-1.3L8,10.8c-0.1-0.1-0.1-0.2-0.1-0.4
|
||||
C7.8,10.2,7.7,10,7.7,9.8C7.6,9.7,7.5,9.5,7.4,9.4C7.3,9.3,7.3,9.3,7.3,9.3c-0.1,0-0.2,0-0.2,0s-0.1,0-0.1,0
|
||||
C6.6,8.5,6.3,7.6,5.9,6.7z`})}),zne=({opacity:e=1,size:t,color:r})=>(0,Ke.jsx)(Fn,{size:t,opacity:e,color:r,children:(0,Ke.jsx)(jt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M4.19505 16.2545C4.47368 16.561 4.94802 16.5836 5.25451 16.3049L10.2595 11.7549L14.2842 15.2765L19 10.5607V13.75H20.5V9.5V8.75239V8.7476V8H19.7529H19.7471H19H14.75V9.5H17.9393L14.2158 13.2235L10.2405 9.74507L4.2455 15.195C3.93901 15.4737 3.91642 15.948 4.19505 16.2545Z"})}),Hne=({opacity:e=1,size:t,color:r})=>(0,Ke.jsx)(Fn,{size:t,opacity:e,color:r,children:(0,Ke.jsx)(jt.Path,{d:"M15.5 9.5a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm0 1.5a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Zm-2.25 6v-2a2.75 2.75 0 0 0-2.75-2.75h-4A2.75 2.75 0 0 0 3.75 15v2h1.5v-2c0-.69.56-1.25 1.25-1.25h4c.69 0 1.25.56 1.25 1.25v2h1.5Zm7-2v2h-1.5v-2c0-.69-.56-1.25-1.25-1.25H15v-1.5h2.5A2.75 2.75 0 0 1 20.25 15ZM9.5 8.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm1.5 0a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z"})}),Bne=({opacity:e=1,size:t,color:r})=>(0,Ke.jsx)(Fn,{size:t,opacity:e,color:r,children:(0,Ke.jsx)(jt.Path,{d:"M18.5 5.5V8H20V5.5h2.5V4H20V1.5h-1.5V4H16v1.5h2.5ZM12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6h-1.5v6a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h6V4Z"})}),Une=({opacity:e=1,size:t,className:r,color:n})=>(0,Ke.jsxs)(Fn,{className:r,size:t,opacity:e,color:n,children:[(0,Ke.jsx)(jt.Path,{d:"M12 3.17627L18.75 6.24445V10.8183C18.75 14.7173 16.2458 18.4089 12.7147 19.5735C12.2507 19.7265 11.7493 19.7265 11.2853 19.5735C7.75416 18.4089 5.25 14.7173 5.25 10.8183V6.24445L12 3.17627ZM6.75 7.21032V10.8183C6.75 14.1312 8.89514 17.2057 11.7551 18.149C11.914 18.2014 12.086 18.2014 12.2449 18.149C15.1049 17.2057 17.25 14.1312 17.25 10.8183V7.21032L12 4.82396L6.75 7.21032Z"}),(0,Ke.jsx)(jt.Path,{d:"M15.5291 10.0315L11.1818 14.358L8.47095 11.66L9.52907 10.5968L11.1818 12.2417L14.4709 8.96826L15.5291 10.0315Z"})]}),Vne=({opacity:e=1,size:t,color:r})=>(0,Ke.jsx)(Fn,{size:t,opacity:e,color:r,children:(0,Ke.jsx)(jt.Path,{d:"m12 3.176 6.75 3.068v4.574c0 3.9-2.504 7.59-6.035 8.755a2.283 2.283 0 0 1-1.43 0c-3.53-1.164-6.035-4.856-6.035-8.755V6.244L12 3.176ZM6.75 7.21v3.608c0 3.313 2.145 6.388 5.005 7.33.159.053.331.053.49 0 2.86-.942 5.005-4.017 5.005-7.33V7.21L12 4.824 6.75 7.21Z"})}),$ne=({opacity:e=1,size:t,color:r})=>(0,Ke.jsx)(Fn,{size:t,opacity:e,color:r,children:(0,Ke.jsx)(jt.Path,{d:"M17.5 11.5a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm1.5 0a5.5 5.5 0 0 1-9.142 4.121l-3.364 2.943-.988-1.128 3.373-2.952A5.5 5.5 0 1 1 19 11.5Z"})}),Wne=({opacity:e=1,size:t,color:r})=>(0,Ke.jsx)(Fn,{size:t,opacity:e,color:r,children:(0,Ke.jsx)(jt.Path,{d:"M15.5 3.97809V18.0219L7.5 15.5977V20H6V15.1431L3.27498 14.3173C2.22086 13.9979 1.5 13.0262 1.5 11.9248V10.0752C1.5 8.97375 2.22087 8.00207 3.27498 7.68264L15.5 3.97809ZM14 16L7.5 14.0303L7.5 7.96969L14 5.99999V16ZM6 8.42423L6 13.5757L3.70999 12.8818C3.28835 12.754 3 12.3654 3 11.9248V10.0752C3 9.63462 3.28835 9.24595 3.70999 9.11818L6 8.42423ZM17.5 11.75H21.5V10.25H17.5V11.75ZM21.5 16L17.5 15V13.5L21.5 14.5V16ZM17.5 8.5L21.5 7.5V6L17.5 7V8.5Z"})}),Gne=({opacity:e=1,size:t,color:r})=>(0,Ke.jsx)(Fn,{size:t,opacity:e,color:r,children:(0,Ke.jsx)(jt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:`M4.3,6.2c0.8,0,1.6,0.6,1.8,1.4l2.3,7.9c0,0,0,0,0,0l2.7-9.3h1.5h4.2c2.9,0,4.9,1.9,4.9,4.7c0,2.9-2,4.7-5,4.7
|
||||
h-2h-2.5l-0.5,1.5c-0.4,1.4-1.7,2.3-3.2,2.3c-1.4,0-2.7-0.9-3.2-2.3L2.5,8.7C2.1,7.4,3,6.2,4.3,6.2z M13,12.8h2.9c1.3,0,2-0.7,2-1.9
|
||||
c0-1.2-0.8-1.8-2-1.8h-1.7L13,12.8z`})}),Yne=({size:e,className:t=$u["star-icon"],color:r})=>(0,Ke.jsx)(Fn,{className:t,size:e,color:r,children:(0,Ke.jsx)(jt.Path,{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})});var qne=({size:e,className:t=$u.jetpack,color:r})=>(0,Ke.jsxs)(Fn,{className:t,size:e,color:r,viewBox:"0 0 32 32",children:[(0,Ke.jsx)(jt.Path,{className:"jetpack-logo__icon-circle",d:"M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16S24.8,0,16,0z"}),(0,Ke.jsx)(jt.Polygon,{fill:"#fff",points:"15,19 7,19 15,3"}),(0,Ke.jsx)(jt.Polygon,{fill:"#fff",points:"17,29 17,13 25,13"})]}),Xne=({size:e=16,className:t,color:r})=>(0,Ke.jsx)(Fn,{className:t,size:e,color:r,viewBox:"0 0 16 16",children:(0,Ke.jsx)(jt.Path,{fill:"#161722",fillRule:"evenodd",d:"M8.3 4.66C3.85 5.308.727 9.75.034 13.69l-.02.117c-.137.842.809 1.232 1.446.68 2.013-1.745 3.648-2.475 5.318-2.719a10.482 10.482 0 011.524-.103v2.792c0 .694.82 1.041 1.3.55l6.176-6.307a.79.79 0 00.012-1.088L9.614 1.004C9.14.496 8.301.84 8.301 1.542v3.117zm1.525-1.175v1.85a.773.773 0 01-.654.77l-.655.096c-2.133.311-3.987 1.732-5.295 3.672-.472.7-.854 1.44-1.143 2.18a12.32 12.32 0 011.675-.972c1.58-.75 3.048-.972 4.548-.972h.762a.77.77 0 01.762.779v1.69l4.347-4.44-4.347-4.653z",clipRule:"evenodd"})}),Kne=({size:e=24,color:t="#069e08"})=>(0,Ke.jsxs)(Fn,{color:t,size:e,viewBox:"0 0 32 32",children:[(0,Ke.jsx)(jt.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,Ke.jsx)(jt.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,Ke.jsx)(jt.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"})]}),Zne=({opacity:e=1,size:t,color:r})=>(0,Ke.jsx)(Fn,{size:t,opacity:e,color:r,children:(0,Ke.jsx)(jt.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M11.25 5H12.75V20H11.25V5ZM6 10H7.5V20H6V10ZM18 14H16.5V20H18V14Z"})}),Qne={"anti-spam":Lne,backup:Fne,boost:zne,crm:Hne,extras:Bne,protect:Une,scan:Vne,search:$ne,social:Wne,star:Yne,videopress:Gne,jetpack:qne,share:Xne,ai:Kne,stats:Zne},tDe={...Qne};var Fi=({serviceName:e,className:t,iconSize:r})=>(0,Ke.jsx)(QD.SocialLogo,{className:Y($u.socialIcon,$u[e],t),icon:e,size:r||24});var Km=m(R(),1),x_=m(U(),1);typeof process>"u",Ye("75307ce846",":where(._59ace9150608bcd8__global) *{box-sizing:border-box}");var JD={global:"_59ace9150608bcd8__global"};var Jne={"--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)"},eoe={"--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 )"},toe={"--jp-border-radius":"4px","--jp-menu-border-height":"1px","--jp-underline-thickness":"2px"},roe={"--spacing-base":"8px"},tj={},ej=(e,t,r)=>{let n={...Jne,...eoe,...toe,...roe};for(let o in n)e.style.setProperty(o,n[o]);r&&e.classList.add(JD.global),t&&(tj[t]={provided:!0,root:e})},noe=({children:e=null,targetDom:t,id:r,withGlobalStyles:n=!0})=>{let o=(0,x_.useRef)(),i=tj?.[r]?.provided;return(0,x_.useLayoutEffect)(()=>{if(!i){if(t)return ej(t,r,n);o?.current&&ej(o.current,r,n)}},[t,o,i,r,n]),t?(0,Km.jsx)(Km.Fragment,{children:e}):(0,Km.jsx)("div",{ref:o,children:e})},Kl=noe;var w_=m(Ee(),1),t7=m(Ca(),1);function Wu(){let e=(0,w_.useDispatch)(t7.store),t=(0,w_.useSelect)(r=>r(t7.store).getNotices(),[]);return{...e,create
Line truncated
|
||||
${u?`a${s},${s} 0 0 1 ${s},${s}`:`h${s}v${s}`}
|
||||
v${i-g}
|
||||
${o?`a${s},${s} 0 0 1 ${-s},${s}`:`v${s}h${-s}`}
|
||||
h${g-f}
|
||||
${n?`a${s},${s} 0 0 1 ${-s},${-s}`:`h${-s}v${-s}`}
|
||||
v${g-i}
|
||||
${d?`a${s},${s} 0 0 1 ${s},${-s}`:`v${-s}h${s}`}
|
||||
z`.split(`
|
||||
`).join("")}function Sg(e){let{children:t,className:r,innerRef:n,x:o,y:i,width:a,height:s,radius:l,all:c=!1,top:d=!1,bottom:u=!1,left:f=!1,right:h=!1,topLeft:p=!1,topRight:g=!1,bottomLeft:y=!1,bottomRight:b=!1,..._}=e,v=zue({x:o,y:i,width:a,height:s,radius:l,all:c,top:d,bottom:u,left:f,right:h,topLeft:p,topRight:g,bottomLeft:y,bottomRight:b});return t?(0,wg.jsx)(wg.Fragment,{children:t({path:v})}):(0,wg.jsx)("path",{ref:n,className:(0,OV.default)("visx-bar-rounded",r),d:v,..._})}var Hue=m(Oe(),1);var MV=m(R(),1);var Bue=m(Oe(),1);var IV=m(R(),1);var Uue=m(Oe(),1);function ci(e){return e?.[0]}function po(e){return e?.[1]}var DV=m(R(),1);var Vue=m(Oe(),1);var jV=m(R(),1);var $ue=m(Oe(),1);var LV=m(R(),1);var Wue=m(Oe(),1);var FV=m(R(),1);var Gue=m(Oe(),1);var zV=m(R(),1);var Yue=m(Oe(),1);var HV=m(R(),1);var que=m(Oe(),1);var BV=m(R(),1);var Xue=m(Oe(),1);var UV=m(R(),1);var Kue=m(Oe(),1);var VV=m(R(),1);var Zue=m(Oe(),1);var $V=m(R(),1);var Que=m(Oe(),1);var WV=m(R(),1);var Jue=m(Oe(),1);var GV=m(R(),1);var efe=m(Oe(),1);var YV=m(R(),1);var tfe=m(Oe(),1);var qV=m(R(),1);var nfe=m(Oe(),1);var XV=m(R(),1);var ofe=m(Oe(),1),ife=m(R(),1);var KV=m(U(),1);var afe=m(R(),1);var cfe={top:"top",left:"left",right:"right",bottom:"bottom"},dr=cfe;function U9(e){let{labelOffset:t,labelProps:r,orientation:n,range:o,tickLabelFontSize:i,tickLength:a}=e,s=n===dr.left||n===dr.top?-1:1,l,c,d;if(n===dr.top||n===dr.bottom){let u=n===dr.bottom&&typeof r.fontSize=="number"?r.fontSize:0;l=(Number(o[0])+Number(o[o.length-1]))/2,c=s*(a+t+i+u)}else l=s*((Number(o[0])+Number(o[o.length-1]))/2),c=-(a+t),d=`rotate(${s*90})`;return{x:l,y:c,transform:d}}var ZV=m(Oe(),1);var Eg=m(R(),1);function V9(e){let{hideTicks:t,horizontal:r,orientation:n,tickClassName:o,tickComponent:i,tickLabelProps:a,tickStroke:s="#222",tickTransform:l,ticks:c,strokeWidth:d,tickLineProps:u}=e;return c.map(f=>{let{value:h,index:p,from:g,to:y,formattedValue:b}=f,_=a[p]??{},v=Math.max(10,typeof _.fontSize=="number"&&_.fontSize||0),x=y.y+(r&&n!==dr.top?v:0);return(0,Eg.jsxs)(ut,{className:(0,ZV.default)("visx-axis-tick",o),transform:l,children:[!t&&(0,Eg.jsx)(Ki,{from:g,to:y,stroke:s,strokeWidth:d,strokeLinecap:"square",...u}),i?i({..._,x:y.x,y:x,formattedValue:b}):(0,Eg.jsx)(Cn,{x:y.x,y:x,..._,children:b})]},`visx-tick-${h}-${p}`)})}var Fd=m(R(),1),QV={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function W9(e){let{axisFromPoint:t,axisLineClassName:r,axisToPoint:n,hideAxisLine:o,hideTicks:i,horizontal:a,label:s="",labelClassName:l,labelOffset:c=14,labelProps:d,orientation:u=dr.bottom,scale:f,stroke:h="#222",strokeDasharray:p,strokeWidth:g=1,tickClassName:y,tickComponent:b,tickLineProps:_,tickLabelProps:v,tickLength:x=8,tickStroke:C="#222",tickTransform:w,ticks:S,ticksComponent:k=V9}=e,E={...QV,...d},P={...QV,...typeof v=="object"?v:null},T=S.map(A=>{let{value:N,index:D}=A;return typeof v=="function"?v(N,D,S):P}),I=Math.max(10,...T.map(A=>typeof A.fontSize=="number"?A.fontSize:0));return(0,Fd.jsxs)(Fd.Fragment,{children:[k({hideTicks:i,horizontal:a,orientation:u,scale:f,tickClassName:y,tickComponent:b,tickLabelProps:T,tickStroke:C,tickTransform:w,ticks:S,strokeWidth:g,tickLineProps:_}),!o&&(0,Fd.jsx)(Ki,{className:(0,$9.default)("visx-axis-line",r),from:t,to:n,stroke:h,strokeWidth:g,strokeDasharray:p}),s&&(0,Fd.jsx)(Cn,{className:(0,$9.default)("visx-axis-label",l),...U9({labelOffset:c,labelProps:E,orientation:u,range:f.range(),tickLabelFontSize:I,tickLength:x}),...E,children:s})]})}function G9(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"center",r=e;if(t!=="start"&&"bandwidth"in r){let n=r.bandwidth();return t==="center"&&(n/=2),r.round()&&(n=Math.round(n)),o=>{let i=r(o);return typeof i=="number"?i+n:i}}return e}function Y9(e){let t=e;return"tickFormat"in t?t.tickFormat():Nv}function qf(e,t){let{x:r,y:n}=e;return new Fr(t?{x:r,y:n}:{x:n,y:r})}function q9(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return typeof e=="number"?{start:e,end:e}:{start:0,end:0,...e}}var e$=m(R(),1);function zs(e){let{children:t=W9,axisClassName:r,hideAxisLine:n=!1,hideTicks:o=!1,hideZero:i=!1,innerRef:a,left:s=0,numTicks:l=10,orientation:c=dr.bottom,rangePadding:d=0,scale:u,tickFormat:f,tickLength:h=8,tickValues:p,top:g=0,...y}=e,b=f??Y9(u),_=c===dr.left,v=c===dr.top,x=v||c===dr.bottom,C=G9(u),w=_||v?-1:1,S=u.range(),k=q9(d),E=qf({x:Number(S[0])+.5-k.start,y:0},x),P=qf({x:Number(S[S.length-1])+.5+k.end,y:0},x),T=(p??ni(u,l)).filter(A=>!i||A!==0&&A!=="0").map((A,N)=>({value:A,index:N})),I=T.map(A=>{let{value:N,index:D}=A,F=Ar(C(N));return{value:N,index:D,from:qf({x:F,y:0},x),to:qf({x:F,y:h*w},x),formattedValue:b(N,D,T)}});return(0,e$.jsx)(ut,{className:(0,JV.default)("visx-axis",r),innerRef:a,top:g,left:s,children:t({...y,axisFromPoint:E,axisToPoint:P,hideAxisLine:n,hideTicks:o,hideZero:i,horizontal:x,numTicks:l,orientation:c,rangePadding:d,scale:u,tickFormat:b,tickLength:h,tickPosition:C,tickSign:w,ticks:I})})}var lfe=m(Oe(),1);var
Line truncated
|
||||
${v?.htmlLabel?.color?`${v?.htmlLabel?.color}55`:"#22222255"}`,...v?.htmlLabel},...b,children:F})]})]})}function f2(e){return(0,pi.useContext)(Do)?.tooltipOpen?(0,Pr.jsx)(Yfe,{...e}):null}var Fg=m(U(),1);var Zi=m(U(),1);function Ga(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{leading:n=!1}=r,o,i=null,a;function s(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];n&&o===void 0?(e.apply(this,c),i=null):(i=c,a=this),clearTimeout(o),o=setTimeout(()=>{o=void 0,i!==null&&(e.apply(a,i),i=null,a=void 0)},t)}return s.cancel=function(){clearTimeout(o),o=void 0,i=null,a=void 0},s}var qfe=[],x$={width:0,height:0,top:0,left:0};function tp(){let{initialSize:e=x$,debounceTime:t=300,ignoreDimensions:r=qfe,enableDebounceLeadingCall:n=!0,resizeObserverPolyfill:o,externalRef:i}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},[a,s]=(0,Zi.useState)(null),l=(0,Zi.useCallback)(h=>{s(h),typeof i=="function"?i(h):i!=null&&(i.current=h)},[i]),c=(0,Zi.useRef)(0),[d,u]=(0,Zi.useState)({...x$,...e}),f=(0,Zi.useMemo)(()=>{let h=Array.isArray(r)?r:[r];return Ga(p=>{u(g=>Object.keys(g).filter(v=>g[v]!==p[v]).every(v=>h.includes(v))?g:p)},t,{leading:n})},[t,n,r]);return(0,Zi.useEffect)(()=>{if(!a){f.cancel();return}let h=o||window.ResizeObserver,p=new h(g=>{g.forEach(y=>{let{left:b,top:_,width:v,height:x}=y?.contentRect??{};c.current=window.requestAnimationFrame(()=>{f({width:v,height:x,top:_,left:b})})})});return p.observe(a),()=>{window.cancelAnimationFrame(c.current),p.disconnect(),f.cancel()}},[a,f,o]),{parentRef:l,node:a,resize:f,...d}}var oC=m(R(),1),Xfe={width:"100%",height:"100%",position:"relative"},Kfe={position:"absolute",top:0,right:0,bottom:0,left:0,overflow:"hidden"};function p2(e){let{className:t,children:r,debounceTime:n,ignoreDimensions:o,initialSize:i,parentSizeStyles:a,enableDebounceLeadingCall:s=!0,resizeObserverPolyfill:l,style:c,...d}=e,{parentRef:u,node:f,resize:h,...p}=tp({initialSize:i,debounceTime:n,ignoreDimensions:o,enableDebounceLeadingCall:s,resizeObserverPolyfill:l}),g=a?{position:"relative",...a,...c}:{...Xfe,...c};return(0,oC.jsx)("div",{style:g,className:t,...d,children:(0,oC.jsx)("div",{style:Kfe,ref:u,children:r({...p,ref:f,resize:h})})})}var Zfe=m(R(),1);var Qfe=m(U(),1);var Jfe=m(R(),1);var epe=m(U(),1);var tpe=m(R(),1);var iC=m(U(),1);var dl=m(U(),1);var w$=m(U(),1),rpe=(0,w$.createContext)(null),Pg=rpe;function jo(e,t,r){let n=(0,dl.useContext)(Pg),o=(0,dl.useRef)(void 0);o.current=r;let i=(0,dl.useCallback)((a,s,l)=>{n&&n.emit(a,{event:s,svgPoint:Ph(s),source:l})},[n]);return(0,dl.useEffect)(()=>{if(n&&e&&t){let a=s=>{(!o.current||s?.source&&o.current?.includes(s.source))&&t(s)};return n.on(e,a),()=>n?.off(e,a)}},[n,e,t]),n?i:null}var C$=m(U(),1);function S$(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n&&n.push(r)||e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&n.splice(n.indexOf(r)>>>0,1)},emit:function(t,r){(e.get(t)||[]).slice().map(function(n){n(r)}),(e.get("*")||[]).slice().map(function(n){n(t,r)})}}}var E$=m(R(),1);function m2(e){let{children:t}=e,r=(0,C$.useMemo)(()=>S$(),[]);return(0,E$.jsx)(Pg.Provider,{value:r,children:t})}var Us=m(U(),1);var k$=m(R(),1);function h2(e){let{hideTooltipDebounceMs:t=400,children:r}=e,{tooltipOpen:n,tooltipLeft:o,tooltipTop:i,tooltipData:a,updateTooltip:s,hideTooltip:l}=Bs(void 0),c=(0,Us.useRef)(null);function d(){c.current&&(c.current.cancel(),c.current=null)}(0,Us.useEffect)(()=>d,[]);let u=(0,Us.useRef)(p=>{let{svgPoint:g,index:y,key:b,datum:_,distanceX:v,distanceY:x}=p;d();let C=at(v)?v:1/0,w=at(x)?x:1/0,S=Math.sqrt(C**2+w**2);s(k=>{let{tooltipData:E}=k,P=E?.nearestDatum&&at(E.nearestDatum.distance)?E.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:g?.x,tooltipTop:g?.y,tooltipData:{nearestDatum:(E?.nearestDatum?.key??"")!==b&&P<S?E?.nearestDatum:{key:b,index:y,datum:_,distance:S},datumByKey:{...E?.datumByKey,[b]:{datum:_,index:y,key:b}}}}})}),f=(0,Us.useCallback)(()=>{c.current=Ga(l,t),c.current()},[l,t]),h=(0,Us.useMemo)(()=>({tooltipOpen:n,tooltipLeft:o,tooltipTop:i,tooltipData:a,updateTooltip:s,showTooltip:u.current,hideTooltip:f}),[f,a,o,n,i,s]);return(0,k$.jsx)(Do.Provider,{value:h,children:r})}var Mg=m(U(),1);var T$=m(U(),1);var an={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e8f7ff","#ccedff","#a3daff","#72c3fc","#4dadf7","#329af0","#228ae6","#1c7cd6","#1b6ec2","#1862ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#10
Line truncated
|
||||
M ${3/4*t},${5/4*t} l ${t/2},${-t/2}`;case vp.diagonalRightToLeft:return`M 0,0 l ${t},${t}
|
||||
M ${-t/4},${3/4*t} l ${t/2},${t/2}
|
||||
M ${3/4*t},${-t/4} l ${t/2},${t/2}`;case vp.vertical:default:return`M ${t/2}, 0 l 0, ${t}`}}function Ax(e){let{id:t,width:r,height:n,stroke:o,strokeWidth:i,strokeDasharray:a,strokeLinecap:s="square",shapeRendering:l="auto",orientation:c=["vertical"],background:d,className:u}=e,f=Array.isArray(c)?c:[c];return(0,Gg.jsxs)(hl,{id:t,width:r,height:n,children:[!!d&&(0,Gg.jsx)("rect",{className:(0,OC.default)("visx-pattern-line-background"),width:r,height:n,fill:d}),f.map((h,p)=>(0,Gg.jsx)("path",{className:(0,OC.default)("visx-pattern-line",u),d:hhe({orientation:h,height:n}),stroke:o,strokeWidth:i,strokeDasharray:a,strokeLinecap:s,shapeRendering:l},`visx-${t}-line-${h}-${p}`))]})}var MC=m(Oe(),1);var xp=m(R(),1);function Px(e){let{id:t,width:r,height:n,radius:o=2,fill:i,stroke:a,strokeWidth:s,strokeDasharray:l,background:c,complement:d=!1,className:u}=e,f;return d&&(f=[[0,0],[0,n],[r,0],[r,n]]),(0,xp.jsxs)(hl,{id:t,width:r,height:n,children:[!!c&&(0,xp.jsx)("rect",{width:r,height:n,fill:c}),(0,xp.jsx)("circle",{className:(0,MC.default)("visx-pattern-circle",u),cx:r/2,cy:n/2,r:o,fill:i,stroke:a,strokeWidth:s,strokeDasharray:l}),f?.map(h=>{let[p,g]=h;return(0,xp.jsx)("circle",{className:(0,MC.default)("visx-pattern-circle visx-pattern-circle-complement",u),cx:p,cy:g,r:o,fill:i,stroke:a,strokeWidth:s,strokeDasharray:l},`${t}-complement-${p}-${g}`)})]})}var GW=m(Oe(),1);var WW=m(Oe(),1);var Yg=m(R(),1);function wp(e){let{id:t,width:r,height:n,path:o,fill:i="transparent",stroke:a,strokeWidth:s,strokeDasharray:l,strokeLinecap:c="square",shapeRendering:d="auto",background:u,className:f}=e;return(0,Yg.jsxs)(hl,{id:t,width:r,height:n,children:[!!u&&(0,Yg.jsx)("rect",{width:r,height:n,fill:u}),(0,Yg.jsx)("path",{className:(0,WW.default)("visx-pattern-path",f),d:o,fill:i,stroke:a,strokeWidth:s,strokeDasharray:l,strokeLinecap:c,shapeRendering:d})]})}var YW=m(R(),1);function Nx(e){let{id:t,width:r,height:n,fill:o,stroke:i,strokeWidth:a,strokeDasharray:s,strokeLinecap:l,shapeRendering:c,background:d,className:u}=e;return(0,YW.jsx)(wp,{className:(0,GW.default)("visx-pattern-wave",u),path:`M 0 ${n/2} c ${n/8} ${-n/4} , ${n*3/8} ${-n/4} , ${n/2} 0
|
||||
c ${n/8} ${n/4} , ${n*3/8} ${n/4} , ${n/2} 0 M ${-n/2} ${n/2}
|
||||
c ${n/8} ${n/4} , ${n*3/8} ${n/4} , ${n/2} 0 M ${n} ${n/2}
|
||||
c ${n/8} ${-n/4} , ${n*3/8} ${-n/4} , ${n/2} 0`,id:t,width:r,height:n,fill:o,stroke:i,strokeWidth:a,strokeDasharray:s,strokeLinecap:l,shapeRendering:c,background:d})}var qW=m(Oe(),1);var XW=m(R(),1);function Ox(e){let{id:t,height:r,fill:n,stroke:o,strokeWidth:i,strokeDasharray:a,strokeLinecap:s,shapeRendering:l,background:c,className:d,size:u=3}=e,f=Math.sqrt(u);return(0,XW.jsx)(wp,{className:(0,qW.default)("visx-pattern-hexagon",d),path:`M ${r},0 l ${r},0 l ${r/2},${r*f/2} l ${-r/2},${r*f/2} l ${-r},0 l ${-r/2},${-r*f/2} Z M 0,${r*f/2} l ${r/2},0 M ${3*r},${r*f/2} l ${-r/2},0`,id:t,width:u,height:f,fill:n,stroke:o,strokeWidth:i,strokeDasharray:a,strokeLinecap:s,shapeRendering:l,background:c})}var Kt=m(U(),1),Yr=m(U(),1);function ghe(e){let[t,r]=(0,Yr.useState)(!0),[n,o]=(0,Yr.useState)(null),[i,a]=(0,Yr.useState)(!1),s=()=>{r(!1),a(!0)};return(0,Yr.useEffect)(()=>{if(!document){let u=new Error(`[ScriptLoadingError] document not defined when attempting to load ${e}`);o(u);return}let l=document.querySelector(`script[src="${e}"]`);if(l?.dataset.loaded){s();return}let c=l||document.createElement("script");l||(c.src=e);let d=()=>{c.dataset.loaded="1",s()};c.addEventListener("load",d),c.addEventListener("error",u=>{console.error("Failed to load script:",e,u);let f=new Error(`[ScriptLoadingError] Failed to load script: ${e}`);o(f)}),l||document.head.append(c)},[]),{isLoading:t,error:n,isSuccess:i}}var bhe=e=>e&&e.charts,KW=(e,t)=>{let{controls:r,toolbarItems:n,getChartEditor:o}=e;return t&&t.charts&&t.visualization&&t.visualization.ChartWrapper&&t.visualization.Dashboard&&(!r||t.visualization.ChartWrapper)&&(!o||t.visualization.ChartEditor)&&(!n||t.visualization.drawToolbar)},_he=e=>window.google;function yhe(e){let{chartVersion:t="current",chartPackages:r=["corechart","controls"],chartLanguage:n="en",mapsApiKey:o}=e,[i,a]=(0,Yr.useState)(null),[s,l]=(0,Yr.useState)(null),[c,d]=(0,Yr.useState)(null),{isLoading:u,error:f,isSuccess:h}=ghe(e.chartLoaderScriptUrl||"https://www.gstatic.com/charts/loader.js");return(0,Yr.useEffect)(()=>{if(!h)return;let p=_he();if(!bhe(p)){let g=new Error("[ScriptInitializationError] Script loaded but Google not attached to window.");l(g);return}if(KW(e,p)){a(p);return}p.charts.load(t,{packages:r,language:n,mapsApiKey:o}),p.charts.setOnLoadCallback(()=>{if(!KW(e,p)){let g=new Error("[GoogleChartsInitializationError] Google Charts not ready after load callback.");console.error(g),d(g);return}a(p)})},[h]),{error:f||s||c,isLoading:u,google:i}}var JW={legend_toggle:!1,options:{},legendToggle:!1,getChartWrapper:()=>{},spreadSheetQueryParameters:{headers:1,gid:1},rootProps:{},chartWrapperParams:{},chartLoaderScriptUrl:"https://www.gstatic.com/charts/loader.js"},vhe=e=>{let{isReady:t,chartControls:r,filter:n}=e;return!t||!r||!r?.length?null:Yr.default.createElement(Yr.default.Fragment,null,r.filter(o=>{let{controlProp:i,control:a}=o;return n?n({control:a,controlProp:i}):!0}).map(o=>{let{control:i}=o;return Yr.default.createElement("div",{key:i.getContainerId(),id:i.getContainerId()})}))},ZW=0,eG=()=>(ZW+=1,`reactgooglegraph-${ZW}`),Mx=class{static initializeControls=t=>{for(let r=0;r<t.length;r+=1){let{controlType:n,options:o,controlWrapperParams:i}=t[r].controlProp;i&&"state"in i&&t[r].control.setState(i.state),t[r].control.setOptions(o),t[r].control.setControlType(n)}};static listenToControlEvents=(t,r)=>{let{google:n}=r;return t.flatMap(o=>{let{control:i,controlProp:a}=o,{controlEvents:s=[]}=a;return s.map(l=>{let{callback:c,eventName:d}=l;return n.visualization.events.addListener(i,d,function(){for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];c({chartWrapper:null,controlWrapper:i,props:r,google:n,eventArgs:f})})})})};static createControlId=t=>{let r;return typeof t>"u"?r=`googlechart-control-${eG()}`:r=t,r};static createChartControls=t=>{let{controls:r,google:n}=t;return r?r.map((o,i)=>{let{controlID:a,controlType:s,options:l,controlWrapperParams:c}=o,d=this.createControlId(a);return{controlProp:o,control:new n.visualization.ControlWrapper({containerId:d,controlType:s,options:l,...c})}}):null};static addControls=t=>{let{chartWrapper:r,chartDashboard:n}=t,o=this.createChartControls(t);return!o||!n||!r?null:(n.bind(o.map(i=>{let{control:a}=i;return a}),r),this.initializeControls(o),o)}},xhe=e=>{let[t,r]=Kt.useState(null);return[Kt.useMemo(()=>!t||!e?null:e.map((o,i)=>{let a=t[i];return a?{controlProp:o,control:a}:void 0}).flatMap(o=>o?[o]:[]),[t,e]),r]},whe=(e,t)=>{Kt.useEffect(()=>{let r=Mx.listenToControlEvents(e??[],t);return()=>{r.forEach(n=>{t.google.visualization.events.removeListener(n)})}},[e,t])},She=e=>{let[t,r]=xhe(e.controls);return whe(t??[],e),{addControls:o=>{let i=Mx.addControls(o);r(i?.map(a=>a.control)??null)},renderControl:o=>{let{chartWrapper:i,chartDashboard:a}=e;return Kt.createElement(vhe,{...e,isReady:!!(i&&a),chartControls:t,filter:o})}}},Che=e=>{let t=Kt.useRef(null);return{chartId:(()=>{let{graphID:o,graph_id:i}=e,a=o||i,s;retu
Line truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fhe(e,t){return Dhe(e)||jhe(e,t)||zhe(e,t)||Lhe()}function zhe(e,t){if(e){if(typeof e=="string")return rG(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rG(e,t):void 0}}var gG=Object.entries,nG=Object.setPrototypeOf,Hhe=Object.isFrozen,Bhe=Object.getPrototypeOf,Uhe=Object.getOwnPropertyDescriptor,cn=Object.freeze,ln=Object.seal,Cp=Object.create,bG=typeof Reflect<"u"&&Reflect,zC=bG.apply,HC=bG.construct;cn||(cn=function(t){return t});ln||(ln=function(t){return t});zC||(zC=function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return t.apply(r,o)});HC||(HC=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return new t(...n)});var Xg=Nr(Array.prototype.forEach),Vhe=Nr(Array.prototype.lastIndexOf),oG=Nr(Array.prototype.pop),Sp=Nr(Array.prototype.push),$he=Nr(Array.prototype.splice),bl=Array.isArray,Qg=Nr(String.prototype.toLowerCase),IC=Nr(String.prototype.toString),iG=Nr(String.prototype.match),Kg=Nr(String.prototype.replace),aG=Nr(String.prototype.indexOf),Whe=Nr(String.prototype.trim),Ghe=Nr(Number.prototype.toString),Yhe=Nr(Boolean.prototype.toString),sG=typeof BigInt>"u"?null:Nr(BigInt.prototype.toString),cG=typeof Symbol>"u"?null:Nr(Symbol.prototype.toString),qr=Nr(Object.prototype.hasOwnProperty),Zg=Nr(Object.prototype.toString),sn=Nr(RegExp.prototype.test),Wd=qhe(TypeError);function Nr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return zC(e,t,n)}}function qhe(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return HC(e,r)}}function xt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qg;if(nG&&nG(e,null),!bl(t))return e;let n=t.length;for(;n--;){let o=t[n];if(typeof o=="string"){let i=r(o);i!==o&&(Hhe(t)||(t[n]=i),o=i)}e[o]=!0}return e}function Xhe(e){for(let t=0;t<e.length;t++)qr(e,t)||(e[t]=null);return e}function Xn(e){let t=Cp(null);for(let n of gG(e)){var r=Fhe(n,2);let o=r[0],i=r[1];qr(e,o)&&(bl(i)?t[o]=Xhe(i):i&&typeof i=="object"&&i.constructor===Object?t[o]=Xn(i):t[o]=i)}return t}function Khe(e){switch(typeof e){case"string":return e;case"number":return Ghe(e);case"boolean":return Yhe(e);case"bigint":return sG?sG(e):"0";case"symbol":return cG?cG(e):"Symbol()";case"undefined":return Zg(e);case"function":case"object":{if(e===null)return Zg(e);let t=e,r=Ja(t,"toString");if(typeof r=="function"){let n=r(t);return typeof n=="string"?n:Zg(n)}return Zg(e)}default:return Zg(e)}}function Ja(e,t){for(;e!==null;){let n=Uhe(e,t);if(n){if(n.get)return Nr(n.get);if(typeof n.value=="function")return Nr(n.value)}e=Bhe(e)}function r(){return null}return r}function Zhe(e){try{return sn(e,""),!0}catch{return!1}}var lG=cn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),DC=cn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),jC=cn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Qhe=cn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph"
Line truncated
|
||||
`+hr),qe&&(hr=S0(hr)),w&&Re?I(hr):hr},t.setConfig=function(){let be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ew(be),ve=!0,He=X,wt=ne},t.clearConfig=function(){eu=null,ve=!1,He=null,wt=null,w=k,S=""},t.isValidAttribute=function(be,M,G){eu||Ew({});let ge=ir(be),Pe=ir(M);return JE(ge,Pe,G)},t.addHook=function(be,M){typeof M=="function"&&qr(q,be)&&Sp(q[be],M)},t.removeHook=function(be,M){if(qr(q,be)){if(M!==void 0){let G=Vhe(q[be],M);return G===-1?void 0:$he(q[be],G,1)[0]}return oG(q[be])}},t.removeHooks=function(be){qr(q,be)&&(q[be]=[])},t.removeAllHooks=function(){q=hG()},t}var BC=_G();var Jg=function(){return Jg=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Jg.apply(this,arguments)};function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dx.apply(null,arguments)}var mge=Object.create,lY=Object.defineProperty,hge=Object.getOwnPropertyDescriptor,gge=Object.getOwnPropertyNames,bge=Object.getPrototypeOf,_ge=Object.prototype.hasOwnProperty,d0=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),yge=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=gge(t),i=0,a=o.length,s;i<a;i++)s=o[i],!_ge.call(e,s)&&s!==r&&lY(e,s,{get:(l=>t[l]).bind(null,s),enumerable:!(n=hge(t,s))||n.enumerable});return e},dY=(e,t,r)=>(r=e!=null?mge(bge(e)):{},yge(t||!e||!e.__esModule?lY(r,"default",{value:e,enumerable:!0}):r,e)),uY=(0,j.createContext)(null),yl=uY,vge=()=>{let e=(0,j.useContext)(uY);if(!e)throw new Error("useChartInstanceContext must be used within a Chart component");return e},xge=vge;function yi(e,t){return Object.assign(e,t)}var wge=e=>{let t=e.indexOf("T");return t===-1?!1:e.endsWith("Z")?!0:/[+-]\d{2}:?\d{2}$/.test(e.slice(t+1))},Sge=e=>{let t=e.trim();if(wge(t)){let r=NW(t);return SC(r)?r:new Date(NaN)}for(let r of["yyyy-MM-dd","yyyy-MM-dd HH:mm:ss","yyyy-MM-dd HH:mm","yyyy-MM-dd'T'HH:mm:ss","yyyy-MM-dd'T'HH:mm:ss.SSS","yyyy-MM-dd'T'HH:mm"]){let n=PW(t,r,new Date);if(SC(n))return n}return new Date(NaN)},fY=(e,t="number",{decimals:r,useMultipliers:n=!1,signDisplay:o}={})=>{if(e==null)return"";let i=Number(e);if(isNaN(i))return"";switch(t){case"currency":return`$${n?Yl(i,{decimals:r??2,numberFormatOptions:{maximumFractionDigits:r??2,signDisplay:o}}):To(i,{decimals:r??2,numberFormatOptions:{signDisplay:o}})}`;case"average":return Number.isFinite(i)?To(i,{decimals:r??0,numberFormatOptions:{style:"percent",signDisplay:o??"exceptZero"}}):"\u2014";default:return n?Yl(i,{decimals:r??0,numberFormatOptions:{maximumFractionDigits:r??0,signDisplay:o}}):To(i,{decimals:r??0,numberFormatOptions:{signDisplay:o}})}},zx=e=>To(e/100,{numberFormatOptions:{style:"percent",minimumFractionDigits:0,maximumFractionDigits:2}}),Cge=(e,t,r)=>{let n=e.map(o=>t(o,0,[]));return Es(n.reduce((o,i)=>o.length>=i.length?o:i,n[0]),r)};function pY(e,t,r){let n=r?.lineChart?.lineStyles?.[e.options?.type],o=r?.seriesLineStyles?.[t%r.seriesLineStyles.length];return e.options?.seriesLineStyle??n??o??{}}function mY(e,t,r){let n=e.options?.type;return(n&&r?.barChart?.barStyles?.[n])??{}}function Ege(e,t,r,n){let o=e.options?.legendShapeStyle??{},i=n==="line"?pY(e,t,r):{},a=n!=="line"?mY(e,t,r).opacity:void 0,s=a!==void 0?{opacity:a}:{},l=r.legend?.shapeStyles?.[t],c={...o,...i};return{...Object.values(c).some(d=>d!=null&&d!=="")?c:l??{},...s}}var rE=()=>typeof navigator<"u"&&navigator.userAgent?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1;function kge(e,t){return(0,qx.default)(e,t,{arrayMerge:(r,n)=>n})}var Tge=e=>typeof e=="string"&&/^#[0-9a-fA-F]{6}$/.test(e),hY=e=>{if(!Tge(e))throw typeof e!="string"?new Error("Hex color must be a string"):e.startsWith("#")?e.length!==7?new Error("Hex color must be 7 characters long (e.g., #ff0000)"):new Error("Hex color contains invalid characters. Only 0-9, a-f, A-F are allowed"):new Error("Hex color must start with #")},Rge=(e,t)=>{if(hY(e),typeof t!="number"||isNaN(t))throw new Error("Alpha must be a number");return ri(e).copy({opacity:t}).formatRgb()},Age=(e,t)=>{let[r,n,o]=e,[i,a,s]=t,l=Math.abs(r-i);return l=Math.min(l,360-l),Math.sqrt(Math.pow(l*2,2)+Math.pow((o-s)*1,2)+Math.pow((n-a)*.5,2))};var a0=(e,t,r,n=0)=>{if(!e||typeof e!="string")return"";if(/^#[0-9a-fA-F]{6}$/.test(e))return e;let o=e.trim().toLowerCase();if(/^#[0-9a-f]{3}$/i.test(o)){let a=o[1],s=o[2],l=o[3];return`#${a}${a}${s}${s}${l}${l}`}if(o.startsWith("--")||o.startsWith("var(")){if(r){let a=r(e,t);if(a&&a!==e&&n<10)return a0(a,t,r,n+1)}return e}if(o.startsWith("hsl(")||o.startsWith("hsla(")||o.startsWith("rgb(")||o.startsWith("rgba(")){let a=ri(o);return a?a.formatHex():e}let i=ri(o);return i?i.formatHex():e},Pge=(e,t)=>{hY(e);let r=parseInt(e.slice(1,3),16),n=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16),i=Math.round(r+(255-r)*
Line truncated
|
||||
.visx-bar[fill="url(#${Re})"],
|
||||
.bar-chart__comparison-bars rect[fill="url(#${Re})"] {
|
||||
stroke: ${Ce};
|
||||
stroke-width: 1;
|
||||
}
|
||||
`},[x]),qe=(0,j.useCallback)(()=>{if(B===void 0)return"";let fe=J.length,Ce=Math.max(...J.map(Ft=>Ft.series.data.length)),Re=Math.floor(B/fe),Ue=B%fe;if(Re>=Ce||Ue>=fe)return"";let dt=J[Ue]?.series;return!dt||Re>=dt.data.length?"":`
|
||||
.bar-chart[data-chart-id="bar-chart-${x}"] .visx-bar-group .visx-bar:nth-child(${Ue*Ce+Re+1}) {
|
||||
stroke: #005fcc;
|
||||
stroke-width: 2px;
|
||||
}
|
||||
`},[B,J,x]),Vt=E1e(w);Xd({chartId:x,legendItems:k,chartType:"bar",isDataValid:!Vt,metadata:(0,j.useMemo)(()=>({orientation:f,withPatterns:h}),[f,h])});let he=qd();if(Vt)return(0,O.jsx)("div",{className:Y("bar-chart",ts["bar-chart"]),children:Vt});let ve=c??E.gridVisibility,He=qe(),wt=l.position??"bottom",Fe=s&&(0,O.jsx)(zr,{orientation:l.orientation??"horizontal",position:wt,alignment:l.alignment??"center",labelStyles:l.labelStyles,itemClassName:l.itemClassName,itemStyles:l.itemStyles,shapeStyles:l.shapeStyles,className:ts["bar-chart__legend"],shape:l.shape??"rect",chartId:x,interactive:_});return(0,O.jsx)(yl.Provider,{value:{chartId:x,chartWidth:r,chartHeight:N||0},children:(0,O.jsx)(Gd,{legendPosition:wt,legendElement:Fe,legendChildren:I,gap:b,className:Y("bar-chart",ts["bar-chart"],{[ts[`bar-chart--animated${v?"-horizontal":""}`]]:g&&!he},o),style:{width:r,height:n},"data-chart-id":`bar-chart-${x}`,trailingContent:A,onContentHeightChange:F,children:({contentHeight:fe})=>{let Ce=fe>0?fe:n;return(0,O.jsx)("div",{role:"grid","aria-label":(0,nr.__)("Bar chart","jetpack-charts"),tabIndex:0,onKeyDown:ae,onFocus:te,onBlur:ie,children:Ce>0&&(0,O.jsx)("div",{ref:T,children:(0,O.jsxs)(qa,{theme:C,width:r,height:Ce,margin:{...P,...i},xScale:ce,yScale:de,horizontal:v,pointerEventsDataKey:"nearest",children:[(0,O.jsx)(Zf,{columns:ve.includes("y"),rows:ve.includes("x"),numTicks:4}),h&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("defs",{children:w.map((Re,Ue)=>je(Ue,re({data:Re,index:Ue}).color))}),(0,O.jsx)("style",{children:w.map((Re,Ue)=>Rt(Ue,re({data:Re,index:Ue}).color))})]}),He&&(0,O.jsx)("style",{children:He}),W?(0,O.jsx)(m0,{x:r/2,y:Ce/2,width:r,height:Ce,children:(0,nr.__)("All series are hidden. Click legend items to show data.","jetpack-charts")}):null,(0,O.jsx)(C1e,{comparisonEntries:ne,primaryKeys:X,groupPadding:K,horizontal:v,xAccessor:E.accessors.xAccessor,yAccessor:E.accessors.yAccessor,getElementStyles:re,resolveFill:me}),(0,O.jsx)(T2,{padding:K,children:J.map(({series:Re,index:Ue})=>(0,O.jsx)(_C,{dataKey:Re?.label,data:Re.data,yAccessor:E.accessors.yAccessor,xAccessor:E.accessors.xAccessor,colorAccessor:ye(Ue)},Re?.label))}),(0,O.jsx)(Hs,{...E.axis.x}),(0,O.jsx)(Hs,{...E.axis.y}),a&&(0,O.jsx)(dE,{detectBounds:!0,snapTooltipToDatumX:!0,snapTooltipToDatumY:!0,renderTooltip:d||it,selectedIndex:B,tooltipRef:ee,keyboardFocusedClassName:ts["bar-chart__tooltip--keyboard-focused"],series:z,mode:"individual"})]})})})}})})},mE=e=>(0,j.useContext)(_o)?(0,O.jsx)(zG,{...e}):(0,O.jsx)(Gs,{children:(0,O.jsx)(zG,{...e})});mE.displayName="BarChart";var k1e=yi(mE,{Legend:zr}),Mvt=yi(Ys(mE),{Legend:zr}),HG=e=>{let t=e;return t&&"bandwidth"in t?t?.bandwidth()??0:0},T1e=({textProps:e,x:t,y:r,label:n,formatter:o})=>(0,O.jsx)(Cn,{...e,textAnchor:"start",x:t,y:r,children:o(n)}),R1e=({textProps:e,x:t,y:r,value:n,formatter:o})=>(0,O.jsx)(Cn,{...e,textAnchor:"end",x:t,y:r,fontWeight:500,children:o(n)}),A1e=({ticks:e,tickLabelProps:t,yOffset:r,labelPosition:n,valuePosition:o,data:i,labelFormatter:a,valueFormatter:s,LabelComponent:l=T1e,ValueComponent:c=R1e})=>{if(e.length===0)return null;let d=e.map(({value:u,index:f})=>typeof t=="function"?t(u,f,e):{});return e.map(({from:u,formattedValue:f},h)=>{let p=d[h]??{};delete p.textAnchor,delete p.dx;let g=i.reduce((b,{data:_})=>b+(_[h]?.value??0),0),y=u.y+r;return(0,O.jsxs)(ut,{children:[(0,O.jsx)(l,{textProps:p,x:n,y,label:f,formatter:a}),(0,O.jsx)(c,{textProps:p,x:o,y,value:g,formatter:s,data:i,index:h})]},h)})},P1e=(e,t,r,n)=>{if(!n)return 0;let o=e.map(({label:i})=>i);return-(HG(Is({domain:o,range:[0,HG(Ds({type:"band",range:[0,r],domain:o,...t}))],padding:t.paddingInner}))+6)},BG=({data:e,width:t,height:r,options:n={},margin:o={left:0,right:20,bottom:0,top:0},...i})=>{let a=(0,j.useMemo)(()=>{let s=e.length>1,l={paddingInner:s?.3:.1,padding:s?.3:.1},c={zero:!0},d={...l,...n.yScale??{}};return{yScale:d,xScale:{...c,...n.xScale??{}},labelPosition:n.labelPosition??(s?0:10),valueFormatter:n.valueFormatter??(u=>Yl(u)),labelFormatter:n.labelFormatter??(u=>String(u)),valuePosition:n.valuePosition??t,yOffset:n.yOffset??P1e(e,d,r,s)}},[n,t,e,r]);return(0,O.jsx)(k1e,{orientation:"horizontal",gridVisibility:"none",data:e,width:t,height:r,margin:o,options:{axis:{y:{children:s=>(0,O.jsx)(A1e,{...s,data:e,yOffset:a.yOffset,labelPosition:a.labelPosition,valuePosition:a.valuePosition,labelFormatter:a.labelFormatter,valueFormatter:a.valueFormatter,LabelComponent:n.labelComponent,ValueComponent:n.valueComponent})},x:{children:()=>null}},xScale:a.xScale,yScale:a.yScale},...i})},XY=e=>(0,j.useContext)(_o)?(0,O.jsx)(BG,{...e}):(0,O.jsx)(Gs,{children:(0,O.jsx)(BG,{...e})});XY.displayName="BarListChart";var Ivt=Ys(XY),rr={"bar-container":"a8ccharts-mGEVca-bar-container","change-indicator":"a8ccharts-mGEVca-change-indicator","conversion-funnel-chart--loading":"a8ccharts-mGEVca-conversion-funnel-chart--loading","empty-state":"a8ccharts-mGEVca-empty-state","funnel-bar":"a8ccharts-mGEVca-funnel-bar","fu
Line truncated
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/** @license React v16.13.1
|
||||
* react-is.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
/*! Bundled license information:
|
||||
|
||||
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
||||
(**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
|
||||
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
|
||||
(**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
|
||||
classnames/index.js:
|
||||
(*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*)
|
||||
|
||||
tabbable/dist/index.esm.js:
|
||||
(*!
|
||||
* tabbable 6.4.0
|
||||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||
*)
|
||||
|
||||
dompurify/dist/purify.es.mjs:
|
||||
(*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE *)
|
||||
*/
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => 'bdca920315a6e5637299');
|
||||
@@ -0,0 +1 @@
|
||||
var o={};export{o as route};
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Route registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
return array(
|
||||
array(
|
||||
'name' => 'dashboard',
|
||||
'path' => '/',
|
||||
'page' => 'jetpack-social-dashboard',
|
||||
'has_route' => true,
|
||||
'has_content' => true,
|
||||
)
|
||||
);
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
/**
|
||||
* Script registration - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
/**
|
||||
* Registers a script according to `wp_register_script`. Honors this request by
|
||||
* reassigning internal dependency properties of any script handle already
|
||||
* registered by that name. It does not deregister the original script, to
|
||||
* avoid losing inline scripts which may have been attached.
|
||||
*
|
||||
* @param WP_Scripts $scripts WP_Scripts instance.
|
||||
* @param string $handle Name of the script. Should be unique.
|
||||
* @param string $src Full URL of the script, or path of the script relative to the WordPress root directory.
|
||||
* @param array $deps Optional. An array of registered script handles this script depends on. Default empty array.
|
||||
* @param string|bool|null $ver Optional. String specifying script version number, if it has one, which is added to the URL
|
||||
* as a query string for cache busting purposes. If version is set to false, a version
|
||||
* number is automatically added equal to current installed WordPress version.
|
||||
* If set to null, no version is added.
|
||||
* @param bool $in_footer Optional. Whether to enqueue the script before </body> instead of in the <head>.
|
||||
* Default 'false'.
|
||||
*/
|
||||
function jetpack_social_override_script( $scripts, $handle, $src, $deps = array(), $ver = false, $in_footer = false ) {
|
||||
$script = $scripts->query( $handle, 'registered' );
|
||||
if ( $script ) {
|
||||
/*
|
||||
* In many ways, this is a reimplementation of `wp_register_script` but
|
||||
* bypassing consideration of whether a script by the given handle had
|
||||
* already been registered.
|
||||
*/
|
||||
|
||||
// See: `_WP_Dependency::__construct` .
|
||||
$script->src = $src;
|
||||
$script->deps = $deps;
|
||||
$script->ver = $ver;
|
||||
$script->args = $in_footer ? 1 : null;
|
||||
} else {
|
||||
$scripts->add( $handle, $src, $deps, $ver, ( $in_footer ? 1 : null ) );
|
||||
}
|
||||
|
||||
if ( in_array( 'wp-i18n', $deps, true ) ) {
|
||||
$scripts->set_translations( $handle );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all package scripts.
|
||||
*/
|
||||
function jetpack_social_register_package_scripts( $scripts ) {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/constants.php';
|
||||
$default_version = ! SCRIPT_DEBUG ? $build_constants['version'] : time();
|
||||
$extension = '.min.js';
|
||||
|
||||
$scripts_dir = __DIR__ . '/scripts';
|
||||
$scripts_file = $scripts_dir . '/registry.php';
|
||||
|
||||
if ( ! file_exists( $scripts_file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$scripts_data = require $scripts_file;
|
||||
$plugin_dir = dirname( __FILE__ );
|
||||
|
||||
foreach ( $scripts_data as $script_data ) {
|
||||
$asset_file = $scripts_dir . '/' . $script_data['asset'];
|
||||
$asset = file_exists( $asset_file ) ? require $asset_file : array();
|
||||
$dependencies = $asset['dependencies'] ?? array();
|
||||
$version = $asset['version'] ?? $default_version;
|
||||
|
||||
jetpack_social_override_script(
|
||||
$scripts,
|
||||
$script_data['handle'],
|
||||
$build_constants['build_url'] . 'scripts/' . $script_data['path'] . $extension,
|
||||
$dependencies,
|
||||
$version,
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_default_scripts', 'jetpack_social_register_package_scripts' );
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Script registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
return array(
|
||||
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('jetpack-connection', 'jetpack-script-data', 'jetpack-shared-stores', 'react', 'react-dom', 'react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-theme', 'wp-url'), 'version' => '20de26a7db3a3441581c');
|
||||
@@ -0,0 +1 @@
|
||||
:where(._fUXxnSp5pagKBp9gSN7) *{box-sizing:border-box}.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-end:0;inset-block-start:auto;inset-inline:0;position:fixed;z-index:100001}@media(min-width:600px){.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-start:4rem;inset-inline:unset;inset-inline-end:1rem;width:auto}}@media(min-width:782px){.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-start:3rem}}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off);overflow:hidden;padding-top:1px}@media(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}.jetpack-footer{border-top:1px solid #f0f0f0;box-sizing:border-box;font-size:13px;padding:20px 24px;width:100%}.jetpack-footer :is(.jetpack-footer__menu-item:any-link,.jetpack-footer__menu-item[role=button]){color:#707070;cursor:pointer;text-decoration:none}.jetpack-footer .jetpack-footer__menu-item:hover{text-decoration:underline}.jetpack-footer>ul{list-style:none;margin:0;padding:0}.jetpack-footer>ul>li{margin:0}.jetpack-footer__logo{flex-shrink:0}@media(min-width:480px){a.jetpack-footer__a8c{margin-inline-start:auto}}a.jetpack-footer__a8c svg{fill:#707070}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1040px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));max-width:calc(var(--max-container-width) + 32px);padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));max-width:calc(var(--max-container-width) + 36px);padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));max-width:calc(var(--max-container-width)Line truncated
|
||||
@@ -0,0 +1,22 @@
|
||||
/*! For license information please see social-admin-page.js.LICENSE.txt */
|
||||
(()=>{var e,t,n={98137(e,t,n){"use strict";n.d(t,{A:()=>s});var o,r=n(2467);function i(){this.intervals={},this.monitorInterval=null,this.windowInstance=null,this.onMessage=e=>{e.source===this.windowInstance&&this.emit("message",e.data)}}o=i.prototype,Object.assign(o,r.EventEmitter.prototype),o.emitChange=function(){this.emit("change")},o.off=o.removeListener,i.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},i.prototype.getScreenCenterSpecs=function(e,t){const n=void 0!==window.screenTop?window.screenTop:window.screenY,o=void 0!==window.screenLeft?window.screenLeft:window.screenX;return["width="+e,"height="+t,"top="+(n+window.innerHeight/2-t/2),"left="+(o+window.innerWidth/2-e/2)].join()},i.prototype.isOpen=function(e){let t=!1;try{t=this.intervals[e]&&this.intervals[e].closed}catch(e){}return!t},i.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))},i.prototype.startMonitoring=function(e,t){this.monitorInterval||(this.monitorInterval=setInterval(this.checkStatus.bind(this),100)),this.intervals[e]=t};const s=i},46941(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 o=0,r=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(o++,"%c"===e&&(r=o))}),t.splice(r,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")||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=n(53212)(t);const{formatters:o}=e.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},53212(e,t,n){e.exports=function(e){function t(e){let n,r,i,s=null;function a(...e){if(!a.enabled)return;const o=a,r=Number(new Date),i=r-(n||r);o.diff=i,o.prev=n,o.curr=r,n=r,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,r)=>{if("%%"===n)return"%";s++;const i=t.formatters[r];if("function"==typeof i){const t=e[s];n=i.call(o,t),e.splice(s,1),s--}return n}),t.formatArgs.call(o,e);(o.log||t.log).apply(o,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=o,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(r!==t.namespaces&&(r=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function o(e,n){const o=t(this.namespace+(void 0===n?":":n)+e);return o.log=this.log,o}function r(e,t){let n=0,o=0,r=-1,i=0;for(;n<e.length;)if(o<t.lLine truncated
|
||||
__("There was an error testing Jetpack. Error: %s","jetpack-publicize-pkg"),e.message))}},[]);return n&&(x||S)?(0,f.jsx)("div",{className:R,children:(0,f.jsxs)(r.A,{className:"jp-admin-page__page",visual:k||(0,f.jsx)(l.A,{showText:!1,height:20}),breadcrumbs:S,title:x,subTitle:_,actions:j,showSidebarToggle:!1,children:[C,E?e:(0,f.jsx)(u.A,{fluid:!0,horizontalSpacing:0,children:(0,f.jsx)(d.A,{children:e})}),g&&(0,f.jsx)(c.A,{menu:w})]})}):(0,f.jsxs)("div",{className:R,children:[n&&(0,f.jsx)(u.A,{horizontalSpacing:5,children:(0,f.jsxs)(d.A,{className:(0,s.A)(p.A["admin-page-header"],"jp-admin-page-header"),children:[y||(0,f.jsx)(l.A,{}),m&&(0,f.jsx)("code",{className:p.A["sandbox-domain-badge"],onClick:N,onKeyDown:N,role:"button",tabIndex:0,title:`Sandboxing via ${m}. Click to test connection.`,children:"API Sandboxed"})]})}),(0,f.jsx)(u.A,{fluid:!0,horizontalSpacing:0,children:(0,f.jsx)(d.A,{children:e})}),g&&(0,f.jsx)(c.A,{menu:w})]})}},95640(e,t,n){"use strict";n.d(t,{A:()=>i});var o=n(49282),r=n(10790);const i=({children:e})=>(0,r.jsx)("div",{className:o.A.section,children:e})},90766(e,t,n){"use strict";n.d(t,{A:()=>i});var o=n(76996),r=n(10790);const i=({children:e})=>(0,r.jsx)("div",{className:o.A["section-hero"],children:e})},42266(e,t,n){"use strict";n.d(t,{A:()=>u});var o=n(13109),r=n(84699),i=n(88901),s=n(28847),a=n(13022),c=n(13088),l=n(10790);const d=e=>{switch(e){case"error":case"warning":default:return r.A;case"info":return s.A;case"success":return i.A}},u=({level:e="warning",children:t,showIcon:n=!0,className:r})=>{const i=(0,a.A)(c.A.container,c.A[`is-${e}`],r);return(0,l.jsxs)("div",{className:i,children:[n&&(0,l.jsx)("div",{className:c.A["icon-wrapper"],children:(0,l.jsx)(o.A,{icon:d(e),className:c.A.icon})}),(0,l.jsx)("div",{children:t})]})}},48907(e,t,n){"use strict";n.d(t,{A:()=>s});var o=n(27723),r=n(13022),i=n(10790);const __=o.__,s=({title:e=__("An Automattic Airline","jetpack-publicize-pkg"),height:t=7,className:n,...o})=>(0,i.jsxs)("svg",{role:"img",x:"0",y:"0",viewBox:"0 0 935 38.2",enableBackground:"new 0 0 935 38.2","aria-labelledby":"jp-automattic-byline-logo-title",height:t,className:(0,r.A)("jp-automattic-byline-logo",n),...o,children:[(0,i.jsx)("desc",{id:"jp-automattic-byline-logo-title",children:e}),(0,i.jsx)("path",{d:"M317.1 38.2c-12.6 0-20.7-9.1-20.7-18.5v-1.2c0-9.6 8.2-18.5 20.7-18.5 12.6 0 20.8 8.9 20.8 18.5v1.2C337.9 29.1 329.7 38.2 317.1 38.2zM331.2 18.6c0-6.9-5-13-14.1-13s-14 6.1-14 13v0.9c0 6.9 5 13.1 14 13.1s14.1-6.2 14.1-13.1V18.6zM175 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7L157 1.3h5.5L182 36.8H175zM159.7 8.2L152 23.1h15.7L159.7 8.2zM212.4 38.2c-12.7 0-18.7-6.9-18.7-16.2V1.3h6.6v20.9c0 6.6 4.3 10.5 12.5 10.5 8.4 0 11.9-3.9 11.9-10.5V1.3h6.7V22C231.4 30.8 225.8 38.2 212.4 38.2zM268.6 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H268.6zM397.3 36.8V8.7l-1.8 3.1 -14.9 25h-3.3l-14.7-25 -1.8-3.1v28.1h-6.5V1.3h9.2l14 24.4 1.7 3 1.7-3 13.9-24.4h9.1v35.5H397.3zM454.4 36.8l-4.7-8.8h-20.9l-4.5 8.8h-7l19.2-35.5h5.5l19.5 35.5H454.4zM439.1 8.2l-7.7 14.9h15.7L439.1 8.2zM488.4 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H488.4zM537.3 6.8v30h-6.7v-30h-15.5V1.3h37.7v5.5H537.3zM569.3 36.8V4.6c2.7 0 3.7-1.4 3.7-3.4h2.8v35.5L569.3 36.8 569.3 36.8zM628 11.3c-3.2-2.9-7.9-5.7-14.2-5.7 -9.5 0-14.8 6.5-14.8 13.3v0.7c0 6.7 5.4 13 15.3 13 5.9 0 10.8-2.8 13.9-5.7l4 4.2c-3.9 3.8-10.5 7.1-18.3 7.1 -13.4 0-21.6-8.7-21.6-18.3v-1.2c0-9.6 8.9-18.7 21.9-18.7 7.5 0 14.3 3.1 18 7.1L628 11.3zM321.5 12.4c1.2 0.8 1.5 2.4 0.8 3.6l-6.1 9.4c-0.8 1.2-2.4 1.6-3.6 0.8l0 0c-1.2-0.8-1.5-2.4-0.8-3.6l6.1-9.4C318.7 11.9 320.3 11.6 321.5 12.4L321.5 12.4z"}),(0,i.jsx)("path",{d:"M37.5 36.7l-4.7-8.9H11.7l-4.6 8.9H0L19.4 0.8H25l19.7 35.9H37.5zM22 7.8l-7.8 15.1h15.9L22 7.8zM82.8 36.7l-23.3-24 -2.3-2.5v26.6h-6.7v-36H57l22.6 24 2.3 2.6V0.8h6.7v35.9H82.8z"}),(0,i.jsx)("path",{d:"M719.9 37l-4.8-8.9H694l-4.6 8.9h-7.1l19.5-36h5.6l19.8 36H719.9zM704.4 8l-7.8 15.1h15.9L704.4 8zM733 37V1h6.8v36H733zM781 37c-1.8 0-2.6-2.5-2.9-5.8l-0.2-3.7c-0.2-3.6-1.7-5.1-8.4-5.1h-12.8V37H750V1h19.6c10.8 0 15.7 4.3 15.7 9.9 0 3.9-2 7.7-9 9 7 0.5 8.5 3.7 8.6 7.9l0.1 3c0.1 2.5 0.5 4.3 2.2 6.1V37H781zM778.5 11.8c0-2.6-2.1-5.1-7.9-5.1h-13.8v10.8h14.4c5 0 7.3-2.4 7.3-5.2V11.8zM794.8 37V1h6.8v30.4h28.2V37H794.8zM836.7 37V1h6.8v36H836.7zM886.2 37l-23.4-24.1 -2.3-2.5V37h-6.8V1h6.5l22.7 24.1 2.3 2.6V1h6.8v36H886.2zM902.3 37V1H935v5.6h-26v9.2h20v5.5h-20v10.1h26V37H902.3z"})]})},51112(e,t,n){"use strict";n.d(t,{A:()=>p});var o=n(56427),r=n(27723),i=n(13109),s=n(1866),a=n(13022),c=n(51609),l=n(77934),d=n(10790);const __=r.__,u=(0,c.forwardRef)((e,t)=>{const{children:n,variant:r="primary",size:c="normal",weight:u="bold",icon:p,iconSize:f,disabled:g,isDestructive:h,isLoading:m,isExternalLink:v,className:b,text:w,fullWidth:y,...x}=e,_=(0,a.A)(l.A.button,b,{[l.A.normal]:"normal"===c,[l.A.small]:"small"===c,[l.A.icon]:Boolean(p),[l.A.loading]:m,[l.A.regular]:"regular"===u,[l.A["full-width"]]:y,[l.A["is-icon-button"]]:Boolean(p)&&!n}),k="normal"===c?20:16,j=v&&(0,d.jsxs)(d.Fragment,{childrenLine truncated
|
||||
__("(opens in a new tab)","jetpack-publicize-pkg")})]}),S=v?"_blank":void 0,C=n?.[0]&&null!==n[0]&&"components-tooltip"!==n?.[0]?.props?.className,A={ref:t,target:S,variant:r,className:(0,a.A)(_,{"has-text":!!p&&C}),icon:v?void 0:p,iconSize:f,disabled:g,"aria-disabled":g,isDestructive:h,text:w,...x};return(0,d.jsxs)(o.Button,{...A,children:[m&&(0,d.jsx)(o.Spinner,{}),(0,d.jsx)("span",{children:n}),j]})});u.displayName="Button";const p=u},7064(e,t,n){"use strict";n.d(t,{A:()=>l});var o=n(29491),r=n(13022),i=n(28509),s=n(75918),a=n(11682),c=n(10790);const l=({primary:e,secondary:t,isTwoSections:n=!1,...l})=>{const d=(0,o.useViewportMatch)("small","<"),u=(0,o.useViewportMatch)("large","<"),p=!n&&d,f=(0,r.A)({[a.A["one-section-style"]]:!n,[a.A["is-viewport-small"]]:d});return(0,c.jsxs)(s.A,{className:f,horizontalSpacing:0,horizontalGap:0,fluid:!1,...l,children:[!p&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(i.A,{sm:4,md:u?4:5,lg:7,className:a.A.primary,children:e}),(0,c.jsx)(i.A,{sm:4,md:u?4:3,lg:5,className:a.A.secondary,children:t})]}),p&&(0,c.jsx)(i.A,{children:e})]})}},59244(e,t,n){"use strict";n.d(t,{D:()=>a});var o=n(56427),r=n(23510),i=n(63406),s=n(10790);function a({maxVisibleNotices:e=3}){const{getNotices:t,removeNotice:n}=(0,i.I)(),a=t().filter(({type:e})=>"snackbar"===e).slice(-e);return(0,s.jsx)(o.SnackbarList,{notices:a,className:r.A["global-notices"],onRemove:n})}},63406(e,t,n){"use strict";n.d(t,{I:()=>i});var o=n(47143),r=n(692);function i(){const e=(0,o.useDispatch)(r.store),t=(0,o.useSelect)(e=>e(r.store).getNotices(),[]);return{...e,createNotice:(t,n,o)=>e.createNotice(t,n,{type:"snackbar",...o}),createErrorNotice:(t,n)=>e.createErrorNotice(t,{type:"snackbar",...n}),createInfoNotice:(t,n)=>e.createInfoNotice(t,{type:"snackbar",...n}),createSuccessNotice:(t,n)=>e.createSuccessNotice(t,{type:"snackbar",...n}),createWarningNotice:(t,n)=>e.createWarningNotice(t,{type:"snackbar",...n}),getNotices:()=>t}}},40597(e,t,n){"use strict";n.d(t,{A:()=>u});var o=n(56427),r=n(13109),i=n(28847),s=n(13022),a=n(51609),c=n(51112),l=(n(77191),n(10790));const d=e=>({"top-end":"top left",top:"top center","top-start":"top right","bottom-end":"bottom left",bottom:"bottom center","bottom-start":"bottom right"}[e]),u=({className:e="",iconClassName:t="",placement:n="bottom-end",animate:u=!0,iconCode:p=i.A,iconSize:f=18,offset:g=10,title:h,children:m,popoverAnchorStyle:v="icon",forceShow:b=!1,hoverShow:w=!1,wide:y=!1,inline:x=!0,shift:_=!1})=>{const[k,j]=(0,a.useState)(!1),[S,C]=(0,a.useState)(null),A=(0,a.useCallback)(()=>j(!1),[j]),E=(0,a.useCallback)(e=>{e.preventDefault(),j(!k)},[k,j]),R={position:d(n),placement:n,animate:u,noArrow:!1,resize:!1,flip:!1,offset:g,focusOnMount:"firstElement",onClose:A,className:"icon-tooltip-container",inline:x,shift:_},N="wrapper"===v,z=(0,s.A)("icon-tooltip-wrapper",e),M={left:N?0:-(62-f/2)+"px"},T=N&&b,I=(0,a.useCallback)(()=>{w&&(S&&(clearTimeout(S),C(null)),j(!0))},[w,S]),P=(0,a.useCallback)(()=>{if(w){const e=setTimeout(()=>{j(!1),C(null)},100);C(e)}},[w]);return(0,l.jsxs)("div",{className:z,"data-testid":"icon-tooltip_wrapper",onMouseEnter:I,onMouseLeave:P,children:[!N&&(0,l.jsx)(c.A,{variant:"link",onMouseDown:E,children:(0,l.jsx)(r.A,{className:t,icon:p,size:f})}),(0,l.jsx)("div",{className:(0,s.A)("icon-tooltip-helper",{"is-wide":y}),style:M,children:(T||k)&&(0,l.jsx)(o.Popover,{...R,children:(0,l.jsxs)("div",{children:[h&&(0,l.jsx)("div",{className:"icon-tooltip-title",children:h}),(0,l.jsx)("div",{className:"icon-tooltip-content",children:m})]})})})]})}},78478(e,t,n){"use strict";n.d(t,{M5:()=>p,Nr:()=>l,Wy:()=>u});var o=n(56427),r=n(13022),i=n(84705),s=n(67400),a=n(10790);const c=({className:e,size:t=24,viewBox:n="0 0 24 24",opacity:i=1,color:c="#2C3338",children:l})=>{const d={className:(0,r.A)(s.A.iconWrapper,e),width:t,height:t,viewBox:n,opacity:i,fill:void 0};return c&&(d.fill=c),(0,a.jsx)(o.SVG,{...d,fillRule:"evenodd",clipRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(o.G,{opacity:i,children:l})})},l=({size:e,className:t=s.A["checkmark-icon"],color:n})=>(0,a.jsx)(c,{className:t,size:e,color:n,children:(0,a.jsx)(o.Path,{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})}),d={...{"anti-spam":({opacity:e=1,size:t,color:n})=>(0,a.jsxs)(c,{size:t,opacity:e,color:n,children:[(0,a.jsx)(o.Path,{d:"M13.2,4.7l4.7,12.8c0.4,1.1,1,1.5,2.1,1.6c0.1,0,0.1,0,0.1,0l0.1,0.1l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1 s0,0.1-0.1,0.1c-0.1,0-0.1,0.1-0.1,0.1s-0.1,0-0.2,0h-5.1c-0.1,0-0.1,0-0.2,0c-0.1,0-0.1-0.1-0.1-0.1l-0.1-0.1c0-0.1,0-0.1,0-0.1 c0-0.1,0-0.1,0-0.2s0-0.1,0.1-0.1l0.1-0.1c0,0,0.1,0,0.2,0c0.5,0,1.1-0.2,1.1-0.8c0-0.3-0.1-0.5-0.2-0.8l-1.1-3.1 c-0.1-0.2-0.1-0.2-0.2-0.2h-4.3c-0.7,0-1.5,0-1.9,0.9l-1.1,2.4C7.1,17.6,7,17.8,7,18.1c0,0.8,1,0.9,1.6,0.9c0.1,0,0.1,0,0.2,0 L8.8,19l0.1,0.1c0,0.1,0,0.1,0,0.2c0,0.1,0,0.1,0,0.1s-0.1,0.1-0.1,0.1lLine truncated
|
||||
// translators: %s: Name of the current feature
|
||||
default:(0,r.sprintf)(__("%s coming soon","jetpack-publicize-pkg"),n)}:{lg:t?h:m,default:t?n:(0,r.sprintf)(/* translators: %s: Name of the current feature */
|
||||
__("%s not included","jetpack-publicize-pkg"),n)})(t,e,C),z=_?N.lg:N.default;return j?(0,g.jsx)("div",{className:(0,c.A)(f.A.item,f.A.value,f.A.empty)}):(0,g.jsxs)("div",{className:(0,c.A)(f.A.item,f.A.value),children:[(0,g.jsx)(i.A,{className:(0,c.A)(f.A.icon,S?f.A["icon-check"]:f.A["icon-cross"]),size:32,icon:S?s.A:a.A}),(0,g.jsx)(p.Ay,{variant:"body-small",children:u||z}),R&&(0,g.jsx)(d.A,{title:y||E,iconClassName:f.A["popover-icon"],className:(0,c.A)(f.A.popover,x),placement:"bottom-end",iconSize:14,offset:4,wide:Boolean(y&&w),inline:!1,shift:!0,children:(0,g.jsx)(p.Ay,{variant:"body-small",component:"div",children:w||A})})]})},y=({title:e,children:t})=>(0,g.jsxs)("div",{className:f.A.headerContainer,children:[e&&(0,g.jsx)(p.Ay,{variant:"headline-small",className:f.A.title,children:e}),(0,g.jsx)("div",{className:f.A.header,children:t})]}),x=({primary:e=!1,children:t,className:n})=>{let o=0;return(0,g.jsx)("div",{className:(0,c.A)(f.A.card,{[f.A["is-primary"]]:e},n),children:l.Children.map(t,e=>{const t=e;return t.type===w?(o++,(0,l.cloneElement)(t,{index:o-1})):t})})},_=({title:e,headerLogo:t,items:n,children:r,showIntroOfferDisclaimer:i=!1})=>{const s=(0,o.useViewportMatch)("large");return(0,g.jsxs)(b.Provider,{value:n,children:[(0,g.jsx)("div",{className:(0,c.A)(f.A.container,{[f.A["is-viewport-large"]]:s}),style:{"--rows":n.length+1,"--columns":l.Children.toArray(r).length+1},children:(0,g.jsxs)("div",{className:f.A.table,children:[(0,g.jsxs)("div",{children:[t&&(0,g.jsx)("div",{className:f.A["header-logo"],children:t}),(0,g.jsx)(p.Ay,{variant:"headline-small",className:f.A.tableTitle,children:e})]}),s&&n.map((e,t)=>e.name?(0,g.jsxs)("div",{className:(0,c.A)(f.A.item,f.A.feature,{[f.A["last-feature"]]:t===n.length-1}),children:[(0,g.jsx)(p.Ay,{variant:"body-small",children:(0,g.jsx)("strong",{children:e.name})}),e.tooltipInfo&&(0,g.jsx)(d.A,{title:e.tooltipTitle,iconClassName:f.A["popover-icon"],className:f.A.popover,placement:e.tooltipPlacement?e.tooltipPlacement:"bottom-end",iconSize:14,offset:4,wide:Boolean(e.tooltipTitle&&e.tooltipInfo),inline:!1,shift:!0,children:(0,g.jsx)(p.Ay,{variant:"body-small",children:e.tooltipInfo})})]},t):(0,g.jsx)("div",{className:(0,c.A)(f.A.item,f.A.feature,f.A.empty)},t)),r]})}),(0,g.jsx)("div",{className:f.A["tos-container"],children:(0,g.jsxs)("div",{className:f.A.tos,children:[i&&(0,g.jsx)(p.Ay,{variant:"body-small",children:__("Reduced pricing is a limited offer for the first year and renews at regular price.","jetpack-publicize-pkg")}),(0,g.jsx)(u.A,{multipleButtons:!0})]})})]})}},28539(e,t,n){"use strict";n.d(t,{l:()=>l});var o=n(13109),r=n(60167),i=n(51609),s=n(78478),a=n(8322),c=n(10790);const l=({products:e,icon:t,size:n=24})=>{if(t){const e=(0,s.Wy)(t);return(0,c.jsx)("div",{className:a.A["product-bundle-icons"],children:(0,c.jsx)(e,{size:n})})}return(0,c.jsx)("div",{className:a.A["product-bundle-icons"],children:e.map((t,l)=>{const d=(0,s.Wy)(t),u=d||(()=>null);return(0,c.jsxs)(i.Fragment,{children:[(0,c.jsx)(u,{size:n}),l!==e.length-1&&(0,c.jsx)(o.A,{className:a.A["plus-icon"],icon:r.A,size:16},"icon-plugs"+(2*l+1))]},l)})})}},75304(e,t,n){"use strict";n.d(t,{A:()=>m});var o=n(27723),r=n(13109),i=n(88901),s=n(13022),a=n(42266),c=n(51112),l=n(78478),d=n(489),u=n(47425),p=n(28539),f=n(22268),g=n(8322),h=n(10790);const __=o.__,m=({addProductUrl:e,buttonDisclaimer:t,buttonText:n="",className:m,description:v,error:b="",features:w,hasRequiredPlan:y,icon:x,isBundle:_=!1,isCard:k,isLoading:j,onAdd:S,pricing:C={},slug:A,subTitle:E="",supportedProducts:R,title:N=""})=>{const{isFree:z,price:M,currency:T,offPrice:I}=C,P=!z&&!y,O=(0,o.sprintf)(/* translators: %s: the product name. */
|
||||
__("Add %s","jetpack-publicize-pkg"),N);return(0,h.jsxs)("div",{className:(0,s.A)(g.A.wrapper,m,{[g.A["is-bundle-card"]]:_,[g.A["is-card"]]:k||_}),children:[_&&(0,h.jsx)(f.z,{}),(0,h.jsxs)("div",{className:g.A["card-container"],children:[(0,h.jsx)(p.l,{icon:x,products:R?.length?R:[A],size:32}),(0,h.jsx)(u.H3,{children:N}),E&&(0,h.jsx)(u.hE,{mb:3,children:E}),v&&(0,h.jsx)(u.Ay,{mb:3,children:v}),(0,h.jsx)("ul",{className:g.A.features,children:w.map((e,t)=>(0,h.jsxs)(u.Ay,{component:"li",variant:"body",children:[(0,h.jsx)(r.A,{icon:i.A,size:24,className:g.A.check}),e]},`feature-${t}`))}),P&&(0,h.jsx)(d.A,{price:M,offPrice:I,currency:T}),z&&(0,h.jsx)(u.H3,{children:__("Free","jetpack-publicize-pkg")}),(0,h.jsx)(a.A,{level:"error",showIcon:!!b,children:b}),t,(!_||_&&!y)&&(0,h.jsx)(c.A,{onClick:e?null:S,isLoading:j,disabled:j,variant:j||!_?"primary":"secondary",className:g.A["add-button"],...e?{href:e}:{},children:n||O}),_&&y&&(0,h.jsxs)("div",{className:g.A["product-has-required-plan"],children:[(0,h.jsx)(l.Nr,{size:36}),(0,h.jsx)(u.Ay,{children:__("Active on your site","jetpack-publicize-pkg")})]})]})]})}},22268(e,t,n){"use strict";n.d(t,{z:()=>l});var o=n(27723),r=n(13109),i=n(31820),s=n(47425),a=n(8322),c=n(10790);const __=o.__,l=({title:e=__("Popular upgrade","jetpack-publicize-pkg")})=>(0,c.jsxs)("div",{className:a.A["card-header"],children:[(0,c.jsx)(r.A,{icon:i.A,className:a.A["product-bundle-icon"],size:24}),(0,c.jsx)(s.Ay,{variant:"label",children:e})]})},489(e,t,n){"use strict";n.d(t,{A:()=>l});var o=n(27723),r=n(13022),i=n(47425),s=n(72746),a=n(93211),c=n(10790);const __=o.__,l=({price:e,offPrice:t,currency:n="",showNotOffPrice:o=!0,hideDiscountLabel:l=!0,promoLabel:d="",legend:u=__("/month, paid yearly","jetpack-publicize-pkg"),isNotConvenientPrice:p=!1,hidePriceFraction:f=!1,children:g,variant:h="default"})=>{if(null==e&&null==t||!n)return null;o=o&&null!=t;const m="number"==typeof e&&"number"==typeof t?Math.floor((e-t)/e*100):0,v=!l&&m&&m>0?m+__("% off","jetpack-publicize-pkg"):null;return"simple"===h?(0,c.jsxs)("div",{className:a.A.simple,children:[(0,c.jsxs)("div",{className:a.A.currentPrice,children:[(0,c.jsx)(s.g,{value:t??e,currency:n,isOff:!p,hidePriceFraction:f,inline:!0}),(0,c.jsx)("div",{children:u})]}),o&&(0,c.jsxs)("div",{className:a.A.originalPrice,children:[(0,c.jsx)(s.g,{value:e,currency:n,isOff:!1,hidePriceFraction:f,inline:!0}),(0,c.jsx)("div",{children:m&&m>0&&m+__("% off the first year","jetpack-publicize-pkg")})]})]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:a.A.container,children:(0,c.jsxs)("div",{className:(0,r.A)(a.A["price-container"],"product-price_container"),children:[(0,c.jsx)(s.g,{value:t??e,currency:n,isOff:!p,hidePriceFraction:f}),o&&(0,c.jsx)(s.g,{value:e,currency:n,isOff:!1,hidePriceFraction:f}),v&&(0,c.jsx)(i.Ay,{className:(0,r.A)(a.A["promo-label"],"product-price_promo_label"),children:v})]})}),(0,c.jsxs)("div",{className:a.A.footer,children:[g||(0,c.jsx)(i.Ay,{className:(0,r.A)(a.A.legend,"product-price_legend"),children:u}),d&&(0,c.jsx)(i.Ay,{className:(0,r.A)(a.A["promo-label"],"product-price_promo_label"),children:d})]})]})}},72746(e,t,n){"use strict";n.d(t,{g:()=>c});var o=n(54268),r=n(13022),i=n(47425),s=n(93211),a=n(10790);const c=({value:e,currency:t,isOff:n,hidePriceFraction:c,inline:l=!1})=>{const d=(0,r.A)(s.A.price,"product-price_price",{[s.A["is-not-off-price"]]:!n,[s.A["price-inline"]]:l}),{symbol:u,integer:p,fraction:f}=(0,o.vA)(e,t),g=!c||!f.endsWith("00");return(0,a.jsxs)(i.Ay,{className:d,variant:"headline-medium",component:"p",children:[l?(0,a.jsxs)(a.Fragment,{children:[u,p]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.Ay,{className:s.A.symbol,component:"sup",variant:"title-medium",children:u}),p]}),g&&(0,a.jsx)(i.Ay,{component:"sup",variant:"body-small","data-testid":"PriceFraction",children:(0,a.jsx)("strong",{children:f})})]})}},85879(e,t,n){"use strict";n.d(t,{A:()=>g});var o=n(86087),r=n(27723),i=n(79654),s=n(13022),a=n(3924),c=n(47425),l=(n(59918),n(10790));const __=r.__,d=({multipleButtonsLabels:e})=>Array.isArray(e)&&e.length>1?(0,o.createInterpolateElement)((0,r.sprintf)(/* translators: %1$s is button label 1 and %2$s is button label 2 */
|
||||
__("By clicking <strong>%1$s</strong> or <strong>%2$s</strong>, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>sync your site‘s data</shareDetailsLink> with us.","jetpack-publicize-pkg"),e[0],e[1]),{strong:(0,l.jsx)("strong",{}),tosLink:(0,l.jsx)(f,{slug:"wpcom-tos"}),shareDetailsLink:(0,l.jsx)(f,{slug:"jetpack-support-what-data-does-jetpack-sync"})}):(0,o.createInterpolateElement)(__("By clicking the buttons above, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>sync your site‘s data</shareDetailsLink> with us.","jetpack-publicize-pkg"),{tosLink:(0,l.jsx)(f,{slug:"wpcom-tos"}),shareDetailsLink:(0,l.jsx)(f,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),u=({agreeButtonLabel:e})=>(0,o.createInterpolateElement)((0,r.sprintf)(/* translators: %s is a button label */
|
||||
__("By clicking <strong>%s</strong>, you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>sync your site‘s data</shareDetailsLink> with us.","jetpack-publicize-pkg"),e),{strong:(0,l.jsx)("strong",{}),tosLink:(0,l.jsx)(f,{slug:"wpcom-tos"}),shareDetailsLink:(0,l.jsx)(f,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),p=()=>(0,o.createInterpolateElement)(__("By continuing you agree to our <tosLink>Terms of Service</tosLink> and to <shareDetailsLink>sync your site’s data</shareDetailsLink> with us. We’ll check if that email is linked to an existing WordPress.com account or create a new one instantly.","jetpack-publicize-pkg"),{tosLink:(0,l.jsx)(f,{slug:"wpcom-tos"}),shareDetailsLink:(0,l.jsx)(f,{slug:"jetpack-support-what-data-does-jetpack-sync"})}),f=({slug:e,children:t})=>(0,l.jsx)(i.N,{openInNewTab:!0,className:"terms-of-service__link",href:(0,a.A)(e),children:t}),g=({className:e,multipleButtons:t,agreeButtonLabel:n,isTextOnly:o,...r})=>(0,l.jsx)(c.Ay,{className:(0,s.A)(e,"terms-of-service"),...r,children:o?(0,l.jsx)(p,{}):t?(0,l.jsx)(d,{multipleButtonsLabels:t}):(0,l.jsx)(u,{agreeButtonLabel:n})})},10110(e,t,n){"use strict";n.d(t,{Q:()=>o,Z:()=>r});const o={"headline-medium":"h1","headline-small":"h2","headline-small-regular":"h2","title-medium":"h3","title-medium-semi-bold":"h3","title-small":"h4",body:"p","body-small":"p","body-extra-small":"p","body-extra-small-bold":"p",label:"p"},r=["mt","mr","mb","ml","mx","my","m","pt","pr","pb","pl","px","py","p"]},47425(e,t,n){"use strict";n.d(t,{Ay:()=>l,H3:()=>d,hE:()=>u});var o=n(13022),r=n(51609),i=n(10110),s=n(58763),a=n(10790);const c=(0,r.forwardRef)(({variant:e="body",children:t,component:n,className:c,...l},d)=>{const u=n||i.Q[e]||"span",p=(0,r.useMemo)(()=>i.Z.reduce((e,t)=>(void 0!==l[t]&&(e+=s.A[`${t}-${l[t]}`]+" ",delete l[t]),e),""),[l]);return(0,a.jsx)(u,{className:(0,o.A)(s.A.reset,s.A[e],c,p),...l,ref:d,children:t})});c.displayName="Text";const l=c,d=({children:e,weight:t="bold",...n})=>{const o="headline-small"+("bold"===t?"":`-${t}`);return(0,a.jsx)(c,{variant:o,mb:3,...n,children:e})},u=({children:e,size:t="medium",...n})=>(0,a.jsx)(c,{variant:`title-${t}`,mb:1,...n,children:e})},50723(e,t,n){"use strict";n.d(t,{Ay:()=>p});var o=n(51609),r=n(8706),i=n(10790);const s={"--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"},d={},u=(e,t,n)=>{const o={...s,...a,...c,...l};for(const t in o)e.style.setProperty(t,o[t]);n&&e.classList.add(r.A.global),t&&(d[t]={provided:!0,root:e})},p=({children:e=null,targetDom:t,id:n,withGlobalStyles:r=!0})=>{const s=(0,o.useRef)(),a=d?.[n]?.provided;return(0,o.useLayoutEffect)(()=>{if(!a)return t?u(t,n,r):void(s?.current&&u(s.current,n,r))},[t,s,a,n,r]),t?(0,i.jsx)(i.Fragment,{children:e}):(0,i.jsx)("div",{ref:s,children:e})}},3924(e,t,n){"use strict";function o(e,t={}){const n={};let o;if("undefined"!=typeof window&&(o=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&&Object.hasOwn(jetpack_redirects,"currentSiteRawUrl")&&(n.site=jetpack_redirects.currentBlogID??jetpack_redirects.currentSiteRawUrl),o&&(n.calypsLine truncated
|
||||
__("Toggle details for %1$s on %2$s","jetpack-publicize-pkg"),e.display_name,A(e.service_name));return(0,j.jsxs)(p.b,{open:S,onOpenChange:C,children:[(0,j.jsxs)("div",{className:k.A["connection-row"],children:[(0,j.jsx)(m.A,{serviceName:e.service_name,label:e.display_name,profilePicture:e.profile_picture,size:"medium"}),(0,j.jsxs)(c.B,{direction:"column",gap:"xs",className:k.A["connection-name-wrapper"],children:[(0,j.jsx)(l.E,{variant:"body-lg",className:k.A["connection-item-name"],children:(0,j.jsx)(b.s,{connection:e,tone:"neutral"})}),N?(0,j.jsx)(w.v,{connection:e,service:t}):(0,j.jsx)(l.E,{variant:"body-md",className:k.A["connection-network"],children:t?.label})]}),(0,j.jsx)(f.l,{className:k.A["panel-toggle"],"aria-label":M,children:(0,j.jsx)(d.I,{className:k.A.chevron,icon:s.A})})]}),(0,j.jsx)(g.Z,{className:k.A["connection-panel"],children:(0,j.jsxs)("div",{className:k.A["connection-panel-inner"],children:[n&&(0,j.jsxs)(c.B,{direction:"row",align:"center",gap:"sm",className:k.A["mark-shared-wrap"],children:[(0,j.jsx)(_.j,{connection:e}),(0,j.jsx)(u.K,{variant:"minimal",tone:"neutral",size:"small",label:z,icon:a.A})]}),(0,j.jsx)("div",{className:k.A["connection-template-wrap"],children:(0,j.jsx)(y.m,{connection:e})}),E?(0,j.jsx)(x.V,{connection:e,size:"compact",tone:"neutral"}):(0,j.jsx)(l.E,{className:k.A.description,children:__("This connection is added by a site administrator.","jetpack-publicize-pkg")})]})})]})}},77391(e,t,n){"use strict";n.d(t,{T:()=>_});var o=n(40597),r=n(47425),i=n(56427),s=n(47143),a=n(27723),c=n(13109),l=n(65673),d=n(75462),u=n(72326),p=n(51609),f=n(93294),g=n(92216),h=n(30646),m=n(25737),v=n(51708),b=n(25394),w=n(566),y=n(20492),x=n(10790);const __=a.__,_x=a._x;function _({connection:e,service:t,canMarkAsShared:n}){const[a,_]=(0,p.useReducer)(e=>!e,!1),k=(0,s.useSelect)(t=>t(f.M).canUserManageConnection(e),[e]);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:y.A["connection-item"],children:[(0,x.jsx)(g.A,{serviceName:e.service_name,label:e.display_name,profilePicture:e.profile_picture}),(0,x.jsxs)("div",{className:y.A["connection-name-wrapper"],children:[(0,x.jsx)("div",{className:y.A["connection-item-name"],children:(0,x.jsx)(h.s,{connection:e})}),(0,x.jsx)(m.v,{connection:e,service:t})]}),(0,x.jsx)(u.$,{size:"small",className:y.A["learn-more"],variant:"minimal",onClick:_,"aria-label":a?__("Close panel","jetpack-publicize-pkg"):_x("Open panel","Accessibility label","jetpack-publicize-pkg"),children:(0,x.jsx)(c.A,{className:y.A.chevron,icon:a?d.A:l.A})})]}),(0,x.jsx)(i.Panel,{className:y.A["connection-panel"],children:(0,x.jsxs)(i.PanelBody,{opened:a,onToggle:_,children:[n&&(0,x.jsxs)("div",{className:y.A["mark-shared-wrap"],children:[(0,x.jsx)(w.j,{connection:e}),(0,x.jsx)(o.A,{children:__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack-publicize-pkg")})]}),(0,x.jsx)("div",{className:y.A["connection-template-wrap"],children:(0,x.jsx)(v.m,{connection:e})}),k?(0,x.jsx)(b.V,{connection:e}):(0,x.jsx)(r.Ay,{className:y.A.description,children:__("This connection is added by a site administrator.","jetpack-publicize-pkg")})]})})]})}},30646(e,t,n){"use strict";n.d(t,{s:()=>d});var o=n(56427),r=n(47143),i=n(27723),s=n(79654),a=n(93294),c=n(20492),l=n(10790);const __=i.__;function d({connection:e,tone:t}){const n=(0,r.useSelect)(t=>t(a.M).getUpdatingConnections().includes(e.connection_id),[e.connection_id]);return(0,l.jsxs)("div",{className:c.A["connection-name"],children:[e.profile_link?(0,l.jsx)(s.N,{openInNewTab:!0,tone:t,className:c.A["profile-link"],href:e.profile_link,children:e.display_name}):(0,l.jsx)("span",{className:c.A["profile-link"],children:e.display_name}),n?(0,l.jsx)(o.Spinner,{color:"black","aria-label":__("Updating account","jetpack-publicize-pkg")}):null]})}},25737(e,t,n){"use strict";n.d(t,{v:()=>p});var o=n(3924),r=n(47143),i=n(86087),s=n(27723),a=n(79654),c=n(93294),l=n(25394),d=n(18241),u=n(10790);const __=s.__,_x=s._x;function p({connection:e,service:t}){const n=(0,r.useSelect)(t=>t(c.M).getServicesBy("status","unsupported").some(({id:t})=>t===e.service_name),[e]);return"broken"===e.status||"must_reauth"===e.status||n?(0,u.jsxs)("div",{children:[(0,u.jsx)("span",{className:"description",children:(p=n,f=e.status,p?(0,i.createInterpolateElement)((0,s.sprintf)("%1$s %2$s",__("This platform is no longer supported.","jetpack-publicize-pkg"),__("You can use our <link>Manual Sharing</link> feature instead.","jetpack-publicize-pkg")),{link:(0,u.jsx)(a.N,{openInNewTab:!0,href:(0,o.A)("jetpack-social-manual-sharing-help"),children:null})}):"broken"===f?_x("There is an issue with this connection.","This notice is shown when a social media connection is broken.","jetpack-publicize-pkg"):_x("To keep sharing with this connection, please reconnect it.","This notice is shown when a social media connection needs to be reconnected.","jetpack-publicize-pkg"))})," ",!n&&t?(0,u.jsx)(d.C,{connection:e,serviceLine truncated
|
||||
// translators: %s: The name of the connection the user is disconnecting.
|
||||
__("Are you sure you want to disconnect <strong>%s</strong>?","jetpack-publicize-pkg"),e.display_name),{strong:(0,u.jsx)("strong",{})})}),"link"===t?(0,u.jsx)(a.N,{variant:"default",href:"#","aria-disabled":m||void 0,onClick:w,children:y}):(0,u.jsx)(c.$,{size:n,tone:p,variant:t,onClick:g,disabled:m,children:y})]})}},12434(e,t,n){"use strict";n.d(t,{A:()=>y});var o=n(56427),r=n(47143),i=n(86087),s=n(27723),a=n(72326),c=n(13022),l=n(93856),d=n(15132),u=n(66336),p=n(93294),f=n(93875),g=n(96015),h=n(77391),m=n(53935),v=n(85636),b=n(20492),w=n(10790);const __=s.__,y=({className:e=null,disabled:t=!1,hideConnectButton:n=!1,hideHeading:s=!1})=>{const y=(0,l.x)(),x=y?m.k:h.T,_=y?v.A:b.A,{refresh:k}=(0,d.A)(),{connections:j,deletingConnections:S,updatingConnections:C}=(0,r.useSelect)(e=>{const{getConnections:t,getDeletingConnections:n,getUpdatingConnections:o}=e(p.M);return{connections:t(),deletingConnections:n(),updatingConnections:o()}},[]),A=[...j].sort((e,t)=>e.service_name===t.service_name?e.connection_id.localeCompare(t.connection_id):e.service_name.localeCompare(t.service_name));(0,i.useEffect)(()=>{k()},[k]);const E=(0,g.h)(),{openConnectionsModal:R}=(0,r.useDispatch)(p.M),N=(0,u._)();return(0,w.jsxs)("div",{className:(0,c.A)(_.wrapper,e),inert:t?"true":void 0,children:[A.length?(0,w.jsxs)(w.Fragment,{children:[!s&&(0,w.jsx)("h3",{children:__("Connected accounts","jetpack-publicize-pkg")}),(0,w.jsx)("ul",{className:_["connection-list"],children:A.map(e=>{const t=C.includes(e.connection_id)||S.includes(e.connection_id);return(0,w.jsx)("li",{className:_["connection-list-item"],children:(0,w.jsx)(o.Disabled,{isDisabled:t,children:(0,w.jsx)(x,{connection:e,service:E(e.service_name),canMarkAsShared:N})})},e.connection_id)})})]}):null,(0,w.jsx)(f._,{}),!n&&(0,w.jsx)(a.$,{variant:A.length?"outline":"solid",onClick:R,children:__("Connect an account","jetpack-publicize-pkg")})]})}},566(e,t,n){"use strict";n.d(t,{j:()=>l});var o=n(56427),r=n(47143),i=n(86087),s=n(27723),a=n(93294),c=n(10790);const __=s.__;function l({connection:e}){const{updateConnectionById:t}=(0,r.useDispatch)(a.M),{isUpdating:n}=(0,r.useSelect)(t=>{const{getUpdatingConnections:n}=t(a.M);return{isUpdating:n().includes(e.connection_id)}},[e.connection_id]),s=(0,i.useCallback)(n=>{t(e.connection_id,{shared:n})},[e.connection_id,t]);return(0,c.jsx)(o.CheckboxControl,{checked:e.shared??!1,onChange:s,disabled:n||"broken"===e.status,label:__("Mark the connection as shared","jetpack-publicize-pkg"),__nextHasNoMarginBottom:!0})}},18241(e,t,n){"use strict";n.d(t,{C:()=>u});var o=n(63406),r=n(47143),i=n(86087),s=n(27723),a=n(79654),c=n(93294),l=n(50272),d=n(10790);const __=s.__,_x=s._x;function u({connection:e,service:t}){const{fetchKeyringResult:n,setKeyringResult:s,openConnectionsModal:u,setReconnectingAccount:p,completeReconnect:f}=(0,r.useDispatch)(c.M),{createErrorNotice:g}=(0,o.I)(),{canManageConnection:h,isReconnectingThis:m}=(0,r.useSelect)(t=>{const{canUserManageConnection:n,getReconnectingAccount:o}=t(c.M);return{canManageConnection:n(e),isReconnectingThis:o()?.connection_id===e.connection_id}},[e]),[v,b]=(0,i.useState)(!1);(0,i.useEffect)(()=>{m||b(!1)},[m]);const w=(0,i.useCallback)(async e=>{const t=await n(e);if(!t?.ID)return b(!1),p(void 0),void g(__("The reconnection could not be completed. Please try again.","jetpack-publicize-pkg"));await f(t)||(s(t),u())},[f,g,n,u,s,p]),y=(0,l.P)({service:t,onConfirm:w}),x=(0,i.useCallback)(async()=>{if(b(!0),await p(e),"bluesky"===t.id)return void u();const n=new FormData;"mastodon"===t.id&&n.set("instance",e.external_handle);await y(n,{refresh:!0,onAbort:()=>b(!1)})||(b(!1),p(void 0))},[e,u,y,t.id,p]),_=(0,i.useCallback)(e=>{e.preventDefault(),v||x()},[v,x]);return h?v?(0,d.jsx)(a.N,{href:"#",variant:"unstyled","aria-disabled":!0,children:__("Reconnecting…","jetpack-publicize-pkg")}):(0,d.jsx)(a.N,{href:"#",onClick:_,children:_x("Reconnect","Reconnect a social media account","jetpack-publicize-pkg")}):null}},69908(e,t,n){"use strict";n.d(t,{O:()=>m});var o=n(63406),r=n(3924),i=n(56427),s=n(47143),a=n(86087),c=n(27723),l=n(79654),d=n(93294),u=n(75265),p=n(12278),f=n(10790);const __=c.__,_x=c._x;function g({label:e,profile_picture:t}){return(0,f.jsxs)("div",{className:p.A["account-info"],children:[t?(0,f.jsx)("img",{className:p.A["profile-pic"],src:t,alt:e}):null,(0,f.jsx)("span",{children:e})]})}const h=()=>{};function m({keyringResult:e,onComplete:t,canMarkAsShared:n}){const c=(0,u.o)(),{existingConnections:m,reconnectingAccount:v}=(0,s.useSelect)(e=>{const t=e(d.M);return{existingConnections:t.getConnections(),reconnectingAccount:t.getReconnectingAccount()}},[]),{createErrorNotice:b}=(0,o.I)(),w=c.find(t=>t.id===e.service),y=(0,a.useCallback)(e=>m.some(t=>t.service_name===w?.id&&t.external_id===e),[m,w?.id]),x=(0,a.useMemo)(()=>{const t=[],n=[];if(!w)return{connected:t,not_connected:n};const o=[];if(w.supports.additional_users_only||o.push({label:e.external_display||e.external_name,value:e.external_ID,Line truncated
|
||||
__("Write a default share message. Use placeholders like %1$s or %2$s — they’re filled in when posts are shared.","jetpack-publicize-pkg"),"{title}","{url}"),v=u??(0,r.createInterpolateElement)(__("Supports placeholders like <title/> and <url/>. See the list below for all the options.","jetpack-publicize-pkg"),{title:(0,c.jsx)("code",{children:"{title}"}),url:(0,c.jsx)("code",{children:"{url}"})});return(0,c.jsxs)("div",{className:a.A["message-template-editor"],children:[(0,c.jsx)(o.TextareaControl,{value:t,label:h,onChange:n,disabled:p,placeholder:m,rows:f,help:v,__nextHasNoMarginBottom:!0}),g&&(0,c.jsx)(s.A,{})]})}},19076(e,t,n){"use strict";n.d(t,{A:()=>l});var o=n(56427),r=n(27723),i=n(51609),s=n(40976),a=n(90437),c=n(10790);const __=r.__;function l(){const e=(0,s.nE)()?.message_templates?.placeholders,t=(0,i.useCallback)(({onToggle:e,isOpen:t})=>(0,c.jsx)(o.Button,{variant:"link",onClick:e,"aria-expanded":t,children:__("Available placeholders","jetpack-publicize-pkg")}),[]),n=(0,i.useCallback)(()=>(0,c.jsxs)("div",{className:a.A["placeholders-help-content"],children:[(0,c.jsx)("p",{children:__("Use placeholders to automatically insert post details.","jetpack-publicize-pkg")}),(0,c.jsx)("ul",{children:e?.map(({id:e,label:t})=>(0,c.jsxs)("li",{children:[(0,c.jsx)("code",{children:e}),(0,c.jsx)("span",{children:t})]},e))})]}),[e]);return e?.length?(0,c.jsx)(o.Dropdown,{focusOnMount:!0,popoverProps:{placement:"bottom-start"},renderToggle:t,renderContent:n,className:a.A["placeholders-help"],contentClassName:a.A["placeholders-help-popover"]}):null}},72313(e,t,n){"use strict";n.d(t,{$:()=>h});var o=n(47143),r=n(86087),i=n(27723),s=n(72326),a=n(13022),c=n(93856),l=n(93294),d=n(66415),u=n(29999),p=n(1872),f=n(50272),g=n(10790);const __=i.__;function h({service:e,isSmall:t,onSubmit:n,displayInputs:i,hasConnections:h,buttonLabel:m,compact:v}){const b=(0,c.x)(),{fetchKeyringResult:w,setKeyringResult:y,completeReconnect:x}=(0,o.useDispatch)(l.M);let _;v&&(_=i?"default":"compact");const{isConnectionsModalOpen:k}=(0,o.useSelect)(e=>e(l.M),[]),j=(0,o.useSelect)(e=>e(l.M).getReconnectingAccount(),[]),[S,C]=(0,r.useState)(!1),A=(0,o.useSelect)(e=>e(l.M).isFetchingServicesList(),[]),E=(0,o.useSelect)(e=>e(l.M).isFetchingKeyringResult(),[]),R=(0,r.useCallback)(async e=>{if(!k())return;const t=await w(e);!await x(t)&&t?.ID&&y(t)},[x,w,k,y]),N=(0,f.P)({service:e,onConfirm:R}),z=(0,r.useCallback)(async e=>{if(e.preventDefault(),e.stopPropagation(),n)return n();C(!0);const t=new FormData(e.target);await N(t,{refresh:Boolean(j)})},[n,j,N]);return(0,g.jsxs)("form",{className:(0,a.A)(p.A["connect-form"],{[p.A.small]:t}),onSubmit:z,children:[i?(0,g.jsx)("div",{className:(0,a.A)(p.A["fields-wrapper"],p.A.input),children:b?(0,g.jsx)(u.g,{service:e}):(0,g.jsx)(d.t,{service:e})}):null,(0,g.jsx)("div",{className:p.A["fields-wrapper"],children:(0,g.jsx)(s.$,{variant:h?"outline":"solid",size:_,type:"submit",disabled:A||E,children:(e=>{if(e)return e;if((A||E)&&S)return __("Connecting…","jetpack-publicize-pkg");const t=__("Connect more","jetpack-publicize-pkg"),n=__("Connect","jetpack-publicize-pkg");return h?t:n})(m)})})]})}},29999(e,t,n){"use strict";n.d(t,{g:()=>g});var o=n(56427),r=n(47143),i=n(86087),s=n(27723),a=n(79654),c=n(88050),l=n(61868),d=n(13022),u=n(93294),p=n(13168),f=n(10790);const __=s.__,_x=s._x;function g({service:e}){const[t,n]=(0,i.useState)(null),g=(0,r.useSelect)(e=>e(u.M).getReconnectingAccount(),[]),h=(0,i.useCallback)(e=>{if(e.endsWith(".bsky.social")){if(e.replace(".bsky.social","").includes("."))return n((0,s.sprintf)(/* translators: %s is the handle suffix like .bsky.social */
|
||||
__('Bluesky usernames cannot contain dots. If you are using a custom domain, enter it without "%s"',"jetpack-publicize-pkg"),".bsky.social")),!1}return n(null),!0},[]),m=(0,i.useCallback)(e=>h(e??""),[h]);if("mastodon"===e.id)return(0,f.jsx)("div",{className:p.A["fields-item"],children:(0,f.jsx)(o.__experimentalInputControl,{__next40pxDefaultSize:!0,required:!0,type:"text",name:"instance",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Mastodon handle","jetpack-publicize-pkg"),label:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg"),placeholder:"@mastodon@mastodon.social",help:__("You can find the handle in your Mastodon profile.","jetpack-publicize-pkg")})});if("bluesky"===e.id){const e=t?(0,f.jsx)("span",{className:p.A["error-text"],children:t}):(0,f.jsxs)(f.Fragment,{children:[__("You can find the handle in your Bluesky profile.","jetpack-publicize-pkg")," ",(0,i.createInterpolateElement)((0,s.sprintf)(/* translators: %s is the bluesky handle suffix like .bsky.social */
|
||||
__("This can either be %s or just the domain name if you are using a custom domain.","jetpack-publicize-pkg"),"<strong>username.bsky.social</strong>"),{strong:(0,f.jsx)("strong",{})})]});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:(0,d.A)(p.A["fields-item"],{[p.A["fields-item-error"]]:Boolean(t)}),children:(0,f.jsx)(o.__experimentalInputControl,{__next40pxDefaultSize:!0,required:!0,type:"text",name:"handle",defaultValue:"bluesky"===g?.service_name?g?.external_handle:void 0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Bluesky handle","jetpack-publicize-pkg"),label:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg"),placeholder:"username.bsky.social",onChange:m,help:e})}),(0,f.jsxs)("div",{className:p.A["fields-item"],children:[(0,f.jsx)(o.__experimentalInputControl,{__next40pxDefaultSize:!0,required:!0,type:"password",name:"app_password",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false",label:__("App password","jetpack-publicize-pkg"),placeholder:"xxxx-xxxx-xxxx-xxxx",help:(0,i.createInterpolateElement)(__("App password is needed to safely connect your account. App password is different from your account password. You can <link>generate it in Bluesky</link>.","jetpack-publicize-pkg"),{link:(0,f.jsx)(a.N,{openInNewTab:!0,href:"https://bsky.app/settings/app-passwords",children:null})})}),"bluesky"===g?.service_name&&(0,f.jsx)(c.b,{intent:"error",children:(0,f.jsx)(l.V,{children:__("Please provide an app password to fix the connection.","jetpack-publicize-pkg")})})]})]})}return null}},66415(e,t,n){"use strict";n.d(t,{t:()=>p});var o=n(56427),r=n(47143),i=n(86087),s=n(27723),a=n(79654),c=n(13022),l=n(93294),d=n(1872),u=n(10790);const __=s.__,_x=s._x;function p({service:e}){const t=(0,i.useId)(),[n,p]=(0,i.useState)(null),f=(0,r.useSelect)(e=>e(l.M).getReconnectingAccount(),[]),g=(0,i.useCallback)(e=>{if(e.endsWith(".bsky.social")){if(e.replace(".bsky.social","").includes("."))return p((0,s.sprintf)(/* translators: %s is the handle suffix like .bsky.social */
|
||||
__('Bluesky usernames cannot contain dots. If you are using a custom domain, enter it without "%s"',"jetpack-publicize-pkg"),".bsky.social")),!1}return p(null),!0},[]),h=(0,i.useCallback)(e=>{g(e.target.value)},[g]);return"mastodon"===e.id?(0,u.jsxs)("div",{className:d.A["fields-item"],children:[(0,u.jsx)("label",{htmlFor:`${t}-handle`,children:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg")}),(0,u.jsx)("input",{id:`${t}-handle`,required:!0,type:"text",name:"instance",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Mastodon handle","jetpack-publicize-pkg"),"aria-describedby":`${t}-handle-description`,placeholder:"@mastodon@mastodon.social"}),(0,u.jsx)("p",{className:"description",id:`${t}-handle-description`,children:__("You can find the handle in your Mastodon profile.","jetpack-publicize-pkg")})]}):"bluesky"===e.id?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:d.A["fields-item"],children:[(0,u.jsx)("label",{htmlFor:`${t}-handle`,children:_x("Handle","The handle of a social media account.","jetpack-publicize-pkg")}),(0,u.jsx)("input",{id:`${t}-handle`,required:!0,type:"text",name:"handle",defaultValue:"bluesky"===f?.service_name?f?.external_handle:void 0,autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("Bluesky handle","jetpack-publicize-pkg"),"aria-describedby":`${t}-handle-description`,placeholder:"username.bsky.social",onChange:h,className:n?d.A.error:void 0}),(0,u.jsx)("p",{className:(0,c.A)("description",n&&d.A["error-text"]),id:`${t}-handle-description`,children:n||(0,u.jsxs)(u.Fragment,{children:[__("You can find the handle in your Bluesky profile.","jetpack-publicize-pkg")," ",(0,i.createInterpolateElement)((0,s.sprintf)(/* translators: %s is the bluesky handle suffix like .bsky.social */
|
||||
__("This can either be %s or just the domain name if you are using a custom domain.","jetpack-publicize-pkg"),"<strong>username.bsky.social</strong>"),{strong:(0,u.jsx)("strong",{})})]})})]}),(0,u.jsxs)("div",{className:d.A["fields-item"],children:[(0,u.jsx)("label",{htmlFor:`${t}-password`,children:__("App password","jetpack-publicize-pkg")}),(0,u.jsx)("input",{id:`${t}-password`,required:!0,type:"password",name:"app_password",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:"false","aria-label":__("App password","jetpack-publicize-pkg"),"aria-describedby":`${t}-password-description`,placeholder:"xxxx-xxxx-xxxx-xxxx"}),(0,u.jsx)("p",{className:"description",id:`${t}-password-description`,children:(0,i.createInterpolateElement)(__("App password is needed to safely connect your account. App password is different from your account password. You can <link>generate it in Bluesky</link>.","jetpack-publicize-pkg"),{link:(0,u.jsx)(a.N,{openInNewTab:!0,href:"https://bsky.app/settings/app-passwords",children:null})})}),"bluesky"===f?.service_name&&(0,u.jsx)(o.Notice,{status:"error",isDismissible:!1,children:__("Please provide an app password to fix the connection.","jetpack-publicize-pkg")})]})]}):null}},4985(e,t,n){"use strict";n.d(t,{f:()=>b});var o=n(47143),r=n(27723),i=n(28847),s=n(21220),a=n(33180),c=n(39968),l=n(93294),d=n(92216),u=n(30646),p=n(25737),f=n(51708),g=n(25394),h=n(566),m=n(13168),v=n(10790);const __=r.__,b=({connection:e,service:t,canMarkAsShared:n})=>{const r=(0,o.useSelect)(t=>t(l.M).canUserManageConnection(e),[e]);return(0,v.jsxs)(s.B,{direction:"column",gap:"lg",children:[(0,v.jsxs)(s.B,{direction:"row",gap:"lg",children:[(0,v.jsx)("div",{children:(0,v.jsx)(d.A,{className:m.A["profile-pic"],profilePicture:e.profile_picture,label:e.display_name})}),(0,v.jsxs)(s.B,{direction:"column",align:"flex-start",gap:"sm",className:m.A["connection-details"],children:[(0,v.jsx)(u.s,{connection:e,tone:"neutral"}),(e=>{if(("broken"===e.status||"must_reauth"===e.status)&&r)return(0,v.jsx)(p.v,{connection:e,service:t});if(n){const t=__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack-publicize-pkg");return(0,v.jsxs)(s.B,{direction:"row",align:"center",gap:"sm",children:[(0,v.jsx)(h.j,{connection:e}),(0,v.jsx)(a.K,{variant:"minimal",tone:"neutral",size:"small",label:t,icon:i.A})]})}return r?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c.E,{className:m.A.description,children:__("This connection is added by a site administrator.","jetpack-publicize-pkg")}),"broken"===e.status?(0,v.jsx)(p.v,{connection:e,service:t}):null]})})(e)]}),(0,v.jsx)("div",{className:m.A["connection-actions"],children:(0,v.jsx)(g.V,{connection:e,variant:"outline",size:"compact",tone:"neutral"})})]}),(0,v.jsx)(f.m,{connection:e})]})}},14217(e,t,n){"use strict";n.d(t,{e:()=>m});var o=n(40597),r=n(47425),i=n(47143),s=n(27723),a=n(93294),c=n(92216),l=n(30646),d=n(25737),u=n(51708),p=n(25394),f=n(566),g=n(1872),h=n(10790);const __=s.__,m=({connection:e,service:t,canMarkAsShared:n})=>{const s=(0,i.useSelect)(t=>t(a.M).canUserManageConnection(e),[e]);return(0,h.jsxs)("div",{className:g.A["service-connection-wrapper"],children:[(0,h.jsxs)("div",{className:g.A["service-connection"],children:[(0,h.jsx)("div",{children:(0,h.jsx)(c.A,{className:g.A["profile-pic"],profilePicture:e.profile_picture,label:e.display_name})}),(0,h.jsxs)("div",{className:g.A["connection-details"],children:[(0,h.jsx)(l.s,{connection:e}),(m=e,"broken"!==m.status&&"must_reauth"!==m.status||!s?n?(0,h.jsxs)("div",{className:g.A["mark-shared-wrap"],children:[(0,h.jsx)(f.j,{connection:m}),(0,h.jsx)(o.A,{placement:"top",inline:!1,shift:!0,children:__("If enabled, the connection will be available to all administrators, editors, and authors.","jetpack-publicize-pkg")})]}):s?null:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(r.Ay,{className:g.A.description,children:__("This connection is added by a site administrator.","jetpack-publicize-pkg")}),"broken"===m.status?(0,h.jsx)(d.v,{connection:m,service:t}):null]}):(0,h.jsx)(d.v,{connection:m,service:t}))]}),(0,h.jsx)("div",{className:g.A["connection-actions"],children:(0,h.jsx)(p.V,{connection:e,variant:"minimal"})})]}),(0,h.jsx)(u.m,{connection:e})]});var m}},95790(e,t,n){"use strict";n.d(t,{x:()=>g});var o=n(56427),r=n(29491),i=n(47143),s=n(13022),a=n(93856),c=n(66336),l=n(93294),d=n(14217),u=n(4985),p=n(1872),f=n(10790);function g({service:e,serviceConnections:t}){const n=(0,a.x)()?u.f:d.e,g=(0,r.useViewportMatch)("small","<"),{deletingConnections:h,updatingConnections:m}=(0,i.useSelect)(e=>{const{getDeletingConnections:t,getUpdatingConnections:n}=e(l.M);return{deletingConnections:t(),updatingConnections:n()}},[]),v=(0,c._)();return t.length?(0,f.jsx)("ul",{className:p.A["service-connection-list"],children:t.map(t=>{const r=m.includes(t.connection_id)||h.includes(t.connection_id);return(0,f.jsx)("li",{children:(0,f.jsx)(o.Disabled,{isDisabled:r,children:(0,f.jsx)(Line truncated
|
||||
// translators: %d: Number of connections
|
||||
__("%d connections","jetpack-publicize-pkg"),e.length):__("Connected","jetpack-publicize-pkg")})}},92043(e,t,n){"use strict";n.d(t,{M:()=>u});var o=n(47143),r=n(86087),i=n(71032),s=n(93294),a=n(26839),c=n(13168),l=n(75265),d=n(10790);function u(){const e=(0,l.o)(),t=(0,o.useSelect)(e=>e(s.M).getConnections(),[]),n=(0,r.useMemo)(()=>t.reduce((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e),{}),[t]),u=(0,o.useSelect)(e=>e(s.M).getReconnectingAccount(),[]);return(0,d.jsx)(i.b,{children:(0,d.jsx)("ul",{className:c.A.services,children:e.map(e=>(0,d.jsx)("li",{className:c.A["service-list-item"],children:(0,d.jsx)(a.q,{service:e,serviceConnections:n[e.id]||[],isPanelDefaultOpen:u?.service_name===e.id})},e.id))})})}},19123(e,t,n){"use strict";n.d(t,{b:()=>d});var o=n(47143),r=n(86087),i=n(93294),s=n(86663),a=n(1872),c=n(75265),l=n(10790);function d(){const e=(0,c.o)(),t=(0,o.useSelect)(e=>e(i.M).getConnections(),[]),n=(0,r.useMemo)(()=>t.reduce((e,t)=>(e[t.service_name]||(e[t.service_name]=[]),e[t.service_name].push(t),e),{}),[t]),d=(0,o.useSelect)(e=>e(i.M).getReconnectingAccount(),[]);return(0,l.jsx)("ul",{className:a.A.services,children:e.map(e=>(0,l.jsx)("li",{className:a.A["service-list-item"],children:(0,l.jsx)(s.j,{service:e,serviceConnections:n[e.id]||[],isPanelDefaultOpen:d?.service_name===e.id})},e.id))})}},50272(e,t,n){"use strict";n.d(t,{P:()=>d});var o=n(63406),r=n(97999),i=n(47143),s=n(86087),a=n(27723),c=n(93294),l=n(5488);const __=a.__;function d({service:e,onConfirm:t}){const{createErrorNotice:n}=(0,o.I)(),a=(0,i.useSelect)(e=>e(c.M).isMastodonAccountAlreadyConnected,[]),d=(0,i.useSelect)(e=>e(c.M).isBlueskyAccountAlreadyConnected,[]),{refreshServicesList:u}=(0,i.useDispatch)(c.M),{getService:p}=(0,i.useSelect)(e=>e(c.M),[]);return(0,s.useCallback)(async(o,i={})=>{let s=e.url;if(!s&&(await u(),s=p(e.id)?.url,!s))return n(__("Could not start the connection. Please refresh the page and try again.","jetpack-publicize-pkg")),!1;const c=new URL(s);switch(e.id){case"mastodon":{const e=o.get("instance").toString().trim();if(!/^@?\b([A-Z0-9_]+)@([A-Z0-9.-]+\.[A-Z]{2,})$/gi.test(e))return n(__("Invalid Mastodon username","jetpack-publicize-pkg")),!1;if(!i.refresh&&a?.(e))return n(__("This Mastodon account is already connected","jetpack-publicize-pkg")),!1;c.searchParams.set("instance",e);break}case"bluesky":{const e=(o.get("handle")?.toString()||"").trim().replace(/^@/,"");if(!function(e){const t=e.split(".").filter(Boolean);return!(t.length<2)&&t.every(e=>/^[a-z0-9_-]+$/i.test(e))}(e))return n(__("Invalid Bluesky handle","jetpack-publicize-pkg")),!1;if(!i.refresh&&d?.(e))return n(__("This Bluesky account is already connected","jetpack-publicize-pkg")),!1;c.searchParams.set("handle",e),c.searchParams.set("app_password",(o.get("app_password")?.toString()||"").trim());break}}const f=Math.random().toString(36).slice(2,12);c.searchParams.set("auth_flow","v2"),c.searchParams.set("request_id",f),c.searchParams.set("return_url",(0,r.getAdminUrl)("admin-post.php?action=jetpack_social_keyring_done")),i.refresh&&c.searchParams.set("refresh","1");const g=(0,l.x9)(c.toString(),()=>t(f),i.onAbort);return g||n(__("The connection window could not be opened. Please allow pop-ups for this site and try again.","jetpack-publicize-pkg")),g},[n,p,d,a,t,u,e])}},48896(e,t,n){"use strict";n.d(t,{h:()=>i});var o=n(51609),r=n(96015);function i(){const e=(0,r.h)();return(0,o.useCallback)(t=>e(t)?.label||t[0].toUpperCase()+t.substring(1),[e])}},96015(e,t,n){"use strict";n.d(t,{h:()=>i});var o=n(51609),r=n(75265);function i(){const e=(0,r.o)();return(0,o.useCallback)(t=>e.find(e=>e.id===t),[e])}},75265(e,t,n){"use strict";n.d(t,{o:()=>a});n(89097);var o=n(47143),r=n(86087),i=n(93294),s=n(43493);function a(){const e=(0,o.useSelect)(e=>e(i.M).getServicesList(),[]);return(0,r.useMemo)(()=>e.filter(({status:e})=>"ok"===e).map(e=>({...e,...(0,s.M)(e.id)})),[e])}},43493(e,t,n){"use strict";n.d(t,{M:()=>h});var o=n(78478),r=n(86087),i=n(27723),s=n(79654),a=n(5488),c=n(10790);const __=i.__,l=(0,a.uq)("connections-facebook.webp"),d=(0,a.uq)("connections-instagram-business.webp"),u=(0,a.uq)("connections-linkedin.webp"),p=(0,a.uq)("connections-nextdoor.webp"),f=(0,a.uq)("connections-threads.webp"),g=(0,a.uq)("connections-tumblr.webp");function h(e){switch(e){case"bluesky":return{needsCustomInputs:!0,icon:e=>(0,c.jsx)(o.M5,{serviceName:"bluesky",...e}),description:__("Share with your network.","jetpack-publicize-pkg"),examples:[()=>(0,c.jsx)(c.Fragment,{children:__("To share to Bluesky please enter your Bluesky handle and app password below, then click connect.","jetpack-publicize-pkg")})]};case"facebook":return{icon:e=>(0,c.jsx)(o.M5,{serviceName:"facebook",...e}),description:__("Share to your pages","jetpack-publicize-pkg"),examples:[()=>(0,c.jsx)(c.Fragment,{children:(0,r.createInterpolateElement)(__("<strong>Connect</strong> to automatically share posts on your Facebook page.","jetpack-publicize-pkg"),{strong:(0,Line truncated
|
||||
__("Pick the %s template","jetpack-publicize-pkg"),t.label)})]},t.name))})}},51519(e,t,n){"use strict";n.d(t,{A:()=>i});var o=n(5488);const r=e=>`${(0,o.nE)()?.assets_url??""}assets/sig-templates-${e}.jpg`,i=[{name:"highway",label:"Highway",image:r("highway")},{name:"dois",label:"Dois",image:r("dois")},{name:"edge",label:"Edge",image:r("edge")},{name:"fullscreen",label:"Fullscreen",image:r("fullscreen")}]},24080(e,t,n){"use strict";n.d(t,{A:()=>s});var o=n(86087),r=n(46333),i=n(10790);const s=({sourceUrl:e,mime:t,duration:n})=>{const[s,a]=(0,o.useState)(!1),[c,l]=(0,o.useState)(0),d=(0,o.useRef)(null),u=(0,o.useRef)(null),p=(0,o.useRef)(null);(0,o.useEffect)(()=>{d.current?.load()},[e]);const f=(0,o.useCallback)(()=>{d.current.pause(),d.current.currentTime=0,clearInterval(u.current),clearTimeout(p.current),l(0),a(!1)},[]),g=(0,o.useCallback)(()=>{p.current=setTimeout(()=>{s||(d.current.play(),a(!0),u.current=setInterval(()=>{l(e=>e+1)},1e3))},500)},[s]),h=()=>{const e=n-c,t=Math.floor(e/60),o=String(Math.floor(e%60)).padStart(2,"0");return(0,i.jsxs)("div",{className:r.A.progress,children:[(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"6",height:"8",fill:"none",children:(0,i.jsx)("path",{fill:"#fff",d:"M5.25 3.567a.5.5 0 0 1 0 .866L.75 7.031A.5.5 0 0 1 0 6.598V1.402A.5.5 0 0 1 .75.969l4.5 2.598Z"})}),(0,i.jsx)("span",{className:r.A.duration,children:`${t}:${o}`})]})};return(0,i.jsxs)("div",{className:r.A.wrapper,onMouseEnter:g,onMouseLeave:f,children:[(0,i.jsx)("video",{ref:d,onEnded:f,muted:!0,children:(0,i.jsx)("source",{src:e,type:t})}),(0,i.jsx)(h,{})]})}},81669(e,t,n){"use strict";n(83688)},2442(e,t,n){"use strict";n(47143),n(43656),n(86087),n(83688)},93856(e,t,n){"use strict";n.d(t,{x:()=>i});var o=n(86087);n(10790);const r=(0,o.createContext)(!1);function i(){return(0,o.useContext)(r)}},71615(e,t,n){"use strict";n.d(t,{A:()=>a});var o=n(3582),r=n(47143),i=n(86087);const s=async e=>{if(!e)return{};let t={mime:e.mime_type,fileSize:e.media_details.filesize,length:e.media_details?.length};"video/videopress"===e.mime_type&&(t=await(async e=>{if(!e?.media_details?.videopress?.original||!e?.media_details?.videopress?.duration)return{};const t=await fetch(e?.media_details?.videopress?.original,{method:"HEAD"}),n=t.headers.get("content-length"),o=t.headers.get("content-type");return n&&o?{mime:o,fileSize:n,length:Math.round(e.media_details.videopress.duration/1e3)}:{}})(e));const n=e?.media_details?.sizes??{};if(!n.full)return{mediaData:{width:e.media_details.width,height:e.media_details.height,sourceUrl:e.source_url},metaData:t};const o=n.medium||n.large||n.full,r={width:o.width,height:o.height,sourceUrl:o.source_url};return{mediaData:{width:n.full.width,height:n.full.height,sourceUrl:n.full.source_url},metaData:t,previewData:r}};function a(e=null){const[t,n]=(0,i.useState)([{}]),a=(0,r.useSelect)(t=>{if(!e)return null;const n=t(o.store).getEntityRecord("postType","attachment",e,{context:"view"});if(n)return n;return t(o.store).hasFinishedResolution("getEntityRecord",["postType","attachment",e,{context:"view"}])?null:void 0},[e]),c=(0,i.useCallback)(async()=>{try{const e=await s(a);n([e??{}])}catch{n([{}])}},[a]);(0,i.useEffect)(()=>{c()},[c]);const l=null===a&&!!e;return[t[0],l]}},11851(e,t,n){"use strict";n(27723)},51202(e,t,n){"use strict";n.d(t,{cZ:()=>o});n(86087),n(81669),n(2442),n(11851),n(39987);function o(e){return"video"===e.split("/")[0]}},39987(e,t,n){"use strict";n.d(t,{UB:()=>f});const o="video/mp4",r="video/mov",i="video/videopress",s=["image/jpeg","image/jpg","image/png"],a=s.concat(["image/gif","image/bmp"]),c=["video/3g2","video/3gp","video/3gpp","video/asf","video/avi","video/dat","video/divx","video/dv","video/f4v","video/flv","video/gif","video/m2ts","video/m4v","video/mkv","video/mod","video/mov","video/mp4","video/mpe","video/mpeg","video/mpeg4","video/mpg","video/mts","video/nsv","video/ogm","video/ogv","video/qt","video/tod","video/ts","video/vob","video/wmv"],l=s.concat(["image/gif","image/heic","image/heif","image/webp","image/avif"]),d=["video/webm","video/quicktime","video/ogg"],u=s.concat(["image/gif","image/jpe","image/tif","image/tiff","image/webp"]),p=[r,"video/avi","video/mpg","video/mpeg","video/m4v"],f=(s.concat([o,i,r]),s.concat([o,i,r,"video/webm","video/mpeg"]),a.concat([i,...c]),s.concat(["image/gif",o,i]),l.concat([...d,o,"video/m4v",r,i]),u.concat([...p,o,i]),s.concat([o,r,i]),[...new Set([...s,...a,...l,...c,...d,"image/png","image/jpeg","image/jpg","image/heic","image/heif","image/webp"])])},83688(e,t,n){"use strict";n(97999),n(47143),n(43656),n(86087),n(5488)},4884(e,t,n){"use strict";n.d(t,{A:()=>c});var o=n(1455),r=n.n(o),i=n(93832),s=n(51609);const a=e=>({price:e.full_price/12,introOffer:e.introductory_offer?e.introductory_offer.cost_per_interval/12:null});function c(){const[e,t]=(0,s.useState)(null),n=(0,s.useCallback)(async()=>{try{const n=await r()({path:(0,i.addQueryArgs)("/my-jetpack/v1/site/products",{products:"social"})}),o=n?.social?.pricingLine truncated
|
||||
__("%s account connected successfully.","jetpack-publicize-pkg"),s.service_label),{type:"snackbar",isDismissible:!0}),n.select(a.store).getCurrentPostId()&&r(S()))}catch(e){let t=__("Error connecting account.","jetpack-publicize-pkg");"object"==typeof e&&"message"in e&&e.message&&(t=`${t} ${e.message}`),l(t,{type:"snackbar",isDismissible:!0})}finally{r(T(u,!1)),r(A(u))}}}function M(e,t){return{type:p.dw,connectionId:e,data:t}}function T(e,t=!0){return{type:p._6,connectionId:e,updating:t}}function I(e){return{type:p.Nv,reconnectingAccount:e}}function P(e){return async function({dispatch:t,select:n}){const r=n.getReconnectingAccount();if(!r||!e?.ID)return!1;if(![e.external_ID,...e.additional_external_users?.map(e=>e.external_ID)??[]].filter(Boolean).map(String).includes(r.external_id))return!1;await t(j());const i="ok"===n.getConnectionById(r.connection_id)?.status;t(I(void 0));const{createSuccessNotice:a,createErrorNotice:c}=(0,s.dispatch)(o.store);return i?a(__("Account reconnected successfully.","jetpack-publicize-pkg"),{type:"snackbar",isDismissible:!0}):c(__("The account could not be reconnected. Please try again.","jetpack-publicize-pkg"),{type:"snackbar",isDismissible:!0}),!0}}function O(e,t,n={}){return async function({dispatch:r,select:a}){const{createErrorNotice:c,createSuccessNotice:l}=(0,s.dispatch)(o.store),{silent:d=!1}=n,u=a.getConnectionById(e);try{const n=`/wpcom/v2/publicize/connections/${e}`;r(k()),r(M(e,t)),d||r(T(e));await i()({method:"POST",path:n,data:t})&&!d&&l(__("Account updated successfully.","jetpack-publicize-pkg"),{type:"snackbar",isDismissible:!0})}catch(t){let n=__("Error updating account.","jetpack-publicize-pkg");"object"==typeof t&&"message"in t&&t.message&&(n=`${n} ${t.message}`),r(M(e,u)),c(n,{type:"snackbar",isDismissible:!0})}finally{d||r(T(e,!1))}}}function L(e){return{type:p.xW,isOpen:e}}function D(){return L(!0)}function B(){return L(!1)}function F(e,t){return{type:p.JS,connectionId:e,data:t}}function U(e,t,n=!0){return async function({dispatch:o}){await o(F(e,t)),n&&await o(S())}}},65043(e,t,n){"use strict";n.d(t,{B4:()=>j,BN:()=>u,Bc:()=>r,DQ:()=>M,FF:()=>N,JB:()=>E,JS:()=>v,N6:()=>k,N8:()=>I,Nv:()=>d,Ob:()=>x,T7:()=>A,WB:()=>f,WH:()=>a,Wp:()=>g,_6:()=>l,_y:()=>w,aF:()=>y,aT:()=>z,af:()=>i,b5:()=>h,dA:()=>o,dw:()=>c,em:()=>C,fz:()=>b,gN:()=>S,gy:()=>R,nC:()=>s,oe:()=>T,pn:()=>_,rz:()=>m,xW:()=>p});const o="SET_CONNECTIONS",r="ADD_CONNECTION",i="TOGGLE_CONNECTION",s="DELETE_CONNECTION",a="DELETING_CONNECTION",c="UPDATE_CONNECTION",l="UPDATING_CONNECTION",d="SET_RECONNECTING_ACCOUNT",u="SET_KEYRING_RESULT",p="TOGGLE_CONNECTIONS_MODAL",f="ADD_ABORT_CONTROLLER",g="REMOVE_ABORT_CONTROLLERS",h="DEFAULT",m="REFRESH_CONNECTIONS",v="CUSTOMIZE_CONNECTION",b="FETCH_POST_SHARE_STATUS",w="RECEIVE_POST_SHARE_STATUS",y="POLLING_FOR_POST_SHARE_STATUS",x="TOGGLE_UNIFIED_MODAL",_="SET_UNIFIED_MODAL_INITIAL_PATH",k="SET_UNIFIED_MODAL_SCREEN_LOCK",j="SET_UNIFIED_MODAL_DATA",S="SET_IS_SHARING_CURRENT_POST",C="SET_IS_SCHEDULING_SHARES",A="START_RENDERING_MESSAGES",E="RECEIVE_RENDERED_MESSAGES",R="FINISH_RENDERING_MESSAGES",N="SET_TRAFFIC_INTERVAL",z="FETCH_TRAFFIC_REFERRERS",M="RECEIVE_TRAFFIC_REFERRERS",T="RECEIVE_TRAFFIC_REFERRERS_ERROR",I="FETCHING_KEYRING_RESULT"},84970(e,t,n){"use strict";n.d(t,{A:()=>h});var o=n(83373),r=n(17426),i=n(8926),s=n(68100),a=n(59168),c=n(82744),l=n(38251),d=n(82676),u=n(29715),p=n(32425),f=n(76473),g=n(80968);const h={...c,...a,...o,...l,...n(33998),...u,...p,...d,...s,...i,...f,...g,...r}},17426(e,t,n){"use strict";n.r(t),n.d(t,{finishRenderingMessages:()=>a,receiveRenderedMessages:()=>s,startRenderingMessages:()=>i});var o=n(69433),r=n(65043);function i(e,t,n={}){return{type:r.T7,cacheKey:(0,o.a)(e,t,n)}}function s(e,t,n,i={}){return{type:r.JB,cacheKey:(0,o.a)(e,t,i),batch:n}}function a(e,t,n={}){return{type:r.gy,cacheKey:(0,o.a)(e,t,n)}}},8926(e,t,n){"use strict";n.r(t),n.d(t,{createScheduledShare:()=>l,deleteScheduledShare:()=>d,scheduleShares:()=>p,setIsSchedulingShares:()=>u});var o=n(3582),r=n(43656),i=n(27723),s=n(692),a=n(65043);const __=i.__,c="social-scheduled-share";function l(e){return async function({registry:t}){const{saveEntityRecord:n}=t.dispatch(o.store),{getLastEntitySaveError:r}=t.select(o.store),{createErrorNotice:i}=t.dispatch(s.store),a=await n("wpcom/v2","publicize/scheduled-actions",e);if(!a){const e=r("wpcom/v2","publicize/scheduled-actions");let t=__("There was an error scheduling the post.","jetpack-publicize-pkg");e?.message&&(t+=" "+e.message),i(t,{type:"snackbar",id:c})}return a}}function d(e){return async function({registry:t}){const{deleteEntityRecord:n}=t.dispatch(o.store),{getLastEntityDeleteError:r}=t.select(o.store),{createErrorNotice:i}=t.dispatch(s.store);if(!await n("wpcom/v2","publicize/scheduled-actions",e)){const t=r("wpcom/v2","publicize/scheduled-actions",e);let n=__("There was an error deleting the item.","jetpack-publicize-pkg");t?.message&&(n+=" "+t.message),i(n,{type:"snackbar"})}}}function u(e){return{tyLine truncated
|
||||
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* tabbable 6.4.0
|
||||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* use-sync-external-store-shim/with-selector.production.js
|
||||
*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
@@ -0,0 +1 @@
|
||||
:where(._fUXxnSp5pagKBp9gSN7) *{box-sizing:border-box}.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-end:0;inset-block-start:auto;inset-inline:0;position:fixed;z-index:100001}@media(min-width:600px){.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-start:4rem;inset-inline:unset;inset-inline-end:1rem;width:auto}}@media(min-width:782px){.jT9Kt2ZTvxPKDQ1pa7sN.components-snackbar-list{inset-block-start:3rem}}.cAbGtJDGgLubucBnz7vM{background-color:var(--jp-white)}.vMa4i_Dza2t5Zi_Bw9Nf{background:var(--jp-white-off);overflow:hidden;padding-top:1px}@media(min-resolution:192dpi){:root{--wpds-border-width-focus:1.5px}}.jetpack-footer{border-top:1px solid #f0f0f0;box-sizing:border-box;font-size:13px;padding:20px 24px;width:100%}.jetpack-footer :is(.jetpack-footer__menu-item:any-link,.jetpack-footer__menu-item[role=button]){color:#707070;cursor:pointer;text-decoration:none}.jetpack-footer .jetpack-footer__menu-item:hover{text-decoration:underline}.jetpack-footer>ul{list-style:none;margin:0;padding:0}.jetpack-footer>ul>li{margin:0}.jetpack-footer__logo{flex-shrink:0}@media(min-width:480px){a.jetpack-footer__a8c{margin-inline-start:auto}}a.jetpack-footer__a8c svg{fill:#707070}@media(max-width:599px){.RuVLl3q4lxTQa3wbhBJB{grid-column-end:span 1}.f9LZTRG4MMK42rS89afW{grid-column-start:1}.bHe_zKxjjpUwHw_MdYE1{grid-column-end:2}.QZbNrOqE2aNSn50xVhpU{grid-column-end:span 2}.ev7W3z7zVYPeHAlYqZjf{grid-column-start:2}.NJWd1m_e7lOiPYru2ZMP{grid-column-end:3}.Xc6nt1Qc1DI0Z2A3gt1r{grid-column-end:span 3}.UIcN_GXiPRoIsin8Kohg{grid-column-start:3}.GRKCyqb5LufCSCgykKFc{grid-column-end:4}.i_qTq8gqhhC3vIUepVRB{grid-column-end:span 4}.G3qaZ3Jpbvam_1XvGxgc{grid-column-start:4}.VRCNYKZtO9zukEwmgP1y{grid-column-end:5}}@media(min-width:600px)and (max-width:959px){.tRm008K_WJL79WoNZTNL{grid-column-end:span 1}.l5T2P_bgKts4tdaRkS1d{grid-column-start:1}.zOCxfLZpF6BlgC7a_Yq1{grid-column-end:2}.F80DdgVn0m5OpvtSQWka{grid-column-end:span 2}.oI1c7JYfiJtMQHbhngtU{grid-column-start:2}.pMQtA_4jh1_1lVknqEP5{grid-column-end:3}.VenqMpdgyKQVUNNQcfqd{grid-column-end:span 3}.seNYL99uoczf9V4MxBxT{grid-column-start:3}.YKfF1HFhI9KygA5l3b2J{grid-column-end:4}.yAi0Cv1xDWkoqsaUhvhR{grid-column-end:span 4}.ubhnyZOnkgxNhh6XtVWv{grid-column-start:4}.RGOPGQbWMJ9Ei5oFxS7X{grid-column-end:5}.Sz1E2aWbX483ijdi6yge{grid-column-end:span 5}.tku6_bRYrX9tMbgYGmIl{grid-column-start:5}.b5JHttOhSEcI1WBlqAjk{grid-column-end:6}.FboSx5MoKTAWbxXyYlCw{grid-column-end:span 6}.Jhs8yEEmodG30edbJvag{grid-column-start:6}.IpzbbKVqEqPcfIGkXkwt{grid-column-end:7}.mhCPwfAZ4Kmm_empzJAq{grid-column-end:span 7}.x034ilrJF7rO9UJB2rI1{grid-column-start:7}.Wt8t2e16viRrOJ1lLA5v{grid-column-end:8}.S6pIrEy9AMLKx9bgh_Ae{grid-column-end:span 8}.kEfI4tGyuWfHTlRnvIab{grid-column-start:8}.PUzX4RRsKq1dnsz3gebS{grid-column-end:9}}@media(min-width:960px){.X_pdcLJikd8LS_YAdJlB{grid-column-end:span 1}.tl936d14Huby4khYp05X{grid-column-start:1}.hnge0LnR69d3NXEtEE1t{grid-column-end:2}.fj0NUMuyZQcPNgKcjp5Z{grid-column-end:span 2}.R2ncBX7a2NigdYCcV1OX{grid-column-start:2}.t8vMSDVYno9k9itRwnXb{grid-column-end:3}.wsDuEN2GqHx6qzo8dUdk{grid-column-end:span 3}.cIEVPUweWtLBy3xaXnMx{grid-column-start:3}.fajUWBwu1m2B479j3jmz{grid-column-end:4}.YR0c7fQTgMkDdWzwSyLp{grid-column-end:span 4}.xlwp8BmplxkKNMI7gamo{grid-column-start:4}._C4O1w9DUqx1m3gPf8aA{grid-column-end:5}.Z54F1hAErckAIrKlxnXW{grid-column-end:span 5}.ezSDWkRHmKSxDJXxuiOH{grid-column-start:5}.T0ChoeAjGJjkkNrYhD4g{grid-column-end:6}.qtMoMPF6yHvGJnWHSsde{grid-column-end:span 6}.gdoywN5VPiWERfIBqkph{grid-column-start:6}.wUev_VH5uf_pwFFlbnAU{grid-column-end:7}.egIPDFJsOpownTClq9XP{grid-column-end:span 7}.yGhp9yoAW7k0kQik9AB7{grid-column-start:7}.SJ43U9mR5wUg5V2qBeQA{grid-column-end:8}.cTuyHfMwSUJxN_HdIEgd{grid-column-end:span 8}.smCr8DaIagcumdvdldiK{grid-column-start:8}.T03NHzQJvzwL6wAfIiTL{grid-column-end:9}.pMvxM3RJGjqyNdf9qg1Y{grid-column-end:span 9}.iIVpNRwEnQ_JI5gpp9EN{grid-column-start:9}.ZbQ4u4vGSX5rJOje4uGL{grid-column-end:10}.gKb5wuIDAlKGbrjK2vxy{grid-column-end:span 10}.Z7pINdImE2WJiYnZBTqm{grid-column-start:10}.ZTxp6qpvwurMdOnLLSz1{grid-column-end:11}.NnQTlbfnxPDR6cQ7rygg{grid-column-end:span 11}.O137wZd6Yl0olSA9PsXR{grid-column-start:11}.zf2OJtQ2MPz6SDoh6CB0{grid-column-end:12}.U3H6UHW6HqRt9hdzVg3O{grid-column-end:span 12}.zynnNeS_ZBTxABcVpUQH{grid-column-start:12}.vI8tltFZtFUNAy9Iag9s{grid-column-end:13}}.SqdhUZkXCRuIpErj1B3z{--max-container-width:1040px;--vertical-gutter:24px;--horizontal-spacing:8px;column-gap:var(--vertical-gutter);display:grid;margin:0 auto;width:100%}@media(max-width:599px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(4,minmax(0,1fr));max-width:calc(var(--max-container-width) + 32px);padding:0 16px}}@media(min-width:600px)and (max-width:959px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(8,minmax(0,1fr));max-width:calc(var(--max-container-width) + 36px);padding:0 18px}}@media(min-width:960px){.SqdhUZkXCRuIpErj1B3z{grid-template-columns:repeat(12,minmax(0,1fr));max-width:calc(var(--max-container-width)Line truncated
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* Style registration - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* Note: These styles can be overridden by calling jetpack_social_override_style()
|
||||
* in lib/client-assets.php for complex cases (multiple files, conditional deps, etc.)
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
/**
|
||||
* Registers a style according to `wp_register_style`. Honors this request by
|
||||
* deregistering any style by the same handler before registration.
|
||||
*
|
||||
* @param WP_Styles $styles WP_Styles instance.
|
||||
* @param string $handle Name of the stylesheet. Should be unique.
|
||||
* @param string $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
|
||||
* @param array $deps Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array.
|
||||
* @param string|bool|null $ver Optional. String specifying stylesheet version number, if it has one, which is added to the URL
|
||||
* as a query string for cache busting purposes. If version is set to false, a version
|
||||
* number is automatically added equal to current installed WordPress version.
|
||||
* If set to null, no version is added.
|
||||
* @param string $media Optional. The media for which this stylesheet has been defined.
|
||||
* Default 'all'. Accepts media types like 'all', 'print' and 'screen', or media queries like
|
||||
* '(orientation: portrait)' and '(max-width: 640px)'.
|
||||
*/
|
||||
function jetpack_social_override_style( $styles, $handle, $src, $deps = array(), $ver = false, $media = 'all' ) {
|
||||
$style = $styles->query( $handle, 'registered' );
|
||||
if ( $style ) {
|
||||
$styles->remove( $handle );
|
||||
}
|
||||
$styles->add( $handle, $src, $deps, $ver, $media );
|
||||
}
|
||||
|
||||
/**
|
||||
* Register all package styles (simple cases only).
|
||||
* Complex cases should be manually registered in lib/client-assets.php.
|
||||
*
|
||||
* @param WP_Styles $styles WP_Styles instance.
|
||||
*/
|
||||
function jetpack_social_register_package_styles( $styles ) {
|
||||
// Load build constants
|
||||
$build_constants = require __DIR__ . '/constants.php';
|
||||
$default_version = ! SCRIPT_DEBUG ? $build_constants['version'] : time();
|
||||
$suffix = '.min';
|
||||
|
||||
$styles_dir = __DIR__ . '/styles';
|
||||
$styles_file = $styles_dir . '/registry.php';
|
||||
|
||||
if ( ! file_exists( $styles_file ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$styles_data = require $styles_file;
|
||||
$plugin_dir = dirname( __FILE__ );
|
||||
|
||||
foreach ( $styles_data as $style_data ) {
|
||||
jetpack_social_override_style(
|
||||
$styles,
|
||||
$style_data['handle'],
|
||||
$build_constants['build_url'] . 'styles/' . $style_data['path'] . $suffix . '.css',
|
||||
$style_data['dependencies'],
|
||||
$default_version
|
||||
);
|
||||
|
||||
// Enable RTL support (WordPress automatically loads -rtl.css variant)
|
||||
$styles->add_data( $style_data['handle'], 'rtl', 'replace' );
|
||||
$styles->add_data( $style_data['handle'], 'suffix', $suffix );
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_default_styles', 'jetpack_social_register_package_styles' );
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Style registry - Auto-generated by build process.
|
||||
* Do not edit this file manually.
|
||||
*
|
||||
* @package jetpack_social
|
||||
*/
|
||||
|
||||
return array(
|
||||
|
||||
);
|
||||