Files
CHIEFSOFT\ameye e9e5c0546c first commit
2023-11-30 13:20:54 -05:00

1 line
14 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=111)}({111:function(t,e,n){t.exports=n(112)},112:function(t,e,n){"use strict";n.r(e);n(113);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=p(t);if(e){var r=p(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?f(t):e}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=window,m=d.jQuery,y=d.canvasLayouts,v=wp.i18n.__,b=wp.blocks,h=b.registerBlockType,g=b.createBlock,x=b.parse,w=wp.element.Component,O=wp.components,j=O.Modal,_=O.SelectControl,S=wp.compose.compose,k=wp.data.withDispatch;m(document).on("DOMContentLoaded",(function(){wp.data.subscribe((function(){setTimeout((function(){if(!document.getElementById("canvas-toolbar-import-layout")){var t=m(".edit-post-header-toolbar");Object.keys(y.layouts).length&&t.length&&t.append('\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div id="canvas-toolbar-import-layout" class="canvas-toolbar-import-layout">\n\t\t\t\t\t\t\t\t<button class="components-button components-icon-button" aria-label="'.concat(v("Import Layout","canvas"),'">\n\t\t\t\t\t\t\t\t\t<svg aria-hidden="true" role="img" focusable="false" class="dashicon dashicons-insert" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"></path></svg>\n\t\t\t\t\t\t\t\t\t').concat(v("Import Layout","canvas"),"\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t"))}}),1)})),m(document).on("click",".canvas-toolbar-import-layout button",(function(t){t.preventDefault(),(0,wp.data.dispatch("core/block-editor").insertBlocks)(g("canvas/layouts"))}))}));var L=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(u,t);var e,n,o,a=l(u);function u(){var t;return i(this,u),(t=a.apply(this,arguments)).state={category:""},t.getLayouts=t.getLayouts.bind(f(t)),t}return e=u,(n=[{key:"getLayouts",value:function(){var t=this.state.category,e={};return Object.keys(y.layouts).forEach((function(n){var o=y.layouts[n];t?o.category&&o.category.indexOf(t)>-1&&(e[n]=o):e[n]=o})),e}},{key:"render",value:function(){var t=this,e=this.props,n=e.insertLayout,o=e.closeModal,a=[{label:v("--- Select Category ---","canvas"),value:""}].concat(r(Object.keys(y.categories).map((function(t){return{label:y.categories[t],value:t}})))),i=this.getLayouts();return wp.element.createElement(j,{position:"top",title:v("Layouts","canvas"),onRequestClose:function(){o()},shouldCloseOnClickOutside:!1,className:"cnvs-extension-layouts-modal"},wp.element.createElement("div",{className:"cnvs-extension-layouts-content"},a.length>1?wp.element.createElement("div",{className:"cnvs-extension-layouts-categories"},wp.element.createElement(_,{options:a,onChange:function(e){t.setState({category:e})}})):"",Object.keys(i).length?wp.element.createElement("div",{className:"cnvs-extension-layouts-count"},v("Layouts:","canvas")," ",wp.element.createElement("strong",null,Object.keys(i).length)):"",Object.keys(i).length?wp.element.createElement("div",{className:"cnvs-extension-layouts-list"},Object.keys(i).map((function(t){return wp.element.createElement("button",{key:t,onClick:function(){n(i[t].content),o()}},i[t].thumbnail?wp.element.createElement("img",{src:i[t].thumbnail}):"",wp.element.createElement("label",null,i[t].title))}))):wp.element.createElement("p",null,v("No layouts found.","canvas"))))}}])&&s(e.prototype,n),o&&s(e,o),u}(w),E=S(k((function(t,e){var n=e.clientId,o=t("core/block-editor"),r=o.replaceBlocks,a=o.removeBlock;return{closeModal:function(){a(n)},insertLayout:function(t){var e=x(t);r(n,e)}}})))(L);h("canvas/layouts",{title:v("Canvas Layouts","canvas"),description:v("Add a pre-configured layouts.","canvas"),category:"common",supports:{customClassName:!1,html:!1,inserter:!1,multiple:!1,reusable:!1},edit:E,save:function(){return null}})},113:function(t,e,n){var o=n(114);"string"==typeof o&&(o=[[t.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(3)(o,r);o.locals&&(t.exports=o.locals)},114:function(t,e,n){(t.exports=n(2)(!1)).push([t.i,'[data-type="canvas/layouts"]{display:none}.canvas-toolbar-import-layout{margin-left:5px}.canvas-toolbar-import-layout svg{margin-right:10px !important}@media (min-width: 600px){.components-modal__frame.cnvs-extension-layouts-modal{top:10%;min-width:700px;transform:translateX(-50%)}}.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-content{display:flex;flex-wrap:wrap}.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-categories{flex:50%;width:50%;margin-bottom:15px}.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-categories select{max-width:100%;width:auto}.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-count{align-self:center;text-align:right;color:#868686;flex:50%;width:50%;margin-bottom:15px}.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-list{display:flex;flex-wrap:wrap;flex:100%;width:100%;margin:-10px}.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-list>button{position:relative;width:calc(33.33% - 20px);min-width:calc(33.33% - 20px);margin:10px;cursor:pointer;border:1px solid #e3e5e8;background:none;border-radius:5px;padding:10px;padding-bottom:30px;transition:.2s border-color, .2s box-shadow}.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-list>button:hover,.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-list>button:focus{border-color:#d3d5d8;box-shadow:0 2px 10px 0 rgba(0,0,0,0.1)}.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-list>button label{position:absolute;display:block;text-align:center;color:#868686;bottom:10px;left:0;right:0}.components-modal__frame.cnvs-extension-layouts-modal .cnvs-extension-layouts-list>button img{width:100%;height:auto;margin-bottom:20px}\n',""])},2:function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var r=(i=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),a=o.sources.map((function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"}));return[n].concat(a).concat([r]).join("\n")}var i;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},r=0;r<this.length;r++){var a=this[r][0];null!=a&&(o[a]=!0)}for(r=0;r<t.length;r++){var i=t[r];null!=i[0]&&o[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},3:function(t,e,n){var o,r,a={},i=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=o.apply(this,arguments)),r}),s=function(t,e){return e?e.querySelector(t):document.querySelector(t)},c=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var o=s.call(this,t,n);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}}(),l=null,u=0,f=[],p=n(5);function d(t,e){for(var n=0;n<t.length;n++){var o=t[n],r=a[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(g(o.parts[i],e))}else{var s=[];for(i=0;i<o.parts.length;i++)s.push(g(o.parts[i],e));a[o.id]={id:o.id,refs:1,parts:s}}}}function m(t,e){for(var n=[],o={},r=0;r<t.length;r++){var a=t[r],i=e.base?a[0]+e.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};o[i]?o[i].parts.push(s):n.push(o[i]={id:i,parts:[s]})}return n}function y(t,e){var n=c(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=f[f.length-1];if("top"===t.insertAt)o?o.nextSibling?n.insertBefore(e,o.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),f.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(t.insertAt.before,n);n.insertBefore(e,r)}}function v(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=f.indexOf(t);e>=0&&f.splice(e,1)}function b(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=function(){0;return n.nc}();o&&(t.attrs.nonce=o)}return h(e,t.attrs),y(t,e),e}function h(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,o,r,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var i=u++;n=l||(l=b(e)),o=O.bind(null,n,i,!1),r=O.bind(null,n,i,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",h(e,t.attrs),y(t,e),e}(e),o=_.bind(null,n,e),r=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(e),o=j.bind(null,n),r=function(){v(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=i()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=m(t,e);return d(n,e),function(t){for(var o=[],r=0;r<n.length;r++){var i=n[r];(s=a[i.id]).refs--,o.push(s)}t&&d(m(t,e),e);for(r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete a[s.id]}}}};var x,w=(x=[],function(t,e){return x[t]=e,x.filter(Boolean).join("\n")});function O(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=w(e,r);else{var a=document.createTextNode(r),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(a,i[e]):t.appendChild(a)}}function j(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function _(t,e,n){var o=n.css,r=n.sourceMap,a=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||a)&&(o=p(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}},5:function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var r,a=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?t:(r=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:o+a.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")}))}}});