Changeset 3633708
- Timestamp:
- 08/04/2026 05:07:50 AM (3 months ago)
- Location:
- noshi-kanamer/trunk
- Files:
-
- 9 edited
-
build/admin/index.js (modified) (1 diff)
-
languages/noshi-kanamer-ja-757eccaece1679b51289d2c0f1a3403c.json (modified) (3 diffs)
-
languages/noshi-kanamer-ja.mo (modified) ( previous)
-
languages/noshi-kanamer-ja.po (modified) (4 diffs)
-
languages/noshi-kanamer.pot (modified) (4 diffs)
-
noshi-kanamer.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
src/admin/PreLaunch.jsx (modified) (1 diff)
-
src/admin/SiteCheck.jsx (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
noshi-kanamer/trunk/build/admin/index.js
r3632646 r3633708 1 (function(){"use strict";const{useState:qe}=window.wp.element,{__:be}=window.wp.i18n;function le({icon:t,title:r,children:a,pages:s,onClose:h,closeLabel:d}){const[b,u]=qe(0),y=Array.isArray(s)&&s.length>1,E=y?s[b]:a;return React.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},React.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)",maxHeight:"calc(100vh - 80px)",overflowY:"auto"}},React.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},t),React.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},r),React.createElement("div",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7,textAlign:"center"}},E),y&&React.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:20}},React.createElement("button",{type:"button",className:"button",onClick:()=>u(p=>Math.max(0,p-1)),disabled:b===0,"aria-label":be("Previous page","noshi-kanamer")},"‹"),React.createElement("span",{style:{color:"#888",fontSize:13}},b+1," / ",s.length),React.createElement("button",{type:"button",className:"button",onClick:()=>u(p=>Math.min(s.length-1,p+1)),disabled:b===s.length-1,"aria-label":be("Next page","noshi-kanamer")},"›")),React.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},React.createElement("button",{type:"button",className:"button button-primary",onClick:h},d||be("Close","noshi-kanamer")))))}const v=window.wp.element,{useState:oe,useEffect:Se,useRef:Ve,createInterpolateElement:Qe}=window.wp.element,{__:H,sprintf:Ze}=window.wp.i18n;function et({checked:t,indeterminate:r,onChange:a}){const s=Ve(null);return Se(()=>{s.current&&(s.current.indeterminate=r)},[r]),v.createElement("input",{ref:s,type:"checkbox",checked:t,onChange:a,onClick:h=>h.stopPropagation(),style:{cursor:"pointer"}})}const{apiUrl:se,nonce:tt}=window.noshiknData??{},ye={"Content-Type":"application/json","X-WP-Nonce":tt},nt=(se==null?void 0:se.replace("noshikn/v1/",""))??"/wp-json/";function at(){const[t,r]=oe([]),[a,s]=oe([]),[h,d]=oe(!0),[b,u]=oe(!1),[y,E]=oe(null),[p,S]=oe(!1);Se(()=>{Promise.all([fetch(nt+"wp/v2/block-types?per_page=100",{headers:ye}).then(l=>l.json()),fetch(se+"block-filter",{headers:ye}).then(l=>l.json())]).then(([l,x])=>{const _=Array.isArray(l)?l.filter(D=>!D.name.startsWith("noshi-kanamer/")):[];r(_),s(x.hidden_blocks??[]),d(!1)}).catch(()=>d(!1))},[]);const f=l=>s(x=>x.includes(l)?x.filter(_=>_!==l):[...x,l]),N=l=>{s(x=>l.every(D=>x.includes(D))?x.filter(D=>!l.includes(D)):[...new Set([...x,...l])])},J=async()=>{u(!0),E(null);try{const l=await fetch(se+"block-filter",{method:"POST",headers:ye,body:JSON.stringify({hidden_blocks:a})});E(l.ok?{type:"success",text:H("Saved!","noshi-kanamer")}:{type:"error",text:H("Error: please try again.","noshi-kanamer")})}catch{E({type:"error",text:H("Error: please try again.","noshi-kanamer")})}u(!1)};if(h)return v.createElement("p",null,H("Loading blocks…","noshi-kanamer"));const B=t.reduce((l,x)=>{const _=x.category??"uncategorized";return l[_]||(l[_]=[]),l[_].push(x),l},{});return v.createElement("div",null,p&&v.createElement(le,{icon:"🙈",title:H("How Hide Blocks works","noshi-kanamer"),onClose:()=>S(!1)},v.createElement("p",null,Qe(H("Lists every block available on this site.<br/>Turn on the checkbox for the blocks you want to hide and click Save Changes at the bottom, they'll disappear from the block-insertion list on the page editor.<br/>This doesn't affect the display or editing of blocks already used on existing pages.<br/><br/>Noshi-Kanamer also includes a Block Showcase block, which displays all blocks available on this site at once.<br/>You can insert this block from any page. Select Block Showcase, then click the Create Showcase button.","noshi-kanamer"),{br:v.createElement("br",null)}))),v.createElement("h2",{style:{marginTop:0}},H("Hide Blocks: Hide blocks your clients won't need","noshi-kanamer"),v.createElement("button",{type:"button",className:"button",onClick:()=>S(!0),onMouseEnter:l=>{l.currentTarget.style.background="#eef2ff",l.currentTarget.style.borderColor="#a5b4fc",l.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",l.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:l=>{l.currentTarget.style.background="#f5f7ff",l.currentTarget.style.borderColor="#c7d2fe",l.currentTarget.style.boxShadow="none",l.currentTarget.style.transform="translateY(0)"},"aria-label":H("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},v.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),v.createElement("span",null,H("Guide","noshi-kanamer")))),v.createElement("p",{style:{color:"#666",marginBottom:16}},H("Develop: Hide editor blocks your client won't need. The Pre-Launch tab can generate code to permanently hide them, no plugin required.","noshi-kanamer")),Object.entries(B).sort().map(([l,x])=>{const _=x.map(o=>o.name),D=_.filter(o=>a.includes(o)).length,K=D===_.length,q=D>0&&!K;return v.createElement("details",{key:l,open:!0,style:{marginBottom:12,border:"1px solid #ddd",borderRadius:4,padding:"4px 12px"}},v.createElement("summary",{style:{cursor:"pointer",fontWeight:600,padding:"8px 0",display:"flex",alignItems:"center",gap:8}},v.createElement(et,{checked:K,indeterminate:q,onChange:()=>N(_)}),l," ",v.createElement("span",{style:{color:"#888",fontWeight:400}},"(",x.length,")")),v.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:"4px 8px",padding:"8px 0 12px"}},x.map(o=>v.createElement("label",{key:o.name,style:{display:"flex",alignItems:"center",gap:6,fontSize:13}},v.createElement("input",{type:"checkbox",checked:a.includes(o.name),onChange:()=>f(o.name)}),v.createElement("span",{title:o.name},o.title??o.name)))))}),v.createElement("div",{style:{marginTop:20,display:"flex",alignItems:"center",gap:12}},v.createElement("button",{className:"button button-primary",onClick:J,disabled:b},H(b?"Saving…":"Save Changes","noshi-kanamer")),a.length>0&&v.createElement("span",{style:{color:"#666",fontSize:13}},Ze(H("%d block(s) hidden","noshi-kanamer"),a.length)),y&&v.createElement("span",{style:{color:y.type==="success"?"#2a9d2a":"#c00"}},y.text)))}const w=window.wp.element,{useState:ie,createInterpolateElement:ot}=window.wp.element,{__:$,_n:_e,sprintf:Ce}=window.wp.i18n,{apiUrl:Te,nonce:rt}=window.noshiknData??{},Re={"Content-Type":"application/json","X-WP-Nonce":rt};function lt(){const[t,r]=ie(3),[a,s]=ie(!1),[h,d]=ie(!1),[b,u]=ie(null),[y,E]=ie(!1),p=async()=>{s(!0),u(null);try{const f=await fetch(Te+"test-posts/generate",{method:"POST",headers:Re,body:JSON.stringify({post_type:"post",count:t})}),N=await f.json();f.ok?u({type:"success",text:Ce(_e("%1$d test post generated. (%2$d total)","%1$d test posts generated. (%2$d total)",N.count,"noshi-kanamer"),N.count,N.total)}):u({type:"error",text:N.message??$("Error: please try again.","noshi-kanamer")})}catch{u({type:"error",text:$("Error: please try again.","noshi-kanamer")})}s(!1)},S=async()=>{d(!0),u(null);try{const f=await fetch(Te+"test-posts/delete",{method:"POST",headers:Re,body:JSON.stringify({post_type:"post"})}),N=await f.json();f.ok?u({type:"success",text:Ce(_e("%d test post deleted.","%d test posts deleted.",N.count,"noshi-kanamer"),N.count)}):u({type:"error",text:N.message??$("Error: please try again.","noshi-kanamer")})}catch{u({type:"error",text:$("Error: please try again.","noshi-kanamer")})}d(!1)};return w.createElement("div",null,y&&w.createElement(le,{icon:"📝",title:$("How Test Posts works","noshi-kanamer"),onClose:()=>E(!1)},w.createElement("p",null,ot($("Click Generate Test Posts to add dummy posts.<br/>Use Number of posts to choose how many dummy posts to add at once.<br/>You can add them as many times as you need, and delete them all at once with Delete All Test Posts.<br/><br/>When you're ready to hand off, you can also delete them from the Pre-Launch tab.<br/>Every post this tool creates is flagged internally, so only generated posts can be safely deleted in bulk.","noshi-kanamer"),{br:w.createElement("br",null)}))),w.createElement("h2",{style:{marginTop:0}},$("Test Posts: Generate dummy content","noshi-kanamer"),w.createElement("button",{type:"button",className:"button",onClick:()=>E(!0),onMouseEnter:f=>{f.currentTarget.style.background="#eef2ff",f.currentTarget.style.borderColor="#a5b4fc",f.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",f.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:f=>{f.currentTarget.style.background="#f5f7ff",f.currentTarget.style.borderColor="#c7d2fe",f.currentTarget.style.boxShadow="none",f.currentTarget.style.transform="translateY(0)"},"aria-label":$("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},w.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),w.createElement("span",null,$("Guide","noshi-kanamer")))),w.createElement("p",{style:{color:"#666",marginBottom:20}},$("Develop: Generate dummy posts to verify layouts during development. Each post is flagged as a Test Post, so cleanup only removes the ones this tool created.","noshi-kanamer")),w.createElement("table",{className:"form-table",role:"presentation"},w.createElement("tbody",null,w.createElement("tr",null,w.createElement("th",{scope:"row"},w.createElement("label",{htmlFor:"nk-post-type"},$("Post type","noshi-kanamer"))),w.createElement("td",null,w.createElement("select",{id:"nk-post-type",className:"regular-text",disabled:!0},w.createElement("option",{value:"post"},$("post (standard)","noshi-kanamer"))))),w.createElement("tr",null,w.createElement("th",{scope:"row"},w.createElement("label",{htmlFor:"nk-count"},$("Number of posts","noshi-kanamer"))),w.createElement("td",null,w.createElement("input",{id:"nk-count",type:"number",className:"small-text",min:1,max:10,value:t,onChange:f=>r(Math.min(10,Math.max(1,Number(f.target.value))))}))))),w.createElement("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:8}},w.createElement("button",{className:"button button-primary",onClick:p,disabled:a||h},$(a?"Generating…":"Generate Test Posts","noshi-kanamer")),w.createElement("button",{className:"button button-secondary",onClick:S,disabled:a||h,style:{color:"#c00",borderColor:"#c00"}},$(h?"Deleting…":"Delete All Test Posts","noshi-kanamer")),b&&w.createElement("span",{style:{color:b.type==="success"?"#2a9d2a":"#c00"}},b.text)))}const e=window.wp.element,{useState:W,useEffect:Ee,useRef:we,createInterpolateElement:ee}=window.wp.element,{__:n,_n:Ne,sprintf:L}=window.wp.i18n,{apiUrl:st,nonce:it}=window.noshiknData??{},dt={"Content-Type":"application/json","X-WP-Nonce":it},te=(t,r={})=>fetch(st+t,{headers:dt,...r}).then(a=>a.json());function O({text:t}){return e.createElement("span",{style:{color:"#2a9d2a",fontWeight:600}},"✓ ",t)}function U({text:t}){return e.createElement("span",{style:{color:"#c00",fontWeight:600}},"⚠ ",t)}function pe({text:t}){return e.createElement("span",{style:{color:"#888",fontWeight:500}},"○ ",t)}function ct({doneCount:t,totalCount:r,isLoading:a,onPreviewReport:s}){const h=r>0?Math.round(t/r*100):0,d=r-t,b=a?"#9ca3af":"#dc2626",u=a?"#f3f4f6":"#fef2f2",y=a?"#e5e7eb":"#fecaca";return e.createElement("div",{style:{background:u,borderLeft:`4px solid ${b}`,borderRadius:4,padding:"16px 20px",marginBottom:24,boxShadow:"0 1px 3px rgba(0,0,0,0.05)"}},e.createElement("div",{style:{display:"flex",alignItems:"center",gap:16,flexWrap:"wrap"}},e.createElement("div",{style:{flex:"0 0 auto",minWidth:60,fontSize:22,fontWeight:700,color:b,lineHeight:1.2}},a?"-/-":`${t}/${r}`),e.createElement("div",{style:{flex:"1 1 200px",minWidth:200}},e.createElement("strong",{style:{display:"block",fontSize:14,color:"#1d2327",marginBottom:4}},n("Pre-Launch Progress","noshi-kanamer")),e.createElement("span",{style:{color:"#50575e",fontSize:13}},a?n("Checking…","noshi-kanamer"):L(n("%d remaining","noshi-kanamer"),d))),e.createElement("button",{className:"button",onClick:s,disabled:a},n("Generate Report","noshi-kanamer"))),e.createElement("div",{role:"progressbar","aria-valuenow":a?0:t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":n("Pre-Launch Progress","noshi-kanamer"),style:{marginTop:12,height:6,background:y,borderRadius:3,overflow:"hidden"}},e.createElement("div",{style:{width:`${h}%`,height:"100%",background:b,transition:"width 0.3s ease"}})))}function mt({onPreviewReport:t}){return e.createElement("div",{style:{background:"#fff",borderLeft:"4px solid #16a34a",borderRadius:4,padding:"16px 20px",marginBottom:24,display:"flex",alignItems:"center",gap:16,flexWrap:"wrap",boxShadow:"0 1px 3px rgba(0,0,0,0.05)"}},e.createElement("div",{style:{flex:"0 0 40px",width:40,height:40,borderRadius:"50%",background:"#16a34a",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:22,fontWeight:700,lineHeight:1}},"✓"),e.createElement("div",{style:{flex:"1 1 200px",minWidth:200}},e.createElement("strong",{style:{display:"block",fontSize:16,color:"#15803d",marginBottom:4,lineHeight:1.4}},n("All pre-launch checks are complete!","noshi-kanamer")),e.createElement("p",{style:{margin:0,color:"#15803d",fontSize:13,lineHeight:1.5}},n('Click "Generate Report" to export a proof list of every check, handy to share with your client.',"noshi-kanamer"))),t&&e.createElement("button",{className:"button",onClick:t},n("Generate Report","noshi-kanamer")))}function ut({isLoading:t,pendingSteps:r,isReady:a}){const[s,h]=W(0),d=(r==null?void 0:r.length)??0,b=d>0?Math.min(s,d-1):0,u=d>0?r[b]:null;Ee(()=>{s>Math.max(0,d-1)&&h(Math.max(0,d-1))},[d,s]);const y={position:"fixed",bottom:24,right:24,zIndex:9e3,width:280,background:a?"#16a34a":t?"#f3f4f6":"#fff",color:a?"#fff":"#1d2327",borderRadius:8,padding:"12px 16px",boxShadow:"0 4px 16px rgba(0,0,0,0.15)",borderLeft:a?"none":`4px solid ${t?"#9ca3af":"#dc2626"}`,fontSize:13,lineHeight:1.4},E={role:"status","aria-live":"polite"};if(t)return e.createElement("div",{style:y,...E},e.createElement("div",{style:{fontSize:11,opacity:.7,marginBottom:4,textTransform:"uppercase",letterSpacing:1}},n("Next Action","noshi-kanamer")),e.createElement("div",{style:{color:"#888"}},n("Checking…","noshi-kanamer")));if(a)return e.createElement("div",{style:y,...E},e.createElement("strong",{style:{fontSize:14}},"✓ ",n("Ready to Launch","noshi-kanamer")));const p=()=>h(f=>Math.max(0,f-1)),S=()=>h(f=>Math.min(d-1,f+1));return e.createElement("div",{style:y,...E},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4}},e.createElement("span",{style:{fontSize:11,color:"#888",textTransform:"uppercase",letterSpacing:1}},n("Next Action","noshi-kanamer")),d>1&&e.createElement("span",{style:{fontSize:11,color:"#888"}},L(n("%1$d / %2$d","noshi-kanamer"),b+1,d))),e.createElement("div",{style:{marginBottom:u.hint?6:0}},e.createElement("strong",null,"→ ",u.label)),u.hint&&e.createElement("div",{style:{color:"#50575e",fontSize:12,lineHeight:1.5}},u.hint),(u.actionUrl||d>1)&&e.createElement("div",{style:{marginTop:8,display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,flexWrap:"wrap"}},u.actionUrl?e.createElement("a",{className:"button button-small",href:u.actionUrl,target:"_blank",rel:"noreferrer"},u.actionLabel||n("Open","noshi-kanamer")):e.createElement("span",null),d>1&&e.createElement("span",{style:{display:"inline-flex",gap:6}},e.createElement("button",{type:"button",className:"button button-small",onClick:p,disabled:b===0,"aria-label":n("Previous action","noshi-kanamer"),style:{minWidth:56,padding:"0 12px",lineHeight:"24px",fontSize:13}},"‹ ",n("Prev","noshi-kanamer")),e.createElement("button",{type:"button",className:"button button-small",onClick:S,disabled:b>=d-1,"aria-label":n("Next action","noshi-kanamer"),style:{minWidth:56,padding:"0 12px",lineHeight:"24px",fontSize:13}},n("Next","noshi-kanamer")," ›"))))}function pt({children:t,label:r}){const[a,s]=W(!1);return e.createElement("span",{style:{position:"relative",display:"inline-block",marginLeft:4,verticalAlign:"middle"}},e.createElement("span",{role:"button",tabIndex:0,"aria-label":r||n("Details","noshi-kanamer"),"aria-expanded":a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:()=>s(!1),onKeyDown:h=>{h.key==="Escape"?s(!1):(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),s(d=>!d))},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:16,borderRadius:"50%",background:"#dcdcde",color:"#50575e",fontSize:11,fontWeight:700,cursor:"help",userSelect:"none",outline:"none"}},"?"),a&&e.createElement("span",{role:"tooltip",style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%) translateY(-8px)",background:"#1d2327",color:"#fff",padding:"8px 10px",borderRadius:4,fontSize:12,lineHeight:1.5,whiteSpace:"normal",width:300,zIndex:100,boxShadow:"0 2px 8px rgba(0,0,0,0.25)",textAlign:"left",fontWeight:400}},t))}function ke({children:t}){return e.createElement("pre",{style:{background:"#f0f0f0",padding:"8px 12px",fontFamily:"monospace",fontSize:13,marginTop:8,marginBottom:0}},t)}function ht({check:t,setCheck:r,outdatedPlugins:a}){var Ue,Ke,Ye,Xe,Je;const[s,h]=W(null),[d,b]=W(null),[u,y]=W(!1),[E,p]=W(null),[S,f]=W(!1),[N,J]=W(!1),[B,l]=W(""),[x,_]=W(!1),[D,K]=W(!1),[q,o]=W(!1),[C,P]=W(!1),[k,I]=W(!1),M=we(!1),ce=async()=>{l("testPosts");const i=await te("test-posts/delete",{method:"POST",body:JSON.stringify({post_type:"post"})});h(i),l("")},me=async()=>{l("catalog");const i=await te("pre-launch/trash-catalog",{method:"POST",body:"{}"});b(i),l("")},V=async()=>{l("rewrites");const i=await te("pre-launch/flush-rewrites",{method:"POST",body:"{}"});y(i.flushed===!0),l("")},Lt=async()=>{l("debugLog");const i=await te("pre-launch/delete-debug-log",{method:"POST",body:"{}"});p(i),l("")},Wt=async()=>{l("recheck");const i=await te("pre-launch/check");r(i),l("")},Ae=async()=>{await te("pre-launch/mark-review-shown",{method:"POST",body:JSON.stringify({trigger:"completed"})}),r(i=>i&&{...i,review_shown_today:!0}),P(!1)},Dt=Ae,Ht=async()=>{await Ae(),window.open("https://wordpress.org/support/plugin/noshi-kanamer/reviews/#new-post","_blank")},Q=(t==null?void 0:t.hidden_blocks)??[],Oe=Q.length>0?`add_filter( 'allowed_block_types_all', function( $allowed, $ctx ) {1 (function(){"use strict";const{useState:qe}=window.wp.element,{__:be}=window.wp.i18n;function le({icon:t,title:r,children:a,pages:s,onClose:h,closeLabel:d}){const[b,u]=qe(0),y=Array.isArray(s)&&s.length>1,E=y?s[b]:a;return React.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},React.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)",maxHeight:"calc(100vh - 80px)",overflowY:"auto"}},React.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},t),React.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},r),React.createElement("div",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7,textAlign:"center"}},E),y&&React.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:16,marginBottom:20}},React.createElement("button",{type:"button",className:"button",onClick:()=>u(p=>Math.max(0,p-1)),disabled:b===0,"aria-label":be("Previous page","noshi-kanamer")},"‹"),React.createElement("span",{style:{color:"#888",fontSize:13}},b+1," / ",s.length),React.createElement("button",{type:"button",className:"button",onClick:()=>u(p=>Math.min(s.length-1,p+1)),disabled:b===s.length-1,"aria-label":be("Next page","noshi-kanamer")},"›")),React.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},React.createElement("button",{type:"button",className:"button button-primary",onClick:h},d||be("Close","noshi-kanamer")))))}const v=window.wp.element,{useState:oe,useEffect:Se,useRef:Ve,createInterpolateElement:Qe}=window.wp.element,{__:H,sprintf:Ze}=window.wp.i18n;function et({checked:t,indeterminate:r,onChange:a}){const s=Ve(null);return Se(()=>{s.current&&(s.current.indeterminate=r)},[r]),v.createElement("input",{ref:s,type:"checkbox",checked:t,onChange:a,onClick:h=>h.stopPropagation(),style:{cursor:"pointer"}})}const{apiUrl:se,nonce:tt}=window.noshiknData??{},ye={"Content-Type":"application/json","X-WP-Nonce":tt},nt=(se==null?void 0:se.replace("noshikn/v1/",""))??"/wp-json/";function at(){const[t,r]=oe([]),[a,s]=oe([]),[h,d]=oe(!0),[b,u]=oe(!1),[y,E]=oe(null),[p,S]=oe(!1);Se(()=>{Promise.all([fetch(nt+"wp/v2/block-types?per_page=100",{headers:ye}).then(l=>l.json()),fetch(se+"block-filter",{headers:ye}).then(l=>l.json())]).then(([l,x])=>{const _=Array.isArray(l)?l.filter(D=>!D.name.startsWith("noshi-kanamer/")):[];r(_),s(x.hidden_blocks??[]),d(!1)}).catch(()=>d(!1))},[]);const f=l=>s(x=>x.includes(l)?x.filter(_=>_!==l):[...x,l]),N=l=>{s(x=>l.every(D=>x.includes(D))?x.filter(D=>!l.includes(D)):[...new Set([...x,...l])])},J=async()=>{u(!0),E(null);try{const l=await fetch(se+"block-filter",{method:"POST",headers:ye,body:JSON.stringify({hidden_blocks:a})});E(l.ok?{type:"success",text:H("Saved!","noshi-kanamer")}:{type:"error",text:H("Error: please try again.","noshi-kanamer")})}catch{E({type:"error",text:H("Error: please try again.","noshi-kanamer")})}u(!1)};if(h)return v.createElement("p",null,H("Loading blocks…","noshi-kanamer"));const B=t.reduce((l,x)=>{const _=x.category??"uncategorized";return l[_]||(l[_]=[]),l[_].push(x),l},{});return v.createElement("div",null,p&&v.createElement(le,{icon:"🙈",title:H("How Hide Blocks works","noshi-kanamer"),onClose:()=>S(!1)},v.createElement("p",null,Qe(H("Lists every block available on this site.<br/>Turn on the checkbox for the blocks you want to hide and click Save Changes at the bottom, they'll disappear from the block-insertion list on the page editor.<br/>This doesn't affect the display or editing of blocks already used on existing pages.<br/><br/>Noshi-Kanamer also includes a Block Showcase block, which displays all blocks available on this site at once.<br/>You can insert this block from any page. Select Block Showcase, then click the Create Showcase button.","noshi-kanamer"),{br:v.createElement("br",null)}))),v.createElement("h2",{style:{marginTop:0}},H("Hide Blocks: Hide blocks your clients won't need","noshi-kanamer"),v.createElement("button",{type:"button",className:"button",onClick:()=>S(!0),onMouseEnter:l=>{l.currentTarget.style.background="#eef2ff",l.currentTarget.style.borderColor="#a5b4fc",l.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",l.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:l=>{l.currentTarget.style.background="#f5f7ff",l.currentTarget.style.borderColor="#c7d2fe",l.currentTarget.style.boxShadow="none",l.currentTarget.style.transform="translateY(0)"},"aria-label":H("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},v.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),v.createElement("span",null,H("Guide","noshi-kanamer")))),v.createElement("p",{style:{color:"#666",marginBottom:16}},H("Develop: Hide editor blocks your client won't need. The Pre-Launch tab can generate code to permanently hide them, no plugin required.","noshi-kanamer")),Object.entries(B).sort().map(([l,x])=>{const _=x.map(o=>o.name),D=_.filter(o=>a.includes(o)).length,K=D===_.length,q=D>0&&!K;return v.createElement("details",{key:l,open:!0,style:{marginBottom:12,border:"1px solid #ddd",borderRadius:4,padding:"4px 12px"}},v.createElement("summary",{style:{cursor:"pointer",fontWeight:600,padding:"8px 0",display:"flex",alignItems:"center",gap:8}},v.createElement(et,{checked:K,indeterminate:q,onChange:()=>N(_)}),l," ",v.createElement("span",{style:{color:"#888",fontWeight:400}},"(",x.length,")")),v.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:"4px 8px",padding:"8px 0 12px"}},x.map(o=>v.createElement("label",{key:o.name,style:{display:"flex",alignItems:"center",gap:6,fontSize:13}},v.createElement("input",{type:"checkbox",checked:a.includes(o.name),onChange:()=>f(o.name)}),v.createElement("span",{title:o.name},o.title??o.name)))))}),v.createElement("div",{style:{marginTop:20,display:"flex",alignItems:"center",gap:12}},v.createElement("button",{className:"button button-primary",onClick:J,disabled:b},H(b?"Saving…":"Save Changes","noshi-kanamer")),a.length>0&&v.createElement("span",{style:{color:"#666",fontSize:13}},Ze(H("%d block(s) hidden","noshi-kanamer"),a.length)),y&&v.createElement("span",{style:{color:y.type==="success"?"#2a9d2a":"#c00"}},y.text)))}const w=window.wp.element,{useState:ie,createInterpolateElement:ot}=window.wp.element,{__:$,_n:_e,sprintf:Ce}=window.wp.i18n,{apiUrl:Te,nonce:rt}=window.noshiknData??{},Re={"Content-Type":"application/json","X-WP-Nonce":rt};function lt(){const[t,r]=ie(3),[a,s]=ie(!1),[h,d]=ie(!1),[b,u]=ie(null),[y,E]=ie(!1),p=async()=>{s(!0),u(null);try{const f=await fetch(Te+"test-posts/generate",{method:"POST",headers:Re,body:JSON.stringify({post_type:"post",count:t})}),N=await f.json();f.ok?u({type:"success",text:Ce(_e("%1$d test post generated. (%2$d total)","%1$d test posts generated. (%2$d total)",N.count,"noshi-kanamer"),N.count,N.total)}):u({type:"error",text:N.message??$("Error: please try again.","noshi-kanamer")})}catch{u({type:"error",text:$("Error: please try again.","noshi-kanamer")})}s(!1)},S=async()=>{d(!0),u(null);try{const f=await fetch(Te+"test-posts/delete",{method:"POST",headers:Re,body:JSON.stringify({post_type:"post"})}),N=await f.json();f.ok?u({type:"success",text:Ce(_e("%d test post deleted.","%d test posts deleted.",N.count,"noshi-kanamer"),N.count)}):u({type:"error",text:N.message??$("Error: please try again.","noshi-kanamer")})}catch{u({type:"error",text:$("Error: please try again.","noshi-kanamer")})}d(!1)};return w.createElement("div",null,y&&w.createElement(le,{icon:"📝",title:$("How Test Posts works","noshi-kanamer"),onClose:()=>E(!1)},w.createElement("p",null,ot($("Click Generate Test Posts to add dummy posts.<br/>Use Number of posts to choose how many dummy posts to add at once.<br/>You can add them as many times as you need, and delete them all at once with Delete All Test Posts.<br/><br/>When you're ready to hand off, you can also delete them from the Pre-Launch tab.<br/>Every post this tool creates is flagged internally, so only generated posts can be safely deleted in bulk.","noshi-kanamer"),{br:w.createElement("br",null)}))),w.createElement("h2",{style:{marginTop:0}},$("Test Posts: Generate dummy content","noshi-kanamer"),w.createElement("button",{type:"button",className:"button",onClick:()=>E(!0),onMouseEnter:f=>{f.currentTarget.style.background="#eef2ff",f.currentTarget.style.borderColor="#a5b4fc",f.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",f.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:f=>{f.currentTarget.style.background="#f5f7ff",f.currentTarget.style.borderColor="#c7d2fe",f.currentTarget.style.boxShadow="none",f.currentTarget.style.transform="translateY(0)"},"aria-label":$("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},w.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),w.createElement("span",null,$("Guide","noshi-kanamer")))),w.createElement("p",{style:{color:"#666",marginBottom:20}},$("Develop: Generate dummy posts to verify layouts during development. Each post is flagged as a Test Post, so cleanup only removes the ones this tool created.","noshi-kanamer")),w.createElement("table",{className:"form-table",role:"presentation"},w.createElement("tbody",null,w.createElement("tr",null,w.createElement("th",{scope:"row"},w.createElement("label",{htmlFor:"nk-post-type"},$("Post type","noshi-kanamer"))),w.createElement("td",null,w.createElement("select",{id:"nk-post-type",className:"regular-text",disabled:!0},w.createElement("option",{value:"post"},$("post (standard)","noshi-kanamer"))))),w.createElement("tr",null,w.createElement("th",{scope:"row"},w.createElement("label",{htmlFor:"nk-count"},$("Number of posts","noshi-kanamer"))),w.createElement("td",null,w.createElement("input",{id:"nk-count",type:"number",className:"small-text",min:1,max:10,value:t,onChange:f=>r(Math.min(10,Math.max(1,Number(f.target.value))))}))))),w.createElement("div",{style:{display:"flex",alignItems:"center",gap:12,marginTop:8}},w.createElement("button",{className:"button button-primary",onClick:p,disabled:a||h},$(a?"Generating…":"Generate Test Posts","noshi-kanamer")),w.createElement("button",{className:"button button-secondary",onClick:S,disabled:a||h,style:{color:"#c00",borderColor:"#c00"}},$(h?"Deleting…":"Delete All Test Posts","noshi-kanamer")),b&&w.createElement("span",{style:{color:b.type==="success"?"#2a9d2a":"#c00"}},b.text)))}const e=window.wp.element,{useState:W,useEffect:Ee,useRef:we,createInterpolateElement:ee}=window.wp.element,{__:n,_n:Ne,sprintf:L}=window.wp.i18n,{apiUrl:st,nonce:it}=window.noshiknData??{},dt={"Content-Type":"application/json","X-WP-Nonce":it},te=(t,r={})=>fetch(st+t,{headers:dt,...r}).then(a=>a.json());function M({text:t}){return e.createElement("span",{style:{color:"#2a9d2a",fontWeight:600}},"✓ ",t)}function U({text:t}){return e.createElement("span",{style:{color:"#c00",fontWeight:600}},"⚠ ",t)}function pe({text:t}){return e.createElement("span",{style:{color:"#888",fontWeight:500}},"○ ",t)}function ct({doneCount:t,totalCount:r,isLoading:a,onPreviewReport:s}){const h=r>0?Math.round(t/r*100):0,d=r-t,b=a?"#9ca3af":"#dc2626",u=a?"#f3f4f6":"#fef2f2",y=a?"#e5e7eb":"#fecaca";return e.createElement("div",{style:{background:u,borderLeft:`4px solid ${b}`,borderRadius:4,padding:"16px 20px",marginBottom:24,boxShadow:"0 1px 3px rgba(0,0,0,0.05)"}},e.createElement("div",{style:{display:"flex",alignItems:"center",gap:16,flexWrap:"wrap"}},e.createElement("div",{style:{flex:"0 0 auto",minWidth:60,fontSize:22,fontWeight:700,color:b,lineHeight:1.2}},a?"-/-":`${t}/${r}`),e.createElement("div",{style:{flex:"1 1 200px",minWidth:200}},e.createElement("strong",{style:{display:"block",fontSize:14,color:"#1d2327",marginBottom:4}},n("Pre-Launch Progress","noshi-kanamer")),e.createElement("span",{style:{color:"#50575e",fontSize:13}},a?n("Checking…","noshi-kanamer"):L(n("%d remaining","noshi-kanamer"),d))),e.createElement("button",{className:"button",onClick:s,disabled:a},n("Generate Report","noshi-kanamer"))),e.createElement("div",{role:"progressbar","aria-valuenow":a?0:t,"aria-valuemin":0,"aria-valuemax":r,"aria-label":n("Pre-Launch Progress","noshi-kanamer"),style:{marginTop:12,height:6,background:y,borderRadius:3,overflow:"hidden"}},e.createElement("div",{style:{width:`${h}%`,height:"100%",background:b,transition:"width 0.3s ease"}})))}function mt({onPreviewReport:t}){return e.createElement("div",{style:{background:"#fff",borderLeft:"4px solid #16a34a",borderRadius:4,padding:"16px 20px",marginBottom:24,display:"flex",alignItems:"center",gap:16,flexWrap:"wrap",boxShadow:"0 1px 3px rgba(0,0,0,0.05)"}},e.createElement("div",{style:{flex:"0 0 40px",width:40,height:40,borderRadius:"50%",background:"#16a34a",color:"#fff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:22,fontWeight:700,lineHeight:1}},"✓"),e.createElement("div",{style:{flex:"1 1 200px",minWidth:200}},e.createElement("strong",{style:{display:"block",fontSize:16,color:"#15803d",marginBottom:4,lineHeight:1.4}},n("All pre-launch checks are complete!","noshi-kanamer")),e.createElement("p",{style:{margin:0,color:"#15803d",fontSize:13,lineHeight:1.5}},n('Click "Generate Report" to export a proof list of every check, handy to share with your client.',"noshi-kanamer"))),t&&e.createElement("button",{className:"button",onClick:t},n("Generate Report","noshi-kanamer")))}function ut({isLoading:t,pendingSteps:r,isReady:a}){const[s,h]=W(0),d=(r==null?void 0:r.length)??0,b=d>0?Math.min(s,d-1):0,u=d>0?r[b]:null;Ee(()=>{s>Math.max(0,d-1)&&h(Math.max(0,d-1))},[d,s]);const y={position:"fixed",bottom:24,right:24,zIndex:9e3,width:280,background:a?"#16a34a":t?"#f3f4f6":"#fff",color:a?"#fff":"#1d2327",borderRadius:8,padding:"12px 16px",boxShadow:"0 4px 16px rgba(0,0,0,0.15)",borderLeft:a?"none":`4px solid ${t?"#9ca3af":"#dc2626"}`,fontSize:13,lineHeight:1.4},E={role:"status","aria-live":"polite"};if(t)return e.createElement("div",{style:y,...E},e.createElement("div",{style:{fontSize:11,opacity:.7,marginBottom:4,textTransform:"uppercase",letterSpacing:1}},n("Next Action","noshi-kanamer")),e.createElement("div",{style:{color:"#888"}},n("Checking…","noshi-kanamer")));if(a)return e.createElement("div",{style:y,...E},e.createElement("strong",{style:{fontSize:14}},"✓ ",n("Ready to Launch","noshi-kanamer")));const p=()=>h(f=>Math.max(0,f-1)),S=()=>h(f=>Math.min(d-1,f+1));return e.createElement("div",{style:y,...E},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:4}},e.createElement("span",{style:{fontSize:11,color:"#888",textTransform:"uppercase",letterSpacing:1}},n("Next Action","noshi-kanamer")),d>1&&e.createElement("span",{style:{fontSize:11,color:"#888"}},L(n("%1$d / %2$d","noshi-kanamer"),b+1,d))),e.createElement("div",{style:{marginBottom:u.hint?6:0}},e.createElement("strong",null,"→ ",u.label)),u.hint&&e.createElement("div",{style:{color:"#50575e",fontSize:12,lineHeight:1.5}},u.hint),(u.actionUrl||d>1)&&e.createElement("div",{style:{marginTop:8,display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,flexWrap:"wrap"}},u.actionUrl?e.createElement("a",{className:"button button-small",href:u.actionUrl,target:"_blank",rel:"noreferrer"},u.actionLabel||n("Open","noshi-kanamer")):e.createElement("span",null),d>1&&e.createElement("span",{style:{display:"inline-flex",gap:6}},e.createElement("button",{type:"button",className:"button button-small",onClick:p,disabled:b===0,"aria-label":n("Previous action","noshi-kanamer"),style:{minWidth:56,padding:"0 12px",lineHeight:"24px",fontSize:13}},"‹ ",n("Prev","noshi-kanamer")),e.createElement("button",{type:"button",className:"button button-small",onClick:S,disabled:b>=d-1,"aria-label":n("Next action","noshi-kanamer"),style:{minWidth:56,padding:"0 12px",lineHeight:"24px",fontSize:13}},n("Next","noshi-kanamer")," ›"))))}function pt({children:t,label:r}){const[a,s]=W(!1);return e.createElement("span",{style:{position:"relative",display:"inline-block",marginLeft:4,verticalAlign:"middle"}},e.createElement("span",{role:"button",tabIndex:0,"aria-label":r||n("Details","noshi-kanamer"),"aria-expanded":a,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:()=>s(!1),onKeyDown:h=>{h.key==="Escape"?s(!1):(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),s(d=>!d))},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:16,height:16,borderRadius:"50%",background:"#dcdcde",color:"#50575e",fontSize:11,fontWeight:700,cursor:"help",userSelect:"none",outline:"none"}},"?"),a&&e.createElement("span",{role:"tooltip",style:{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%) translateY(-8px)",background:"#1d2327",color:"#fff",padding:"8px 10px",borderRadius:4,fontSize:12,lineHeight:1.5,whiteSpace:"normal",width:300,zIndex:100,boxShadow:"0 2px 8px rgba(0,0,0,0.25)",textAlign:"left",fontWeight:400}},t))}function ke({children:t}){return e.createElement("pre",{style:{background:"#f0f0f0",padding:"8px 12px",fontFamily:"monospace",fontSize:13,marginTop:8,marginBottom:0}},t)}function ht({check:t,setCheck:r,outdatedPlugins:a}){var Ue,Ke,Ye,Xe,Je;const[s,h]=W(null),[d,b]=W(null),[u,y]=W(!1),[E,p]=W(null),[S,f]=W(!1),[N,J]=W(!1),[B,l]=W(""),[x,_]=W(!1),[D,K]=W(!1),[q,o]=W(!1),[C,P]=W(!1),[k,I]=W(!1),O=we(!1),ce=async()=>{l("testPosts");const i=await te("test-posts/delete",{method:"POST",body:JSON.stringify({post_type:"post"})});h(i),l("")},me=async()=>{l("catalog");const i=await te("pre-launch/trash-catalog",{method:"POST",body:"{}"});b(i),l("")},V=async()=>{l("rewrites");const i=await te("pre-launch/flush-rewrites",{method:"POST",body:"{}"});y(i.flushed===!0),l("")},Lt=async()=>{l("debugLog");const i=await te("pre-launch/delete-debug-log",{method:"POST",body:"{}"});p(i),l("")},Wt=async()=>{l("recheck");const i=await te("pre-launch/check");r(i),l("")},Ae=async()=>{await te("pre-launch/mark-review-shown",{method:"POST",body:JSON.stringify({trigger:"completed"})}),r(i=>i&&{...i,review_shown_today:!0}),P(!1)},Dt=Ae,Ht=async()=>{await Ae(),window.open("https://wordpress.org/support/plugin/noshi-kanamer/reviews/#new-post","_blank")},Q=(t==null?void 0:t.hidden_blocks)??[],Me=Q.length>0?`add_filter( 'allowed_block_types_all', function( $allowed, $ctx ) { 2 2 $hidden = ['${Q.map(i=>i.replace(/'/g,"\\'")).join("', '")}']; 3 3 $registered = array_keys( WP_Block_Type_Registry::get_instance()->get_all_registered() ); 4 4 if ( true === $allowed ) $allowed = $registered; 5 5 return array_values( array_diff( (array) $allowed, $hidden ) ); 6 }, 10, 2 );`:null, Me=(i,Z)=>{navigator.clipboard&&navigator.clipboard.writeText(i).then(()=>{Z(!0),setTimeout(()=>Z(!1),2e3)}).catch(()=>{})},At=()=>Me(Oe,J),ge=(t==null?void 0:t.debug_log_exists)===!1||(E==null?void 0:E.deleted)===!0,je=()=>{const i=[s!==null?"✓ "+L(n("Test posts: %d deleted","noshi-kanamer"),s.count):(t==null?void 0:t.test_posts_count)===0?"✓ "+n("Test posts: not used (no action needed)","noshi-kanamer"):"⚠ "+n("Test posts: not yet checked","noshi-kanamer"),d!==null?"✓ "+L(Ne("Block catalog pages: %d page moved to trash","Block catalog pages: %d pages moved to trash",d.trashed,"noshi-kanamer"),d.trashed):(t==null?void 0:t.block_catalog_pages_count)===0?"✓ "+n("Block catalog pages: not used (no action needed)","noshi-kanamer"):"⚠ "+n("Block catalog pages: not yet checked","noshi-kanamer"),u===!0?"✓ "+n("Rewrite rules: flushed","noshi-kanamer"):"⚠ "+n("Rewrite rules: not yet flushed","noshi-kanamer"),(t==null?void 0:t.search_index)===!0?"✓ "+n("Search engine indexing: enabled","noshi-kanamer"):"⚠ "+n("Search engine indexing: disabled or not yet checked","noshi-kanamer"),(t==null?void 0:t.wp_debug)===!1?"✓ "+n("WP_DEBUG: disabled","noshi-kanamer"):"⚠ "+n("WP_DEBUG: enabled or not yet checked","noshi-kanamer"),(t==null?void 0:t.disallow_file_edit)===!0?"✓ "+n("File editor: disabled","noshi-kanamer"):"⚠ "+n("File editor: enabled or not yet checked","noshi-kanamer"),(t==null?void 0:t.xmlrpc_enabled)===!1?"✓ "+n("XML-RPC: disabled","noshi-kanamer"):"⚠ "+n("XML-RPC: enabled or not yet checked","noshi-kanamer"),ge?"✓ "+n("debug.log: cleaned up","noshi-kanamer"):"⚠ "+n("debug.log: not yet checked","noshi-kanamer"),(t==null?void 0:t.admin_username_exists)===!1?"✓ "+n("Admin username: no 'admin' user","noshi-kanamer"):"⚠ "+n("Admin username: 'admin' user exists or not yet checked","noshi-kanamer")],Z=i.filter(A=>A.startsWith("✓")).length,fe=(a==null?void 0:a.filter(A=>A.status==="critical"||A.status==="warning").length)??0,re=(a==null?void 0:a.filter(A=>A.status==="critical").length)??0,ue=(a==null?void 0:a.filter(A=>!A.active&&A.status==="critical").length)??0;return[n("Noshi-Kanamer Pre-Launch Report","noshi-kanamer"),L(n("Site: %s","noshi-kanamer"),window.location.hostname),L(n("Generated: %s","noshi-kanamer"),new Date().toLocaleString()),"",...i,"",L(n("Admin email: %s","noshi-kanamer"),(t==null?void 0:t.admin_email)??"-"),L(n("Hidden blocks configured: %d","noshi-kanamer"),Q.length),a===null?n("Outdated plugins: not yet scanned (see Site Check tab)","noshi-kanamer"):L(n("Outdated plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)","noshi-kanamer"),fe,re),...a!==null&&ue>0?[L(n("Inactive & outdated: %d plugin(s), consider removing","noshi-kanamer"),ue)]:[],"",Z===i.length?n("Status: Ready to launch","noshi-kanamer"):L(n("Status: %1$d of %2$d items completed","noshi-kanamer"),Z,i.length),"","---",n("Generated by Noshi-Kanamer: https://wordpress.org/plugins/noshi-kanamer/","noshi-kanamer")].join(`7 `)}, Ot=()=>Me(je(),K),Mt=async()=>{const i=await te("pre-launch/track-pro-interest",{method:"POST",body:"{}"});i!=null&&i.ok&&o(!0)},ae=((t==null?void 0:t.test_posts_count)===0||s!==null)&&((t==null?void 0:t.block_catalog_pages_count)===0||d!==null)&&u===!0&&(t==null?void 0:t.search_index)===!0&&(t==null?void 0:t.code_noindex)===!1&&t!==null&&(t==null?void 0:t.wp_debug)===!1&&(t==null?void 0:t.disallow_file_edit)===!0&&(t==null?void 0:t.xmlrpc_enabled)===!1&&ge&&(t==null?void 0:t.admin_username_exists)===!1&&(Q.length===0||S),xe=[{done:(t==null?void 0:t.search_index)===!0&&(t==null?void 0:t.code_noindex)===!1,label:n("Enable search indexing","noshi-kanamer"),hint:(t==null?void 0:t.search_index)===!1?n('Open Settings > Reading and uncheck "Discourage search engines from indexing this site".',"noshi-kanamer"):(t==null?void 0:t.code_noindex)===!0?(t==null?void 0:t.code_noindex_source)==="wp_robots"?n("Code-level noindex detected via wp_robots filter. Check your theme functions.php or SEO plugin settings.","noshi-kanamer"):n(`Direct <meta name="robots" content="noindex"> output detected in HTML. Check your theme's wp_head hook.`,"noshi-kanamer"):n('Open Settings > Reading and uncheck "Discourage search engines from indexing this site".',"noshi-kanamer"),actionUrl:(Ue=t==null?void 0:t.admin_url)==null?void 0:Ue.reading,actionLabel:n("Open Reading Settings","noshi-kanamer")},{done:(t==null?void 0:t.wp_debug)===!1,label:n("Disable WP_DEBUG","noshi-kanamer"),hint:n("Edit wp-config.php manually: define( 'WP_DEBUG', false );","noshi-kanamer")},{done:(t==null?void 0:t.disallow_file_edit)===!0,label:n("Disable file editor","noshi-kanamer"),hint:n("Edit wp-config.php manually: define( 'DISALLOW_FILE_EDIT', true );","noshi-kanamer")},{done:(t==null?void 0:t.xmlrpc_enabled)===!1,label:n("Disable XML-RPC","noshi-kanamer"),hint:n("Add to your theme's functions.php: add_filter( 'xmlrpc_enabled', '__return_false' );","noshi-kanamer")},{done:(t==null?void 0:t.admin_username_exists)===!1,label:n("Rename admin user","noshi-kanamer"),hint:n("Create a new administrator account, then delete the 'admin' user and reassign its content.","noshi-kanamer"),actionUrl:(Ke=t==null?void 0:t.admin_url)==null?void 0:Ke.users,actionLabel:n("Open Users","noshi-kanamer")},{done:(t==null?void 0:t.test_posts_count)===0||s!==null,label:n("Delete test posts","noshi-kanamer"),hint:n('Click the Run button on the "Delete all test posts" row in the Actions section.',"noshi-kanamer")},{done:(t==null?void 0:t.block_catalog_pages_count)===0||d!==null,label:n("Remove catalog pages","noshi-kanamer"),hint:n('Click the Run button on the "Move block catalog pages to trash" row in the Actions section.',"noshi-kanamer")},{done:u===!0,label:n("Flush rewrite rules","noshi-kanamer"),hint:n('Click the Run button on the "Flush rewrite rules (permalinks)" row in the Actions section.',"noshi-kanamer")},{done:ge,label:n("Delete debug.log","noshi-kanamer"),hint:n('Click the Run button on the "Delete debug.log file" row in the Actions section.',"noshi-kanamer")},{done:Q.length===0||S,label:n("Generate block code","noshi-kanamer"),hint:n('Click "Generate Code" in the Code Generator section and paste the snippet into your theme functions.php.',"noshi-kanamer")}],jt=xe.length,Gt=t===null?0:xe.filter(i=>i.done).length,Ft=t===null?[]:xe.filter(i=>!i.done),Ge=we(null),Fe=()=>{_(!0),setTimeout(()=>{var i;(i=Ge.current)==null||i.scrollIntoView({behavior:"smooth",block:"start"})},0)},ve=we(null);Ee(()=>{var Z,fe;const i=(Z=ve.current)==null?void 0:Z.parentElement;return(fe=i==null?void 0:i.classList)!=null&&fe.contains("noshikn-prelaunch-panel")&&i.classList.toggle("is-ready",ae),()=>{var ue,A;const re=(ue=ve.current)==null?void 0:ue.parentElement;(A=re==null?void 0:re.classList)!=null&&A.contains("noshikn-prelaunch-panel")&&re.classList.remove("is-ready")}},[ae]),Ee(()=>{ae&&!M.current&&P((t==null?void 0:t.review_shown_today)===!1?"with-review":"without-review"),M.current=ae},[ae,t]);const j={width:180,padding:"10px 12px",verticalAlign:"middle"},G={padding:"10px 12px",verticalAlign:"top"},F={padding:"10px 12px",verticalAlign:"top"};return e.createElement("div",{ref:ve},C&&e.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},e.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)"}},e.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},"✅"),e.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},ee(n("All checks complete!<br/>Your site is ready to hand off 👍","noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("p",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7}},ee(n(C==="with-review"?`All checks have passed. Click "Generate Report" to get a shareable checklist of everything verified. 🙌<br/><br/>Thanks for using Noshi-Kanamer, how did it go? We'd love to hear your thoughts in a review. ✉️`:'All checks have passed. Click "Generate Report" to get a shareable checklist of everything verified. 🙌<br/><br/>See you again soon!',"noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},e.createElement("button",{className:"button",onClick:Dt},n("Close","noshi-kanamer")),C==="with-review"&&e.createElement("button",{className:"button button-primary",onClick:Ht},n("Leave a review →","noshi-kanamer"))))),k&&!C&&e.createElement(le,{icon:"🧭",title:n("How Pre-Launch works","noshi-kanamer"),onClose:()=>I(!1),pages:[e.createElement("p",{key:"checks"},ee(n("Let's run the final checks before handoff!<br/>The Checks section automatically inspects items you must not forget before delivery and shows the results.<br/>Complete any required fixes.","noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("p",{key:"actions"},ee(n("The Actions section gathers run buttons that resolve work created in the other development tabs.<br/>Do not forget to run them.","noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("p",{key:"codegen"},ee(n("Code Generator outputs code to make your Hide Blocks settings permanent.<br/>Even if you remove this plugin, you can keep clients away from unnecessary blocks.","noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("p",{key:"report"},ee(n("Finally, the Report section outputs the current pre-launch check status as text.<br/>Sharing this text at handoff can help build stronger trust.<br/><br/>Good luck!","noshi-kanamer"),{br:e.createElement("br",null)}))]}),e.createElement("h2",{style:{marginTop:0}},n("Pre-Launch: Get your site ready before handing off to the client!","noshi-kanamer"),e.createElement("button",{type:"button",className:"button",onClick:()=>I(!0),onMouseEnter:i=>{i.currentTarget.style.background="#eef2ff",i.currentTarget.style.borderColor="#a5b4fc",i.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",i.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:i=>{i.currentTarget.style.background="#f5f7ff",i.currentTarget.style.borderColor="#c7d2fe",i.currentTarget.style.boxShadow="none",i.currentTarget.style.transform="translateY(0)"},"aria-label":n("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},e.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),e.createElement("span",null,n("Guide","noshi-kanamer")))),e.createElement("p",{style:{color:"#666",marginBottom:24}},n("Deliver: Auto-detect 6 launch-blocking settings and clean up test data, then generate a proof report for client handoff.","noshi-kanamer")),ae?e.createElement(mt,{onPreviewReport:Fe}):e.createElement(ct,{doneCount:Gt,totalCount:jt,isLoading:t===null,onPreviewReport:Fe}),e.createElement("h2",{style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},n("Checks","noshi-kanamer")),e.createElement("table",{className:"widefat",style:{marginBottom:28}},e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:Wt,disabled:B==="recheck"},n(B==="recheck"?"Checking…":"Re-check","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Search engine indexing","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):e.createElement("div",null,e.createElement("div",{style:{marginBottom:6}},e.createElement("span",{style:{color:"#666",fontSize:12,marginRight:8}},n("Settings:","noshi-kanamer")),t.search_index?e.createElement(O,{text:n("OK","noshi-kanamer")}):e.createElement("span",null,e.createElement(U,{text:n("Disabled.","noshi-kanamer")})," ",e.createElement("a",{className:"button button-small",href:(Ye=t.admin_url)==null?void 0:Ye.reading,target:"_blank",rel:"noreferrer"},n("Open Reading Settings","noshi-kanamer")))),e.createElement("div",null,e.createElement("span",{style:{color:"#666",fontSize:12,marginRight:8}},n("Code-level:","noshi-kanamer")),t.code_noindex===!0?e.createElement("span",null,e.createElement(U,{text:t.code_noindex_source==="wp_robots"?n("noindex detected (wp_robots filter)","noshi-kanamer"):n("noindex detected (<meta> in HTML)","noshi-kanamer")}),e.createElement("div",{style:{color:"#888",fontSize:12,marginTop:4}},t.code_noindex_source==="wp_robots"?n("Check your theme functions.php or SEO plugin (Yoast / RankMath etc.) for noindex directives.","noshi-kanamer"):n(`Check your theme's wp_head hook for a <meta name="robots" content="noindex"> output.`,"noshi-kanamer"))):t.code_noindex_source==="unverified"?e.createElement("div",null,e.createElement(O,{text:n("OK","noshi-kanamer")}),e.createElement("div",{style:{color:"#888",fontSize:11,marginTop:4,lineHeight:1.5}},"(",n("HTML rendering not verified (some detection methods were skipped)","noshi-kanamer"),")",e.createElement(pt,{label:n("About this check","noshi-kanamer")},n('WordPress tries to fetch its own homepage and scan it for <meta name="robots" content="noindex"> written directly in HTML. This loopback request can fail on local development environments or some shared hosts. Code-level detection via the wp_robots filter still runs as the primary check, so launch readiness is not affected.',"noshi-kanamer")))):e.createElement(O,{text:n("OK","noshi-kanamer")}))))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("Admin email address","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):e.createElement(e.Fragment,null,e.createElement("code",null,t.admin_email),e.createElement("div",{style:{marginTop:6}},e.createElement("a",{className:"button button-small",href:(Xe=t.admin_url)==null?void 0:Xe.general,target:"_blank",rel:"noreferrer"},n("Open General Settings","noshi-kanamer")))))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("WP_DEBUG","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):t.wp_debug===!1?e.createElement(O,{text:n("OK (disabled)","noshi-kanamer")}):e.createElement("div",null,e.createElement(U,{text:n("Enabled: edit wp-config.php manually:","noshi-kanamer")}),e.createElement(ke,null,"define( 'WP_DEBUG', false );")))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("File editor (DISALLOW_FILE_EDIT)","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):t.disallow_file_edit===!0?e.createElement(O,{text:n("OK (disabled)","noshi-kanamer")}):e.createElement("div",null,e.createElement(U,{text:n("Enabled: edit wp-config.php manually:","noshi-kanamer")}),e.createElement(ke,null,"define( 'DISALLOW_FILE_EDIT', true );")))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("XML-RPC","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):t.xmlrpc_enabled===!1?e.createElement(O,{text:n("OK (disabled)","noshi-kanamer")}):e.createElement("div",null,e.createElement(U,{text:n("Enabled: add to functions.php:","noshi-kanamer")}),e.createElement(ke,null,"add_filter( 'xmlrpc_enabled', '__return_false' );")))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("Admin username","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):t.admin_username_exists===!1?e.createElement(O,{text:n("OK (no 'admin' user)","noshi-kanamer")}):e.createElement(e.Fragment,null,e.createElement(U,{text:n("Default 'admin' username exists. WordPress can't rename a username, create a new administrator account, then delete 'admin' and reassign its content to the new account.","noshi-kanamer")}),e.createElement("div",{style:{marginTop:6}},e.createElement("a",{className:"button button-small",href:(Je=t.admin_url)==null?void 0:Je.users,target:"_blank",rel:"noreferrer"},n("Open Users","noshi-kanamer")))))))),e.createElement("h2",{style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},n("Actions","noshi-kanamer")),e.createElement("table",{className:"widefat",style:{marginBottom:28}},e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:ce,disabled:B==="testPosts"||s!==null||(t==null?void 0:t.test_posts_count)===0},n(B==="testPosts"?"Running…":"Run","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Delete all test posts","noshi-kanamer"))),e.createElement("td",{style:F},(t==null?void 0:t.test_posts_count)===0?e.createElement(e.Fragment,null,e.createElement(pe,{text:n("Not used (no action needed)","noshi-kanamer")}),e.createElement("div",{style:{color:"#888",fontSize:12,marginTop:4}},n("Generates flagged test posts during development, see the Test Posts tab.","noshi-kanamer"))):s!==null?e.createElement(O,{text:L(n("Done (%d deleted)","noshi-kanamer"),s.count)}):(t==null?void 0:t.test_posts_count)>0?e.createElement(U,{text:L(n("%d test post(s) detected.","noshi-kanamer"),t.test_posts_count)}):null)),e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:me,disabled:B==="catalog"||d!==null||(t==null?void 0:t.block_catalog_pages_count)===0},n(B==="catalog"?"Running…":"Run","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Move block catalog pages to trash","noshi-kanamer"))),e.createElement("td",{style:F},(t==null?void 0:t.block_catalog_pages_count)===0?e.createElement(e.Fragment,null,e.createElement(pe,{text:n("Not used (no action needed)","noshi-kanamer")}),e.createElement("div",{style:{color:"#888",fontSize:12,marginTop:4}},n("Adds preview pages of every registered block, see the Block Showcase block.","noshi-kanamer"))):d!==null?e.createElement(O,{text:L(Ne("Done (%d page moved)","Done (%d pages moved)",d.trashed,"noshi-kanamer"),d.trashed)}):(t==null?void 0:t.block_catalog_pages_count)>0?e.createElement(U,{text:L(n("%d block catalog page(s) detected.","noshi-kanamer"),t.block_catalog_pages_count)}):null)),e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:V,disabled:B==="rewrites"||u===!0},n(B==="rewrites"?"Running…":"Run","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Flush rewrite rules (permalinks)","noshi-kanamer"))),e.createElement("td",{style:F},u&&e.createElement(O,{text:n("Done","noshi-kanamer")}))),e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:Lt,disabled:B==="debugLog"||ge||E!==null&&!E.existed},n(B==="debugLog"?"Running…":"Run","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Delete debug.log file","noshi-kanamer"))),e.createElement("td",{style:F},E!==null?E.existed?E.deleted?e.createElement(O,{text:n("Done (deleted)","noshi-kanamer")}):e.createElement(U,{text:n("Failed to delete: check file permissions.","noshi-kanamer")}):e.createElement(pe,{text:n("Not present (no action needed)","noshi-kanamer")}):(t==null?void 0:t.debug_log_exists)===!1?e.createElement(pe,{text:n("Not present (no action needed)","noshi-kanamer")}):null)))),e.createElement("h2",{style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},n("Code Generator","noshi-kanamer")),e.createElement("table",{className:"widefat",style:{marginBottom:S?0:32}},e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",{style:j},!S&&Q.length>0&&e.createElement("button",{className:"button",onClick:()=>f(!0)},n("Generate Code","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Persist block visibility settings","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Loading…","noshi-kanamer")):Q.length===0?e.createElement("span",{style:{color:"#888"}},n("No hidden blocks configured (no action needed).","noshi-kanamer")):e.createElement("span",{style:{color:"#888"}},L(n("%d block(s) configured.","noshi-kanamer"),Q.length)))))),S&&e.createElement("div",{style:{background:"#fff",border:"1px solid #ddd",borderTop:"none",padding:"12px 14px",marginBottom:32}},e.createElement("pre",{style:{background:"#f0f0f0",padding:"10px 14px",fontFamily:"monospace",fontSize:12,whiteSpace:"pre-wrap",marginBottom:8}},Oe),e.createElement("button",{className:"button button-primary",onClick:At},n(N?"Copied!":"Copy to Clipboard","noshi-kanamer")),e.createElement("p",{className:"description",style:{marginTop:8}},ee(n("Paste this into your theme's <code>functions.php</code> to keep the block settings permanently.","noshi-kanamer"),{code:e.createElement("code",null)}))),e.createElement("h2",{ref:Ge,style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},n("Report","noshi-kanamer")),e.createElement("div",{style:{marginBottom:32}},!x&&e.createElement("button",{className:"button",onClick:()=>_(!0)},n("Generate Report","noshi-kanamer")),x&&e.createElement("div",{style:{background:"#fff",border:"1px solid #ddd",padding:"12px 14px"}},e.createElement("textarea",{readOnly:!0,value:je(),rows:12,style:{width:"100%",fontFamily:"monospace",fontSize:12,marginBottom:8,boxSizing:"border-box"}}),e.createElement("button",{className:"button button-primary",onClick:Ot},n(D?"Copied!":"Copy to Clipboard","noshi-kanamer")),e.createElement("div",{style:{marginTop:16,paddingTop:12,borderTop:"1px solid #eee"}},q?e.createElement("p",{style:{color:"#888",margin:0}},n("Thanks! This helps us prioritize the Pro version.","noshi-kanamer")):e.createElement("button",{className:"button",onClick:Mt},n("✨ Want a branded, verifiable report for your clients? (Pro: coming soon)","noshi-kanamer"))))),e.createElement(ut,{isLoading:t===null,pendingSteps:Ft,isReady:ae}))}const g=window.wp.element,{useState:Y,useEffect:gt,useCallback:ft,createInterpolateElement:bt}=window.wp.element,{__:z,_n:Ie,sprintf:de}=window.wp.i18n,{apiUrl:yt,nonce:Pe}=window.noshiknData;async function $e(t,r={}){const a=await fetch(yt+t,{headers:{"X-WP-Nonce":Pe,"Content-Type":"application/json",...r.headers},...r});if(!a.ok)throw new Error(await a.text());return a.json()}function Et(){var q;const[t,r]=Y([]),[a,s]=Y(!1),[h,d]=Y(new Set),[b,u]=Y(!1),[y,E]=Y(!1),[p,S]=Y(null),[f,N]=Y(null),[J,B]=Y(!1),l=ft(async()=>{s(!0),N(null),S(null);try{const{ids:o}=await $e("media/unused");if(!o.length){r([]);return}const C=100,P=[];for(let I=0;I<o.length;I+=C)P.push(o.slice(I,I+C));const k=[];for(const I of P){const M=await fetch(`${window.location.origin}/wp-json/wp/v2/media?include=${I.join(",")}&per_page=${C}&_fields=id,title,source_url,media_details`,{headers:{"X-WP-Nonce":Pe}});M.ok&&k.push(...await M.json())}r(k)}catch(o){N(o.message)}finally{s(!1)}},[]);gt(()=>{l()},[l]);function x(o){d(o?new Set(t.map(C=>C.id)):new Set)}function _(o){d(C=>{const P=new Set(C);return P.has(o)?P.delete(o):P.add(o),P})}async function D(){E(!0),N(null);try{const o=await $e("media/delete-unused",{method:"POST",body:JSON.stringify({ids:Array.from(h)})});S(o),d(new Set),await l()}catch(o){N(o.message)}finally{E(!1),u(!1)}}const K=o=>{var C,P,k;return((k=(P=(C=o.media_details)==null?void 0:C.sizes)==null?void 0:P.thumbnail)==null?void 0:k.source_url)||o.source_url};return g.createElement("div",null,J&&g.createElement(le,{icon:"🖼️",title:z("How Media Manager works","noshi-kanamer"),onClose:()=>B(!1)},g.createElement("p",null,bt(z("Automatically scan your media library for images that aren't referenced in post content, featured images, or common custom-field formats (like ACF image/gallery fields).<br/>Turn on the checkbox for images you don't need, then click Delete selected to remove them.<br/><br/>Use this during development whenever you notice unused images piling up.","noshi-kanamer"),{br:g.createElement("br",null)}))),g.createElement("h2",{style:{marginTop:0}},z("Media Manager: Find unused images","noshi-kanamer"),g.createElement("button",{type:"button",className:"button",onClick:()=>B(!0),onMouseEnter:o=>{o.currentTarget.style.background="#eef2ff",o.currentTarget.style.borderColor="#a5b4fc",o.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",o.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:o=>{o.currentTarget.style.background="#f5f7ff",o.currentTarget.style.borderColor="#c7d2fe",o.currentTarget.style.boxShadow="none",o.currentTarget.style.transform="translateY(0)"},"aria-label":z("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},g.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),g.createElement("span",null,z("Guide","noshi-kanamer")))),g.createElement("p",{style:{color:"#666",marginBottom:16}},z("Develop: Find images not referenced in your content or meta fields. Delete dummy images before handoff to keep the media library clean.","noshi-kanamer")),f&&g.createElement("div",{className:"notice notice-error",style:{padding:"8px 12px",marginBottom:16}},g.createElement("p",{style:{margin:0}},f)),p&&g.createElement("div",{className:"notice notice-success",style:{padding:"8px 12px",marginBottom:16}},g.createElement("p",{style:{margin:0}},de(Ie("Deleted %d image.","Deleted %d images.",p.count,"noshi-kanamer"),p.count),(q=p.failed)!=null&&q.length?" "+de(z("Failed: %s","noshi-kanamer"),p.failed.join(", ")):"")),g.createElement("div",{style:{marginBottom:12,display:"flex",gap:8,alignItems:"center"}},g.createElement("button",{className:"button",onClick:l,disabled:a},z(a?"Loading…":"Reload","noshi-kanamer")),t.length>0&&g.createElement(g.Fragment,null,g.createElement("label",{style:{display:"flex",alignItems:"center",gap:4}},g.createElement("input",{type:"checkbox",checked:h.size===t.length,onChange:o=>x(o.target.checked)}),de(z("Select all (%d)","noshi-kanamer"),t.length)),g.createElement("button",{className:"button button-primary",disabled:h.size===0||y,onClick:()=>u(!0)},de(z("Delete selected (%d)","noshi-kanamer"),h.size)))),!a&&t.length===0&&!f&&g.createElement("p",{style:{color:"#666"}},z("No unused images found.","noshi-kanamer")),t.length>0&&g.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(160px, 1fr))",gap:12}},t.map(o=>{var C,P;return g.createElement("label",{key:o.id,style:{border:`2px solid ${h.has(o.id)?"#2271b1":"#ddd"}`,borderRadius:4,padding:8,cursor:"pointer",background:h.has(o.id)?"#f0f6fc":"#fff"}},g.createElement("input",{type:"checkbox",checked:h.has(o.id),onChange:()=>_(o.id),style:{marginBottom:6}}),g.createElement("img",{src:K(o),alt:((C=o.title)==null?void 0:C.rendered)||"",style:{width:"100%",aspectRatio:"1",objectFit:"cover",display:"block",borderRadius:2}}),g.createElement("div",{style:{fontSize:11,color:"#444",marginTop:4,wordBreak:"break-all"}},((P=o.title)==null?void 0:P.rendered)||`ID: ${o.id}`))})),b&&g.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999}},g.createElement("div",{style:{background:"#fff",borderRadius:6,padding:24,maxWidth:400,width:"90%"}},g.createElement("h3",{style:{marginTop:0}},z("Confirm Delete","noshi-kanamer")),g.createElement("p",null,de(Ie("Permanently delete %d image?","Permanently delete %d images?",h.size,"noshi-kanamer"),h.size),g.createElement("br",null),g.createElement("span",{style:{color:"#d63638"}},z("This cannot be undone.","noshi-kanamer"))),g.createElement("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"}},g.createElement("button",{className:"button",onClick:()=>u(!1),disabled:y},z("Cancel","noshi-kanamer")),g.createElement("button",{className:"button button-primary",onClick:D,disabled:y},z(y?"Deleting…":"Delete","noshi-kanamer"))))))}const c=window.wp.element,{useMemo:wt,useState:kt,createInterpolateElement:xt}=window.wp.element,{__:T,sprintf:ze}=window.wp.i18n;function vt({text:t}){return c.createElement("span",{style:{color:"#2a9d2a",fontWeight:600}},"✓ ",t)}function St({status:t}){const{__:r}=window.wp.i18n;switch(t){case"ok":return c.createElement("span",{style:{color:"#2a9d2a",fontWeight:600}},"✓ ",r("Up to date","noshi-kanamer"));case"warning":return c.createElement("span",{style:{color:"#b26a00",fontWeight:600}},"⚠ ",r("Not updated in 6+ months","noshi-kanamer"));case"critical":return c.createElement("span",{style:{color:"#c00",fontWeight:600}},"⚠ ",r("Not updated in 1+ year","noshi-kanamer"));default:return c.createElement("span",{style:{color:"#888",fontWeight:600}},"? ",r("Not on WordPress.org","noshi-kanamer"))}}const Be={critical:0,warning:1,ok:2,unknown:3};function _t({outdatedPlugins:t,scanProgress:r,scanLoading:a,onScan:s}){const[h,d]=kt(!1),b={width:180,padding:"10px 12px",verticalAlign:"middle"},u={padding:"10px 12px",verticalAlign:"top"},y={padding:"10px 12px",verticalAlign:"top"},E=wt(()=>t?[...t].sort((p,S)=>(Be[p.status]??9)-(Be[S.status]??9)):null,[t]);return c.createElement("div",null,h&&c.createElement(le,{icon:"🛡️",title:T("How Site Check works","noshi-kanamer"),onClose:()=>d(!1)},c.createElement("p",null,xt(T("Click Run to scan every installed plugin, active or not, against WordPress.org and flag anything that hasn't been updated in 6+ months or 1+ year.<br/>Run it any time you take over an existing site.<br/><br/>Once scanned, the results are automatically included in your Pre-Launch Report, no need to re-check.","noshi-kanamer"),{br:c.createElement("br",null)}))),c.createElement("h2",{style:{marginTop:0}},T("Site Check: Find plugins that haven't been updated recently","noshi-kanamer"),c.createElement("button",{type:"button",className:"button",onClick:()=>d(!0),onMouseEnter:p=>{p.currentTarget.style.background="#eef2ff",p.currentTarget.style.borderColor="#a5b4fc",p.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",p.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:p=>{p.currentTarget.style.background="#f5f7ff",p.currentTarget.style.borderColor="#c7d2fe",p.currentTarget.style.boxShadow="none",p.currentTarget.style.transform="translateY(0)"},"aria-label":T("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},c.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),c.createElement("span",null,T("Guide","noshi-kanamer")))),c.createElement("p",{style:{color:"#666",marginBottom:24}},T("Take over: Syncing up with a client's environment? Scan installed plugins for outdated versions and get a list of what needs updating. Handy for maintenance quotes.","noshi-kanamer")),c.createElement("table",{className:"widefat",style:{marginBottom:28}},c.createElement("tbody",null,c.createElement("tr",null,c.createElement("td",{style:b},c.createElement("button",{className:"button",onClick:s,disabled:a},T(a?"Scanning…":"Run","noshi-kanamer"))),c.createElement("td",{style:u},c.createElement("strong",null,T("Scan installed plugins for outdated versions","noshi-kanamer"))),c.createElement("td",{style:y},r!==null&&c.createElement("span",{style:{color:"#888"}},ze(T("Scanning %1$d / %2$d plugins…","noshi-kanamer"),r.current,r.total)),t!==null&&r===null&&c.createElement(vt,{text:ze(T("Done (%d plugin(s) scanned)","noshi-kanamer"),t.length)}))))),E!==null&&c.createElement(c.Fragment,null,c.createElement("h2",{style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},T("Installed Plugins","noshi-kanamer")),c.createElement("table",{className:"widefat",style:{marginBottom:28}},c.createElement("thead",null,c.createElement("tr",null,c.createElement("th",null,T("Plugin","noshi-kanamer")),c.createElement("th",null,T("Status","noshi-kanamer")),c.createElement("th",null,T("Last Updated","noshi-kanamer")),c.createElement("th",null,T("WP.org Update Status","noshi-kanamer")))),c.createElement("tbody",null,E.map((p,S)=>c.createElement("tr",{key:S},c.createElement("td",{style:u},c.createElement("strong",null,p.name)),c.createElement("td",{style:y},p.active?c.createElement("span",{style:{color:"#2a9d2a"}},T("Active","noshi-kanamer")):c.createElement("span",{style:{color:"#888"}},T("Inactive","noshi-kanamer"))),c.createElement("td",{style:y},p.last_updated?p.last_updated.slice(0,10):"-"),c.createElement("td",{style:y},c.createElement(St,{status:p.status}),!p.active&&p.status==="critical"&&c.createElement("div",{style:{marginTop:4,color:"#888",fontSize:12}},T("Inactive and not updated in 1+ year, consider removing it.","noshi-kanamer")))))))))}const m=window.wp.element,{useState:X,useEffect:Le,useRef:We,createInterpolateElement:he}=window.wp.element,{__:R}=window.wp.i18n,{apiUrl:Ct,nonce:Tt,prelaunchIntroShown:De,prelaunchTabIntroShown:Rt}=window.noshiknData??{},Nt={"Content-Type":"application/json","X-WP-Nonce":Tt},ne=(t,r={})=>fetch(Ct+t,{headers:Nt,...r}).then(a=>a.json()),It=[{id:"block-filter",label:()=>R("Hide Blocks","noshi-kanamer")},{id:"test-posts",label:()=>R("Test Posts","noshi-kanamer")},{id:"media-manager",label:()=>R("Media Manager","noshi-kanamer")},{id:"site-check",label:()=>R("Site Check","noshi-kanamer")},{id:"pre-launch",label:()=>R("Pre-Launch","noshi-kanamer")}],Pt={"block-filter":"dashicons-hidden","test-posts":"dashicons-edit","media-manager":"dashicons-format-image","site-check":"dashicons-shield","pre-launch":"dashicons-clipboard"};function $t(){const t=new URLSearchParams(window.location.search).get("tab")||"block-filter",[r,a]=X(t),[s,h]=X(null),[d,b]=X(!1),[u,y]=X(t==="pre-launch"?!1:!De),[E,p]=X(!Rt),[S,f]=X(null),[N,J]=X(null),[B,l]=X(!1),x=We(!0),_=We(0);Le(()=>{const k=++_.current,I=M=>{_.current===k&&h(M)};if(x.current){x.current=!1,ne("pre-launch/check").then(I);return}r==="pre-launch"&&ne("pre-launch/check").then(I)},[r]);const D=async()=>{l(!0);const k=10;let I=0,M=0,ce=[],me=!1;try{for(;!me;){const V=await ne(`pre-launch/outdated-plugins?offset=${I}&limit=${k}`);if(!V||!Array.isArray(V.results))break;M=V.total,ce=I===0?V.results:[...ce,...V.results],me=V.done,me||J({current:Math.min(I+k,M),total:M}),I+=k}f(ce)}finally{J(null),l(!1)}};Le(()=>{De&&d===!1&&(s==null?void 0:s.review_shown_today)===!1&&s!=null&&s.should_show_review_secondary&&b("engaged")},[s]);const K=async()=>{await ne("pre-launch/mark-review-shown",{method:"POST",body:JSON.stringify({trigger:"engaged"})}),h(k=>k&&{...k,review_shown_today:!0}),b(!1)},q=async()=>{await K(),window.open("https://wordpress.org/support/plugin/noshi-kanamer/reviews/#new-post","_blank")},o=async()=>{await ne("prelaunch-intro/dismiss",{method:"POST"}),y(!1)},C=async()=>{await ne("prelaunch-intro/dismiss",{method:"POST"}),y(!1),a("pre-launch")},P=async()=>{await ne("prelaunch-tab-intro/dismiss",{method:"POST"}),p(!1)};return m.createElement("div",{style:{maxWidth:960,margin:"2rem auto"}},d&&m.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)"}},m.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},"🙂"),m.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},R("Enjoying Noshi-Kanamer?","noshi-kanamer")),m.createElement("p",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7}},he(R("We hope Noshi-Kanamer has been a helpful part of your workflow.<br/>If you have a moment, we'd really appreciate your feedback in a WordPress.org review. It helps us a lot. 😊","noshi-kanamer"),{br:m.createElement("br",null)})),m.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},m.createElement("button",{className:"button button-primary",onClick:q},R("Leave a review →","noshi-kanamer")),m.createElement("button",{className:"button",onClick:K},R("Maybe later","noshi-kanamer"))))),u&&!d&&m.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)"}},m.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},"🚀"),m.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},R("Welcome to Noshi-Kanamer!","noshi-kanamer")),m.createElement("p",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7}},he(R("Lots of tools to explore, but we recommend starting with the Pre-Launch check.<br/>Just open it to see exactly what you need to wrap up before delivery.","noshi-kanamer"),{br:m.createElement("br",null)})),m.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},m.createElement("button",{className:"button button-primary",onClick:C},R("Open Pre-Launch check","noshi-kanamer")),m.createElement("button",{className:"button",onClick:o},R("I'm good!","noshi-kanamer"))))),E&&r==="pre-launch"&&!d&&m.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)"}},m.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},"🔍"),m.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},R("Let's do one final check before handoff!","noshi-kanamer")),m.createElement("p",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7}},he(R("The progress card shows exactly where you stand right now.<br/>Once it's full, your pre-launch check is complete!<br/>Not sure what to do next? Check the Next Action card in the bottom right.<br/>Ready? Let's get started!","noshi-kanamer"),{br:m.createElement("br",null)})),m.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},m.createElement("button",{className:"button button-primary",onClick:P},R("Got it, let's check!","noshi-kanamer"))))),m.createElement("h1",{style:{marginBottom:4}},"Noshi-Kanamer"),m.createElement("p",{style:{color:"#888",marginTop:0,marginBottom:16}},R("Developer toolkit for WordPress","noshi-kanamer")),m.createElement("div",{className:"nav-tab-wrapper",style:{marginBottom:24}},It.map(k=>m.createElement("a",{key:k.id,className:`nav-tab${r===k.id?" nav-tab-active":""}${k.id==="pre-launch"?" noshikn-tab-prelaunch":""}`,href:"#",onClick:I=>{I.preventDefault(),a(k.id)}},m.createElement("span",{className:`dashicons ${Pt[k.id]} noshikn-tab-icon`}),k.label(),k.id==="pre-launch"&&m.createElement("span",{className:"noshikn-prelaunch-badge"},R("Check first","noshi-kanamer"))))),r==="block-filter"&&m.createElement(at,null),r==="test-posts"&&m.createElement(lt,null),r==="media-manager"&&m.createElement(Et,null),r==="site-check"&&m.createElement(_t,{outdatedPlugins:S,scanProgress:N,scanLoading:B,onScan:D}),r==="pre-launch"&&m.createElement("div",{className:"noshikn-prelaunch-panel"},m.createElement(ht,{check:s,setCheck:h,outdatedPlugins:S})),m.createElement("p",{style:{marginTop:32,paddingTop:16,borderTop:"1px solid #dcdcde",color:"#888",fontSize:12}},he(R("Enjoying Noshi-Kanamer? <a>Leave a review on WordPress.org</a>, it helps other developers find it.","noshi-kanamer"),{a:m.createElement("a",{href:"https://wordpress.org/support/plugin/noshi-kanamer/reviews/#new-post",target:"_blank",rel:"noopener noreferrer"})})))}const zt=window.wp.element,{createRoot:Bt}=window.wp.element,He=document.getElementById("noshikn-admin-root");He&&Bt(He).render(zt.createElement($t,null))})();6 }, 10, 2 );`:null,Oe=(i,Z)=>{navigator.clipboard&&navigator.clipboard.writeText(i).then(()=>{Z(!0),setTimeout(()=>Z(!1),2e3)}).catch(()=>{})},At=()=>Oe(Me,J),ge=(t==null?void 0:t.debug_log_exists)===!1||(E==null?void 0:E.deleted)===!0,je=()=>{const i=[s!==null?"✓ "+L(n("Test posts: %d deleted","noshi-kanamer"),s.count):(t==null?void 0:t.test_posts_count)===0?"✓ "+n("Test posts: not used (no action needed)","noshi-kanamer"):"⚠ "+n("Test posts: not yet checked","noshi-kanamer"),d!==null?"✓ "+L(Ne("Block catalog pages: %d page moved to trash","Block catalog pages: %d pages moved to trash",d.trashed,"noshi-kanamer"),d.trashed):(t==null?void 0:t.block_catalog_pages_count)===0?"✓ "+n("Block catalog pages: not used (no action needed)","noshi-kanamer"):"⚠ "+n("Block catalog pages: not yet checked","noshi-kanamer"),u===!0?"✓ "+n("Rewrite rules: flushed","noshi-kanamer"):"⚠ "+n("Rewrite rules: not yet flushed","noshi-kanamer"),(t==null?void 0:t.search_index)===!0?"✓ "+n("Search engine indexing: enabled","noshi-kanamer"):"⚠ "+n("Search engine indexing: disabled or not yet checked","noshi-kanamer"),(t==null?void 0:t.wp_debug)===!1?"✓ "+n("WP_DEBUG: disabled","noshi-kanamer"):"⚠ "+n("WP_DEBUG: enabled or not yet checked","noshi-kanamer"),(t==null?void 0:t.disallow_file_edit)===!0?"✓ "+n("File editor: disabled","noshi-kanamer"):"⚠ "+n("File editor: enabled or not yet checked","noshi-kanamer"),(t==null?void 0:t.xmlrpc_enabled)===!1?"✓ "+n("XML-RPC: disabled","noshi-kanamer"):"⚠ "+n("XML-RPC: enabled or not yet checked","noshi-kanamer"),ge?"✓ "+n("debug.log: cleaned up","noshi-kanamer"):"⚠ "+n("debug.log: not yet checked","noshi-kanamer"),(t==null?void 0:t.admin_username_exists)===!1?"✓ "+n("Admin username: no 'admin' user","noshi-kanamer"):"⚠ "+n("Admin username: 'admin' user exists or not yet checked","noshi-kanamer")],Z=i.filter(A=>A.startsWith("✓")).length,fe=(a==null?void 0:a.filter(A=>A.status==="critical"||A.status==="warning").length)??0,re=(a==null?void 0:a.filter(A=>A.status==="critical").length)??0,ue=(a==null?void 0:a.filter(A=>!A.active&&A.status==="critical").length)??0;return[n("Noshi-Kanamer Pre-Launch Report","noshi-kanamer"),L(n("Site: %s","noshi-kanamer"),window.location.hostname),L(n("Generated: %s","noshi-kanamer"),new Date().toLocaleString()),"",...i,"",L(n("Admin email: %s","noshi-kanamer"),(t==null?void 0:t.admin_email)??"-"),L(n("Hidden blocks configured: %d","noshi-kanamer"),Q.length),a===null?n("Potentially unmaintained plugins: not yet scanned (see Site Check tab)","noshi-kanamer"):L(n("Potentially unmaintained plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)","noshi-kanamer"),fe,re),...a!==null&&ue>0?[L(n("Inactive & potentially unmaintained: %d plugin(s), consider removing","noshi-kanamer"),ue)]:[],"",Z===i.length?n("Status: Ready to launch","noshi-kanamer"):L(n("Status: %1$d of %2$d items completed","noshi-kanamer"),Z,i.length),"","---",n("Generated by Noshi-Kanamer: https://wordpress.org/plugins/noshi-kanamer/","noshi-kanamer")].join(` 7 `)},Mt=()=>Oe(je(),K),Ot=async()=>{const i=await te("pre-launch/track-pro-interest",{method:"POST",body:"{}"});i!=null&&i.ok&&o(!0)},ae=((t==null?void 0:t.test_posts_count)===0||s!==null)&&((t==null?void 0:t.block_catalog_pages_count)===0||d!==null)&&u===!0&&(t==null?void 0:t.search_index)===!0&&(t==null?void 0:t.code_noindex)===!1&&t!==null&&(t==null?void 0:t.wp_debug)===!1&&(t==null?void 0:t.disallow_file_edit)===!0&&(t==null?void 0:t.xmlrpc_enabled)===!1&&ge&&(t==null?void 0:t.admin_username_exists)===!1&&(Q.length===0||S),xe=[{done:(t==null?void 0:t.search_index)===!0&&(t==null?void 0:t.code_noindex)===!1,label:n("Enable search indexing","noshi-kanamer"),hint:(t==null?void 0:t.search_index)===!1?n('Open Settings > Reading and uncheck "Discourage search engines from indexing this site".',"noshi-kanamer"):(t==null?void 0:t.code_noindex)===!0?(t==null?void 0:t.code_noindex_source)==="wp_robots"?n("Code-level noindex detected via wp_robots filter. Check your theme functions.php or SEO plugin settings.","noshi-kanamer"):n(`Direct <meta name="robots" content="noindex"> output detected in HTML. Check your theme's wp_head hook.`,"noshi-kanamer"):n('Open Settings > Reading and uncheck "Discourage search engines from indexing this site".',"noshi-kanamer"),actionUrl:(Ue=t==null?void 0:t.admin_url)==null?void 0:Ue.reading,actionLabel:n("Open Reading Settings","noshi-kanamer")},{done:(t==null?void 0:t.wp_debug)===!1,label:n("Disable WP_DEBUG","noshi-kanamer"),hint:n("Edit wp-config.php manually: define( 'WP_DEBUG', false );","noshi-kanamer")},{done:(t==null?void 0:t.disallow_file_edit)===!0,label:n("Disable file editor","noshi-kanamer"),hint:n("Edit wp-config.php manually: define( 'DISALLOW_FILE_EDIT', true );","noshi-kanamer")},{done:(t==null?void 0:t.xmlrpc_enabled)===!1,label:n("Disable XML-RPC","noshi-kanamer"),hint:n("Add to your theme's functions.php: add_filter( 'xmlrpc_enabled', '__return_false' );","noshi-kanamer")},{done:(t==null?void 0:t.admin_username_exists)===!1,label:n("Rename admin user","noshi-kanamer"),hint:n("Create a new administrator account, then delete the 'admin' user and reassign its content.","noshi-kanamer"),actionUrl:(Ke=t==null?void 0:t.admin_url)==null?void 0:Ke.users,actionLabel:n("Open Users","noshi-kanamer")},{done:(t==null?void 0:t.test_posts_count)===0||s!==null,label:n("Delete test posts","noshi-kanamer"),hint:n('Click the Run button on the "Delete all test posts" row in the Actions section.',"noshi-kanamer")},{done:(t==null?void 0:t.block_catalog_pages_count)===0||d!==null,label:n("Remove catalog pages","noshi-kanamer"),hint:n('Click the Run button on the "Move block catalog pages to trash" row in the Actions section.',"noshi-kanamer")},{done:u===!0,label:n("Flush rewrite rules","noshi-kanamer"),hint:n('Click the Run button on the "Flush rewrite rules (permalinks)" row in the Actions section.',"noshi-kanamer")},{done:ge,label:n("Delete debug.log","noshi-kanamer"),hint:n('Click the Run button on the "Delete debug.log file" row in the Actions section.',"noshi-kanamer")},{done:Q.length===0||S,label:n("Generate block code","noshi-kanamer"),hint:n('Click "Generate Code" in the Code Generator section and paste the snippet into your theme functions.php.',"noshi-kanamer")}],jt=xe.length,Gt=t===null?0:xe.filter(i=>i.done).length,Ft=t===null?[]:xe.filter(i=>!i.done),Ge=we(null),Fe=()=>{_(!0),setTimeout(()=>{var i;(i=Ge.current)==null||i.scrollIntoView({behavior:"smooth",block:"start"})},0)},ve=we(null);Ee(()=>{var Z,fe;const i=(Z=ve.current)==null?void 0:Z.parentElement;return(fe=i==null?void 0:i.classList)!=null&&fe.contains("noshikn-prelaunch-panel")&&i.classList.toggle("is-ready",ae),()=>{var ue,A;const re=(ue=ve.current)==null?void 0:ue.parentElement;(A=re==null?void 0:re.classList)!=null&&A.contains("noshikn-prelaunch-panel")&&re.classList.remove("is-ready")}},[ae]),Ee(()=>{ae&&!O.current&&P((t==null?void 0:t.review_shown_today)===!1?"with-review":"without-review"),O.current=ae},[ae,t]);const j={width:180,padding:"10px 12px",verticalAlign:"middle"},G={padding:"10px 12px",verticalAlign:"top"},F={padding:"10px 12px",verticalAlign:"top"};return e.createElement("div",{ref:ve},C&&e.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},e.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)"}},e.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},"✅"),e.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},ee(n("All checks complete!<br/>Your site is ready to hand off 👍","noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("p",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7}},ee(n(C==="with-review"?`All checks have passed. Click "Generate Report" to get a shareable checklist of everything verified. 🙌<br/><br/>Thanks for using Noshi-Kanamer, how did it go? We'd love to hear your thoughts in a review. ✉️`:'All checks have passed. Click "Generate Report" to get a shareable checklist of everything verified. 🙌<br/><br/>See you again soon!',"noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},e.createElement("button",{className:"button",onClick:Dt},n("Close","noshi-kanamer")),C==="with-review"&&e.createElement("button",{className:"button button-primary",onClick:Ht},n("Leave a review →","noshi-kanamer"))))),k&&!C&&e.createElement(le,{icon:"🧭",title:n("How Pre-Launch works","noshi-kanamer"),onClose:()=>I(!1),pages:[e.createElement("p",{key:"checks"},ee(n("Let's run the final checks before handoff!<br/>The Checks section automatically inspects items you must not forget before delivery and shows the results.<br/>Complete any required fixes.","noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("p",{key:"actions"},ee(n("The Actions section gathers run buttons that resolve work created in the other development tabs.<br/>Do not forget to run them.","noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("p",{key:"codegen"},ee(n("Code Generator outputs code to make your Hide Blocks settings permanent.<br/>Even if you remove this plugin, you can keep clients away from unnecessary blocks.","noshi-kanamer"),{br:e.createElement("br",null)})),e.createElement("p",{key:"report"},ee(n("Finally, the Report section outputs the current pre-launch check status as text.<br/>Sharing this text at handoff can help build stronger trust.<br/><br/>Good luck!","noshi-kanamer"),{br:e.createElement("br",null)}))]}),e.createElement("h2",{style:{marginTop:0}},n("Pre-Launch: Get your site ready before handing off to the client!","noshi-kanamer"),e.createElement("button",{type:"button",className:"button",onClick:()=>I(!0),onMouseEnter:i=>{i.currentTarget.style.background="#eef2ff",i.currentTarget.style.borderColor="#a5b4fc",i.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",i.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:i=>{i.currentTarget.style.background="#f5f7ff",i.currentTarget.style.borderColor="#c7d2fe",i.currentTarget.style.boxShadow="none",i.currentTarget.style.transform="translateY(0)"},"aria-label":n("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},e.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),e.createElement("span",null,n("Guide","noshi-kanamer")))),e.createElement("p",{style:{color:"#666",marginBottom:24}},n("Deliver: Auto-detect 6 launch-blocking settings and clean up test data, then generate a proof report for client handoff.","noshi-kanamer")),ae?e.createElement(mt,{onPreviewReport:Fe}):e.createElement(ct,{doneCount:Gt,totalCount:jt,isLoading:t===null,onPreviewReport:Fe}),e.createElement("h2",{style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},n("Checks","noshi-kanamer")),e.createElement("table",{className:"widefat",style:{marginBottom:28}},e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:Wt,disabled:B==="recheck"},n(B==="recheck"?"Checking…":"Re-check","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Search engine indexing","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):e.createElement("div",null,e.createElement("div",{style:{marginBottom:6}},e.createElement("span",{style:{color:"#666",fontSize:12,marginRight:8}},n("Settings:","noshi-kanamer")),t.search_index?e.createElement(M,{text:n("OK","noshi-kanamer")}):e.createElement("span",null,e.createElement(U,{text:n("Disabled.","noshi-kanamer")})," ",e.createElement("a",{className:"button button-small",href:(Ye=t.admin_url)==null?void 0:Ye.reading,target:"_blank",rel:"noreferrer"},n("Open Reading Settings","noshi-kanamer")))),e.createElement("div",null,e.createElement("span",{style:{color:"#666",fontSize:12,marginRight:8}},n("Code-level:","noshi-kanamer")),t.code_noindex===!0?e.createElement("span",null,e.createElement(U,{text:t.code_noindex_source==="wp_robots"?n("noindex detected (wp_robots filter)","noshi-kanamer"):n("noindex detected (<meta> in HTML)","noshi-kanamer")}),e.createElement("div",{style:{color:"#888",fontSize:12,marginTop:4}},t.code_noindex_source==="wp_robots"?n("Check your theme functions.php or SEO plugin (Yoast / RankMath etc.) for noindex directives.","noshi-kanamer"):n(`Check your theme's wp_head hook for a <meta name="robots" content="noindex"> output.`,"noshi-kanamer"))):t.code_noindex_source==="unverified"?e.createElement("div",null,e.createElement(M,{text:n("OK","noshi-kanamer")}),e.createElement("div",{style:{color:"#888",fontSize:11,marginTop:4,lineHeight:1.5}},"(",n("HTML rendering not verified (some detection methods were skipped)","noshi-kanamer"),")",e.createElement(pt,{label:n("About this check","noshi-kanamer")},n('WordPress tries to fetch its own homepage and scan it for <meta name="robots" content="noindex"> written directly in HTML. This loopback request can fail on local development environments or some shared hosts. Code-level detection via the wp_robots filter still runs as the primary check, so launch readiness is not affected.',"noshi-kanamer")))):e.createElement(M,{text:n("OK","noshi-kanamer")}))))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("Admin email address","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):e.createElement(e.Fragment,null,e.createElement("code",null,t.admin_email),e.createElement("div",{style:{marginTop:6}},e.createElement("a",{className:"button button-small",href:(Xe=t.admin_url)==null?void 0:Xe.general,target:"_blank",rel:"noreferrer"},n("Open General Settings","noshi-kanamer")))))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("WP_DEBUG","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):t.wp_debug===!1?e.createElement(M,{text:n("OK (disabled)","noshi-kanamer")}):e.createElement("div",null,e.createElement(U,{text:n("Enabled: edit wp-config.php manually:","noshi-kanamer")}),e.createElement(ke,null,"define( 'WP_DEBUG', false );")))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("File editor (DISALLOW_FILE_EDIT)","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):t.disallow_file_edit===!0?e.createElement(M,{text:n("OK (disabled)","noshi-kanamer")}):e.createElement("div",null,e.createElement(U,{text:n("Enabled: edit wp-config.php manually:","noshi-kanamer")}),e.createElement(ke,null,"define( 'DISALLOW_FILE_EDIT', true );")))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("XML-RPC","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):t.xmlrpc_enabled===!1?e.createElement(M,{text:n("OK (disabled)","noshi-kanamer")}):e.createElement("div",null,e.createElement(U,{text:n("Enabled: add to functions.php:","noshi-kanamer")}),e.createElement(ke,null,"add_filter( 'xmlrpc_enabled', '__return_false' );")))),e.createElement("tr",null,e.createElement("td",{style:j}),e.createElement("td",{style:G},e.createElement("strong",null,n("Admin username","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Checking…","noshi-kanamer")):t.admin_username_exists===!1?e.createElement(M,{text:n("OK (no 'admin' user)","noshi-kanamer")}):e.createElement(e.Fragment,null,e.createElement(U,{text:n("Default 'admin' username exists. WordPress can't rename a username, create a new administrator account, then delete 'admin' and reassign its content to the new account.","noshi-kanamer")}),e.createElement("div",{style:{marginTop:6}},e.createElement("a",{className:"button button-small",href:(Je=t.admin_url)==null?void 0:Je.users,target:"_blank",rel:"noreferrer"},n("Open Users","noshi-kanamer")))))))),e.createElement("h2",{style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},n("Actions","noshi-kanamer")),e.createElement("table",{className:"widefat",style:{marginBottom:28}},e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:ce,disabled:B==="testPosts"||s!==null||(t==null?void 0:t.test_posts_count)===0},n(B==="testPosts"?"Running…":"Run","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Delete all test posts","noshi-kanamer"))),e.createElement("td",{style:F},(t==null?void 0:t.test_posts_count)===0?e.createElement(e.Fragment,null,e.createElement(pe,{text:n("Not used (no action needed)","noshi-kanamer")}),e.createElement("div",{style:{color:"#888",fontSize:12,marginTop:4}},n("Generates flagged test posts during development, see the Test Posts tab.","noshi-kanamer"))):s!==null?e.createElement(M,{text:L(n("Done (%d deleted)","noshi-kanamer"),s.count)}):(t==null?void 0:t.test_posts_count)>0?e.createElement(U,{text:L(n("%d test post(s) detected.","noshi-kanamer"),t.test_posts_count)}):null)),e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:me,disabled:B==="catalog"||d!==null||(t==null?void 0:t.block_catalog_pages_count)===0},n(B==="catalog"?"Running…":"Run","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Move block catalog pages to trash","noshi-kanamer"))),e.createElement("td",{style:F},(t==null?void 0:t.block_catalog_pages_count)===0?e.createElement(e.Fragment,null,e.createElement(pe,{text:n("Not used (no action needed)","noshi-kanamer")}),e.createElement("div",{style:{color:"#888",fontSize:12,marginTop:4}},n("Adds preview pages of every registered block, see the Block Showcase block.","noshi-kanamer"))):d!==null?e.createElement(M,{text:L(Ne("Done (%d page moved)","Done (%d pages moved)",d.trashed,"noshi-kanamer"),d.trashed)}):(t==null?void 0:t.block_catalog_pages_count)>0?e.createElement(U,{text:L(n("%d block catalog page(s) detected.","noshi-kanamer"),t.block_catalog_pages_count)}):null)),e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:V,disabled:B==="rewrites"||u===!0},n(B==="rewrites"?"Running…":"Run","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Flush rewrite rules (permalinks)","noshi-kanamer"))),e.createElement("td",{style:F},u&&e.createElement(M,{text:n("Done","noshi-kanamer")}))),e.createElement("tr",null,e.createElement("td",{style:j},e.createElement("button",{className:"button",onClick:Lt,disabled:B==="debugLog"||ge||E!==null&&!E.existed},n(B==="debugLog"?"Running…":"Run","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Delete debug.log file","noshi-kanamer"))),e.createElement("td",{style:F},E!==null?E.existed?E.deleted?e.createElement(M,{text:n("Done (deleted)","noshi-kanamer")}):e.createElement(U,{text:n("Failed to delete: check file permissions.","noshi-kanamer")}):e.createElement(pe,{text:n("Not present (no action needed)","noshi-kanamer")}):(t==null?void 0:t.debug_log_exists)===!1?e.createElement(pe,{text:n("Not present (no action needed)","noshi-kanamer")}):null)))),e.createElement("h2",{style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},n("Code Generator","noshi-kanamer")),e.createElement("table",{className:"widefat",style:{marginBottom:S?0:32}},e.createElement("tbody",null,e.createElement("tr",null,e.createElement("td",{style:j},!S&&Q.length>0&&e.createElement("button",{className:"button",onClick:()=>f(!0)},n("Generate Code","noshi-kanamer"))),e.createElement("td",{style:G},e.createElement("strong",null,n("Persist block visibility settings","noshi-kanamer"))),e.createElement("td",{style:F},t===null?e.createElement("span",{style:{color:"#999"}},n("Loading…","noshi-kanamer")):Q.length===0?e.createElement("span",{style:{color:"#888"}},n("No hidden blocks configured (no action needed).","noshi-kanamer")):e.createElement("span",{style:{color:"#888"}},L(n("%d block(s) configured.","noshi-kanamer"),Q.length)))))),S&&e.createElement("div",{style:{background:"#fff",border:"1px solid #ddd",borderTop:"none",padding:"12px 14px",marginBottom:32}},e.createElement("pre",{style:{background:"#f0f0f0",padding:"10px 14px",fontFamily:"monospace",fontSize:12,whiteSpace:"pre-wrap",marginBottom:8}},Me),e.createElement("button",{className:"button button-primary",onClick:At},n(N?"Copied!":"Copy to Clipboard","noshi-kanamer")),e.createElement("p",{className:"description",style:{marginTop:8}},ee(n("Paste this into your theme's <code>functions.php</code> to keep the block settings permanently.","noshi-kanamer"),{code:e.createElement("code",null)}))),e.createElement("h2",{ref:Ge,style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},n("Report","noshi-kanamer")),e.createElement("div",{style:{marginBottom:32}},!x&&e.createElement("button",{className:"button",onClick:()=>_(!0)},n("Generate Report","noshi-kanamer")),x&&e.createElement("div",{style:{background:"#fff",border:"1px solid #ddd",padding:"12px 14px"}},e.createElement("textarea",{readOnly:!0,value:je(),rows:12,style:{width:"100%",fontFamily:"monospace",fontSize:12,marginBottom:8,boxSizing:"border-box"}}),e.createElement("button",{className:"button button-primary",onClick:Mt},n(D?"Copied!":"Copy to Clipboard","noshi-kanamer")),e.createElement("div",{style:{marginTop:16,paddingTop:12,borderTop:"1px solid #eee"}},q?e.createElement("p",{style:{color:"#888",margin:0}},n("Thanks! This helps us prioritize the Pro version.","noshi-kanamer")):e.createElement("button",{className:"button",onClick:Ot},n("✨ Want a branded, verifiable report for your clients? (Pro: coming soon)","noshi-kanamer"))))),e.createElement(ut,{isLoading:t===null,pendingSteps:Ft,isReady:ae}))}const g=window.wp.element,{useState:Y,useEffect:gt,useCallback:ft,createInterpolateElement:bt}=window.wp.element,{__:z,_n:Ie,sprintf:de}=window.wp.i18n,{apiUrl:yt,nonce:Pe}=window.noshiknData;async function $e(t,r={}){const a=await fetch(yt+t,{headers:{"X-WP-Nonce":Pe,"Content-Type":"application/json",...r.headers},...r});if(!a.ok)throw new Error(await a.text());return a.json()}function Et(){var q;const[t,r]=Y([]),[a,s]=Y(!1),[h,d]=Y(new Set),[b,u]=Y(!1),[y,E]=Y(!1),[p,S]=Y(null),[f,N]=Y(null),[J,B]=Y(!1),l=ft(async()=>{s(!0),N(null),S(null);try{const{ids:o}=await $e("media/unused");if(!o.length){r([]);return}const C=100,P=[];for(let I=0;I<o.length;I+=C)P.push(o.slice(I,I+C));const k=[];for(const I of P){const O=await fetch(`${window.location.origin}/wp-json/wp/v2/media?include=${I.join(",")}&per_page=${C}&_fields=id,title,source_url,media_details`,{headers:{"X-WP-Nonce":Pe}});O.ok&&k.push(...await O.json())}r(k)}catch(o){N(o.message)}finally{s(!1)}},[]);gt(()=>{l()},[l]);function x(o){d(o?new Set(t.map(C=>C.id)):new Set)}function _(o){d(C=>{const P=new Set(C);return P.has(o)?P.delete(o):P.add(o),P})}async function D(){E(!0),N(null);try{const o=await $e("media/delete-unused",{method:"POST",body:JSON.stringify({ids:Array.from(h)})});S(o),d(new Set),await l()}catch(o){N(o.message)}finally{E(!1),u(!1)}}const K=o=>{var C,P,k;return((k=(P=(C=o.media_details)==null?void 0:C.sizes)==null?void 0:P.thumbnail)==null?void 0:k.source_url)||o.source_url};return g.createElement("div",null,J&&g.createElement(le,{icon:"🖼️",title:z("How Media Manager works","noshi-kanamer"),onClose:()=>B(!1)},g.createElement("p",null,bt(z("Automatically scan your media library for images that aren't referenced in post content, featured images, or common custom-field formats (like ACF image/gallery fields).<br/>Turn on the checkbox for images you don't need, then click Delete selected to remove them.<br/><br/>Use this during development whenever you notice unused images piling up.","noshi-kanamer"),{br:g.createElement("br",null)}))),g.createElement("h2",{style:{marginTop:0}},z("Media Manager: Find unused images","noshi-kanamer"),g.createElement("button",{type:"button",className:"button",onClick:()=>B(!0),onMouseEnter:o=>{o.currentTarget.style.background="#eef2ff",o.currentTarget.style.borderColor="#a5b4fc",o.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",o.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:o=>{o.currentTarget.style.background="#f5f7ff",o.currentTarget.style.borderColor="#c7d2fe",o.currentTarget.style.boxShadow="none",o.currentTarget.style.transform="translateY(0)"},"aria-label":z("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},g.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),g.createElement("span",null,z("Guide","noshi-kanamer")))),g.createElement("p",{style:{color:"#666",marginBottom:16}},z("Develop: Find images not referenced in your content or meta fields. Delete dummy images before handoff to keep the media library clean.","noshi-kanamer")),f&&g.createElement("div",{className:"notice notice-error",style:{padding:"8px 12px",marginBottom:16}},g.createElement("p",{style:{margin:0}},f)),p&&g.createElement("div",{className:"notice notice-success",style:{padding:"8px 12px",marginBottom:16}},g.createElement("p",{style:{margin:0}},de(Ie("Deleted %d image.","Deleted %d images.",p.count,"noshi-kanamer"),p.count),(q=p.failed)!=null&&q.length?" "+de(z("Failed: %s","noshi-kanamer"),p.failed.join(", ")):"")),g.createElement("div",{style:{marginBottom:12,display:"flex",gap:8,alignItems:"center"}},g.createElement("button",{className:"button",onClick:l,disabled:a},z(a?"Loading…":"Reload","noshi-kanamer")),t.length>0&&g.createElement(g.Fragment,null,g.createElement("label",{style:{display:"flex",alignItems:"center",gap:4}},g.createElement("input",{type:"checkbox",checked:h.size===t.length,onChange:o=>x(o.target.checked)}),de(z("Select all (%d)","noshi-kanamer"),t.length)),g.createElement("button",{className:"button button-primary",disabled:h.size===0||y,onClick:()=>u(!0)},de(z("Delete selected (%d)","noshi-kanamer"),h.size)))),!a&&t.length===0&&!f&&g.createElement("p",{style:{color:"#666"}},z("No unused images found.","noshi-kanamer")),t.length>0&&g.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(160px, 1fr))",gap:12}},t.map(o=>{var C,P;return g.createElement("label",{key:o.id,style:{border:`2px solid ${h.has(o.id)?"#2271b1":"#ddd"}`,borderRadius:4,padding:8,cursor:"pointer",background:h.has(o.id)?"#f0f6fc":"#fff"}},g.createElement("input",{type:"checkbox",checked:h.has(o.id),onChange:()=>_(o.id),style:{marginBottom:6}}),g.createElement("img",{src:K(o),alt:((C=o.title)==null?void 0:C.rendered)||"",style:{width:"100%",aspectRatio:"1",objectFit:"cover",display:"block",borderRadius:2}}),g.createElement("div",{style:{fontSize:11,color:"#444",marginTop:4,wordBreak:"break-all"}},((P=o.title)==null?void 0:P.rendered)||`ID: ${o.id}`))})),b&&g.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:99999}},g.createElement("div",{style:{background:"#fff",borderRadius:6,padding:24,maxWidth:400,width:"90%"}},g.createElement("h3",{style:{marginTop:0}},z("Confirm Delete","noshi-kanamer")),g.createElement("p",null,de(Ie("Permanently delete %d image?","Permanently delete %d images?",h.size,"noshi-kanamer"),h.size),g.createElement("br",null),g.createElement("span",{style:{color:"#d63638"}},z("This cannot be undone.","noshi-kanamer"))),g.createElement("div",{style:{display:"flex",gap:8,justifyContent:"flex-end"}},g.createElement("button",{className:"button",onClick:()=>u(!1),disabled:y},z("Cancel","noshi-kanamer")),g.createElement("button",{className:"button button-primary",onClick:D,disabled:y},z(y?"Deleting…":"Delete","noshi-kanamer"))))))}const c=window.wp.element,{useMemo:wt,useState:kt,createInterpolateElement:xt}=window.wp.element,{__:T,sprintf:ze}=window.wp.i18n;function vt({text:t}){return c.createElement("span",{style:{color:"#2a9d2a",fontWeight:600}},"✓ ",t)}function St({status:t}){const{__:r}=window.wp.i18n;switch(t){case"ok":return c.createElement("span",{style:{color:"#2a9d2a",fontWeight:600}},"✓ ",r("Up to date","noshi-kanamer"));case"warning":return c.createElement("span",{style:{color:"#b26a00",fontWeight:600}},"⚠ ",r("Not updated in 6+ months","noshi-kanamer"));case"critical":return c.createElement("span",{style:{color:"#c00",fontWeight:600}},"⚠ ",r("Not updated in 1+ year","noshi-kanamer"));default:return c.createElement("span",{style:{color:"#888",fontWeight:600}},"? ",r("Not on WordPress.org","noshi-kanamer"))}}const Be={critical:0,warning:1,ok:2,unknown:3};function _t({outdatedPlugins:t,scanProgress:r,scanLoading:a,onScan:s}){const[h,d]=kt(!1),b={width:180,padding:"10px 12px",verticalAlign:"middle"},u={padding:"10px 12px",verticalAlign:"top"},y={padding:"10px 12px",verticalAlign:"top"},E=wt(()=>t?[...t].sort((p,S)=>(Be[p.status]??9)-(Be[S.status]??9)):null,[t]);return c.createElement("div",null,h&&c.createElement(le,{icon:"🛡️",title:T("How Site Check works","noshi-kanamer"),onClose:()=>d(!1)},c.createElement("p",null,xt(T("Click Run to scan every installed plugin, active or not, against WordPress.org and flag anything that hasn't been updated in 6+ months or 1+ year.<br/>Run it any time you take over an existing site.<br/><br/>Once scanned, the results are automatically included in your Pre-Launch Report, no need to re-check.","noshi-kanamer"),{br:c.createElement("br",null)}))),c.createElement("h2",{style:{marginTop:0}},T("Site Check: Find plugins that haven't been updated recently","noshi-kanamer"),c.createElement("button",{type:"button",className:"button",onClick:()=>d(!0),onMouseEnter:p=>{p.currentTarget.style.background="#eef2ff",p.currentTarget.style.borderColor="#a5b4fc",p.currentTarget.style.boxShadow="0 1px 3px rgba(56, 88, 233, 0.18)",p.currentTarget.style.transform="translateY(-1px)"},onMouseLeave:p=>{p.currentTarget.style.background="#f5f7ff",p.currentTarget.style.borderColor="#c7d2fe",p.currentTarget.style.boxShadow="none",p.currentTarget.style.transform="translateY(0)"},"aria-label":T("How this tab works","noshi-kanamer"),style:{marginLeft:8,verticalAlign:"0.5px",display:"inline-flex",alignItems:"center",gap:4,height:22,minHeight:22,padding:"0 8px",color:"#3858e9",borderColor:"#c7d2fe",background:"#f5f7ff",borderRadius:999,fontSize:11,fontWeight:600,lineHeight:"20px",transition:"background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease"}},c.createElement("span",{className:"dashicons dashicons-info-outline",style:{fontSize:14,width:14,height:14,lineHeight:"14px"}}),c.createElement("span",null,T("Guide","noshi-kanamer")))),c.createElement("p",{style:{color:"#666",marginBottom:24}},T("Take over: Syncing up with a client's environment? Scan installed plugins for potentially unmaintained listings and get a list of what to review. Handy for maintenance quotes.","noshi-kanamer")),c.createElement("table",{className:"widefat",style:{marginBottom:28}},c.createElement("tbody",null,c.createElement("tr",null,c.createElement("td",{style:b},c.createElement("button",{className:"button",onClick:s,disabled:a},T(a?"Scanning…":"Run","noshi-kanamer"))),c.createElement("td",{style:u},c.createElement("strong",null,T("Scan installed plugins for potentially unmaintained listings","noshi-kanamer"))),c.createElement("td",{style:y},r!==null&&c.createElement("span",{style:{color:"#888"}},ze(T("Scanning %1$d / %2$d plugins…","noshi-kanamer"),r.current,r.total)),t!==null&&r===null&&c.createElement(vt,{text:ze(T("Done (%d plugin(s) scanned)","noshi-kanamer"),t.length)}))))),E!==null&&c.createElement(c.Fragment,null,c.createElement("h2",{style:{fontSize:13,fontWeight:600,textTransform:"uppercase",color:"#888",letterSpacing:1,marginBottom:8}},T("Installed Plugins","noshi-kanamer")),c.createElement("table",{className:"widefat",style:{marginBottom:28}},c.createElement("thead",null,c.createElement("tr",null,c.createElement("th",null,T("Plugin","noshi-kanamer")),c.createElement("th",null,T("Status","noshi-kanamer")),c.createElement("th",null,T("Last Updated","noshi-kanamer")),c.createElement("th",null,T("WP.org Update Status","noshi-kanamer")))),c.createElement("tbody",null,E.map((p,S)=>c.createElement("tr",{key:S},c.createElement("td",{style:u},c.createElement("strong",null,p.name)),c.createElement("td",{style:y},p.active?c.createElement("span",{style:{color:"#2a9d2a"}},T("Active","noshi-kanamer")):c.createElement("span",{style:{color:"#888"}},T("Inactive","noshi-kanamer"))),c.createElement("td",{style:y},p.last_updated?p.last_updated.slice(0,10):"-"),c.createElement("td",{style:y},c.createElement(St,{status:p.status}),!p.active&&p.status==="critical"&&c.createElement("div",{style:{marginTop:4,color:"#888",fontSize:12}},T("Inactive and not updated in 1+ year, consider removing it.","noshi-kanamer")))))))))}const m=window.wp.element,{useState:X,useEffect:Le,useRef:We,createInterpolateElement:he}=window.wp.element,{__:R}=window.wp.i18n,{apiUrl:Ct,nonce:Tt,prelaunchIntroShown:De,prelaunchTabIntroShown:Rt}=window.noshiknData??{},Nt={"Content-Type":"application/json","X-WP-Nonce":Tt},ne=(t,r={})=>fetch(Ct+t,{headers:Nt,...r}).then(a=>a.json()),It=[{id:"block-filter",label:()=>R("Hide Blocks","noshi-kanamer")},{id:"test-posts",label:()=>R("Test Posts","noshi-kanamer")},{id:"media-manager",label:()=>R("Media Manager","noshi-kanamer")},{id:"site-check",label:()=>R("Site Check","noshi-kanamer")},{id:"pre-launch",label:()=>R("Pre-Launch","noshi-kanamer")}],Pt={"block-filter":"dashicons-hidden","test-posts":"dashicons-edit","media-manager":"dashicons-format-image","site-check":"dashicons-shield","pre-launch":"dashicons-clipboard"};function $t(){const t=new URLSearchParams(window.location.search).get("tab")||"block-filter",[r,a]=X(t),[s,h]=X(null),[d,b]=X(!1),[u,y]=X(t==="pre-launch"?!1:!De),[E,p]=X(!Rt),[S,f]=X(null),[N,J]=X(null),[B,l]=X(!1),x=We(!0),_=We(0);Le(()=>{const k=++_.current,I=O=>{_.current===k&&h(O)};if(x.current){x.current=!1,ne("pre-launch/check").then(I);return}r==="pre-launch"&&ne("pre-launch/check").then(I)},[r]);const D=async()=>{l(!0);const k=10;let I=0,O=0,ce=[],me=!1;try{for(;!me;){const V=await ne(`pre-launch/outdated-plugins?offset=${I}&limit=${k}`);if(!V||!Array.isArray(V.results))break;O=V.total,ce=I===0?V.results:[...ce,...V.results],me=V.done,me||J({current:Math.min(I+k,O),total:O}),I+=k}f(ce)}finally{J(null),l(!1)}};Le(()=>{De&&d===!1&&(s==null?void 0:s.review_shown_today)===!1&&s!=null&&s.should_show_review_secondary&&b("engaged")},[s]);const K=async()=>{await ne("pre-launch/mark-review-shown",{method:"POST",body:JSON.stringify({trigger:"engaged"})}),h(k=>k&&{...k,review_shown_today:!0}),b(!1)},q=async()=>{await K(),window.open("https://wordpress.org/support/plugin/noshi-kanamer/reviews/#new-post","_blank")},o=async()=>{await ne("prelaunch-intro/dismiss",{method:"POST"}),y(!1)},C=async()=>{await ne("prelaunch-intro/dismiss",{method:"POST"}),y(!1),a("pre-launch")},P=async()=>{await ne("prelaunch-tab-intro/dismiss",{method:"POST"}),p(!1)};return m.createElement("div",{style:{maxWidth:960,margin:"2rem auto"}},d&&m.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)"}},m.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},"🙂"),m.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},R("Enjoying Noshi-Kanamer?","noshi-kanamer")),m.createElement("p",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7}},he(R("We hope Noshi-Kanamer has been a helpful part of your workflow.<br/>If you have a moment, we'd really appreciate your feedback in a WordPress.org review. It helps us a lot. 😊","noshi-kanamer"),{br:m.createElement("br",null)})),m.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},m.createElement("button",{className:"button button-primary",onClick:q},R("Leave a review →","noshi-kanamer")),m.createElement("button",{className:"button",onClick:K},R("Maybe later","noshi-kanamer"))))),u&&!d&&m.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)"}},m.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},"🚀"),m.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},R("Welcome to Noshi-Kanamer!","noshi-kanamer")),m.createElement("p",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7}},he(R("Lots of tools to explore, but we recommend starting with the Pre-Launch check.<br/>Just open it to see exactly what you need to wrap up before delivery.","noshi-kanamer"),{br:m.createElement("br",null)})),m.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},m.createElement("button",{className:"button button-primary",onClick:C},R("Open Pre-Launch check","noshi-kanamer")),m.createElement("button",{className:"button",onClick:o},R("I'm good!","noshi-kanamer"))))),E&&r==="pre-launch"&&!d&&m.createElement("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.5)",zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"}},m.createElement("div",{style:{background:"#fff",borderRadius:8,padding:"36px 44px",maxWidth:480,width:"90%",textAlign:"center",boxShadow:"0 8px 32px rgba(0,0,0,0.2)"}},m.createElement("div",{style:{fontSize:44,marginTop:36,marginBottom:48}},"🔍"),m.createElement("h2",{style:{fontSize:20,margin:"0 0 12px",color:"#1d2327",lineHeight:1.5}},R("Let's do one final check before handoff!","noshi-kanamer")),m.createElement("p",{style:{color:"#555",margin:"0 0 28px",lineHeight:1.7}},he(R("The progress card shows exactly where you stand right now.<br/>Once it's full, your pre-launch check is complete!<br/>Not sure what to do next? Check the Next Action card in the bottom right.<br/>Ready? Let's get started!","noshi-kanamer"),{br:m.createElement("br",null)})),m.createElement("div",{style:{display:"flex",gap:12,justifyContent:"center"}},m.createElement("button",{className:"button button-primary",onClick:P},R("Got it, let's check!","noshi-kanamer"))))),m.createElement("h1",{style:{marginBottom:4}},"Noshi-Kanamer"),m.createElement("p",{style:{color:"#888",marginTop:0,marginBottom:16}},R("Developer toolkit for WordPress","noshi-kanamer")),m.createElement("div",{className:"nav-tab-wrapper",style:{marginBottom:24}},It.map(k=>m.createElement("a",{key:k.id,className:`nav-tab${r===k.id?" nav-tab-active":""}${k.id==="pre-launch"?" noshikn-tab-prelaunch":""}`,href:"#",onClick:I=>{I.preventDefault(),a(k.id)}},m.createElement("span",{className:`dashicons ${Pt[k.id]} noshikn-tab-icon`}),k.label(),k.id==="pre-launch"&&m.createElement("span",{className:"noshikn-prelaunch-badge"},R("Check first","noshi-kanamer"))))),r==="block-filter"&&m.createElement(at,null),r==="test-posts"&&m.createElement(lt,null),r==="media-manager"&&m.createElement(Et,null),r==="site-check"&&m.createElement(_t,{outdatedPlugins:S,scanProgress:N,scanLoading:B,onScan:D}),r==="pre-launch"&&m.createElement("div",{className:"noshikn-prelaunch-panel"},m.createElement(ht,{check:s,setCheck:h,outdatedPlugins:S})),m.createElement("p",{style:{marginTop:32,paddingTop:16,borderTop:"1px solid #dcdcde",color:"#888",fontSize:12}},he(R("Enjoying Noshi-Kanamer? <a>Leave a review on WordPress.org</a>, it helps other developers find it.","noshi-kanamer"),{a:m.createElement("a",{href:"https://wordpress.org/support/plugin/noshi-kanamer/reviews/#new-post",target:"_blank",rel:"noopener noreferrer"})})))}const zt=window.wp.element,{createRoot:Bt}=window.wp.element,He=document.getElementById("noshikn-admin-root");He&&Bt(He).render(zt.createElement($t,null))})(); -
noshi-kanamer/trunk/languages/noshi-kanamer-ja-757eccaece1679b51289d2c0f1a3403c.json
r3632646 r3633708 199 199 "スキャン中…" 200 200 ], 201 "Scan installed plugins for outdated versions": [202 "インストール済みプラグインの 更新状況をスキャン"201 "Scan installed plugins for potentially unmaintained listings": [ 202 "インストール済みプラグインの放置状況をスキャン" 203 203 ], 204 204 "Scanning %1$d / %2$d plugins…": [ … … 211 211 "サイトチェック — 長期間、更新されていないプラグインを見つけます" 212 212 ], 213 "Take over: Syncing up with a client's environment? Scan installed plugins for outdated versions and get a list of what needs updating. Handy for maintenance quotes.": [214 "引き継ぎフェーズ — クライアントの環境との同期中ですか ? インストール済みのプラグインの 更新状況をスキャンし、古いものをリストアップさせます。次回以降の保守見積もりに活用ください。"213 "Take over: Syncing up with a client's environment? Scan installed plugins for potentially unmaintained listings and get a list of what to review. Handy for maintenance quotes.": [ 214 "引き継ぎフェーズ — クライアントの環境との同期中ですか ? インストール済みのプラグインの放置状況をスキャンし、確認が必要なものをリストアップします。次回以降の保守見積もりに活用ください。" 215 215 ], 216 216 "Installed Plugins": [ … … 413 413 "非表示ブロック設定数: %d" 414 414 ], 415 " Outdated plugins: not yet scanned (see Site Check tab)": [416 " 更新状況: 未スキャン(Site Check タブで確認)"417 ], 418 " Outdated plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)": [419 " 更新が必要なプラグイン: %1$d 件(うち 1 年以上更新なし: %2$d 件)"420 ], 421 "Inactive & outdated: %d plugin(s), consider removing": [422 "無効化済みかつ 更新停止中: %d 件 — 削除をご検討ください"415 "Potentially unmaintained plugins: not yet scanned (see Site Check tab)": [ 416 "放置の可能性があるプラグイン: 未スキャン(Site Check タブで確認)" 417 ], 418 "Potentially unmaintained plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)": [ 419 "放置の可能性があるプラグイン: %1$d 件が要確認(うち 1 年以上更新なし: %2$d 件)" 420 ], 421 "Inactive & potentially unmaintained: %d plugin(s), consider removing": [ 422 "無効化済みかつ放置の可能性あり: %d 件 — 削除をご検討ください" 423 423 ], 424 424 "Status: Ready to launch": [ -
noshi-kanamer/trunk/languages/noshi-kanamer-ja.po
r3632646 r3633708 274 274 275 275 #: src/admin/PreLaunch.jsx 276 msgid "Scan installed plugins for outdated versions"277 msgstr "インストール済みプラグインの 更新状況をスキャン"276 msgid "Scan installed plugins for potentially unmaintained listings" 277 msgstr "インストール済みプラグインの放置状況をスキャン" 278 278 279 279 #: src/admin/PreLaunch.jsx … … 378 378 379 379 #: src/admin/SiteCheck.jsx 380 msgid "Take over: Syncing up with a client's environment? Scan installed plugins for outdated versions and get a list of what needs updating. Handy for maintenance quotes."381 msgstr "引き継ぎフェーズ — クライアントの環境との同期中ですか ? インストール済みのプラグインの 更新状況をスキャンし、古いものをリストアップさせます。次回以降の保守見積もりに活用ください。"380 msgid "Take over: Syncing up with a client's environment? Scan installed plugins for potentially unmaintained listings and get a list of what to review. Handy for maintenance quotes." 381 msgstr "引き継ぎフェーズ — クライアントの環境との同期中ですか ? インストール済みのプラグインの放置状況をスキャンし、確認が必要なものをリストアップします。次回以降の保守見積もりに活用ください。" 382 382 383 383 #: src/admin/PreLaunch.jsx … … 559 559 560 560 #: src/admin/PreLaunch.jsx 561 msgid " Outdated plugins: not yet scanned (see Site Check tab)"562 msgstr " 更新状況: 未スキャン(Site Check タブで確認)"563 564 #: src/admin/PreLaunch.jsx 565 msgid " Outdated plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)"566 msgstr " 更新が必要なプラグイン: %1$d 件(うち 1 年以上更新なし: %2$d 件)"567 568 #: src/admin/PreLaunch.jsx 569 msgid "Inactive & outdated: %d plugin(s), consider removing"570 msgstr "無効化済みかつ 更新停止中: %d 件 — 削除をご検討ください"561 msgid "Potentially unmaintained plugins: not yet scanned (see Site Check tab)" 562 msgstr "放置の可能性があるプラグイン: 未スキャン(Site Check タブで確認)" 563 564 #: src/admin/PreLaunch.jsx 565 msgid "Potentially unmaintained plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)" 566 msgstr "放置の可能性があるプラグイン: %1$d 件が要確認(うち 1 年以上更新なし: %2$d 件)" 567 568 #: src/admin/PreLaunch.jsx 569 msgid "Inactive & potentially unmaintained: %d plugin(s), consider removing" 570 msgstr "無効化済みかつ放置の可能性あり: %d 件 — 削除をご検討ください" 571 571 572 572 #: src/admin/PreLaunch.jsx … … 671 671 672 672 #: noshi-kanamer.php 673 msgid "Check for Outdated Plugins (Noshi-Kanamer)"674 msgstr " プラグインの更新状況を確認 (Noshi-Kanamer)"673 msgid "Check for Potentially Unmaintained Plugins (Noshi-Kanamer)" 674 msgstr "放置の可能性があるプラグインを確認 (Noshi-Kanamer)" 675 675 676 676 #: noshi-kanamer.php -
noshi-kanamer/trunk/languages/noshi-kanamer.pot
r3632646 r3633708 302 302 303 303 #: src/admin/PreLaunch.jsx 304 msgid "Scan installed plugins for outdated versions"304 msgid "Scan installed plugins for potentially unmaintained listings" 305 305 msgstr "" 306 306 … … 406 406 407 407 #: src/admin/SiteCheck.jsx 408 msgid "Take over: Syncing up with a client's environment? Scan installed plugins for outdated versions and get a list of what needs updating. Handy for maintenance quotes."408 msgid "Take over: Syncing up with a client's environment? Scan installed plugins for potentially unmaintained listings and get a list of what to review. Handy for maintenance quotes." 409 409 msgstr "" 410 410 … … 588 588 589 589 #: src/admin/PreLaunch.jsx 590 msgid " Outdated plugins: not yet scanned (see Site Check tab)"591 msgstr "" 592 593 #: src/admin/PreLaunch.jsx 594 msgid " Outdated plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)"595 msgstr "" 596 597 #: src/admin/PreLaunch.jsx 598 msgid "Inactive & outdated: %d plugin(s), consider removing"590 msgid "Potentially unmaintained plugins: not yet scanned (see Site Check tab)" 591 msgstr "" 592 593 #: src/admin/PreLaunch.jsx 594 msgid "Potentially unmaintained plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)" 595 msgstr "" 596 597 #: src/admin/PreLaunch.jsx 598 msgid "Inactive & potentially unmaintained: %d plugin(s), consider removing" 599 599 msgstr "" 600 600 … … 702 702 703 703 #: noshi-kanamer.php 704 msgid "Check for Outdated Plugins (Noshi-Kanamer)"704 msgid "Check for Potentially Unmaintained Plugins (Noshi-Kanamer)" 705 705 msgstr "" 706 706 -
noshi-kanamer/trunk/noshi-kanamer.php
r3632646 r3633708 3 3 * Plugin Name: Noshi-Kanamer – WordPress Pre-Launch Checklist & Client Handoff Toolkit 4 4 * Description: WordPress pre-launch checklist & client handoff toolkit. Auto-detects WP_DEBUG, noindex & unused media. Generates a proof report. 5 * Version: 0.5.1 15 * Version: 0.5.12 6 6 * Author: NokazeHayato 7 7 * Author URI: https://github.com/NokazeHayato … … 16 16 } 17 17 18 define( 'NOSHIKN_VERSION', '0.5.1 1' );18 define( 'NOSHIKN_VERSION', '0.5.12' ); 19 19 define( 'NOSHIKN_SLUG', 'noshi-kanamer' ); 20 20 define( 'NOSHIKN_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); … … 438 438 'adminUrl' => admin_url( 'tools.php?page=' . NOSHIKN_SLUG . '&tab=site-check' ), 439 439 'iconUrl' => NOSHIKN_PLUGIN_URL . 'assets/icon.svg', 440 'label' => __( 'Check for Outdated Plugins (Noshi-Kanamer)', 'noshi-kanamer' ),440 'label' => __( 'Check for Potentially Unmaintained Plugins (Noshi-Kanamer)', 'noshi-kanamer' ), 441 441 ) ); 442 442 } -
noshi-kanamer/trunk/readme.txt
r3632646 r3633708 4 4 Requires at least: 6.2 5 5 Tested up to: 7.0 6 Stable tag: 0.5.1 16 Stable tag: 0.5.12 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 215 215 == Changelog == 216 216 217 = 0.5.12 = 218 * Changed: Unified "outdated" wording in the Site Check tab and Pre-Launch report to "potentially unmaintained" for accuracy (matches readme wording). 219 217 220 = 0.5.11 = 218 221 * Changed: Minor wording tweaks to remaining error messages, warnings, and helper text for consistency. -
noshi-kanamer/trunk/src/admin/PreLaunch.jsx
r3632646 r3633708 471 471 sprintf( __( 'Hidden blocks configured: %d', 'noshi-kanamer' ), hiddenBlocks.length ), 472 472 outdatedPlugins === null 473 ? __( ' Outdated plugins: not yet scanned (see Site Check tab)', 'noshi-kanamer' )474 : sprintf( __( ' Outdated plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)', 'noshi-kanamer' ), outdatedCount, criticalCount ),473 ? __( 'Potentially unmaintained plugins: not yet scanned (see Site Check tab)', 'noshi-kanamer' ) 474 : sprintf( __( 'Potentially unmaintained plugins: %1$d plugin(s) need attention (%2$d critical, 1+ year)', 'noshi-kanamer' ), outdatedCount, criticalCount ), 475 475 ...(outdatedPlugins !== null && inactiveOutdatedCount > 0 476 ? [ sprintf( __( 'Inactive & outdated: %d plugin(s), consider removing', 'noshi-kanamer' ), inactiveOutdatedCount ) ]476 ? [ sprintf( __( 'Inactive & potentially unmaintained: %d plugin(s), consider removing', 'noshi-kanamer' ), inactiveOutdatedCount ) ] 477 477 : []), 478 478 '', -
noshi-kanamer/trunk/src/admin/SiteCheck.jsx
r3632646 r3633708 78 78 </h2> 79 79 <p style={{ color: '#666', marginBottom: 24 }}> 80 {__( 'Take over: Syncing up with a client\'s environment? Scan installed plugins for outdated versions and get a list of what needs updating. Handy for maintenance quotes.', 'noshi-kanamer' )}80 {__( 'Take over: Syncing up with a client\'s environment? Scan installed plugins for potentially unmaintained listings and get a list of what to review. Handy for maintenance quotes.', 'noshi-kanamer' )} 81 81 </p> 82 82 … … 93 93 </button> 94 94 </td> 95 <td style={tdStyle}><strong>{__( 'Scan installed plugins for outdated versions', 'noshi-kanamer' )}</strong></td>95 <td style={tdStyle}><strong>{__( 'Scan installed plugins for potentially unmaintained listings', 'noshi-kanamer' )}</strong></td> 96 96 <td style={tdResult}> 97 97 {scanProgress !== null && (
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)