芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/blog.ycreate.jp/wp-content/themes/swell/build/gutenberg/post_editor.js
!function(){"use strict";var e={n:function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,{a:o}),o},d:function(t,o){for(var l in o)e.o(o,l)&&!e.o(t,l)&&Object.defineProperty(t,l,{enumerable:!0,get:o[l]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.i18n,o=window.wp.domReady,l=e.n(o),n=window.wp.data,r=window.wp.element;const c="swell-block-settings",a=({currentPostLink:e,linkText:t})=>{const o=(0,n.useSelect)((e=>e(c).getSettings()),[]);return o&&o.show_header_postlink?React.createElement(React.Fragment,null,React.createElement("a",{href:e,target:"_blank",rel:"noreferrer"},t)):null};l()((()=>{setTimeout((()=>{const e=document.querySelector(".edit-post-header__toolbar");if(null===e)return;const o=wp.data.select("core/editor").getCurrentPost();if(!o)return;const l=o.link;if(!l)return;const n=null==o?void 0:o.type,c=wp.data.select("core").getPostType(n);if(!(null==c?void 0:c.viewable))return;let s="";var i,d;s="page"===n?(0,t.__)("ページを表示","swell"):"lp"===n?(0,t.__)("LPを表示","swell"):(0,t.__)("投稿を表示","swell"),e.insertAdjacentHTML("beforeend",'
'),i=document.querySelector(".swl-custom-header-toolbar"),d=React.createElement(a,{currentPostLink:l,linkText:s}),void 0!==r.createRoot?(0,r.createRoot)(i).render(d):(0,r.render)(d,i)}),50)}));var s=window.wp.apiFetch,i=e.n(s),d=window.wp.plugins,w=window.wp.editPost,_=window.wp.components;const u={color:"#04384c",swellFavi:React.createElement("svg",{width:"20",height:"20","aria-hidden":"true",viewBox:"0 0 56 56","data-icon-name":"swell-block-category"},React.createElement("circle",{cx:"5.24",cy:"20.48",r:"3.09"}),React.createElement("path",{className:"st0",d:"M52.14,14.73c-1.52-3.17-5.37-5.58-9.98-4.7c-5.22,1-7.84,4.17-11.3,8.54c-3.9,4.94-7.93,10.05-13.58,12.33 c-1.99,0.8-4.06,1.21-6.22,1.21c-1.65,0-3.35-0.24-5.11-0.7c-1.08-0.29-2.17-0.66-3.3-1.12C5.49,41.74,15.93,50.2,28.3,50 c14.14-0.23,25.6-11.92,25.55-26.07C53.84,20.69,53.46,17.49,52.14,14.73z"}))};(0,d.registerPlugin)("swell-sidebar",{render:()=>{const e=(0,n.useSelect)((e=>e(c).getSettings()),[]),{setSetting:o}=(0,n.useDispatch)(c),l=(e,t)=>{o(e,t),((e,t,o=!1)=>{i()({path:"/wp/v2/swell-block-settings",method:"POST",data:{key:e,val:t}}).then((e=>{o&&console.log(e)}))})(e,t)};return React.createElement(React.Fragment,null,React.createElement(w.PluginSidebar,{name:"swell-sidebar",icon:u.swellFavi,title:(0,t.__)("SWELL設定","swell")},React.createElement(_.PanelBody,{title:(0,t.__)("ブロックツールバーの表示設定","swell"),initialOpen:!0},React.createElement(_.BaseControl,null,React.createElement(_.CheckboxControl,{label:(0,t.sprintf)((0,t.__)("%sを表示","swell"),(0,t.__)("デバイスコントロール","swell")),checked:(null==e?void 0:e.show_device_toolbtn)||!1,onChange:e=>{l("show_device_toolbtn",e)}}),React.createElement(_.CheckboxControl,{label:(0,t.sprintf)((0,t.__)("%sを表示","swell"),(0,t.__)("マージンコントロール","swell")),checked:(null==e?void 0:e.show_margin_toolbtn)||!1,onChange:e=>{l("show_margin_toolbtn",e)}}),React.createElement(_.CheckboxControl,{label:(0,t.sprintf)((0,t.__)("%sを表示","swell"),(0,t.__)("ショートコード挿入ボタン","swell")),checked:(null==e?void 0:e.show_shortcode_toolbtn)||!1,onChange:e=>{l("show_shortcode_toolbtn",e)}}),React.createElement(_.CheckboxControl,{label:(0,t.sprintf)((0,t.__)("「%s」を1階層上に表示","swell"),(0,t.__)("フォントサイズ","swell")),checked:(null==e?void 0:e.show_fz_top)||!1,onChange:e=>{l("show_fz_top",e)}}),React.createElement(_.CheckboxControl,{label:(0,t.sprintf)((0,t.__)("「%s」を1階層上に表示","swell"),(0,t.__)("テキスト色","swell")),checked:(null==e?void 0:e.show_textcolor_top)||!1,onChange:e=>{l("show_textcolor_top",e)}}),React.createElement(_.CheckboxControl,{label:(0,t.sprintf)((0,t.__)("「%s」を1階層上に表示","swell"),(0,t.__)("背景色","swell")),checked:(null==e?void 0:e.show_bgcolor_top)||!1,onChange:e=>{l("show_bgcolor_top",e)}}),React.createElement(_.CheckboxControl,{label:(0,t.sprintf)((0,t.__)("「%s」を1階層上に表示","swell"),(0,t.__)("マーカー","swell")),checked:(null==e?void 0:e.show_marker_top)||!1,onChange:e=>{l("show_marker_top",e)}}))),React.createElement(_.PanelBody,{title:(0,t.__)("その他の表示設定","swell"),initialOpen:!0},React.createElement(_.BaseControl,null,React.createElement(_.CheckboxControl,{label:(0,t.__)("ヘッダーツールバーに投稿へのリンクを表示する","swell"),checked:(null==e?void 0:e.show_header_postlink)||!1,onChange:e=>{l("show_header_postlink",e)}})))),React.createElement(w.PluginSidebarMoreMenuItem,{target:"swell-sidebar",icon:u.swellFavi},(0,t.__)("SWELL設定","swell")))}}),l()((()=>{const e=new ResizeObserver((e=>{for(const t of e)if(!document.querySelector('[name="editor-canvas"]')){const e=t.contentRect.width;document.documentElement.style.setProperty("--block_width",e+"px")}}));window.hasIframeEditor=!1,setTimeout((()=>{const t=document.querySelector(".editor-post-title");t&&e.observe(t)}),100),(0,n.subscribe)((()=>{const t=document.querySelector('[name="editor-canvas"]'),o=null!==t;if(o!==window.hasIframeEditor){window.hasIframeEditor=o;const l=t?t.contentWindow:window;setTimeout((()=>{const t=l.document.querySelector(".editor-post-title");t&&(e.disconnect(),e.observe(t))}),100)}}))}))}();