Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | Cloud Templates & Patterns collection |
Version | 1.1.8 |
Comparing to | |
See all releases |
Code changes from version 1.1.7 to 1.1.8
- CHANGELOG.md +6 -0
- README.md +9 -0
- assets/build/app.asset.php +1 -1
- assets/build/app.js +5 -5
- assets/src/Components/CloudLibrary/ImportTemplatesModal.js +2 -7
- assets/src/Components/Header.js +36 -3
- assets/src/utils/common.js +21 -1
- editor/build/index.asset.php +1 -1
- editor/build/index.js +1 -1
- editor/src/extension.js +10 -0
- elementor/build/index-rtl.css +1 -1
- elementor/build/index.asset.php +1 -1
- elementor/build/index.css +1 -1
- elementor/src/editor.scss +4 -0
- includes/Admin.php +43 -5
- includes/Editor.php +1 -0
- includes/Main.php +1 -1
- languages/templates-patterns-collection.pot +65 -56
- readme.txt +9 -0
- templates-patterns-collection.php +1 -1
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +4 -4
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.php +4 -4
- yarn.lock +50 -0
CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 1.1.7](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.6...v1.1.7) (2021-04-12)
|
2 |
|
3 |
- Rename to "Save to Templates Cloud" to "Neve Cloud"
|
1 |
+
##### [Version 1.1.8](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.7...v1.1.8) (2021-04-29)
|
2 |
+
|
3 |
+
- Decode HTML entities in title
|
4 |
+
- Improve Templates Cloud visibility
|
5 |
+
- Fix meta not saving properly
|
6 |
+
|
7 |
##### [Version 1.1.7](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.6...v1.1.7) (2021-04-12)
|
8 |
|
9 |
- Rename to "Save to Templates Cloud" to "Neve Cloud"
|
README.md
CHANGED
@@ -27,6 +27,15 @@ No account is required to access the service template collection and the privacy
|
|
27 |
|
28 |
## Changelog ##
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
##### [Version 1.1.7](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.6...v1.1.7) (2021-04-12)
|
31 |
|
32 |
- Rename to Save
|
27 |
|
28 |
## Changelog ##
|
29 |
|
30 |
+
##### [Version 1.1.8](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.7...v1.1.8) (2021-04-29)
|
31 |
+
|
32 |
+
- Decode HTML entities in title
|
33 |
+
- Improve Templates Cloud visibility
|
34 |
+
- Fix meta not saving properly
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
##### [Version 1.1.7](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.6...v1.1.7) (2021-04-12)
|
40 |
|
41 |
- Rename to Save
|
assets/build/app.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-primitives'), 'version' => '441e987a4e4fa52caf044111dc2be02b');
|
assets/build/app.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
-
(window.webpackJsonp_templates_patterns_collection=window.webpackJsonp_templates_patterns_collection||[]).push([[1],{21:function(e,t,n){}}]),function(e){function t(t){for(var r,o,i=t[0],s=t[1],l=t[2],m=0,p=[];m<i.length;m++)o=i[m],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(u&&u(t);p.length;)p.shift()();return c.push.apply(c,l||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,i=1;i<n.length;i++){var s=n[i];0!==a[s]&&(r=!1)}r&&(c.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},a={0:0},c=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var i=window.webpackJsonp_templates_patterns_collection=window.webpackJsonp_templates_patterns_collection||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var u=s;c.push([33,1]),n()}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t,n){var r=n(22),a=n(23),c=n(16),o=n(24);e.exports=function(e,t){return r(e)||a(e,t)||c(e,t)||o()}},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var o=a.apply(null,r);o&&e.push(o)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){function n(e,t,n,r,a,c,o){try{var i=e[c](o),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,c){var o=e.apply(t,r);function i(e){n(o,a,c,i,s,"next",e)}function s(e){n(o,a,c,i,s,"throw",e)}i(void 0)}))}}},function(e,t,n){"use strict";const r=n(30),a=n(31),c=n(32);function o(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function i(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function s(e,t){return t.decode?a(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){o((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const a="string"==typeof n&&n.includes(e.arrayFormatSeparator),c="string"==typeof n&&!a&&s(n,e).includes(e.arrayFormatSeparator);n=c?s(n,e):n;const o=a||c?n.split(e.arrayFormatSeparator).map(t=>s(t,e)):null===n?n:s(n,e);r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const a of e.split("&")){let[e,o]=c(t.decode?a.replace(/\+/g," "):a,"=");o=void 0===o?null:["comma","separator"].includes(t.arrayFormat)?o:s(o,t),n(s(e,t),o,r)}for(const e of Object.keys(r)){const n=r[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=m(n[e],t);else r[e]=m(n,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=u,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";o((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const a=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[i(t,e),"[",a,"]"].join("")]:[...n,[i(t,e),"[",i(a,e),"]=",i(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[i(t,e),"[]"].join("")]:[...n,[i(t,e),"[]=",i(r,e)].join("")];case"comma":case"separator":return t=>(n,r)=>null==r||0===r.length?n:0===n.length?[[i(t,e),"=",i(r,e)].join("")]:[[n,i(r,e)].join(e.arrayFormatSeparator)];default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,i(t,e)]:[...n,[i(t,e),"=",i(r,e)].join("")]}}(t),a={};for(const t of Object.keys(e))n(t)||(a[t]=e[t]);const c=Object.keys(a);return!1!==t.sort&&c.sort(t.sort),c.map(n=>{const a=e[n];return void 0===a?"":null===a?i(n,t):Array.isArray(a)?a.reduce(r(n),[]).join("&"):i(n,t)+"="+i(a,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=c(e,"#");return Object.assign({url:n.split("?")[0]||"",query:p(u(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:s(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=l(e.url).split("?")[0]||"",a=t.extract(e.url),c=t.parse(a,{sort:!1}),o=Object.assign(c,e.query);let s=t.stringify(o,n);s&&(s="?"+s);let u=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u="#"+i(e.fragmentIdentifier,n)),`${r}${s}${u}`}},function(e,t,n){var r=n(25),a=n(26),c=n(16),o=n(27);e.exports=function(e){return r(e)||a(e)||c(e)||o()}},function(e,t){e.exports=window.wp.apiFetch},,function(e,t,n){var r;r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},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=4)}([function(e,t,n){e.exports=n(5)()},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=function(e,t,n){var r=e.direction,a=e.value;switch(r){case"top":return n.top+a<t.top&&n.bottom>t.bottom&&n.left<t.left&&n.right>t.right;case"left":return n.left+a<t.left&&n.bottom>t.bottom&&n.top<t.top&&n.right>t.right;case"bottom":return n.bottom-a>t.bottom&&n.left<t.left&&n.right>t.right&&n.top<t.top;case"right":return n.right-a>t.right&&n.left<t.left&&n.top<t.top&&n.bottom>t.bottom}}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(1),a=n.n(r),c=n(2),o=n.n(c),i=n(0),s=n.n(i),l=n(3),u=n.n(l);function m(e){return(m="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 p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){function t(e){var n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this,r=b(t).call(this,e),n=!r||"object"!==m(r)&&"function"!=typeof r?d(this):r,h(d(n),"getContainer",(function(){return n.props.containment||window})),h(d(n),"addEventListener",(function(e,t,r,a){var c;n.debounceCheck||(n.debounceCheck={});var o=function(){c=null,n.check()},i={target:e,fn:a>-1?function(){c||(c=setTimeout(o,a||0))}:function(){clearTimeout(c),c=setTimeout(o,r||0)},getLastTimeout:function(){return c}};e.addEventListener(t,i.fn),n.debounceCheck[t]=i})),h(d(n),"startWatching",(function(){n.debounceCheck||n.interval||(n.props.intervalCheck&&(n.interval=setInterval(n.check,n.props.intervalDelay)),n.props.scrollCheck&&n.addEventListener(n.getContainer(),"scroll",n.props.scrollDelay,n.props.scrollThrottle),n.props.resizeCheck&&n.addEventListener(window,"resize",n.props.resizeDelay,n.props.resizeThrottle),!n.props.delayedCall&&n.check())})),h(d(n),"stopWatching",(function(){if(n.debounceCheck)for(var e in n.debounceCheck)if(n.debounceCheck.hasOwnProperty(e)){var t=n.debounceCheck[e];clearTimeout(t.getLastTimeout()),t.target.removeEventListener(e,t.fn),n.debounceCheck[e]=null}n.debounceCheck=null,n.interval&&(n.interval=clearInterval(n.interval))})),h(d(n),"check",(function(){var e,t,r=n.node;if(!r)return n.state;if(e=function(e){return void 0===e.width&&(e.width=e.right-e.left),void 0===e.height&&(e.height=e.bottom-e.top),e}(n.roundRectDown(r.getBoundingClientRect())),n.props.containment){var a=n.props.containment.getBoundingClientRect();t={top:a.top,left:a.left,bottom:a.bottom,right:a.right}}else t={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var c=n.props.offset||{};"object"===m(c)&&(t.top+=c.top||0,t.left+=c.left||0,t.bottom-=c.bottom||0,t.right-=c.right||0);var o={top:e.top>=t.top,left:e.left>=t.left,bottom:e.bottom<=t.bottom,right:e.right<=t.right},i=e.height>0&&e.width>0,s=i&&o.top&&o.left&&o.bottom&&o.right;if(i&&n.props.partialVisibility){var l=e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left;"string"==typeof n.props.partialVisibility&&(l=o[n.props.partialVisibility]),s=n.props.minTopValue?l&&e.top<=t.bottom-n.props.minTopValue:l}"string"==typeof c.direction&&"number"==typeof c.value&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",c.direction,c.value),s=u()(c,e,t));var p=n.state;return n.state.isVisible!==s&&(p={isVisible:s,visibilityRect:o},n.setState(p),n.props.onChange&&n.props.onChange(s)),p})),n.state={isVisible:null,visibilityRect:{}},n}var n,r;return 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&&f(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.node=o.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(e){this.node=o.a.findDOMNode(this),this.props.active&&!e.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(e){return{top:Math.floor(e.top),left:Math.floor(e.left),bottom:Math.floor(e.bottom),right:Math.floor(e.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):a.a.Children.only(this.props.children)}}])&&p(n.prototype,r),t}(a.a.Component);h(g,"defaultProps",{active:!0,partialVisibility:!1,minTopValue:0,scrollCheck:!1,scrollDelay:250,scrollThrottle:-1,resizeCheck:!1,resizeDelay:250,resizeThrottle:-1,intervalCheck:!0,intervalDelay:100,delayedCall:!1,offset:{},containment:null,children:a.a.createElement("span",null)}),h(g,"propTypes",{onChange:s.a.func,active:s.a.bool,partialVisibility:s.a.oneOfType([s.a.bool,s.a.oneOf(["top","right","bottom","left"])]),delayedCall:s.a.bool,offset:s.a.oneOfType([s.a.shape({top:s.a.number,left:s.a.number,bottom:s.a.number,right:s.a.number}),s.a.shape({direction:s.a.oneOf(["top","right","bottom","left"]),value:s.a.number})]),scrollCheck:s.a.bool,scrollDelay:s.a.number,scrollThrottle:s.a.number,resizeCheck:s.a.bool,resizeDelay:s.a.number,resizeThrottle:s.a.number,intervalCheck:s.a.bool,intervalDelay:s.a.number,containment:"undefined"!=typeof window?s.a.instanceOf(window.Element):s.a.any,children:s.a.oneOfType([s.a.element,s.a.func]),minTopValue:s.a.number})},function(e,t,n){"use strict";var r=n(6);function a(){}function c(){}c.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,c,o){if(o!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])},e.exports=r(n(28),n(29))},function(e,t,n){var r=n(17);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=window.wp.keycodes},function(e,t,n){var r;r=function(){"use strict";function e(t){return(e="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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(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&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return!t||"object"!=typeof 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 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,r=s(e);if(t){var a=s(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return l(this,n)}}function m(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e)||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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e){return Array.isArray?Array.isArray(e):"[object Array]"===v(e)}function d(e){return"string"==typeof e}function f(e){return"number"==typeof e}function h(t){return"object"===e(t)}function g(e){return null!=e}function O(e){return!e.trim().length}function v(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var j=function(e){return"Invalid value for key ".concat(e)},y=function(e){return"Pattern length exceeds max of ".concat(e,".")},E=Object.prototype.hasOwnProperty,_=function(){function e(n){var r=this;t(this,e),this._keys=[],this._keyMap={};var a=0;n.forEach((function(e){var t=w(e);a+=t.weight,r._keys.push(t),r._keyMap[t.id]=t,a+=t.weight})),this._keys.forEach((function(e){e.weight/=a}))}return r(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function w(e){var t=null,n=null,r=null,a=1;if(d(e)||b(e))r=e,t=S(e),n=k(e);else{if(!E.call(e,"name"))throw new Error("Missing ".concat("name"," property in key"));var c=e.name;if(r=c,E.call(e,"weight")&&(a=e.weight)<=0)throw new Error(function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")}(c));t=S(c),n=k(c)}return{path:t,id:n,weight:a,src:r}}function S(e){return b(e)?e:e.split(".")}function k(e){return b(e)?e.join("."):e}var C=o({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,a,c){if(g(t))if(a[c]){var o=t[a[c]];if(!g(o))return;if(c===a.length-1&&(d(o)||f(o)||function(e){return!0===e||!1===e||function(e){return h(e)&&null!==e}(e)&&"[object Boolean]"==v(e)}(o)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(o));else if(b(o)){r=!0;for(var i=0,s=o.length;i<s;i+=1)e(o[i],a,c+1)}else a.length&&e(o,a,c+1)}else n.push(t)}(e,d(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}),N=/[^ ]+/g;function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map,n=Math.pow(10,e);return{get:function(e){var r=e.match(N).length;if(t.has(r))return t.get(r);var a=1/Math.sqrt(r),c=parseFloat(Math.round(a*n)/n);return t.set(r,c),c},clear:function(){t.clear()}}}var M=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,a=void 0===r?C.getFn:r;t(this,e),this.norm=T(3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}return r(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,d(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();d(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(g(e)&&!O(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,a){var c=n.getFn(e,t.path);if(g(c))if(b(c))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:c}];t.length;){var o=t.pop(),i=o.nestedArrIndex,s=o.value;if(g(s))if(d(s)&&!O(s)){var l={v:s,i:i,n:n.norm.get(s)};e.push(l)}else b(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[a]=e}();else if(!O(c)){var o={v:c,n:n.norm.get(c)};r.$[a]=o}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,a=void 0===r?C.getFn:r,c=new M({getFn:a});return c.setKeys(e.map(w)),c.setSources(t),c.create(),c}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,a=t.currentLocation,c=void 0===a?0:a,o=t.expectedLocation,i=void 0===o?0:o,s=t.distance,l=void 0===s?C.distance:s,u=t.ignoreLocation,m=void 0===u?C.ignoreLocation:u,p=r/e.length;if(m)return p;var b=Math.abs(i-c);return l?p+b/l:b?1:p}function D(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C.minMatchCharLength,n=[],r=-1,a=-1,c=0,o=e.length;c<o;c+=1){var i=e[c];i&&-1===r?r=c:i||-1===r||((a=c-1)-r+1>=t&&n.push([r,a]),r=-1)}return e[c-1]&&c-r>=t&&n.push([r,c-1]),n}function I(e){for(var t={},n=0,r=e.length;n<r;n+=1){var a=e.charAt(n);t[a]=(t[a]||0)|1<<r-n-1}return t}var L=function(){function e(n){var r=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=a.location,o=void 0===c?C.location:c,i=a.threshold,s=void 0===i?C.threshold:i,l=a.distance,u=void 0===l?C.distance:l,m=a.includeMatches,p=void 0===m?C.includeMatches:m,b=a.findAllMatches,d=void 0===b?C.findAllMatches:b,f=a.minMatchCharLength,h=void 0===f?C.minMatchCharLength:f,g=a.isCaseSensitive,O=void 0===g?C.isCaseSensitive:g,v=a.ignoreLocation,j=void 0===v?C.ignoreLocation:v;if(t(this,e),this.options={location:o,threshold:s,distance:u,includeMatches:p,findAllMatches:d,minMatchCharLength:h,isCaseSensitive:O,ignoreLocation:j},this.pattern=O?n:n.toLowerCase(),this.chunks=[],this.pattern.length){var y=function(e,t){r.chunks.push({pattern:e,alphabet:I(e),startIndex:t})},E=this.pattern.length;if(E>32){for(var _=0,w=E%32,S=E-w;_<S;)y(this.pattern.substr(_,32),_),_+=32;if(w){var k=E-32;y(this.pattern.substr(k),k)}}else y(this.pattern,0)}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var a={isMatch:!0,score:0};return r&&(a.indices=[[0,e.length-1]]),a}var c=this.options,o=c.location,i=c.distance,s=c.threshold,l=c.findAllMatches,u=c.minMatchCharLength,p=c.ignoreLocation,b=[],d=0,f=!1;this.chunks.forEach((function(t){var n=t.pattern,a=t.alphabet,c=t.startIndex,h=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=r.location,c=void 0===a?C.location:a,o=r.distance,i=void 0===o?C.distance:o,s=r.threshold,l=void 0===s?C.threshold:s,u=r.findAllMatches,m=void 0===u?C.findAllMatches:u,p=r.minMatchCharLength,b=void 0===p?C.minMatchCharLength:p,d=r.includeMatches,f=void 0===d?C.includeMatches:d,h=r.ignoreLocation,g=void 0===h?C.ignoreLocation:h;if(t.length>32)throw new Error(y(32));for(var O,v=t.length,j=e.length,E=Math.max(0,Math.min(c,j)),_=l,w=E,S=b>1||f,k=S?Array(j):[];(O=e.indexOf(t,w))>-1;){var N=P(t,{currentLocation:O,expectedLocation:E,distance:i,ignoreLocation:g});if(_=Math.min(N,_),w=O+v,S)for(var T=0;T<v;)k[O+T]=1,T+=1}w=-1;for(var M=[],x=1,I=v+j,L=1<<v-1,B=0;B<v;B+=1){for(var A=0,R=I;A<R;){var F=P(t,{errors:B,currentLocation:E+R,expectedLocation:E,distance:i,ignoreLocation:g});F<=_?A=R:I=R,R=Math.floor((I-A)/2+A)}I=R;var z=Math.max(1,E-R+1),U=m?j:Math.min(E+R,j)+v,V=Array(U+2);V[U+1]=(1<<B)-1;for(var $=U;$>=z;$-=1){var H=$-1,G=n[e.charAt(H)];if(S&&(k[H]=+!!G),V[$]=(V[$+1]<<1|1)&G,B&&(V[$]|=(M[$+1]|M[$])<<1|1|M[$+1]),V[$]&L&&(x=P(t,{errors:B,currentLocation:H,expectedLocation:E,distance:i,ignoreLocation:g}))<=_){if(_=x,(w=H)<=E)break;z=Math.max(1,2*E-w)}}var W=P(t,{errors:B+1,currentLocation:E,expectedLocation:E,distance:i,ignoreLocation:g});if(W>_)break;M=V}var q={isMatch:w>=0,score:Math.max(.001,x)};if(S){var Q=D(k,b);Q.length?f&&(q.indices=Q):q.isMatch=!1}return q}(e,n,a,{location:o+c,distance:i,threshold:s,findAllMatches:l,minMatchCharLength:u,includeMatches:r,ignoreLocation:p}),g=h.isMatch,O=h.score,v=h.indices;g&&(f=!0),d+=O,g&&v&&(b=[].concat(m(b),m(v)))}));var h={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(h.indices=b),h}}]),e}(),B=function(){function e(n){t(this,e),this.pattern=n}return r(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return A(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return A(e,this.singleRegex)}}]),e}();function A(e,t){var n=e.match(t);return n?n[1]:null}var R=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),a}(B),F=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),a}(B),z=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),a}(B),U=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),a}(B),V=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),a}(B),$=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),a}(B),H=function(e){i(a,e);var n=u(a);function a(e){var r,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=c.location,i=void 0===o?C.location:o,s=c.threshold,l=void 0===s?C.threshold:s,u=c.distance,m=void 0===u?C.distance:u,p=c.includeMatches,b=void 0===p?C.includeMatches:p,d=c.findAllMatches,f=void 0===d?C.findAllMatches:d,h=c.minMatchCharLength,g=void 0===h?C.minMatchCharLength:h,O=c.isCaseSensitive,v=void 0===O?C.isCaseSensitive:O,j=c.ignoreLocation,y=void 0===j?C.ignoreLocation:j;return t(this,a),(r=n.call(this,e))._bitapSearch=new L(e,{location:i,threshold:l,distance:m,includeMatches:b,findAllMatches:f,minMatchCharLength:g,isCaseSensitive:v,ignoreLocation:y}),r}return r(a,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),a}(B),G=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){for(var t,n=0,r=[],a=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+a,r.push([t,n-1]);var c=!!r.length;return{isMatch:c,score:c?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),a}(B),W=[R,G,z,U,$,V,F,H],q=W.length,Q=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function J(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(Q).filter((function(e){return e&&!!e.trim()})),r=[],a=0,c=n.length;a<c;a+=1){for(var o=n[a],i=!1,s=-1;!i&&++s<q;){var l=W[s],u=l.isMultiMatch(o);u&&(r.push(new l(u,t)),i=!0)}if(!i)for(s=-1;++s<q;){var m=W[s],p=m.isSingleMatch(o);if(p){r.push(new m(p,t));break}}}return r}))}var Y=new Set([H.type,G.type]),K=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.isCaseSensitive,c=void 0===a?C.isCaseSensitive:a,o=r.includeMatches,i=void 0===o?C.includeMatches:o,s=r.minMatchCharLength,l=void 0===s?C.minMatchCharLength:s,u=r.ignoreLocation,m=void 0===u?C.ignoreLocation:u,p=r.findAllMatches,b=void 0===p?C.findAllMatches:p,d=r.location,f=void 0===d?C.location:d,h=r.threshold,g=void 0===h?C.threshold:h,O=r.distance,v=void 0===O?C.distance:O;t(this,e),this.query=null,this.options={isCaseSensitive:c,includeMatches:i,minMatchCharLength:l,findAllMatches:b,ignoreLocation:m,location:f,threshold:g,distance:v},this.pattern=c?n:n.toLowerCase(),this.query=J(this.pattern,this.options)}return r(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var a=0,c=[],o=0,i=0,s=t.length;i<s;i+=1){var l=t[i];c.length=0,a=0;for(var u=0,p=l.length;u<p;u+=1){var b=l[u],d=b.search(e),f=d.isMatch,h=d.indices,g=d.score;if(!f){o=0,a=0,c.length=0;break}if(a+=1,o+=g,r){var O=b.constructor.type;Y.has(O)?c=[].concat(m(c),m(h)):c.push(h)}}if(a){var v={isMatch:!0,score:o/a};return r&&(v.indices=c),v}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),Z=[];function X(e,t){for(var n=0,r=Z.length;n<r;n+=1){var a=Z[n];if(a.condition(e,t))return new a(e,t)}return new L(e,t)}var ee="$and",te="$path",ne=function(e){return!(!e[ee]&&!e.$or)},re=function(e){return!!e[te]},ae=function(e){return!b(e)&&h(e)&&!ne(e)},ce=function(e){return a({},ee,Object.keys(e).map((function(t){return a({},t,e[t])})))};function oe(e,t){var n=t.ignoreFieldNorm,r=void 0===n?C.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,a=e.norm,c=e.score,o=n?n.weight:null;t*=Math.pow(0===c&&o?Number.EPSILON:c,(o||1)*(r?1:a))})),e.score=t}))}function ie(e,t){var n=e.matches;t.matches=[],g(n)&&n.forEach((function(e){if(g(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function se(e,t){t.score=e.score}function le(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,a=void 0===r?C.includeMatches:r,c=n.includeScore,o=void 0===c?C.includeScore:c,i=[];return a&&i.push(ie),o&&i.push(se),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return i.length&&i.forEach((function(t){t(e,r)})),r}))}var ue=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=o({},C,{},r),this.options.useExtendedSearch,this._keyStore=new _(this.options.keys),this.setCollection(n,a)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof M))throw new Error("Incorrect 'index' type");this._myIndex=t||x(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){g(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var a=this._docs[n];e(a,n)&&(this.removeAt(n),n-=1,r-=1,t.push(a))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,a=this.options,c=a.includeMatches,o=a.includeScore,i=a.shouldSort,s=a.sortFn,l=a.ignoreFieldNorm,u=d(e)?d(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return oe(u,{ignoreFieldNorm:l}),i&&u.sort(s),f(r)&&r>-1&&(u=u.slice(0,r)),le(u,this._docs,{includeMatches:c,includeScore:o})}},{key:"_searchStringList",value:function(e){var t=X(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,a=e.i,c=e.n;if(g(n)){var o=t.searchIn(n),i=o.isMatch,s=o.score,l=o.indices;i&&r.push({item:n,idx:a,matches:[{score:s,value:n,norm:c,indices:l}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,a=void 0===r||r,c=function e(n){var r=Object.keys(n),c=re(n);if(!c&&r.length>1&&!ne(n))return e(ce(n));if(ae(n)){var o=c?n[te]:r[0],i=c?n.$val:n[o];if(!d(i))throw new Error(j(o));var s={keyId:k(o),pattern:i};return a&&(s.searcher=X(i,t)),s}var l={children:[],operator:r[0]};return r.forEach((function(t){var r=n[t];b(r)&&r.forEach((function(t){l.children.push(e(t))}))})),l};return ne(e)||(e=ce(e)),c(e)}(e,this.options),r=this._myIndex.records,a={},c=[];return r.forEach((function(e){var r=e.$,o=e.i;if(g(r)){var i=function e(n,r,a){if(!n.children){var c=n.keyId,o=n.searcher,i=t._findMatches({key:t._keyStore.get(c),value:t._myIndex.getValueForItemAtKeyId(r,c),searcher:o});return i&&i.length?[{idx:a,item:r,matches:i}]:[]}switch(n.operator){case ee:for(var s=[],l=0,u=n.children.length;l<u;l+=1){var p=e(n.children[l],r,a);if(!p.length)return[];s.push.apply(s,m(p))}return s;case"$or":for(var b=[],d=0,f=n.children.length;d<f;d+=1){var h=e(n.children[d],r,a);if(h.length){b.push.apply(b,m(h));break}}return b}}(n,r,o);i.length&&(a[o]||(a[o]={idx:o,item:r,matches:[]},c.push(a[o])),i.forEach((function(e){var t,n=e.matches;(t=a[o].matches).push.apply(t,m(n))})))}})),c}},{key:"_searchObjectList",value:function(e){var t=this,n=X(e,this.options),r=this._myIndex,a=r.keys,c=r.records,o=[];return c.forEach((function(e){var r=e.$,c=e.i;if(g(r)){var i=[];a.forEach((function(e,a){i.push.apply(i,m(t._findMatches({key:e,value:r[a],searcher:n})))})),i.length&&o.push({idx:c,item:r,matches:i})}})),o}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!g(n))return[];var a=[];if(b(n))n.forEach((function(e){var n=e.v,c=e.i,o=e.n;if(g(n)){var i=r.searchIn(n),s=i.isMatch,l=i.score,u=i.indices;s&&a.push({score:l,key:t,value:n,idx:c,norm:o,indices:u})}}));else{var c=n.v,o=n.n,i=r.searchIn(c),s=i.isMatch,l=i.score,u=i.indices;s&&a.push({score:l,key:t,value:c,norm:o,indices:u})}return a}}]),e}();return ue.version="6.4.6",ue.createIndex=x,ue.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?C.getFn:n,a=e.keys,c=e.records,o=new M({getFn:r});return o.setKeys(a),o.setIndexRecords(c),o},ue.config=C,function(){Z.push.apply(Z,arguments)}(K),ue},e.exports=r()},,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,c=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(a)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(17);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=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(e,t){e.exports=window.React},function(e,t){e.exports=window.ReactDOM},function(e,t,n){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),a=new RegExp("(%[a-f0-9]{2})+","gi");function c(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],c(n),c(r))}function o(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=c(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=a.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=o(n[0]);r!==n[0]&&(t[n[0]]=r)}n=a.exec(e)}t["%C2"]="�";for(var c=Object.keys(t),i=0;i<c.length;i++){var s=c[i];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}}},function(e,t,n){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){"use strict";n.r(t);var r=n(0),a=(n(21),n(9)),c=n.n(a);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=tiobDash,l=s.onboarding,u=s.themeAction,m=void 0!==l.sites&&void 0!==l.sites.sites?Object.keys(l.sites.sites)[0]:"gutenberg",p=localStorage.getItem("neve-onboarding-editor")||m,b={sites:l.sites||{},editor:p,category:"all",previewStatus:!1,importModalStatus:!1,installModalStatus:!1,currentSite:null,importing:!1,isOnboarding:l.onboarding||!1,migrationData:null,themeAction:u,currentTab:"starterSites",fetching:!1,singleTemplateImport:null,templateModal:null,searchQuery:""},d={refreshSites:function(e){return{type:"REFRESH_SITES",payload:{sites:e}}},setCurrentEditor:function(e){return{type:"SET_CURRENT_EDITOR",payload:{editor:e}}},setCurrentCategory:function(e){return{type:"SET_CURRENT_CATEGORY",payload:{category:e}}},setCurrentSite:function(e){return{type:"SET_FOCUSED_SITE",payload:{siteData:e}}},setPreviewStatus:function(e){return e?document.body.classList.add("ob-overflow-off"):document.body.classList.remove("ob-overflow-off"),{type:"SET_PREVIEW_STATUS",payload:{previewStatus:e}}},setImportModalStatus:function(e){return e?document.body.classList.add("ob-overflow-off"):document.body.classList.remove("ob-overflow-off"),{type:"SET_IMPORT_MODAL_STATUS",payload:{importModalStatus:e}}},setInstallModalStatus:function(e){return e?document.body.classList.add("ob-overflow-off"):document.body.classList.remove("ob-overflow-off"),{type:"SET_INSTALL_MODAL_STATUS",payload:{installModalStatus:e}}},setOnboardingState:function(e){return{type:"SET_ONBOARDING",payload:{state:e}}},setThemeAction:function(e){return{type:"SET_THEME_ACTIONS",payload:{themeActions:e}}},setCurrentTab:function(e){return{type:"SET_CURRENT_TAB",payload:{currentTab:e}}},setFetching:function(e){return{type:"SET_FETCHING",payload:{fetching:e}}},setSingleTemplateImport:function(e){return{type:"SET_SINGLE_TEMPLATE_IMPORT",payload:{slug:e}}},setTemplateModal:function(e){return{type:"SET_TEMPLATE_MODAL",payload:{data:e}}},setSearchQuery:function(e){return{type:"SET_SEARCH_QUERY",payload:{query:e}}}},f=n(4),h=n(6),g=n.n(h),O=n(8),v=n(3),j=n.n(v),y=n(2),E=n(1),_=n(7),w=n.n(_),S=n(10),k=n.n(S),C=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return T(e,n,t)},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return T(e,t,{},"GET",n)},T=function(){var e=k()(w.a.mark((function e(t){var n,r,a,c,o,i=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]&&i[1],r=i.length>2&&void 0!==i[2]?i[2]:{},a=i.length>3&&void 0!==i[3]?i[3]:"POST",c=!(i.length>4&&void 0!==i[4])||i[4],o={method:a,headers:{Accept:"application/json","Content-Type":"application/json"}},c&&(o.headers["x-wp-nonce"]=tiobDash.nonce),"POST"===a&&(o.body=JSON.stringify(r)),e.next=9,fetch(t,o).then((function(e){return n?e:e.json()}));case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P,D=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getSingleImport;return{themeData:(0,t.getThemeAction)()||!1,singleImport:n()}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setImportModalStatus,r=t.setInstallModalStatus,a=t.setThemeAction,c=t.setTemplateModal;return{setImportModal:function(e){return n(e)},setInstallModal:function(e){return r(e)},setThemeAction:function(e){return a(e)},showTemplateModal:function(){return c(!0)}}})))((function(e){var t=e.setImportModal,n=e.setInstallModal,a=e.themeData,c=e.setThemeAction,o=e.singleImport,i=e.showTemplateModal,s=a.action,l=a.slug,u=a.nonce,m=tiobDash,p=m.themesURL,b=m.brandedTheme,d=Object(r.useState)(!1),f=j()(d,2),h=f[0],g=f[1],O=Object(r.useState)(null),v=j()(O,2),_=v[0],w=v[1],S=function(){n(!1)},k=function(e){g(!1),w(Object(E.sprintf)(// translators: %s: Error message.
|
2 |
-
Object(E.__)("An error has ocurred: %s","templates-patterns-collection"),e))},C=function(){g("activating");var e="".concat(p,"?action=activate&stylesheet=").concat(l,"&_wpnonce=").concat(u);N(e,!0).then((function(e){return 200!==e.status?(k(Object(E.__)("Could not activate theme.","templates-patterns-collection")),g(!1),!1):(g(!1),n(!1),c(!1),o?(i(),!1):void t(!0))}))};return Object(r.createElement)(y.Modal,{className:"ob-import-modal install-modal",title:Object(E.__)("Install and Activate Neve","templates-patterns-collection"),onRequestClose:S,shouldCloseOnClickOutside:!h,isDismissible:!h},Object(r.createElement)("div",{className:"modal-body",style:{textAlign:"center"}},!b&&Object(r.createElement)("img",{style:{width:75},src:"".concat(tiobDash.assets,"/img/logo.svg"),alt:Object(E.__)("Logo","templates-patterns-collection")}),_&&Object(r.createElement)("div",{className:"well error",style:{margin:"20px 0"}},_),Object(r.createElement)("p",{style:{lineHeight:1.6,fontSize:"15px"}},Object(E.__)("In order to import the starter site, Neve theme has to be installed and activated. Click the button below to install and activate Neve","templates-patterns-collection"))),Object(r.createElement)("div",{className:"modal-footer",style:{justifyContent:"center"}},Object(r.createElement)("div",{className:"actions",style:{display:"flex"}},!_&&Object(r.createElement)(y.Button,{dismiss:_,isPrimary:!0,disabled:h,className:h&&"is-loading",icon:h&&"update",onClick:"install"===s?function(){g("installing"),wp.updates.installTheme({slug:"neve",success:function(){c(x(x({},a),{},{action:"activate"})),C()},error:function(e){c(x(x({},a),{},{action:"activate"})),k(e.errorMessage||Object(E.__)("Could not install theme.","templates-patterns-collection"))}})}:C},h&&("installing"===h?Object(E.__)("Installing"):Object(E.__)("Activating")),!h&&("install"===s?Object(E.__)("Install and Activate","templates-patterns-collection"):Object(E.__)("Activate","templates-patterns-collection"))),Object(r.createElement)(y.Button,{style:{marginLeft:30},isSecondary:!0,disabled:h,onClick:S},Object(E.__)("Close","templates-patterns-collection")))))})),I=tiobDash.onboarding,L=function(e){return C(I.root+"/install_plugins",e)},B=function(){var e=k()(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={},t.forEach((function(e){"elementor"===e.template_type?n.elementor=!0:"beaver"===e.template_type&&(n["beaver-builder-lite-version"]=!0)})),!(Object.keys(n).length>0)){e.next=11;break}return e.prev=3,e.next=6,L(n);case 6:e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(3),e.abrupt("return",error);case 11:return e.abrupt("return",C(I.root+"/import_single_templates",t));case 12:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(t){return e.apply(this,arguments)}}(),A=function(e){var t=e.data,n=e.externalInstalled,a=t.external_plugins||null,c=g()(["well"]);return Object(r.createElement)("div",{className:c},a&&!n&&Object(r.createElement)("h3",{style:{marginTop:15}},Object(r.createElement)(y.Dashicon,{icon:"info"}),Object(r.createElement)("span",null,Object(E.__)("To import this demo you have to install the following plugins","neve"))),Object(r.createElement)("ul",null,a&&!n?a.map((function(e,t){return Object(r.createElement)("li",{key:t},Object(r.createElement)(y.Button,{isLink:!0,href:e.author_url},e.name))})):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("li",null,Object(E.__)("We recommend you backup your website content before attempting a full site import.","neve")),Object(r.createElement)("li",null,Object(E.__)("Some of the demo images will not be imported and will be replaced by placeholder images.","neve")))))},R=function(e){var t=e.message,n=e.code;return Object(r.createElement)("div",{className:"well error"},t&&Object(r.createElement)("h3",null,Object(r.createElement)(y.Dashicon,{icon:"warning"}),Object(r.createElement)("span",null,t)),Object(r.createElement)("ul",null,Object(r.createElement)("li",{dangerouslySetInnerHTML:{__html:tiobDash.onboarding.i18n.troubleshooting}}),Object(r.createElement)("li",{dangerouslySetInnerHTML:{__html:tiobDash.onboarding.i18n.support}}),n&&Object(r.createElement)("li",null,Object(E.__)("Error code","templates-patterns-collection"),":"," ",Object(r.createElement)("code",null,n)),Object(r.createElement)("li",null,Object(E.__)("Error log","templates-patterns-collection"),":"," ",Object(r.createElement)(y.Button,{isLink:!0,href:tiobDash.onboarding.logUrl},tiobDash.onboarding.logUrl,Object(r.createElement)(y.Dashicon,{icon:"external"})))))},F=function(e){var t=e.data,n=function(e){return console.log(e)},a=Object(r.useState)(!1),c=j()(a,2),o=c[0],i=c[1],s=Object(r.useState)(!1),l=j()(s,2),u=l[0],m=l[1],p=Object(r.useState)(!1),b=j()(p,2),d=b[0],f=b[1],h=Object(r.useState)(null),g=j()(h,2),O=g[0],v=g[1],_=Object(r.useState)(null),w=j()(_,2),S=w[0],k=w[1];if(o)return null;var N=function(){"done"===d&&i(!0),m(!1),v(null),f(!1)};return Object(r.createElement)("div",{className:"ob-migration"},u&&Object(r.createElement)(y.Modal,{className:"ob-import-modal migration",title:Object(E.__)("Migrate","templates-patterns-collection")+" "+t.theme_name,onRequestClose:N,shouldCloseOnClickOutside:!d,isDismissible:!d},Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},O&&Object(r.createElement)(R,{message:O.message||null,code:O.code||null}),!1===d&&!O&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(A,{data:t}),t.mandatory_plugins&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("hr",null),Object(r.createElement)("h3",null,Object(E.__)("The following plugins will be installed","neve"),":"),Object(r.createElement)("ul",null,Object.keys(t.mandatory_plugins).map((function(e,n){return Object(r.createElement)("li",{key:n},"-"," ",t.mandatory_plugins[e])}))))),"done"===d&&Object(r.createElement)("p",{className:"import-result"},Object(E.__)("Content was successfully imported. Enjoy your new site!","neve")),!0===d&&Object(r.createElement)("div",{className:"loading"},Object(r.createElement)(y.Dashicon,{icon:"update",size:50}),Object(r.createElement)("h3",null,Object(E.__)("Migrating","templates-patterns-collection"),"..."))),(!d||"done"===d)&&Object(r.createElement)("div",{className:"modal-footer"},Object(r.createElement)(y.Button,{isSecondary:"done"!==d,isLink:"done"===d,className:"done"===d?"close":null,onClick:N},"done"===d?Object(E.__)("Close","templates-patterns-collection"):Object(E.__)("Cancel","templates-patterns-collection")),O||"done"===d?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{style:{marginLeft:20},isSecondary:!0,href:"".concat(tiobDash.onboarding.homeUrl,"/wp-admin/post.php?post=").concat(S,"&action=elementor")},Object(E.__)("Edit Content","templates-patterns-collection")),Object(r.createElement)(y.Button,{isPrimary:!0,href:tiobDash.onboarding.homeUrl},Object(E.__)("View Website","templates-patterns-collection"))):Object(r.createElement)(y.Button,{isPrimary:!0,onClick:function(){var e;e=Object.keys(t.mandatory_plugins).reduce((function(e,t){return e[t]=!0,e}),{}),L(e).then((function(e){if(f(!0),!e.success)return v({code:e.data||null,message:Object(E.__)("Something went wrong while installing the necessary plugins.","neve")}),f(!1),!1;var n=t.template,r=t.template_name;C(tiobDash.onboarding.root+"/migrate_frontpage",{template:n,template_name:r}).then((function(e){if(!e.success)return v({code:e.data||null,message:Object(E.__)("Something went wrong while importing the website content.","neve")}),f(!1),!1;k(e.data),f("done")}))}))}},Object(E.__)("Start Migration","templates-patterns-collection"))))),Object(r.createElement)("h2",null,t.heading),Object(r.createElement)("p",null,t.description),Object(r.createElement)("div",{className:"card starter-site-card",style:{maxWidth:330}},Object(r.createElement)("div",{className:"top"},t.screenshot&&Object(r.createElement)("div",{className:"image"},Object(r.createElement)("img",{src:t.screenshot,alt:t.theme_name}))),Object(r.createElement)("div",{className:"bottom"},Object(r.createElement)("p",{className:"title"},t.theme_name))),Object(r.createElement)("div",{className:"actions"},Object(r.createElement)(y.Button,{isPrimary:!0,onClick:function(){return m(!0),!1}},Object(E.__)("Migrate","templates-patterns-collection")+" "+t.theme_name),Object(r.createElement)(y.Button,{isSecondary:!0,onClick:function(){C(tiobDash.onboarding.root+"/dismiss_migration",{theme_mod:t.theme_mod}).then((function(e){if(!e.success)return n(Object(E.__)("Something went wrong. Please reload the page and try again.","neve")),!1;n(Object(E.__)("Dismissed","templates-patterns-collection")),i(!0)}))}},Object(E.__)("Dismiss","templates-patterns-collection"))))},z=n(12),U=n.n(z),V=n(15),$=n.n(V),H=n(5),G=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),W=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),q=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),Q=n(13),J=n.n(Q),Y=n(11),K=new Uint8Array(16);function Z(){if(!P&&!(P="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(K)}for(var X=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ee=function(e){return"string"==typeof e&&X.test(e)},te=[],ne=0;ne<256;++ne)te.push((ne+256).toString(16).substr(1));var re=function(e,t,n){var r=(e=e||{}).random||(e.rng||Z)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(te[e[t+0]]+te[e[t+1]]+te[e[t+2]]+te[e[t+3]]+"-"+te[e[t+4]]+te[e[t+5]]+"-"+te[e[t+6]]+te[e[t+7]]+"-"+te[e[t+8]]+te[e[t+9]]+"-"+te[e[t+10]]+te[e[t+11]]+te[e[t+12]]+te[e[t+13]]+te[e[t+14]]+te[e[t+15]]).toLowerCase();if(!ee(n))throw TypeError("Stringified UUID is invalid");return n}(r)};function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe=function(){var e=k()(w.a.mark((function e(){var t,n,r,a,c,o,i=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]&&i[0],n=i.length>1&&void 0!==i[1]?i[1]:{},r=Object(Y.stringifyUrl)({url:tiobDash.endpoint+(t?"page-templates":"templates"),query:ce(ce({cache:localStorage.getItem("tpcCacheBuster")},tiobDash.params),n)}),e.prev=3,e.next=6,J()({url:r,method:"GET",parse:!1});case 6:if(!(a=e.sent).ok){e.next=15;break}return e.next=10,a.json();case 10:if(!(c=e.sent).message){e.next=13;break}return e.abrupt("return",{success:!1,message:c.message});case 13:return o=a.headers.get("x-wp-totalpages"),e.abrupt("return",{success:!0,total:o,templates:c});case 15:e.next=21;break;case 17:if(e.prev=17,e.t0=e.catch(3),!e.t0.message){e.next=21;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 21:case"end":return e.stop()}}),e,null,[[3,17]])})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=k()(w.a.mark((function e(t,n){var r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(Y.stringifyUrl)({url:tiobDash.endpoint+"templates/"+t,query:ce(ce({cache:localStorage.getItem("tpcCacheBuster")},tiobDash.params),{},{template_id:t,template_name:n})}),e.prev=1,e.next=4,J()({url:r,method:"POST"});case 4:return localStorage.setItem("tpcCacheBuster",re()),e.abrupt("return",{success:!0});case 8:if(e.prev=8,e.t0=e.catch(1),!e.t0.message){e.next=12;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,n){return e.apply(this,arguments)}}(),se=function(){var e=k()(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(Y.stringifyUrl)({url:"".concat(tiobDash.endpoint,"templates/").concat(t),query:ce({cache:localStorage.getItem("tpcCacheBuster"),_method:"DELETE"},tiobDash.params)}),e.prev=1,e.next=4,J()({url:n,method:"POST"});case 4:return localStorage.setItem("tpcCacheBuster",re()),e.abrupt("return",{success:!0});case 8:if(e.prev=8,e.t0=e.catch(1),!e.t0.message){e.next=12;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=k()(w.a.mark((function e(t){var n,r,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(Y.stringifyUrl)({url:"".concat(tiobDash.endpoint,"templates/bulk-import"),query:ce({templates:t,cache:localStorage.getItem("tpcCacheBuster")},tiobDash.params)}),e.prev=1,e.next=4,J()({url:n,method:"GET",parse:!1});case 4:if(!(r=e.sent).ok){e.next=14;break}if(!r.message){e.next=8;break}return e.abrupt("return",{success:!1,message:r.message});case 8:return e.next=10,r.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",{success:!1,message:a.message});case 13:return e.abrupt("return",{success:!0,templates:a});case 14:e.next=20;break;case 16:if(e.prev=16,e.t0=e.catch(1),!e.t0.message){e.next=20;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 20:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e=k()(w.a.mark((function e(t){var n,r,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(Y.stringifyUrl)({url:"".concat(tiobDash.endpoint,"templates/").concat(t,"/import"),query:ce({cache:localStorage.getItem("tpcCacheBuster")},tiobDash.params)}),r={},e.prev=2,e.next=5,J()({url:n,method:"GET",parse:!1});case 5:if(!(a=e.sent).ok){e.next=12;break}return e.next=9,a.json();case 9:if(!(r=e.sent).message){e.next=12;break}return e.abrupt("return",{success:!1,message:r.message});case 12:e.next=18;break;case 14:if(e.prev=14,e.t0=e.catch(2),!e.t0.message){e.next=18;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 18:return e.abrupt("return",{success:!0,templates:[r]});case 19:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(t){return e.apply(this,arguments)}}(),me=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(H.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"})),pe=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),be=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(H.Path,{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"})),de=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"})),fe=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oe=function(e){var t=e.sortingOrder,n=e.item,a=e.loadTemplates,c=e.userTemplate,o=e.grid,i=e.onPreview,s=e.onImport,l=e.upsell,u=void 0!==l&&l,m=Object(r.useState)(!1),p=j()(m,2),b=p[0],d=p[1],f=Object(r.useState)(!1),h=j()(f,2),O=h[0],v=h[1],_=Object(r.useState)(n.template_name),S=j()(_,2),C=S[0],N=S[1],T=function(){var e=k()(w.a.mark((function e(t){var r,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),r=n.template_id,a=n.template_name,d("updating"),e.next=5,ie(r,C||a).then((function(e){e.success&&(v(!O),d(!1))}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=k()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.confirm(Object(E.__)("Are you sure you want to delete this template?"))){e.next=2;break}return e.abrupt("return",!1);case 2:d("deleteing"),se(n.template_id).then((function(e){e.success&&(a(ge({page:0},t)),d(!1))}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){i(n.link)},P=g()("actions",{"no-controls":!c});if(o){var D={backgroundImage:"url(".concat(n.template_thumbnail,")")};return Object(r.createElement)("div",{key:n.template_id,className:"table-grid"},Object(r.createElement)("div",{style:D,className:g()("grid-preview",{"is-loading":O||!1!==b})},Object(r.createElement)("div",{className:"preview-actions"},!c&&n.link&&Object(r.createElement)(y.Button,{isSecondary:!0,disabled:!1!==b,onClick:x},Object(E.__)("Preview")),!u&&Object(r.createElement)(y.Button,{isPrimary:!0,isBusy:"importing"===b,disabled:!1!==b,onClick:s},Object(E.__)("Import")),c&&Object(r.createElement)("div",{className:"preview-controls"},!n.link&&Object(r.createElement)(y.Button,{label:Object(E.__)("Edit"),icon:"updating"===b?me:pe,disabled:O||!1!==b,className:g()({"is-loading":"updating"===b}),onClick:function(){return v(!O)}}),Object(r.createElement)(y.Button,{label:Object(E.__)("Delete"),icon:"deleteing"===b?me:be,disabled:!1!==b,className:g()({"is-loading":"deleteing"===b}),onClick:M})))),Object(r.createElement)("div",{className:"card-footer"},O?Object(r.createElement)("form",{onSubmit:T},Object(r.createElement)(y.TextControl,{value:C,onChange:N}),Object(r.createElement)(y.Button,{type:"submit",label:Object(E.__)("Update"),icon:"updating"===b?me:de,disabled:!1!==b,className:g()({"is-loading":"updating"===b})})):Object(r.createElement)("p",null,C)))}return Object(r.createElement)("div",{key:n.template_id,className:"table-row"},Object(r.createElement)("div",{className:"title"},Object(r.createElement)(y.Icon,{icon:fe}),O?Object(r.createElement)(y.TextControl,{label:Object(E.__)("Template Name"),hideLabelFromVision:!0,value:C,onChange:N}):C),c&&Object(r.createElement)("div",{className:"controls"},n.link?Object(r.createElement)(y.Tooltip,{text:Object(E.__)("This template is synced to a page.")},Object(r.createElement)(y.Button,{label:Object(E.__)("Edit"),icon:pe,disabled:!0},Object(E.__)("Edit"))):Object(r.createElement)(y.Button,{label:O?Object(E.__)("Update"):Object(E.__)("Edit"),icon:O?"updating"===b?me:de:pe,disabled:!1!==b,className:g()({"is-loading":"updating"===b}),onClick:function(){return O?T:v(!O)}},O?Object(E.__)("Update"):Object(E.__)("Edit")),Object(r.createElement)(y.Button,{label:Object(E.__)("Delete"),icon:"deleteing"===b?me:be,disabled:!1!==b,className:g()({"is-loading":"deleteing"===b}),onClick:M},"deleting"===b?Object(E.__)("Deleting")+"...":Object(E.__)("Delete"))),Object(r.createElement)("div",{className:P},!c&&n.link&&Object(r.createElement)(y.Button,{isSecondary:!0,disabled:!1!==b,onClick:x},Object(E.__)("Preview")),Object(r.createElement)(y.Button,{isPrimary:!0,isBusy:"importing"===b,onClick:s,disabled:!1!==b},Object(E.__)("Import"))))},ve=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})),je=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),ye=Object(r.createElement)(H.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"})),Ee=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"})),_e=n(18);function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ke={date:Object(E.__)("Date"),template_name:Object(E.__)("Name"),modified:Object(E.__)("Last Modified")},Ce=function(e){var t=e.isGrid,n=e.setGrid,a=e.isSearch,c=e.searchQuery,o=e.setSearchQuery,i=e.onSearch,s=e.sortingOrder,l=e.setSortingOrder,u=e.changeOrder;return Object(r.createElement)("div",{className:"filters"},Object(r.createElement)("div",{className:"header-form"},Object(r.createElement)("div",{className:"display-sorting"},Object(r.createElement)("div",{className:"sorting-label"},Object(E.__)("Sort by")),Object(r.createElement)("div",{className:"sorting-filter"},Object.keys(ke).map((function(e){return Object(r.createElement)(y.Button,{key:e,className:g()({"is-selected":e===s.orderby,"is-asc":"ASC"===s.order}),onClick:function(){var t={order:"DESC",orderby:e};e===s.orderby&&"DESC"===s.order&&(t.order="ASC"),l(Se({},t)),u(Se({},t))}},ke[e])})))),Object(r.createElement)("div",{className:"display-filters"},Object(r.createElement)("div",{className:"display-filters__search"},Object(r.createElement)("input",{placeholder:Object(E.__)("Search"),value:c,onChange:function(e){return o(e.target.value)},onKeyDown:function(e){e.keyCode===_e.ENTER&&i()}}),a?Object(r.createElement)(y.Button,{label:Object(E.__)("Clear search query"),icon:ve,onClick:function(){o(""),i("")}}):Object(r.createElement)(y.Button,{label:Object(E.__)("Search"),icon:je,onClick:function(){return i()}})),Object(r.createElement)(y.Button,{label:Object(E.__)("List View"),icon:ye,onClick:function(){return n(!1)},isPressed:!t}),Object(r.createElement)(y.Button,{label:Object(E.__)("Grid View"),icon:Ee,onClick:function(){return n(!0)},isPressed:t}))))},Ne=function(e){var t=e.title,n=e.leftButtons,a=e.rightButtons,c=e.heading,o=e.previewUrl,i=Object(Y.stringifyUrl)({url:o,query:{tpcpreview:"yes"}}),s=t||Object(E.__)("Preview");return Object(r.createElement)("div",{className:"ob-preview single-templates"},Object(r.createElement)("div",{className:"preview"},Object(r.createElement)("iframe",{title:s,src:i,frameBorder:"0"}),Object(r.createElement)("div",{className:"loading"},Object(r.createElement)(y.Dashicon,{icon:"update",size:50}))),Object(r.createElement)("div",{className:"bottom-bar"},n&&Object(r.createElement)("div",{className:"navigator"},n),c&&Object(r.createElement)("h2",{className:"heading"},c),a&&Object(r.createElement)("div",{className:"actions"},a)))};function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xe=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getThemeAction,r=t.getCurrentSite;return{themeStatus:n().action||!1,siteData:r()}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setTemplateModal,r=t.setImportModalStatus,a=t.setInstallModalStatus;return{cancel:function(){n(null)},setModal:function(e){return r(e)},setInstallModal:function(e){return a(e)}}})))((function(e){var t=e.templatesData,n=e.cancel,a=e.siteData,c=e.themeStatus,o=e.setInstallModal,i=e.setModal,s=e.isUserTemplate,l=void 0!==s&&s,u=e.generalTemplates,m=void 0!==u&&u,p=Object(r.useState)(!0),b=j()(p,2),d=b[0],f=b[1],h=Object(r.useState)([]),O=j()(h,2),v=O[0],_=O[1],w=Object(r.useState)(!1),S=j()(w,2),k=S[0],C=S[1],N=Object(r.useState)([]),T=j()(N,2),M=T[0],x=T[1],P=Object(r.useState)(!1),D=j()(P,2),I=D[0],L=D[1],A=1===t.length;Object(r.useEffect)((function(){l&&A?ue(t[0].template_id).then((function(e){e.success||(e.message?L(e.message):L(!0),f(!1)),_(e.templates),f(!1)})):le(t.map((function(e){return e.template_id}))).then((function(e){if(!e.success)return e.message?L(e.message):L(!0),f(!1),!1;_(e.templates),f(!1)}))}),[t]);var R=function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",{className:"is-loading",style:{height:30,marginBottom:30,width:"70%"}}),Object(r.createElement)("p",{className:"description is-loading"}),Object(r.createElement)("p",{className:"description is-loading"}),Object(r.createElement)("p",{className:"description is-loading",style:{width:"40%"}}))),Object(r.createElement)("div",{className:"modal-footer",style:{marginTop:50}},Object(r.createElement)("span",{className:"is-loading link"}),Object(r.createElement)("span",{className:"is-loading button",style:{width:"150px",marginLeft:"auto"}})))},F=function(e){if(e.preventDefault(),c)return o(!0),!1;i(!0)},z=function(){C(!0);var e=t.map((function(e,t){return Me(Me({},e),v[t])}));try{B(e).then((function(e){if(!e.success)return console.log(e.message),!1;x(e.pages),C("done")}))}catch(e){console.log(I)}},U=function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",null,Object(E.__)("An error occurred!","templates-patterns-collection")),Object(r.createElement)("p",{className:"description"},!0===I?Object(E.__)("Please refresh the page and try again."):I))),Object(r.createElement)("div",{className:"modal-footer"},Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",onClick:function(){L(!1),n()}},Object(E.__)("Close"))))};return Object(r.createElement)(y.Modal,{className:g()(["ob-import-modal",{fetching:d}]),onRequestClose:n,shouldCloseOnClickOutside:!k&&!d,isDismissible:!k&&!d},"done"===k?Object(r.createElement)((function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",null,Object(E.__)("Import done!","templates-patterns-collection")),Object(r.createElement)("p",{className:"description"},A?Object(E.__)("Template was successfully imported!","templates-patterns-collection"):Object(E.__)("Templates were successfully imported!","templates-patterns-collection"))),M&&Object(r.createElement)("ul",{className:"modal-toggles"},M.map((function(e,t){return Object(r.createElement)("li",{className:"option-row",key:t},Object(r.createElement)(y.Icon,{icon:fe,className:"active"}),Object(r.createElement)("span",null,e.title.replace(/’/g,"'")),Object(r.createElement)("div",{className:"actions"},Object(r.createElement)(y.Button,{isTertiary:!0,href:e.url},Object(E.__)("Visit","templates-patterns-collection")),Object(r.createElement)(y.Button,{isTertiary:!0,href:e.edit},Object(E.__)("Edit","templates-patterns-collection"))))})))),Object(r.createElement)("div",{className:"modal-footer"},Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",onClick:n},Object(E.__)("Close"))))}),null):Object(r.createElement)((function(){return d?Object(r.createElement)(R,null):I?Object(r.createElement)(U,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",null,Object(E.sprintf)(A?
|
3 |
/* translators: name of starter site */
|
4 |
Object(E.__)("Import the %s template","templates-patterns-collection"):
|
5 |
/* translators: name of template */
|
6 |
-
Object(E.__)("Import all templates from %s","templates-patterns-collection"),
|
7 |
/* translators: %s the name of the template */
|
8 |
-
Object(E.__)("The %s template will be imported as a page into your site. This import will install & activate the page builder plugin if not already installed.","templates-patterns-collection"),t[0].template_name):Object(E.__)("All the templates that are included in this starter site, will be imported as pages. This import will install & activate the page builder plugin if not already installed.","templates-patterns-collection"))))),Object(r.createElement)("div",{className:"modal-footer"},!m&&Object(r.createElement)(y.Button,{className:"import-templates",isLink:!0,disabled:k,onClick:F},Object(E.__)("I want to import the entire site","templates-patterns-collection")),Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",disabled:k,onClick:z},k?Object(E.__)("Importing")+"...":A?Object(E.__)("Import"):Object(E.__)("Import All Pages"))))}),null))}));function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ie=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setInstallModalStatus;return{setInstallModal:function(e){return n(e)},setTemplateModal:t.setTemplateModal}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getTemplateModal,r=t.getThemeAction,a=t.getCurrentEditor,c=t.getCurrentTab;return{templateModal:n(),themeStatus:r().action||!1,editor:a(),currentTab:c()}})))((function(e){var t=e.isGeneral,n=e.setInstallModal,a=e.setTemplateModal,o=e.templateModal,i=e.themeStatus,s=e.currentTab,l=Object(r.useState)({gutenberg:[],elementor:[]}),u=j()(l,2),m=u[0],p=u[1],b=Object(r.useState)("gutenberg"),d=j()(b,2),f=d[0],h=d[1],O=Object(r.useState)([]),v=j()(O,2),_=v[0],S=v[1],C=Object(r.useState)(t),N=j()(C,2),T=N[0],M=N[1],x=Object(r.useState)(""),P=j()(x,2),D=P[0],I=P[1],L=Object(r.useState)({gutenberg:0,elementor:0,beaver:0}),B=j()(L,2),A=B[0],R=B[1],F=Object(r.useState)({gutenberg:0,elementor:0,beaver:0}),z=j()(F,2),V=z[0],H=z[1],Q=Object(r.useState)(!1),J=j()(Q,2),Y=J[0],K=J[1],Z=Object(r.useState)(!1),X=j()(Z,2),ee=X[0],te=X[1],ne=Object(r.useState)(!1),re=j()(ne,2),ae=re[0],ce=re[1],ie=Object(r.useState)(""),se=j()(ie,2),le=se[0],ue=se[1],me=Object(r.useState)({templates:{order:"DESC",orderby:"date"},library:{order:"DESC",orderby:"date"}}),pe=j()(me,2),be=pe[0],de=pe[1];Object(r.useEffect)((function(){K(!0),I(""),R({gutenberg:0,elementor:0,beaver:0}),H({gutenberg:0,elementor:0,beaver:0}),he()}),[t,f]);var fe={gutenberg:{label:Object(E.__)("Gutenberg"),icon:"gutenberg.jpg"},elementor:{label:Object(E.__)("Elementor"),icon:"elementor.jpg"},beaver:{label:Object(E.__)("Beaver"),icon:"beaver.jpg"}},he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=De({page:A[f],per_page:12,type:f},e);t&&(n.template_site_slug="general",n.premade=!0),D&&(n.search=D),oe(t,n).then((function(e){p(De(De({},m),{},c()({},f,e.templates))),H(De(De({},V),{},c()({},f,e.total))),K(!1)}))},ge=function(){var e=k()(w.a.mark((function e(){var n,r,a=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>0&&void 0!==a[0]?a[0]:A[f]+1,ce(!0),R(De(De({},A),{},c()({},f,n))),r={page:n,per_page:12,type:f},t&&(r.template_site_slug="general",r.premade=!0),D&&(r.search=D),e.next=8,oe(t,r).then((function(e){p(De(De({},m),{},c()({},f,[].concat(U()(m[f]),U()(e.templates))))),H(De(De({},V),{},c()({},f,e.total)))}));case 8:ce(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ve=function(e){ue(e)},je=function(e){if(i)return n(!0),!1;S([e]),a(!0)},ye=m[f]&&m[f].findIndex((function(e){return e.link===le})),Ee=m[f]&&m[f].find((function(e){return le===e.link})),_e=g()("cloud-items",{"is-grid":T}),we=function(){return t?be.templates:be.library},Se=function(){var e=k()(w.a.mark((function e(n){var r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:K(!0),r=De({search:D,type:f},n),t&&(r.template_site_slug="general",r.premade=!0),oe(t,r).then((function(e){p(De(De({},m),{},c()({},f,U()(e.templates)))),H(De(De({},V),{},c()({},f,e.total))),K(!1)}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(r.createElement)("div",{className:_e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"editor-tabs"},Object.keys(fe).map((function(e){return Object(r.createElement)("a",{key:e,href:"#",onClick:function(){h(e),te(!1)},className:g()("tab",{active:f===e})},Object(r.createElement)("span",{className:"icon-wrap"},Object(r.createElement)("img",{className:"editor-icon",src:window.tiobDash.assets+"img/"+fe[e].icon,alt:fe[e].label})),Object(r.createElement)("span",{className:"editor"},fe[e].label))}))),Object(r.createElement)(Ce,{currentTab:s,isGrid:T,setGrid:M,isSearch:ee,searchQuery:D,setSearchQuery:I,onSearch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;K(!0),te(!!e);var n=De({search:e,type:f},we());t&&(n.template_site_slug="general",n.premade=!0),oe(t,n).then((function(e){p(De(De({},m),{},c()({},f,U()(e.templates)))),H(De(De({},V),{},c()({},f,e.total))),K(!1)}))},sortingOrder:we(),setSortingOrder:function(e){return de(De(De({},be),{},t?{templates:e}:{library:e}))},changeOrder:Se}),Y&&Object(r.createElement)(y.Spinner,null),!Y&&(m[f]&&m[f].length>0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"table"},m[f].map((function(e){return Object(r.createElement)(Oe,{sortingOrder:we(),onPreview:ve,userTemplate:!t,key:e.template_id,item:e,loadTemplates:he,onImport:function(){return je(e)},grid:T})}))),Object(r.createElement)($.a,{onChange:function(e){if(!e)return!1;Number(V[f])>A[f]&&ge()}},Object(r.createElement)("span",{style:{height:10,width:10,display:"block"}})),ae&&Object(r.createElement)("div",{className:"fetching-loader"},Object(r.createElement)(y.Spinner,null))):Object(r.createElement)(r.Fragment,null,Object(E.__)("No templates found."))),le&&Object(r.createElement)(Ne,{previewUrl:le,rightButtons:Object(r.createElement)(y.Button,{isPrimary:!0,onClick:function(){return je(Ee)}},Object(E.__)("Import Template")),heading:Ee.template_name,leftButtons:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{icon:G,onClick:function(){return ue("")}}),m[f].length>1&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{icon:Object(E.isRTL)()?W:q,onClick:function(){var e=ye-1;0===ye&&(e=m[f].length-1),ue(m[f][e].link)}}),Object(r.createElement)(y.Button,{icon:Object(E.isRTL)()?q:W,onClick:function(){var e=ye+1;ye===m[f].length-1&&(e=0),ue(m[f][e].link)}})))})),o&&_&&!Y&&_.length>0&&Object(r.createElement)(xe,{generalTemplates:!0,isUserTemplate:!t,templatesData:_}))})),Le=[Object(E.__)("Business","templates-patterns-collection"),Object(E.__)("Ecommerce","templates-patterns-collection"),Object(E.__)("Fashion","templates-patterns-collection"),Object(E.__)("Blogging","templates-patterns-collection"),Object(E.__)("Photography","templates-patterns-collection")],Be={all:Object(E.__)("All Categories"),free:Object(E.__)("Free"),business:Object(E.__)("Business"),portfolio:Object(E.__)("Portfolio"),woocommerce:Object(E.__)("WooCommerce"),blog:Object(E.__)("Blog"),personal:Object(E.__)("Personal"),other:Object(E.__)("Other")},Ae={gutenberg:{icon:"gutenberg.jpg",niceName:"Gutenberg"},elementor:{icon:"elementor.jpg",niceName:"Elementor"},"beaver builder":{icon:"beaver.jpg",niceName:Object(r.createElement)(r.Fragment,null,"Beaver ",Object(r.createElement)("span",{className:"long-name"},"Builder"))},brizy:{icon:"brizy.jpg",niceName:"Brizy"},"divi builder":{icon:"divi.jpg",niceName:"Divi"},"thrive architect":{icon:"thrive.jpg",niceName:Object(r.createElement)(r.Fragment,null,"Thrive ",Object(r.createElement)("span",{className:"long-name"},"Architect"))}},Re=function(e){var t=e.currentStep,n=e.progress,a=e.willDo,c={plugins:{label:Object(E.__)("Installing Plugins","templates-patterns-collection"),status:n.plugins,willDo:!0},content:{label:Object(E.__)("Importing Content","templates-patterns-collection"),status:n.content,willDo:a.content},customizer:{label:Object(E.__)("Importing Customizer Settings","templates-patterns-collection"),status:n.customizer,willDo:a.customizer},widgets:{label:Object(E.__)("Importing Widgets","templates-patterns-collection"),status:n.widgets,willDo:a.widgets}};return Object(r.createElement)("ul",{className:"stepper"},Object.keys(c).map((function(e,n){var a=c[e],o=a.label,i=a.status;if(!a.willDo)return null;var s=g()(["icon",{loading:t===e,warning:t===e,success:"done"===i,error:"error"===i,skip:"skip"===i}]),l="clock";return t===e&&(l="update"),"done"===i&&(l="yes"),"error"===i&&(l="no-alt"),Object(r.createElement)("li",{key:n},Object(r.createElement)("span",{className:s},Object(r.createElement)(y.Dashicon,{icon:l,className:t===e?"loading":""})),Object(r.createElement)("span",null,o))})))};function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ue=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getCurrentSite;return{editor:n(),siteData:r()}})),Object(f.withDispatch)((function(e,t){var n=t.siteData,r=e("neve-onboarding"),a=r.setTemplateModal,c=r.setSingleTemplateImport,o=r.setImportModalStatus;return{setModal:function(e){return o(e)},runTemplateImport:function(){c(n.slug),a(!0),o(!1)}}})))((function(e){var t=e.setModal,n=e.editor,a=e.siteData,o=e.runTemplateImport,i=Object(r.useState)({content:!0,customizer:!0,widgets:!0}),s=j()(i,2),l=s[0],u=s[1],m=Object(r.useState)(!1),p=j()(m,2),b=p[0],d=p[1],f=Object(r.useState)(!1),h=j()(f,2),O=h[0],v=h[1],_=Object(r.useState)(!1),w=j()(_,2),S=w[0],k=w[1],T=Object(r.useState)(!1),M=j()(T,2),x=M[0],P=M[1],D=Object(r.useState)(null),B=j()(D,2),F=B[0],z=B[1],U=Object(r.useState)(null),V=j()(U,2),$=V[0],H=V[1],G=Object(r.useState)(!1),W=j()(G,2),q=W[0],Q=W[1],J=Object(r.useState)(null),Y=j()(J,2),K=Y[0],Z=Y[1],X=Object(r.useState)(null),ee=j()(X,2),te=ee[0],ne=ee[1],re=Object(r.useState)(null),ae=j()(re,2),ce=ae[0],oe=ae[1],ie=Object(r.useState)(!0),se=j()(ie,2),le=se[0],ue=se[1],me=Object(r.useState)(!0),pe=j()(me,2),be=pe[0],de=pe[1],fe=Object(r.useState)(!0),he=j()(fe,2),ge=he[0],Oe=he[1],ve=tiobDash.license;function je(){if(!l.content)return console.log("[S] Content."),ye(),!1;var e;H("content"),console.log("[P] Content."),(e={contentFile:ce.content_file,source:"remote",frontPage:ce.front_page,shopPages:ce.shop_pages,demoSlug:ce.slug,editor:n},C(I.root+"/import_content",e)).then((function(e){if(!e.success)return we(e,"content"),!1;console.log("[D] Content."),e.frontpage_id&&z(e.frontpage_id),v("done"),ye()})).catch((function(e){return we(e,"content")}))}function ye(){if(!l.customizer)return console.log("[S] Customizer."),Ee(),!1;var e;H("customizer"),console.log("[P] Customizer."),(e={source_url:ce.url,theme_mods:ce.theme_mods,wp_options:ce.wp_options},C(I.root+"/import_theme_mods",e)).then((function(e){if(!e.success)return we(e,"customizer"),!1;console.log("[D] Customizer."),k("done"),Ee()})).catch((function(e){return we(e,"customizer")}))}function Ee(){var e;l.widgets||(console.log("[S] Widgets."),_e()),H("widgets"),console.log("[P] Widgets."),(e=ce.widgets,C(I.root+"/import_widgets",e)).then((function(e){if(!e.success)return we(e,"widgets"),!1;console.log("[D] Widgets."),P("done"),_e()})).catch((function(e){return we(e,"widgets")}))}function _e(){H("done"),Q(!1)}function we(e,t){Q(!1),H(null),"plugins"===t&&v("skip"),["content","plugins"].includes(t)&&k("skip"),["content","plugins","customizer"].includes(t)&&P("skip");var n={plugins:Object(E.__)("Something went wrong while installing the necessary plugins.","templates-patterns-collection"),content:Object(E.__)("Something went wrong while importing the website content.","templates-patterns-collection"),customizer:Object(E.__)("Something went wrong while updating the customizer settings.","templates-patterns-collection"),widgets:Object(E.__)("Something went wrong while importing the widgets.","templates-patterns-collection")};switch(t){case"plugins":d("error");break;case"content":v("error");break;case"customizer":k("error");break;case"widgets":P("error")}ne(e.data?{message:n[t],code:e.data}:{message:n[t]})}Object(r.useEffect)((function(){var e=a.remote_url||a.url,t=new URL("".concat(function(e){return e.replace(/\/$/,"")}(e)+"/","wp-json/ti-demo-data/data"));t.searchParams.append("license",ve?ve.key:"free"),N(t,!0,!1).then((function(e){e.ok||(ne({message:Object(E.__)("Something went wrong while loading the site data. Please refresh the page and try again.","templates-patterns-collection"),code:"ti__ob_failed_fetch_response"}),ue(!1)),e.json().then((function(e){oe(ze(ze({},e),a));var t=ze({},e.mandatory_plugins||{}),n=ze({},e.recommended_plugins||{}),r=e.default_off_recommended_plugins||[];Object.keys(t).map((function(e){t[e]=!0})),Object.keys(n).map((function(e){n[e]=!r.includes(e)})),Z(ze(ze({},n),t)),ue(!1)}))})).catch((function(e){ne({message:Object(E.__)("Something went wrong while loading the site data. Please refresh the page and try again.","templates-patterns-collection"),code:"ti__ob_failed_fetch_catch"}),ue(!1)}))}),[]);var Se=function(){if(q)return!1;t(!1)},ke=!a.external_plugins||a.external_plugins.every((function(e){return!0===e.active})),Ce=Object.keys(l).every((function(e){return!1===l[e]})),Ne={elementor:"".concat(tiobDash.onboarding.homeUrl,"/wp-admin/post.php?post=").concat(F,"&action=elementor"),brizy:"".concat(tiobDash.onboarding.homeUrl,"/?brizy-edit"),"beaver builder":"".concat(tiobDash.onboarding.homeUrl,"/?fl_builder"),"thrive architect":"".concat(tiobDash.onboarding.homeUrl,"/wp-admin/post.php?post=").concat(F,"&action=architect&tve=true"),"divi builder":"".concat(tiobDash.onboarding.homeUrl,"/?et_fb=1&PageSpeed=off"),gutenberg:"".concat(tiobDash.onboarding.homeUrl,"/wp-admin/post.php?post=").concat(F,"&action=edit")}[n];return Object(r.createElement)(y.Modal,{className:g()(["ob-import-modal",{fetching:le}]),onRequestClose:Se,shouldCloseOnClickOutside:!q&&!le,isDismissible:!q&&!le},le?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("span",{className:"title is-loading",style:{height:35,marginBottom:20}}),Object(r.createElement)("p",{className:"description is-loading"}),Object(r.createElement)("p",{className:"description is-loading"})),Object(r.createElement)("div",{className:"well is-loading"},Object(r.createElement)("span",{className:"title is-loading",style:{height:20}}),Object(r.createElement)("ol",null,Object(r.createElement)("li",null),Object(r.createElement)("li",null))),Object(r.createElement)("div",{className:"modal-toggles components-panel"},[1,2].map((function(e){return Object(r.createElement)("div",{key:e,className:"components-panel__body options general is-opened"},Object(r.createElement)("span",{className:"title is-loading"}),Object(r.createElement)("ul",null,[1,2,3].map((function(e){return Object(r.createElement)("li",{className:"option-row",key:e},Object(r.createElement)("div",{className:"mock-icon is-loading"}),Object(r.createElement)("span",{className:"is-loading"}),Object(r.createElement)("div",{className:"toggle is-loading"}))}))))})))),Object(r.createElement)("div",{className:"modal-footer"},Object(r.createElement)("span",{className:"link is-loading"}),Object(r.createElement)(y.Button,{isPrimary:!0,className:"import is-loading"}))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},q||"done"===$||te?Object(r.createElement)(r.Fragment,null,te&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(R,{message:te.message||null,code:te.code||null}),Object(r.createElement)("hr",null)),null!==$&&Object(r.createElement)(Re,{progress:{plugins:b,content:O,customizer:S,widgets:x},currentStep:$,willDo:l}),"done"===$&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("hr",null),Object(r.createElement)("p",{className:"import-result"},Object(E.__)("Content was successfully imported. Enjoy your new site!","templates-patterns-collection")),Object(r.createElement)("hr",null))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)((function(){return le?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"is-loading title"}),Object(r.createElement)("p",{className:"is-loading description"})):Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",null,Object(E.sprintf)(
|
9 |
/* translators: name of starter site */
|
10 |
-
Object(E.__)("Import %s as a complete site","templates-patterns-collection"),ce.title)),Object(r.createElement)("p",{className:"description"},Object(E.__)("Import the entire site including customizer options, pages, content and plugins.","templates-patterns-collection")))}),null),Object(r.createElement)((function(){return Object(r.createElement)(A,{data:ce,externalInstalled:ke})}),null),Object(r.createElement)(y.Panel,{className:"modal-toggles"},Object(r.createElement)((function(){var e={content:{title:Object(E.__)("Content","templates-patterns-collection"),icon:"admin-post"},customizer:{title:Object(E.__)("Customizer","templates-patterns-collection"),icon:"admin-customizer"},widgets:{title:Object(E.__)("Widgets","templates-patterns-collection"),icon:"admin-generic"}};return Object(r.createElement)(y.PanelBody,{onToggle:function(){Oe(!ge)},opened:ge,className:"options general",title:Object(E.__)("Import settings","templates-patterns-collection")},Object.keys(e).map((function(t,n){return Object(r.createElement)(y.PanelRow,{className:"option-row",key:n},Object(r.createElement)(y.Icon,{className:g()({active:l[t]}),icon:e[t].icon}),Object(r.createElement)("span",null,e[t].title),Object(r.createElement)("div",{className:"toggle-wrapper"},Object(r.createElement)(y.ToggleControl,{checked:l[t],onChange:function(){u(ze(ze({},l),{},c()({},t,!l[t])))}})))})))}),null),Object(r.createElement)((function(){if(le)return null;var e=ze(ze({},ce.recommended_plugins||{}),ce.mandatory_plugins||{});return Object(r.createElement)(y.PanelBody,{onToggle:function(){de(!be)},opened:be,className:"options plugins",title:Object(E.__)("Plugins","templates-patterns-collection")},Object.keys(e).map((function(t,n){return Object(r.createElement)(y.PanelRow,{className:"option-row",key:n},Object(r.createElement)(y.Icon,{icon:"admin-plugins",className:g()({active:K[t]})}),Object(r.createElement)("span",{dangerouslySetInnerHTML:{__html:e[t]}}),t in ce.recommended_plugins&&Object(r.createElement)("div",{className:"toggle-wrapper"},Object(r.createElement)(y.ToggleControl,{checked:K[t],onChange:function(){Z(ze(ze({},K),{},c()({},t,!K[t])))}})))})))}),null)))),!q&&Object(r.createElement)("div",{className:"modal-footer"},"done"!==$?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{className:"import-templates",isLink:!0,onClick:o},Object(E.__)("I want to import just the templates","templates-patterns-collection")),!te&&Object(r.createElement)(y.Button,{className:"import",isPrimary:!0,disabled:Ce||!ke,onClick:function(){Q(!0),function(){if(console.clear(),!K)return console.log("[S] Plugins."),je(),!1;H("plugins"),console.log("[P] Plugins."),L(K).then((function(e){if(!e.success)return we(e,"plugins"),!1;console.log("[D] Plugins."),d("done"),je()})).catch((function(e){return we(e,"plugins")}))}()}},Object(E.__)("Import entire site","templates-patterns-collection"))):Object(r.createElement)("div",{className:"import-done-actions"},Object(r.createElement)(y.Button,{isLink:!0,className:"close",onClick:Se},Object(E.__)("Back to Sites Library","templates-patterns-collection")),Object(r.createElement)(y.Button,{isSecondary:!0,href:tiobDash.onboarding.homeUrl},Object(E.__)("View Website","templates-patterns-collection")),Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",href:Ne},Object(E.__)("Add your own content","templates-patterns-collection"))))))})),Ve=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setSingleTemplateImport,r=t.setImportModalStatus,a=t.setInstallModalStatus;return{cancel:function(){n(null)},setModal:function(e){return r(e)},setInstallModal:function(e){return a(e)},setTemplateModal:t.setTemplateModal}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getTemplateModal,r=t.getThemeAction,a=t.getCurrentSite,c=t.getCurrentEditor;return{templateModal:n(),themeStatus:r().action||!1,site:a(),editor:c()}})))((function(e){var t=e.slug,n=e.cancel,a=e.setModal,c=e.setInstallModal,o=e.themeStatus,i=e.site,s=e.editor,l=e.setTemplateModal,u=e.templateModal,m=Object(r.useState)([]),p=j()(m,2),b=p[0],d=p[1],f=Object(r.useState)(!0),h=j()(f,2),g=h[0],O=h[1],v=Object(r.useState)(""),_=j()(v,2),w=_[0],S=_[1],k=Object(r.useState)([]),C=j()(k,2),N=C[0],T=C[1],M=i.title,x=i.upsell,P=i.utmOutboundLink;Object(r.useEffect)((function(){D()}),[]);var D=function(){oe(!0,{per_page:100,template_site_slug:t,premade:!0,type:s}).then((function(e){d(e.templates||[]),O(!1)}))},I=function(e){S(e)},L=function(e){if(o)return c(!0),!1;T([e]),l(!0)},B=function(e){if(e.preventDefault(),o)return c(!0),!1;a(!0)},A=b.findIndex((function(e){return e.link===w})),R=b.find((function(e){return e.link===w}));return Object(r.createElement)("div",{className:"single-templates-wrapper"},Object(r.createElement)("div",{className:"top"},Object(r.createElement)("div",{className:"breadcrumb"},Object(r.createElement)(y.Button,{isTertiary:!0,onClick:n},Object(E.__)("Back to starter sites"))),Object(r.createElement)("div",{className:"header"},Object(r.createElement)("div",{className:"text"},Object(r.createElement)("h1",null,M||"",x&&Object(r.createElement)("span",{className:"pro-badge"},Object(r.createElement)(y.Icon,{icon:"lock"}),Object(r.createElement)("span",null,Object(E.__)("Premium","templates-patterns-collection")))),Object(r.createElement)("p",{className:"description"},Object(E.__)("You can import individual pages or bulk-import all of them."))),Object(r.createElement)("div",{className:"actions"},!x&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{isSecondary:!0,onClick:B},Object(E.__)("Import Starter Site")),Object(r.createElement)(y.Button,{isPrimary:!0,disabled:b.length<1,onClick:function(e){if(e.preventDefault(),o)return c(!0),!1;T(b),l(!0)}},Object(E.__)("Import All Pages"))),x&&Object(r.createElement)(y.Button,{href:P||tiobDash.upgradeURL,isSecondary:!0},Object(E.__)("Upgrade"))))),Object(r.createElement)((function(){return g?Object(r.createElement)(y.Spinner,null):b.length<1?Object(E.__)("No templates for this starter site."):Object(r.createElement)("div",{className:"cloud-items is-grid"},Object(r.createElement)("div",{className:"table"},b.map((function(e){return Object(r.createElement)(Oe,{upsell:x,onPreview:I,userTemplate:!1,key:e.template_id,item:e,loadTemplates:D,onImport:function(){return L(e)},grid:!0})}))))}),null),w&&Object(r.createElement)(Ne,{heading:R.template_name||null,previewUrl:w,leftButtons:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{icon:G,onClick:function(){return S("")},label:Object(E.__)("Close","templates-patterns-collection")}),b.length>1&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{icon:Object(E.isRTL)()?W:q,onClick:function(){var e=A-1;0===A&&(e=b.length-1),S(b[e].link)}}),Object(r.createElement)(y.Button,{icon:Object(E.isRTL)()?q:W,onClick:function(){var e=A+1;A===b.length-1&&(e=0),S(b[e].link)}}))),rightButtons:Object(r.createElement)(r.Fragment,null,!x&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{isSecondary:!0,onClick:B},Object(E.__)("Import Starter Site")),Object(r.createElement)(y.Button,{isPrimary:!0,disabled:b.length<1,onClick:function(){return L(R)}},Object(E.__)("Import Page"))),x&&Object(r.createElement)(y.Button,{href:P||tiobDash.upgradeURL,isSecondary:!0},Object(E.__)("Upgrade")))}),u&&N&&!g&&N.length>0&&Object(r.createElement)(xe,{templatesData:N}))})),$e=function(){return Object(r.createElement)(H.SVG,{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"ob-logo"},Object(r.createElement)(H.Path,{d:"M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z",fill:"#0366D6"}),Object(r.createElement)(H.Path,{d:"M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z",fill:"white"}),Object(r.createElement)(H.Path,{d:"M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z",fill:"white"}))},He=function(e){var t=e.setCurrentTab,n=e.currentTab,a=e.isFetching,c=Object(r.useState)(!1),o=j()(c,2),i=o[0],s=o[1],l={starterSites:Object(E.__)("Starter Sites","neve"),pageTemplates:Object(E.__)("Page Templates","neve")};return tiobDash.license&&tiobDash.license.tier&&3===tiobDash.license.tier&&(l.library=Object(E.__)("My Library","neve")),Object(r.createElement)("div",{className:"header-nav"},Object.keys(l).map((function(e){return Object(r.createElement)(y.Button,{key:e,isTertiary:!0,isPressed:e===n,onClick:function(){return t(e)}},l[e])})),"starterSites"!==n&&Object(r.createElement)(y.Button,{icon:me,onClick:function(){s(!0),localStorage.setItem("tpcCacheBuster",re());var e=n;t(null),setTimeout((function(){t(e),s(!1)}),100)},label:Object(E.__)("Re-sync Library"),className:g()("is-sync",{"is-loading":i}),disabled:a||i,"data-content":Object(E.__)("Sync")}))},Ge=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setOnboardingState;return{cancelOnboarding:function(){n(!1)},setCurrentTab:t.setCurrentTab,setFetching:t.setFetching}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getOnboardingStatus,r=t.getCurrentTab,a=t.getFetching;return{isOnboarding:n(),currentTab:r(),isFetching:a()}})))((function(e){var t=e.isOnboarding,n=e.cancelOnboarding,a=e.setCurrentTab,c=e.currentTab;return Object(r.createElement)("div",{className:"ob-head"},!t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"header-container"},Object(r.createElement)("h2",null,!tiobDash.brandedTheme&&Object(r.createElement)(y.Icon,{icon:$e}),Object(r.createElement)("span",null,Object(E.__)("Templates Cloud","neve"))),Object(r.createElement)(He,{setCurrentTab:a,currentTab:c}))),t&&Object(r.createElement)(y.Button,{className:"close-onboarding",isLink:!0,icon:"no-alt",onClick:n}))})),We=n(19),qe=n.n(We),Qe=Object(O.compose)(Object(f.withSelect)((function(e){return{themeStatus:(0,e("neve-onboarding").getThemeAction)().action||!1}})),Object(f.withDispatch)((function(e,t){var n=t.data,r=n.slug,a=e("neve-onboarding"),c=a.setCurrentSite,o=a.setPreviewStatus,i=a.setImportModalStatus,s=a.setInstallModalStatus,l=a.setSingleTemplateImport;return{setSite:function(){return c(n)},setPreview:function(e){return o(e)},setModal:function(e){return i(e)},setInstallModal:function(e){return s(e)},setImportingPages:function(){return l(r)}}})))((function(e){var t=e.data,n=e.setSite,a=e.setPreview,c=e.setModal,o=e.themeStatus,i=e.setInstallModal,s=e.setImportingPages,l=t.upsell,u=(t.slug,t.screenshot),m=t.title,p=t.has_templates,b=Object(r.useState)(""),d=j()(b,2),f=d[0],h=d[1],O=g()("card starter-site-card",{"has-templates":p});return Object(r.createElement)("div",{onMouseEnter:function(){h("visible")},onMouseLeave:function(){h("")},className:O},Object(r.createElement)("div",{className:"top"},Object(r.createElement)("div",{className:"actions "+f},Object(r.createElement)(y.Button,{isSecondary:!0,onClick:function(e){e.preventDefault(),n(),a(!0)}},Object(E.__)("Preview","templates-patterns-collection")),!l&&Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",onClick:function(e){if(e.preventDefault(),n(),o)return i(!0),!1;c(!0)}},Object(E.__)("Import","templates-patterns-collection")),p&&Object(r.createElement)(y.Button,{isLink:!0,className:"templates",onClick:function(e){e.preventDefault(),n(),s()}},Object(E.__)("View Pages","templates-patterns-collection"))),u&&Object(r.createElement)("div",{className:"image",style:{backgroundImage:'url("'.concat(u,'")')}})),Object(r.createElement)("div",{className:"bottom"},Object(r.createElement)("p",{className:"title"},m),l&&Object(r.createElement)("span",{className:"pro-badge"},Object(r.createElement)(y.Dashicon,{icon:"lock",size:15}),Object(r.createElement)("span",null,Object(E.__)("Premium","templates-patterns-collection")))))})),Je=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentSite,r=t.getThemeAction;return{siteData:n(),themeStatus:r().action||!1}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setCurrentSite,r=t.setPreviewStatus,a=t.setImportModalStatus,c=t.setInstallModalStatus;return{setSite:function(e){return n(e)},setPreview:function(e){return r(e)},setModal:function(e){return a(e)},setInstallModal:function(e){return c(e)}}})))((function(e){var t=e.next,n=e.prev,a=e.siteData,c=e.setSite,o=e.setPreview,i=e.setModal,s=e.themeStatus,l=e.setInstallModal;return Object(r.createElement)("div",{className:"ob-preview"},Object(r.createElement)("div",{className:"preview"},Object(r.createElement)("iframe",{src:a.url,frameBorder:"0"}),Object(r.createElement)("div",{className:"loading"},Object(r.createElement)(y.Dashicon,{icon:"update",size:50}))),Object(r.createElement)("div",{className:"bottom-bar"},Object(r.createElement)("div",{className:"navigator"},Object(r.createElement)(y.Button,{onClick:function(e){e.preventDefault(),o(!1),c(null)},className:"close",label:Object(E.__)("Close","templates-patterns-collection"),icon:G}),n&&Object(r.createElement)(y.Button,{onClick:function(e){e.preventDefault(),c(n)},className:"prev",label:Object(E.__)("Previous","templates-patterns-collection"),icon:Object(E.isRTL)()?W:q}),t&&Object(r.createElement)(y.Button,{onClick:function(e){e.preventDefault(),c(t)},className:"next",label:Object(E.__)("Next","templates-patterns-collection"),icon:Object(E.isRTL)()?q:W})),Object(r.createElement)("div",{className:"actions"},a.upsell?Object(r.createElement)(y.Button,{className:"upgrade",isPrimary:!0,href:a.utmOutboundLink||tiobDash.upgradeURL},Object(E.__)("Upgrade and Import","templates-patterns-collection")):Object(r.createElement)(y.Button,{className:"import",isPrimary:!0,onClick:function(e){if(e.preventDefault(),s)return l(!0),!1;i(!0)}},Object(E.__)("Import","templates-patterns-collection")))))})),Ye=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentCategory,r=t.getSearchQuery;return{category:n(),query:r()}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setCurrentCategory,r=t.setSearchQuery;return{setCurrentCategory:function(e){return n(e)},onSearch:function(e){return r(e)}}})))((function(e){var t=e.count,n=e.categories,a=e.onSearch,c=e.category,o=e.setCurrentCategory,i=e.query,s=e.className,l=Object(r.useState)(!1),u=j()(l,2),m=u[0],p=u[1],b=function(){return p(!m)},d=g()(s,"header-form");return Object(r.createElement)("div",{className:d},Object(r.createElement)("div",{className:"search"},Object(r.createElement)("img",{src:tiobDash.assets+"/img/search.svg",alt:Object(E.__)("Search Icon")}),Object(r.createElement)("input",{onChange:function(e){a(e.target.value)},type:"search",value:i,placeholder:Object(E.__)("Search for a starter site","templates-patterns-collection")+"..."}),Object(r.createElement)((function(){return Object(r.createElement)("div",{className:"ob-dropdown categories-selector"},Object(r.createElement)(y.Button,{onClick:b,className:"select ob-dropdown"},n[c],Object(r.createElement)(y.Dashicon,{size:14,icon:m?"arrow-up-alt2":"arrow-down-alt2"}),m&&Object(r.createElement)(y.Popover,{position:"bottom center",onClose:b,noArrow:!0},m&&Object(r.createElement)("ul",{className:"options"},Object.keys(n).map((function(e,a){return e===c||"free"===e&&t.all===t[e]?null:Object(r.createElement)("li",{key:a},Object(r.createElement)("a",{href:"#",onClick:function(t){t.preventDefault(),o(e),p(!1)}},Object(r.createElement)("span",null,n[e]),Object(r.createElement)("span",{className:"count"},t[e])))}))))))}),null)))})),Ke=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getSites;return{editor:n(),sites:r().sites}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding").setCurrentEditor;return{setCurrentEditor:function(e){return t(e)}}})))((function(e){var t=e.EDITOR_MAP,n=e.count,a=e.editor,c=e.setCurrentEditor,o=e.sites,i=e.isSmall,s=Object(r.useState)(!1),l=j()(s,2),u=l[0],m=l[1],p=Object.keys(o),b=function(){return m(!u)},d=g()(["ob-dropdown","editor-selector",{small:i}]);return Object(r.createElement)("div",{className:d},Object(r.createElement)(y.Button,{onClick:b,className:"select ob-dropdown"},Object(r.createElement)("img",{className:"editor-icon",src:tiobDash.assets+"img/"+t[a].icon,alt:Object(E.__)("Builder Logo","templates-patterns-collection")}),!i&&Object(r.createElement)("span",null,t[a].niceName),Object(r.createElement)("span",{className:"count"},n[a]),Object(r.createElement)(y.Dashicon,{size:14,icon:u?"arrow-up-alt2":"arrow-down-alt2"}),u&&Object(r.createElement)(y.Popover,{position:"bottom center",onClose:b,noArrow:!0},u&&Object(r.createElement)("ul",{className:"options"},p.map((function(e,o){return e===a?null:Object(r.createElement)("li",{key:o},Object(r.createElement)("a",{href:"#",onClick:function(t){t.preventDefault(),c(e),m(!1)}},Object(r.createElement)("img",{className:"editor-icon",src:tiobDash.assets+"img/"+t[e].icon,alt:Object(E.__)("Builder Logo","templates-patterns-collection")}),Object(r.createElement)("span",null,t[e].niceName),Object(r.createElement)("span",{className:"count"},n[e])))}))))))})),Ze=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getSites;return{editor:n(),sites:r().sites}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding").setCurrentEditor;return{setCurrentEditor:function(e){return t(e)}}})))((function(e){var t=e.EDITOR_MAP,n=e.count,a=e.onlyProSites,c=e.editor,o=e.setCurrentEditor,i=e.sites,s=Object.keys(i);return Object(r.createElement)("div",{className:"editor-tabs"},s.map((function(e,i){var s=g()(["tab",e,{active:e===c}]);return Object(r.createElement)("a",{key:i,href:"#",className:s,onClick:function(t){t.preventDefault(),o(e)}},Object(r.createElement)("span",{className:"icon-wrap"},Object(r.createElement)("img",{className:"editor-icon",src:tiobDash.assets+"img/"+t[e].icon,alt:Object(E.__)("Builder Logo","templates-patterns-collection")})),Object(r.createElement)("span",{className:"editor"},t[e].niceName),Object(r.createElement)("span",{className:"count"},n[e]),a.includes(e)&&Object(r.createElement)("span",{className:"pro-badge"},"PRO"))})))})),Xe=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setOnboardingState,r=t.setCurrentCategory;return{cancelOnboarding:function(){n(!1)},resetCategory:function(){r("all")},setCurrentTab:t.setCurrentTab}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getCurrentCategory,a=t.getOnboardingStatus,c=t.getSites;return{editor:n(),category:r(),isOnboarding:a(),getSites:c()}})))((function(e){var t,n=e.filterByCategory,a=e.filterBySearch,c=e.getSitesForBuilder,o=e.isOnboarding,i=e.getSites,s=e.category,l=e.editor,u=Object(r.useState)(!1),m=j()(u,2),p=m[0],b=m[1],d=i.sites,f=void 0===d?{}:d,h=i.migration,g={top:p?0:"-100%"},O=Object.keys(f),v=O.filter((function(e){return Object.keys(f[e]).filter((function(t){return!0===f[e][t].upsell})).length===Object.keys(f[e]).length})),E=(t={builders:{},categories:{}},O.forEach((function(e){var r=c(e);r=n(r,s),r=a(r),t.builders[e]=r?r.length:0})),Object.keys(Be).forEach((function(e){var r=c(l);r=n(r,e),r=a(r),t.categories[e]=r?r.length:0})),t);return Object(r.createElement)(r.Fragment,null,!o&&!h&&Object(r.createElement)("div",{className:"sticky-nav",style:g},Object(r.createElement)("div",{className:"container sticky-nav-content"},!tiobDash.brandedTheme&&Object(r.createElement)(y.Icon,{icon:$e,size:32}),Object(r.createElement)(Ye,{className:"in-sticky",count:E.categories,categories:Be}),Object(r.createElement)(Ke,{isSmall:!0,count:E.builders,EDITOR_MAP:Ae}))),Object(r.createElement)($.a,{onChange:function(e){b(!e)}},Object(r.createElement)("div",null,!o&&Object(r.createElement)("p",{className:"instructions"},tiobDash.strings.starterSitesTabDescription),Object(r.createElement)(Ke,{count:E.builders,EDITOR_MAP:Ae}),Object(r.createElement)(Ye,{count:E.categories,categories:Be}),Object(r.createElement)(Ze,{EDITOR_MAP:Ae,onlyProSites:v,count:E.builders}))))})),et=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setOnboardingState,r=t.setCurrentCategory;return{cancelOnboarding:function(){n(!1)},resetCategory:function(){r("all")},setCurrentTab:t.setCurrentTab,setSearchQuery:t.setSearchQuery}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getCurrentCategory,a=t.getPreviewStatus,c=t.getCurrentSite,o=t.getImportModalStatus,i=t.getOnboardingStatus,s=t.getSites,l=t.getInstallModalStatus,u=t.getCurrentTab,m=t.getSearchQuery;return{editor:n(),category:r(),previewOpen:a(),currentSiteData:c(),importModal:o(),installModal:l(),isOnboarding:i(),getSites:s(),currentTab:u(),searchQuery:m()}})))((function(e){var t=e.getSites,n=e.category,a=e.resetCategory,c=e.editor,o=e.previewOpen,i=e.currentSiteData,s=e.isOnboarding,l=e.cancelOnboarding,u=e.setSearchQuery,m=e.searchQuery,p=t.sites,b=void 0===p?{}:p,d=function(){var e={};return g().forEach((function(t){var n=b&&b[t]?b[t]:{};e[t]=U()(Object.values(n))})),e},f=function(e,t){return"free"===t?e.filter((function(e){return!e.upsell})):"all"!==t?e.filter((function(e){return e.keywords.includes(t)})):e},h=function(e){return m?new qe.a(e,{includeScore:!0,keys:["title","slug","keywords"]}).search(m).map((function(e){return e.item})):e},g=function(){return Object.keys(b)},O=function(){var e=d()[c];return e=h(e),f(e,n)},v=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null===i)return null;var t=d()[c],n=t.indexOf(i);return-1===n||1===t.length?null:e&&0===n?t[t.length-1]:e||n!==t.length-1?t[e?n-1:n+1]:t[0]};return 1>b.length?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(E.__)("Starter sites could not be loaded. Please refresh and try again.","neve"),s&&Object(r.createElement)(y.Button,{style:{display:"block",margin:"20px auto"},isPrimary:!0,onClick:l},Object(E.__)("Close","templates-patterns-collection")))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Xe,{getSitesForBuilder:function(e){return d()[e]},filterBySearch:h,filterByCategory:f}),0===O().length&&Object(r.createElement)("div",{className:"no-results"},Object(r.createElement)("p",null,Object(E.__)("No results found","templates-patterns-collection"),Object(E.__)("You can try a different search or use one of the categories below.","neve")),Object(r.createElement)("div",{className:"tags"},Le.map((function(e,t){return Object(r.createElement)(y.Button,{key:t,isPrimary:!0,className:"tag",onClick:function(t){t.preventDefault(),u(e),a()}},e)})))),Object(r.createElement)((function(){var e=Object(r.useState)(9),t=j()(e,2),n=t[0],a=t[1],c=O();return Object(r.createElement)("div",{className:"ob-sites is-grid"},c.slice(0,n).map((function(e,t){return Object(r.createElement)(Qe,{key:t,data:e})})),Object(r.createElement)($.a,{onChange:function(e){if(!e)return!1;a(n+9)}},Object(r.createElement)("span",{style:{height:10,width:10,display:"block"}})))}),null),o&&i&&Object(r.createElement)(Je,{next:v(),prev:v(!0)}))})),tt=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setOnboardingState,r=t.setCurrentCategory;return{cancelOnboarding:function(){n(!1)},resetCategory:function(){r("all")},setCurrentTab:t.setCurrentTab}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getCurrentCategory,a=t.getPreviewStatus,c=t.getCurrentSite,o=t.getImportModalStatus,i=t.getOnboardingStatus,s=t.getSites,l=t.getInstallModalStatus,u=t.getCurrentTab,m=t.getSingleImport;return{editor:n(),category:r(),previewOpen:a(),currentSiteData:c(),importModal:o(),installModal:l(),isOnboarding:i(),getSites:s(),currentTab:u(),singleImport:m()}})))((function(e){var t=e.getSites,n=e.installModal,a=e.currentTab,c=e.singleImport,o=e.importModal,i=e.currentSiteData,s=(e.isOnboarding,t.migration);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ob"},Object(r.createElement)(Ge,null),Object(r.createElement)("div",{className:"ob-body"},Object(r.createElement)("div",{className:"content-container"},s&&Object(r.createElement)(F,{data:s}),"starterSites"===a&&(c?Object(r.createElement)(Ve,{slug:c}):Object(r.createElement)(et,null)),"library"===a&&Object(r.createElement)(Ie,null),"pageTemplates"===a&&Object(r.createElement)(Ie,{isGeneral:!0})))),n&&Object(r.createElement)(D,null),o&&i&&Object(r.createElement)(Ue,null))})),nt=Object(f.withSelect)((function(e){return{onboarding:(0,e("neve-onboarding").getOnboardingStatus)()}}))((function(e){var t=e.onboarding,n=g()(["content-wrap","starter-sites",{"is-onboarding":t}]);return Object(r.createElement)("div",{className:"tiob-wrap"},Object(r.createElement)("div",{className:n},Object(r.createElement)("div",{className:"container content"},Object(r.createElement)("div",{className:"main"},Object(r.createElement)("div",{className:"tab-content columns starter-sites"},Object(r.createElement)(tt,null))))))}));Object(f.registerStore)("neve-onboarding",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REFRESH_SITES":var n=t.payload.sites;return i(i({},e),{},{sites:n});case"SET_CURRENT_EDITOR":var r=t.payload.editor;return localStorage.setItem("neve-onboarding-editor",r),i(i({},e),{},{editor:r});case"SET_CURRENT_CATEGORY":var a=t.payload.category;return i(i({},e),{},{category:a});case"SET_FOCUSED_SITE":var c=t.payload.siteData;return i(i({},e),{},{currentSite:c});case"SET_PREVIEW_STATUS":var o=t.payload.previewStatus;return i(i({},e),{},{previewStatus:o});case"SET_IMPORT_MODAL_STATUS":var s=t.payload.importModalStatus;return i(i({},e),{},{importModalStatus:s});case"SET_INSTALL_MODAL_STATUS":var l=t.payload.installModalStatus;return i(i({},e),{},{installModalStatus:l});case"SET_ONBOARDING":var u=t.payload.status;return i(i({},e),{},{isOnboarding:u});case"SET_THEME_ACTIONS":var m=t.payload.themeActions;return i(i({},e),{},{themeAction:m});case"SET_CURRENT_TAB":var p=t.payload.currentTab;return i(i({},e),{},{singleTemplateImport:null,currentTab:p});case"SET_FETCHING":var d=t.payload.fetching;return i(i({},e),{},{fetching:d});case"SET_SINGLE_TEMPLATE_IMPORT":var f=t.payload.slug;return i(i({},e),{},{singleTemplateImport:f});case"SET_TEMPLATE_MODAL":var h=t.payload.data;return i(i({},e),{},{templateModal:h});case"SET_SEARCH_QUERY":var g=t.payload.query;return i(i({},e),{},{searchQuery:g})}return e},actions:d,selectors:{getSites:function(e){return e.sites},getMigrationData:function(e){return e.migrationData},getCurrentEditor:function(e){return e.editor},getCurrentCategory:function(e){return e.category},getCurrentSite:function(e){return e.currentSite},getPreviewStatus:function(e){return e.previewStatus},getImportModalStatus:function(e){return e.importModalStatus},getOnboardingStatus:function(e){return e.isOnboarding},getThemeAction:function(e){return e.themeAction},getInstallModalStatus:function(e){return e.installModalStatus},getCurrentTab:function(e){return e.currentTab},getFetching:function(e){return e.fetching},getSingleImport:function(e){return e.singleTemplateImport},getTemplateModal:function(e){return e.templateModal},getSearchQuery:function(e){return e.searchQuery}}}),Object(r.render)(Object(r.createElement)(nt,null),document.getElementById("tpc-app"))}]);
|
1 |
+
(window.webpackJsonp_templates_patterns_collection=window.webpackJsonp_templates_patterns_collection||[]).push([[1],{21:function(e,t,n){}}]),function(e){function t(t){for(var r,o,i=t[0],s=t[1],l=t[2],m=0,p=[];m<i.length;m++)o=i[m],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(u&&u(t);p.length;)p.shift()();return c.push.apply(c,l||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,i=1;i<n.length;i++){var s=n[i];0!==a[s]&&(r=!1)}r&&(c.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},a={0:0},c=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var i=window.webpackJsonp_templates_patterns_collection=window.webpackJsonp_templates_patterns_collection||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var u=s;c.push([33,1]),n()}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t,n){var r=n(22),a=n(23),c=n(16),o=n(24);e.exports=function(e,t){return r(e)||a(e,t)||c(e,t)||o()}},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var o=a.apply(null,r);o&&e.push(o)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){function n(e,t,n,r,a,c,o){try{var i=e[c](o),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,a)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(a,c){var o=e.apply(t,r);function i(e){n(o,a,c,i,s,"next",e)}function s(e){n(o,a,c,i,s,"throw",e)}i(void 0)}))}}},function(e,t,n){"use strict";const r=n(30),a=n(31),c=n(32);function o(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function i(e,t){return t.encode?t.strict?r(e):encodeURIComponent(e):e}function s(e,t){return t.decode?a(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function p(e,t){o((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const n=function(e){let t;switch(e.arrayFormat){case"index":return(e,n,r)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===r[e]&&(r[e]={}),r[e][t[1]]=n):r[e]=n};case"bracket":return(e,n,r)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==r[e]?r[e]=[].concat(r[e],n):r[e]=[n]:r[e]=n};case"comma":case"separator":return(t,n,r)=>{const a="string"==typeof n&&n.includes(e.arrayFormatSeparator),c="string"==typeof n&&!a&&s(n,e).includes(e.arrayFormatSeparator);n=c?s(n,e):n;const o=a||c?n.split(e.arrayFormatSeparator).map(t=>s(t,e)):null===n?n:s(n,e);r[t]=o};default:return(e,t,n)=>{void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=t}}}(t),r=Object.create(null);if("string"!=typeof e)return r;if(!(e=e.trim().replace(/^[?#&]/,"")))return r;for(const a of e.split("&")){let[e,o]=c(t.decode?a.replace(/\+/g," "):a,"=");o=void 0===o?null:["comma","separator"].includes(t.arrayFormat)?o:s(o,t),n(s(e,t),o,r)}for(const e of Object.keys(r)){const n=r[e];if("object"==typeof n&&null!==n)for(const e of Object.keys(n))n[e]=m(n[e],t);else r[e]=m(n,t)}return!1===t.sort?r:(!0===t.sort?Object.keys(r).sort():Object.keys(r).sort(t.sort)).reduce((e,t)=>{const n=r[t];return Boolean(n)&&"object"==typeof n&&!Array.isArray(n)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(n):e[t]=n,e},Object.create(null))}t.extract=u,t.parse=p,t.stringify=(e,t)=>{if(!e)return"";o((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const n=n=>t.skipNull&&null==e[n]||t.skipEmptyString&&""===e[n],r=function(e){switch(e.arrayFormat){case"index":return t=>(n,r)=>{const a=n.length;return void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[i(t,e),"[",a,"]"].join("")]:[...n,[i(t,e),"[",i(a,e),"]=",i(r,e)].join("")]};case"bracket":return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,[i(t,e),"[]"].join("")]:[...n,[i(t,e),"[]=",i(r,e)].join("")];case"comma":case"separator":return t=>(n,r)=>null==r||0===r.length?n:0===n.length?[[i(t,e),"=",i(r,e)].join("")]:[[n,i(r,e)].join(e.arrayFormatSeparator)];default:return t=>(n,r)=>void 0===r||e.skipNull&&null===r||e.skipEmptyString&&""===r?n:null===r?[...n,i(t,e)]:[...n,[i(t,e),"=",i(r,e)].join("")]}}(t),a={};for(const t of Object.keys(e))n(t)||(a[t]=e[t]);const c=Object.keys(a);return!1!==t.sort&&c.sort(t.sort),c.map(n=>{const a=e[n];return void 0===a?"":null===a?i(n,t):Array.isArray(a)?a.reduce(r(n),[]).join("&"):i(n,t)+"="+i(a,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[n,r]=c(e,"#");return Object.assign({url:n.split("?")[0]||"",query:p(u(e),t)},t&&t.parseFragmentIdentifier&&r?{fragmentIdentifier:s(r,t)}:{})},t.stringifyUrl=(e,n)=>{n=Object.assign({encode:!0,strict:!0},n);const r=l(e.url).split("?")[0]||"",a=t.extract(e.url),c=t.parse(a,{sort:!1}),o=Object.assign(c,e.query);let s=t.stringify(o,n);s&&(s="?"+s);let u=function(e){let t="";const n=e.indexOf("#");return-1!==n&&(t=e.slice(n)),t}(e.url);return e.fragmentIdentifier&&(u="#"+i(e.fragmentIdentifier,n)),`${r}${s}${u}`}},function(e,t,n){var r=n(25),a=n(26),c=n(16),o=n(27);e.exports=function(e){return r(e)||a(e)||c(e)||o()}},function(e,t){e.exports=window.wp.apiFetch},,function(e,t,n){var r;r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},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=4)}([function(e,t,n){e.exports=n(5)()},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=function(e,t,n){var r=e.direction,a=e.value;switch(r){case"top":return n.top+a<t.top&&n.bottom>t.bottom&&n.left<t.left&&n.right>t.right;case"left":return n.left+a<t.left&&n.bottom>t.bottom&&n.top<t.top&&n.right>t.right;case"bottom":return n.bottom-a>t.bottom&&n.left<t.left&&n.right>t.right&&n.top<t.top;case"right":return n.right-a>t.right&&n.left<t.left&&n.top<t.top&&n.bottom>t.bottom}}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(1),a=n.n(r),c=n(2),o=n.n(c),i=n(0),s=n.n(i),l=n(3),u=n.n(l);function m(e){return(m="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 p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=function(e){function t(e){var n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this,r=d(t).call(this,e),n=!r||"object"!==m(r)&&"function"!=typeof r?b(this):r,h(b(n),"getContainer",(function(){return n.props.containment||window})),h(b(n),"addEventListener",(function(e,t,r,a){var c;n.debounceCheck||(n.debounceCheck={});var o=function(){c=null,n.check()},i={target:e,fn:a>-1?function(){c||(c=setTimeout(o,a||0))}:function(){clearTimeout(c),c=setTimeout(o,r||0)},getLastTimeout:function(){return c}};e.addEventListener(t,i.fn),n.debounceCheck[t]=i})),h(b(n),"startWatching",(function(){n.debounceCheck||n.interval||(n.props.intervalCheck&&(n.interval=setInterval(n.check,n.props.intervalDelay)),n.props.scrollCheck&&n.addEventListener(n.getContainer(),"scroll",n.props.scrollDelay,n.props.scrollThrottle),n.props.resizeCheck&&n.addEventListener(window,"resize",n.props.resizeDelay,n.props.resizeThrottle),!n.props.delayedCall&&n.check())})),h(b(n),"stopWatching",(function(){if(n.debounceCheck)for(var e in n.debounceCheck)if(n.debounceCheck.hasOwnProperty(e)){var t=n.debounceCheck[e];clearTimeout(t.getLastTimeout()),t.target.removeEventListener(e,t.fn),n.debounceCheck[e]=null}n.debounceCheck=null,n.interval&&(n.interval=clearInterval(n.interval))})),h(b(n),"check",(function(){var e,t,r=n.node;if(!r)return n.state;if(e=function(e){return void 0===e.width&&(e.width=e.right-e.left),void 0===e.height&&(e.height=e.bottom-e.top),e}(n.roundRectDown(r.getBoundingClientRect())),n.props.containment){var a=n.props.containment.getBoundingClientRect();t={top:a.top,left:a.left,bottom:a.bottom,right:a.right}}else t={top:0,left:0,bottom:window.innerHeight||document.documentElement.clientHeight,right:window.innerWidth||document.documentElement.clientWidth};var c=n.props.offset||{};"object"===m(c)&&(t.top+=c.top||0,t.left+=c.left||0,t.bottom-=c.bottom||0,t.right-=c.right||0);var o={top:e.top>=t.top,left:e.left>=t.left,bottom:e.bottom<=t.bottom,right:e.right<=t.right},i=e.height>0&&e.width>0,s=i&&o.top&&o.left&&o.bottom&&o.right;if(i&&n.props.partialVisibility){var l=e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left;"string"==typeof n.props.partialVisibility&&(l=o[n.props.partialVisibility]),s=n.props.minTopValue?l&&e.top<=t.bottom-n.props.minTopValue:l}"string"==typeof c.direction&&"number"==typeof c.value&&(console.warn("[notice] offset.direction and offset.value have been deprecated. They still work for now, but will be removed in next major version. Please upgrade to the new syntax: { %s: %d }",c.direction,c.value),s=u()(c,e,t));var p=n.state;return n.state.isVisible!==s&&(p={isVisible:s,visibilityRect:o},n.setState(p),n.props.onChange&&n.props.onChange(s)),p})),n.state={isVisible:null,visibilityRect:{}},n}var n,r;return 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&&f(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.node=o.a.findDOMNode(this),this.props.active&&this.startWatching()}},{key:"componentWillUnmount",value:function(){this.stopWatching()}},{key:"componentDidUpdate",value:function(e){this.node=o.a.findDOMNode(this),this.props.active&&!e.active?(this.setState({isVisible:null,visibilityRect:{}}),this.startWatching()):this.props.active||this.stopWatching()}},{key:"roundRectDown",value:function(e){return{top:Math.floor(e.top),left:Math.floor(e.left),bottom:Math.floor(e.bottom),right:Math.floor(e.right)}}},{key:"render",value:function(){return this.props.children instanceof Function?this.props.children({isVisible:this.state.isVisible,visibilityRect:this.state.visibilityRect}):a.a.Children.only(this.props.children)}}])&&p(n.prototype,r),t}(a.a.Component);h(g,"defaultProps",{active:!0,partialVisibility:!1,minTopValue:0,scrollCheck:!1,scrollDelay:250,scrollThrottle:-1,resizeCheck:!1,resizeDelay:250,resizeThrottle:-1,intervalCheck:!0,intervalDelay:100,delayedCall:!1,offset:{},containment:null,children:a.a.createElement("span",null)}),h(g,"propTypes",{onChange:s.a.func,active:s.a.bool,partialVisibility:s.a.oneOfType([s.a.bool,s.a.oneOf(["top","right","bottom","left"])]),delayedCall:s.a.bool,offset:s.a.oneOfType([s.a.shape({top:s.a.number,left:s.a.number,bottom:s.a.number,right:s.a.number}),s.a.shape({direction:s.a.oneOf(["top","right","bottom","left"]),value:s.a.number})]),scrollCheck:s.a.bool,scrollDelay:s.a.number,scrollThrottle:s.a.number,resizeCheck:s.a.bool,resizeDelay:s.a.number,resizeThrottle:s.a.number,intervalCheck:s.a.bool,intervalDelay:s.a.number,containment:"undefined"!=typeof window?s.a.instanceOf(window.Element):s.a.any,children:s.a.oneOfType([s.a.element,s.a.func]),minTopValue:s.a.number})},function(e,t,n){"use strict";var r=n(6);function a(){}function c(){}c.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,c,o){if(o!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}])},e.exports=r(n(28),n(29))},function(e,t,n){var r=n(17);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=window.wp.keycodes},function(e,t,n){var r;r=function(){"use strict";function e(t){return(e="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})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(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&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return!t||"object"!=typeof 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 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,r=s(e);if(t){var a=s(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return l(this,n)}}function m(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e)||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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function d(e){return Array.isArray?Array.isArray(e):"[object Array]"===v(e)}function b(e){return"string"==typeof e}function f(e){return"number"==typeof e}function h(t){return"object"===e(t)}function g(e){return null!=e}function O(e){return!e.trim().length}function v(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var j=function(e){return"Invalid value for key ".concat(e)},y=function(e){return"Pattern length exceeds max of ".concat(e,".")},E=Object.prototype.hasOwnProperty,_=function(){function e(n){var r=this;t(this,e),this._keys=[],this._keyMap={};var a=0;n.forEach((function(e){var t=w(e);a+=t.weight,r._keys.push(t),r._keyMap[t.id]=t,a+=t.weight})),this._keys.forEach((function(e){e.weight/=a}))}return r(e,[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}]),e}();function w(e){var t=null,n=null,r=null,a=1;if(b(e)||d(e))r=e,t=S(e),n=k(e);else{if(!E.call(e,"name"))throw new Error("Missing ".concat("name"," property in key"));var c=e.name;if(r=c,E.call(e,"weight")&&(a=e.weight)<=0)throw new Error(function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")}(c));t=S(c),n=k(c)}return{path:t,id:n,weight:a,src:r}}function S(e){return d(e)?e:e.split(".")}function k(e){return d(e)?e.join("."):e}var C=o({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},{},{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},{},{location:0,threshold:.6,distance:100},{},{useExtendedSearch:!1,getFn:function(e,t){var n=[],r=!1;return function e(t,a,c){if(g(t))if(a[c]){var o=t[a[c]];if(!g(o))return;if(c===a.length-1&&(b(o)||f(o)||function(e){return!0===e||!1===e||function(e){return h(e)&&null!==e}(e)&&"[object Boolean]"==v(e)}(o)))n.push(function(e){return null==e?"":function(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}(o));else if(d(o)){r=!0;for(var i=0,s=o.length;i<s;i+=1)e(o[i],a,c+1)}else a.length&&e(o,a,c+1)}else n.push(t)}(e,b(t)?t.split("."):t,0),r?n:n[0]},ignoreLocation:!1,ignoreFieldNorm:!1}),N=/[^ ]+/g;function T(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,t=new Map,n=Math.pow(10,e);return{get:function(e){var r=e.match(N).length;if(t.has(r))return t.get(r);var a=1/Math.sqrt(r),c=parseFloat(Math.round(a*n)/n);return t.set(r,c),c},clear:function(){t.clear()}}}var M=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.getFn,a=void 0===r?C.getFn:r;t(this,e),this.norm=T(3),this.getFn=a,this.isCreated=!1,this.setIndexRecords()}return r(e,[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach((function(t,n){e._keysMap[t.id]=n}))}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,b(this.docs[0])?this.docs.forEach((function(t,n){e._addString(t,n)})):this.docs.forEach((function(t,n){e._addObject(t,n)})),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();b(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(g(e)&&!O(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach((function(t,a){var c=n.getFn(e,t.path);if(g(c))if(d(c))!function(){for(var e=[],t=[{nestedArrIndex:-1,value:c}];t.length;){var o=t.pop(),i=o.nestedArrIndex,s=o.value;if(g(s))if(b(s)&&!O(s)){var l={v:s,i:i,n:n.norm.get(s)};e.push(l)}else d(s)&&s.forEach((function(e,n){t.push({nestedArrIndex:n,value:e})}))}r.$[a]=e}();else if(!O(c)){var o={v:c,n:n.norm.get(c)};r.$[a]=o}})),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}]),e}();function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,a=void 0===r?C.getFn:r,c=new M({getFn:a});return c.setKeys(e.map(w)),c.setSources(t),c.create(),c}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,a=t.currentLocation,c=void 0===a?0:a,o=t.expectedLocation,i=void 0===o?0:o,s=t.distance,l=void 0===s?C.distance:s,u=t.ignoreLocation,m=void 0===u?C.ignoreLocation:u,p=r/e.length;if(m)return p;var d=Math.abs(i-c);return l?p+d/l:d?1:p}function D(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C.minMatchCharLength,n=[],r=-1,a=-1,c=0,o=e.length;c<o;c+=1){var i=e[c];i&&-1===r?r=c:i||-1===r||((a=c-1)-r+1>=t&&n.push([r,a]),r=-1)}return e[c-1]&&c-r>=t&&n.push([r,c-1]),n}function I(e){for(var t={},n=0,r=e.length;n<r;n+=1){var a=e.charAt(n);t[a]=(t[a]||0)|1<<r-n-1}return t}var L=function(){function e(n){var r=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=a.location,o=void 0===c?C.location:c,i=a.threshold,s=void 0===i?C.threshold:i,l=a.distance,u=void 0===l?C.distance:l,m=a.includeMatches,p=void 0===m?C.includeMatches:m,d=a.findAllMatches,b=void 0===d?C.findAllMatches:d,f=a.minMatchCharLength,h=void 0===f?C.minMatchCharLength:f,g=a.isCaseSensitive,O=void 0===g?C.isCaseSensitive:g,v=a.ignoreLocation,j=void 0===v?C.ignoreLocation:v;if(t(this,e),this.options={location:o,threshold:s,distance:u,includeMatches:p,findAllMatches:b,minMatchCharLength:h,isCaseSensitive:O,ignoreLocation:j},this.pattern=O?n:n.toLowerCase(),this.chunks=[],this.pattern.length){var y=function(e,t){r.chunks.push({pattern:e,alphabet:I(e),startIndex:t})},E=this.pattern.length;if(E>32){for(var _=0,w=E%32,S=E-w;_<S;)y(this.pattern.substr(_,32),_),_+=32;if(w){var k=E-32;y(this.pattern.substr(k),k)}}else y(this.pattern,0)}}return r(e,[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var a={isMatch:!0,score:0};return r&&(a.indices=[[0,e.length-1]]),a}var c=this.options,o=c.location,i=c.distance,s=c.threshold,l=c.findAllMatches,u=c.minMatchCharLength,p=c.ignoreLocation,d=[],b=0,f=!1;this.chunks.forEach((function(t){var n=t.pattern,a=t.alphabet,c=t.startIndex,h=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=r.location,c=void 0===a?C.location:a,o=r.distance,i=void 0===o?C.distance:o,s=r.threshold,l=void 0===s?C.threshold:s,u=r.findAllMatches,m=void 0===u?C.findAllMatches:u,p=r.minMatchCharLength,d=void 0===p?C.minMatchCharLength:p,b=r.includeMatches,f=void 0===b?C.includeMatches:b,h=r.ignoreLocation,g=void 0===h?C.ignoreLocation:h;if(t.length>32)throw new Error(y(32));for(var O,v=t.length,j=e.length,E=Math.max(0,Math.min(c,j)),_=l,w=E,S=d>1||f,k=S?Array(j):[];(O=e.indexOf(t,w))>-1;){var N=P(t,{currentLocation:O,expectedLocation:E,distance:i,ignoreLocation:g});if(_=Math.min(N,_),w=O+v,S)for(var T=0;T<v;)k[O+T]=1,T+=1}w=-1;for(var M=[],x=1,I=v+j,L=1<<v-1,A=0;A<v;A+=1){for(var B=0,R=I;B<R;){var F=P(t,{errors:A,currentLocation:E+R,expectedLocation:E,distance:i,ignoreLocation:g});F<=_?B=R:I=R,R=Math.floor((I-B)/2+B)}I=R;var z=Math.max(1,E-R+1),U=m?j:Math.min(E+R,j)+v,V=Array(U+2);V[U+1]=(1<<A)-1;for(var $=U;$>=z;$-=1){var H=$-1,G=n[e.charAt(H)];if(S&&(k[H]=+!!G),V[$]=(V[$+1]<<1|1)&G,A&&(V[$]|=(M[$+1]|M[$])<<1|1|M[$+1]),V[$]&L&&(x=P(t,{errors:A,currentLocation:H,expectedLocation:E,distance:i,ignoreLocation:g}))<=_){if(_=x,(w=H)<=E)break;z=Math.max(1,2*E-w)}}var q=P(t,{errors:A+1,currentLocation:E,expectedLocation:E,distance:i,ignoreLocation:g});if(q>_)break;M=V}var W={isMatch:w>=0,score:Math.max(.001,x)};if(S){var Q=D(k,d);Q.length?f&&(W.indices=Q):W.isMatch=!1}return W}(e,n,a,{location:o+c,distance:i,threshold:s,findAllMatches:l,minMatchCharLength:u,includeMatches:r,ignoreLocation:p}),g=h.isMatch,O=h.score,v=h.indices;g&&(f=!0),b+=O,g&&v&&(d=[].concat(m(d),m(v)))}));var h={isMatch:f,score:f?b/this.chunks.length:1};return f&&r&&(h.indices=d),h}}]),e}(),A=function(){function e(n){t(this,e),this.pattern=n}return r(e,[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return B(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return B(e,this.singleRegex)}}]),e}();function B(e,t){var n=e.match(t);return n?n[1]:null}var R=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}]),a}(A),F=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}]),a}(A),z=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}]),a}(A),U=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}]),a}(A),V=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}]),a}(A),$=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}]),a}(A),H=function(e){i(a,e);var n=u(a);function a(e){var r,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=c.location,i=void 0===o?C.location:o,s=c.threshold,l=void 0===s?C.threshold:s,u=c.distance,m=void 0===u?C.distance:u,p=c.includeMatches,d=void 0===p?C.includeMatches:p,b=c.findAllMatches,f=void 0===b?C.findAllMatches:b,h=c.minMatchCharLength,g=void 0===h?C.minMatchCharLength:h,O=c.isCaseSensitive,v=void 0===O?C.isCaseSensitive:O,j=c.ignoreLocation,y=void 0===j?C.ignoreLocation:j;return t(this,a),(r=n.call(this,e))._bitapSearch=new L(e,{location:i,threshold:l,distance:m,includeMatches:d,findAllMatches:f,minMatchCharLength:g,isCaseSensitive:v,ignoreLocation:y}),r}return r(a,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}]),a}(A),G=function(e){i(a,e);var n=u(a);function a(e){return t(this,a),n.call(this,e)}return r(a,[{key:"search",value:function(e){for(var t,n=0,r=[],a=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+a,r.push([t,n-1]);var c=!!r.length;return{isMatch:c,score:c?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}]),a}(A),q=[R,G,z,U,$,V,F,H],W=q.length,Q=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split("|").map((function(e){for(var n=e.trim().split(Q).filter((function(e){return e&&!!e.trim()})),r=[],a=0,c=n.length;a<c;a+=1){for(var o=n[a],i=!1,s=-1;!i&&++s<W;){var l=q[s],u=l.isMultiMatch(o);u&&(r.push(new l(u,t)),i=!0)}if(!i)for(s=-1;++s<W;){var m=q[s],p=m.isSingleMatch(o);if(p){r.push(new m(p,t));break}}}return r}))}var J=new Set([H.type,G.type]),K=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=r.isCaseSensitive,c=void 0===a?C.isCaseSensitive:a,o=r.includeMatches,i=void 0===o?C.includeMatches:o,s=r.minMatchCharLength,l=void 0===s?C.minMatchCharLength:s,u=r.ignoreLocation,m=void 0===u?C.ignoreLocation:u,p=r.findAllMatches,d=void 0===p?C.findAllMatches:p,b=r.location,f=void 0===b?C.location:b,h=r.threshold,g=void 0===h?C.threshold:h,O=r.distance,v=void 0===O?C.distance:O;t(this,e),this.query=null,this.options={isCaseSensitive:c,includeMatches:i,minMatchCharLength:l,findAllMatches:d,ignoreLocation:m,location:f,threshold:g,distance:v},this.pattern=c?n:n.toLowerCase(),this.query=Y(this.pattern,this.options)}return r(e,[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var a=0,c=[],o=0,i=0,s=t.length;i<s;i+=1){var l=t[i];c.length=0,a=0;for(var u=0,p=l.length;u<p;u+=1){var d=l[u],b=d.search(e),f=b.isMatch,h=b.indices,g=b.score;if(!f){o=0,a=0,c.length=0;break}if(a+=1,o+=g,r){var O=d.constructor.type;J.has(O)?c=[].concat(m(c),m(h)):c.push(h)}}if(a){var v={isMatch:!0,score:o/a};return r&&(v.indices=c),v}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}]),e}(),Z=[];function X(e,t){for(var n=0,r=Z.length;n<r;n+=1){var a=Z[n];if(a.condition(e,t))return new a(e,t)}return new L(e,t)}var ee="$and",te="$path",ne=function(e){return!(!e[ee]&&!e.$or)},re=function(e){return!!e[te]},ae=function(e){return!d(e)&&h(e)&&!ne(e)},ce=function(e){return a({},ee,Object.keys(e).map((function(t){return a({},t,e[t])})))};function oe(e,t){var n=t.ignoreFieldNorm,r=void 0===n?C.ignoreFieldNorm:n;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var n=e.key,a=e.norm,c=e.score,o=n?n.weight:null;t*=Math.pow(0===c&&o?Number.EPSILON:c,(o||1)*(r?1:a))})),e.score=t}))}function ie(e,t){var n=e.matches;t.matches=[],g(n)&&n.forEach((function(e){if(g(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}}))}function se(e,t){t.score=e.score}function le(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,a=void 0===r?C.includeMatches:r,c=n.includeScore,o=void 0===c?C.includeScore:c,i=[];return a&&i.push(ie),o&&i.push(se),e.map((function(e){var n=e.idx,r={item:t[n],refIndex:n};return i.length&&i.forEach((function(t){t(e,r)})),r}))}var ue=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0;t(this,e),this.options=o({},C,{},r),this.options.useExtendedSearch,this._keyStore=new _(this.options.keys),this.setCollection(n,a)}return r(e,[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof M))throw new Error("Incorrect 'index' type");this._myIndex=t||x(this.options.keys,this._docs,{getFn:this.options.getFn})}},{key:"add",value:function(e){g(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var a=this._docs[n];e(a,n)&&(this.removeAt(n),n-=1,r-=1,t.push(a))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.limit,r=void 0===n?-1:n,a=this.options,c=a.includeMatches,o=a.includeScore,i=a.shouldSort,s=a.sortFn,l=a.ignoreFieldNorm,u=b(e)?b(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return oe(u,{ignoreFieldNorm:l}),i&&u.sort(s),f(r)&&r>-1&&(u=u.slice(0,r)),le(u,this._docs,{includeMatches:c,includeScore:o})}},{key:"_searchStringList",value:function(e){var t=X(e,this.options),n=this._myIndex.records,r=[];return n.forEach((function(e){var n=e.v,a=e.i,c=e.n;if(g(n)){var o=t.searchIn(n),i=o.isMatch,s=o.score,l=o.indices;i&&r.push({item:n,idx:a,matches:[{score:s,value:n,norm:c,indices:l}]})}})),r}},{key:"_searchLogical",value:function(e){var t=this,n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.auto,a=void 0===r||r,c=function e(n){var r=Object.keys(n),c=re(n);if(!c&&r.length>1&&!ne(n))return e(ce(n));if(ae(n)){var o=c?n[te]:r[0],i=c?n.$val:n[o];if(!b(i))throw new Error(j(o));var s={keyId:k(o),pattern:i};return a&&(s.searcher=X(i,t)),s}var l={children:[],operator:r[0]};return r.forEach((function(t){var r=n[t];d(r)&&r.forEach((function(t){l.children.push(e(t))}))})),l};return ne(e)||(e=ce(e)),c(e)}(e,this.options),r=this._myIndex.records,a={},c=[];return r.forEach((function(e){var r=e.$,o=e.i;if(g(r)){var i=function e(n,r,a){if(!n.children){var c=n.keyId,o=n.searcher,i=t._findMatches({key:t._keyStore.get(c),value:t._myIndex.getValueForItemAtKeyId(r,c),searcher:o});return i&&i.length?[{idx:a,item:r,matches:i}]:[]}switch(n.operator){case ee:for(var s=[],l=0,u=n.children.length;l<u;l+=1){var p=e(n.children[l],r,a);if(!p.length)return[];s.push.apply(s,m(p))}return s;case"$or":for(var d=[],b=0,f=n.children.length;b<f;b+=1){var h=e(n.children[b],r,a);if(h.length){d.push.apply(d,m(h));break}}return d}}(n,r,o);i.length&&(a[o]||(a[o]={idx:o,item:r,matches:[]},c.push(a[o])),i.forEach((function(e){var t,n=e.matches;(t=a[o].matches).push.apply(t,m(n))})))}})),c}},{key:"_searchObjectList",value:function(e){var t=this,n=X(e,this.options),r=this._myIndex,a=r.keys,c=r.records,o=[];return c.forEach((function(e){var r=e.$,c=e.i;if(g(r)){var i=[];a.forEach((function(e,a){i.push.apply(i,m(t._findMatches({key:e,value:r[a],searcher:n})))})),i.length&&o.push({idx:c,item:r,matches:i})}})),o}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!g(n))return[];var a=[];if(d(n))n.forEach((function(e){var n=e.v,c=e.i,o=e.n;if(g(n)){var i=r.searchIn(n),s=i.isMatch,l=i.score,u=i.indices;s&&a.push({score:l,key:t,value:n,idx:c,norm:o,indices:u})}}));else{var c=n.v,o=n.n,i=r.searchIn(c),s=i.isMatch,l=i.score,u=i.indices;s&&a.push({score:l,key:t,value:c,norm:o,indices:u})}return a}}]),e}();return ue.version="6.4.6",ue.createIndex=x,ue.parseIndex=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?C.getFn:n,a=e.keys,c=e.records,o=new M({getFn:r});return o.setKeys(a),o.setIndexRecords(c),o},ue.config=C,function(){Z.push.apply(Z,arguments)}(K),ue},e.exports=r()},,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,a=!1,c=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(a)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){var r=n(17);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=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(e,t){e.exports=window.React},function(e,t){e.exports=window.ReactDOM},function(e,t,n){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,n){"use strict";var r=new RegExp("%[a-f0-9]{2}","gi"),a=new RegExp("(%[a-f0-9]{2})+","gi");function c(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var n=e.slice(0,t),r=e.slice(t);return Array.prototype.concat.call([],c(n),c(r))}function o(e){try{return decodeURIComponent(e)}catch(a){for(var t=e.match(r),n=1;n<t.length;n++)t=(e=c(t,n).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},n=a.exec(e);n;){try{t[n[0]]=decodeURIComponent(n[0])}catch(e){var r=o(n[0]);r!==n[0]&&(t[n[0]]=r)}n=a.exec(e)}t["%C2"]="�";for(var c=Object.keys(t),i=0;i<c.length;i++){var s=c[i];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}}},function(e,t,n){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const n=e.indexOf(t);return-1===n?[e]:[e.slice(0,n),e.slice(n+t.length)]}},function(e,t,n){"use strict";n.r(t);var r=n(0),a=(n(21),n(9)),c=n.n(a);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=tiobDash,l=s.onboarding,u=s.themeAction,m=void 0!==l.sites&&void 0!==l.sites.sites?Object.keys(l.sites.sites)[0]:"gutenberg",p=localStorage.getItem("neve-onboarding-editor")||m,d={sites:l.sites||{},editor:p,category:"all",previewStatus:!1,importModalStatus:!1,installModalStatus:!1,currentSite:null,importing:!1,isOnboarding:l.onboarding||!1,migrationData:null,themeAction:u,currentTab:"starterSites",fetching:!1,singleTemplateImport:null,templateModal:null,searchQuery:""},b={refreshSites:function(e){return{type:"REFRESH_SITES",payload:{sites:e}}},setCurrentEditor:function(e){return{type:"SET_CURRENT_EDITOR",payload:{editor:e}}},setCurrentCategory:function(e){return{type:"SET_CURRENT_CATEGORY",payload:{category:e}}},setCurrentSite:function(e){return{type:"SET_FOCUSED_SITE",payload:{siteData:e}}},setPreviewStatus:function(e){return e?document.body.classList.add("ob-overflow-off"):document.body.classList.remove("ob-overflow-off"),{type:"SET_PREVIEW_STATUS",payload:{previewStatus:e}}},setImportModalStatus:function(e){return e?document.body.classList.add("ob-overflow-off"):document.body.classList.remove("ob-overflow-off"),{type:"SET_IMPORT_MODAL_STATUS",payload:{importModalStatus:e}}},setInstallModalStatus:function(e){return e?document.body.classList.add("ob-overflow-off"):document.body.classList.remove("ob-overflow-off"),{type:"SET_INSTALL_MODAL_STATUS",payload:{installModalStatus:e}}},setOnboardingState:function(e){return{type:"SET_ONBOARDING",payload:{state:e}}},setThemeAction:function(e){return{type:"SET_THEME_ACTIONS",payload:{themeActions:e}}},setCurrentTab:function(e){return{type:"SET_CURRENT_TAB",payload:{currentTab:e}}},setFetching:function(e){return{type:"SET_FETCHING",payload:{fetching:e}}},setSingleTemplateImport:function(e){return{type:"SET_SINGLE_TEMPLATE_IMPORT",payload:{slug:e}}},setTemplateModal:function(e){return{type:"SET_TEMPLATE_MODAL",payload:{data:e}}},setSearchQuery:function(e){return{type:"SET_SEARCH_QUERY",payload:{query:e}}}},f=n(4),h=n(6),g=n.n(h),O=n(8),v=n(3),j=n.n(v),y=n(2),E=n(1),_=n(7),w=n.n(_),S=n(10),k=n.n(S),C=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return T(e,n,t)},N=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return T(e,t,{},"GET",n)},T=function(){var e=k()(w.a.mark((function e(t){var n,r,a,c,o,i=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>1&&void 0!==i[1]&&i[1],r=i.length>2&&void 0!==i[2]?i[2]:{},a=i.length>3&&void 0!==i[3]?i[3]:"POST",c=!(i.length>4&&void 0!==i[4])||i[4],o={method:a,headers:{Accept:"application/json","Content-Type":"application/json"}},c&&(o.headers["x-wp-nonce"]=tiobDash.nonce),"POST"===a&&(o.body=JSON.stringify(r)),e.next=9,fetch(t,o).then((function(e){return n?e:e.json()}));case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P,D=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getSingleImport;return{themeData:(0,t.getThemeAction)()||!1,singleImport:n()}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setImportModalStatus,r=t.setInstallModalStatus,a=t.setThemeAction,c=t.setTemplateModal;return{setImportModal:function(e){return n(e)},setInstallModal:function(e){return r(e)},setThemeAction:function(e){return a(e)},showTemplateModal:function(){return c(!0)}}})))((function(e){var t=e.setImportModal,n=e.setInstallModal,a=e.themeData,c=e.setThemeAction,o=e.singleImport,i=e.showTemplateModal,s=a.action,l=a.slug,u=a.nonce,m=tiobDash,p=m.themesURL,d=m.brandedTheme,b=Object(r.useState)(!1),f=j()(b,2),h=f[0],g=f[1],O=Object(r.useState)(null),v=j()(O,2),_=v[0],w=v[1],S=function(){n(!1)},k=function(e){g(!1),w(Object(E.sprintf)(// translators: %s: Error message.
|
2 |
+
Object(E.__)("An error has ocurred: %s","templates-patterns-collection"),e))},C=function(){g("activating");var e="".concat(p,"?action=activate&stylesheet=").concat(l,"&_wpnonce=").concat(u);N(e,!0).then((function(e){return 200!==e.status?(k(Object(E.__)("Could not activate theme.","templates-patterns-collection")),g(!1),!1):(g(!1),n(!1),c(!1),o?(i(),!1):void t(!0))}))};return Object(r.createElement)(y.Modal,{className:"ob-import-modal install-modal",title:Object(E.__)("Install and Activate Neve","templates-patterns-collection"),onRequestClose:S,shouldCloseOnClickOutside:!h,isDismissible:!h},Object(r.createElement)("div",{className:"modal-body",style:{textAlign:"center"}},!d&&Object(r.createElement)("img",{style:{width:75},src:"".concat(tiobDash.assets,"/img/logo.svg"),alt:Object(E.__)("Logo","templates-patterns-collection")}),_&&Object(r.createElement)("div",{className:"well error",style:{margin:"20px 0"}},_),Object(r.createElement)("p",{style:{lineHeight:1.6,fontSize:"15px"}},Object(E.__)("In order to import the starter site, Neve theme has to be installed and activated. Click the button below to install and activate Neve","templates-patterns-collection"))),Object(r.createElement)("div",{className:"modal-footer",style:{justifyContent:"center"}},Object(r.createElement)("div",{className:"actions",style:{display:"flex"}},!_&&Object(r.createElement)(y.Button,{dismiss:_,isPrimary:!0,disabled:h,className:h&&"is-loading",icon:h&&"update",onClick:"install"===s?function(){g("installing"),wp.updates.installTheme({slug:"neve",success:function(){c(x(x({},a),{},{action:"activate"})),C()},error:function(e){c(x(x({},a),{},{action:"activate"})),k(e.errorMessage||Object(E.__)("Could not install theme.","templates-patterns-collection"))}})}:C},h&&("installing"===h?Object(E.__)("Installing"):Object(E.__)("Activating")),!h&&("install"===s?Object(E.__)("Install and Activate","templates-patterns-collection"):Object(E.__)("Activate","templates-patterns-collection"))),Object(r.createElement)(y.Button,{style:{marginLeft:30},isSecondary:!0,disabled:h,onClick:S},Object(E.__)("Close","templates-patterns-collection")))))})),I=tiobDash.onboarding,L=function(e){return C(I.root+"/install_plugins",e)},A=function(){var e=k()(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={},t.forEach((function(e){"elementor"===e.template_type?n.elementor=!0:"beaver"===e.template_type&&(n["beaver-builder-lite-version"]=!0)})),!(Object.keys(n).length>0)){e.next=11;break}return e.prev=3,e.next=6,L(n);case 6:e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(3),e.abrupt("return",error);case 11:return e.abrupt("return",C(I.root+"/import_single_templates",t));case 12:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(t){return e.apply(this,arguments)}}(),B=function(e){var t=e.data,n=e.externalInstalled,a=t.external_plugins||null,c=g()(["well"]);return Object(r.createElement)("div",{className:c},a&&!n&&Object(r.createElement)("h3",{style:{marginTop:15}},Object(r.createElement)(y.Dashicon,{icon:"info"}),Object(r.createElement)("span",null,Object(E.__)("To import this demo you have to install the following plugins","neve"))),Object(r.createElement)("ul",null,a&&!n?a.map((function(e,t){return Object(r.createElement)("li",{key:t},Object(r.createElement)(y.Button,{isLink:!0,href:e.author_url},e.name))})):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("li",null,Object(E.__)("We recommend you backup your website content before attempting a full site import.","neve")),Object(r.createElement)("li",null,Object(E.__)("Some of the demo images will not be imported and will be replaced by placeholder images.","neve")))))},R=function(e){var t=e.message,n=e.code;return Object(r.createElement)("div",{className:"well error"},t&&Object(r.createElement)("h3",null,Object(r.createElement)(y.Dashicon,{icon:"warning"}),Object(r.createElement)("span",null,t)),Object(r.createElement)("ul",null,Object(r.createElement)("li",{dangerouslySetInnerHTML:{__html:tiobDash.onboarding.i18n.troubleshooting}}),Object(r.createElement)("li",{dangerouslySetInnerHTML:{__html:tiobDash.onboarding.i18n.support}}),n&&Object(r.createElement)("li",null,Object(E.__)("Error code","templates-patterns-collection"),":"," ",Object(r.createElement)("code",null,n)),Object(r.createElement)("li",null,Object(E.__)("Error log","templates-patterns-collection"),":"," ",Object(r.createElement)(y.Button,{isLink:!0,href:tiobDash.onboarding.logUrl},tiobDash.onboarding.logUrl,Object(r.createElement)(y.Dashicon,{icon:"external"})))))},F=function(e){var t=e.data,n=function(e){return console.log(e)},a=Object(r.useState)(!1),c=j()(a,2),o=c[0],i=c[1],s=Object(r.useState)(!1),l=j()(s,2),u=l[0],m=l[1],p=Object(r.useState)(!1),d=j()(p,2),b=d[0],f=d[1],h=Object(r.useState)(null),g=j()(h,2),O=g[0],v=g[1],_=Object(r.useState)(null),w=j()(_,2),S=w[0],k=w[1];if(o)return null;var N=function(){"done"===b&&i(!0),m(!1),v(null),f(!1)};return Object(r.createElement)("div",{className:"ob-migration"},u&&Object(r.createElement)(y.Modal,{className:"ob-import-modal migration",title:Object(E.__)("Migrate","templates-patterns-collection")+" "+t.theme_name,onRequestClose:N,shouldCloseOnClickOutside:!b,isDismissible:!b},Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},O&&Object(r.createElement)(R,{message:O.message||null,code:O.code||null}),!1===b&&!O&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(B,{data:t}),t.mandatory_plugins&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("hr",null),Object(r.createElement)("h3",null,Object(E.__)("The following plugins will be installed","neve"),":"),Object(r.createElement)("ul",null,Object.keys(t.mandatory_plugins).map((function(e,n){return Object(r.createElement)("li",{key:n},"-"," ",t.mandatory_plugins[e])}))))),"done"===b&&Object(r.createElement)("p",{className:"import-result"},Object(E.__)("Content was successfully imported. Enjoy your new site!","neve")),!0===b&&Object(r.createElement)("div",{className:"loading"},Object(r.createElement)(y.Dashicon,{icon:"update",size:50}),Object(r.createElement)("h3",null,Object(E.__)("Migrating","templates-patterns-collection"),"..."))),(!b||"done"===b)&&Object(r.createElement)("div",{className:"modal-footer"},Object(r.createElement)(y.Button,{isSecondary:"done"!==b,isLink:"done"===b,className:"done"===b?"close":null,onClick:N},"done"===b?Object(E.__)("Close","templates-patterns-collection"):Object(E.__)("Cancel","templates-patterns-collection")),O||"done"===b?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{style:{marginLeft:20},isSecondary:!0,href:"".concat(tiobDash.onboarding.homeUrl,"/wp-admin/post.php?post=").concat(S,"&action=elementor")},Object(E.__)("Edit Content","templates-patterns-collection")),Object(r.createElement)(y.Button,{isPrimary:!0,href:tiobDash.onboarding.homeUrl},Object(E.__)("View Website","templates-patterns-collection"))):Object(r.createElement)(y.Button,{isPrimary:!0,onClick:function(){var e;e=Object.keys(t.mandatory_plugins).reduce((function(e,t){return e[t]=!0,e}),{}),L(e).then((function(e){if(f(!0),!e.success)return v({code:e.data||null,message:Object(E.__)("Something went wrong while installing the necessary plugins.","neve")}),f(!1),!1;var n=t.template,r=t.template_name;C(tiobDash.onboarding.root+"/migrate_frontpage",{template:n,template_name:r}).then((function(e){if(!e.success)return v({code:e.data||null,message:Object(E.__)("Something went wrong while importing the website content.","neve")}),f(!1),!1;k(e.data),f("done")}))}))}},Object(E.__)("Start Migration","templates-patterns-collection"))))),Object(r.createElement)("h2",null,t.heading),Object(r.createElement)("p",null,t.description),Object(r.createElement)("div",{className:"card starter-site-card",style:{maxWidth:330}},Object(r.createElement)("div",{className:"top"},t.screenshot&&Object(r.createElement)("div",{className:"image"},Object(r.createElement)("img",{src:t.screenshot,alt:t.theme_name}))),Object(r.createElement)("div",{className:"bottom"},Object(r.createElement)("p",{className:"title"},t.theme_name))),Object(r.createElement)("div",{className:"actions"},Object(r.createElement)(y.Button,{isPrimary:!0,onClick:function(){return m(!0),!1}},Object(E.__)("Migrate","templates-patterns-collection")+" "+t.theme_name),Object(r.createElement)(y.Button,{isSecondary:!0,onClick:function(){C(tiobDash.onboarding.root+"/dismiss_migration",{theme_mod:t.theme_mod}).then((function(e){if(!e.success)return n(Object(E.__)("Something went wrong. Please reload the page and try again.","neve")),!1;n(Object(E.__)("Dismissed","templates-patterns-collection")),i(!0)}))}},Object(E.__)("Dismiss","templates-patterns-collection"))))},z=n(12),U=n.n(z),V=n(15),$=n.n(V),H=n(5),G=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),q=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),W=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),Q=n(13),Y=n.n(Q),J=n(11),K=new Uint8Array(16);function Z(){if(!P&&!(P="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return P(K)}for(var X=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ee=function(e){return"string"==typeof e&&X.test(e)},te=[],ne=0;ne<256;++ne)te.push((ne+256).toString(16).substr(1));var re=function(e,t,n){var r=(e=e||{}).random||(e.rng||Z)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(te[e[t+0]]+te[e[t+1]]+te[e[t+2]]+te[e[t+3]]+"-"+te[e[t+4]]+te[e[t+5]]+"-"+te[e[t+6]]+te[e[t+7]]+"-"+te[e[t+8]]+te[e[t+9]]+"-"+te[e[t+10]]+te[e[t+11]]+te[e[t+12]]+te[e[t+13]]+te[e[t+14]]+te[e[t+15]]).toLowerCase();if(!ee(n))throw TypeError("Stringified UUID is invalid");return n}(r)};function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe=function(){var e=k()(w.a.mark((function e(){var t,n,r,a,c,o,i=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]&&i[0],n=i.length>1&&void 0!==i[1]?i[1]:{},r=Object(J.stringifyUrl)({url:tiobDash.endpoint+(t?"page-templates":"templates"),query:ce(ce({cache:localStorage.getItem("tpcCacheBuster")},tiobDash.params),n)}),e.prev=3,e.next=6,Y()({url:r,method:"GET",parse:!1});case 6:if(!(a=e.sent).ok){e.next=15;break}return e.next=10,a.json();case 10:if(!(c=e.sent).message){e.next=13;break}return e.abrupt("return",{success:!1,message:c.message});case 13:return o=a.headers.get("x-wp-totalpages"),e.abrupt("return",{success:!0,total:o,templates:c});case 15:e.next=21;break;case 17:if(e.prev=17,e.t0=e.catch(3),!e.t0.message){e.next=21;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 21:case"end":return e.stop()}}),e,null,[[3,17]])})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=k()(w.a.mark((function e(t,n){var r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(J.stringifyUrl)({url:tiobDash.endpoint+"templates/"+t,query:ce(ce({cache:localStorage.getItem("tpcCacheBuster")},tiobDash.params),{},{template_id:t,template_name:n})}),e.prev=1,e.next=4,Y()({url:r,method:"POST"});case 4:return localStorage.setItem("tpcCacheBuster",re()),e.abrupt("return",{success:!0});case 8:if(e.prev=8,e.t0=e.catch(1),!e.t0.message){e.next=12;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t,n){return e.apply(this,arguments)}}(),se=function(){var e=k()(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(J.stringifyUrl)({url:"".concat(tiobDash.endpoint,"templates/").concat(t),query:ce({cache:localStorage.getItem("tpcCacheBuster"),_method:"DELETE"},tiobDash.params)}),e.prev=1,e.next=4,Y()({url:n,method:"POST"});case 4:return localStorage.setItem("tpcCacheBuster",re()),e.abrupt("return",{success:!0});case 8:if(e.prev=8,e.t0=e.catch(1),!e.t0.message){e.next=12;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=k()(w.a.mark((function e(t){var n,r,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(J.stringifyUrl)({url:"".concat(tiobDash.endpoint,"templates/bulk-import"),query:ce({templates:t,cache:localStorage.getItem("tpcCacheBuster")},tiobDash.params)}),e.prev=1,e.next=4,Y()({url:n,method:"GET",parse:!1});case 4:if(!(r=e.sent).ok){e.next=14;break}if(!r.message){e.next=8;break}return e.abrupt("return",{success:!1,message:r.message});case 8:return e.next=10,r.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",{success:!1,message:a.message});case 13:return e.abrupt("return",{success:!0,templates:a});case 14:e.next=20;break;case 16:if(e.prev=16,e.t0=e.catch(1),!e.t0.message){e.next=20;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 20:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e=k()(w.a.mark((function e(t){var n,r,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(J.stringifyUrl)({url:"".concat(tiobDash.endpoint,"templates/").concat(t,"/import"),query:ce({cache:localStorage.getItem("tpcCacheBuster")},tiobDash.params)}),r={},e.prev=2,e.next=5,Y()({url:n,method:"GET",parse:!1});case 5:if(!(a=e.sent).ok){e.next=12;break}return e.next=9,a.json();case 9:if(!(r=e.sent).message){e.next=12;break}return e.abrupt("return",{success:!1,message:r.message});case 12:e.next=18;break;case 14:if(e.prev=14,e.t0=e.catch(2),!e.t0.message){e.next=18;break}return e.abrupt("return",{success:!1,message:e.t0.message});case 18:return e.abrupt("return",{success:!0,templates:[r]});case 19:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(t){return e.apply(this,arguments)}}(),me=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(H.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"})),pe=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),de=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(r.createElement)(H.Path,{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"})),be=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"})),fe=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oe=function(e){var t=e.sortingOrder,n=e.item,a=e.loadTemplates,c=e.userTemplate,o=e.grid,i=e.onPreview,s=e.onImport,l=e.upsell,u=void 0!==l&&l,m=Object(r.useState)(!1),p=j()(m,2),d=p[0],b=p[1],f=Object(r.useState)(!1),h=j()(f,2),O=h[0],v=h[1],_=Object(r.useState)(n.template_name),S=j()(_,2),C=S[0],N=S[1],T=function(){var e=k()(w.a.mark((function e(t){var r,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),r=n.template_id,a=n.template_name,b("updating"),e.next=5,ie(r,C||a).then((function(e){e.success&&(v(!O),b(!1))}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=k()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.confirm(Object(E.__)("Are you sure you want to delete this template?"))){e.next=2;break}return e.abrupt("return",!1);case 2:b("deleteing"),se(n.template_id).then((function(e){e.success&&(a(ge({page:0},t)),b(!1))}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){i(n.link)},P=g()("actions",{"no-controls":!c});if(o){var D={backgroundImage:"url(".concat(n.template_thumbnail,")")};return Object(r.createElement)("div",{key:n.template_id,className:"table-grid"},Object(r.createElement)("div",{style:D,className:g()("grid-preview",{"is-loading":O||!1!==d})},Object(r.createElement)("div",{className:"preview-actions"},!c&&n.link&&Object(r.createElement)(y.Button,{isSecondary:!0,disabled:!1!==d,onClick:x},Object(E.__)("Preview")),!u&&Object(r.createElement)(y.Button,{isPrimary:!0,isBusy:"importing"===d,disabled:!1!==d,onClick:s},Object(E.__)("Import")),c&&Object(r.createElement)("div",{className:"preview-controls"},!n.link&&Object(r.createElement)(y.Button,{label:Object(E.__)("Edit"),icon:"updating"===d?me:pe,disabled:O||!1!==d,className:g()({"is-loading":"updating"===d}),onClick:function(){return v(!O)}}),Object(r.createElement)(y.Button,{label:Object(E.__)("Delete"),icon:"deleteing"===d?me:de,disabled:!1!==d,className:g()({"is-loading":"deleteing"===d}),onClick:M})))),Object(r.createElement)("div",{className:"card-footer"},O?Object(r.createElement)("form",{onSubmit:T},Object(r.createElement)(y.TextControl,{value:C,onChange:N}),Object(r.createElement)(y.Button,{type:"submit",label:Object(E.__)("Update"),icon:"updating"===d?me:be,disabled:!1!==d,className:g()({"is-loading":"updating"===d})})):Object(r.createElement)("p",null,C)))}return Object(r.createElement)("div",{key:n.template_id,className:"table-row"},Object(r.createElement)("div",{className:"title"},Object(r.createElement)(y.Icon,{icon:fe}),O?Object(r.createElement)(y.TextControl,{label:Object(E.__)("Template Name"),hideLabelFromVision:!0,value:C,onChange:N}):C),c&&Object(r.createElement)("div",{className:"controls"},n.link?Object(r.createElement)(y.Tooltip,{text:Object(E.__)("This template is synced to a page.")},Object(r.createElement)(y.Button,{label:Object(E.__)("Edit"),icon:pe,disabled:!0},Object(E.__)("Edit"))):Object(r.createElement)(y.Button,{label:O?Object(E.__)("Update"):Object(E.__)("Edit"),icon:O?"updating"===d?me:be:pe,disabled:!1!==d,className:g()({"is-loading":"updating"===d}),onClick:function(){return O?T:v(!O)}},O?Object(E.__)("Update"):Object(E.__)("Edit")),Object(r.createElement)(y.Button,{label:Object(E.__)("Delete"),icon:"deleteing"===d?me:de,disabled:!1!==d,className:g()({"is-loading":"deleteing"===d}),onClick:M},"deleting"===d?Object(E.__)("Deleting")+"...":Object(E.__)("Delete"))),Object(r.createElement)("div",{className:P},!c&&n.link&&Object(r.createElement)(y.Button,{isSecondary:!0,disabled:!1!==d,onClick:x},Object(E.__)("Preview")),Object(r.createElement)(y.Button,{isPrimary:!0,isBusy:"importing"===d,onClick:s,disabled:!1!==d},Object(E.__)("Import"))))},ve=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})),je=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),ye=Object(r.createElement)(H.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"})),Ee=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"})),_e=n(18);function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ke,Ce={date:Object(E.__)("Date"),template_name:Object(E.__)("Name"),modified:Object(E.__)("Last Modified")},Ne=function(e){var t=e.isGrid,n=e.setGrid,a=e.isSearch,c=e.searchQuery,o=e.setSearchQuery,i=e.onSearch,s=e.sortingOrder,l=e.setSortingOrder,u=e.changeOrder;return Object(r.createElement)("div",{className:"filters"},Object(r.createElement)("div",{className:"header-form"},Object(r.createElement)("div",{className:"display-sorting"},Object(r.createElement)("div",{className:"sorting-label"},Object(E.__)("Sort by")),Object(r.createElement)("div",{className:"sorting-filter"},Object.keys(Ce).map((function(e){return Object(r.createElement)(y.Button,{key:e,className:g()({"is-selected":e===s.orderby,"is-asc":"ASC"===s.order}),onClick:function(){var t={order:"DESC",orderby:e};e===s.orderby&&"DESC"===s.order&&(t.order="ASC"),l(Se({},t)),u(Se({},t))}},Ce[e])})))),Object(r.createElement)("div",{className:"display-filters"},Object(r.createElement)("div",{className:"display-filters__search"},Object(r.createElement)("input",{placeholder:Object(E.__)("Search"),value:c,onChange:function(e){return o(e.target.value)},onKeyDown:function(e){e.keyCode===_e.ENTER&&i()}}),a?Object(r.createElement)(y.Button,{label:Object(E.__)("Clear search query"),icon:ve,onClick:function(){o(""),i("")}}):Object(r.createElement)(y.Button,{label:Object(E.__)("Search"),icon:je,onClick:function(){return i()}})),Object(r.createElement)(y.Button,{label:Object(E.__)("List View"),icon:ye,onClick:function(){return n(!1)},isPressed:!t}),Object(r.createElement)(y.Button,{label:Object(E.__)("Grid View"),icon:Ee,onClick:function(){return n(!0)},isPressed:t}))))},Te=function(e){var t=e.title,n=e.leftButtons,a=e.rightButtons,c=e.heading,o=e.previewUrl,i=Object(J.stringifyUrl)({url:o,query:{tpcpreview:"yes"}}),s=t||Object(E.__)("Preview");return Object(r.createElement)("div",{className:"ob-preview single-templates"},Object(r.createElement)("div",{className:"preview"},Object(r.createElement)("iframe",{title:s,src:i,frameBorder:"0"}),Object(r.createElement)("div",{className:"loading"},Object(r.createElement)(y.Dashicon,{icon:"update",size:50}))),Object(r.createElement)("div",{className:"bottom-bar"},n&&Object(r.createElement)("div",{className:"navigator"},n),c&&Object(r.createElement)("h2",{className:"heading"},c),a&&Object(r.createElement)("div",{className:"actions"},a)))},Me={AElig:"Æ",AMP:"&",Aacute:"Á",Acirc:"Â",Agrave:"À",Aring:"Å",Atilde:"Ã",Auml:"Ä",COPY:"©",Ccedil:"Ç",ETH:"Ð",Eacute:"É",Ecirc:"Ê",Egrave:"È",Euml:"Ë",GT:">",Iacute:"Í",Icirc:"Î",Igrave:"Ì",Iuml:"Ï",LT:"<",Ntilde:"Ñ",Oacute:"Ó",Ocirc:"Ô",Ograve:"Ò",Oslash:"Ø",Otilde:"Õ",Ouml:"Ö",QUOT:'"',REG:"®",THORN:"Þ",Uacute:"Ú",Ucirc:"Û",Ugrave:"Ù",Uuml:"Ü",Yacute:"Ý",aacute:"á",acirc:"â",acute:"´",aelig:"æ",agrave:"à",amp:"&",aring:"å",atilde:"ã",auml:"ä",brvbar:"¦",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",ecirc:"ê",egrave:"è",eth:"ð",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",iacute:"í",icirc:"î",iexcl:"¡",igrave:"ì",iquest:"¿",iuml:"ï",laquo:"«",lt:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",oacute:"ó",ocirc:"ô",ograve:"ò",ordf:"ª",ordm:"º",oslash:"ø",otilde:"õ",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',raquo:"»",reg:"®",sect:"§",shy:"",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",times:"×",uacute:"ú",ucirc:"û",ugrave:"ù",uml:"¨",uuml:"ü",yacute:"ý",yen:"¥",yuml:"ÿ"},xe={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function Pe(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}function De(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Ie(e){return function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}(e)||Pe(e)}function Le(e){var t,n="&"+e+";";return(ke=ke||document.createElement("i")).innerHTML=n,(59!==(t=ke.textContent).charCodeAt(t.length-1)||"semi"===e)&&t!==n&&t}var Ae={}.hasOwnProperty,Be=String.fromCharCode,Re=[void 0,"Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function Fe(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ve=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getThemeAction,r=t.getCurrentSite;return{themeStatus:n().action||!1,siteData:r()}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setTemplateModal,r=t.setImportModalStatus,a=t.setInstallModalStatus;return{cancel:function(){n(null)},setModal:function(e){return r(e)},setInstallModal:function(e){return a(e)}}})))((function(e){var t=e.templatesData,n=e.cancel,a=e.siteData,c=e.themeStatus,o=e.setInstallModal,i=e.setModal,s=e.isUserTemplate,l=void 0!==s&&s,u=e.generalTemplates,m=void 0!==u&&u,p=Object(r.useState)(!0),d=j()(p,2),b=d[0],f=d[1],h=Object(r.useState)([]),O=j()(h,2),v=O[0],_=O[1],w=Object(r.useState)(!1),S=j()(w,2),k=S[0],C=S[1],N=Object(r.useState)([]),T=j()(N,2),M=T[0],x=T[1],P=Object(r.useState)(!1),D=j()(P,2),I=D[0],L=D[1],B=1===t.length;Object(r.useEffect)((function(){l&&B?ue(t[0].template_id).then((function(e){e.success||(e.message?L(e.message):L(!0),f(!1)),_(e.templates),f(!1)})):le(t.map((function(e){return e.template_id}))).then((function(e){if(!e.success)return e.message?L(e.message):L(!0),f(!1),!1;_(e.templates),f(!1)}))}),[t]);var R=function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",{className:"is-loading",style:{height:30,marginBottom:30,width:"70%"}}),Object(r.createElement)("p",{className:"description is-loading"}),Object(r.createElement)("p",{className:"description is-loading"}),Object(r.createElement)("p",{className:"description is-loading",style:{width:"40%"}}))),Object(r.createElement)("div",{className:"modal-footer",style:{marginTop:50}},Object(r.createElement)("span",{className:"is-loading link"}),Object(r.createElement)("span",{className:"is-loading button",style:{width:"150px",marginLeft:"auto"}})))},F=function(e){if(e.preventDefault(),c)return o(!0),!1;i(!0)},z=function(){C(!0);var e=t.map((function(e,t){return Ue(Ue({},e),v[t])}));try{A(e).then((function(e){if(!e.success)return console.log(e.message),!1;x(e.pages),C("done")}))}catch(e){console.log(I)}},U=function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",null,Object(E.__)("An error occurred!","templates-patterns-collection")),Object(r.createElement)("p",{className:"description"},!0===I?Object(E.__)("Please refresh the page and try again."):I))),Object(r.createElement)("div",{className:"modal-footer"},Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",onClick:function(){L(!1),n()}},Object(E.__)("Close"))))};return Object(r.createElement)(y.Modal,{className:g()(["ob-import-modal",{fetching:b}]),onRequestClose:n,shouldCloseOnClickOutside:!k&&!b,isDismissible:!k&&!b},"done"===k?Object(r.createElement)((function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",null,Object(E.__)("Import done!","templates-patterns-collection")),Object(r.createElement)("p",{className:"description"},B?Object(E.__)("Template was successfully imported!","templates-patterns-collection"):Object(E.__)("Templates were successfully imported!","templates-patterns-collection"))),M&&Object(r.createElement)("ul",{className:"modal-toggles"},M.map((function(e,t){return Object(r.createElement)("li",{className:"option-row",key:t},Object(r.createElement)(y.Icon,{icon:fe,className:"active"}),Object(r.createElement)("span",null,function(e,t={}){var n,r,a,c,o,i,s,l,u,m,p,d,b,f,h,g,O,v,j,y,E,_,w,S,k="string"==typeof t.additional?t.additional.charCodeAt(0):t.additional,C=0,N=-1,T="",M=[];t.position&&("start"in t.position||"indent"in t.position?(r=t.position.indent,n=t.position.start):n=t.position),a=n&&n.line||1,c=n&&n.column||1,y=x(),C--;for(;++C<=e.length;)if(10===u&&(c=r&&r[N]||1),38===(u=e.charCodeAt(C))){if(9===(d=e.charCodeAt(C+1))||10===d||12===d||32===d||38===d||60===d||Number.isNaN(d)||k&&d===k){T+=Be(u),c++;continue}for(g=O=C+1,w=O,35===d?(w=++g,88===(d=e.charCodeAt(w))||120===d?(v="hexadecimal",w=++g):v="decimal"):v="named",o="",h="",l="",j="named"===v?Ie:"decimal"===v?Pe:De,w--;++w<=e.length&&j(d=e.charCodeAt(w));)l+=Be(d),"named"===v&&Ae.call(Me,l)&&(o=l,h=Me[l]);(s=59===e.charCodeAt(w))&&(w++,(i="named"===v&&Le(l))&&(o=l,h=i)),_=1+w-O,(s||!1!==t.nonTerminated)&&(l?"named"===v?(s&&!h?P(5,1):(o!==l&&(_=1+(w=g+o.length)-g,s=!1),s||(b=o?1:3,t.attribute?61===(d=e.charCodeAt(w))?(P(b,_),h=null):Ie(d)?h=null:P(b,_):P(b,_))),m=h):(s||P(2,_),(S=p=Number.parseInt(l,"hexadecimal"===v?16:10))>=55296&&S<=57343||S>1114111?(P(7,_),m=Be(65533)):p in xe?(P(6,_),m=xe[p]):(f="",Fe(p)&&P(6,_),p>65535&&(f+=Be((p-=65536)>>>10|55296),p=56320|1023&p),m=f+Be(p))):"named"!==v&&P(4,_)),m?(D(),y=x(),C=w-1,c+=w-O+1,M.push(m),(E=x()).offset++,t.reference&&t.reference.call(t.referenceContext,m,{start:y,end:E},e.slice(O-1,w)),y=E):(l=e.slice(O-1,w),T+=l,c+=l.length,C=w-1)}else 10===u&&(a++,N++,c=0),Number.isNaN(u)?D():(T+=Be(u),c++);return M.join("");function x(){return{line:a,column:c,offset:C+(n&&n.offset||0)}}function P(e,n){var r;t.warning&&((r=x()).column+=n,r.offset+=n,t.warning.call(t.warningContext,Re[e],r,e))}function D(){T&&(M.push(T),t.text&&t.text.call(t.textContext,T,{start:y,end:x()}),T="")}}(e.title)),Object(r.createElement)("div",{className:"actions"},Object(r.createElement)(y.Button,{isTertiary:!0,href:e.url},Object(E.__)("Visit","templates-patterns-collection")),Object(r.createElement)(y.Button,{isTertiary:!0,href:e.edit},Object(E.__)("Edit","templates-patterns-collection"))))})))),Object(r.createElement)("div",{className:"modal-footer"},Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",onClick:n},Object(E.__)("Close"))))}),null):Object(r.createElement)((function(){return b?Object(r.createElement)(R,null):I?Object(r.createElement)(U,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",null,Object(E.sprintf)(B?
|
3 |
/* translators: name of starter site */
|
4 |
Object(E.__)("Import the %s template","templates-patterns-collection"):
|
5 |
/* translators: name of template */
|
6 |
+
Object(E.__)("Import all templates from %s","templates-patterns-collection"),B?t[0].template_name:a.title)),Object(r.createElement)("p",{className:"description"},(Object(r.createElement)("strong",null,Object(E.__)("does not")),B?Object(E.sprintf)(
|
7 |
/* translators: %s the name of the template */
|
8 |
+
Object(E.__)("The %s template will be imported as a page into your site. This import will install & activate the page builder plugin if not already installed.","templates-patterns-collection"),t[0].template_name):Object(E.__)("All the templates that are included in this starter site, will be imported as pages. This import will install & activate the page builder plugin if not already installed.","templates-patterns-collection"))))),Object(r.createElement)("div",{className:"modal-footer"},!m&&Object(r.createElement)(y.Button,{className:"import-templates",isLink:!0,disabled:k,onClick:F},Object(E.__)("I want to import the entire site","templates-patterns-collection")),Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",disabled:k,onClick:z},k?Object(E.__)("Importing")+"...":B?Object(E.__)("Import"):Object(E.__)("Import All Pages"))))}),null))}));function $e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ge=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setInstallModalStatus;return{setInstallModal:function(e){return n(e)},setTemplateModal:t.setTemplateModal}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getTemplateModal,r=t.getThemeAction,a=t.getCurrentEditor,c=t.getCurrentTab;return{templateModal:n(),themeStatus:r().action||!1,editor:a(),currentTab:c()}})))((function(e){var t=e.isGeneral,n=e.setInstallModal,a=e.setTemplateModal,o=e.templateModal,i=e.themeStatus,s=e.currentTab,l=Object(r.useState)({gutenberg:[],elementor:[]}),u=j()(l,2),m=u[0],p=u[1],d=Object(r.useState)("gutenberg"),b=j()(d,2),f=b[0],h=b[1],O=Object(r.useState)([]),v=j()(O,2),_=v[0],S=v[1],C=Object(r.useState)(t),N=j()(C,2),T=N[0],M=N[1],x=Object(r.useState)(""),P=j()(x,2),D=P[0],I=P[1],L=Object(r.useState)({gutenberg:0,elementor:0,beaver:0}),A=j()(L,2),B=A[0],R=A[1],F=Object(r.useState)({gutenberg:0,elementor:0,beaver:0}),z=j()(F,2),V=z[0],H=z[1],Q=Object(r.useState)(!1),Y=j()(Q,2),J=Y[0],K=Y[1],Z=Object(r.useState)(!1),X=j()(Z,2),ee=X[0],te=X[1],ne=Object(r.useState)(!1),re=j()(ne,2),ae=re[0],ce=re[1],ie=Object(r.useState)(""),se=j()(ie,2),le=se[0],ue=se[1],me=Object(r.useState)({templates:{order:"DESC",orderby:"date"},library:{order:"DESC",orderby:"date"}}),pe=j()(me,2),de=pe[0],be=pe[1];Object(r.useEffect)((function(){K(!0),I(""),R({gutenberg:0,elementor:0,beaver:0}),H({gutenberg:0,elementor:0,beaver:0}),he()}),[t,f]);var fe={gutenberg:{label:Object(E.__)("Gutenberg"),icon:"gutenberg.jpg"},elementor:{label:Object(E.__)("Elementor"),icon:"elementor.jpg"},beaver:{label:Object(E.__)("Beaver"),icon:"beaver.jpg"}},he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=He({page:B[f],per_page:12,type:f},e);t&&(n.template_site_slug="general",n.premade=!0),D&&(n.search=D),oe(t,n).then((function(e){p(He(He({},m),{},c()({},f,e.templates))),H(He(He({},V),{},c()({},f,e.total))),K(!1)}))},ge=function(){var e=k()(w.a.mark((function e(){var n,r,a=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=a.length>0&&void 0!==a[0]?a[0]:B[f]+1,ce(!0),R(He(He({},B),{},c()({},f,n))),r={page:n,per_page:12,type:f},t&&(r.template_site_slug="general",r.premade=!0),D&&(r.search=D),e.next=8,oe(t,r).then((function(e){p(He(He({},m),{},c()({},f,[].concat(U()(m[f]),U()(e.templates))))),H(He(He({},V),{},c()({},f,e.total)))}));case 8:ce(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ve=function(e){ue(e)},je=function(e){if(i)return n(!0),!1;S([e]),a(!0)},ye=m[f]&&m[f].findIndex((function(e){return e.link===le})),Ee=m[f]&&m[f].find((function(e){return le===e.link})),_e=g()("cloud-items",{"is-grid":T}),we=function(){return t?de.templates:de.library},Se=function(){var e=k()(w.a.mark((function e(n){var r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:K(!0),r=He({search:D,type:f},n),t&&(r.template_site_slug="general",r.premade=!0),oe(t,r).then((function(e){p(He(He({},m),{},c()({},f,U()(e.templates)))),H(He(He({},V),{},c()({},f,e.total))),K(!1)}));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(r.createElement)("div",{className:_e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"editor-tabs"},Object.keys(fe).map((function(e){return Object(r.createElement)("a",{key:e,href:"#",onClick:function(){h(e),te(!1)},className:g()("tab",{active:f===e})},Object(r.createElement)("span",{className:"icon-wrap"},Object(r.createElement)("img",{className:"editor-icon",src:window.tiobDash.assets+"img/"+fe[e].icon,alt:fe[e].label})),Object(r.createElement)("span",{className:"editor"},fe[e].label))}))),Object(r.createElement)(Ne,{currentTab:s,isGrid:T,setGrid:M,isSearch:ee,searchQuery:D,setSearchQuery:I,onSearch:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;K(!0),te(!!e);var n=He({search:e,type:f},we());t&&(n.template_site_slug="general",n.premade=!0),oe(t,n).then((function(e){p(He(He({},m),{},c()({},f,U()(e.templates)))),H(He(He({},V),{},c()({},f,e.total))),K(!1)}))},sortingOrder:we(),setSortingOrder:function(e){return be(He(He({},de),{},t?{templates:e}:{library:e}))},changeOrder:Se}),J&&Object(r.createElement)(y.Spinner,null),!J&&(m[f]&&m[f].length>0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"table"},m[f].map((function(e){return Object(r.createElement)(Oe,{sortingOrder:we(),onPreview:ve,userTemplate:!t,key:e.template_id,item:e,loadTemplates:he,onImport:function(){return je(e)},grid:T})}))),Object(r.createElement)($.a,{onChange:function(e){if(!e)return!1;Number(V[f])>B[f]&&ge()}},Object(r.createElement)("span",{style:{height:10,width:10,display:"block"}})),ae&&Object(r.createElement)("div",{className:"fetching-loader"},Object(r.createElement)(y.Spinner,null))):Object(r.createElement)(r.Fragment,null,Object(E.__)("No templates found."))),le&&Object(r.createElement)(Te,{previewUrl:le,rightButtons:Object(r.createElement)(y.Button,{isPrimary:!0,onClick:function(){return je(Ee)}},Object(E.__)("Import Template")),heading:Ee.template_name,leftButtons:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{icon:G,onClick:function(){return ue("")}}),m[f].length>1&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{icon:Object(E.isRTL)()?q:W,onClick:function(){var e=ye-1;0===ye&&(e=m[f].length-1),ue(m[f][e].link)}}),Object(r.createElement)(y.Button,{icon:Object(E.isRTL)()?W:q,onClick:function(){var e=ye+1;ye===m[f].length-1&&(e=0),ue(m[f][e].link)}})))})),o&&_&&!J&&_.length>0&&Object(r.createElement)(Ve,{generalTemplates:!0,isUserTemplate:!t,templatesData:_}))})),qe=[Object(E.__)("Business","templates-patterns-collection"),Object(E.__)("Ecommerce","templates-patterns-collection"),Object(E.__)("Fashion","templates-patterns-collection"),Object(E.__)("Blogging","templates-patterns-collection"),Object(E.__)("Photography","templates-patterns-collection")],We={all:Object(E.__)("All Categories"),free:Object(E.__)("Free"),business:Object(E.__)("Business"),portfolio:Object(E.__)("Portfolio"),woocommerce:Object(E.__)("WooCommerce"),blog:Object(E.__)("Blog"),personal:Object(E.__)("Personal"),other:Object(E.__)("Other")},Qe={gutenberg:{icon:"gutenberg.jpg",niceName:"Gutenberg"},elementor:{icon:"elementor.jpg",niceName:"Elementor"},"beaver builder":{icon:"beaver.jpg",niceName:Object(r.createElement)(r.Fragment,null,"Beaver ",Object(r.createElement)("span",{className:"long-name"},"Builder"))},brizy:{icon:"brizy.jpg",niceName:"Brizy"},"divi builder":{icon:"divi.jpg",niceName:"Divi"},"thrive architect":{icon:"thrive.jpg",niceName:Object(r.createElement)(r.Fragment,null,"Thrive ",Object(r.createElement)("span",{className:"long-name"},"Architect"))}},Ye=function(e){var t=e.currentStep,n=e.progress,a=e.willDo,c={plugins:{label:Object(E.__)("Installing Plugins","templates-patterns-collection"),status:n.plugins,willDo:!0},content:{label:Object(E.__)("Importing Content","templates-patterns-collection"),status:n.content,willDo:a.content},customizer:{label:Object(E.__)("Importing Customizer Settings","templates-patterns-collection"),status:n.customizer,willDo:a.customizer},widgets:{label:Object(E.__)("Importing Widgets","templates-patterns-collection"),status:n.widgets,willDo:a.widgets}};return Object(r.createElement)("ul",{className:"stepper"},Object.keys(c).map((function(e,n){var a=c[e],o=a.label,i=a.status;if(!a.willDo)return null;var s=g()(["icon",{loading:t===e,warning:t===e,success:"done"===i,error:"error"===i,skip:"skip"===i}]),l="clock";return t===e&&(l="update"),"done"===i&&(l="yes"),"error"===i&&(l="no-alt"),Object(r.createElement)("li",{key:n},Object(r.createElement)("span",{className:s},Object(r.createElement)(y.Dashicon,{icon:l,className:t===e?"loading":""})),Object(r.createElement)("span",null,o))})))};function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ze=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getCurrentSite;return{editor:n(),siteData:r()}})),Object(f.withDispatch)((function(e,t){var n=t.siteData,r=e("neve-onboarding"),a=r.setTemplateModal,c=r.setSingleTemplateImport,o=r.setImportModalStatus;return{setModal:function(e){return o(e)},runTemplateImport:function(){c(n.slug),a(!0),o(!1)}}})))((function(e){var t=e.setModal,n=e.editor,a=e.siteData,o=e.runTemplateImport,i=Object(r.useState)({content:!0,customizer:!0,widgets:!0}),s=j()(i,2),l=s[0],u=s[1],m=Object(r.useState)(!1),p=j()(m,2),d=p[0],b=p[1],f=Object(r.useState)(!1),h=j()(f,2),O=h[0],v=h[1],_=Object(r.useState)(!1),w=j()(_,2),S=w[0],k=w[1],T=Object(r.useState)(!1),M=j()(T,2),x=M[0],P=M[1],D=Object(r.useState)(null),A=j()(D,2),F=A[0],z=A[1],U=Object(r.useState)(null),V=j()(U,2),$=V[0],H=V[1],G=Object(r.useState)(!1),q=j()(G,2),W=q[0],Q=q[1],Y=Object(r.useState)(null),J=j()(Y,2),K=J[0],Z=J[1],X=Object(r.useState)(null),ee=j()(X,2),te=ee[0],ne=ee[1],re=Object(r.useState)(null),ae=j()(re,2),ce=ae[0],oe=ae[1],ie=Object(r.useState)(!0),se=j()(ie,2),le=se[0],ue=se[1],me=Object(r.useState)(!0),pe=j()(me,2),de=pe[0],be=pe[1],fe=Object(r.useState)(!0),he=j()(fe,2),ge=he[0],Oe=he[1],ve=tiobDash.license;function je(){if(!l.content)return console.log("[S] Content."),ye(),!1;var e;H("content"),console.log("[P] Content."),(e={contentFile:ce.content_file,source:"remote",frontPage:ce.front_page,shopPages:ce.shop_pages,demoSlug:ce.slug,editor:n},C(I.root+"/import_content",e)).then((function(e){if(!e.success)return we(e,"content"),!1;console.log("[D] Content."),e.frontpage_id&&z(e.frontpage_id),v("done"),ye()})).catch((function(e){return we(e,"content")}))}function ye(){if(!l.customizer)return console.log("[S] Customizer."),Ee(),!1;var e;H("customizer"),console.log("[P] Customizer."),(e={source_url:ce.url,theme_mods:ce.theme_mods,wp_options:ce.wp_options},C(I.root+"/import_theme_mods",e)).then((function(e){if(!e.success)return we(e,"customizer"),!1;console.log("[D] Customizer."),k("done"),Ee()})).catch((function(e){return we(e,"customizer")}))}function Ee(){var e;l.widgets||(console.log("[S] Widgets."),_e()),H("widgets"),console.log("[P] Widgets."),(e=ce.widgets,C(I.root+"/import_widgets",e)).then((function(e){if(!e.success)return we(e,"widgets"),!1;console.log("[D] Widgets."),P("done"),_e()})).catch((function(e){return we(e,"widgets")}))}function _e(){H("done"),Q(!1)}function we(e,t){Q(!1),H(null),"plugins"===t&&v("skip"),["content","plugins"].includes(t)&&k("skip"),["content","plugins","customizer"].includes(t)&&P("skip");var n={plugins:Object(E.__)("Something went wrong while installing the necessary plugins.","templates-patterns-collection"),content:Object(E.__)("Something went wrong while importing the website content.","templates-patterns-collection"),customizer:Object(E.__)("Something went wrong while updating the customizer settings.","templates-patterns-collection"),widgets:Object(E.__)("Something went wrong while importing the widgets.","templates-patterns-collection")};switch(t){case"plugins":b("error");break;case"content":v("error");break;case"customizer":k("error");break;case"widgets":P("error")}ne(e.data?{message:n[t],code:e.data}:{message:n[t]})}Object(r.useEffect)((function(){var e=a.remote_url||a.url,t=new URL("".concat(function(e){return e.replace(/\/$/,"")}(e)+"/","wp-json/ti-demo-data/data"));t.searchParams.append("license",ve?ve.key:"free"),N(t,!0,!1).then((function(e){e.ok||(ne({message:Object(E.__)("Something went wrong while loading the site data. Please refresh the page and try again.","templates-patterns-collection"),code:"ti__ob_failed_fetch_response"}),ue(!1)),e.json().then((function(e){oe(Ke(Ke({},e),a));var t=Ke({},e.mandatory_plugins||{}),n=Ke({},e.recommended_plugins||{}),r=e.default_off_recommended_plugins||[];Object.keys(t).map((function(e){t[e]=!0})),Object.keys(n).map((function(e){n[e]=!r.includes(e)})),Z(Ke(Ke({},n),t)),ue(!1)}))})).catch((function(e){ne({message:Object(E.__)("Something went wrong while loading the site data. Please refresh the page and try again.","templates-patterns-collection"),code:"ti__ob_failed_fetch_catch"}),ue(!1)}))}),[]);var Se=function(){if(W)return!1;t(!1)},ke=!a.external_plugins||a.external_plugins.every((function(e){return!0===e.active})),Ce=Object.keys(l).every((function(e){return!1===l[e]})),Ne={elementor:"".concat(tiobDash.onboarding.homeUrl,"/wp-admin/post.php?post=").concat(F,"&action=elementor"),brizy:"".concat(tiobDash.onboarding.homeUrl,"/?brizy-edit"),"beaver builder":"".concat(tiobDash.onboarding.homeUrl,"/?fl_builder"),"thrive architect":"".concat(tiobDash.onboarding.homeUrl,"/wp-admin/post.php?post=").concat(F,"&action=architect&tve=true"),"divi builder":"".concat(tiobDash.onboarding.homeUrl,"/?et_fb=1&PageSpeed=off"),gutenberg:"".concat(tiobDash.onboarding.homeUrl,"/wp-admin/post.php?post=").concat(F,"&action=edit")}[n];return Object(r.createElement)(y.Modal,{className:g()(["ob-import-modal",{fetching:le}]),onRequestClose:Se,shouldCloseOnClickOutside:!W&&!le,isDismissible:!W&&!le},le?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},Object(r.createElement)("div",{className:"header"},Object(r.createElement)("span",{className:"title is-loading",style:{height:35,marginBottom:20}}),Object(r.createElement)("p",{className:"description is-loading"}),Object(r.createElement)("p",{className:"description is-loading"})),Object(r.createElement)("div",{className:"well is-loading"},Object(r.createElement)("span",{className:"title is-loading",style:{height:20}}),Object(r.createElement)("ol",null,Object(r.createElement)("li",null),Object(r.createElement)("li",null))),Object(r.createElement)("div",{className:"modal-toggles components-panel"},[1,2].map((function(e){return Object(r.createElement)("div",{key:e,className:"components-panel__body options general is-opened"},Object(r.createElement)("span",{className:"title is-loading"}),Object(r.createElement)("ul",null,[1,2,3].map((function(e){return Object(r.createElement)("li",{className:"option-row",key:e},Object(r.createElement)("div",{className:"mock-icon is-loading"}),Object(r.createElement)("span",{className:"is-loading"}),Object(r.createElement)("div",{className:"toggle is-loading"}))}))))})))),Object(r.createElement)("div",{className:"modal-footer"},Object(r.createElement)("span",{className:"link is-loading"}),Object(r.createElement)(y.Button,{isPrimary:!0,className:"import is-loading"}))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"modal-body"},W||"done"===$||te?Object(r.createElement)(r.Fragment,null,te&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(R,{message:te.message||null,code:te.code||null}),Object(r.createElement)("hr",null)),null!==$&&Object(r.createElement)(Ye,{progress:{plugins:d,content:O,customizer:S,widgets:x},currentStep:$,willDo:l}),"done"===$&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("hr",null),Object(r.createElement)("p",{className:"import-result"},Object(E.__)("Content was successfully imported. Enjoy your new site!","templates-patterns-collection")),Object(r.createElement)("hr",null))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)((function(){return le?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"is-loading title"}),Object(r.createElement)("p",{className:"is-loading description"})):Object(r.createElement)("div",{className:"header"},Object(r.createElement)("h1",null,Object(E.sprintf)(
|
9 |
/* translators: name of starter site */
|
10 |
+
Object(E.__)("Import %s as a complete site","templates-patterns-collection"),ce.title)),Object(r.createElement)("p",{className:"description"},Object(E.__)("Import the entire site including customizer options, pages, content and plugins.","templates-patterns-collection")))}),null),Object(r.createElement)((function(){return Object(r.createElement)(B,{data:ce,externalInstalled:ke})}),null),Object(r.createElement)(y.Panel,{className:"modal-toggles"},Object(r.createElement)((function(){var e={content:{title:Object(E.__)("Content","templates-patterns-collection"),icon:"admin-post"},customizer:{title:Object(E.__)("Customizer","templates-patterns-collection"),icon:"admin-customizer"},widgets:{title:Object(E.__)("Widgets","templates-patterns-collection"),icon:"admin-generic"}};return Object(r.createElement)(y.PanelBody,{onToggle:function(){Oe(!ge)},opened:ge,className:"options general",title:Object(E.__)("Import settings","templates-patterns-collection")},Object.keys(e).map((function(t,n){return Object(r.createElement)(y.PanelRow,{className:"option-row",key:n},Object(r.createElement)(y.Icon,{className:g()({active:l[t]}),icon:e[t].icon}),Object(r.createElement)("span",null,e[t].title),Object(r.createElement)("div",{className:"toggle-wrapper"},Object(r.createElement)(y.ToggleControl,{checked:l[t],onChange:function(){u(Ke(Ke({},l),{},c()({},t,!l[t])))}})))})))}),null),Object(r.createElement)((function(){if(le)return null;var e=Ke(Ke({},ce.recommended_plugins||{}),ce.mandatory_plugins||{});return Object(r.createElement)(y.PanelBody,{onToggle:function(){be(!de)},opened:de,className:"options plugins",title:Object(E.__)("Plugins","templates-patterns-collection")},Object.keys(e).map((function(t,n){return Object(r.createElement)(y.PanelRow,{className:"option-row",key:n},Object(r.createElement)(y.Icon,{icon:"admin-plugins",className:g()({active:K[t]})}),Object(r.createElement)("span",{dangerouslySetInnerHTML:{__html:e[t]}}),t in ce.recommended_plugins&&Object(r.createElement)("div",{className:"toggle-wrapper"},Object(r.createElement)(y.ToggleControl,{checked:K[t],onChange:function(){Z(Ke(Ke({},K),{},c()({},t,!K[t])))}})))})))}),null)))),!W&&Object(r.createElement)("div",{className:"modal-footer"},"done"!==$?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{className:"import-templates",isLink:!0,onClick:o},Object(E.__)("I want to import just the templates","templates-patterns-collection")),!te&&Object(r.createElement)(y.Button,{className:"import",isPrimary:!0,disabled:Ce||!ke,onClick:function(){Q(!0),function(){if(console.clear(),!K)return console.log("[S] Plugins."),je(),!1;H("plugins"),console.log("[P] Plugins."),L(K).then((function(e){if(!e.success)return we(e,"plugins"),!1;console.log("[D] Plugins."),b("done"),je()})).catch((function(e){return we(e,"plugins")}))}()}},Object(E.__)("Import entire site","templates-patterns-collection"))):Object(r.createElement)("div",{className:"import-done-actions"},Object(r.createElement)(y.Button,{isLink:!0,className:"close",onClick:Se},Object(E.__)("Back to Sites Library","templates-patterns-collection")),Object(r.createElement)(y.Button,{isSecondary:!0,href:tiobDash.onboarding.homeUrl},Object(E.__)("View Website","templates-patterns-collection")),Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",href:Ne},Object(E.__)("Add your own content","templates-patterns-collection"))))))})),Xe=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setSingleTemplateImport,r=t.setImportModalStatus,a=t.setInstallModalStatus;return{cancel:function(){n(null)},setModal:function(e){return r(e)},setInstallModal:function(e){return a(e)},setTemplateModal:t.setTemplateModal}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getTemplateModal,r=t.getThemeAction,a=t.getCurrentSite,c=t.getCurrentEditor;return{templateModal:n(),themeStatus:r().action||!1,site:a(),editor:c()}})))((function(e){var t=e.slug,n=e.cancel,a=e.setModal,c=e.setInstallModal,o=e.themeStatus,i=e.site,s=e.editor,l=e.setTemplateModal,u=e.templateModal,m=Object(r.useState)([]),p=j()(m,2),d=p[0],b=p[1],f=Object(r.useState)(!0),h=j()(f,2),g=h[0],O=h[1],v=Object(r.useState)(""),_=j()(v,2),w=_[0],S=_[1],k=Object(r.useState)([]),C=j()(k,2),N=C[0],T=C[1],M=i.title,x=i.upsell,P=i.utmOutboundLink;Object(r.useEffect)((function(){D()}),[]);var D=function(){oe(!0,{per_page:100,template_site_slug:t,premade:!0,type:s}).then((function(e){b(e.templates||[]),O(!1)}))},I=function(e){S(e)},L=function(e){if(o)return c(!0),!1;T([e]),l(!0)},A=function(e){if(e.preventDefault(),o)return c(!0),!1;a(!0)},B=d.findIndex((function(e){return e.link===w})),R=d.find((function(e){return e.link===w}));return Object(r.createElement)("div",{className:"single-templates-wrapper"},Object(r.createElement)("div",{className:"top"},Object(r.createElement)("div",{className:"breadcrumb"},Object(r.createElement)(y.Button,{isTertiary:!0,onClick:n},Object(E.__)("Back to starter sites"))),Object(r.createElement)("div",{className:"header"},Object(r.createElement)("div",{className:"text"},Object(r.createElement)("h1",null,M||"",x&&Object(r.createElement)("span",{className:"pro-badge"},Object(r.createElement)(y.Icon,{icon:"lock"}),Object(r.createElement)("span",null,Object(E.__)("Premium","templates-patterns-collection")))),Object(r.createElement)("p",{className:"description"},Object(E.__)("You can import individual pages or bulk-import all of them."))),Object(r.createElement)("div",{className:"actions"},!x&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{isSecondary:!0,onClick:A},Object(E.__)("Import Starter Site")),Object(r.createElement)(y.Button,{isPrimary:!0,disabled:d.length<1,onClick:function(e){if(e.preventDefault(),o)return c(!0),!1;T(d),l(!0)}},Object(E.__)("Import All Pages"))),x&&Object(r.createElement)(y.Button,{href:P||tiobDash.upgradeURL,isSecondary:!0},Object(E.__)("Upgrade"))))),Object(r.createElement)((function(){return g?Object(r.createElement)(y.Spinner,null):d.length<1?Object(E.__)("No templates for this starter site."):Object(r.createElement)("div",{className:"cloud-items is-grid"},Object(r.createElement)("div",{className:"table"},d.map((function(e){return Object(r.createElement)(Oe,{upsell:x,onPreview:I,userTemplate:!1,key:e.template_id,item:e,loadTemplates:D,onImport:function(){return L(e)},grid:!0})}))))}),null),w&&Object(r.createElement)(Te,{heading:R.template_name||null,previewUrl:w,leftButtons:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{icon:G,onClick:function(){return S("")},label:Object(E.__)("Close","templates-patterns-collection")}),d.length>1&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{icon:Object(E.isRTL)()?q:W,onClick:function(){var e=B-1;0===B&&(e=d.length-1),S(d[e].link)}}),Object(r.createElement)(y.Button,{icon:Object(E.isRTL)()?W:q,onClick:function(){var e=B+1;B===d.length-1&&(e=0),S(d[e].link)}}))),rightButtons:Object(r.createElement)(r.Fragment,null,!x&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y.Button,{isSecondary:!0,onClick:A},Object(E.__)("Import Starter Site")),Object(r.createElement)(y.Button,{isPrimary:!0,disabled:d.length<1,onClick:function(){return L(R)}},Object(E.__)("Import Page"))),x&&Object(r.createElement)(y.Button,{href:P||tiobDash.upgradeURL,isSecondary:!0},Object(E.__)("Upgrade")))}),u&&N&&!g&&N.length>0&&Object(r.createElement)(Ve,{templatesData:N}))})),et=function(){return Object(r.createElement)(H.SVG,{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"ob-logo"},Object(r.createElement)(H.Path,{d:"M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z",fill:"#0366D6"}),Object(r.createElement)(H.Path,{d:"M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z",fill:"white"}),Object(r.createElement)(H.Path,{d:"M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z",fill:"white"}))},tt=function(e){var t=e.setCurrentTab,n=e.currentTab,a=e.isFetching,c={starterSites:Object(E.__)("Starter Sites","neve"),pageTemplates:Object(E.__)("Page Templates","neve")},o=Object(r.useState)(!1),i=j()(o,2),s=i[0],l=i[1];tiobDash.license&&tiobDash.license.tier&&3===tiobDash.license.tier&&(c.library=Object(E.__)("My Library","neve"));var u=function(){var e=function(e){var t=window.location.hash;return"string"!=typeof window.location.hash?null:(t=t.substring(1),Object.keys(e).includes(t)?t:null)}(c);if(null!==e){var n=document.getElementById("menu-appearance"),r=n.querySelector(".current"),a=n.querySelector('a[href="themes.php?page=tiob-starter-sites#library"]').parentElement,o=n.querySelector('a[href="themes.php?page=tiob-starter-sites"]').parentElement;r.classList.remove("current"),a.classList.remove("current"),"library"===e?a.classList.add("current"):o.classList.add("current"),t(e)}};return Object(r.useEffect)((function(){u(),window.addEventListener("hashchange",u)}),[]),Object(r.createElement)("div",{className:"header-nav"},Object.keys(c).map((function(e){return Object(r.createElement)(y.Button,{href:"#"+e,key:e,isTertiary:!0,isPressed:e===n,onClick:function(n){var r;n.preventDefault(),t(e),r=e,window.location.hash=r}},c[e])})),"starterSites"!==n&&Object(r.createElement)(y.Button,{icon:me,onClick:function(){l(!0),localStorage.setItem("tpcCacheBuster",re());var e=n;t(null),setTimeout((function(){t(e),l(!1)}),100)},label:Object(E.__)("Re-sync Library"),className:g()("is-sync",{"is-loading":s}),disabled:a||s,"data-content":Object(E.__)("Sync")}))},nt=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setOnboardingState;return{cancelOnboarding:function(){n(!1)},setCurrentTab:t.setCurrentTab,setFetching:t.setFetching}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getOnboardingStatus,r=t.getCurrentTab,a=t.getFetching;return{isOnboarding:n(),currentTab:r(),isFetching:a()}})))((function(e){var t=e.isOnboarding,n=e.cancelOnboarding,a=e.setCurrentTab,c=e.currentTab;return Object(r.createElement)("div",{className:"ob-head"},!t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"header-container"},Object(r.createElement)("h2",null,!tiobDash.brandedTheme&&Object(r.createElement)(y.Icon,{icon:et}),Object(r.createElement)("span",null,Object(E.__)("Templates Cloud","neve"))),Object(r.createElement)(tt,{setCurrentTab:a,currentTab:c}))),t&&Object(r.createElement)(y.Button,{className:"close-onboarding",isLink:!0,icon:"no-alt",onClick:n}))})),rt=n(19),at=n.n(rt),ct=Object(O.compose)(Object(f.withSelect)((function(e){return{themeStatus:(0,e("neve-onboarding").getThemeAction)().action||!1}})),Object(f.withDispatch)((function(e,t){var n=t.data,r=n.slug,a=e("neve-onboarding"),c=a.setCurrentSite,o=a.setPreviewStatus,i=a.setImportModalStatus,s=a.setInstallModalStatus,l=a.setSingleTemplateImport;return{setSite:function(){return c(n)},setPreview:function(e){return o(e)},setModal:function(e){return i(e)},setInstallModal:function(e){return s(e)},setImportingPages:function(){return l(r)}}})))((function(e){var t=e.data,n=e.setSite,a=e.setPreview,c=e.setModal,o=e.themeStatus,i=e.setInstallModal,s=e.setImportingPages,l=t.upsell,u=(t.slug,t.screenshot),m=t.title,p=t.has_templates,d=Object(r.useState)(""),b=j()(d,2),f=b[0],h=b[1],O=g()("card starter-site-card",{"has-templates":p});return Object(r.createElement)("div",{onMouseEnter:function(){h("visible")},onMouseLeave:function(){h("")},className:O},Object(r.createElement)("div",{className:"top"},Object(r.createElement)("div",{className:"actions "+f},Object(r.createElement)(y.Button,{isSecondary:!0,onClick:function(e){e.preventDefault(),n(),a(!0)}},Object(E.__)("Preview","templates-patterns-collection")),!l&&Object(r.createElement)(y.Button,{isPrimary:!0,className:"import",onClick:function(e){if(e.preventDefault(),n(),o)return i(!0),!1;c(!0)}},Object(E.__)("Import","templates-patterns-collection")),p&&Object(r.createElement)(y.Button,{isLink:!0,className:"templates",onClick:function(e){e.preventDefault(),n(),s()}},Object(E.__)("View Pages","templates-patterns-collection"))),u&&Object(r.createElement)("div",{className:"image",style:{backgroundImage:'url("'.concat(u,'")')}})),Object(r.createElement)("div",{className:"bottom"},Object(r.createElement)("p",{className:"title"},m),l&&Object(r.createElement)("span",{className:"pro-badge"},Object(r.createElement)(y.Dashicon,{icon:"lock",size:15}),Object(r.createElement)("span",null,Object(E.__)("Premium","templates-patterns-collection")))))})),ot=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentSite,r=t.getThemeAction;return{siteData:n(),themeStatus:r().action||!1}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setCurrentSite,r=t.setPreviewStatus,a=t.setImportModalStatus,c=t.setInstallModalStatus;return{setSite:function(e){return n(e)},setPreview:function(e){return r(e)},setModal:function(e){return a(e)},setInstallModal:function(e){return c(e)}}})))((function(e){var t=e.next,n=e.prev,a=e.siteData,c=e.setSite,o=e.setPreview,i=e.setModal,s=e.themeStatus,l=e.setInstallModal;return Object(r.createElement)("div",{className:"ob-preview"},Object(r.createElement)("div",{className:"preview"},Object(r.createElement)("iframe",{src:a.url,frameBorder:"0"}),Object(r.createElement)("div",{className:"loading"},Object(r.createElement)(y.Dashicon,{icon:"update",size:50}))),Object(r.createElement)("div",{className:"bottom-bar"},Object(r.createElement)("div",{className:"navigator"},Object(r.createElement)(y.Button,{onClick:function(e){e.preventDefault(),o(!1),c(null)},className:"close",label:Object(E.__)("Close","templates-patterns-collection"),icon:G}),n&&Object(r.createElement)(y.Button,{onClick:function(e){e.preventDefault(),c(n)},className:"prev",label:Object(E.__)("Previous","templates-patterns-collection"),icon:Object(E.isRTL)()?q:W}),t&&Object(r.createElement)(y.Button,{onClick:function(e){e.preventDefault(),c(t)},className:"next",label:Object(E.__)("Next","templates-patterns-collection"),icon:Object(E.isRTL)()?W:q})),Object(r.createElement)("div",{className:"actions"},a.upsell?Object(r.createElement)(y.Button,{className:"upgrade",isPrimary:!0,href:a.utmOutboundLink||tiobDash.upgradeURL},Object(E.__)("Upgrade and Import","templates-patterns-collection")):Object(r.createElement)(y.Button,{className:"import",isPrimary:!0,onClick:function(e){if(e.preventDefault(),s)return l(!0),!1;i(!0)}},Object(E.__)("Import","templates-patterns-collection")))))})),it=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentCategory,r=t.getSearchQuery;return{category:n(),query:r()}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setCurrentCategory,r=t.setSearchQuery;return{setCurrentCategory:function(e){return n(e)},onSearch:function(e){return r(e)}}})))((function(e){var t=e.count,n=e.categories,a=e.onSearch,c=e.category,o=e.setCurrentCategory,i=e.query,s=e.className,l=Object(r.useState)(!1),u=j()(l,2),m=u[0],p=u[1],d=function(){return p(!m)},b=g()(s,"header-form");return Object(r.createElement)("div",{className:b},Object(r.createElement)("div",{className:"search"},Object(r.createElement)("img",{src:tiobDash.assets+"/img/search.svg",alt:Object(E.__)("Search Icon")}),Object(r.createElement)("input",{onChange:function(e){a(e.target.value)},type:"search",value:i,placeholder:Object(E.__)("Search for a starter site","templates-patterns-collection")+"..."}),Object(r.createElement)((function(){return Object(r.createElement)("div",{className:"ob-dropdown categories-selector"},Object(r.createElement)(y.Button,{onClick:d,className:"select ob-dropdown"},n[c],Object(r.createElement)(y.Dashicon,{size:14,icon:m?"arrow-up-alt2":"arrow-down-alt2"}),m&&Object(r.createElement)(y.Popover,{position:"bottom center",onClose:d,noArrow:!0},m&&Object(r.createElement)("ul",{className:"options"},Object.keys(n).map((function(e,a){return e===c||"free"===e&&t.all===t[e]?null:Object(r.createElement)("li",{key:a},Object(r.createElement)("a",{href:"#",onClick:function(t){t.preventDefault(),o(e),p(!1)}},Object(r.createElement)("span",null,n[e]),Object(r.createElement)("span",{className:"count"},t[e])))}))))))}),null)))})),st=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getSites;return{editor:n(),sites:r().sites}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding").setCurrentEditor;return{setCurrentEditor:function(e){return t(e)}}})))((function(e){var t=e.EDITOR_MAP,n=e.count,a=e.editor,c=e.setCurrentEditor,o=e.sites,i=e.isSmall,s=Object(r.useState)(!1),l=j()(s,2),u=l[0],m=l[1],p=Object.keys(o),d=function(){return m(!u)},b=g()(["ob-dropdown","editor-selector",{small:i}]);return Object(r.createElement)("div",{className:b},Object(r.createElement)(y.Button,{onClick:d,className:"select ob-dropdown"},Object(r.createElement)("img",{className:"editor-icon",src:tiobDash.assets+"img/"+t[a].icon,alt:Object(E.__)("Builder Logo","templates-patterns-collection")}),!i&&Object(r.createElement)("span",null,t[a].niceName),Object(r.createElement)("span",{className:"count"},n[a]),Object(r.createElement)(y.Dashicon,{size:14,icon:u?"arrow-up-alt2":"arrow-down-alt2"}),u&&Object(r.createElement)(y.Popover,{position:"bottom center",onClose:d,noArrow:!0},u&&Object(r.createElement)("ul",{className:"options"},p.map((function(e,o){return e===a?null:Object(r.createElement)("li",{key:o},Object(r.createElement)("a",{href:"#",onClick:function(t){t.preventDefault(),c(e),m(!1)}},Object(r.createElement)("img",{className:"editor-icon",src:tiobDash.assets+"img/"+t[e].icon,alt:Object(E.__)("Builder Logo","templates-patterns-collection")}),Object(r.createElement)("span",null,t[e].niceName),Object(r.createElement)("span",{className:"count"},n[e])))}))))))})),lt=Object(O.compose)(Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getSites;return{editor:n(),sites:r().sites}})),Object(f.withDispatch)((function(e){var t=e("neve-onboarding").setCurrentEditor;return{setCurrentEditor:function(e){return t(e)}}})))((function(e){var t=e.EDITOR_MAP,n=e.count,a=e.onlyProSites,c=e.editor,o=e.setCurrentEditor,i=e.sites,s=Object.keys(i);return Object(r.createElement)("div",{className:"editor-tabs"},s.map((function(e,i){var s=g()(["tab",e,{active:e===c}]);return Object(r.createElement)("a",{key:i,href:"#",className:s,onClick:function(t){t.preventDefault(),o(e)}},Object(r.createElement)("span",{className:"icon-wrap"},Object(r.createElement)("img",{className:"editor-icon",src:tiobDash.assets+"img/"+t[e].icon,alt:Object(E.__)("Builder Logo","templates-patterns-collection")})),Object(r.createElement)("span",{className:"editor"},t[e].niceName),Object(r.createElement)("span",{className:"count"},n[e]),a.includes(e)&&Object(r.createElement)("span",{className:"pro-badge"},"PRO"))})))})),ut=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setOnboardingState,r=t.setCurrentCategory;return{cancelOnboarding:function(){n(!1)},resetCategory:function(){r("all")},setCurrentTab:t.setCurrentTab}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getCurrentCategory,a=t.getOnboardingStatus,c=t.getSites;return{editor:n(),category:r(),isOnboarding:a(),getSites:c()}})))((function(e){var t,n=e.filterByCategory,a=e.filterBySearch,c=e.getSitesForBuilder,o=e.isOnboarding,i=e.getSites,s=e.category,l=e.editor,u=Object(r.useState)(!1),m=j()(u,2),p=m[0],d=m[1],b=i.sites,f=void 0===b?{}:b,h=i.migration,g={top:p?0:"-100%"},O=Object.keys(f),v=O.filter((function(e){return Object.keys(f[e]).filter((function(t){return!0===f[e][t].upsell})).length===Object.keys(f[e]).length})),E=(t={builders:{},categories:{}},O.forEach((function(e){var r=c(e);r=n(r,s),r=a(r),t.builders[e]=r?r.length:0})),Object.keys(We).forEach((function(e){var r=c(l);r=n(r,e),r=a(r),t.categories[e]=r?r.length:0})),t);return Object(r.createElement)(r.Fragment,null,!o&&!h&&Object(r.createElement)("div",{className:"sticky-nav",style:g},Object(r.createElement)("div",{className:"container sticky-nav-content"},!tiobDash.brandedTheme&&Object(r.createElement)(y.Icon,{icon:et,size:32}),Object(r.createElement)(it,{className:"in-sticky",count:E.categories,categories:We}),Object(r.createElement)(st,{isSmall:!0,count:E.builders,EDITOR_MAP:Qe}))),Object(r.createElement)($.a,{onChange:function(e){d(!e)}},Object(r.createElement)("div",null,!o&&Object(r.createElement)("p",{className:"instructions"},tiobDash.strings.starterSitesTabDescription),Object(r.createElement)(st,{count:E.builders,EDITOR_MAP:Qe}),Object(r.createElement)(it,{count:E.categories,categories:We}),Object(r.createElement)(lt,{EDITOR_MAP:Qe,onlyProSites:v,count:E.builders}))))})),mt=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setOnboardingState,r=t.setCurrentCategory;return{cancelOnboarding:function(){n(!1)},resetCategory:function(){r("all")},setCurrentTab:t.setCurrentTab,setSearchQuery:t.setSearchQuery}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getCurrentCategory,a=t.getPreviewStatus,c=t.getCurrentSite,o=t.getImportModalStatus,i=t.getOnboardingStatus,s=t.getSites,l=t.getInstallModalStatus,u=t.getCurrentTab,m=t.getSearchQuery;return{editor:n(),category:r(),previewOpen:a(),currentSiteData:c(),importModal:o(),installModal:l(),isOnboarding:i(),getSites:s(),currentTab:u(),searchQuery:m()}})))((function(e){var t=e.getSites,n=e.category,a=e.resetCategory,c=e.editor,o=e.previewOpen,i=e.currentSiteData,s=e.isOnboarding,l=e.cancelOnboarding,u=e.setSearchQuery,m=e.searchQuery,p=t.sites,d=void 0===p?{}:p,b=function(){var e={};return g().forEach((function(t){var n=d&&d[t]?d[t]:{};e[t]=U()(Object.values(n))})),e},f=function(e,t){return"free"===t?e.filter((function(e){return!e.upsell})):"all"!==t?e.filter((function(e){return e.keywords.includes(t)})):e},h=function(e){return m?new at.a(e,{includeScore:!0,keys:["title","slug","keywords"]}).search(m).map((function(e){return e.item})):e},g=function(){return Object.keys(d)},O=function(){var e=b()[c];return e=h(e),f(e,n)},v=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null===i)return null;var t=b()[c],n=t.indexOf(i);return-1===n||1===t.length?null:e&&0===n?t[t.length-1]:e||n!==t.length-1?t[e?n-1:n+1]:t[0]};return 1>d.length?Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(E.__)("Starter sites could not be loaded. Please refresh and try again.","neve"),s&&Object(r.createElement)(y.Button,{style:{display:"block",margin:"20px auto"},isPrimary:!0,onClick:l},Object(E.__)("Close","templates-patterns-collection")))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(ut,{getSitesForBuilder:function(e){return b()[e]},filterBySearch:h,filterByCategory:f}),0===O().length&&Object(r.createElement)("div",{className:"no-results"},Object(r.createElement)("p",null,Object(E.__)("No results found","templates-patterns-collection"),Object(E.__)("You can try a different search or use one of the categories below.","neve")),Object(r.createElement)("div",{className:"tags"},qe.map((function(e,t){return Object(r.createElement)(y.Button,{key:t,isPrimary:!0,className:"tag",onClick:function(t){t.preventDefault(),u(e),a()}},e)})))),Object(r.createElement)((function(){var e=Object(r.useState)(9),t=j()(e,2),n=t[0],a=t[1],c=O();return Object(r.createElement)("div",{className:"ob-sites is-grid"},c.slice(0,n).map((function(e,t){return Object(r.createElement)(ct,{key:t,data:e})})),Object(r.createElement)($.a,{onChange:function(e){if(!e)return!1;a(n+9)}},Object(r.createElement)("span",{style:{height:10,width:10,display:"block"}})))}),null),o&&i&&Object(r.createElement)(ot,{next:v(),prev:v(!0)}))})),pt=Object(O.compose)(Object(f.withDispatch)((function(e){var t=e("neve-onboarding"),n=t.setOnboardingState,r=t.setCurrentCategory;return{cancelOnboarding:function(){n(!1)},resetCategory:function(){r("all")},setCurrentTab:t.setCurrentTab}})),Object(f.withSelect)((function(e){var t=e("neve-onboarding"),n=t.getCurrentEditor,r=t.getCurrentCategory,a=t.getPreviewStatus,c=t.getCurrentSite,o=t.getImportModalStatus,i=t.getOnboardingStatus,s=t.getSites,l=t.getInstallModalStatus,u=t.getCurrentTab,m=t.getSingleImport;return{editor:n(),category:r(),previewOpen:a(),currentSiteData:c(),importModal:o(),installModal:l(),isOnboarding:i(),getSites:s(),currentTab:u(),singleImport:m()}})))((function(e){var t=e.getSites,n=e.installModal,a=e.currentTab,c=e.singleImport,o=e.importModal,i=e.currentSiteData,s=(e.isOnboarding,t.migration);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ob"},Object(r.createElement)(nt,null),Object(r.createElement)("div",{className:"ob-body"},Object(r.createElement)("div",{className:"content-container"},s&&Object(r.createElement)(F,{data:s}),"starterSites"===a&&(c?Object(r.createElement)(Xe,{slug:c}):Object(r.createElement)(mt,null)),"library"===a&&Object(r.createElement)(Ge,null),"pageTemplates"===a&&Object(r.createElement)(Ge,{isGeneral:!0})))),n&&Object(r.createElement)(D,null),o&&i&&Object(r.createElement)(Ze,null))})),dt=Object(f.withSelect)((function(e){return{onboarding:(0,e("neve-onboarding").getOnboardingStatus)()}}))((function(e){var t=e.onboarding,n=g()(["content-wrap","starter-sites",{"is-onboarding":t}]);return Object(r.createElement)("div",{className:"tiob-wrap"},Object(r.createElement)("div",{className:n},Object(r.createElement)("div",{className:"container content"},Object(r.createElement)("div",{className:"main"},Object(r.createElement)("div",{className:"tab-content columns starter-sites"},Object(r.createElement)(pt,null))))))}));Object(f.registerStore)("neve-onboarding",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REFRESH_SITES":var n=t.payload.sites;return i(i({},e),{},{sites:n});case"SET_CURRENT_EDITOR":var r=t.payload.editor;return localStorage.setItem("neve-onboarding-editor",r),i(i({},e),{},{editor:r});case"SET_CURRENT_CATEGORY":var a=t.payload.category;return i(i({},e),{},{category:a});case"SET_FOCUSED_SITE":var c=t.payload.siteData;return i(i({},e),{},{currentSite:c});case"SET_PREVIEW_STATUS":var o=t.payload.previewStatus;return i(i({},e),{},{previewStatus:o});case"SET_IMPORT_MODAL_STATUS":var s=t.payload.importModalStatus;return i(i({},e),{},{importModalStatus:s});case"SET_INSTALL_MODAL_STATUS":var l=t.payload.installModalStatus;return i(i({},e),{},{installModalStatus:l});case"SET_ONBOARDING":var u=t.payload.status;return i(i({},e),{},{isOnboarding:u});case"SET_THEME_ACTIONS":var m=t.payload.themeActions;return i(i({},e),{},{themeAction:m});case"SET_CURRENT_TAB":var p=t.payload.currentTab;return i(i({},e),{},{singleTemplateImport:null,currentTab:p});case"SET_FETCHING":var b=t.payload.fetching;return i(i({},e),{},{fetching:b});case"SET_SINGLE_TEMPLATE_IMPORT":var f=t.payload.slug;return i(i({},e),{},{singleTemplateImport:f});case"SET_TEMPLATE_MODAL":var h=t.payload.data;return i(i({},e),{},{templateModal:h});case"SET_SEARCH_QUERY":var g=t.payload.query;return i(i({},e),{},{searchQuery:g})}return e},actions:b,selectors:{getSites:function(e){return e.sites},getMigrationData:function(e){return e.migrationData},getCurrentEditor:function(e){return e.editor},getCurrentCategory:function(e){return e.category},getCurrentSite:function(e){return e.currentSite},getPreviewStatus:function(e){return e.previewStatus},getImportModalStatus:function(e){return e.importModalStatus},getOnboardingStatus:function(e){return e.isOnboarding},getThemeAction:function(e){return e.themeAction},getInstallModalStatus:function(e){return e.installModalStatus},getCurrentTab:function(e){return e.currentTab},getFetching:function(e){return e.fetching},getSingleImport:function(e){return e.singleTemplateImport},getTemplateModal:function(e){return e.templateModal},getSearchQuery:function(e){return e.searchQuery}}}),Object(r.render)(Object(r.createElement)(dt,null),document.getElementById("tpc-app"))}]);
|
assets/src/Components/CloudLibrary/ImportTemplatesModal.js
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import { withSelect, withDispatch } from '@wordpress/data';
|
2 |
import { Modal, Button, Icon } from '@wordpress/components';
|
3 |
import { __, sprintf } from '@wordpress/i18n';
|
@@ -164,13 +165,7 @@ const ImportTemplatesModal = ( {
|
|
164 |
icon={ pageIcon }
|
165 |
className="active"
|
166 |
/>
|
167 |
-
<span>
|
168 |
-
{ page.title.replace(
|
169 |
-
/’/g,
|
170 |
-
// eslint-disable-next-line prettier/prettier
|
171 |
-
'\''
|
172 |
-
) }
|
173 |
-
</span>
|
174 |
<div className="actions">
|
175 |
<Button
|
176 |
isTertiary
|
1 |
+
import { parseEntities } from 'parse-entities';
|
2 |
import { withSelect, withDispatch } from '@wordpress/data';
|
3 |
import { Modal, Button, Icon } from '@wordpress/components';
|
4 |
import { __, sprintf } from '@wordpress/i18n';
|
165 |
icon={ pageIcon }
|
166 |
className="active"
|
167 |
/>
|
168 |
+
<span>{ parseEntities( page.title ) }</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
<div className="actions">
|
170 |
<Button
|
171 |
isTertiary
|
assets/src/Components/Header.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
/* global tiobDash, localStorage */
|
2 |
import { withSelect, withDispatch } from '@wordpress/data';
|
|
|
3 |
import { Button, Icon } from '@wordpress/components';
|
4 |
import { useState } from '@wordpress/element';
|
5 |
import { compose } from '@wordpress/compose';
|
@@ -9,15 +10,16 @@ import { __ } from '@wordpress/i18n';
|
|
9 |
import Logo from './Icon';
|
10 |
import classnames from 'classnames';
|
11 |
import { v4 as uuidv4 } from 'uuid';
|
|
|
12 |
|
13 |
const TabNavigation = ( { setCurrentTab, currentTab, isFetching } ) => {
|
14 |
-
const [ isSyncing, setSyncing ] = useState( false );
|
15 |
-
|
16 |
const buttons = {
|
17 |
starterSites: __( 'Starter Sites', 'neve' ),
|
18 |
pageTemplates: __( 'Page Templates', 'neve' ),
|
19 |
};
|
20 |
|
|
|
|
|
21 |
const sync = () => {
|
22 |
setSyncing( true );
|
23 |
localStorage.setItem( 'tpcCacheBuster', uuidv4() );
|
@@ -37,15 +39,46 @@ const TabNavigation = ( { setCurrentTab, currentTab, isFetching } ) => {
|
|
37 |
buttons.library = __( 'My Library', 'neve' );
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
return (
|
41 |
<div className="header-nav">
|
42 |
{ Object.keys( buttons ).map( ( slug ) => {
|
43 |
return (
|
44 |
<Button
|
|
|
45 |
key={ slug }
|
46 |
isTertiary
|
47 |
isPressed={ slug === currentTab }
|
48 |
-
onClick={ () =>
|
|
|
|
|
|
|
|
|
49 |
>
|
50 |
{ buttons[ slug ] }
|
51 |
</Button>
|
1 |
/* global tiobDash, localStorage */
|
2 |
import { withSelect, withDispatch } from '@wordpress/data';
|
3 |
+
import { useEffect } from '@wordpress/element';
|
4 |
import { Button, Icon } from '@wordpress/components';
|
5 |
import { useState } from '@wordpress/element';
|
6 |
import { compose } from '@wordpress/compose';
|
10 |
import Logo from './Icon';
|
11 |
import classnames from 'classnames';
|
12 |
import { v4 as uuidv4 } from 'uuid';
|
13 |
+
import { addUrlHash, getTabHash } from '../utils/common';
|
14 |
|
15 |
const TabNavigation = ( { setCurrentTab, currentTab, isFetching } ) => {
|
|
|
|
|
16 |
const buttons = {
|
17 |
starterSites: __( 'Starter Sites', 'neve' ),
|
18 |
pageTemplates: __( 'Page Templates', 'neve' ),
|
19 |
};
|
20 |
|
21 |
+
const [ isSyncing, setSyncing ] = useState( false );
|
22 |
+
|
23 |
const sync = () => {
|
24 |
setSyncing( true );
|
25 |
localStorage.setItem( 'tpcCacheBuster', uuidv4() );
|
39 |
buttons.library = __( 'My Library', 'neve' );
|
40 |
}
|
41 |
|
42 |
+
const onHashChanged = () => {
|
43 |
+
const hash = getTabHash(buttons);
|
44 |
+
if (null === hash) {
|
45 |
+
return;
|
46 |
+
}
|
47 |
+
|
48 |
+
const menu = document.getElementById('menu-appearance');
|
49 |
+
const activeItem = menu.querySelector('.current');
|
50 |
+
const libraryItem = menu.querySelector('a[href="themes.php?page=tiob-starter-sites#library"]').parentElement;
|
51 |
+
const starterSitesItem = menu.querySelector('a[href="themes.php?page=tiob-starter-sites"]').parentElement;
|
52 |
+
|
53 |
+
activeItem.classList.remove('current');
|
54 |
+
libraryItem.classList.remove('current');
|
55 |
+
if ( hash === 'library' ){
|
56 |
+
libraryItem.classList.add('current');
|
57 |
+
} else {
|
58 |
+
starterSitesItem.classList.add('current');
|
59 |
+
}
|
60 |
+
setCurrentTab(hash);
|
61 |
+
}
|
62 |
+
|
63 |
+
useEffect(() => {
|
64 |
+
onHashChanged();
|
65 |
+
window.addEventListener('hashchange', onHashChanged)
|
66 |
+
}, []);
|
67 |
+
|
68 |
return (
|
69 |
<div className="header-nav">
|
70 |
{ Object.keys( buttons ).map( ( slug ) => {
|
71 |
return (
|
72 |
<Button
|
73 |
+
href={'#' + slug}
|
74 |
key={ slug }
|
75 |
isTertiary
|
76 |
isPressed={ slug === currentTab }
|
77 |
+
onClick={ (e) => {
|
78 |
+
e.preventDefault();
|
79 |
+
setCurrentTab( slug );
|
80 |
+
addUrlHash(slug);
|
81 |
+
} }
|
82 |
>
|
83 |
{ buttons[ slug ] }
|
84 |
</Button>
|
assets/src/utils/common.js
CHANGED
@@ -1,5 +1,25 @@
|
|
1 |
import { __ } from '@wordpress/i18n';
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
const untrailingSlashIt = ( str ) => str.replace( /\/$/, '' );
|
4 |
const trailingSlashIt = ( str ) => untrailingSlashIt( str ) + '/';
|
5 |
|
@@ -55,4 +75,4 @@ const EDITOR_MAP = {
|
|
55 |
},
|
56 |
};
|
57 |
|
58 |
-
export { trailingSlashIt, untrailingSlashIt, CATEGORIES, EDITOR_MAP, TAGS };
|
1 |
import { __ } from '@wordpress/i18n';
|
2 |
|
3 |
+
const addUrlHash = (hash) => {
|
4 |
+
window.location.hash = hash;
|
5 |
+
};
|
6 |
+
|
7 |
+
const getTabHash = ( tabs ) => {
|
8 |
+
let hash = window.location.hash;
|
9 |
+
|
10 |
+
if ('string' !== typeof window.location.hash) {
|
11 |
+
return null;
|
12 |
+
}
|
13 |
+
|
14 |
+
hash = hash.substring(1);
|
15 |
+
|
16 |
+
if (!Object.keys(tabs).includes(hash)) {
|
17 |
+
return null;
|
18 |
+
}
|
19 |
+
|
20 |
+
return hash;
|
21 |
+
};
|
22 |
+
|
23 |
const untrailingSlashIt = ( str ) => str.replace( /\/$/, '' );
|
24 |
const trailingSlashIt = ( str ) => untrailingSlashIt( str ) + '/';
|
25 |
|
75 |
},
|
76 |
};
|
77 |
|
78 |
+
export { addUrlHash, getTabHash, trailingSlashIt, untrailingSlashIt, CATEGORIES, EDITOR_MAP, TAGS };
|
editor/build/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives'), 'version' => 'a70cc2e99644b116f809db6a08e15949');
|
editor/build/index.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=29)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},function(e,t){function r(e,t,r,n,c,a,i){try{var o=e[a](i),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(n,c)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(c,a){var i=e.apply(t,n);function o(e){r(i,c,a,o,s,"next",e)}function s(e){r(i,c,a,o,s,"throw",e)}o(void 0)}))}}},function(e,t,r){var n=r(21),c=r(22),a=r(23),i=r(25);e.exports=function(e,t){return n(e)||c(e,t)||a(e,t)||i()}},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=c.apply(null,n);i&&e.push(i)}else if("object"===a)for(var o in n)r.call(n,o)&&n[o]&&e.push(o)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()},function(e,t,r){"use strict";const n=r(26),c=r(27),a=r(28);function i(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function o(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function s(e,t){return t.decode?c(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function b(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const c="string"==typeof r&&r.includes(e.arrayFormatSeparator),a="string"==typeof r&&!c&&s(r,e).includes(e.arrayFormatSeparator);r=a?s(r,e):r;const i=c||a?r.split(e.arrayFormatSeparator).map(t=>s(t,e)):null===r?r:s(r,e);n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const c of e.split("&")){let[e,i]=a(t.decode?c.replace(/\+/g," "):c,"=");i=void 0===i?null:["comma","separator"].includes(t.arrayFormat)?i:s(i,t),r(s(e,t),i,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=u,t.parse=b,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const c=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[",c,"]"].join("")]:[...r,[o(t,e),"[",o(c,e),"]=",o(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[]"].join("")]:[...r,[o(t,e),"[]=",o(n,e)].join("")];case"comma":case"separator":return t=>(r,n)=>null==n||0===n.length?r:0===r.length?[[o(t,e),"=",o(n,e)].join("")]:[[r,o(n,e)].join(e.arrayFormatSeparator)];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,o(t,e)]:[...r,[o(t,e),"=",o(n,e)].join("")]}}(t),c={};for(const t of Object.keys(e))r(t)||(c[t]=e[t]);const a=Object.keys(c);return!1!==t.sort&&a.sort(t.sort),a.map(r=>{const c=e[r];return void 0===c?"":null===c?o(r,t):Array.isArray(c)?c.reduce(n(r),[]).join("&"):o(r,t)+"="+o(c,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=a(e,"#");return Object.assign({url:r.split("?")[0]||"",query:b(u(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:s(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=l(e.url).split("?")[0]||"",c=t.extract(e.url),a=t.parse(c,{sort:!1}),i=Object.assign(a,e.query);let s=t.stringify(i,r);s&&(s="?"+s);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u="#"+o(e.fragmentIdentifier,r)),`${n}${s}${u}`}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.wp.editPost},,,function(e,t){e.exports=window.wp.plugins},function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.keycodes},function(e,t,r){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,c=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){c=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(c)throw a}}return r}}},function(e,t,r){var n=r(24);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),c=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],a(r),a(n))}function i(e){try{return decodeURIComponent(e)}catch(c){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=c.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=i(r[0]);n!==r[0]&&(t[r[0]]=n)}r=c.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var s=a[o];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}}},function(e,t,r){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},function(e,t,r){"use strict";r.r(t);var n=r(1),c=r(17),a=r(12),i=(r(20),r(10)),o=r.n(i),s=r(4);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p={isFetching:!0,isPreview:!1,tab:3===parseInt(window.tiTpc.tier)?"library":"templates",templates:[],patterns:[],library:{items:[],currentPage:0,totalPages:0},preview:{type:"templates",item:{}}};Object(s.registerStore)("tpc/block-editor",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1?arguments[1]:void 0;return"SET_FETCHING"===t.type?u(u({},e),{},{isFetching:t.isFetching}):"TOGGLE_PREVIEW"===t.type?u(u({},e),{},{isPreview:!e.isPreview}):"UPDATE_CURRENT_TAB"===t.type?u(u({},e),{},{tab:t.tab,isPreview:!1}):"UPDATE_TEMPLATES"===t.type?u(u({},e),{},{templates:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"UPDATE_PATTERNS"===t.type?u(u({},e),{},{patterns:t.items}):"UPDATE_LIBRARY"===t.type?u(u({},e),{},{library:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"SET_PREVIEW_DATA"===t.type?u(u({},e),{},{preview:t.preview}):e},selectors:{isFetching:function(e){return e.isFetching},isPreview:function(e){return e.isPreview},getCurrentTab:function(e){return e.tab},getTemplates:function(e){return e.templates},getPatterns:function(e){return e.patterns},getLibrary:function(e){return e.library},getPreview:function(e){return e.preview}},actions:{setFetching:function(e){return{type:"SET_FETCHING",isFetching:e}},togglePreview:function(e){return{type:"TOGGLE_PREVIEW",isPreview:e}},updateCurrentTab:function(e){return{type:"UPDATE_CURRENT_TAB",tab:e}},updateTemplates:function(e,t,r){return{type:"UPDATE_TEMPLATES",items:e,currentPage:t,totalPages:r}},updatePatterns:function(e){return{type:"UPDATE_PATTERNS",items:e}},updateLibrary:function(e,t,r){return{type:"UPDATE_LIBRARY",items:e,currentPage:t,totalPages:r}},setPreviewData:function(e){return{type:"SET_PREVIEW_DATA",preview:e}}}});var b,m=r(0),f=r(8),d=r.n(f),g=wp.primitives,O=g.Path,j=g.SVG,h=function(e){var t=e.className;return Object(m.createElement)(j,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:d()(["tpc-icon",t])},Object(m.createElement)(O,{d:"M22.8063 24H1.19365C0.534714 24 0 23.4653 0 22.8063V1.19365C0 0.534714 0.534714 0 1.19365 0H22.8063C23.4653 0 24 0.534714 24 1.19365V22.8063C24 23.4653 23.4653 24 22.8063 24Z",fill:"#14171C"}),Object(m.createElement)(O,{d:"M19.8466 20.8187V7.39687V4.43164H16.884H3.45947L6.422 7.39687H16.884V17.8562L19.8466 20.8187Z",fill:"white"}),Object(m.createElement)(O,{d:"M10.138 14.1429L10.1407 17.0838L12.7764 19.7195L12.7656 11.5152L4.55859 11.5044L7.19435 14.1375L10.138 14.1429Z",fill:"white"}))},v=function(){return Object(m.createElement)(j,{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"tpc-template-cloud-icon"},Object(m.createElement)(O,{d:"M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z",fill:"#0366D6"}),Object(m.createElement)(O,{d:"M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z",fill:"white"}),Object(m.createElement)(O,{d:"M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z",fill:"white"}))},y=r(3),w=r.n(y),_=r(6),E=r.n(_),k=r(7),P=r.n(k),x=r(11),S=r.n(x),C=r(2),T=r(14),N=r(9),B=new Uint8Array(16);function D(){if(!b&&!(b="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return b(B)}for(var I=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,A=function(e){return"string"==typeof e&&I.test(e)},F=[],L=0;L<256;++L)F.push((L+256).toString(16).substr(1));var V=function(e,t,r){var n=(e=e||{}).random||(e.rng||D)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var c=0;c<16;++c)t[r+c]=n[c];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(F[e[t+0]]+F[e[t+1]]+F[e[t+2]]+F[e[t+3]]+"-"+F[e[t+4]]+F[e[t+5]]+"-"+F[e[t+6]]+F[e[t+7]]+"-"+F[e[t+8]]+F[e[t+9]]+"-"+F[e[t+10]]+F[e[t+11]]+F[e[t+12]]+F[e[t+13]]+F[e[t+14]]+F[e[t+15]]).toLowerCase();if(!A(r))throw TypeError("Stringified UUID is invalid");return r}(n)};function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=lodash.omit,z=Object(s.dispatch)("tpc/block-editor"),H=z.updateLibrary,G=z.updateTemplates,Q=Object(s.dispatch)("core/notices").createNotice,q=function(e){Q("warning",e,{context:"themeisle-blocks/notices/templates-cloud",isDismissible:!0})},$=function(){var e=E()(w.a.mark((function e(){var t,r,n,c,a,i,o,s=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},r=M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),{},{per_page:12,page:0,premade:!0,template_site_slug:"general"},t),n=Object(N.stringifyUrl)({url:tiTpc.endpoint+"page-templates",query:r}),e.prev=3,e.next=6,S()({url:n,method:"GET",parse:!1});case 6:if(!(c=e.sent).ok){e.next=16;break}return e.next=10,c.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",q(a.message));case 13:i=c.headers.get("x-wp-totalpages"),o=r.page,G(a,o,i);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),e.t0.message&&q(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[3,18]])})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=E()(w.a.mark((function e(){var t,r,n,c,a,i,o,s=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},r=M({per_page:12,page:0},t),n=Object(N.stringifyUrl)({url:tiTpc.endpoint+"templates",query:M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),r)}),e.prev=3,e.next=6,S()({url:n,method:"GET",parse:!1});case 6:if(!(c=e.sent).ok){e.next=16;break}return e.next=10,c.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",q(a.message));case 13:i=c.headers.get("x-wp-totalpages"),o=r.page,H(a,o,i);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),e.t0.message&&q(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[3,18]])})));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=E()(w.a.mark((function e(t){var r,n,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t.template_id),query:M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)},t)}),e.prev=1,e.next=4,S()({url:r,method:"POST",parse:!1});case 4:if(!(n=e.sent).ok){e.next=11;break}return e.next=8,n.json();case 8:if(!(c=e.sent).message){e.next=11;break}return e.abrupt("return",q(c.message));case 11:return localStorage.setItem("tpcCacheBuster",V()),e.next=14,$();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&q(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=E()(w.a.mark((function e(t){var r,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t),query:M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta"))}),e.prev=1,e.next=4,S()({url:r,method:"GET",parse:!1});case 4:if(!(n=e.sent).ok){e.next=12;break}return e.next=8,n.json();case 8:if(!e.sent.message){e.next=11;break}return e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:e.next=17;break;case 14:return e.prev=14,e.t0=e.catch(1),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=E()(w.a.mark((function e(t){var r,n,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t,"/import"),query:M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta"))}),n={},e.prev=2,e.next=5,S()({url:r,method:"GET",parse:!1});case 5:if(!(c=e.sent).ok){e.next=12;break}return e.next=9,c.json();case 9:if(!(n=e.sent).message){e.next=12;break}return e.abrupt("return",q(n.message));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),e.t0.message&&q(e.t0.message);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=E()(w.a.mark((function e(t,r){var n,c,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t),query:M({cache:localStorage.getItem("tpcCacheBuster"),_method:"DELETE"},R(tiTpc.params,"meta"))}),e.prev=1,e.next=4,S()({url:n,method:"POST"});case 4:if(!(c=e.sent).ok){e.next=11;break}return e.next=8,c.json();case 8:if(!(a=e.sent).message){e.next=11;break}return e.abrupt("return",q(a.message));case 11:return localStorage.setItem("tpcCacheBuster",V()),e.next=14,W(r);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&q(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t,r){return e.apply(this,arguments)}}(),X=function(){var e=E()(w.a.mark((function e(t,r,n,c,a){var i,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t,"/publish"),query:M(M({cache:localStorage.getItem("tpcCacheBuster"),method:"POST",template_site_slug:r,template_thumbnail:n,premade:c?"yes":"no",link:a},R(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)})}),e.prev=1,e.next=4,S()({url:i,method:"POST",headers:{Authorization:"Bearer ".concat(tiTpc.bearer||""," ")}});case 4:if(!(o=e.sent).ok){e.next=14;break}return e.next=8,o.json();case 8:if(!(s=e.sent).message){e.next=12;break}return q(s.message),e.abrupt("return",{success:!1});case 12:e.next=17;break;case 14:if(!o.message){e.next=17;break}return q(o.message),e.abrupt("return",{success:!1});case 17:return localStorage.setItem("tpcCacheBuster",V()),e.abrupt("return",{success:!0});case 21:if(e.prev=21,e.t0=e.catch(1),!e.t0.message){e.next=26;break}return q(e.t0.message),e.abrupt("return",{success:!1});case 26:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t,r,n,c,a){return e.apply(this,arguments)}}(),ee=function(){var e=Object(s.useSelect)((function(e){return e("core/notices").getNotices("themeisle-blocks/notices/templates-cloud")})),t=Object(s.useDispatch)("core/notices").removeNotice;return Object(m.createElement)("div",{className:"notices"},e.map((function(e){return Object(m.createElement)(C.Notice,{key:e.id,status:e.status,isDismissible:e.isDismissible,onRemove:function(){return t(e.id,"themeisle-blocks/notices/templates-cloud")},actions:e.actions},e.content)})))};function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=lodash.omit,ce=r(13),ae=r(5),ie=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),oe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(m.createElement)(ae.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"})),se=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pe=function(e){var t=e.closeModal,r=e.getOrder,c=e.getSearchQuery,a=Object(s.useDispatch)("tpc/block-editor"),i=a.setFetching,o=a.updateCurrentTab,l={templates:Object(n.__)("Page Templates")};3===parseInt(tiTpc.tier)&&(l.library=Object(n.__)("My Library"));var u=Object(s.useSelect)((function(e){return e("tpc/block-editor").isFetching()})),p=Object(s.useSelect)((function(e){return e("tpc/block-editor").isPreview()})),b=Object(s.useSelect)((function(e){return e("tpc/block-editor").getCurrentTab()})),f=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.localStorage.setItem("tpcCacheBuster",V()),i(!0),t=r(),e.next=5,$(ue({search:c()},t));case 5:return e.next=7,W(ue({search:c()},t));case 7:i(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)("div",{className:"modal-header"},Object(m.createElement)("div",{className:"left"},Object(m.createElement)(C.Icon,{icon:v})),Object(m.createElement)("div",{className:"center"},Object.keys(l).map((function(e){return Object(m.createElement)(C.Button,{key:e,onClick:function(){return o(e)},className:d()("tabs",{"is-active":e===b})},l[e])}))),Object(m.createElement)("div",{className:"right"},"library"===b&&!p&&Object(m.createElement)(C.ButtonGroup,null,Object(m.createElement)(C.Button,{label:Object(n.__)("Re-sync Library"),icon:oe,disabled:u,className:d()("is-sync",{"is-loading":u}),onClick:f})),Object(m.createElement)(C.Button,{label:Object(n.__)("Close Modal"),icon:se,onClick:t})))},be=r(18),me=function(e){var t=e.isFetching,r=e.importBlocks,c=Object(ce.useViewportMatch)("large",">="),i=Object(ce.useViewportMatch)("large","<="),o=Object(ce.useViewportMatch)("small",">="),l=Object(ce.useViewportMatch)("small","<="),u=1400;c||i||!o||l?!(c||i||o||l)&&(u=600):u=960;var p=Object(s.useDispatch)("tpc/block-editor"),b=p.setFetching,f=p.togglePreview,d=Object(s.useSelect)((function(e){return e("tpc/block-editor").getPreview()})).item;Object(m.useEffect)((function(){v()}),[]);var g=Object(m.useState)(""),O=P()(g,2),j=O[0],h=O[1],v=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,y();case 3:b(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,Y(d.template_id);case 3:(t=e.sent).__file&&t.content&&"wp_export"===t.__file&&h(t.content),b(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)("div",{className:"tpc-modal-content"},Object(m.createElement)("div",{className:"preview-header"},Object(m.createElement)("div",{className:"left"},d.template_name||Object(n.__)("Template")),Object(m.createElement)("div",{className:"right"},Object(m.createElement)(C.Button,{isSecondary:!0,onClick:f},Object(n.__)("Close Preview")),Object(m.createElement)(C.Button,{isPrimary:!0,isBusy:t,disabled:t,onClick:function(){f(),r(j,d.meta||[])}},Object(n.__)("Import")))),t?Object(m.createElement)(C.Placeholder,null,Object(m.createElement)(C.Spinner,null)):Object(m.createElement)("div",{className:"preview-content"},Object(m.createElement)(be.BlockPreview,{blocks:Object(a.parse)(j),viewportWidth:u})))},fe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),de=Object(m.createElement)(ae.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"})),ge=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"})),Oe=r(19);function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ve={date:Object(n.__)("Date"),template_name:Object(n.__)("Name"),modified:Object(n.__)("Last Modified")},ye=function(e){var t=e.layout,r=e.sortingOrder,c=e.setLayout,a=e.isSearch,i=e.searchQuery,o=e.onSearch,s=e.setSearchQuery,l=e.setSortingOrder,u=e.changeOrder;return Object(m.createElement)("div",{className:"filters"},Object(m.createElement)("div",{className:"display-sorting"},Object(m.createElement)("div",{className:"sorting-label"},Object(n.__)("Sort by")),Object(m.createElement)("div",{className:"sorting-filter"},Object.keys(ve).map((function(e){return Object(m.createElement)(C.Button,{key:e,className:d()({"is-selected":e===r.orderby,"is-asc":"ASC"===r.order}),onClick:function(){var t={order:"DESC",orderby:e};e===r.orderby&&"DESC"===r.order&&(t.order="ASC"),l(he({},t)),u(he({},t))}},ve[e])})))),Object(m.createElement)("div",{className:"view-filters"},Object(m.createElement)("div",{className:"search-filters"},Object(m.createElement)("input",{placeholder:Object(n.__)("Search for a template…"),className:"filter-search",value:i,onChange:function(e){return s(e.target.value)},onKeyDown:function(e){e.keyCode===Oe.ENTER&&o()}}),a?Object(m.createElement)(C.Button,{label:Object(n.__)("Clear search query"),icon:se,onClick:function(){s(""),o("")}}):Object(m.createElement)(C.Button,{label:Object(n.__)("Search"),icon:fe,onClick:function(){return o()}})),Object(m.createElement)(C.Button,{label:Object(n.__)("List View"),icon:de,onClick:function(){return c("list")},isPressed:"list"===t}),Object(m.createElement)(C.Button,{label:Object(n.__)("Grid View"),icon:ge,onClick:function(){return c("grid")},isPressed:"grid"===t})))},we=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),_e=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"})),Ee=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(m.createElement)(ae.Path,{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"})),ke=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),Pe=function(e){var t=e.sortingOrder,r=e.layout,c=e.item,a=e.importBlocks,i=e.deletable,o=Object(s.useDispatch)("tpc/block-editor"),l=o.togglePreview,u=o.setPreviewData,p=Object(m.useState)(!1),b=P()(p,2),f=b[0],g=b[1],O=Object(m.useState)(!1),j=P()(O,2),h=j[0],v=j[1],y=Object(m.useState)(c.template_name),_=P()(y,2),k=_[0],x=_[1],S=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g("importing"),e.next=3,Y(c.template_id);case 3:(t=e.sent).__file&&t.content&&"wp_export"===t.__file&&a(t.content,c.meta||[]),g(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),T=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g("updating"),e.next=3,Z({template_id:c.template_id,template_name:k||c.template_name},t);case 3:return e.next=5,W(t);case 5:g(!1),v(!h);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.confirm(Object(n.__)("Are you sure you want to delete this template?"))){e.next=2;break}return e.abrupt("return",!1);case 2:return g("deleting"),e.next=5,K(c.template_id,t);case 5:g(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l(),u({type:"library",item:c});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if("grid"===r){var D={backgroundImage:"url(".concat(c.template_thumbnail,")")};return Object(m.createElement)("div",{key:c.template_id,className:"table-grid"},Object(m.createElement)("div",{style:D,className:d()("grid-preview",{"is-loading":h||!1!==f})},Object(m.createElement)("div",{className:"preview-actions"},Object(m.createElement)(C.Button,{isSecondary:!0,disabled:!1!==f,onClick:B},Object(n.__)("Preview")),Object(m.createElement)(C.Button,{isPrimary:!0,isBusy:"importing"===f,disabled:!1!==f,onClick:S},Object(n.__)("Import")),i&&Object(m.createElement)("div",{className:"preview-controls"},!c.link&&Object(m.createElement)(C.Button,{label:Object(n.__)("Edit"),icon:"updating"===f?oe:we,disabled:h||!1!==f,className:d()({"is-loading":"updating"===f}),onClick:function(){return v(!h)}},h&&Object(m.createElement)(C.Popover,{onFocusOutside:function(){return v(!h)},className:"controls-popover"},Object(m.createElement)("div",{className:"popover-content"},Object(m.createElement)(C.TextControl,{label:Object(n.__)("Template Name"),value:k,onChange:x}),Object(m.createElement)(C.Button,{label:Object(n.__)("Update"),icon:"updating"===f?oe:_e,disabled:!1!==f,className:d()({"is-loading":"updating"===f}),onClick:T})))),Object(m.createElement)(C.Button,{label:Object(n.__)("Delete"),icon:"deleting"===f?oe:Ee,disabled:!1!==f,className:d()({"is-loading":"deleting"===f}),onClick:N})))),Object(m.createElement)("div",{className:"card-footer"},Object(m.createElement)("p",null,c.template_name)))}var I=d()("actions",{"no-controls":!i});return Object(m.createElement)("div",{key:c.template_id,className:"table-row"},Object(m.createElement)("div",{className:"row-title"},Object(m.createElement)(C.Icon,{icon:ke}),h?Object(m.createElement)(C.TextControl,{label:Object(n.__)("Template Name"),hideLabelFromVision:!0,value:k,onChange:x}):c.template_name),i&&Object(m.createElement)("div",{className:"row-controls"},c.link?Object(m.createElement)(C.Tooltip,{text:Object(n.__)("This template is synced to a page.")},Object(m.createElement)(C.Button,{label:Object(n.__)("Edit"),icon:we,disabled:!0},Object(n.__)("Edit"))):Object(m.createElement)(C.Button,{label:h?Object(n.__)("Update"):Object(n.__)("Edit"),icon:h?"updating"===f?oe:_e:we,disabled:!1!==f,className:d()({"is-loading":"updating"===f}),onClick:h?T:function(){return v(!h)}},h?Object(n.__)("Update"):Object(n.__)("Edit")),Object(m.createElement)(C.Button,{label:Object(n.__)("Delete"),icon:"deleting"===f?oe:Ee,disabled:!1!==f,className:d()({"is-loading":"deleting"===f}),onClick:N},"deleting"===f?Object(n.__)("Deleting")+"...":Object(n.__)("Delete"))),Object(m.createElement)("div",{className:I},Object(m.createElement)(C.Button,{isSecondary:!0,disabled:!1!==f,onClick:B},Object(n.__)("Preview")),Object(m.createElement)(C.Button,{isPrimary:!0,isBusy:"importing"===f,disabled:!1!==f,onClick:S},Object(n.__)("Import"))))},xe=function(e){var t=e.total,r=e.current,n=e.onChange;if(t<2)return null;for(var c=[],a=function(e){var t=e===r;c.push(Object(m.createElement)(C.Button,{key:"page-".concat(e),isPrimary:t,disabled:t,onClick:function(){return n(e)}},e+1))},i=0;i<t;i++)a(i);return Object(m.createElement)(C.ButtonGroup,{className:"pagination"},c)};function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Te=Object(s.withSelect)((function(e,t){var r=t.isGeneral?e("tpc/block-editor").getTemplates():e("tpc/block-editor").getLibrary(),n=r.items;return{items:void 0===n?[]:n,currentPage:r.currentPage,totalPages:r.totalPages}}))((function(e){var t=e.importBlocks,r=e.isGeneral,c=void 0!==r&&r,a=e.isFetching,i=e.items,o=e.currentPage,l=e.totalPages,u=e.getOrder,p=e.setQuery,b=e.getSearchQuery,f=e.setSorting,g=Object(s.useDispatch)("tpc/block-editor").setFetching,O=Object(m.useState)("grid"),j=P()(O,2),h=j[0],v=j[1],y=Object(m.useState)({templates:!1,library:!1}),_=P()(y,2),k=_[0],x=_[1],S=function(e){return x(Ce(Ce({},k),{},c?{templates:e}:{library:e}))},T=function(){return c?k.templates:k.library},N=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g(!0),t=u(),!c){e.next=7;break}return e.next=5,$(Ce({search:b()},t));case 5:e.next=9;break;case 7:return e.next=9,W(Ce({search:b()},t));case 9:g(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(m.useEffect)((function(){i&&i.length>0||N()}),[c]);var B=function(){var e=E()(w.a.mark((function e(t){var r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g(!0),r=u(),!c){e.next=7;break}return e.next=5,$(Ce({search:b(),page:t},r));case 5:e.next=9;break;case 7:return e.next=9,W(Ce({search:b(),page:t},r));case 9:g(!1);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=E()(w.a.mark((function e(){var t,r,n=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:b(),g(!0),S(!!t),r=u(),!c){e.next=9;break}return e.next=7,$(Ce({search:t},r));case 7:e.next=11;break;case 9:return e.next=11,W(Ce({search:t},r));case 11:g(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=E()(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(g(!0),!c){e.next=6;break}return e.next=4,$(Ce(Ce({},t),{},{search:b()}));case 4:e.next=8;break;case 6:return e.next=8,W(Ce(Ce({},t),{},{search:b()}));case 8:g(!1);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();if(a)return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(ye,{layout:h,sortingOrder:u(),setLayout:v,isSearch:T(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(m.createElement)(C.Placeholder,null,Object(m.createElement)(C.Spinner,null)));if(!Boolean(i.length))return Object(m.createElement)("div",{className:"table-content"},Object(m.createElement)(ye,{layout:h,sortingOrder:u(),setLayout:v,isSearch:T(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(n.__)("No templates available. Add a new one?"));var A=d()("table-content",{"is-grid":"grid"===h});return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(ye,{layout:h,sortingOrder:u(),setLayout:v,isSearch:T(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(m.createElement)("div",{className:A},i.map((function(e){return Object(m.createElement)(Pe,{sortingOrder:u(),deletable:!c,key:e.template_id,layout:h,item:e,importBlocks:t})}))),Object(m.createElement)(xe,{onChange:B,current:o,total:l}))})),Ne=Object(s.withSelect)((function(e){var t=e("tpc/block-editor"),r=t.isPreview,n=t.isFetching,c=t.getCurrentTab;return{isPreview:r(),isFetching:n(),currentTab:c()}}))((function(e){var t=e.importBlocks,r=e.getOrder,c=e.setQuery,a=e.getSearchQuery,i=e.setSorting,o=e.isPreview,s=e.currentTab,l=e.isFetching;return o&&"library"===s?Object(m.createElement)(me,{isFetching:l,importBlocks:t}):Object(m.createElement)("div",{className:"tpc-modal-content"},Object(m.createElement)(ee,null),["templates","library"].includes(s)&&Object(m.createElement)(Te,{isFetching:l,isGeneral:"templates"===s,importBlocks:t,getOrder:r,setQuery:c,getSearchQuery:a,setSorting:i}),"patterns"===s&&Object(n.__)("We are still working on this. Please check back later. Thank you!"))})),Be=function(e){var t=e.title,r=e.leftButtons,c=e.rightButtons,a=e.heading,i=e.previewUrl,o=Object(N.stringifyUrl)({url:i,query:{tpcpreview:"yes"}}),s=t||Object(n.__)("Preview");return Object(m.createElement)("div",{className:"ob-preview single-templates"},Object(m.createElement)("div",{className:"preview"},Object(m.createElement)("iframe",{title:s,src:o,frameBorder:"0"}),Object(m.createElement)("div",{className:"loading"},Object(m.createElement)(C.Dashicon,{icon:"update",size:50}))),Object(m.createElement)("div",{className:"bottom-bar"},r&&Object(m.createElement)("div",{className:"navigator"},r),a&&Object(m.createElement)("h2",{className:"heading"},a),c&&Object(m.createElement)("div",{className:"actions"},c)))};function De(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?De(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):De(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae=Object(ce.compose)(Object(s.withSelect)((function(e){var t=e("tpc/block-editor"),r=t.isPreview,n=t.getPreview,c=t.getCurrentTab;return{isPreview:r(),currentTab:c(),previewData:n().item}})),Object(s.withDispatch)((function(e){var t=e("core/block-editor"),r=t.removeBlock,n=t.replaceBlocks,c=e("tpc/block-editor").togglePreview;return{removeBlock:r,replaceBlocks:n,closePreview:function(){return c(!1)}}})))((function(e){var t=e.clientId,r=e.isPreview,c=e.previewData,i=e.currentTab,o=e.removeBlock,l=e.replaceBlocks,u=e.closePreview,p=Object(s.useSelect)((function(e){return{type:e("core/editor").getEditedPostAttribute("type"),postId:e("core/editor").getEditedPostAttribute("id")}})),b=p.type,f=p.postId,d=Object(s.useDispatch)("core/notices").createErrorNotice,g=Object(s.useDispatch)("tpc/block-editor"),O=g.updateLibrary,j=g.updateTemplates,h=Object(m.useState)(!1),v=P()(h,2),y=v[0],_=v[1],k=Object(m.useState)(!1),x=P()(k,2),S=x[0],T=x[1],N=Object(m.useState)({templates:"",library:""}),B=P()(N,2),D=B[0],I=B[1],A=Object(m.useState)({templates:{order:"DESC",orderby:"date"},library:{order:"DESC",orderby:"date"}}),F=P()(A,2),L=F[0],V=F[1],U="templates"===i,M=function(){return U?D.templates:D.library},R=function(){return U?L.templates:L.library},z=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(O([]),j([]),0<r.length&&["post","page"].includes(b)){var n=null;"post"===b?n=new wp.api.models.Post({id:f}):"page"===b&&(n=new wp.api.models.Page({id:f})),n.set("meta",Ie({},JSON.parse(r))),n.save()}l(t,Object(a.parse)(e))},H=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),e.next=3,Y(c.template_id).then((function(e){if(e.__file&&e.content&&"wp_export"===e.__file)return u(),T(!1),z(e.content,c.meta||[]),!1;d(Object(n.__)("Something went wrong while importing. Please try again."),{type:"snackbar"}),T(!1),o(t)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){_(!1),T(!1),o(t)};return Object(m.useEffect)((function(){setTimeout((function(){_(!0)}),100)}),[]),y?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(C.Modal,{onRequestClose:G,shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!r||"templates"!==i,isDismissible:!1,overlayClassName:"tpc-template-cloud-modal"},Object(m.createElement)(pe,{closeModal:G,getOrder:R,getSearchQuery:M}),Object(m.createElement)(Ne,{importBlocks:z,getOrder:R,setQuery:function(e){return I(Ie(Ie({},D),{},U?{templates:e}:{library:e}))},getSearchQuery:M,setSorting:function(e){return V(Ie(Ie({},L),{},U?{templates:e}:{library:e}))}}),Object(m.createElement)((function(){if(!r||"templates"!==i)return null;var e=c.link,t=c.template_name;return Object(m.createElement)(C.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,className:"tpc-preview-wrap-modal"},Object(m.createElement)(Be,{previewUrl:e,heading:t,leftButtons:Object(m.createElement)(m.Fragment,null,Object(m.createElement)(C.Button,{disabled:S,icon:ie,onClick:u})),rightButtons:Object(m.createElement)(C.Button,{disabled:S,isPrimary:!0,onClick:H},S?Object(n.__)("Importing")+"...":Object(n.__)("Import"))}),";")}),null))):null}));Object(a.registerBlockType)("ti-tpc/templates-cloud",{title:Object(n.__)("Templates Cloud"),description:Object(n.__)("A cloud based templates library which enables you to create ready-made website in no time."),icon:h,category:"design",keywords:["templates cloud","patterns","template library"],supports:{html:!1},edit:Ae,save:function(){return null}}),3===parseInt(tiTpc.tier)&&Object(c.registerPlugin)("ti-tpc",{render:function(){var e=Object(m.useState)(!1),t=P()(e,2),r=t[0],c=t[1],i=Object(m.useState)(!1),o=P()(i,2),l=o[0],u=o[1],p=Object(m.useState)(""),b=P()(p,2),f=b[0],g=b[1],O=window.tiTpc.canPredefine,j=Object(s.useDispatch)("core/notices"),v=j.createErrorNotice,y=j.createSuccessNotice,_=Object(s.useDispatch)("core/editor").editPost,k=Object(s.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlockCount,n=t.getSelectedBlock,c=t.getMultiSelectedBlocks,i=1===r()?n():c();return Object(a.serialize)(i)}),[]),x=Object(s.useSelect)((function(e){var t=(0,e("core/block-editor").getBlocks)();return Object(a.serialize)(t)}),[]),B=Object(s.useSelect)((function(e){return{meta:e("core/editor").getEditedPostAttribute("meta")||{},postId:e("core/editor").getEditedPostAttribute("id"),type:e("core/editor").getEditedPostAttribute("type"),link:e("core/editor").getEditedPostAttribute("link"),postTitle:e("core/editor").getEditedPostAttribute("title")||Object(n.__)("Template")}})),D=B.meta,I=B.postTitle,A=B.postId,F=B.type,L=B.link,U=B.meta,M=U._ti_tpc_template_sync,R=U._ti_tpc_template_id,z=U._ti_tpc_screenshot_url,H=U._ti_tpc_site_slug,G=U._ti_tpc_published,Q=Object(s.useSelect)((function(e,t){var r=t.forceIsSaving,n=e("core/editor"),c=n.isSavingPost,a=n.isPublishingPost,i=n.isAutosavingPost,o=r||c(),s=i();return(a()||o)&&!s})),q=Object(m.useState)(M),$=P()(q,2),W=$[0],Z=$[1],Y=Object(m.useState)(R),K=P()(Y,2),te=K[0],ce=K[1],ae=Object(m.useState)(H),ie=P()(ae,2),oe=ie[0],se=ie[1],le=Object(m.useState)(G),ue=P()(le,2),pe=ue[0],be=ue[1],me=Object(m.useState)(z),fe=P()(me,2),de=fe[0],ge=fe[1];Object(m.useEffect)((function(){_({meta:re(re({},D),{},{_ti_tpc_template_sync:W,_ti_tpc_template_id:te,_ti_tpc_screenshot_url:de,_ti_tpc_site_slug:oe,_ti_tpc_published:pe})})}),[W,te,de,oe,pe]),Object(m.useEffect)((function(){Q&&W&&je()}),[Q,W]);var Oe=function(){var e=E()(w.a.mark((function e(){var t,r,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(!0),t={__file:"wp_export",version:2,content:k},r=Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:re(re({},ne(tiTpc.params,"meta")),{},{template_name:f,template_type:"gutenberg"})}),e.prev=3,e.next=6,S()({url:r,method:"POST",data:t,parse:!1});case 6:if(!(a=e.sent).ok){e.next=12;break}return e.next=10,a.json();case 10:(i=e.sent).message?v(i.message,{type:"snackbar"}):(window.localStorage.setItem("tpcCacheBuster",V()),y(Object(n.__)("Template saved."),{type:"snackbar"}));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),e.t0.message&&v(e.t0.message,{type:"snackbar"});case 17:u(!1),c(!1),g("");case 20:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(){return e.apply(this,arguments)}}(),je=function(){var e=E()(w.a.mark((function e(){var t,r,c,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),t={__file:"wp_export",version:2,content:x},c=!1,!te){e.next=7;break}return e.next=6,J(te);case 6:c=e.sent;case 7:return r=c?Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates/"+te,query:re(re({},ne(tiTpc.params,"meta")),{},{meta:pe?JSON.stringify(tiTpc.params.meta):"",template_name:I,link:L})}):Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:re(re({},ne(tiTpc.params,"meta")),{},{template_name:I,template_type:"gutenberg",template_site_slug:H||"",template_thumbnail:z||"",link:L})}),e.prev=8,e.next=11,S()({url:r,method:"POST",data:t,parse:!1});case 11:if(!(a=e.sent).ok){e.next=17;break}return e.next=15,a.json();case 15:(i=e.sent).message?v(i.message,{type:"snackbar"}):(window.localStorage.setItem("tpcCacheBuster",V()),y(Object(n.__)("Template saved."),{type:"snackbar"}),i.template_id?(ce(i.template_id),he(i.template_id)):he());case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(8),e.t0.message&&v(e.t0.message,{type:"snackbar"});case 22:u(!1);case 23:case"end":return e.stop()}}),e,null,[[8,19]])})));return function(){return e.apply(this,arguments)}}(),he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te,t=null;return"post"===F?t=new wp.api.models.Post({id:A}):"page"===F&&(t=new wp.api.models.Page({id:A})),t.set("meta",{_ti_tpc_template_id:e,_ti_tpc_template_sync:W,_ti_tpc_screenshot_url:de,_ti_tpc_site_slug:oe,_ti_tpc_published:!pe}),t.save()};return["post","page"].includes(F)?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(T.PluginBlockSettingsMenuItem,{label:Object(n.__)("Save to Neve Cloud"),icon:"none",onClick:function(){return c(!0)}}),Object(m.createElement)(T.PluginSidebarMoreMenuItem,{icon:Object(m.createElement)(C.Icon,{icon:h}),target:"ti-tpc"},Object(n.__)("Templates Cloud")),Object(m.createElement)(T.PluginSidebar,{name:"ti-tpc",title:Object(n.__)("Templates Cloud"),className:"ti-tpc-components-panel"},Object(m.createElement)(C.PanelBody,null,Object(n.__)("Save this page as a template in your Templates Cloud library."),Object(m.createElement)(C.Button,{isPrimary:!0,isBusy:l,disabled:l,onClick:je},Object(n.__)("Save Page to Neve Cloud")),Object(m.createElement)(C.ToggleControl,{label:Object(n.__)("Automatically sync to the cloud"),checked:W,onChange:function(){return Z(!W)}})),O&&Object(m.createElement)(C.PanelBody,null,Object(m.createElement)("h4",null,Object(n.__)("Publish Settings")),Object(m.createElement)(C.TextControl,{label:Object(n.__)("Screenshot URL"),value:de,type:"url",onChange:ge}),Object(m.createElement)(C.TextControl,{label:Object(n.__)("Site Slug"),value:oe,help:Object(n.__)("Use `general` to publish this as a global template. Otherwise use the starter site slug to make it available as a single page for the starter site."),type:"url",onChange:se}),Object(m.createElement)((function(){if(!O)return null;var e=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u("publishing"),e.next=3,X(R,H,z,!G,L).then((function(e){e.success&&(be(!pe),he(),y(pe?Object(n.__)("Template Unpublished."):Object(n.__)("Template Published."),{type:"snackbar"}))}));case 3:u(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)(C.Button,{isSecondary:!0,onClick:e,disabled:!1!==l,className:d()({"is-loading":"publishing"===l})},pe&&("publishing"===l?Object(n.__)("Unpublishing"):Object(n.__)("Unpublish")),!pe&&("publishing"===l?Object(n.__)("Publishing"):Object(n.__)("Publish")))}),null),Object(m.createElement)(ee,null))),r&&Object(m.createElement)(C.Modal,{title:Object(n.__)("Save Template"),onRequestClose:function(){return c(!1)}},Object(m.createElement)(C.TextControl,{label:Object(n.__)("Template Name"),value:f,onChange:g}),Object(m.createElement)(C.Button,{isPrimary:!0,isBusy:l,disabled:l,onClick:Oe},Object(n.__)("Save")))):null},icon:h})}]);
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=29)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.regeneratorRuntime},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},function(e,t){function r(e,t,r,n,c,a,i){try{var o=e[a](i),s=o.value}catch(e){return void r(e)}o.done?t(s):Promise.resolve(s).then(n,c)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(c,a){var i=e.apply(t,n);function o(e){r(i,c,a,o,s,"next",e)}function s(e){r(i,c,a,o,s,"throw",e)}o(void 0)}))}}},function(e,t,r){var n=r(21),c=r(22),a=r(23),i=r(25);e.exports=function(e,t){return n(e)||c(e,t)||a(e,t)||i()}},function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var i=c.apply(null,n);i&&e.push(i)}else if("object"===a)for(var o in n)r.call(n,o)&&n[o]&&e.push(o)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()},function(e,t,r){"use strict";const n=r(26),c=r(27),a=r(28);function i(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function o(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function s(e,t){return t.decode?c(e):e}function l(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function u(e){const t=(e=l(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function b(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const c="string"==typeof r&&r.includes(e.arrayFormatSeparator),a="string"==typeof r&&!c&&s(r,e).includes(e.arrayFormatSeparator);r=a?s(r,e):r;const i=c||a?r.split(e.arrayFormatSeparator).map(t=>s(t,e)):null===r?r:s(r,e);n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const c of e.split("&")){let[e,i]=a(t.decode?c.replace(/\+/g," "):c,"=");i=void 0===i?null:["comma","separator"].includes(t.arrayFormat)?i:s(i,t),r(s(e,t),i,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=u,t.parse=b,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const c=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[",c,"]"].join("")]:[...r,[o(t,e),"[",o(c,e),"]=",o(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[o(t,e),"[]"].join("")]:[...r,[o(t,e),"[]=",o(n,e)].join("")];case"comma":case"separator":return t=>(r,n)=>null==n||0===n.length?r:0===r.length?[[o(t,e),"=",o(n,e)].join("")]:[[r,o(n,e)].join(e.arrayFormatSeparator)];default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,o(t,e)]:[...r,[o(t,e),"=",o(n,e)].join("")]}}(t),c={};for(const t of Object.keys(e))r(t)||(c[t]=e[t]);const a=Object.keys(c);return!1!==t.sort&&a.sort(t.sort),a.map(r=>{const c=e[r];return void 0===c?"":null===c?o(r,t):Array.isArray(c)?c.reduce(n(r),[]).join("&"):o(r,t)+"="+o(c,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=a(e,"#");return Object.assign({url:r.split("?")[0]||"",query:b(u(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:s(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const n=l(e.url).split("?")[0]||"",c=t.extract(e.url),a=t.parse(c,{sort:!1}),i=Object.assign(a,e.query);let s=t.stringify(i,r);s&&(s="?"+s);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u="#"+o(e.fragmentIdentifier,r)),`${n}${s}${u}`}},function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},function(e,t){e.exports=window.wp.apiFetch},function(e,t){e.exports=window.wp.blocks},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.wp.editPost},,,function(e,t){e.exports=window.wp.plugins},function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.keycodes},function(e,t,r){},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,c=!1,a=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){c=!0,a=e}finally{try{n||null==o.return||o.return()}finally{if(c)throw a}}return r}}},function(e,t,r){var n=r(24);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,r){"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase())},function(e,t,r){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),c=new RegExp("(%[a-f0-9]{2})+","gi");function a(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],a(r),a(n))}function i(e){try{return decodeURIComponent(e)}catch(c){for(var t=e.match(n),r=1;r<t.length;r++)t=(e=a(t,r).join("")).match(n);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=c.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=i(r[0]);n!==r[0]&&(t[r[0]]=n)}r=c.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),o=0;o<a.length;o++){var s=a[o];e=e.replace(new RegExp(s,"g"),t[s])}return e}(e)}}},function(e,t,r){"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},function(e,t,r){"use strict";r.r(t);var n=r(1),c=r(17),a=r(12),i=(r(20),r(10)),o=r.n(i),s=r(4);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p={isFetching:!0,isPreview:!1,tab:3===parseInt(window.tiTpc.tier)?"library":"templates",templates:[],patterns:[],library:{items:[],currentPage:0,totalPages:0},preview:{type:"templates",item:{}}};Object(s.registerStore)("tpc/block-editor",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,t=arguments.length>1?arguments[1]:void 0;return"SET_FETCHING"===t.type?u(u({},e),{},{isFetching:t.isFetching}):"TOGGLE_PREVIEW"===t.type?u(u({},e),{},{isPreview:!e.isPreview}):"UPDATE_CURRENT_TAB"===t.type?u(u({},e),{},{tab:t.tab,isPreview:!1}):"UPDATE_TEMPLATES"===t.type?u(u({},e),{},{templates:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"UPDATE_PATTERNS"===t.type?u(u({},e),{},{patterns:t.items}):"UPDATE_LIBRARY"===t.type?u(u({},e),{},{library:{items:t.items,currentPage:Number(t.currentPage),totalPages:Number(t.totalPages)}}):"SET_PREVIEW_DATA"===t.type?u(u({},e),{},{preview:t.preview}):e},selectors:{isFetching:function(e){return e.isFetching},isPreview:function(e){return e.isPreview},getCurrentTab:function(e){return e.tab},getTemplates:function(e){return e.templates},getPatterns:function(e){return e.patterns},getLibrary:function(e){return e.library},getPreview:function(e){return e.preview}},actions:{setFetching:function(e){return{type:"SET_FETCHING",isFetching:e}},togglePreview:function(e){return{type:"TOGGLE_PREVIEW",isPreview:e}},updateCurrentTab:function(e){return{type:"UPDATE_CURRENT_TAB",tab:e}},updateTemplates:function(e,t,r){return{type:"UPDATE_TEMPLATES",items:e,currentPage:t,totalPages:r}},updatePatterns:function(e){return{type:"UPDATE_PATTERNS",items:e}},updateLibrary:function(e,t,r){return{type:"UPDATE_LIBRARY",items:e,currentPage:t,totalPages:r}},setPreviewData:function(e){return{type:"SET_PREVIEW_DATA",preview:e}}}});var b,m=r(0),f=r(8),d=r.n(f),O=wp.primitives,g=O.Path,j=O.SVG,v=function(e){var t=e.className;return Object(m.createElement)(j,{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:d()(["tpc-icon",t])},Object(m.createElement)(g,{d:"M22.8063 24H1.19365C0.534714 24 0 23.4653 0 22.8063V1.19365C0 0.534714 0.534714 0 1.19365 0H22.8063C23.4653 0 24 0.534714 24 1.19365V22.8063C24 23.4653 23.4653 24 22.8063 24Z",fill:"#14171C"}),Object(m.createElement)(g,{d:"M19.8466 20.8187V7.39687V4.43164H16.884H3.45947L6.422 7.39687H16.884V17.8562L19.8466 20.8187Z",fill:"white"}),Object(m.createElement)(g,{d:"M10.138 14.1429L10.1407 17.0838L12.7764 19.7195L12.7656 11.5152L4.55859 11.5044L7.19435 14.1375L10.138 14.1429Z",fill:"white"}))},h=function(){return Object(m.createElement)(j,{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"tpc-template-cloud-icon"},Object(m.createElement)(g,{d:"M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z",fill:"#0366D6"}),Object(m.createElement)(g,{d:"M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z",fill:"white"}),Object(m.createElement)(g,{d:"M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z",fill:"white"}))},y=r(3),w=r.n(y),_=r(6),E=r.n(_),k=r(7),P=r.n(k),x=r(11),S=r.n(x),T=r(2),C=r(14),N=r(9),B=new Uint8Array(16);function D(){if(!b&&!(b="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return b(B)}for(var I=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,A=function(e){return"string"==typeof e&&I.test(e)},F=[],L=0;L<256;++L)F.push((L+256).toString(16).substr(1));var V=function(e,t,r){var n=(e=e||{}).random||(e.rng||D)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var c=0;c<16;++c)t[r+c]=n[c];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(F[e[t+0]]+F[e[t+1]]+F[e[t+2]]+F[e[t+3]]+"-"+F[e[t+4]]+F[e[t+5]]+"-"+F[e[t+6]]+F[e[t+7]]+"-"+F[e[t+8]]+F[e[t+9]]+"-"+F[e[t+10]]+F[e[t+11]]+F[e[t+12]]+F[e[t+13]]+F[e[t+14]]+F[e[t+15]]).toLowerCase();if(!A(r))throw TypeError("Stringified UUID is invalid");return r}(n)};function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=lodash.omit,z=Object(s.dispatch)("tpc/block-editor"),H=z.updateLibrary,G=z.updateTemplates,Q=Object(s.dispatch)("core/notices").createNotice,q=function(e){Q("warning",e,{context:"themeisle-blocks/notices/templates-cloud",isDismissible:!0})},$=function(){var e=E()(w.a.mark((function e(){var t,r,n,c,a,i,o,s=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},r=M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),{},{per_page:12,page:0,premade:!0,template_site_slug:"general"},t),n=Object(N.stringifyUrl)({url:tiTpc.endpoint+"page-templates",query:r}),e.prev=3,e.next=6,S()({url:n,method:"GET",parse:!1});case 6:if(!(c=e.sent).ok){e.next=16;break}return e.next=10,c.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",q(a.message));case 13:i=c.headers.get("x-wp-totalpages"),o=r.page,G(a,o,i);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),e.t0.message&&q(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[3,18]])})));return function(){return e.apply(this,arguments)}}(),W=function(){var e=E()(w.a.mark((function e(){var t,r,n,c,a,i,o,s=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:{},r=M({per_page:12,page:0},t),n=Object(N.stringifyUrl)({url:tiTpc.endpoint+"templates",query:M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),r)}),e.prev=3,e.next=6,S()({url:n,method:"GET",parse:!1});case 6:if(!(c=e.sent).ok){e.next=16;break}return e.next=10,c.json();case 10:if(!(a=e.sent).message){e.next=13;break}return e.abrupt("return",q(a.message));case 13:i=c.headers.get("x-wp-totalpages"),o=r.page,H(a,o,i);case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(3),e.t0.message&&q(e.t0.message);case 21:case"end":return e.stop()}}),e,null,[[3,18]])})));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=E()(w.a.mark((function e(t){var r,n,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t.template_id),query:M(M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)},t)}),e.prev=1,e.next=4,S()({url:r,method:"POST",parse:!1});case 4:if(!(n=e.sent).ok){e.next=11;break}return e.next=8,n.json();case 8:if(!(c=e.sent).message){e.next=11;break}return e.abrupt("return",q(c.message));case 11:return localStorage.setItem("tpcCacheBuster",V()),e.next=14,$();case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&q(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=E()(w.a.mark((function e(t){var r,n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(window.tiTpc.endpoint,"templates/").concat(t),query:M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta"))}),e.prev=1,e.next=4,S()({url:r,method:"GET",parse:!1});case 4:if(!(n=e.sent).ok){e.next=12;break}return e.next=8,n.json();case 8:if(!e.sent.message){e.next=11;break}return e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:e.next=17;break;case 14:return e.prev=14,e.t0=e.catch(1),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(t){return e.apply(this,arguments)}}(),K=function(){var e=E()(w.a.mark((function e(t){var r,n,c;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t,"/import"),query:M({cache:localStorage.getItem("tpcCacheBuster")},R(tiTpc.params,"meta"))}),n={},e.prev=2,e.next=5,S()({url:r,method:"GET",parse:!1});case 5:if(!(c=e.sent).ok){e.next=12;break}return e.next=9,c.json();case 9:if(!(n=e.sent).message){e.next=12;break}return e.abrupt("return",q(n.message));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(2),e.t0.message&&q(e.t0.message);case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(t){return e.apply(this,arguments)}}(),Y=function(){var e=E()(w.a.mark((function e(t,r){var n,c,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t),query:M({cache:localStorage.getItem("tpcCacheBuster"),_method:"DELETE"},R(tiTpc.params,"meta"))}),e.prev=1,e.next=4,S()({url:n,method:"POST"});case 4:if(!(c=e.sent).ok){e.next=11;break}return e.next=8,c.json();case 8:if(!(a=e.sent).message){e.next=11;break}return e.abrupt("return",q(a.message));case 11:return localStorage.setItem("tpcCacheBuster",V()),e.next=14,W(r);case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(1),e.t0.message&&q(e.t0.message);case 19:case"end":return e.stop()}}),e,null,[[1,16]])})));return function(t,r){return e.apply(this,arguments)}}(),X=function(){var e=E()(w.a.mark((function e(t,r,n,c,a){var i,o,s;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Object(N.stringifyUrl)({url:"".concat(tiTpc.endpoint,"templates/").concat(t,"/publish"),query:M(M({cache:localStorage.getItem("tpcCacheBuster"),method:"POST",template_site_slug:r,template_thumbnail:n,premade:c?"yes":"no",link:a},R(tiTpc.params,"meta")),{},{meta:JSON.stringify(tiTpc.params.meta)})}),e.prev=1,e.next=4,S()({url:i,method:"POST",headers:{Authorization:"Bearer ".concat(tiTpc.bearer||""," ")}});case 4:if(!(o=e.sent).ok){e.next=14;break}return e.next=8,o.json();case 8:if(!(s=e.sent).message){e.next=12;break}return q(s.message),e.abrupt("return",{success:!1});case 12:e.next=17;break;case 14:if(!o.message){e.next=17;break}return q(o.message),e.abrupt("return",{success:!1});case 17:return localStorage.setItem("tpcCacheBuster",V()),e.abrupt("return",{success:!0});case 21:if(e.prev=21,e.t0=e.catch(1),!e.t0.message){e.next=26;break}return q(e.t0.message),e.abrupt("return",{success:!1});case 26:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t,r,n,c,a){return e.apply(this,arguments)}}(),ee=function(){var e=Object(s.useSelect)((function(e){return e("core/notices").getNotices("themeisle-blocks/notices/templates-cloud")})),t=Object(s.useDispatch)("core/notices").removeNotice;return Object(m.createElement)("div",{className:"notices"},e.map((function(e){return Object(m.createElement)(T.Notice,{key:e.id,status:e.status,isDismissible:e.isDismissible,onRemove:function(){return t(e.id,"themeisle-blocks/notices/templates-cloud")},actions:e.actions},e.content)})))};function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=lodash.omit,ce=r(13),ae=r(5),ie=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),oe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(m.createElement)(ae.Path,{d:"M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z"})),se=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"}));function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pe=function(e){var t=e.closeModal,r=e.getOrder,c=e.getSearchQuery,a=Object(s.useDispatch)("tpc/block-editor"),i=a.setFetching,o=a.updateCurrentTab,l={templates:Object(n.__)("Page Templates")};3===parseInt(tiTpc.tier)&&(l.library=Object(n.__)("My Library"));var u=Object(s.useSelect)((function(e){return e("tpc/block-editor").isFetching()})),p=Object(s.useSelect)((function(e){return e("tpc/block-editor").isPreview()})),b=Object(s.useSelect)((function(e){return e("tpc/block-editor").getCurrentTab()})),f=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.localStorage.setItem("tpcCacheBuster",V()),i(!0),t=r(),e.next=5,$(ue({search:c()},t));case 5:return e.next=7,W(ue({search:c()},t));case 7:i(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)("div",{className:"modal-header"},Object(m.createElement)("div",{className:"left"},Object(m.createElement)(T.Icon,{icon:h})),Object(m.createElement)("div",{className:"center"},Object.keys(l).map((function(e){return Object(m.createElement)(T.Button,{key:e,onClick:function(){return o(e)},className:d()("tabs",{"is-active":e===b})},l[e])}))),Object(m.createElement)("div",{className:"right"},"library"===b&&!p&&Object(m.createElement)(T.ButtonGroup,null,Object(m.createElement)(T.Button,{label:Object(n.__)("Re-sync Library"),icon:oe,disabled:u,className:d()("is-sync",{"is-loading":u}),onClick:f})),Object(m.createElement)(T.Button,{label:Object(n.__)("Close Modal"),icon:se,onClick:t})))},be=r(18),me=function(e){var t=e.isFetching,r=e.importBlocks,c=Object(ce.useViewportMatch)("large",">="),i=Object(ce.useViewportMatch)("large","<="),o=Object(ce.useViewportMatch)("small",">="),l=Object(ce.useViewportMatch)("small","<="),u=1400;c||i||!o||l?!(c||i||o||l)&&(u=600):u=960;var p=Object(s.useDispatch)("tpc/block-editor"),b=p.setFetching,f=p.togglePreview,d=Object(s.useSelect)((function(e){return e("tpc/block-editor").getPreview()})).item;Object(m.useEffect)((function(){h()}),[]);var O=Object(m.useState)(""),g=P()(O,2),j=g[0],v=g[1],h=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,y();case 3:b(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),e.next=3,K(d.template_id);case 3:(t=e.sent).__file&&t.content&&"wp_export"===t.__file&&v(t.content),b(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)("div",{className:"tpc-modal-content"},Object(m.createElement)("div",{className:"preview-header"},Object(m.createElement)("div",{className:"left"},d.template_name||Object(n.__)("Template")),Object(m.createElement)("div",{className:"right"},Object(m.createElement)(T.Button,{isSecondary:!0,onClick:f},Object(n.__)("Close Preview")),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:t,disabled:t,onClick:function(){f(),r(j,d.meta||[])}},Object(n.__)("Import")))),t?Object(m.createElement)(T.Placeholder,null,Object(m.createElement)(T.Spinner,null)):Object(m.createElement)("div",{className:"preview-content"},Object(m.createElement)(be.BlockPreview,{blocks:Object(a.parse)(j),viewportWidth:u})))},fe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),de=Object(m.createElement)(ae.SVG,{xmlns:"https://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"})),Oe=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z",fillRule:"evenodd",clipRule:"evenodd"})),ge=r(19);function je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var he={date:Object(n.__)("Date"),template_name:Object(n.__)("Name"),modified:Object(n.__)("Last Modified")},ye=function(e){var t=e.layout,r=e.sortingOrder,c=e.setLayout,a=e.isSearch,i=e.searchQuery,o=e.onSearch,s=e.setSearchQuery,l=e.setSortingOrder,u=e.changeOrder;return Object(m.createElement)("div",{className:"filters"},Object(m.createElement)("div",{className:"display-sorting"},Object(m.createElement)("div",{className:"sorting-label"},Object(n.__)("Sort by")),Object(m.createElement)("div",{className:"sorting-filter"},Object.keys(he).map((function(e){return Object(m.createElement)(T.Button,{key:e,className:d()({"is-selected":e===r.orderby,"is-asc":"ASC"===r.order}),onClick:function(){var t={order:"DESC",orderby:e};e===r.orderby&&"DESC"===r.order&&(t.order="ASC"),l(ve({},t)),u(ve({},t))}},he[e])})))),Object(m.createElement)("div",{className:"view-filters"},Object(m.createElement)("div",{className:"search-filters"},Object(m.createElement)("input",{placeholder:Object(n.__)("Search for a template…"),className:"filter-search",value:i,onChange:function(e){return s(e.target.value)},onKeyDown:function(e){e.keyCode===ge.ENTER&&o()}}),a?Object(m.createElement)(T.Button,{label:Object(n.__)("Clear search query"),icon:se,onClick:function(){s(""),o("")}}):Object(m.createElement)(T.Button,{label:Object(n.__)("Search"),icon:fe,onClick:function(){return o()}})),Object(m.createElement)(T.Button,{label:Object(n.__)("List View"),icon:de,onClick:function(){return c("list")},isPressed:"list"===t}),Object(m.createElement)(T.Button,{label:Object(n.__)("Grid View"),icon:Oe,onClick:function(){return c("grid")},isPressed:"grid"===t})))},we=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),_e=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"})),Ee=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(m.createElement)(ae.Path,{d:"M12 4h3c.6 0 1 .4 1 1v1H3V5c0-.6.5-1 1-1h3c.2-1.1 1.3-2 2.5-2s2.3.9 2.5 2zM8 4h3c-.2-.6-.9-1-1.5-1S8.2 3.4 8 4zM4 7h11l-.9 10.1c0 .5-.5.9-1 .9H5.9c-.5 0-.9-.4-1-.9L4 7z"})),ke=Object(m.createElement)(ae.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(m.createElement)(ae.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"})),Pe=function(e){var t=e.sortingOrder,r=e.layout,c=e.item,a=e.importBlocks,i=e.deletable,o=Object(s.useDispatch)("tpc/block-editor"),l=o.togglePreview,u=o.setPreviewData,p=Object(m.useState)(!1),b=P()(p,2),f=b[0],O=b[1],g=Object(m.useState)(!1),j=P()(g,2),v=j[0],h=j[1],y=Object(m.useState)(c.template_name),_=P()(y,2),k=_[0],x=_[1],S=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O("importing"),e.next=3,K(c.template_id);case 3:(t=e.sent).__file&&t.content&&"wp_export"===t.__file&&a(t.content,c.meta||[]),O(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O("updating"),e.next=3,Z({template_id:c.template_id,template_name:k||c.template_name},t);case 3:return e.next=5,W(t);case 5:O(!1),h(!v);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.confirm(Object(n.__)("Are you sure you want to delete this template?"))){e.next=2;break}return e.abrupt("return",!1);case 2:return O("deleting"),e.next=5,Y(c.template_id,t);case 5:O(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),B=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l(),u({type:"library",item:c});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();if("grid"===r){var D={backgroundImage:"url(".concat(c.template_thumbnail,")")};return Object(m.createElement)("div",{key:c.template_id,className:"table-grid"},Object(m.createElement)("div",{style:D,className:d()("grid-preview",{"is-loading":v||!1!==f})},Object(m.createElement)("div",{className:"preview-actions"},Object(m.createElement)(T.Button,{isSecondary:!0,disabled:!1!==f,onClick:B},Object(n.__)("Preview")),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:"importing"===f,disabled:!1!==f,onClick:S},Object(n.__)("Import")),i&&Object(m.createElement)("div",{className:"preview-controls"},!c.link&&Object(m.createElement)(T.Button,{label:Object(n.__)("Edit"),icon:"updating"===f?oe:we,disabled:v||!1!==f,className:d()({"is-loading":"updating"===f}),onClick:function(){return h(!v)}},v&&Object(m.createElement)(T.Popover,{onFocusOutside:function(){return h(!v)},className:"controls-popover"},Object(m.createElement)("div",{className:"popover-content"},Object(m.createElement)(T.TextControl,{label:Object(n.__)("Template Name"),value:k,onChange:x}),Object(m.createElement)(T.Button,{label:Object(n.__)("Update"),icon:"updating"===f?oe:_e,disabled:!1!==f,className:d()({"is-loading":"updating"===f}),onClick:C})))),Object(m.createElement)(T.Button,{label:Object(n.__)("Delete"),icon:"deleting"===f?oe:Ee,disabled:!1!==f,className:d()({"is-loading":"deleting"===f}),onClick:N})))),Object(m.createElement)("div",{className:"card-footer"},Object(m.createElement)("p",null,c.template_name)))}var I=d()("actions",{"no-controls":!i});return Object(m.createElement)("div",{key:c.template_id,className:"table-row"},Object(m.createElement)("div",{className:"row-title"},Object(m.createElement)(T.Icon,{icon:ke}),v?Object(m.createElement)(T.TextControl,{label:Object(n.__)("Template Name"),hideLabelFromVision:!0,value:k,onChange:x}):c.template_name),i&&Object(m.createElement)("div",{className:"row-controls"},c.link?Object(m.createElement)(T.Tooltip,{text:Object(n.__)("This template is synced to a page.")},Object(m.createElement)(T.Button,{label:Object(n.__)("Edit"),icon:we,disabled:!0},Object(n.__)("Edit"))):Object(m.createElement)(T.Button,{label:v?Object(n.__)("Update"):Object(n.__)("Edit"),icon:v?"updating"===f?oe:_e:we,disabled:!1!==f,className:d()({"is-loading":"updating"===f}),onClick:v?C:function(){return h(!v)}},v?Object(n.__)("Update"):Object(n.__)("Edit")),Object(m.createElement)(T.Button,{label:Object(n.__)("Delete"),icon:"deleting"===f?oe:Ee,disabled:!1!==f,className:d()({"is-loading":"deleting"===f}),onClick:N},"deleting"===f?Object(n.__)("Deleting")+"...":Object(n.__)("Delete"))),Object(m.createElement)("div",{className:I},Object(m.createElement)(T.Button,{isSecondary:!0,disabled:!1!==f,onClick:B},Object(n.__)("Preview")),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:"importing"===f,disabled:!1!==f,onClick:S},Object(n.__)("Import"))))},xe=function(e){var t=e.total,r=e.current,n=e.onChange;if(t<2)return null;for(var c=[],a=function(e){var t=e===r;c.push(Object(m.createElement)(T.Button,{key:"page-".concat(e),isPrimary:t,disabled:t,onClick:function(){return n(e)}},e+1))},i=0;i<t;i++)a(i);return Object(m.createElement)(T.ButtonGroup,{className:"pagination"},c)};function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ce=Object(s.withSelect)((function(e,t){var r=t.isGeneral?e("tpc/block-editor").getTemplates():e("tpc/block-editor").getLibrary(),n=r.items;return{items:void 0===n?[]:n,currentPage:r.currentPage,totalPages:r.totalPages}}))((function(e){var t=e.importBlocks,r=e.isGeneral,c=void 0!==r&&r,a=e.isFetching,i=e.items,o=e.currentPage,l=e.totalPages,u=e.getOrder,p=e.setQuery,b=e.getSearchQuery,f=e.setSorting,O=Object(s.useDispatch)("tpc/block-editor").setFetching,g=Object(m.useState)("grid"),j=P()(g,2),v=j[0],h=j[1],y=Object(m.useState)({templates:!1,library:!1}),_=P()(y,2),k=_[0],x=_[1],S=function(e){return x(Te(Te({},k),{},c?{templates:e}:{library:e}))},C=function(){return c?k.templates:k.library},N=function(){var e=E()(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O(!0),t=u(),!c){e.next=7;break}return e.next=5,$(Te({search:b()},t));case 5:e.next=9;break;case 7:return e.next=9,W(Te({search:b()},t));case 9:O(!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(m.useEffect)((function(){i&&i.length>0||N()}),[c]);var B=function(){var e=E()(w.a.mark((function e(t){var r;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O(!0),r=u(),!c){e.next=7;break}return e.next=5,$(Te({search:b(),page:t},r));case 5:e.next=9;break;case 7:return e.next=9,W(Te({search:b(),page:t},r));case 9:O(!1);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),D=function(){var e=E()(w.a.mark((function e(){var t,r,n=arguments;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=n.length>0&&void 0!==n[0]?n[0]:b(),O(!0),S(!!t),r=u(),!c){e.next=9;break}return e.next=7,$(Te({search:t},r));case 7:e.next=11;break;case 9:return e.next=11,W(Te({search:t},r));case 11:O(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),I=function(){var e=E()(w.a.mark((function e(t){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(O(!0),!c){e.next=6;break}return e.next=4,$(Te(Te({},t),{},{search:b()}));case 4:e.next=8;break;case 6:return e.next=8,W(Te(Te({},t),{},{search:b()}));case 8:O(!1);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();if(a)return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(ye,{layout:v,sortingOrder:u(),setLayout:h,isSearch:C(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(m.createElement)(T.Placeholder,null,Object(m.createElement)(T.Spinner,null)));if(!Boolean(i.length))return Object(m.createElement)("div",{className:"table-content"},Object(m.createElement)(ye,{layout:v,sortingOrder:u(),setLayout:h,isSearch:C(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(n.__)("No templates available. Add a new one?"));var A=d()("table-content",{"is-grid":"grid"===v});return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(ye,{layout:v,sortingOrder:u(),setLayout:h,isSearch:C(),searchQuery:b(),onSearch:D,setSearchQuery:p,setSortingOrder:f,changeOrder:I}),Object(m.createElement)("div",{className:A},i.map((function(e){return Object(m.createElement)(Pe,{sortingOrder:u(),deletable:!c,key:e.template_id,layout:v,item:e,importBlocks:t})}))),Object(m.createElement)(xe,{onChange:B,current:o,total:l}))})),Ne=Object(s.withSelect)((function(e){var t=e("tpc/block-editor"),r=t.isPreview,n=t.isFetching,c=t.getCurrentTab;return{isPreview:r(),isFetching:n(),currentTab:c()}}))((function(e){var t=e.importBlocks,r=e.getOrder,c=e.setQuery,a=e.getSearchQuery,i=e.setSorting,o=e.isPreview,s=e.currentTab,l=e.isFetching;return o&&"library"===s?Object(m.createElement)(me,{isFetching:l,importBlocks:t}):Object(m.createElement)("div",{className:"tpc-modal-content"},Object(m.createElement)(ee,null),["templates","library"].includes(s)&&Object(m.createElement)(Ce,{isFetching:l,isGeneral:"templates"===s,importBlocks:t,getOrder:r,setQuery:c,getSearchQuery:a,setSorting:i}),"patterns"===s&&Object(n.__)("We are still working on this. Please check back later. Thank you!"))})),Be=function(e){var t=e.title,r=e.leftButtons,c=e.rightButtons,a=e.heading,i=e.previewUrl,o=Object(N.stringifyUrl)({url:i,query:{tpcpreview:"yes"}}),s=t||Object(n.__)("Preview");return Object(m.createElement)("div",{className:"ob-preview single-templates"},Object(m.createElement)("div",{className:"preview"},Object(m.createElement)("iframe",{title:s,src:o,frameBorder:"0"}),Object(m.createElement)("div",{className:"loading"},Object(m.createElement)(T.Dashicon,{icon:"update",size:50}))),Object(m.createElement)("div",{className:"bottom-bar"},r&&Object(m.createElement)("div",{className:"navigator"},r),a&&Object(m.createElement)("h2",{className:"heading"},a),c&&Object(m.createElement)("div",{className:"actions"},c)))};function De(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?De(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):De(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae=Object(ce.compose)(Object(s.withSelect)((function(e){var t=e("tpc/block-editor"),r=t.isPreview,n=t.getPreview,c=t.getCurrentTab;return{isPreview:r(),currentTab:c(),previewData:n().item}})),Object(s.withDispatch)((function(e){var t=e("core/block-editor"),r=t.removeBlock,n=t.replaceBlocks,c=e("tpc/block-editor").togglePreview;return{removeBlock:r,replaceBlocks:n,closePreview:function(){return c(!1)}}})))((function(e){var t=e.clientId,r=e.isPreview,c=e.previewData,i=e.currentTab,o=e.removeBlock,l=e.replaceBlocks,u=e.closePreview,p=Object(s.useSelect)((function(e){return{type:e("core/editor").getEditedPostAttribute("type"),postId:e("core/editor").getEditedPostAttribute("id")}})),b=p.type,f=p.postId,d=Object(s.useDispatch)("core/notices").createErrorNotice,O=Object(s.useDispatch)("tpc/block-editor"),g=O.updateLibrary,j=O.updateTemplates,v=Object(m.useState)(!1),h=P()(v,2),y=h[0],_=h[1],k=Object(m.useState)(!1),x=P()(k,2),S=x[0],C=x[1],N=Object(m.useState)({templates:"",library:""}),B=P()(N,2),D=B[0],I=B[1],A=Object(m.useState)({templates:{order:"DESC",orderby:"date"},library:{order:"DESC",orderby:"date"}}),F=P()(A,2),L=F[0],V=F[1],U="templates"===i,M=function(){return U?D.templates:D.library},R=function(){return U?L.templates:L.library},z=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(g([]),j([]),0<r.length&&["post","page"].includes(b)){var n=null;"post"===b?n=new wp.api.models.Post({id:f}):"page"===b&&(n=new wp.api.models.Page({id:f})),n.set("meta",Ie({},JSON.parse(r))),n.save()}l(t,Object(a.parse)(e))},H=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),e.next=3,K(c.template_id).then((function(e){if(e.__file&&e.content&&"wp_export"===e.__file)return u(),C(!1),z(e.content,c.meta||[]),!1;d(Object(n.__)("Something went wrong while importing. Please try again."),{type:"snackbar"}),C(!1),o(t)}));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){_(!1),C(!1),o(t)};return Object(m.useEffect)((function(){setTimeout((function(){_(!0)}),100)}),[]),y?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(T.Modal,{onRequestClose:G,shouldCloseOnEsc:!1,shouldCloseOnClickOutside:!r||"templates"!==i,isDismissible:!1,overlayClassName:"tpc-template-cloud-modal"},Object(m.createElement)(pe,{closeModal:G,getOrder:R,getSearchQuery:M}),Object(m.createElement)(Ne,{importBlocks:z,getOrder:R,setQuery:function(e){return I(Ie(Ie({},D),{},U?{templates:e}:{library:e}))},getSearchQuery:M,setSorting:function(e){return V(Ie(Ie({},L),{},U?{templates:e}:{library:e}))}}),Object(m.createElement)((function(){if(!r||"templates"!==i)return null;var e=c.link,t=c.template_name;return Object(m.createElement)(T.Modal,{isDismissible:!1,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,className:"tpc-preview-wrap-modal"},Object(m.createElement)(Be,{previewUrl:e,heading:t,leftButtons:Object(m.createElement)(m.Fragment,null,Object(m.createElement)(T.Button,{disabled:S,icon:ie,onClick:u})),rightButtons:Object(m.createElement)(T.Button,{disabled:S,isPrimary:!0,onClick:H},S?Object(n.__)("Importing")+"...":Object(n.__)("Import"))}),";")}),null))):null}));Object(a.registerBlockType)("ti-tpc/templates-cloud",{title:Object(n.__)("Templates Cloud"),description:Object(n.__)("A cloud based templates library which enables you to create ready-made website in no time."),icon:v,category:"design",keywords:["templates cloud","patterns","template library"],supports:{html:!1},edit:Ae,save:function(){return null}}),3===parseInt(tiTpc.tier)&&Object(c.registerPlugin)("ti-tpc",{render:function(){var e=Object(m.useState)(!1),t=P()(e,2),r=t[0],c=t[1],i=Object(m.useState)(!1),o=P()(i,2),l=o[0],u=o[1],p=Object(m.useState)(""),b=P()(p,2),f=b[0],O=b[1],g=window.tiTpc.canPredefine,j=Object(s.useDispatch)("core/notices"),h=j.createErrorNotice,y=j.createSuccessNotice,_=Object(s.useDispatch)("core/editor").editPost,k=Object(s.useSelect)((function(e){var t=e("core/block-editor"),r=t.getSelectedBlockCount,n=t.getSelectedBlock,c=t.getMultiSelectedBlocks,i=1===r()?n():c();return Object(a.serialize)(i)}),[]),x=Object(s.useSelect)((function(e){var t=(0,e("core/block-editor").getBlocks)();return Object(a.serialize)(t)}),[]),B=Object(s.useSelect)((function(e){return(0,e("core/editor").getEditedPostAttribute)("meta")}),[]);Object(m.useEffect)((function(){var e=window.tiTpc.metaKeys;window.tiTpc.params.meta=Object.fromEntries(Object.entries(B).filter((function(t){var r=P()(t,2),n=r[0];return r[1],e.includes(n)})))}),[B]);var D=Object(s.useSelect)((function(e){return{meta:e("core/editor").getEditedPostAttribute("meta")||{},postId:e("core/editor").getEditedPostAttribute("id"),type:e("core/editor").getEditedPostAttribute("type"),link:e("core/editor").getEditedPostAttribute("link"),postTitle:e("core/editor").getEditedPostAttribute("title")||Object(n.__)("Template")}})),I=D.meta,A=D.postTitle,F=D.postId,L=D.type,U=D.link,M=D.meta,R=M._ti_tpc_template_sync,z=M._ti_tpc_template_id,H=M._ti_tpc_screenshot_url,G=M._ti_tpc_site_slug,Q=M._ti_tpc_published,q=Object(s.useSelect)((function(e,t){var r=t.forceIsSaving,n=e("core/editor"),c=n.isSavingPost,a=n.isPublishingPost,i=n.isAutosavingPost,o=r||c(),s=i();return(a()||o)&&!s})),$=Object(m.useState)(R),W=P()($,2),Z=W[0],K=W[1],Y=Object(m.useState)(z),te=P()(Y,2),ce=te[0],ae=te[1],ie=Object(m.useState)(G),oe=P()(ie,2),se=oe[0],le=oe[1],ue=Object(m.useState)(Q),pe=P()(ue,2),be=pe[0],me=pe[1],fe=Object(m.useState)(H),de=P()(fe,2),Oe=de[0],ge=de[1];Object(m.useEffect)((function(){_({meta:re(re({},I),{},{_ti_tpc_template_sync:Z,_ti_tpc_template_id:ce,_ti_tpc_screenshot_url:Oe,_ti_tpc_site_slug:se,_ti_tpc_published:be})})}),[Z,ce,Oe,se,be]),Object(m.useEffect)((function(){q&&Z&&ve()}),[q,Z]);var je=function(){var e=E()(w.a.mark((function e(){var t,r,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(!0),t={__file:"wp_export",version:2,content:k},r=Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:re(re({},ne(tiTpc.params,"meta")),{},{template_name:f,template_type:"gutenberg"})}),e.prev=3,e.next=6,S()({url:r,method:"POST",data:t,parse:!1});case 6:if(!(a=e.sent).ok){e.next=12;break}return e.next=10,a.json();case 10:(i=e.sent).message?h(i.message,{type:"snackbar"}):(window.localStorage.setItem("tpcCacheBuster",V()),y(Object(n.__)("Template saved."),{type:"snackbar"}));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(3),e.t0.message&&h(e.t0.message,{type:"snackbar"});case 17:u(!1),c(!1),O("");case 20:case"end":return e.stop()}}),e,null,[[3,14]])})));return function(){return e.apply(this,arguments)}}(),ve=function(){var e=E()(w.a.mark((function e(){var t,r,c,a,i;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u(!0),t={__file:"wp_export",version:2,content:x},c=!1,!ce){e.next=7;break}return e.next=6,J(ce);case 6:c=e.sent;case 7:return r=c?Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates/"+ce,query:re(re({},ne(tiTpc.params,"meta")),{},{meta:be?JSON.stringify(tiTpc.params.meta):"",template_name:A,link:U})}):Object(N.stringifyUrl)({url:window.tiTpc.endpoint+"templates",query:re(re({},ne(tiTpc.params,"meta")),{},{template_name:A,template_type:"gutenberg",template_site_slug:G||"",template_thumbnail:H||"",link:U})}),e.prev=8,e.next=11,S()({url:r,method:"POST",data:t,parse:!1});case 11:if(!(a=e.sent).ok){e.next=17;break}return e.next=15,a.json();case 15:(i=e.sent).message?h(i.message,{type:"snackbar"}):(window.localStorage.setItem("tpcCacheBuster",V()),y(Object(n.__)("Template saved."),{type:"snackbar"}),i.template_id?(ae(i.template_id),he(i.template_id)):he());case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(8),e.t0.message&&h(e.t0.message,{type:"snackbar"});case 22:u(!1);case 23:case"end":return e.stop()}}),e,null,[[8,19]])})));return function(){return e.apply(this,arguments)}}(),he=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce,t=null;return"post"===L?t=new wp.api.models.Post({id:F}):"page"===L&&(t=new wp.api.models.Page({id:F})),t.set("meta",{_ti_tpc_template_id:e,_ti_tpc_template_sync:Z,_ti_tpc_screenshot_url:Oe,_ti_tpc_site_slug:se,_ti_tpc_published:!be}),t.save()};return["post","page"].includes(L)?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(C.PluginBlockSettingsMenuItem,{label:Object(n.__)("Save to Neve Cloud"),icon:"none",onClick:function(){return c(!0)}}),Object(m.createElement)(C.PluginSidebarMoreMenuItem,{icon:Object(m.createElement)(T.Icon,{icon:v}),target:"ti-tpc"},Object(n.__)("Templates Cloud")),Object(m.createElement)(C.PluginSidebar,{name:"ti-tpc",title:Object(n.__)("Templates Cloud"),className:"ti-tpc-components-panel"},Object(m.createElement)(T.PanelBody,null,Object(n.__)("Save this page as a template in your Templates Cloud library."),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:l,disabled:l,onClick:ve},Object(n.__)("Save Page to Neve Cloud")),Object(m.createElement)(T.ToggleControl,{label:Object(n.__)("Automatically sync to the cloud"),checked:Z,onChange:function(){return K(!Z)}})),g&&Object(m.createElement)(T.PanelBody,null,Object(m.createElement)("h4",null,Object(n.__)("Publish Settings")),Object(m.createElement)(T.TextControl,{label:Object(n.__)("Screenshot URL"),value:Oe,type:"url",onChange:ge}),Object(m.createElement)(T.TextControl,{label:Object(n.__)("Site Slug"),value:se,help:Object(n.__)("Use `general` to publish this as a global template. Otherwise use the starter site slug to make it available as a single page for the starter site."),type:"url",onChange:le}),Object(m.createElement)((function(){if(!g)return null;var e=function(){var e=E()(w.a.mark((function e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u("publishing"),e.next=3,X(z,G,H,!Q,U).then((function(e){e.success&&(me(!be),he(),y(be?Object(n.__)("Template Unpublished."):Object(n.__)("Template Published."),{type:"snackbar"}))}));case 3:u(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(m.createElement)(T.Button,{isSecondary:!0,onClick:e,disabled:!1!==l,className:d()({"is-loading":"publishing"===l})},be&&("publishing"===l?Object(n.__)("Unpublishing"):Object(n.__)("Unpublish")),!be&&("publishing"===l?Object(n.__)("Publishing"):Object(n.__)("Publish")))}),null),Object(m.createElement)(ee,null))),r&&Object(m.createElement)(T.Modal,{title:Object(n.__)("Save Template"),onRequestClose:function(){return c(!1)}},Object(m.createElement)(T.TextControl,{label:Object(n.__)("Template Name"),value:f,onChange:O}),Object(m.createElement)(T.Button,{isPrimary:!0,isBusy:l,disabled:l,onClick:je},Object(n.__)("Save")))):null},icon:v})}]);
|
editor/src/extension.js
CHANGED
@@ -61,6 +61,16 @@ const Exporter = () => {
|
|
61 |
return serialize( blocks );
|
62 |
}, [] );
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
const {
|
65 |
meta,
|
66 |
postTitle,
|
61 |
return serialize( blocks );
|
62 |
}, [] );
|
63 |
|
64 |
+
const getMetaFields = useSelect( ( select ) => {
|
65 |
+
const { getEditedPostAttribute } = select( 'core/editor' );
|
66 |
+
return getEditedPostAttribute( 'meta' );
|
67 |
+
}, [] );
|
68 |
+
|
69 |
+
useEffect( () => {
|
70 |
+
const metaKeys = window.tiTpc.metaKeys;
|
71 |
+
window.tiTpc.params.meta = Object.fromEntries( Object.entries( getMetaFields ).filter(( [key, value] ) => metaKeys.includes( key )) );
|
72 |
+
}, [ getMetaFields ] );
|
73 |
+
|
74 |
const {
|
75 |
meta,
|
76 |
postTitle,
|
elementor/build/index-rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.elementor-add-new-section .elementor-templates-cloud-button{background-color:#0366d6;margin-right:5px}.elementor-add-new-section .elementor-templates-cloud-button .tpc-template-cloud-icon{width:12px;height:12px}.ti-tpc-templates-modal .dialog-widget-content{max-width:990px;width:100%;background:#f1f3f5}.ti-tpc-templates-modal .dialog-widget-content .dialog-header{padding:0;background:#fff;box-shadow:0 0 8px rgba(0,0,0,.1);position:relative}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark{background-color:#26292c}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back{border-left:1px solid rgba(255,255,255,.25)}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back:hover{color:#fff}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-templates-modal__header__close{border-right:1px solid rgba(255,255,255,.25)}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-templates-modal__header__close:hover{color:#fff}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item{color:#e0e1e3}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item.is-active{background:linear-gradient(-180deg, #26292c, #34383c);border-bottom:3px solid #71d7f7}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header{display:flex;align-items:center;justify-content:space-between;height:50px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area{width:175px;height:100%;text-align:right;padding-right:15px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-templates-modal__header__logo{height:100%;display:flex;align-items:center;line-height:1}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-templates-modal__header__logo svg{width:30px;height:30px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back{height:100%;color:#a4afb7;font-size:14px;padding:16.5px 0 15px 16.5px;border-left:1px solid #e6e9ec;cursor:pointer;transition:color .5s}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back:hover{color:#495157}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back i{padding-left:10px;font-size:18px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back i::before{content:""}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area{text-align:center;color:#6d7882;font-size:13px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item{display:inline-block;padding:17px 0;width:150px;height:auto}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item.is-active{border-bottom:3px solid #0073aa}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area{width:175px;display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools{display:flex}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-actions{display:flex}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-actions .ti-tpc-templates-modal__header__item{padding-left:16px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-preview-insert-wrapper{cursor:default;padding:0 10px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-preview-insert-wrapper .ti-tpc-template-library-template-insert{height:auto;color:#fff;background-color:#39b54a;padding:8px 14px;font-size:11px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:content-box;padding:0}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item.ti-tpc-templates-modal__header__close{width:47px;border-right:1px solid #e6e9ec}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item i:not(.eicon-file-download){color:#a4afb7;font-size:18px;cursor:pointer}.ti-tpc-templates-modal .dialog-message{height:750px;max-height:85vh;overflow:auto;padding-top:25px}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button:hover{color:#fff}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item{background-color:#4c4f56}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:hover{background-color:#64666a}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button:hover{color:#a4afb7}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover:not(.is-without-arrow)::before,.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover:not(.is-without-arrow)::after{border-top-color:#4c4f56;border-bottom-color:#4c4f56}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover .components-popover__content{background:#4c4f56;box-shadow:-1px 3px 11px rgba(0,0,0,.3);border-color:transparent}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template{background-color:#404349}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-name{color:#e0e1e3}.ti-tpc-templates-modal .dialog-message .dialog-content{display:block;height:100%}.ti-tpc-templates-modal .dialog-message .dialog-content.is-loading{display:flex;justify-content:center;align-items:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates{padding:0 15px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header{display:flex;align-items:center;justify-content:space-between}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters{font-size:11px;display:flex}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-label{flex-grow:1;text-align:right;padding-left:20px;border-left:1px solid #d5dadf;text-transform:uppercase}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter{display:flex}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button{padding:0 20px 0 0;height:auto;color:inherit;font-size:inherit;text-transform:uppercase}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button.is-selected:after{font-family:eicons;content:"";margin-right:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button.is-selected.is-asc:after{content:""}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search{width:200px;position:relative}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search input{border:none;border-bottom:1px solid #d5dadf;border-radius:0;font-size:11px;padding:8px 0 8px 15px;transition:border .5s}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search i,.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search .components-button{position:absolute;top:50%;left:0;transform:translateY(-50%);color:#a4afb7}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container{margin:10px -15px 0;display:flex;flex-wrap:wrap;align-items:flex-start}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container.is-table{flex-direction:column;align-items:normal}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header{display:flex;align-items:center;padding:0 25px;margin-top:30px;text-align:right}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column{width:calc( 65% / 3 )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column:first-child{width:35%}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column:last-child{display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button{color:#a4afb7;line-height:1;font-size:10px;font-weight:500;text-transform:uppercase;padding:0;cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button.is-selected:after{font-family:eicons;content:"";margin-right:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button.is-selected.is-asc:after{content:""}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button:hover{color:#1e1e1e}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item{display:flex;height:50px;align-items:center;padding:0 25px;margin-top:1px;text-align:right;background-color:#fafbfb}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:first-child{border-radius:3px 3px 0 0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:last-child{border-radius:0 0 3px 3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column{width:calc( 65% / 3 )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child{font-weight:600;width:35%}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child input[type=text]{width:50%;margin-left:10px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child .components-button{padding-right:10px;padding-left:10px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child .components-button i{margin:0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:last-child{display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button{text-transform:none;font-size:12px;padding:8px 18px;height:30px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button:not(:hover){background:none;color:#a4afb7}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover .components-popover__content .components-button>svg{width:20px;height:20px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container>p{font-size:14px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template{margin:15px;padding:8px;background:#fff;box-shadow:0 1px 20px 0 rgba(0,0,0,.07);border-radius:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template:not(:hover) .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action{display:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template:hover .ti-tpc-template-library-template-name{display:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body{height:200px;position:relative}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-screenshot{height:100%;background-size:cover;background-position-x:50%;box-shadow:inset 0 -2px 15px -6px rgba(0,0,0,.07)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview{opacity:0;position:absolute;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);transition:opacity .5s;cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview:hover{opacity:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview i{font-size:20px;color:#d5dadf;position:absolute;top:50%;right:50%;transform:translate(50%, -50%)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer{display:flex;justify-content:space-between;margin-top:10px;font-size:11px;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action{color:#39b54a;height:auto;padding:0;font-size:11px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action span{line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-name{text-align:right;color:#6d7882;flex-grow:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-left:5px;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .components-placeholder{background:transparent;border:none;box-shadow:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .components-placeholder .components-placeholder__fieldset{justify-content:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export{padding:50px 0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-icon{font-size:65px;color:#c2cbd2;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-title{font-size:30px;margin-top:40px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field{margin-top:40px;display:flex;align-items:center;justify-content:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field>*{height:55px;font-size:16px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .ti-tpc-template-library-blank-field-input{width:500px;background-color:#fff;font-weight:300;color:#a4afb7;padding-right:25px;border-radius:0 3px 3px 0;border:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .elementor-button{display:block;width:150px;border-radius:3px 0 0 3px;background-color:#39b54a}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .ti-tpc-template-library-blank-field-input-label{width:150px;display:flex;justify-content:center;align-items:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .components-form-toggle input.components-form-toggle__input[type=checkbox]{cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview{height:100%;overflow:hidden}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview iframe{height:150%;position:relative;z-index:99;transform:scale(0.666) translateX(25%) translateY(-25%)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview .is-loading{position:absolute;top:50%;left:calc( 50% - 12px )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview .is-loading svg{-webkit-animation:icon-spin 2s linear infinite;animation:icon-spin 2s linear infinite}.components-modal__screen-overlay.is-dark .components-modal__frame{border:1px solid #26292c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content{background:#34383c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header{background:#26292c;border-bottom:1px solid #26292c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header .components-button{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header .components-button:hover{color:#e0e1e3}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input{background-color:#26292c;color:#a4afb7;border:none}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input:focus{box-shadow:none}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input::-moz-placeholder{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input:-ms-input-placeholder{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input::placeholder{color:#a4afb7}@-webkit-keyframes icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}@keyframes icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}@media(max-width: 1439px){.ti-tpc-templates-modal .dialog-widget-content{max-width:990px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-preview iframe{width:1440px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-template{width:calc(25% - 30px)}}@media(min-width: 1440px){.ti-tpc-templates-modal .dialog-widget-content{max-width:1200px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-preview iframe{width:1710px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-template{width:calc(20% - 30px)}}
|
1 |
+
.elementor-add-new-section .elementor-templates-cloud-button{background-color:#0366d6;margin-right:5px}.elementor-add-new-section .elementor-templates-cloud-button .tpc-template-cloud-icon{width:12px;height:12px}.ti-tpc-templates-modal .dialog-widget-content{max-width:990px;width:100%;background:#f1f3f5}.ti-tpc-templates-modal .dialog-widget-content .dialog-header{padding:0;background:#fff;box-shadow:0 0 8px rgba(0,0,0,.1);position:relative}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark{background-color:#26292c}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back{border-left:1px solid rgba(255,255,255,.25)}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back:hover{color:#fff}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-templates-modal__header__close{border-right:1px solid rgba(255,255,255,.25)}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-templates-modal__header__close:hover{color:#fff}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item{color:#e0e1e3}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item.is-active{background:linear-gradient(-180deg, #26292c, #34383c);border-bottom:3px solid #71d7f7}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header{display:flex;align-items:center;justify-content:space-between;height:50px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area{width:175px;height:100%;text-align:right;padding-right:15px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-templates-modal__header__logo{height:100%;display:flex;align-items:center;line-height:1}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-templates-modal__header__logo svg{width:30px;height:30px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back{height:100%;color:#a4afb7;font-size:14px;padding:16.5px 0 15px 16.5px;border-left:1px solid #e6e9ec;cursor:pointer;transition:color .5s}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back:hover{color:#495157}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back i{padding-left:10px;font-size:18px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back i::before{content:""}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area{text-align:center;color:#6d7882;font-size:13px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item{display:inline-block;padding:17px 0;width:150px;height:auto}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item.is-active{border-bottom:3px solid #0073aa}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area{width:175px;display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools{display:flex}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-actions{display:flex}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-actions .ti-tpc-templates-modal__header__item{padding-left:16px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-preview-insert-wrapper{cursor:default;padding:0 10px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-preview-insert-wrapper .ti-tpc-template-library-template-insert{height:auto;color:#fff;background-color:#39b54a;padding:8px 14px;font-size:11px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:content-box;padding:0}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item.ti-tpc-templates-modal__header__close{width:47px;border-right:1px solid #e6e9ec}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item i:not(.eicon-file-download){color:#a4afb7;font-size:18px;cursor:pointer}.ti-tpc-templates-modal .dialog-message{height:750px;max-height:85vh;overflow:auto;padding-top:25px}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button:hover{color:#fff}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item{background-color:#4c4f56}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:hover{background-color:#64666a}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button:hover{color:#a4afb7}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover:not(.is-without-arrow)::before,.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover:not(.is-without-arrow)::after{border-top-color:#4c4f56;border-bottom-color:#4c4f56}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover .components-popover__content{background:#4c4f56;box-shadow:-1px 3px 11px rgba(0,0,0,.3);border-color:transparent}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template{background-color:#404349}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-name{color:#e0e1e3}.ti-tpc-templates-modal .dialog-message .dialog-content{display:block;height:100%}.ti-tpc-templates-modal .dialog-message .dialog-content.is-loading{display:flex;justify-content:center;align-items:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates{padding:0 15px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header{display:flex;align-items:center;justify-content:space-between}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters{font-size:11px;display:flex}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-label{flex-grow:1;text-align:right;padding-left:20px;border-left:1px solid #d5dadf;text-transform:uppercase}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter{display:flex}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button{padding:0 20px 0 0;height:auto;color:inherit;font-size:inherit;text-transform:uppercase}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button.is-selected:after{font-family:eicons;content:"";margin-right:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button.is-selected.is-asc:after{content:""}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search{width:200px;position:relative}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search input{border:none;border-bottom:1px solid #d5dadf;border-radius:0;font-size:11px;padding:8px 0 8px 15px;transition:border .5s}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search i,.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search .components-button{position:absolute;top:50%;left:0;transform:translateY(-50%);color:#a4afb7}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container{margin:10px -15px 0;display:flex;flex-wrap:wrap;align-items:flex-start}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container.is-table{flex-direction:column;align-items:normal}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header{display:flex;align-items:center;padding:0 25px;margin-top:30px;text-align:right}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column{width:calc( 65% / 3 )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column:first-child{width:35%}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column:last-child{display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button{color:#a4afb7;line-height:1;font-size:10px;font-weight:500;text-transform:uppercase;padding:0;cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button.is-selected:after{font-family:eicons;content:"";margin-right:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button.is-selected.is-asc:after{content:""}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button:hover{color:#1e1e1e}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item{display:flex;height:50px;align-items:center;padding:0 25px;margin-top:1px;text-align:right;background-color:#fafbfb}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:first-child{border-radius:3px 3px 0 0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:last-child{border-radius:0 0 3px 3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column{width:calc( 65% / 3 )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child{font-weight:600;width:35%}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child input[type=text]{width:50%;margin-left:10px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child .components-button{padding-right:10px;padding-left:10px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child .components-button i{margin:0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:last-child{display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button{text-transform:none;font-size:12px;padding:8px 18px;height:30px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button:not(:hover){background:none;color:#a4afb7}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover .components-popover__content .components-button>svg{width:20px;height:20px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container>p{font-size:14px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template{margin:15px;padding:8px;background:#fff;box-shadow:0 1px 20px 0 rgba(0,0,0,.07);border-radius:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template:not(:hover) .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action{display:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template:hover .ti-tpc-template-library-template-name{display:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body{height:200px;position:relative}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-screenshot{height:100%;background-size:cover;background-position-x:50%;box-shadow:inset 0 -2px 15px -6px rgba(0,0,0,.07)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview{opacity:0;position:absolute;top:0;right:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);transition:opacity .5s;cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview:hover{opacity:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview i{font-size:20px;color:#d5dadf;position:absolute;top:50%;right:50%;transform:translate(50%, -50%)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer{display:flex;justify-content:space-between;margin-top:10px;font-size:11px;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action{color:#39b54a;height:auto;padding:0;font-size:11px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action span{line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-name{text-align:right;color:#6d7882;flex-grow:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-left:5px;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .components-placeholder{background:transparent;border:none;box-shadow:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .components-placeholder .components-placeholder__fieldset{justify-content:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export{padding:50px 0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-icon{font-size:65px;color:#c2cbd2;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-title{font-size:30px;margin-top:40px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field{margin-top:40px;display:flex;align-items:center;justify-content:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field>*{height:55px;font-size:16px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .ti-tpc-template-library-blank-field-input{width:500px;background-color:#fff;font-weight:300;color:#a4afb7;padding-right:25px;border-radius:0 3px 3px 0;border:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .elementor-button{display:block;width:150px;border-radius:3px 0 0 3px;background-color:#39b54a}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .ti-tpc-template-library-blank-field-input-label{width:150px;display:flex;justify-content:center;align-items:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .components-form-toggle input.components-form-toggle__input[type=checkbox]{cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview{height:100%;overflow:hidden}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview iframe{height:150%;position:relative;z-index:99;transform:scale(0.666) translateX(25%) translateY(-25%)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview .is-loading{position:absolute;top:50%;left:calc( 50% - 12px )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview .is-loading svg{-webkit-animation:icon-spin 2s linear infinite;animation:icon-spin 2s linear infinite}.ti-tpc-templates-modal .components-button:focus:not(:disabled){box-shadow:none}.components-modal__screen-overlay.is-dark .components-modal__frame{border:1px solid #26292c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content{background:#34383c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header{background:#26292c;border-bottom:1px solid #26292c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header .components-button{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header .components-button:hover{color:#e0e1e3}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input{background-color:#26292c;color:#a4afb7;border:none}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input:focus{box-shadow:none}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input::-moz-placeholder{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input:-ms-input-placeholder{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input::placeholder{color:#a4afb7}@-webkit-keyframes icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}@keyframes icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}@media(max-width: 1439px){.ti-tpc-templates-modal .dialog-widget-content{max-width:990px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-preview iframe{width:1440px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-template{width:calc(25% - 30px)}}@media(min-width: 1440px){.ti-tpc-templates-modal .dialog-widget-content{max-width:1200px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-preview iframe{width:1710px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-template{width:calc(20% - 30px)}}
|
elementor/build/index.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill', 'wp-primitives'), 'version' => '0a30716be4aa1ba01d1e4ddcffe81269');
|
elementor/build/index.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.elementor-add-new-section .elementor-templates-cloud-button{background-color:#0366d6;margin-left:5px}.elementor-add-new-section .elementor-templates-cloud-button .tpc-template-cloud-icon{width:12px;height:12px}.ti-tpc-templates-modal .dialog-widget-content{max-width:990px;width:100%;background:#f1f3f5}.ti-tpc-templates-modal .dialog-widget-content .dialog-header{padding:0;background:#fff;box-shadow:0 0 8px rgba(0,0,0,.1);position:relative}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark{background-color:#26292c}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back{border-right:1px solid rgba(255,255,255,.25)}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back:hover{color:#fff}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-templates-modal__header__close{border-left:1px solid rgba(255,255,255,.25)}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-templates-modal__header__close:hover{color:#fff}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item{color:#e0e1e3}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item.is-active{background:linear-gradient(180deg, #26292c, #34383c);border-bottom:3px solid #71d7f7}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header{display:flex;align-items:center;justify-content:space-between;height:50px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area{width:175px;height:100%;text-align:left;padding-left:15px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-templates-modal__header__logo{height:100%;display:flex;align-items:center;line-height:1}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-templates-modal__header__logo svg{width:30px;height:30px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back{height:100%;color:#a4afb7;font-size:14px;padding:16.5px 16.5px 15px 0;border-right:1px solid #e6e9ec;cursor:pointer;transition:color .5s}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back:hover{color:#495157}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back i{padding-right:10px;font-size:18px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back i::before{content:""}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area{text-align:center;color:#6d7882;font-size:13px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item{display:inline-block;padding:17px 0;width:150px;height:auto}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item.is-active{border-bottom:3px solid #0073aa}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area{width:175px;display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools{display:flex}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-actions{display:flex}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-actions .ti-tpc-templates-modal__header__item{padding-right:16px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-preview-insert-wrapper{cursor:default;padding:0 10px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-preview-insert-wrapper .ti-tpc-template-library-template-insert{height:auto;color:#fff;background-color:#39b54a;padding:8px 14px;font-size:11px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:content-box;padding:0}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item.ti-tpc-templates-modal__header__close{width:47px;border-left:1px solid #e6e9ec}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item i:not(.eicon-file-download){color:#a4afb7;font-size:18px;cursor:pointer}.ti-tpc-templates-modal .dialog-message{height:750px;max-height:85vh;overflow:auto;padding-top:25px}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button:hover{color:#fff}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item{background-color:#4c4f56}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:hover{background-color:#64666a}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button:hover{color:#a4afb7}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover:not(.is-without-arrow)::before,.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover:not(.is-without-arrow)::after{border-top-color:#4c4f56;border-bottom-color:#4c4f56}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover .components-popover__content{background:#4c4f56;box-shadow:1px 3px 11px rgba(0,0,0,.3);border-color:transparent}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template{background-color:#404349}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-name{color:#e0e1e3}.ti-tpc-templates-modal .dialog-message .dialog-content{display:block;height:100%}.ti-tpc-templates-modal .dialog-message .dialog-content.is-loading{display:flex;justify-content:center;align-items:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates{padding:0 15px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header{display:flex;align-items:center;justify-content:space-between}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters{font-size:11px;display:flex}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-label{flex-grow:1;text-align:left;padding-right:20px;border-right:1px solid #d5dadf;text-transform:uppercase}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter{display:flex}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button{padding:0 0 0 20px;height:auto;color:inherit;font-size:inherit;text-transform:uppercase}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button.is-selected:after{font-family:eicons;content:"";margin-left:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button.is-selected.is-asc:after{content:""}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search{width:200px;position:relative}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search input{border:none;border-bottom:1px solid #d5dadf;border-radius:0;font-size:11px;padding:8px 15px 8px 0;transition:border .5s}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search i,.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search .components-button{position:absolute;top:50%;right:0;transform:translateY(-50%);color:#a4afb7}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container{margin:10px -15px 0;display:flex;flex-wrap:wrap;align-items:flex-start}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container.is-table{flex-direction:column;align-items:normal}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header{display:flex;align-items:center;padding:0 25px;margin-top:30px;text-align:left}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column{width:calc( 65% / 3 )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column:first-child{width:35%}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column:last-child{display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button{color:#a4afb7;line-height:1;font-size:10px;font-weight:500;text-transform:uppercase;padding:0;cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button.is-selected:after{font-family:eicons;content:"";margin-left:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button.is-selected.is-asc:after{content:""}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button:hover{color:#1e1e1e}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item{display:flex;height:50px;align-items:center;padding:0 25px;margin-top:1px;text-align:left;background-color:#fafbfb}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:first-child{border-radius:3px 3px 0 0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:last-child{border-radius:0 0 3px 3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column{width:calc( 65% / 3 )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child{font-weight:600;width:35%}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child input[type=text]{width:50%;margin-right:10px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child .components-button{padding-left:10px;padding-right:10px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child .components-button i{margin:0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:last-child{display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button{text-transform:none;font-size:12px;padding:8px 18px;height:30px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button:not(:hover){background:none;color:#a4afb7}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover .components-popover__content .components-button>svg{width:20px;height:20px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container>p{font-size:14px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template{margin:15px;padding:8px;background:#fff;box-shadow:0 1px 20px 0 rgba(0,0,0,.07);border-radius:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template:not(:hover) .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action{display:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template:hover .ti-tpc-template-library-template-name{display:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body{height:200px;position:relative}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-screenshot{height:100%;background-size:cover;background-position-x:50%;box-shadow:inset 0 -2px 15px -6px rgba(0,0,0,.07)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview{opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);transition:opacity .5s;cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview:hover{opacity:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview i{font-size:20px;color:#d5dadf;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer{display:flex;justify-content:space-between;margin-top:10px;font-size:11px;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action{color:#39b54a;height:auto;padding:0;font-size:11px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action span{line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-name{text-align:left;color:#6d7882;flex-grow:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-right:5px;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .components-placeholder{background:transparent;border:none;box-shadow:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .components-placeholder .components-placeholder__fieldset{justify-content:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export{padding:50px 0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-icon{font-size:65px;color:#c2cbd2;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-title{font-size:30px;margin-top:40px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field{margin-top:40px;display:flex;align-items:center;justify-content:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field>*{height:55px;font-size:16px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .ti-tpc-template-library-blank-field-input{width:500px;background-color:#fff;font-weight:300;color:#a4afb7;padding-left:25px;border-radius:3px 0 0 3px;border:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .elementor-button{display:block;width:150px;border-radius:0 3px 3px 0;background-color:#39b54a}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .ti-tpc-template-library-blank-field-input-label{width:150px;display:flex;justify-content:center;align-items:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .components-form-toggle input.components-form-toggle__input[type=checkbox]{cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview{height:100%;overflow:hidden}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview iframe{height:150%;position:relative;z-index:99;transform:scale(0.666) translateX(-25%) translateY(-25%)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview .is-loading{position:absolute;top:50%;right:calc( 50% - 12px )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview .is-loading svg{-webkit-animation:icon-spin 2s linear infinite;animation:icon-spin 2s linear infinite}.components-modal__screen-overlay.is-dark .components-modal__frame{border:1px solid #26292c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content{background:#34383c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header{background:#26292c;border-bottom:1px solid #26292c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header .components-button{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header .components-button:hover{color:#e0e1e3}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input{background-color:#26292c;color:#a4afb7;border:none}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input:focus{box-shadow:none}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input::-moz-placeholder{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input:-ms-input-placeholder{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input::placeholder{color:#a4afb7}@-webkit-keyframes icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media(max-width: 1439px){.ti-tpc-templates-modal .dialog-widget-content{max-width:990px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-preview iframe{width:1440px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-template{width:calc(25% - 30px)}}@media(min-width: 1440px){.ti-tpc-templates-modal .dialog-widget-content{max-width:1200px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-preview iframe{width:1710px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-template{width:calc(20% - 30px)}}
|
1 |
+
.elementor-add-new-section .elementor-templates-cloud-button{background-color:#0366d6;margin-left:5px}.elementor-add-new-section .elementor-templates-cloud-button .tpc-template-cloud-icon{width:12px;height:12px}.ti-tpc-templates-modal .dialog-widget-content{max-width:990px;width:100%;background:#f1f3f5}.ti-tpc-templates-modal .dialog-widget-content .dialog-header{padding:0;background:#fff;box-shadow:0 0 8px rgba(0,0,0,.1);position:relative}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark{background-color:#26292c}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back{border-right:1px solid rgba(255,255,255,.25)}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back:hover{color:#fff}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-templates-modal__header__close{border-left:1px solid rgba(255,255,255,.25)}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-templates-modal__header__close:hover{color:#fff}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item{color:#e0e1e3}.ti-tpc-templates-modal .dialog-widget-content .dialog-header.is-dark .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item.is-active{background:linear-gradient(180deg, #26292c, #34383c);border-bottom:3px solid #71d7f7}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header{display:flex;align-items:center;justify-content:space-between;height:50px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area{width:175px;height:100%;text-align:left;padding-left:15px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-templates-modal__header__logo{height:100%;display:flex;align-items:center;line-height:1}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-templates-modal__header__logo svg{width:30px;height:30px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back{height:100%;color:#a4afb7;font-size:14px;padding:16.5px 16.5px 15px 0;border-right:1px solid #e6e9ec;cursor:pointer;transition:color .5s}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back:hover{color:#495157}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back i{padding-right:10px;font-size:18px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__logo-area .ti-tpc-template-library-header-preview-back i::before{content:""}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area{text-align:center;color:#6d7882;font-size:13px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item{display:inline-block;padding:17px 0;width:150px;height:auto}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__menu-area .ti-tpc-template-library-menu-item.is-active{border-bottom:3px solid #0073aa}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area{width:175px;display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools{display:flex}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-actions{display:flex}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-actions .ti-tpc-templates-modal__header__item{padding-right:16px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-preview-insert-wrapper{cursor:default;padding:0 10px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header .ti-tpc-templates-modal__header__items-area .ti-tpc-template-library-header-tools .ti-tpc-template-library-header-preview-insert-wrapper .ti-tpc-template-library-template-insert{height:auto;color:#fff;background-color:#39b54a;padding:8px 14px;font-size:11px}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:content-box;padding:0}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item.ti-tpc-templates-modal__header__close{width:47px;border-left:1px solid #e6e9ec}.ti-tpc-templates-modal .dialog-widget-content .dialog-header .ti-tpc-templates-modal__header__item i:not(.eicon-file-download){color:#a4afb7;font-size:18px;cursor:pointer}.ti-tpc-templates-modal .dialog-message{height:750px;max-height:85vh;overflow:auto;padding-top:25px}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button:hover{color:#fff}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item{background-color:#4c4f56}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:hover{background-color:#64666a}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button:hover{color:#a4afb7}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover:not(.is-without-arrow)::before,.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover:not(.is-without-arrow)::after{border-top-color:#4c4f56;border-bottom-color:#4c4f56}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover .components-popover__content{background:#4c4f56;box-shadow:1px 3px 11px rgba(0,0,0,.3);border-color:transparent}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template{background-color:#404349}.ti-tpc-templates-modal .dialog-message.is-dark .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-name{color:#e0e1e3}.ti-tpc-templates-modal .dialog-message .dialog-content{display:block;height:100%}.ti-tpc-templates-modal .dialog-message .dialog-content.is-loading{display:flex;justify-content:center;align-items:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates{padding:0 15px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header{display:flex;align-items:center;justify-content:space-between}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters{font-size:11px;display:flex}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-label{flex-grow:1;text-align:left;padding-right:20px;border-right:1px solid #d5dadf;text-transform:uppercase}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter{display:flex}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button{padding:0 0 0 20px;height:auto;color:inherit;font-size:inherit;text-transform:uppercase}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button.is-selected:after{font-family:eicons;content:"";margin-left:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-filters .ti-tpc-template-library-templates-header-filters-filter .components-button.is-selected.is-asc:after{content:""}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search{width:200px;position:relative}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search input{border:none;border-bottom:1px solid #d5dadf;border-radius:0;font-size:11px;padding:8px 15px 8px 0;transition:border .5s}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search i,.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-header .ti-tpc-template-library-templates-header-search .components-button{position:absolute;top:50%;right:0;transform:translateY(-50%);color:#a4afb7}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container{margin:10px -15px 0;display:flex;flex-wrap:wrap;align-items:flex-start}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container.is-table{flex-direction:column;align-items:normal}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header{display:flex;align-items:center;padding:0 25px;margin-top:30px;text-align:left}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column{width:calc( 65% / 3 )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column:first-child{width:35%}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column:last-child{display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button{color:#a4afb7;line-height:1;font-size:10px;font-weight:500;text-transform:uppercase;padding:0;cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button.is-selected:after{font-family:eicons;content:"";margin-left:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button.is-selected.is-asc:after{content:""}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-header .ti-tpc-template-library-templates-table-column .components-button:hover{color:#1e1e1e}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item{display:flex;height:50px;align-items:center;padding:0 25px;margin-top:1px;text-align:left;background-color:#fafbfb}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:first-child{border-radius:3px 3px 0 0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item:last-child{border-radius:0 0 3px 3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column{width:calc( 65% / 3 )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child{font-weight:600;width:35%}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child input[type=text]{width:50%;margin-right:10px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child .components-button{padding-left:10px;padding-right:10px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:first-child .components-button i{margin:0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column:last-child{display:flex;justify-content:flex-end}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button{text-transform:none;font-size:12px;padding:8px 18px;height:30px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-button:not(:hover){background:none;color:#a4afb7}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-templates-table-item .ti-tpc-template-library-templates-table-column .components-dropdown .components-popover .components-popover__content .components-button>svg{width:20px;height:20px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container>p{font-size:14px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template{margin:15px;padding:8px;background:#fff;box-shadow:0 1px 20px 0 rgba(0,0,0,.07);border-radius:3px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template:not(:hover) .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action{display:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template:hover .ti-tpc-template-library-template-name{display:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body{height:200px;position:relative}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-screenshot{height:100%;background-size:cover;background-position-x:50%;box-shadow:inset 0 -2px 15px -6px rgba(0,0,0,.07)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview{opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);transition:opacity .5s;cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview:hover{opacity:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-body .ti-tpc-template-library-template-preview i{font-size:20px;color:#d5dadf;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer{display:flex;justify-content:space-between;margin-top:10px;font-size:11px;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action{color:#39b54a;height:auto;padding:0;font-size:11px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-action span{line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .ti-tpc-template-library-template .ti-tpc-template-library-template-footer .ti-tpc-template-library-template-name{text-align:left;color:#6d7882;flex-grow:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;padding-right:5px;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .components-placeholder{background:transparent;border:none;box-shadow:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-templates .ti-tpc-template-library-templates-container .components-placeholder .components-placeholder__fieldset{justify-content:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export{padding:50px 0}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-icon{font-size:65px;color:#c2cbd2;line-height:1}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-title{font-size:30px;margin-top:40px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field{margin-top:40px;display:flex;align-items:center;justify-content:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field>*{height:55px;font-size:16px}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .ti-tpc-template-library-blank-field-input{width:500px;background-color:#fff;font-weight:300;color:#a4afb7;padding-left:25px;border-radius:3px 0 0 3px;border:none}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .elementor-button{display:block;width:150px;border-radius:0 3px 3px 0;background-color:#39b54a}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .ti-tpc-template-library-blank-field-input-label{width:150px;display:flex;justify-content:center;align-items:center}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-export .ti-tpc-template-library-blank-field .components-form-toggle input.components-form-toggle__input[type=checkbox]{cursor:pointer}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview{height:100%;overflow:hidden}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview iframe{height:150%;position:relative;z-index:99;transform:scale(0.666) translateX(-25%) translateY(-25%)}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview .is-loading{position:absolute;top:50%;right:calc( 50% - 12px )}.ti-tpc-templates-modal .dialog-message .dialog-content .ti-tpc-template-library-preview .is-loading svg{-webkit-animation:icon-spin 2s linear infinite;animation:icon-spin 2s linear infinite}.ti-tpc-templates-modal .components-button:focus:not(:disabled){box-shadow:none}.components-modal__screen-overlay.is-dark .components-modal__frame{border:1px solid #26292c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content{background:#34383c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header{background:#26292c;border-bottom:1px solid #26292c}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header .components-button{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-modal__header .components-button:hover{color:#e0e1e3}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input{background-color:#26292c;color:#a4afb7;border:none}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input:focus{box-shadow:none}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input::-moz-placeholder{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input:-ms-input-placeholder{color:#a4afb7}.components-modal__screen-overlay.is-dark .components-modal__frame .components-modal__content .components-text-control__input::placeholder{color:#a4afb7}@-webkit-keyframes icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes icon-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@media(max-width: 1439px){.ti-tpc-templates-modal .dialog-widget-content{max-width:990px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-preview iframe{width:1440px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-template{width:calc(25% - 30px)}}@media(min-width: 1440px){.ti-tpc-templates-modal .dialog-widget-content{max-width:1200px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-preview iframe{width:1710px}.ti-tpc-templates-modal .dialog-widget-content .ti-tpc-template-library-template{width:calc(20% - 30px)}}
|
elementor/src/editor.scss
CHANGED
@@ -648,6 +648,10 @@
|
|
648 |
}
|
649 |
}
|
650 |
}
|
|
|
|
|
|
|
|
|
651 |
}
|
652 |
|
653 |
.components-modal__screen-overlay {
|
648 |
}
|
649 |
}
|
650 |
}
|
651 |
+
|
652 |
+
.components-button:focus:not(:disabled) {
|
653 |
+
box-shadow: none;
|
654 |
+
}
|
655 |
}
|
656 |
|
657 |
.components-modal__screen-overlay {
|
includes/Admin.php
CHANGED
@@ -36,7 +36,6 @@ class Admin {
|
|
36 |
add_action( 'after_switch_theme', array( $this, 'get_previous_theme' ) );
|
37 |
add_filter( 'neve_dashboard_page_data', array( $this, 'localize_sites_library' ) );
|
38 |
add_action( 'admin_menu', array( $this, 'register' ) );
|
39 |
-
add_action( 'admin_menu', array( $this, 'register' ) );
|
40 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
|
41 |
|
42 |
$white_label_module = get_option( 'nv_pro_white_label_status' );
|
@@ -68,6 +67,9 @@ class Admin {
|
|
68 |
|
69 |
$prefix = defined( 'NEVE_VERSION' ) ? '<span style="' . esc_attr( $style ) . '">↵</span>' : '';
|
70 |
add_theme_page( __( 'Starter Sites', 'templates-patterns-collection' ), $prefix . __( 'Starter Sites', 'templates-patterns-collection' ), 'activate_plugins', $this->page_slug, array( $this, 'render_starter_sites' ) );
|
|
|
|
|
|
|
71 |
}
|
72 |
|
73 |
/**
|
@@ -87,6 +89,11 @@ class Admin {
|
|
87 |
return;
|
88 |
}
|
89 |
|
|
|
|
|
|
|
|
|
|
|
90 |
$dependencies = ( include TIOB_PATH . 'assets/build/app.asset.php' );
|
91 |
|
92 |
wp_register_style( 'tiob', TIOB_URL . '/assets/build/style-app.css', array( 'wp-components' ), $dependencies['version'] );
|
@@ -144,9 +151,39 @@ class Admin {
|
|
144 |
|
145 |
$array['onboarding'] = $api;
|
146 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
return $array;
|
148 |
}
|
149 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
/**
|
151 |
* Get all the sites data.
|
152 |
*
|
@@ -294,27 +331,28 @@ class Admin {
|
|
294 |
'copy_error_code' => __( 'Copy error code', 'templates-patterns-collection' ),
|
295 |
'download_error_log' => __( 'Download error log', 'templates-patterns-collection' ),
|
296 |
'external_plugins_notice' => __( 'To import this demo you have to install the following plugins:', 'templates-patterns-collection' ),
|
297 |
-
/* translators: 1 - 'here'. */
|
298 |
'rest_not_working' => sprintf(
|
|
|
299 |
__( 'It seems that Rest API is not working properly on your website. Read about how you can fix it %1$s.', 'templates-patterns-collection' ),
|
300 |
sprintf( '<a href="https://docs.themeisle.com/article/1157-starter-sites-library-import-is-not-working#rest-api">%1$s<i class="dashicons dashicons-external"></i></a>', __( 'here', 'templates-patterns-collection' ) )
|
301 |
),
|
302 |
-
/* translators: 1 - 'get in touch'. */
|
303 |
'error_report' => sprintf(
|
|
|
304 |
__( 'Hi! It seems there is a configuration issue with your server that\'s causing the import to fail. Please %1$s with us with the error code below, so we can help you fix this.', 'templates-patterns-collection' ),
|
305 |
sprintf( '<a href="https://themeisle.com/contact">%1$s <i class="dashicons dashicons-external"></i></a>', __( 'get in touch', 'templates-patterns-collection' ) )
|
306 |
),
|
307 |
-
/* translators: 1 - 'troubleshooting guide'. */
|
308 |
'troubleshooting' => sprintf(
|
|
|
309 |
__( 'Hi! It seems there is a configuration issue with your server that\'s causing the import to fail. Take a look at our %1$s to see if any of the proposed solutions work.', 'templates-patterns-collection' ),
|
310 |
sprintf( '<a href="https://docs.themeisle.com/article/1157-starter-sites-library-import-is-not-working">%1$s <i class="dashicons dashicons-external"></i></a>', __( 'troubleshooting guide', 'templates-patterns-collection' ) )
|
311 |
),
|
312 |
-
/* translators: 1 - 'get in touch'. */
|
313 |
'support' => sprintf(
|
|
|
314 |
__( 'If none of the solutions in the guide work, please %1$s with us with the error code below, so we can help you fix this.', 'templates-patterns-collection' ),
|
315 |
sprintf( '<a href="https://themeisle.com/contact">%1$s <i class="dashicons dashicons-external"></i></a>', __( 'get in touch', 'templates-patterns-collection' ) )
|
316 |
),
|
317 |
'fsDown' => sprintf(
|
|
|
318 |
__( 'It seems that %s is not available. You can contact your site administrator or hosting provider to help you enable it.', 'templates-patterns-collection' ),
|
319 |
sprintf( '<code>WP_Filesystem</code>' )
|
320 |
),
|
36 |
add_action( 'after_switch_theme', array( $this, 'get_previous_theme' ) );
|
37 |
add_filter( 'neve_dashboard_page_data', array( $this, 'localize_sites_library' ) );
|
38 |
add_action( 'admin_menu', array( $this, 'register' ) );
|
|
|
39 |
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );
|
40 |
|
41 |
$white_label_module = get_option( 'nv_pro_white_label_status' );
|
67 |
|
68 |
$prefix = defined( 'NEVE_VERSION' ) ? '<span style="' . esc_attr( $style ) . '">↵</span>' : '';
|
69 |
add_theme_page( __( 'Starter Sites', 'templates-patterns-collection' ), $prefix . __( 'Starter Sites', 'templates-patterns-collection' ), 'activate_plugins', $this->page_slug, array( $this, 'render_starter_sites' ) );
|
70 |
+
if ( $this->is_agency_plan() ) {
|
71 |
+
add_theme_page( __( 'My Library', 'templates-patterns-collection' ), $prefix . __( 'My Library', 'templates-patterns-collection' ), 'activate_plugins', 'themes.php?page=' . $this->page_slug . '#library' );
|
72 |
+
}
|
73 |
}
|
74 |
|
75 |
/**
|
89 |
return;
|
90 |
}
|
91 |
|
92 |
+
$dismiss_notice = isset( $_GET['dismiss_notice'] ) && $_GET['dismiss_notice'] === 'yes';
|
93 |
+
if ( $dismiss_notice ) {
|
94 |
+
set_transient( 'tiob_library_visited', true );
|
95 |
+
}
|
96 |
+
|
97 |
$dependencies = ( include TIOB_PATH . 'assets/build/app.asset.php' );
|
98 |
|
99 |
wp_register_style( 'tiob', TIOB_URL . '/assets/build/style-app.css', array( 'wp-components' ), $dependencies['version'] );
|
151 |
|
152 |
$array['onboarding'] = $api;
|
153 |
|
154 |
+
$page_was_visited = (bool) get_transient( 'tiob_library_visited' );
|
155 |
+
if ( $this->is_agency_plan() && ! $page_was_visited ) {
|
156 |
+
$array['notifications']['template-cloud'] = array(
|
157 |
+
'text' => __( 'Great news! Now you can export your own custom designs to the cloud and then reuse them on other sites.', 'neve' ),
|
158 |
+
'cta' => __( 'Open Templates Cloud', 'neve' ),
|
159 |
+
'url' => 'themes.php?page=' . $this->page_slug . '&dismiss_notice=yes#library',
|
160 |
+
);
|
161 |
+
}
|
162 |
+
|
163 |
return $array;
|
164 |
}
|
165 |
|
166 |
+
/**
|
167 |
+
* Check if current subscription is agency.
|
168 |
+
*
|
169 |
+
* @return bool
|
170 |
+
*/
|
171 |
+
private function is_agency_plan() {
|
172 |
+
$category = apply_filters( 'product_neve_license_plan', -1 );
|
173 |
+
$category_mapping = array(
|
174 |
+
1 => 1,
|
175 |
+
2 => 1,
|
176 |
+
3 => 2,
|
177 |
+
4 => 2,
|
178 |
+
5 => 3,
|
179 |
+
6 => 3,
|
180 |
+
7 => 1,
|
181 |
+
8 => 2,
|
182 |
+
9 => 3,
|
183 |
+
);
|
184 |
+
return isset( $category_mapping[ $category ] ) && $category_mapping[ $category ] === 3;
|
185 |
+
}
|
186 |
+
|
187 |
/**
|
188 |
* Get all the sites data.
|
189 |
*
|
331 |
'copy_error_code' => __( 'Copy error code', 'templates-patterns-collection' ),
|
332 |
'download_error_log' => __( 'Download error log', 'templates-patterns-collection' ),
|
333 |
'external_plugins_notice' => __( 'To import this demo you have to install the following plugins:', 'templates-patterns-collection' ),
|
|
|
334 |
'rest_not_working' => sprintf(
|
335 |
+
/* translators: 1 - 'here'. */
|
336 |
__( 'It seems that Rest API is not working properly on your website. Read about how you can fix it %1$s.', 'templates-patterns-collection' ),
|
337 |
sprintf( '<a href="https://docs.themeisle.com/article/1157-starter-sites-library-import-is-not-working#rest-api">%1$s<i class="dashicons dashicons-external"></i></a>', __( 'here', 'templates-patterns-collection' ) )
|
338 |
),
|
|
|
339 |
'error_report' => sprintf(
|
340 |
+
/* translators: 1 - 'get in touch'. */
|
341 |
__( 'Hi! It seems there is a configuration issue with your server that\'s causing the import to fail. Please %1$s with us with the error code below, so we can help you fix this.', 'templates-patterns-collection' ),
|
342 |
sprintf( '<a href="https://themeisle.com/contact">%1$s <i class="dashicons dashicons-external"></i></a>', __( 'get in touch', 'templates-patterns-collection' ) )
|
343 |
),
|
|
|
344 |
'troubleshooting' => sprintf(
|
345 |
+
/* translators: 1 - 'troubleshooting guide'. */
|
346 |
__( 'Hi! It seems there is a configuration issue with your server that\'s causing the import to fail. Take a look at our %1$s to see if any of the proposed solutions work.', 'templates-patterns-collection' ),
|
347 |
sprintf( '<a href="https://docs.themeisle.com/article/1157-starter-sites-library-import-is-not-working">%1$s <i class="dashicons dashicons-external"></i></a>', __( 'troubleshooting guide', 'templates-patterns-collection' ) )
|
348 |
),
|
|
|
349 |
'support' => sprintf(
|
350 |
+
/* translators: 1 - 'get in touch'. */
|
351 |
__( 'If none of the solutions in the guide work, please %1$s with us with the error code below, so we can help you fix this.', 'templates-patterns-collection' ),
|
352 |
sprintf( '<a href="https://themeisle.com/contact">%1$s <i class="dashicons dashicons-external"></i></a>', __( 'get in touch', 'templates-patterns-collection' ) )
|
353 |
),
|
354 |
'fsDown' => sprintf(
|
355 |
+
/* translators: %s - 'WP_Filesystem'. */
|
356 |
__( 'It seems that %s is not available. You can contact your site administrator or hosting provider to help you enable it.', 'templates-patterns-collection' ),
|
357 |
sprintf( '<code>WP_Filesystem</code>' )
|
358 |
),
|
includes/Editor.php
CHANGED
@@ -58,6 +58,7 @@ class Editor {
|
|
58 |
'type' => 'gutenberg',
|
59 |
'meta' => Main::get_meta_fields( $post_id = get_the_ID(), $type = 'gutenberg' ),
|
60 |
),
|
|
|
61 |
'canPredefine' => apply_filters( 'ti_tpc_can_predefine', false ),
|
62 |
)
|
63 |
)
|
58 |
'type' => 'gutenberg',
|
59 |
'meta' => Main::get_meta_fields( $post_id = get_the_ID(), $type = 'gutenberg' ),
|
60 |
),
|
61 |
+
'metaKeys' => apply_filters( 'ti_tpc_template_meta', array(), $post_id = get_the_ID(), $type = 'gutenberg' ),
|
62 |
'canPredefine' => apply_filters( 'ti_tpc_can_predefine', false ),
|
63 |
)
|
64 |
)
|
includes/Main.php
CHANGED
@@ -18,7 +18,7 @@ class Main {
|
|
18 |
*
|
19 |
* @var string Version string.
|
20 |
*/
|
21 |
-
const VERSION = '1.1.
|
22 |
/**
|
23 |
* Sites Library API URL.
|
24 |
*
|
18 |
*
|
19 |
* @var string Version string.
|
20 |
*/
|
21 |
+
const VERSION = '1.1.8';
|
22 |
/**
|
23 |
* Sites Library API URL.
|
24 |
*
|
languages/templates-patterns-collection.pot
CHANGED
@@ -9,7 +9,7 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"POT-Creation-Date: 2021-04-
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: templates-patterns-collection\n"
|
@@ -30,46 +30,50 @@ msgstr ""
|
|
30 |
msgid "https://themeisle.com"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: includes/Admin.php:
|
34 |
msgid "Starter Sites"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: includes/Admin.php:
|
|
|
|
|
|
|
|
|
38 |
msgid "Hi! We've noticed you were using a child theme of Zelle before. To make your transition easier, we can help you keep the same homepage settings you had before but in original Zelle's style, by converting it into an Elementor template."
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: includes/Admin.php:
|
42 |
#: assets/build/app.js:10
|
43 |
#: assets/src/Components/StarterSiteCard.js:60
|
44 |
msgid "Preview"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: includes/Admin.php:
|
48 |
#: assets/build/app.js:10
|
49 |
#: assets/src/Components/PreviewFrame.js:102
|
50 |
#: assets/src/Components/StarterSiteCard.js:68
|
51 |
msgid "Import"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: includes/Admin.php:
|
55 |
msgid "Get the PRO version!"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: includes/Admin.php:
|
59 |
msgid "Importing"
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: includes/Admin.php:
|
63 |
#: assets/build/app.js:2
|
64 |
#: assets/src/Components/Migration.js:165
|
65 |
msgid "Cancel"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: includes/Admin.php:
|
69 |
msgid "Loading"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: includes/Admin.php:
|
73 |
#: assets/build/app.js:2
|
74 |
#: assets/build/app.js:10
|
75 |
#: assets/src/Components/ImportModal.js:603
|
@@ -77,135 +81,140 @@ msgstr ""
|
|
77 |
msgid "View Website"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: includes/Admin.php:
|
81 |
#: assets/build/app.js:10
|
82 |
#: assets/src/Components/ImportModal.js:613
|
83 |
msgid "Add your own content"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: includes/Admin.php:
|
87 |
#: assets/build/app.js:10
|
88 |
#: assets/src/Components/ImportModal.js:594
|
89 |
msgid "Back to Sites Library"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: includes/Admin.php:
|
93 |
msgid "Note"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: includes/Admin.php:
|
97 |
msgid "Advanced Options"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: includes/Admin.php:
|
101 |
#: assets/build/app.js:10
|
102 |
#: assets/src/Components/ImportModal.js:272
|
103 |
msgid "Plugins"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: includes/Admin.php:
|
107 |
msgid "General"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: includes/Admin.php:
|
111 |
msgid "Keep current layout"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: includes/Admin.php:
|
115 |
msgid "Search"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: includes/Admin.php:
|
119 |
#: assets/build/app.js:10
|
120 |
#: assets/src/Components/ImportModal.js:200
|
121 |
msgid "Content"
|
122 |
msgstr ""
|
123 |
|
124 |
-
#: includes/Admin.php:
|
125 |
#: assets/build/app.js:10
|
126 |
#: assets/src/Components/ImportModal.js:204
|
127 |
msgid "Customizer"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: includes/Admin.php:
|
131 |
#: assets/build/app.js:10
|
132 |
#: assets/src/Components/ImportModal.js:208
|
133 |
msgid "Widgets"
|
134 |
msgstr ""
|
135 |
|
136 |
-
#: includes/Admin.php:
|
137 |
msgid "We recommend you backup your website content before attempting a full site import."
|
138 |
msgstr ""
|
139 |
|
140 |
-
#: includes/Admin.php:
|
141 |
msgid "Due to copyright issues, some of the demo images will not be imported and will be replaced by placeholder images."
|
142 |
msgstr ""
|
143 |
|
144 |
-
#: includes/Admin.php:
|
145 |
msgid "Some of the demo images will not be imported and will be replaced by placeholder images."
|
146 |
msgstr ""
|
147 |
|
148 |
-
#: includes/Admin.php:
|
149 |
msgid "Here is our own collection of related images you can use for your site."
|
150 |
msgstr ""
|
151 |
|
152 |
-
#: includes/Admin.php:
|
153 |
#: assets/build/app.js:8
|
154 |
#: assets/src/Components/ImportModal.js:542
|
155 |
msgid "Content was successfully imported. Enjoy your new site!"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: includes/Admin.php:
|
159 |
msgid "Available in the PRO version"
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: includes/Admin.php:
|
163 |
msgid "Copy error code"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: includes/Admin.php:
|
167 |
msgid "Download error log"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: includes/Admin.php:
|
171 |
msgid "To import this demo you have to install the following plugins:"
|
172 |
msgstr ""
|
173 |
|
174 |
-
|
|
|
175 |
msgid "It seems that Rest API is not working properly on your website. Read about how you can fix it %1$s."
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: includes/Admin.php:
|
179 |
msgid "here"
|
180 |
msgstr ""
|
181 |
|
182 |
-
|
|
|
183 |
msgid "Hi! It seems there is a configuration issue with your server that's causing the import to fail. Please %1$s with us with the error code below, so we can help you fix this."
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: includes/Admin.php:
|
187 |
-
#: includes/Admin.php:
|
188 |
msgid "get in touch"
|
189 |
msgstr ""
|
190 |
|
191 |
-
|
|
|
192 |
msgid "Hi! It seems there is a configuration issue with your server that's causing the import to fail. Take a look at our %1$s to see if any of the proposed solutions work."
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: includes/Admin.php:
|
196 |
msgid "troubleshooting guide"
|
197 |
msgstr ""
|
198 |
|
199 |
-
|
|
|
200 |
msgid "If none of the solutions in the guide work, please %1$s with us with the error code below, so we can help you fix this."
|
201 |
msgstr ""
|
202 |
|
203 |
-
|
|
|
204 |
msgid "It seems that %s is not available. You can contact your site administrator or hosting provider to help you enable it."
|
205 |
msgstr ""
|
206 |
|
207 |
#. translators: %s - Theme name
|
208 |
-
#: includes/Admin.php:
|
209 |
msgid "Choose from multiple unique demos, specially designed for you, that can be installed with a single click. You just need to choose your favorite, and we will take care of everything else."
|
210 |
msgstr ""
|
211 |
|
@@ -338,86 +347,86 @@ msgid "Dismiss"
|
|
338 |
msgstr ""
|
339 |
|
340 |
#: assets/build/app.js:2
|
341 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
342 |
msgid "An error occurred!"
|
343 |
msgstr ""
|
344 |
|
345 |
#: assets/build/app.js:2
|
346 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
347 |
msgid "Import done!"
|
348 |
msgstr ""
|
349 |
|
350 |
#: assets/build/app.js:2
|
351 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
352 |
msgid "Template was successfully imported!"
|
353 |
msgstr ""
|
354 |
|
355 |
#: assets/build/app.js:2
|
356 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
357 |
msgid "Templates were successfully imported!"
|
358 |
msgstr ""
|
359 |
|
360 |
#: assets/build/app.js:2
|
361 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
362 |
msgid "Visit"
|
363 |
msgstr ""
|
364 |
|
365 |
#: assets/build/app.js:2
|
366 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
367 |
msgid "Edit"
|
368 |
msgstr ""
|
369 |
|
370 |
#. translators: name of starter site
|
371 |
#: assets/build/app.js:4
|
372 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
373 |
msgid "Import the %s template"
|
374 |
msgstr ""
|
375 |
|
376 |
#. translators: name of template
|
377 |
#: assets/build/app.js:6
|
378 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
379 |
msgid "Import all templates from %s"
|
380 |
msgstr ""
|
381 |
|
382 |
#. translators: %s the name of the template
|
383 |
#: assets/build/app.js:8
|
384 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
385 |
msgid "The %s template will be imported as a page into your site. This import will install & activate the page builder plugin if not already installed."
|
386 |
msgstr ""
|
387 |
|
388 |
#. translators: %s the name of the template
|
389 |
#: assets/build/app.js:8
|
390 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
391 |
msgid "All the templates that are included in this starter site, will be imported as pages. This import will install & activate the page builder plugin if not already installed."
|
392 |
msgstr ""
|
393 |
|
394 |
#: assets/build/app.js:8
|
395 |
-
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:
|
396 |
msgid "I want to import the entire site"
|
397 |
msgstr ""
|
398 |
|
399 |
#: assets/build/app.js:8
|
400 |
-
#: assets/src/utils/common.js:
|
401 |
msgid "Business"
|
402 |
msgstr ""
|
403 |
|
404 |
#: assets/build/app.js:8
|
405 |
-
#: assets/src/utils/common.js:
|
406 |
msgid "Ecommerce"
|
407 |
msgstr ""
|
408 |
|
409 |
#: assets/build/app.js:8
|
410 |
-
#: assets/src/utils/common.js:
|
411 |
msgid "Fashion"
|
412 |
msgstr ""
|
413 |
|
414 |
#: assets/build/app.js:8
|
415 |
-
#: assets/src/utils/common.js:
|
416 |
msgid "Blogging"
|
417 |
msgstr ""
|
418 |
|
419 |
#: assets/build/app.js:8
|
420 |
-
#: assets/src/utils/common.js:
|
421 |
msgid "Photography"
|
422 |
msgstr ""
|
423 |
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"POT-Creation-Date: 2021-04-29T07:49:11+00:00\n"
|
13 |
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
14 |
"X-Generator: WP-CLI 2.4.0\n"
|
15 |
"X-Domain: templates-patterns-collection\n"
|
30 |
msgid "https://themeisle.com"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: includes/Admin.php:69
|
34 |
msgid "Starter Sites"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: includes/Admin.php:71
|
38 |
+
msgid "My Library"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: includes/Admin.php:276
|
42 |
msgid "Hi! We've noticed you were using a child theme of Zelle before. To make your transition easier, we can help you keep the same homepage settings you had before but in original Zelle's style, by converting it into an Elementor template."
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: includes/Admin.php:307
|
46 |
#: assets/build/app.js:10
|
47 |
#: assets/src/Components/StarterSiteCard.js:60
|
48 |
msgid "Preview"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: includes/Admin.php:308
|
52 |
#: assets/build/app.js:10
|
53 |
#: assets/src/Components/PreviewFrame.js:102
|
54 |
#: assets/src/Components/StarterSiteCard.js:68
|
55 |
msgid "Import"
|
56 |
msgstr ""
|
57 |
|
58 |
+
#: includes/Admin.php:309
|
59 |
msgid "Get the PRO version!"
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: includes/Admin.php:310
|
63 |
msgid "Importing"
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: includes/Admin.php:311
|
67 |
#: assets/build/app.js:2
|
68 |
#: assets/src/Components/Migration.js:165
|
69 |
msgid "Cancel"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: includes/Admin.php:312
|
73 |
msgid "Loading"
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: includes/Admin.php:313
|
77 |
#: assets/build/app.js:2
|
78 |
#: assets/build/app.js:10
|
79 |
#: assets/src/Components/ImportModal.js:603
|
81 |
msgid "View Website"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: includes/Admin.php:314
|
85 |
#: assets/build/app.js:10
|
86 |
#: assets/src/Components/ImportModal.js:613
|
87 |
msgid "Add your own content"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: includes/Admin.php:315
|
91 |
#: assets/build/app.js:10
|
92 |
#: assets/src/Components/ImportModal.js:594
|
93 |
msgid "Back to Sites Library"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: includes/Admin.php:316
|
97 |
msgid "Note"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: includes/Admin.php:317
|
101 |
msgid "Advanced Options"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: includes/Admin.php:318
|
105 |
#: assets/build/app.js:10
|
106 |
#: assets/src/Components/ImportModal.js:272
|
107 |
msgid "Plugins"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: includes/Admin.php:319
|
111 |
msgid "General"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: includes/Admin.php:320
|
115 |
msgid "Keep current layout"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: includes/Admin.php:321
|
119 |
msgid "Search"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: includes/Admin.php:322
|
123 |
#: assets/build/app.js:10
|
124 |
#: assets/src/Components/ImportModal.js:200
|
125 |
msgid "Content"
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: includes/Admin.php:323
|
129 |
#: assets/build/app.js:10
|
130 |
#: assets/src/Components/ImportModal.js:204
|
131 |
msgid "Customizer"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: includes/Admin.php:324
|
135 |
#: assets/build/app.js:10
|
136 |
#: assets/src/Components/ImportModal.js:208
|
137 |
msgid "Widgets"
|
138 |
msgstr ""
|
139 |
|
140 |
+
#: includes/Admin.php:325
|
141 |
msgid "We recommend you backup your website content before attempting a full site import."
|
142 |
msgstr ""
|
143 |
|
144 |
+
#: includes/Admin.php:326
|
145 |
msgid "Due to copyright issues, some of the demo images will not be imported and will be replaced by placeholder images."
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: includes/Admin.php:327
|
149 |
msgid "Some of the demo images will not be imported and will be replaced by placeholder images."
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: includes/Admin.php:328
|
153 |
msgid "Here is our own collection of related images you can use for your site."
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: includes/Admin.php:329
|
157 |
#: assets/build/app.js:8
|
158 |
#: assets/src/Components/ImportModal.js:542
|
159 |
msgid "Content was successfully imported. Enjoy your new site!"
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/Admin.php:330
|
163 |
msgid "Available in the PRO version"
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: includes/Admin.php:331
|
167 |
msgid "Copy error code"
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: includes/Admin.php:332
|
171 |
msgid "Download error log"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: includes/Admin.php:333
|
175 |
msgid "To import this demo you have to install the following plugins:"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#. translators: 1 - 'here'.
|
179 |
+
#: includes/Admin.php:336
|
180 |
msgid "It seems that Rest API is not working properly on your website. Read about how you can fix it %1$s."
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: includes/Admin.php:337
|
184 |
msgid "here"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#. translators: 1 - 'get in touch'.
|
188 |
+
#: includes/Admin.php:341
|
189 |
msgid "Hi! It seems there is a configuration issue with your server that's causing the import to fail. Please %1$s with us with the error code below, so we can help you fix this."
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: includes/Admin.php:342
|
193 |
+
#: includes/Admin.php:352
|
194 |
msgid "get in touch"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#. translators: 1 - 'troubleshooting guide'.
|
198 |
+
#: includes/Admin.php:346
|
199 |
msgid "Hi! It seems there is a configuration issue with your server that's causing the import to fail. Take a look at our %1$s to see if any of the proposed solutions work."
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: includes/Admin.php:347
|
203 |
msgid "troubleshooting guide"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#. translators: 1 - 'get in touch'.
|
207 |
+
#: includes/Admin.php:351
|
208 |
msgid "If none of the solutions in the guide work, please %1$s with us with the error code below, so we can help you fix this."
|
209 |
msgstr ""
|
210 |
|
211 |
+
#. translators: %s - 'WP_Filesystem'.
|
212 |
+
#: includes/Admin.php:356
|
213 |
msgid "It seems that %s is not available. You can contact your site administrator or hosting provider to help you enable it."
|
214 |
msgstr ""
|
215 |
|
216 |
#. translators: %s - Theme name
|
217 |
+
#: includes/Admin.php:375
|
218 |
msgid "Choose from multiple unique demos, specially designed for you, that can be installed with a single click. You just need to choose your favorite, and we will take care of everything else."
|
219 |
msgstr ""
|
220 |
|
347 |
msgstr ""
|
348 |
|
349 |
#: assets/build/app.js:2
|
350 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:210
|
351 |
msgid "An error occurred!"
|
352 |
msgstr ""
|
353 |
|
354 |
#: assets/build/app.js:2
|
355 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:142
|
356 |
msgid "Import done!"
|
357 |
msgstr ""
|
358 |
|
359 |
#: assets/build/app.js:2
|
360 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:149
|
361 |
msgid "Template was successfully imported!"
|
362 |
msgstr ""
|
363 |
|
364 |
#: assets/build/app.js:2
|
365 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:153
|
366 |
msgid "Templates were successfully imported!"
|
367 |
msgstr ""
|
368 |
|
369 |
#: assets/build/app.js:2
|
370 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:174
|
371 |
msgid "Visit"
|
372 |
msgstr ""
|
373 |
|
374 |
#: assets/build/app.js:2
|
375 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:183
|
376 |
msgid "Edit"
|
377 |
msgstr ""
|
378 |
|
379 |
#. translators: name of starter site
|
380 |
#: assets/build/app.js:4
|
381 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:277
|
382 |
msgid "Import the %s template"
|
383 |
msgstr ""
|
384 |
|
385 |
#. translators: name of template
|
386 |
#: assets/build/app.js:6
|
387 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:282
|
388 |
msgid "Import all templates from %s"
|
389 |
msgstr ""
|
390 |
|
391 |
#. translators: %s the name of the template
|
392 |
#: assets/build/app.js:8
|
393 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:246
|
394 |
msgid "The %s template will be imported as a page into your site. This import will install & activate the page builder plugin if not already installed."
|
395 |
msgstr ""
|
396 |
|
397 |
#. translators: %s the name of the template
|
398 |
#: assets/build/app.js:8
|
399 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:252
|
400 |
msgid "All the templates that are included in this starter site, will be imported as pages. This import will install & activate the page builder plugin if not already installed."
|
401 |
msgstr ""
|
402 |
|
403 |
#: assets/build/app.js:8
|
404 |
+
#: assets/src/Components/CloudLibrary/ImportTemplatesModal.js:302
|
405 |
msgid "I want to import the entire site"
|
406 |
msgstr ""
|
407 |
|
408 |
#: assets/build/app.js:8
|
409 |
+
#: assets/src/utils/common.js:27
|
410 |
msgid "Business"
|
411 |
msgstr ""
|
412 |
|
413 |
#: assets/build/app.js:8
|
414 |
+
#: assets/src/utils/common.js:28
|
415 |
msgid "Ecommerce"
|
416 |
msgstr ""
|
417 |
|
418 |
#: assets/build/app.js:8
|
419 |
+
#: assets/src/utils/common.js:29
|
420 |
msgid "Fashion"
|
421 |
msgstr ""
|
422 |
|
423 |
#: assets/build/app.js:8
|
424 |
+
#: assets/src/utils/common.js:30
|
425 |
msgid "Blogging"
|
426 |
msgstr ""
|
427 |
|
428 |
#: assets/build/app.js:8
|
429 |
+
#: assets/src/utils/common.js:31
|
430 |
msgid "Photography"
|
431 |
msgstr ""
|
432 |
|
readme.txt
CHANGED
@@ -27,6 +27,15 @@ No account is required to access the service template collection and the privacy
|
|
27 |
|
28 |
== Changelog ==
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
##### [Version 1.1.7](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.6...v1.1.7) (2021-04-12)
|
31 |
|
32 |
- Rename to Save
|
27 |
|
28 |
== Changelog ==
|
29 |
|
30 |
+
##### [Version 1.1.8](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.7...v1.1.8) (2021-04-29)
|
31 |
+
|
32 |
+
- Decode HTML entities in title
|
33 |
+
- Improve Templates Cloud visibility
|
34 |
+
- Fix meta not saving properly
|
35 |
+
|
36 |
+
|
37 |
+
|
38 |
+
|
39 |
##### [Version 1.1.7](https://github.com/Codeinwp/templates-patterns-collection/compare/v1.1.6...v1.1.7) (2021-04-12)
|
40 |
|
41 |
- Rename to Save
|
templates-patterns-collection.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Templates Patterns Collection
|
4 |
* Description: This plugin is an add-on to Neve WordPress theme which offers access to Templates and Block Patterns library service to be used with the theme.
|
5 |
-
* Version: 1.1.
|
6 |
* Author: ThemeIsle
|
7 |
* Author URI: https://themeisle.com
|
8 |
* License: GPLv3
|
2 |
/**
|
3 |
* Plugin Name: Templates Patterns Collection
|
4 |
* Description: This plugin is an add-on to Neve WordPress theme which offers access to Templates and Block Patterns library service to be used with the theme.
|
5 |
+
* Version: 1.1.8
|
6 |
* Author: ThemeIsle
|
7 |
* Author URI: https://themeisle.com
|
8 |
* License: GPLv3
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitf9676c45e6bfa5af685907b31399a0c8::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -25,8 +25,8 @@ class InstalledVersions
|
|
25 |
private static $installed = array (
|
26 |
'root' =>
|
27 |
array (
|
28 |
-
'pretty_version' => '1.1.
|
29 |
-
'version' => '1.1.
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
@@ -37,8 +37,8 @@ private static $installed = array (
|
|
37 |
array (
|
38 |
'codeinwp/templates-patterns-collection' =>
|
39 |
array (
|
40 |
-
'pretty_version' => '1.1.
|
41 |
-
'version' => '1.1.
|
42 |
'aliases' =>
|
43 |
array (
|
44 |
),
|
25 |
private static $installed = array (
|
26 |
'root' =>
|
27 |
array (
|
28 |
+
'pretty_version' => '1.1.8',
|
29 |
+
'version' => '1.1.8.0',
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
37 |
array (
|
38 |
'codeinwp/templates-patterns-collection' =>
|
39 |
array (
|
40 |
+
'pretty_version' => '1.1.8',
|
41 |
+
'version' => '1.1.8.0',
|
42 |
'aliases' =>
|
43 |
array (
|
44 |
),
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitca138e710143e21ded45930b78dd9134
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitf9676c45e6bfa5af685907b31399a0c8
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInitf9676c45e6bfa5af685907b31399a0c8', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitf9676c45e6bfa5af685907b31399a0c8', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitf9676c45e6bfa5af685907b31399a0c8::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
@@ -52,9 +52,9 @@ class ComposerStaticInitca138e710143e21ded45930b78dd9134
|
|
52 |
public static function getInitializer(ClassLoader $loader)
|
53 |
{
|
54 |
return \Closure::bind(function () use ($loader) {
|
55 |
-
$loader->prefixLengthsPsr4 =
|
56 |
-
$loader->prefixDirsPsr4 =
|
57 |
-
$loader->classMap =
|
58 |
|
59 |
}, null, ClassLoader::class);
|
60 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitf9676c45e6bfa5af685907b31399a0c8
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'T' =>
|
52 |
public static function getInitializer(ClassLoader $loader)
|
53 |
{
|
54 |
return \Closure::bind(function () use ($loader) {
|
55 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitf9676c45e6bfa5af685907b31399a0c8::$prefixLengthsPsr4;
|
56 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitf9676c45e6bfa5af685907b31399a0c8::$prefixDirsPsr4;
|
57 |
+
$loader->classMap = ComposerStaticInitf9676c45e6bfa5af685907b31399a0c8::$classMap;
|
58 |
|
59 |
}, null, ClassLoader::class);
|
60 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
-
'pretty_version' => '1.1.
|
5 |
-
'version' => '1.1.
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
@@ -13,8 +13,8 @@
|
|
13 |
array (
|
14 |
'codeinwp/templates-patterns-collection' =>
|
15 |
array (
|
16 |
-
'pretty_version' => '1.1.
|
17 |
-
'version' => '1.1.
|
18 |
'aliases' =>
|
19 |
array (
|
20 |
),
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
+
'pretty_version' => '1.1.8',
|
5 |
+
'version' => '1.1.8.0',
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
13 |
array (
|
14 |
'codeinwp/templates-patterns-collection' =>
|
15 |
array (
|
16 |
+
'pretty_version' => '1.1.8',
|
17 |
+
'version' => '1.1.8.0',
|
18 |
'aliases' =>
|
19 |
array (
|
20 |
),
|
yarn.lock
CHANGED
@@ -3360,16 +3360,31 @@ character-entities-legacy@^1.0.0:
|
|
3360 |
resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1"
|
3361 |
integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==
|
3362 |
|
|
|
|
|
|
|
|
|
|
|
3363 |
character-entities@^1.0.0:
|
3364 |
version "1.2.4"
|
3365 |
resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b"
|
3366 |
integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==
|
3367 |
|
|
|
|
|
|
|
|
|
|
|
3368 |
character-reference-invalid@^1.0.0:
|
3369 |
version "1.1.4"
|
3370 |
resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560"
|
3371 |
integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==
|
3372 |
|
|
|
|
|
|
|
|
|
|
|
3373 |
check-more-types@^2.24.0:
|
3374 |
version "2.24.0"
|
3375 |
resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600"
|
@@ -6922,6 +6937,11 @@ is-alphabetical@^1.0.0:
|
|
6922 |
resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d"
|
6923 |
integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==
|
6924 |
|
|
|
|
|
|
|
|
|
|
|
6925 |
is-alphanumerical@^1.0.0:
|
6926 |
version "1.0.4"
|
6927 |
resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf"
|
@@ -6930,6 +6950,14 @@ is-alphanumerical@^1.0.0:
|
|
6930 |
is-alphabetical "^1.0.0"
|
6931 |
is-decimal "^1.0.0"
|
6932 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6933 |
is-arrayish@^0.2.1:
|
6934 |
version "0.2.1"
|
6935 |
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
@@ -7023,6 +7051,11 @@ is-decimal@^1.0.0:
|
|
7023 |
resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5"
|
7024 |
integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==
|
7025 |
|
|
|
|
|
|
|
|
|
|
|
7026 |
is-descriptor@^0.1.0:
|
7027 |
version "0.1.6"
|
7028 |
resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
|
@@ -7109,6 +7142,11 @@ is-hexadecimal@^1.0.0:
|
|
7109 |
resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7"
|
7110 |
integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==
|
7111 |
|
|
|
|
|
|
|
|
|
|
|
7112 |
is-installed-globally@^0.1.0:
|
7113 |
version "0.1.0"
|
7114 |
resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80"
|
@@ -10157,6 +10195,18 @@ parse-entities@^2.0.0:
|
|
10157 |
is-decimal "^1.0.0"
|
10158 |
is-hexadecimal "^1.0.0"
|
10159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10160 |
parse-filepath@^1.0.1:
|
10161 |
version "1.0.2"
|
10162 |
resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891"
|
3360 |
resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1"
|
3361 |
integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==
|
3362 |
|
3363 |
+
character-entities-legacy@^2.0.0:
|
3364 |
+
version "2.0.0"
|
3365 |
+
resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-2.0.0.tgz#57f4d00974c696e8f74e9f493e7fcb75b44d7ee7"
|
3366 |
+
integrity sha512-YwaEtEvWLpFa6Wh3uVLrvirA/ahr9fki/NUd/Bd4OR6EdJ8D22hovYQEOUCBfQfcqnC4IAMGMsHXY1eXgL4ZZA==
|
3367 |
+
|
3368 |
character-entities@^1.0.0:
|
3369 |
version "1.2.4"
|
3370 |
resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b"
|
3371 |
integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==
|
3372 |
|
3373 |
+
character-entities@^2.0.0:
|
3374 |
+
version "2.0.0"
|
3375 |
+
resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-2.0.0.tgz#508355fcc8c73893e0909efc1a44d28da2b6fdf3"
|
3376 |
+
integrity sha512-oHqMj3eAuJ77/P5PaIRcqk+C3hdfNwyCD2DAUcD5gyXkegAuF2USC40CEqPscDk4I8FRGMTojGJQkXDsN5QlJA==
|
3377 |
+
|
3378 |
character-reference-invalid@^1.0.0:
|
3379 |
version "1.1.4"
|
3380 |
resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560"
|
3381 |
integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==
|
3382 |
|
3383 |
+
character-reference-invalid@^2.0.0:
|
3384 |
+
version "2.0.0"
|
3385 |
+
resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-2.0.0.tgz#a0bdeb89c051fe7ed5d3158b2f06af06984f2813"
|
3386 |
+
integrity sha512-pE3Z15lLRxDzWJy7bBHBopRwfI20sbrMVLQTC7xsPglCHf4Wv1e167OgYAFP78co2XlhojDyAqA+IAJse27//g==
|
3387 |
+
|
3388 |
check-more-types@^2.24.0:
|
3389 |
version "2.24.0"
|
3390 |
resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600"
|
6937 |
resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d"
|
6938 |
integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==
|
6939 |
|
6940 |
+
is-alphabetical@^2.0.0:
|
6941 |
+
version "2.0.0"
|
6942 |
+
resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-2.0.0.tgz#ef6e2caea57c63450fffc7abb6cbdafc5eb96e96"
|
6943 |
+
integrity sha512-5OV8Toyq3oh4eq6sbWTYzlGdnMT/DPI5I0zxUBxjiigQsZycpkKF3kskkao3JyYGuYDHvhgJF+DrjMQp9SX86w==
|
6944 |
+
|
6945 |
is-alphanumerical@^1.0.0:
|
6946 |
version "1.0.4"
|
6947 |
resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf"
|
6950 |
is-alphabetical "^1.0.0"
|
6951 |
is-decimal "^1.0.0"
|
6952 |
|
6953 |
+
is-alphanumerical@^2.0.0:
|
6954 |
+
version "2.0.0"
|
6955 |
+
resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-2.0.0.tgz#0fbfeb6a72d21d91143b3d182bf6cf5909ee66f6"
|
6956 |
+
integrity sha512-t+2GlJ+hO9yagJ+jU3+HSh80VKvz/3cG2cxbGGm4S0hjKuhWQXgPVUVOZz3tqZzMjhmphZ+1TIJTlRZRoe6GCQ==
|
6957 |
+
dependencies:
|
6958 |
+
is-alphabetical "^2.0.0"
|
6959 |
+
is-decimal "^2.0.0"
|
6960 |
+
|
6961 |
is-arrayish@^0.2.1:
|
6962 |
version "0.2.1"
|
6963 |
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
|
7051 |
resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5"
|
7052 |
integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==
|
7053 |
|
7054 |
+
is-decimal@^2.0.0:
|
7055 |
+
version "2.0.0"
|
7056 |
+
resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-2.0.0.tgz#db1140337809fd043a056ae40a9bd1cdc563034c"
|
7057 |
+
integrity sha512-QfrfjQV0LjoWQ1K1XSoEZkTAzSa14RKVMa5zg3SdAfzEmQzRM4+tbSFWb78creCeA9rNBzaZal92opi1TwPWZw==
|
7058 |
+
|
7059 |
is-descriptor@^0.1.0:
|
7060 |
version "0.1.6"
|
7061 |
resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
|
7142 |
resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7"
|
7143 |
integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==
|
7144 |
|
7145 |
+
is-hexadecimal@^2.0.0:
|
7146 |
+
version "2.0.0"
|
7147 |
+
resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-2.0.0.tgz#8e1ec9f48fe3eabd90161109856a23e0907a65d5"
|
7148 |
+
integrity sha512-vGOtYkiaxwIiR0+Ng/zNId+ZZehGfINwTzdrDqc6iubbnQWhnPuYymOzOKUDqa2cSl59yHnEh2h6MvRLQsyNug==
|
7149 |
+
|
7150 |
is-installed-globally@^0.1.0:
|
7151 |
version "0.1.0"
|
7152 |
resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80"
|
10195 |
is-decimal "^1.0.0"
|
10196 |
is-hexadecimal "^1.0.0"
|
10197 |
|
10198 |
+
parse-entities@^3.0.0:
|
10199 |
+
version "3.0.0"
|
10200 |
+
resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-3.0.0.tgz#9ed6d6569b6cfc95ade058d683ddef239dad60dc"
|
10201 |
+
integrity sha512-AJlcIFDNPEP33KyJLguv0xJc83BNvjxwpuUIcetyXUsLpVXAUCePJ5kIoYtEN2R1ac0cYaRu/vk9dVFkewHQhQ==
|
10202 |
+
dependencies:
|
10203 |
+
character-entities "^2.0.0"
|
10204 |
+
character-entities-legacy "^2.0.0"
|
10205 |
+
character-reference-invalid "^2.0.0"
|
10206 |
+
is-alphanumerical "^2.0.0"
|
10207 |
+
is-decimal "^2.0.0"
|
10208 |
+
is-hexadecimal "^2.0.0"
|
10209 |
+
|
10210 |
parse-filepath@^1.0.1:
|
10211 |
version "1.0.2"
|
10212 |
resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891"
|