Current File : /var/www/e360ban/wp-content/plugins/wp-views/public/js/ct.block.js
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=235)}({1:function(e,t){e.exports=window.wp.components},153:function(e,t,n){},20:function(e,t,n){var o;
/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var c=typeof o;if("string"===c||"number"===c)e.push(o);else if(Array.isArray(o)&&o.length){var a=r.apply(null,o);a&&e.push(a)}else if("object"===c)for(var i in o)n.call(o,i)&&o[i]&&e.push(i)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},235:function(e,t,n){"use strict";n.r(t);var o=n(1),r={blockIcon:React.createElement(o.Icon,{className:"toolset-block-icon toolset-block-icon-content-template",icon:React.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("path",{d:"M17.4 3.3H15V1C15 0.4 14.6 0 14 0H12.7C12.1 0 11.7 0.4 11.7 1V3.3H8.30001V1C8.30001 0.4 7.90001 0 7.30001 0H6.00001C5.40001 0 5.00001 0.4 5.00001 1V3.3H2.70001C2.10001 3.3 1.70001 3.7 1.70001 4.3V19C1.70001 19.6 2.10001 20 2.70001 20H17.4C18 20 18.4 19.6 18.4 19V4.3C18.4 3.7 18 3.3 17.4 3.3ZM4.50001 6.7H15.5V10H4.50001V6.7ZM7.80001 17H4.50001V11.9H7.80001V17ZM15.5 17H9.60001V11.9H15.5V17Z",fill:"#ED793E"}))}),blockPlaceholder:React.createElement(o.Icon,{icon:React.createElement("svg",{width:"48pt",height:"53pt",viewBox:"0 0 48 53"},React.createElement("path",{d:"M41.762 8.746H36V2.648C36 1.058 35.04 0 33.602 0H30.48c-1.44 0-2.402 1.059-2.402 2.648v6.098h-8.156V2.648C19.922 1.058 18.96 0 17.52 0h-3.122C12.961 0 12 1.059 12 2.648v6.098H6.48c-1.44 0-2.402 1.059-2.402 2.649v38.957c0 1.59.961 2.648 2.402 2.648h35.282c1.437 0 2.398-1.059 2.398-2.648V11.395c0-1.59-.96-2.649-2.398-2.649zM10.8 17.754h26.398V26.5H10.801zm7.918 27.297H10.8V31.535h7.918zm18.48 0H23.04V31.535H37.2zm0 0",fill:"#444"}))})};function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=p(e);if(t){var r=p(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=wp.i18n.__,m=wp.element.Component,y=wp.components.BaseControl,b=window.toolset_ct_block_strings,v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(c,e);var t,n,o,r=u(c);function c(){return a(this,c),r.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.className,o=e.onChangeCT,r=t.ct,c=Object.values(b.publishedCTs);return void 0!==c&&c.length>0?React.createElement(y,null," ",React.createElement("select",{onChange:o,value:r,className:n},React.createElement("option",{disabled:"disabled",value:""},f("Select a Content Template","wpv-views")),c.map((function(e){return React.createElement("option",{key:e.post_name,value:e.post_name},e.post_title)})))):React.createElement(y,null,React.createElement("select",{disabled:"disabled",className:n},React.createElement("option",null,f("Create a Content Template first","wpv-views"))))}}])&&i(t.prototype,n),o&&i(t,o),c}(m);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=R(e);if(t){var r=R(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return C(this,n)}}function C(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var E=wp.i18n.__,O=wp.element.Component,k=wp.editor.InspectorControls,T=wp.components.PanelBody,S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(c,e);var t,n,o,r=_(c);function c(){return h(this,c),r.apply(this,arguments)}return t=c,(n=[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.onChangeCT,o=t.ct;return React.createElement(k,null,React.createElement(T,{title:E("Content Template","wpv-views")},React.createElement(v,{attributes:{ct:o},className:"components-select-control__input",onChangeCT:n})))}}])&&w(t.prototype,n),o&&w(t,o),c}(O),j=n(20),P=n.n(j);function H(e){return(H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=A(e);if(t){var r=A(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return D(this,n)}}function D(e,t){return!t||"object"!==H(t)&&"function"!=typeof t?I(e):t}function I(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var B=wp.i18n.__,z=wp.element.Component,L=wp.components.Spinner,Z=window.toolset_ct_block_strings,F=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(c,e);var t,n,o,r=V(c);function c(){var e;return N(this,c),(e=r.apply(this,arguments)).getCTInfo=e.getCTInfo.bind(I(e)),e.state={fetching:!1,error:!1,errorMessage:""},e}return t=c,o=[{key:"getDerivedStateFromProps",value:function(e,t){return e.attributes.ct&&void 0===t.ctPostContent&&!1===t.fetching&&(t.fetching=!0),t}}],(n=[{key:"render",value:function(){var e=this.state,t=e.fetching,n=e.error,o=e.errorMessage,r=e.ctPostContent;return t?React.createElement("div",{key:"fetching",className:P()(this.props.className)},React.createElement("div",{key:"loading",className:P()("wp-block-embed is-loading")},React.createElement(L,null),React.createElement("p",null,B("Loading the Content Template preview…","wpv-views")))):n?React.createElement("div",{key:"error",className:P()(this.props.className)},React.createElement("div",{className:P()("wpv-ct-info-warning")},o)):React.createElement("div",{className:P()(this.props.className)},React.createElement("div",{dangerouslySetInnerHTML:{__html:r}}))}},{key:"componentDidMount",value:function(){this.getCTInfo()}},{key:"componentDidUpdate",value:function(e){e.attributes.ct.post_name!==this.props.attributes.ct.post_name&&(this.setState({fetching:!0,error:!1,errorMessage:""}),this.getCTInfo(this.props.attributes.ct.post_name))}},{key:"getCTInfo",value:function(e){var t=this,n=new window.FormData;n.append("action",Z.actionName),n.append("wpnonce",Z.wpnonce),n.append("ct_post_name",void 0===e?this.props.attributes.ct.post_name:e),window.fetch(window.ajaxurl,{method:"POST",body:n,credentials:"same-origin"}).then((function(e){return e.json()})).then((function(e){var n={};if(0!==e&&e.success&&void 0!==e.data)""===e.data?(n.error=!0,n.errorMessage=B('The selected Content Template has an empty "Template" section.',"wpv-views")):n.ctPostContent=e.data;else{var o="";o=void 0!==e.data&&void 0!==e.data.message?e.data.message:B("An error occurred while trying to get the Content Template information.","wpv-views"),n.error=!0,n.errorMessage=o}n.fetching=!1,t.setState(n)}))}}])&&x(t.prototype,n),o&&x(t,o),c}(z),U=(n(153),wp.i18n),q=U.__,G=U.setLocaleData,J=wp.blocks.registerBlockType,K=wp.components.Placeholder,Q=wp.element.RawHTML,W=window.toolset_ct_block_strings;W.locale&&G(W.locale,"wpv-views"),J(W.blockName,{title:q("Content Template","wpv-views"),description:q("Add a Content Template to the editor.","wpv-views"),category:W.blockCategory,icon:r.blockIcon,keywords:[q("Toolset","wpv-views"),q("Content Template","wpv-views"),q("Shortcode","wpv-views")],supports:{align:["wide","full"]},edit:function(e){var t=function(t){e.setAttributes({ct:t.target.value})};return[!(!e.focus&&!e.isSelected)&&React.createElement(S,{key:"wpv-gutenberg-ct-block-render-inspector",attributes:{ct:e.attributes.ct},onChangeCT:t}),""===e.attributes.ct?React.createElement(K,{key:"ct-block-placeholder",className:P()("wp-block-toolset-ct")},React.createElement("div",{className:"wp-block-toolset-ct-placeholder"},r.blockPlaceholder,React.createElement("h2",null,q("Toolset Content Template","wpv-views")),React.createElement(v,{attributes:{ct:e.attributes.ct},className:P()("components-select-control__input"),onChangeCT:t}))):React.createElement(F,{key:"toolset-ct-gutenberg-block-preview",className:P()(e.className,"wp-block-toolset-ct-preview"),attributes:{ct:{post_name:e.attributes.ct}}})]},save:function(e){var t=e.attributes.ct||"";return t.length?(t=' view_template="'+t+'"',React.createElement(Q,null,"[wpv-post-body"+t+"]")):null}})}});
Page Not Found
Parece que el enlace que apuntaba aquí no sirve. ¿Quieres probar con una búsqueda?
¡Hola!