admin.migration.js 35.4 KB
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}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 c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));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=52)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return _})),n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return N}));var r=n(24),c=n.n(r),a=n(15),o=n.n(a),l=c()(console.error);function i(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return o.a.sprintf.apply(o.a,[e].concat(n))}catch(t){return l("sprintf error: \n\n"+t.toString()),e}}var s,u,b,p,m=n(12);s={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},u=["(","?"],b={")":["("],":":["?","?:"]},p=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var f={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function d(e){var t=function(e){for(var t,n,r,c,a=[],o=[];t=e.match(p);){for(n=t[0],(r=e.substr(0,t.index).trim())&&a.push(r);c=o.pop();){if(b[n]){if(b[n][0]===c){n=b[n][1]||n;break}}else if(u.indexOf(c)>=0||s[c]<s[n]){o.push(c);break}a.push(c)}b[n]||o.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&a.push(e),a.concat(o.reverse())}(e);return function(e){return function(e,t){var n,r,c,a,o,l,i=[];for(n=0;n<e.length;n++){if(o=e[n],a=f[o]){for(r=a.length,c=Array(r);r--;)c[r]=i.pop();try{l=a.apply(null,c)}catch(e){return e}}else l=t.hasOwnProperty(o)?t[o]:+o;i.push(l)}return i[0]}(t,e)}}var h={contextDelimiter:"",onMissingKey:null};function O(e,t){var n;for(n in this.data=e,this.pluralForms={},this.options={},h)this.options[n]=void 0!==t&&n in t?t[n]:h[n]}function j(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){Object(m.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}O.prototype.getPluralForm=function(e,t){var n,r,c,a,o=this.pluralForms[e];return o||("function"!=typeof(c=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),a=d(r),c=function(e){return+a({n:e})}),o=this.pluralForms[e]=c),o(t)},O.prototype.dcnpgettext=function(e,t,n,r,c){var a,o,l;return a=void 0===c?0:this.getPluralForm(e,c),o=n,t&&(o=t+this.options.contextDelimiter+n),(l=this.data[e][o])&&l[a]?l[a]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===a?n:r)};var v,k,y,w,E,x,S={"":{plural_forms:function(e){return 1===e?0:1}}},P=(y=new O({}),w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";y.data[t]=g({},S,{},y.data[t],{},e),y.data[t][""]=g({},S[""],{},y.data[t][""])},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,c=arguments.length>4?arguments[4]:void 0;return y.data[e]||w(void 0,e),y.dcnpgettext(e,t,n,r,c)},x=function(e,t,n){return E(n,t,e)},v&&w(v,k),{setLocaleData:w,__:function(e,t){return E(t,void 0,e)},_x:x,_n:function(e,t,n,r){return E(r,void 0,e,t,n)},_nx:function(e,t,n,r,c){return E(c,r,e,t,n)},isRTL:function(){return"rtl"===x("ltr","text direction")}}),_=P.setLocaleData.bind(P),C=P.__.bind(P),N=(P._x.bind(P),P._n.bind(P));P._nx.bind(P),P.isRTL.bind(P)},function(e,t){!function(){e.exports=this.wp.components}()},,function(e,t,n){var r=n(47),c=n(48),a=n(28),o=n(49);e.exports=function(e,t){return r(e)||c(e,t)||a(e,t)||o()}},,function(e,t){!function(){e.exports=this.regeneratorRuntime}()},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var o=c.apply(null,r);o&&e.push(o)}else if("object"===a)for(var l in r)n.call(r,l)&&r[l]&&e.push(l)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.apply(t,[]))||(e.exports=r)}()},function(e,t){!function(){e.exports=this.React}()},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){function n(e,t,n,r,c,a,o){try{var l=e[a](o),i=l.value}catch(e){return void n(e)}l.done?t(i):Promise.resolve(i).then(r,c)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(c,a){var o=e.apply(t,r);function l(e){n(o,c,a,l,i,"next",e)}function i(e){n(o,c,a,l,i,"throw",e)}l(void 0)}))}}},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},,,function(e,t,n){var r;!function(){"use strict";var c={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(e){return l(s(e),arguments)}function o(e,t){return a.apply(null,[e].concat(t||[]))}function l(e,t){var n,r,o,l,i,s,u,b,p,m=1,f=e.length,d="";for(r=0;r<f;r++)if("string"==typeof e[r])d+=e[r];else if("object"==typeof e[r]){if((l=e[r]).keys)for(n=t[m],o=0;o<l.keys.length;o++){if(null==n)throw new Error(a('[sprintf] Cannot access property "%s" of undefined value "%s"',l.keys[o],l.keys[o-1]));n=n[l.keys[o]]}else n=l.param_no?t[l.param_no]:t[m++];if(c.not_type.test(l.type)&&c.not_primitive.test(l.type)&&n instanceof Function&&(n=n()),c.numeric_arg.test(l.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(a("[sprintf] expecting number but found %T",n));switch(c.number.test(l.type)&&(b=n>=0),l.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,l.width?parseInt(l.width):0);break;case"e":n=l.precision?parseFloat(n).toExponential(l.precision):parseFloat(n).toExponential();break;case"f":n=l.precision?parseFloat(n).toFixed(l.precision):parseFloat(n);break;case"g":n=l.precision?String(Number(n.toPrecision(l.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=l.precision?n.substring(0,l.precision):n;break;case"t":n=String(!!n),n=l.precision?n.substring(0,l.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=l.precision?n.substring(0,l.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=l.precision?n.substring(0,l.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}c.json.test(l.type)?d+=n:(!c.number.test(l.type)||b&&!l.sign?p="":(p=b?"+":"-",n=n.toString().replace(c.sign,"")),s=l.pad_char?"0"===l.pad_char?"0":l.pad_char.charAt(1):" ",u=l.width-(p+n).length,i=l.width&&u>0?s.repeat(u):"",d+=l.align?p+n+i:"0"===s?p+i+n:i+p+n)}return d}var i=Object.create(null);function s(e){if(i[e])return i[e];for(var t,n=e,r=[],a=0;n;){if(null!==(t=c.text.exec(n)))r.push(t[0]);else if(null!==(t=c.modulo.exec(n)))r.push("%");else{if(null===(t=c.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){a|=1;var o=[],l=t[2],s=[];if(null===(s=c.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(s[1]);""!==(l=l.substring(s[0].length));)if(null!==(s=c.key_access.exec(l)))o.push(s[1]);else{if(null===(s=c.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(s[1])}t[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return i[e]=r}t.sprintf=a,t.vsprintf=o,"undefined"!=typeof window&&(window.sprintf=a,window.vsprintf=o,void 0===(r=function(){return{sprintf:a,vsprintf:o}}.call(t,n,t,e))||(e.exports=r))}()},,,,,,,,,function(e,t,n){e.exports=function(e,t){var n,r,c=0;function a(){var a,o,l=n,i=arguments.length;e:for(;l;){if(l.args.length===arguments.length){for(o=0;o<i;o++)if(l.args[o]!==arguments[o]){l=l.next;continue e}return l!==n&&(l===r&&(r=l.prev),l.prev.next=l.next,l.next&&(l.next.prev=l.prev),l.next=n,l.prev=null,n.prev=l,n=l),l.val}l=l.next}for(a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return l={args:a,val:e.apply(null,a)},n?(n.prev=l,l.next=n):r=l,c===t.maxSize?(r=r.prev).next=null:c++,n=l,l.val}return t=t||{},a.clear=function(){n=null,r=null,c=0},a}},,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,n){var r=n(26);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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},,,,,,,,,,,function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},,,,,,,,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,c=!1,a=void 0;try{for(var o,l=e[Symbol.iterator]();!(r=(o=l.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){c=!0,a=e}finally{try{r||null==l.return||l.return()}finally{if(c)throw a}}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){"use strict";n.r(t);var r=n(0);var c,a=n(39),o=n.n(a),l=n(4),i=n.n(l),s=(n(8),n(1)),u=function(e){var t=e.isStepActive,n=e.isStepComplete,c=e.goToNext,a=e.goToPrevious,o=e.stepIndex,l=1===o;return Object(r.createElement)(C,{isActive:t,isComplete:n},Object(r.createElement)(A,{index:o,isComplete:n}),Object(r.createElement)(N,{heading:Object(s.a)("Back Up Your Site","block-lab"),isStepActive:t},Object(r.createElement)("p",null,Object(s.a)("Migrating from Block Lab to Genesis Custom Blocks is a one-way action. It can’t be undone. Please back up your site before you begin, just in case you need to roll it back.","block-lab")),Object(r.createElement)(T,null,!l&&Object(r.createElement)(x,{onClick:a}),Object(r.createElement)(E,{checkboxLabel:Object(s.a)("I have backed up my site.","block-lab"),onClick:c,stepIndex:o}))))},b=n(6),p=n.n(b),m=n(10),f=n.n(m),d=n(9),h=n.n(d),O=n(2),j=function(e){var t=e.goToNext,n=e.isStepActive,c=e.isStepComplete,a=e.stepIndex,o=blockLabMigration.genesisProKey,l=Object(r.useState)(!1),u=i()(l,2),b=u[0],m=u[1],d=Object(r.useState)(!1),j=i()(d,2),g=j[0],v=j[1],k=Object(r.useState)(o||""),y=i()(k,2),w=y[0],x=y[1],S=Object(r.useState)(""),P=i()(S,2),_=P[0],I=P[1],L=!!o||g,M=function(){var e=f()(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!0),e.next=3,h()({path:"/block-lab/update-subscription-key",method:"POST",data:{subscriptionKey:w}}).then((function(){I(Object(s.a)("Thanks! Your key is valid, and has been saved.","block-lab")),v(!0)})).catch((function(e){var t=e.message?e.message:Object(s.a)("There was an error validating the key.","block-lab");I(t),v(!1),x("")}));case 3:m(!1);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(r.createElement)(C,{isActive:n,isComplete:c},Object(r.createElement)(A,{index:a,isComplete:c}),Object(r.createElement)(N,{heading:Object(s.a)("Get Genesis Pro","block-lab"),isStepActive:n},Object(r.createElement)("p",null),Object(r.createElement)("div",{className:"pro-box"},Object(r.createElement)("h3",null,Object(s.a)("Migrating from Block Lab Pro","block-lab")),Object(r.createElement)("p",null,Object(s.a)("It looks like you’re a Block Lab Pro customer! Thank you so much for your support. We wouldn't be here without you! Rest assured, your Block Lab Pro license will continue to receive security updates and support for the duration of its term.","block-lab"),"*"),Object(r.createElement)("div",{className:"pro-box-tiles"},Object(r.createElement)("div",{className:"pro-box-tile"},Object(r.createElement)("div",{className:"pro-box-tile__icon"},Object(r.createElement)("svg",{width:"100%",height:"100%",viewBox:"0 0 91 75",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",xmlSpace:"preserve",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:2}},Object(r.createElement)("g",{id:"bl_genesis_icon"},Object(r.createElement)("path",{d:"M43.31,39.843c0.288,0.81 0.687,1.495 1.196,2.053c0.508,0.558 1.111,0.984 1.809,1.276c0.698,0.293 1.46,0.439 2.288,0.439c0.631,0 1.189,-0.055 1.675,-0.163c0.487,-0.108 0.945,-0.252 1.377,-0.432l0,-2.984l-1.944,0c-0.288,0 -0.513,-0.076 -0.675,-0.229c-0.162,-0.153 -0.243,-0.346 -0.243,-0.581l0,-2.512l6.994,0l0,8.306c-0.504,0.369 -1.028,0.686 -1.572,0.95c-0.545,0.267 -1.126,0.485 -1.742,0.656c-0.617,0.171 -1.275,0.297 -1.972,0.379c-0.698,0.081 -1.447,0.12 -2.249,0.12c-1.44,0 -2.772,-0.253 -3.997,-0.762c-1.224,-0.509 -2.284,-1.211 -3.179,-2.107c-0.896,-0.895 -1.599,-1.958 -2.107,-3.186c-0.509,-1.229 -0.763,-2.564 -0.763,-4.005c0,-1.466 0.243,-2.816 0.729,-4.045c0.486,-1.228 1.182,-2.288 2.087,-3.179c0.904,-0.892 1.998,-1.585 3.281,-2.079c1.283,-0.496 2.716,-0.744 4.3,-0.744c0.82,0 1.589,0.069 2.31,0.203c0.72,0.135 1.384,0.32 1.992,0.554c0.608,0.234 1.163,0.513 1.668,0.837c0.503,0.324 0.953,0.675 1.35,1.052l-1.324,2.013c-0.126,0.189 -0.276,0.338 -0.452,0.446c-0.175,0.108 -0.367,0.162 -0.574,0.162c-0.27,0 -0.549,-0.09 -0.837,-0.27c-0.36,-0.216 -0.7,-0.403 -1.019,-0.561c-0.32,-0.158 -0.647,-0.285 -0.98,-0.384c-0.333,-0.099 -0.684,-0.171 -1.053,-0.216c-0.369,-0.046 -0.783,-0.068 -1.243,-0.068c-0.855,0 -1.625,0.151 -2.308,0.453c-0.685,0.3 -1.267,0.727 -1.749,1.275c-0.483,0.55 -0.853,1.209 -1.115,1.978c-0.261,0.77 -0.391,1.628 -0.391,2.573c0,1.045 0.144,1.972 0.432,2.782Zm42.005,0.944c-0.658,1.855 -1.461,3.536 -2.437,4.951c0.979,-3.651 1.411,-7.51 1.208,-11.481c-1.438,-19.116 -17.393,-34.183 -36.878,-34.183c-12.247,0 -23.093,5.958 -29.826,15.127c-0.386,0.552 -0.769,1.11 -1.129,1.69c-2.23,3.589 -3.761,7.411 -4.65,11.311c-0.128,-3.334 0.369,-6.946 1.446,-10.724c-3.39,0.467 -6.246,1.301 -8.413,2.492c0.001,0 0.002,0.001 0.003,0.001c-1.918,1.056 -3.3,2.391 -4.03,4.003c-0.002,0.005 -0.005,0.01 -0.008,0.015c-0.103,0.231 -0.194,0.468 -0.271,0.71c-0.092,0.292 -0.163,0.59 -0.214,0.89c-0.015,0.089 -0.017,0.182 -0.029,0.272c-0.027,0.214 -0.055,0.427 -0.063,0.646c-0.002,0.102 0.007,0.208 0.008,0.311c0.001,0.21 0.001,0.419 0.021,0.632c0.01,0.104 0.032,0.209 0.045,0.313c0.029,0.217 0.057,0.434 0.103,0.655c0.02,0.099 0.053,0.201 0.077,0.301c0.056,0.228 0.113,0.457 0.187,0.688c0.03,0.093 0.069,0.188 0.102,0.281c0.085,0.242 0.173,0.485 0.277,0.73c0.036,0.084 0.08,0.17 0.118,0.254c0.117,0.258 0.237,0.515 0.375,0.775c0.039,0.074 0.084,0.15 0.125,0.224c0.149,0.273 0.306,0.547 0.478,0.821c0.04,0.064 0.084,0.128 0.124,0.191c0.186,0.289 0.379,0.578 0.588,0.87c0.038,0.052 0.079,0.105 0.117,0.157c0.223,0.305 0.455,0.609 0.702,0.914c0.034,0.042 0.069,0.082 0.103,0.124c0.26,0.318 0.532,0.637 0.82,0.957c0.027,0.03 0.056,0.061 0.083,0.091c0.301,0.332 0.613,0.664 0.941,0.996c0.02,0.021 0.04,0.041 0.06,0.06c0.339,0.344 0.692,0.687 1.061,1.031c0.012,0.011 0.025,0.023 0.037,0.034c0.378,0.352 0.77,0.704 1.178,1.057c0.004,0.005 0.01,0.008 0.016,0.014c0.414,0.358 0.843,0.715 1.286,1.073c0.001,0.001 0.001,0.002 0.002,0.003c0.447,0.359 0.909,0.717 1.384,1.076c7.15,5.394 17.488,10.59 29.489,14.386c2.195,0.695 4.369,1.315 6.515,1.87c-13.418,-1.826 -24.644,-4.124 -34.98,-10.802c4.203,15.814 18.606,27.468 35.742,27.468c12.033,0 22.719,-5.747 29.475,-14.642c6.999,-0.911 11.792,-3.35 13.03,-7.263c1.059,-3.348 -0.634,-7.309 -4.398,-11.37Z"})))),Object(r.createElement)("h4",null,Object(s.a)("12 months free","block-lab")),Object(r.createElement)("p",null,Object(s.a)("As part of the migration to Genesis Custom Blocks, we’d like to set you up with a free year of Genesis Pro. This new Genesis subscription will give you access to all the features you’ve loved in Block Lab Pro.","block-lab"))),Object(r.createElement)("div",{className:"pro-box-tile"},Object(r.createElement)("div",{className:"pro-box-tile__icon"},Object(r.createElement)("svg",{width:"100%",height:"100%",viewBox:"0 0 101 50",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",xmlSpace:"preserve",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:2}},Object(r.createElement)("g",{id:"bl_infinity_icon"},Object(r.createElement)("path",{d:"M50.017,16.489l8.579,-8.58c9.47,-9.47 24.848,-9.47 34.318,0c9.47,9.47 9.47,24.848 0,34.318c-9.47,9.47 -24.848,9.47 -34.318,0l-8.579,-8.58l-8.58,8.58c-9.47,9.47 -24.847,9.47 -34.318,0c-9.47,-9.47 -9.47,-24.848 0,-34.318c9.471,-9.47 24.848,-9.47 34.318,0l8.58,8.58Zm-17.159,0l8.579,8.579l-8.579,8.579c-4.735,4.736 -12.424,4.736 -17.159,0c-4.735,-4.735 -4.735,-12.423 0,-17.158c4.735,-4.736 12.424,-4.736 17.159,0Zm34.318,17.158l-8.58,-8.579l8.58,-8.579c4.735,-4.736 12.423,-4.736 17.158,0c4.736,4.735 4.736,12.423 0,17.158c-4.735,4.736 -12.423,4.736 -17.158,0Z"})))),Object(r.createElement)("h4",null,Object(s.a)("Unlimited Sites","block-lab")),Object(r.createElement)("p",null,Object(s.a)("All Genesis Pro subscriptions are valid on an unlimited number of installs, and come with additional access to the Genesis Framework, Genesis Themes, and Genesis Page Builder.","block-lab"))),Object(r.createElement)("div",{className:"pro-box-tile"},Object(r.createElement)("div",{className:"pro-box-tile__icon"},Object(r.createElement)("svg",{width:"100%",height:"100%",viewBox:"0 0 101 52",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",xmlSpace:"preserve",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:2}},Object(r.createElement)("g",{id:"bl_key_icon"},Object(r.createElement)("path",{d:"M51.602,31.449c-2.477,11.61 -12.8,20.327 -25.143,20.327c-14.188,0 -25.708,-11.519 -25.708,-25.708c0,-14.189 11.52,-25.708 25.708,-25.708c11.678,0 21.547,7.802 24.675,18.474l49.617,0l0,12.615l-8.995,0l0,15.615l-12.616,0l0,-15.615l-27.538,0Zm-25.143,-15.898c5.805,0 10.517,4.713 10.517,10.517c0,5.804 -4.712,10.517 -10.517,10.517c-5.804,0 -10.517,-4.713 -10.517,-10.517c0,-5.804 4.713,-10.517 10.517,-10.517Z"})))),Object(r.createElement)("h4",null,Object(s.a)("New Subscription Key","block-lab")),Object(r.createElement)("p",null,Object(s.a)("To migrate and maintain your Block Lab Pro feature set, you will need a Genesis Pro subscription key. Step number 1 below will walk you through setting up your account.","block-lab")))),Object(r.createElement)("p",null,Object(s.a)("* Block Lab Pro licenses will not be renewing and Pro updates / support will end when your current license expires.","block-lab"))),Object(r.createElement)("p",null,Object(s.a)("Since you're a Block Lab Pro customer, we've already emailed you regarding setting up a WP Engine account with a free Pro subscription.","block-lab")),Object(r.createElement)("p",null,Object(s.a)("To migrate and maintain your Block Lab Pro feature set with Genesis Custom Blocks, you will need your Genesis Pro subscription key.","block-lab")),Object(r.createElement)("ul",null,Object(r.createElement)("li",null,Object(s.a)("Already have got it? Enter the subscription key below to continue migrating.","block-lab")),Object(r.createElement)("li",null,Object(s.a)("Don’t have one yet? Please opt-in using the link below.","block-lab"))),!g&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"get-genesis-pro"},Object(r.createElement)("a",{href:"https://forms.gle/26u7NDRUp2A9i2aF8",className:"btn",target:"_blank",rel:"noopener noreferrer"},Object(s.a)("Opt-in for Genesis Pro","block-lab")),Object(r.createElement)("span",null,Object(s.a)("(This may take up to 3 working days)","block-lab"))),Object(r.createElement)("p",null,Object(s.a)("then","block-lab")),Object(r.createElement)("div",{className:"genesis-pro-form"},Object(r.createElement)("input",{type:"text",placeholder:Object(s.a)("Paste your Genesis Pro subscription key","block-lab"),value:w,onChange:function(e){x(e.target.value)}}),Object(r.createElement)("button",{onClick:M,disabled:b},Object(s.a)("Save","block-lab")),b&&Object(r.createElement)(O.Spinner,null))),Object(r.createElement)("p",{className:"pro-submission-message"},_),!g&&Object(r.createElement)("p",{className:"help-text"},Object(s.a)("Want to migrate but not set up Genesis Pro just now?","block-lab")," ",Object(r.createElement)("a",{href:"https://getblocklab.com/migrating-to-genesis-custom-blocks/",target:"_blank",rel:"noopener noreferrer","aria-label":Object(s.a)("More information about migrating but not setting up Genesis Pro","genesis-custom-blocks")},Object(s.a)("Read here for what that means.","block-lab"))),Object(r.createElement)(T,null,Object(r.createElement)(E,{checkboxLabel:L?null:Object(s.a)("Migrate without Genesis Pro.","block-lab"),onClick:t,stepIndex:a}))))},g=n(11),v=function(e){var t=e.goToNext,n=e.isStepActive,c=e.isStepComplete,a=e.stepIndex,o=Object(r.useState)(!1),l=i()(o,2),u=l[0],b=l[1],m=Object(r.useState)(!1),d=i()(m,2),j=d[0],v=d[1],k=Object(r.useState)(""),y=i()(k,2),w=y[0],x=y[1],S=Object(r.useState)(!1),P=i()(S,2),_=P[0],I=P[1],L=function(){var e=f()(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(g.speak)(Object(s.a)("The installation is now in progress","block-lab")),b(!0),v(!1),x(""),e.next=6,h()({path:"/block-lab/install-activate-gcb",method:"POST"}).then((function(){Object(g.speak)(Object(s.a)("Success! Genesis Custom Blocks is installed and activated.","block-lab")),I(!0)})).catch((function(e){Object(g.speak)(Object(s.a)("The installation and activation failed with the following error:","block-lab")),e.hasOwnProperty("message")&&(Object(g.speak)(e.message),x(e.message)),I(!1),v(!0)}));case 6:b(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(r.createElement)(C,{isActive:n,isComplete:c},Object(r.createElement)(A,{index:a,isComplete:c}),Object(r.createElement)(N,{heading:Object(s.a)("Install And Activate Genesis Custom Blocks","block-lab"),isStepActive:n},u&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(O.Spinner,null),Object(r.createElement)("p",null,Object(s.a)("Installing and activating Genesis Custom Blocks…","block-lab"))),!!w&&Object(r.createElement)("div",{className:"bl-migration__error"},Object(r.createElement)("p",null,Object(s.a)("The following error ocurred:","block-lab")),Object(r.createElement)("p",null,w)),!u&&!_&&Object(r.createElement)("button",{className:"btn",onClick:L},j?Object(s.a)("Try Again","block-lab"):Object(s.a)("Install and activate","block-lab")),_&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(s.a)("Success! Genesis Custom Blocks is installed and activated.","block-lab")),Object(r.createElement)(T,null,Object(r.createElement)(E,{onClick:t,stepIndex:a})))))},k=function(e){var t=e.isStepActive,n=e.isStepComplete,c=e.stepIndex,a=Object(r.useState)(0),o=i()(a,2),l=o[0],u=o[1],b=Object(r.useState)(!1),m=i()(b,2),d=m[0],j=m[1],v=Object(r.useState)(!1),k=i()(v,2),y=k[0],w=k[1],E=Object(r.useState)(""),x=i()(E,2),S=x[0],P=x[1],_=Object(r.useState)(!1),I=i()(_,2),L=I[0],M=I[1],B=[Object(s.a)("Migrating your blocks…","block-lab"),Object(s.a)("Migrating your post content…","block-lab")],F=function(){var e=f()(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h()({path:"/block-lab/migrate-post-type",method:"POST"}).then(f()(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(1),e.next=3,G();case 3:case"end":return e.stop()}}),e)})))).catch((function(e){e.hasOwnProperty("message")&&P(e.message),Object(g.speak)(Object(s.a)("The migration failed in the CPT migration","block-lab")),w(!0),j(!1)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){var e=f()(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"invalid_json",e.next=3,h()({path:"/block-lab/migrate-post-content",method:"POST"}).then((function(){Object(g.speak)(Object(s.a)("The migration was successful!","block-lab")),M(!0)})).catch(function(){var e=f()(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.hasOwnProperty("code")||"invalid_json"!==t.code){e.next=6;break}return e.next=3,G();case 3:return e.abrupt("return");case 6:t.hasOwnProperty("message")&&P(t.message);case 7:Object(g.speak)(Object(s.a)("The migration failed in the post content migration","block-lab")),w(!0);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=f()(p.a.mark((function e(){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Object(g.speak)(Object(s.a)("The migration is now in progress","block-lab")),P(""),j(!0),e.next=5,F();case 5:j(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(r.createElement)(C,{isActive:t,isComplete:n},Object(r.createElement)(A,{index:c,isComplete:n}),Object(r.createElement)(N,{heading:Object(s.a)("Migrate Your Blocks","block-lab"),isStepActive:t},!L&&Object(r.createElement)("p",null,Object(s.a)("Okay! Everything is ready. Let's do this. While the migration is underway, don't leave this page.","block-lab")),!!S&&Object(r.createElement)("div",{className:"bl-migration__error"},Object(r.createElement)("p",null,Object(s.a)("The following error ocurred:","block-lab")),Object(r.createElement)("p",null,S)),d&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)(O.Spinner,null),Object(r.createElement)("p",null,B[l])),!d&&!L&&Object(r.createElement)("button",{className:"btn",onClick:R},y?Object(s.a)("Try Again","block-lab"):Object(s.a)("Migrate Now","block-lab")),L&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(r.createElement)("span",{role:"img","aria-label":Object(s.a)("party emoji","block-lab")},"🎉")," ",Object(s.a)("The migration completed successfully! Time to say goodbye to Block Lab (it’s been fun!) and step into the FUTURE","block-lab")," ",Object(r.createElement)("span",{className:"message-future"},Object(s.a)("FUTURE","block-lab"))," ",Object(r.createElement)("sub",null,Object(s.a)("FUTURE","block-lab")),"."),Object(r.createElement)(T,null,Object(r.createElement)("a",{href:blockLabMigration.gcbUrl,className:"btn"},Object(s.a)("Go To Genesis Custom Blocks","block-lab"))))))},y=function(e){var t=e.isStepActive,n=e.isStepComplete,c=e.stepIndex,a=e.goToNext,o=e.goToPrevious;return Object(r.createElement)(C,{isActive:t,isComplete:n},Object(r.createElement)(A,{index:c,isComplete:n}),Object(r.createElement)(N,{heading:Object(s.a)("Update Hooks & API","block-lab"),isStepActive:t},Object(r.createElement)("p",null,Object(s.a)("In most cases, you won’t have to worry about this step. However, there are some instances that will require manual edits to your custom block related files. These are:","block-lab")),Object(r.createElement)("ul",{className:"list-disc list-inside mt-2"},Object(r.createElement)("li",null,Object(r.createElement)("b",null,Object(s.a)("Hooks","block-lab"))," - ",Object(s.a)("The Block Lab hook names have changed. If you’ve extended Block Lab with custom functionality using these, you’ll need to make some small changes.","block-lab")," ",Object(r.createElement)("a",{href:"https://developer.wpengine.com/genesis-custom-blocks/block-lab-hook-compatibility/",target:"_blank",rel:"noopener noreferrer","aria-label":Object(s.a)("More details on the hooks","genesis-custom-blocks")},Object(s.a)("More details here.","block-lab"))),Object(r.createElement)("li",null,Object(r.createElement)("b",null,Object(s.a)("API","block-lab"))," - ",Object(s.a)("If you use Block Lab’s PHP API or JSON API to register and configure your custom blocks, you’ll need to make some small changes.","block-lab")," ",Object(r.createElement)("a",{href:"https://developer.wpengine.com/genesis-custom-blocks/block-lab-php-api-compatibility/",target:"_blank",rel:"noopener noreferrer","aria-label":Object(s.a)("More details on the PHP API","genesis-custom-blocks")},Object(s.a)("More details here.","block-lab")))),Object(r.createElement)(T,null,Object(r.createElement)(x,{onClick:o}),Object(r.createElement)(E,{checkboxLabel:Object(s.a)("I'm all okay on the hooks and API front.","block-lab"),onClick:a,stepIndex:c}))))},w=function(){var e=Object(r.useState)(1),t=i()(e,2),n=t[0],c=t[1],a=function(){c(n-1)},l=function(){c(n+1)},s=[u,y,v,k];return blockLabMigration.isPro&&s.unshift(j),Object(r.createElement)("div",{className:"bl-migration__content-wrapper"},Object(r.createElement)("div",{className:"container bl-migration__content-container"},Object(r.createElement)(S,null),s.map((function(e,t){var c=1+t,i=n===c,s=n>c;return Object(r.createElement)(e,o()({key:"bl-migration-step-".concat(c)},{currentStepIndex:n,goToNext:l,goToPrevious:a,isStepActive:i,isStepComplete:s,stepIndex:c}))}))))},E=function(e){var t=e.onClick,n=e.checkboxLabel,c=e.stepIndex,a=Object(r.useState)(!1),o=i()(a,2),l=o[0],u=o[1];if(!n)return Object(r.createElement)("button",{className:"btn",onClick:t},Object(s.a)("Next Step","block-lab"));var b="bl-migration-check-".concat(c);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("form",null,Object(r.createElement)("input",{id:b,type:"checkbox",onClick:function(){u(!l)}}),Object(r.createElement)("label",{htmlFor:b,className:"ml-2 font-medium"},n)),Object(r.createElement)("button",{className:"btn",onClick:t,disabled:!l},Object(s.a)("Next Step","block-lab")))},x=function(e){var t=e.onClick;return Object(r.createElement)("button",{className:"btn btn-secondary",onClick:t},Object(s.a)("Previous","block-lab"))},S=function(){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",null,Object(r.createElement)("h1",null,Object(s.a)("Migrating to Genesis Custom Blocks","block-lab")),Object(r.createElement)("p",null,Object(s.a)("In April, the Block Lab team joined the Genesis team at WP Engine. With our full-time focus, we’re very excited about the future of custom block tooling in WordPress. You can read more about that moment in this","block-lab")," ",Object(r.createElement)("a",{target:"_blank",rel:"noopener noreferrer",className:"text-purple-600 underline hover:text-purple-700",href:"https://getblocklab.com/the-block-lab-team-are-joining-wp-engine/"},Object(s.a)("announcement post","block-lab"),".")),Object(r.createElement)("p",null,Object(s.a)("As part of this move, we have been working on a new plugin that is based on what we developed at Block Lab.","block-lab")," ",Object(s.a)("Genesis Custom Blocks is now the home of all our custom block efforts and what we have planned is very very cool!","block-lab")," ",Object(s.a)("Version 1.0 of this plugin is now released and has full feature parity with Block Lab.","block-lab")),Object(r.createElement)("p",null,Object(s.a)("To continue receiving the best of what our team is building, we encourage you to migrate over. Our migration tool makes this nice and easy, and for the majority of use cases, completely automated.","block-lab")),Object(r.createElement)("div",{className:"dev-notice"},Object(r.createElement)("svg",{fill:"currentColor",viewBox:"0 0 20 20"},Object(r.createElement)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})),Object(r.createElement)("span",null,Object(s.a)("Need to let the developer for this site know about this? Send them this link.","block-lab")),Object(r.createElement)("a",{href:"https://getblocklab.com/migrating-to-genesis-custom-blocks/",target:"_blank",rel:"noopener noreferrer",className:"btn"},Object(r.createElement)("span",null,Object(s.a)("Developer Notice","block-lab")),Object(r.createElement)("svg",{fill:"currentColor",viewBox:"0 0 20 20"},Object(r.createElement)("path",{d:"M11 3a1 1 0 100 2h3.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"}),Object(r.createElement)("path",{d:"M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"}))))),Object(r.createElement)("h2",null,Object(s.a)("Let's Migrate","block-lab")))},P=n(7),_=n.n(P),C=function(e){var t=e.isActive,n=e.isComplete,c=e.children;return Object(r.createElement)("div",{className:_()("step",{"step--active":t,"step--complete":n})},c)},N=function(e){var t=e.children,n=e.heading,c=e.isStepActive;return Object(r.createElement)("div",{className:"step-content"},Object(r.createElement)("h3",null,n),c&&t)},T=function(e){var t=e.children;return Object(r.createElement)("div",{className:"step-footer"},t)},A=function(e){var t=e.index,n=e.isComplete,c="bl-migration-icon-".concat(t),a=Object(r.createElement)("svg",{fill:"currentColor",viewBox:"0 0 20 20","aria-labelledby":c},Object(r.createElement)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"}),Object(r.createElement)("title",{id:c},Object(s.a)("Step completed","block-lab")));return Object(r.createElement)("div",{className:"step-icon"},n?a:t)};c=function(){Object(r.render)(Object(r.createElement)(w,null),document.querySelector(".bl-migration__content"))},"complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",c):c()}]);