CoreFiles by mySites.guru
content.min.js1 lines, 15,532 bytes, from wordpress-7.0-beta2.zip
Raw History Compare with 7.0-beta1
md5
48c8a80bb5a7ebbe57c94d6a9fe5be90
sha1
1ab5753bc5b0880a759a945bccbdd233f02a8510
sha256
20dbb1bd0fa68fa7cd2a03d9d7b527a498d4559a1d6754f8d7436ea0acb597c3
var ve=Object.create;var E=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var xe=Object.getOwnPropertyNames;var we=Object.getPrototypeOf,Ce=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var be=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of xe(t))!Ce.call(e,a)&&a!==n&&E(e,a,{get:()=>t[a],enumerable:!(o=ye(t,a))||o.enumerable});return e};var i=(e,t,n)=>(n=e!=null?ve(we(e)):{},be(t||!e||!e.__esModule?E(n,"default",{value:e,enumerable:!0}):n,e));var _=v((ze,N)=>{N.exports=window.wp.i18n});var C=v((Ge,M)=>{M.exports=window.wp.components});var S=v((Ke,j)=>{j.exports=window.ReactJSXRuntime});var A=v((Ee,$)=>{$.exports=window.wp.element});var oe=v((et,ne)=>{ne.exports=window.wp.data});var ie=v((tt,ae)=>{ae.exports=window.wp.apiFetch});var ge=v((lt,de)=>{de.exports=window.wp.privateApis});function D(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=D(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function _e(){for(var e,t,n=0,o="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=D(e))&&(o&&(o+=" "),o+=t);return o}var k=_e;var W=i(A(),1),Z=i(S(),1),q=(0,W.forwardRef)(({children:e,className:t,ariaLabel:n,as:o="div",...a},r)=>(0,Z.jsx)(o,{ref:r,className:k("admin-ui-navigable-region",t),"aria-label":n,role:"region",tabIndex:"-1",...a,children:e}));q.displayName="NavigableRegion";var J=q;var L=i(C(),1);var X=i(C(),1),{Fill:Q,Slot:Y}=(0,X.createSlotFill)("SidebarToggle");var d=i(S(),1);function ee({breadcrumbs:e,badges:t,title:n,subTitle:o,actions:a,showSidebarToggle:r=!0}){return(0,d.jsxs)(L.__experimentalVStack,{className:"admin-ui-page__header",as:"header",children:[(0,d.jsxs)(L.__experimentalHStack,{justify:"space-between",spacing:2,children:[(0,d.jsxs)(L.__experimentalHStack,{spacing:2,justify:"left",children:[r&&(0,d.jsx)(Y,{bubblesVirtually:!0,className:"admin-ui-page__sidebar-toggle-slot"}),n&&(0,d.jsx)(L.__experimentalHeading,{as:"h2",level:3,weight:500,truncate:!0,children:n}),e,t]}),(0,d.jsx)(L.__experimentalHStack,{style:{width:"auto",flexShrink:0},spacing:2,className:"admin-ui-page__header-actions",children:a})]}),o&&(0,d.jsx)("p",{className:"admin-ui-page__header-subtitle",children:o})]})}var b=i(S(),1);function te({breadcrumbs:e,badges:t,title:n,subTitle:o,children:a,className:r,actions:x,hasPadding:c=!1,showSidebarToggle:s=!0}){let f=k("admin-ui-page",r);return(0,b.jsxs)(J,{className:f,ariaLabel:n,children:[(n||e||t)&&(0,b.jsx)(ee,{breadcrumbs:e,badges:t,title:n,subTitle:o,actions:x,showSidebarToggle:s}),c?(0,b.jsx)("div",{className:"admin-ui-page__content has-padding",children:a}):a]})}te.SidebarToggleFill=Q;var H=te;var Le=i(C()),me=i(oe()),fe=i(A()),B=i(_());import{privateApis as Re}from"@wordpress/connectors";if(typeof document<"u"&&!document.head.querySelector("style[data-wp-hash='2ca9f0b249']")){let e=document.createElement("style");e.setAttribute("data-wp-hash","2ca9f0b249"),e.appendChild(document.createTextNode(".connectors-page{margin:0 auto;max-width:680px;padding:24px;width:100%}.connectors-page .components-item{background:#fff;border:1px solid #ddd;border-radius:8px;overflow:hidden;padding:20px}.connectors-page .connector-settings .components-text-control__input{font-family:monospace}.connectors-page>p{color:#949494;text-align:center}")),document.head.appendChild(e)}var P=i(C()),m=i(_());import{__experimentalRegisterConnector as O,__experimentalConnectorItem as Se,__experimentalDefaultConnectorSettings as ke}from"@wordpress/connectors";var y=i(ie()),u=i(A()),g=i(_());function re({pluginSlug:e,settingName:t}){let[n,o]=(0,u.useState)("checking"),[a,r]=(0,u.useState)(!1),[x,c]=(0,u.useState)(!1),[s,f]=(0,u.useState)(""),w=n==="active"&&s!==""&&s!=="invalid_key",l=(0,u.useCallback)(async()=>{try{let p=(await(0,y.default)({path:`/wp/v2/settings?_fields=${t}`}))[t]||"";f(p==="invalid_key"?"":p)}catch{}},[t]);(0,u.useEffect)(()=>{(async()=>{try{let V=(await(0,y.default)({path:"/wp/v2/plugins"})).find(he=>he.plugin===`${e}/plugin`);V?V.status==="active"?(await l(),o("active")):o("inactive"):o("not-installed")}catch{o("not-installed")}})()},[e,l]);let I=async()=>{c(!0);try{await(0,y.default)({method:"POST",path:"/wp/v2/plugins",data:{slug:e,status:"active"}}),o("active"),await l(),r(!0)}catch{}finally{c(!1)}},R=async()=>{c(!0);try{await(0,y.default)({method:"PUT",path:`/wp/v2/plugins/${e}/plugin`,data:{status:"active"}}),o("active"),await l(),r(!0)}catch{}finally{c(!1)}};return{pluginStatus:n,isExpanded:a,setIsExpanded:r,isBusy:x,isConnected:w,currentApiKey:s,handleButtonClick:()=>{n==="not-installed"?I():n==="inactive"?R():r(!a)},getButtonLabel:()=>{if(x)return n==="not-installed"?(0,g.__)("Installing\u2026"):(0,g.__)("Activating\u2026");if(a)return(0,g.__)("Cancel");if(w)return(0,g.__)("Edit");switch(n){case"checking":return(0,g.__)("Checking\u2026");case"not-installed":return(0,g.__)("Install");case"inactive":return(0,g.__)("Activate");case"active":return(0,g.__)("Set up")}},saveApiKey:async h=>{try{let p=await(0,y.default)({method:"POST",path:`/wp/v2/settings?_fields=${t}`,data:{[t]:h}});if(h&&p[t]===s)throw new Error("It was not possible to connect to the provider using this key.");f(p[t]||"")}catch(p){throw console.error("Failed to save API key:",p),p}},removeApiKey:async()=>{try{await(0,y.default)({method:"POST",path:`/wp/v2/settings?_fields=${t}`,data:{[t]:""}}),f("")}catch(h){throw console.error("Failed to remove API key:",h),h}}}}var se=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364l2.0201-1.1685a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.4043-.6813zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",fill:"currentColor"})),le=()=>React.createElement("svg",{width:"40",height:"40",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M6.2 21.024L12.416 17.536L12.52 17.232L12.416 17.064H12.112L11.072 17L7.52 16.904L4.44 16.776L1.456 16.616L0.704 16.456L0 15.528L0.072 15.064L0.704 14.64L1.608 14.72L3.608 14.856L6.608 15.064L8.784 15.192L12.008 15.528H12.52L12.592 15.32L12.416 15.192L12.28 15.064L9.176 12.96L5.816 10.736L4.056 9.456L3.104 8.808L2.624 8.2L2.416 6.872L3.28 5.92L4.44 6L4.736 6.08L5.912 6.984L8.424 8.928L11.704 11.344L12.184 11.744L12.376 11.608L12.4 11.512L12.184 11.152L10.4 7.928L8.496 4.648L7.648 3.288L7.424 2.472C7.344 2.136 7.288 1.856 7.288 1.512L8.272 0.176L8.816 0L10.128 0.176L10.68 0.656L11.496 2.52L12.816 5.456L14.864 9.448L15.464 10.632L15.784 11.728L15.904 12.064H16.112V11.872L16.28 9.624L16.592 6.864L16.896 3.312L17 2.312L17.496 1.112L18.48 0.464L19.248 0.832L19.88 1.736L19.792 2.32L19.416 4.76L18.68 8.584L18.2 11.144H18.48L18.8 10.824L20.096 9.104L22.272 6.384L23.232 5.304L24.352 4.112L25.072 3.544H26.432L27.432 5.032L26.984 6.568L25.584 8.344L24.424 9.848L22.76 12.088L21.72 13.88L21.816 14.024L22.064 14L25.824 13.2L27.856 12.832L30.28 12.416L31.376 12.928L31.496 13.448L31.064 14.512L28.472 15.152L25.432 15.76L20.904 16.832L20.848 16.872L20.912 16.952L22.952 17.144L23.824 17.192H25.96L29.936 17.488L30.976 18.176L31.6 19.016L31.496 19.656L29.896 20.472L27.736 19.96L22.696 18.76L20.968 18.328H20.728V18.472L22.168 19.88L24.808 22.264L28.112 25.336L28.28 26.096L27.856 26.696L27.408 26.632L24.504 24.448L23.384 23.464L20.848 21.328H20.68V21.552L21.264 22.408L24.352 27.048L24.512 28.472L24.288 28.936L23.488 29.216L22.608 29.056L20.8 26.52L18.936 23.664L17.432 21.104L17.248 21.208L16.36 30.768L15.944 31.256L14.984 31.624L14.184 31.016L13.76 30.032L14.184 28.088L14.696 25.552L15.112 23.536L15.488 21.032L15.712 20.2L15.696 20.144L15.512 20.168L13.624 22.76L10.752 26.64L8.48 29.072L7.936 29.288L6.992 28.8L7.08 27.928L7.608 27.152L10.752 23.152L12.648 20.672L13.872 19.24L13.864 19.032H13.792L5.44 24.456L3.952 24.648L3.312 24.048L3.392 23.064L3.696 22.744L6.208 21.016L6.2 21.024Z",fill:"#D97757"})),ce=()=>React.createElement("svg",{width:"40",height:"40",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"#3186FF"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-0)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-1)"}),React.createElement("path",{d:"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z",fill:"url(#lobe-icons-gemini-fill-2)"}),React.createElement("defs",null,React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-0",x1:"7",x2:"11",y1:"15.5",y2:"12"},React.createElement("stop",{stopColor:"#08B962"}),React.createElement("stop",{offset:"1",stopColor:"#08B962",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-1",x1:"8",x2:"11.5",y1:"5.5",y2:"11"},React.createElement("stop",{stopColor:"#F94543"}),React.createElement("stop",{offset:"1",stopColor:"#F94543",stopOpacity:"0"})),React.createElement("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lobe-icons-gemini-fill-2",x1:"3.5",x2:"17.5",y1:"13.5",y2:"12"},React.createElement("stop",{stopColor:"#FABC12"}),React.createElement("stop",{offset:".46",stopColor:"#FABC12",stopOpacity:"0"}))));var Ae=()=>React.createElement("span",{style:{color:"#345b37",backgroundColor:"#eff8f0",padding:"4px 12px",borderRadius:"2px",fontSize:"13px",fontWeight:500,whiteSpace:"nowrap"}},(0,m.__)("Connected"));function F({label:e,description:t,pluginSlug:n,settingName:o,helpUrl:a,helpLabel:r,Logo:x}){let{pluginStatus:c,isExpanded:s,setIsExpanded:f,isBusy:w,isConnected:l,currentApiKey:I,handleButtonClick:R,getButtonLabel:T,saveApiKey:z,removeApiKey:G}=re({pluginSlug:n,settingName:o});return React.createElement(Se,{className:`connector-item--${n}`,icon:React.createElement(x,null),name:e,description:t,actionArea:React.createElement(P.__experimentalHStack,{spacing:3,expanded:!1},l&&React.createElement(Ae,null),React.createElement(P.Button,{variant:s||l?"tertiary":"secondary",size:s||l?void 0:"compact",onClick:R,disabled:c==="checking"||w,isBusy:w,"aria-expanded":s},T()))},s&&c==="active"&&React.createElement(ke,{key:l?"connected":"setup",initialValue:I,helpUrl:a,helpLabel:r,readOnly:l,onRemove:G,onSave:async K=>{await z(K),f(!1)}}))}function Pe(e){return React.createElement(F,{...e,pluginSlug:"ai-provider-for-openai",settingName:"connectors_ai_openai_api_key",helpUrl:"https://platform.openai.com",helpLabel:"platform.openai.com",Logo:se})}function Be(e){return React.createElement(F,{...e,pluginSlug:"ai-provider-for-anthropic",settingName:"connectors_ai_anthropic_api_key",helpUrl:"https://console.anthropic.com",helpLabel:"console.anthropic.com",Logo:le})}function Ie(e){return React.createElement(F,{...e,pluginSlug:"ai-provider-for-google",settingName:"connectors_ai_google_api_key",helpUrl:"https://aistudio.google.com",helpLabel:"aistudio.google.com",Logo:ce})}function pe(){O("core/openai",{label:(0,m.__)("OpenAI"),description:(0,m.__)("Text, image, and code generation with GPT and DALL-E."),render:Pe}),O("core/claude",{label:(0,m.__)("Claude"),description:(0,m.__)("Writing, research, and analysis with Claude."),render:Be}),O("core/gemini",{label:(0,m.__)("Gemini"),description:(0,m.__)("Content generation, translation, and vision with Google's Gemini."),render:Ie})}var ue=i(ge()),{lock:ct,unlock:U}=(0,ue.__dangerousOptInToUnstableAPIsOnlyForCoreModules)("I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.","@wordpress/routes");var{store:He}=U(Re);pe();function Oe(){let e=(0,me.useSelect)(t=>U(t(He)).getConnectors(),[]);return React.createElement(H,{title:(0,B.__)("Connectors"),subTitle:(0,B.__)("All of your API keys and credentials are stored here and shared across plugins. Configure once and use everywhere.")},React.createElement("div",{className:"connectors-page"},React.createElement(Le.__experimentalVStack,{spacing:3},e.map(t=>t.render?React.createElement(t.render,{key:t.slug,slug:t.slug,label:t.label,description:t.description}):null)),React.createElement("p",null,(0,fe.createInterpolateElement)((0,B.__)("Find more connectors in <a>the plugin directory</a>"),{a:React.createElement("a",{href:"plugin-install.php"})}))))}function Fe(){return React.createElement(Oe,null)}var Ue=Fe;export{Ue as stage};

No other release has this exact content. See every version of this file.