Duplicator – WordPress Migration Plugin - Version 1.1.28

Version Description

Download this release

Release Info

Developer cory@lamle.org
Plugin Icon 128x128 Duplicator – WordPress Migration Plugin
Version 1.1.28
Comparing to
See all releases

Code changes from version 1.1.26 to 1.1.28

assets/css/style.css CHANGED
@@ -1,7 +1,6 @@
1
  /* ================================================
2
  * DUPLICATOR STYLE
3
  * Common elements shared across the duplicator plugin
4
- * Copyright:snapcreek.com 2011-2014
5
  * ================================================ */
6
 
7
  /*Global Elements*/
@@ -19,34 +18,30 @@ ul.category-tabs li {cursor: pointer}
19
 
20
  /*BOXES: Expandable sections */
21
  div.dup-box {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
22
- div.dup-box-title {font-size: 16px; padding: 10px 0 0 10px; font-weight: bold; cursor: pointer; height:27px; margin:0px; }
23
  div.dup-box-title:hover {background-color: #FCFCFC;}
24
  div.dup-box-arrow {text-decoration:none!important; float:right; width:27px; height:30px; font-size:16px; cursor:pointer; padding:1px 0 0 0; white-space: nowrap}
25
  div.dup-box-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
26
 
27
  /*PANELS: Boxes that do not exapand */
28
  div.dup-panel {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
29
- div.dup-panel-title {font-size: 14px; padding: 10px 0 0 15px; font-weight: 600; height:28px; margin:0px; }
30
  div.dup-panel-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
31
 
32
  /*PANELS: Fancy */
33
  div.dup-box-fancy {border-radius: 4px; border:1px solid #E1E1E1; margin: 1px 0 1px 0}
34
- div.dup-box-title-fancy {
35
- padding:5px 2px 5px 8px; height:18px;
36
- background: #eeeeee;
37
- background: linear-gradient(to bottom, #eeeeee 0%,#e0e0e0 100%);
38
- }
39
 
40
  /*INFO-BOX:Simple box with no title */
41
  div.dup-info-box {padding:8px; border:1px solid #ccc; border-radius:4px; background-color:#F7FCFE; margin:0px 0px 5px 20px; line-height:16px}
42
  div.dup-info-box small {margin-top:10px; display:block}
43
 
44
  /*PACKAGE:Progress Boxes */
45
- div#dup-progress-bar-area {width:500px; margin:40px auto 0px auto; padding:25px 50px 35px 50px; border:1px solid #ccc; box-shadow:0 8px 6px -6px #999; text-align:center; border-radius:4px;}
46
  div#dup-progress-bar-area h2 {margin-bottom:15px}
47
 
48
  /*HEADER MESSAGES*/
49
- div.dup-hdr-success {color:#196512; font-size:20px; font-weight:bold}
50
  div.dup-hdr-error {color:#A62426; font-size:20px; font-weight:bold}
51
 
52
 
@@ -59,5 +54,3 @@ input.parsley-error, textarea.parsley-error {
59
  }
60
  div.qtip-content {line-height:16px}
61
  ul.parsley-error-list {margin:1px 0px -7px 0px}
62
-
63
-
1
  /* ================================================
2
  * DUPLICATOR STYLE
3
  * Common elements shared across the duplicator plugin
 
4
  * ================================================ */
5
 
6
  /*Global Elements*/
18
 
19
  /*BOXES: Expandable sections */
20
  div.dup-box {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
21
+ div.dup-box-title {font-size: 16px; padding: 10px 0 0 10px; font-weight: bold; cursor: pointer; height:27px; margin:0px; color:#000 }
22
  div.dup-box-title:hover {background-color: #FCFCFC;}
23
  div.dup-box-arrow {text-decoration:none!important; float:right; width:27px; height:30px; font-size:16px; cursor:pointer; padding:1px 0 0 0; white-space: nowrap}
24
  div.dup-box-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
25
 
26
  /*PANELS: Boxes that do not exapand */
27
  div.dup-panel {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
28
+ div.dup-panel-title {font-size: 14px; padding: 10px 0 0 15px; font-weight: 600; height:28px; margin:0px; color:#000; }
29
  div.dup-panel-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
30
 
31
  /*PANELS: Fancy */
32
  div.dup-box-fancy {border-radius: 4px; border:1px solid #E1E1E1; margin: 1px 0 1px 0}
33
+ div.dup-box-title-fancy {padding:5px 2px 5px 8px; height:18px; background: #eeeeee; background: linear-gradient(to bottom, #eeeeee 0%,#e0e0e0 100%);}
 
 
 
 
34
 
35
  /*INFO-BOX:Simple box with no title */
36
  div.dup-info-box {padding:8px; border:1px solid #ccc; border-radius:4px; background-color:#F7FCFE; margin:0px 0px 5px 20px; line-height:16px}
37
  div.dup-info-box small {margin-top:10px; display:block}
38
 
39
  /*PACKAGE:Progress Boxes */
40
+ div#dup-progress-bar-area {width:500px; margin:40px auto 0px auto; padding:25px 50px 35px 50px; border:1px solid #ccc; box-shadow:0 8px 6px -6px #999; text-align:center; border-radius:4px; color:#000;}
41
  div#dup-progress-bar-area h2 {margin-bottom:15px}
42
 
43
  /*HEADER MESSAGES*/
44
+ div.dup-hdr-success {color:green; font-size:20px; font-weight:bold}
45
  div.dup-hdr-error {color:#A62426; font-size:20px; font-weight:bold}
46
 
47
 
54
  }
55
  div.qtip-content {line-height:16px}
56
  ul.parsley-error-list {margin:1px 0px -7px 0px}
 
 
assets/js/handlebars.min.js ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**!
2
+
3
+ @license
4
+ handlebars v4.0.6
5
+
6
+ Copyright (C) 2011-2016 by Yehuda Katz
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+
26
+ */
27
+ !function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.Handlebars=b():a.Handlebars=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(){var a=r();return a.compile=function(b,c){return k.compile(b,c,a)},a.precompile=function(b,c){return k.precompile(b,c,a)},a.AST=i["default"],a.Compiler=k.Compiler,a.JavaScriptCompiler=m["default"],a.Parser=j.parser,a.parse=j.parse,a}var e=c(1)["default"];b.__esModule=!0;var f=c(2),g=e(f),h=c(24),i=e(h),j=c(25),k=c(30),l=c(31),m=e(l),n=c(28),o=e(n),p=c(23),q=e(p),r=g["default"].create,s=d();s.create=d,q["default"](s),s.Visitor=o["default"],s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){return a&&a.__esModule?a:{"default":a}},b.__esModule=!0},function(a,b,c){"use strict";function d(){var a=new h.HandlebarsEnvironment;return n.extend(a,h),a.SafeString=j["default"],a.Exception=l["default"],a.Utils=n,a.escapeExpression=n.escapeExpression,a.VM=p,a.template=function(b){return p.template(b,a)},a}var e=c(3)["default"],f=c(1)["default"];b.__esModule=!0;var g=c(4),h=e(g),i=c(21),j=f(i),k=c(6),l=f(k),m=c(5),n=e(m),o=c(22),p=e(o),q=c(23),r=f(q),s=d();s.create=d,r["default"](s),s["default"]=s,b["default"]=s,a.exports=b["default"]},function(a,b){"use strict";b["default"]=function(a){if(a&&a.__esModule)return a;var b={};if(null!=a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b[c]=a[c]);return b["default"]=a,b},b.__esModule=!0},function(a,b,c){"use strict";function d(a,b,c){this.helpers=a||{},this.partials=b||{},this.decorators=c||{},i.registerDefaultHelpers(this),j.registerDefaultDecorators(this)}var e=c(1)["default"];b.__esModule=!0,b.HandlebarsEnvironment=d;var f=c(5),g=c(6),h=e(g),i=c(10),j=c(18),k=c(20),l=e(k),m="4.0.5";b.VERSION=m;var n=7;b.COMPILER_REVISION=n;var o={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0"};b.REVISION_CHANGES=o;var p="[object Object]";d.prototype={constructor:d,logger:l["default"],log:l["default"].log,registerHelper:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(f.toString.call(a)===p)f.extend(this.partials,a);else{if("undefined"==typeof b)throw new h["default"]('Attempting to register a partial called "'+a+'" as undefined');this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]},registerDecorator:function(a,b){if(f.toString.call(a)===p){if(b)throw new h["default"]("Arg not supported with multiple decorators");f.extend(this.decorators,a)}else this.decorators[a]=b},unregisterDecorator:function(a){delete this.decorators[a]}};var q=l["default"].log;b.log=q,b.createFrame=f.createFrame,b.logger=l["default"]},function(a,b){"use strict";function c(a){return k[a]}function d(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function e(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1}function f(a){if("string"!=typeof a){if(a&&a.toHTML)return a.toHTML();if(null==a)return"";if(!a)return a+"";a=""+a}return m.test(a)?a.replace(l,c):a}function g(a){return!a&&0!==a||!(!p(a)||0!==a.length)}function h(a){var b=d({},a);return b._parent=a,b}function i(a,b){return a.path=b,a}function j(a,b){return(a?a+".":"")+b}b.__esModule=!0,b.extend=d,b.indexOf=e,b.escapeExpression=f,b.isEmpty=g,b.createFrame=h,b.blockParams=i,b.appendContextPath=j;var k={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},l=/[&<>"'`=]/g,m=/[&<>"'`=]/,n=Object.prototype.toString;b.toString=n;var o=function(a){return"function"==typeof a};o(/x/)&&(b.isFunction=o=function(a){return"function"==typeof a&&"[object Function]"===n.call(a)}),b.isFunction=o;var p=Array.isArray||function(a){return!(!a||"object"!=typeof a)&&"[object Array]"===n.call(a)};b.isArray=p},function(a,b,c){"use strict";function d(a,b){var c=b&&b.loc,g=void 0,h=void 0;c&&(g=c.start.line,h=c.start.column,a+=" - "+g+":"+h);for(var i=Error.prototype.constructor.call(this,a),j=0;j<f.length;j++)this[f[j]]=i[f[j]];Error.captureStackTrace&&Error.captureStackTrace(this,d);try{c&&(this.lineNumber=g,e?Object.defineProperty(this,"column",{value:h}):this.column=h)}catch(k){}}var e=c(7)["default"];b.__esModule=!0;var f=["description","fileName","lineNumber","message","name","number","stack"];d.prototype=new Error,b["default"]=d,a.exports=b["default"]},function(a,b,c){a.exports={"default":c(8),__esModule:!0}},function(a,b,c){var d=c(9);a.exports=function(a,b,c){return d.setDesc(a,b,c)}},function(a,b){var c=Object;a.exports={create:c.create,getProto:c.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:c.getOwnPropertyDescriptor,setDesc:c.defineProperty,setDescs:c.defineProperties,getKeys:c.keys,getNames:c.getOwnPropertyNames,getSymbols:c.getOwnPropertySymbols,each:[].forEach}},function(a,b,c){"use strict";function d(a){g["default"](a),i["default"](a),k["default"](a),m["default"](a),o["default"](a),q["default"](a),s["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultHelpers=d;var f=c(11),g=e(f),h=c(12),i=e(h),j=c(13),k=e(j),l=c(14),m=e(l),n=c(15),o=e(n),p=c(16),q=e(p),r=c(17),s=e(r)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse,f=c.fn;if(b===!0)return f(this);if(b===!1||null==b)return e(this);if(d.isArray(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):e(this);if(c.data&&c.ids){var g=d.createFrame(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name),c={data:g}}return f(b,c)})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(5),f=c(6),g=d(f);b["default"]=function(a){a.registerHelper("each",function(a,b){function c(b,c,f){j&&(j.key=b,j.index=c,j.first=0===c,j.last=!!f,k&&(j.contextPath=k+b)),i+=d(a[b],{data:j,blockParams:e.blockParams([a[b],b],[k+b,null])})}if(!b)throw new g["default"]("Must pass iterator to #each");var d=b.fn,f=b.inverse,h=0,i="",j=void 0,k=void 0;if(b.data&&b.ids&&(k=e.appendContextPath(b.data.contextPath,b.ids[0])+"."),e.isFunction(a)&&(a=a.call(this)),b.data&&(j=e.createFrame(b.data)),a&&"object"==typeof a)if(e.isArray(a))for(var l=a.length;h<l;h++)h in a&&c(h,h,h===a.length-1);else{var m=void 0;for(var n in a)a.hasOwnProperty(n)&&(void 0!==m&&c(m,h-1),m=n,h++);void 0!==m&&c(m,h-1,!0)}return 0===h&&(i=f(this)),i})},a.exports=b["default"]},function(a,b,c){"use strict";var d=c(1)["default"];b.__esModule=!0;var e=c(6),f=d(e);b["default"]=function(a){a.registerHelper("helperMissing",function(){if(1!==arguments.length)throw new f["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("if",function(a,b){return d.isFunction(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||d.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("log",function(){for(var b=[void 0],c=arguments[arguments.length-1],d=0;d<arguments.length-1;d++)b.push(arguments[d]);var e=1;null!=c.hash.level?e=c.hash.level:c.data&&null!=c.data.level&&(e=c.data.level),b[0]=e,a.log.apply(a,b)})},a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,b["default"]=function(a){a.registerHelper("lookup",function(a,b){return a&&a[b]})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerHelper("with",function(a,b){d.isFunction(a)&&(a=a.call(this));var c=b.fn;if(d.isEmpty(a))return b.inverse(this);var e=b.data;return b.data&&b.ids&&(e=d.createFrame(b.data),e.contextPath=d.appendContextPath(b.data.contextPath,b.ids[0])),c(a,{data:e,blockParams:d.blockParams([a],[e&&e.contextPath])})})},a.exports=b["default"]},function(a,b,c){"use strict";function d(a){g["default"](a)}var e=c(1)["default"];b.__esModule=!0,b.registerDefaultDecorators=d;var f=c(19),g=e(f)},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5);b["default"]=function(a){a.registerDecorator("inline",function(a,b,c,e){var f=a;return b.partials||(b.partials={},f=function(e,f){var g=c.partials;c.partials=d.extend({},g,b.partials);var h=a(e,f);return c.partials=g,h}),b.partials[e.args[0]]=e.fn,f})},a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0;var d=c(5),e={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(a){if("string"==typeof a){var b=d.indexOf(e.methodMap,a.toLowerCase());a=b>=0?b:parseInt(a,10)}return a},log:function(a){if(a=e.lookupLevel(a),"undefined"!=typeof console&&e.lookupLevel(e.level)<=a){var b=e.methodMap[a];console[b]||(b="log");for(var c=arguments.length,d=Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];console[b].apply(console,d)}}};b["default"]=e,a.exports=b["default"]},function(a,b){"use strict";function c(a){this.string=a}b.__esModule=!0,c.prototype.toString=c.prototype.toHTML=function(){return""+this.string},b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=r.COMPILER_REVISION;if(b!==c){if(b<c){var d=r.REVISION_CHANGES[c],e=r.REVISION_CHANGES[b];throw new q["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new q["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){function c(c,d,e){e.hash&&(d=o.extend({},d,e.hash),e.ids&&(e.ids[0]=!0)),c=b.VM.resolvePartial.call(this,c,d,e);var f=b.VM.invokePartial.call(this,c,d,e);if(null==f&&b.compile&&(e.partials[e.name]=b.compile(c,a.compilerOptions,b),f=e.partials[e.name](d,e)),null!=f){if(e.indent){for(var g=f.split("\n"),h=0,i=g.length;h<i&&(g[h]||h+1!==i);h++)g[h]=e.indent+g[h];f=g.join("\n")}return f}throw new q["default"]("The partial "+e.name+" could not be compiled when running in runtime-only mode")}function d(b){function c(b){return""+a.main(e,b,e.helpers,e.partials,g,i,h)}var f=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],g=f.data;d._setup(f),!f.partial&&a.useData&&(g=j(b,g));var h=void 0,i=a.useBlockParams?[]:void 0;return a.useDepths&&(h=f.depths?b!=f.depths[0]?[b].concat(f.depths):f.depths:[b]),(c=k(a.main,c,e,f.depths||[],g,i))(b,f)}if(!b)throw new q["default"]("No environment passed to template");if(!a||!a.main)throw new q["default"]("Unknown template object: "+typeof a);a.main.decorator=a.main_d,b.VM.checkRevision(a.compiler);var e={strict:function(a,b){if(!(b in a))throw new q["default"]('"'+b+'" not defined in '+a);return a[b]},lookup:function(a,b){for(var c=a.length,d=0;d<c;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:o.escapeExpression,invokePartial:c,fn:function(b){var c=a[b];return c.decorator=a[b+"_d"],c},programs:[],program:function(a,b,c,d,e){var g=this.programs[a],h=this.fn(a);return b||e||d||c?g=f(this,a,h,b,c,d,e):g||(g=this.programs[a]=f(this,a,h)),g},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=o.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler};return d.isTop=!0,d._setup=function(c){c.partial?(e.helpers=c.helpers,e.partials=c.partials,e.decorators=c.decorators):(e.helpers=e.merge(c.helpers,b.helpers),a.usePartial&&(e.partials=e.merge(c.partials,b.partials)),(a.usePartial||a.useDecorators)&&(e.decorators=e.merge(c.decorators,b.decorators)))},d._child=function(b,c,d,g){if(a.useBlockParams&&!d)throw new q["default"]("must pass block params");if(a.useDepths&&!g)throw new q["default"]("must pass parent depths");return f(e,b,a[b],c,0,d,g)},d}function f(a,b,c,d,e,f,g){function h(b){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],h=g;return g&&b!=g[0]&&(h=[b].concat(g)),c(a,b,a.helpers,a.partials,e.data||d,f&&[e.blockParams].concat(f),h)}return h=k(c,h,a,g,d,f),h.program=b,h.depth=g?g.length:0,h.blockParams=e||0,h}function g(a,b,c){if(a)a.call||c.name||(c.name=a,a=c.partials[a]);else if("@partial-block"===c.name){for(var d=c.data;d["partial-block"]===i;)d=d._parent;a=d["partial-block"],d["partial-block"]=i}else a=c.partials[c.name];return a}function h(a,b,c){c.partial=!0,c.ids&&(c.data.contextPath=c.ids[0]||c.data.contextPath);var d=void 0;if(c.fn&&c.fn!==i&&(c.data=r.createFrame(c.data),d=c.data["partial-block"]=c.fn,d.partials&&(c.partials=o.extend({},c.partials,d.partials))),void 0===a&&d&&(a=d),void 0===a)throw new q["default"]("The partial "+c.name+" could not be found");if(a instanceof Function)return a(b,c)}function i(){return""}function j(a,b){return b&&"root"in b||(b=b?r.createFrame(b):{},b.root=a),b}function k(a,b,c,d,e,f){if(a.decorator){var g={};b=a.decorator(b,g,c,d&&d[0],e,f,d),o.extend(b,g)}return b}var l=c(3)["default"],m=c(1)["default"];b.__esModule=!0,b.checkRevision=d,b.template=e,b.wrapProgram=f,b.resolvePartial=g,b.invokePartial=h,b.noop=i;var n=c(5),o=l(n),p=c(6),q=m(p),r=c(4)},function(a,b){(function(c){"use strict";b.__esModule=!0,b["default"]=function(a){var b="undefined"!=typeof c?c:window,d=b.Handlebars;a.noConflict=function(){return b.Handlebars===a&&(b.Handlebars=d),a}},a.exports=b["default"]}).call(b,function(){return this}())},function(a,b){"use strict";b.__esModule=!0;var c={helpers:{helperExpression:function(a){return"SubExpression"===a.type||("MustacheStatement"===a.type||"BlockStatement"===a.type)&&!!(a.params&&a.params.length||a.hash)},scopedId:function(a){return/^\.|this\b/.test(a.original)},simpleId:function(a){return 1===a.parts.length&&!c.helpers.scopedId(a)&&!a.depth}}};b["default"]=c,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if("Program"===a.type)return a;h["default"].yy=n,n.locInfo=function(a){return new n.SourceLocation(b&&b.srcName,a)};var c=new j["default"](b);return c.accept(h["default"].parse(a))}var e=c(1)["default"],f=c(3)["default"];b.__esModule=!0,b.parse=d;var g=c(26),h=e(g),i=c(27),j=e(i),k=c(29),l=f(k),m=c(5);b.parser=h["default"];var n={};m.extend(n,l)},function(a,b){"use strict";var c=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition_plus0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,1],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return f[h-1];case 2:this.$=d.prepareProgram(f[h]);break;case 3:this.$=f[h];break;case 4:this.$=f[h];break;case 5:this.$=f[h];break;case 6:this.$=f[h];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$={type:"CommentStatement",value:d.stripComment(f[h]),strip:d.stripFlags(f[h],f[h]),loc:d.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:f[h],value:f[h],loc:d.locInfo(this._$)};break;case 11:this.$=d.prepareRawBlock(f[h-2],f[h-1],f[h],this._$);break;case 12:this.$={path:f[h-3],params:f[h-2],hash:f[h-1]};break;case 13:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!1,this._$);break;case 14:this.$=d.prepareBlock(f[h-3],f[h-2],f[h-1],f[h],!0,this._$);break;case 15:this.$={open:f[h-5],path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 16:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 17:this.$={path:f[h-4],params:f[h-3],hash:f[h-2],blockParams:f[h-1],strip:d.stripFlags(f[h-5],f[h])};break;case 18:this.$={strip:d.stripFlags(f[h-1],f[h-1]),program:f[h]};break;case 19:var i=d.prepareBlock(f[h-2],f[h-1],f[h],f[h],!1,this._$),j=d.prepareProgram([i],f[h-1].loc);j.chained=!0,this.$={strip:f[h-2].strip,program:j,chain:!0};break;case 20:this.$=f[h];break;case 21:this.$={path:f[h-1],strip:d.stripFlags(f[h-2],f[h])};break;case 22:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 23:this.$=d.prepareMustache(f[h-3],f[h-2],f[h-1],f[h-4],d.stripFlags(f[h-4],f[h]),this._$);break;case 24:this.$={type:"PartialStatement",name:f[h-3],params:f[h-2],hash:f[h-1],indent:"",strip:d.stripFlags(f[h-4],f[h]),loc:d.locInfo(this._$)};break;case 25:this.$=d.preparePartialBlock(f[h-2],f[h-1],f[h],this._$);break;case 26:this.$={path:f[h-3],params:f[h-2],hash:f[h-1],strip:d.stripFlags(f[h-4],f[h])};break;case 27:this.$=f[h];break;case 28:this.$=f[h];break;case 29:this.$={type:"SubExpression",path:f[h-3],params:f[h-2],hash:f[h-1],loc:d.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:f[h],loc:d.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:d.id(f[h-2]),value:f[h],loc:d.locInfo(this._$)};break;case 32:this.$=d.id(f[h-1]);break;case 33:this.$=f[h];break;case 34:this.$=f[h];break;case 35:this.$={type:"StringLiteral",value:f[h],original:f[h],loc:d.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(f[h]),original:Number(f[h]),loc:d.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:"true"===f[h],original:"true"===f[h],loc:d.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:d.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:d.locInfo(this._$)};break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=d.preparePath(!0,f[h],this._$);break;case 43:this.$=d.preparePath(!1,f[h],this._$);break;case 44:f[h-2].push({part:d.id(f[h]),original:f[h],separator:f[h-1]}),this.$=f[h-2];break;case 45:this.$=[{part:d.id(f[h]),original:f[h]}];break;case 46:this.$=[];break;case 47:f[h-1].push(f[h]);break;case 48:this.$=[f[h]];break;case 49:f[h-1].push(f[h]);break;case 50:this.$=[];break;case 51:f[h-1].push(f[h]);break;case 58:this.$=[];break;case 59:f[h-1].push(f[h]);break;case 64:this.$=[];break;case 65:f[h-1].push(f[h]);break;case 70:this.$=[];break;case 71:f[h-1].push(f[h]);break;case 78:this.$=[];break;case 79:f[h-1].push(f[h]);break;case 82:this.$=[];break;case 83:f[h-1].push(f[h]);break;case 86:this.$=[];break;case 87:f[h-1].push(f[h]);break;case 90:this.$=[];break;case 91:f[h-1].push(f[h]);break;case 94:this.$=[];break;case 95:f[h-1].push(f[h]);break;case 98:this.$=[f[h]];break;case 99:f[h-1].push(f[h]);break;case 100:this.$=[f[h]];break;case 101:f[h-1].push(f[h])}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{13:40,15:[1,20],17:39},{20:42,56:41,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:45,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:48,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:42,56:49,64:43,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:50,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,51]},{72:[1,35],86:52},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:53,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:54,38:56,39:[1,58],43:57,44:[1,59],45:55,47:[2,54]},{28:60,43:61,44:[1,59],47:[2,56]},{13:63,15:[1,20],18:[1,62]},{15:[2,48],18:[2,48]},{33:[2,86],57:64,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:65,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:66,47:[1,67]},{30:68,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:69,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:70,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:71,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:75,33:[2,80],50:72,63:73,64:76,65:[1,44],69:74,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,80]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,51]},{20:75,53:81,54:[2,84],63:82,64:76,65:[1,44],69:83,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:84,47:[1,67]},{47:[2,55]},{4:85,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:86,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:87,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:88,47:[1,67]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:75,33:[2,88],58:89,63:90,64:76,65:[1,44],69:91,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:92,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:93,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,31:94,33:[2,60],63:95,64:76,65:[1,44],69:96,70:77,71:78,72:[1,79],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,66],36:97,63:98,64:76,65:[1,44],69:99,70:77,71:78,72:[1,79],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,22:100,23:[2,52],63:101,64:76,65:[1,44],69:102,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:75,33:[2,92],62:103,63:104,64:76,65:[1,44],69:105,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,106]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:107,72:[1,108],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,109],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,110]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:56,39:[1,58],43:57,44:[1,59],45:112,46:111,47:[2,76]},{33:[2,70],40:113,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,114]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:75,63:116,64:76,65:[1,44],67:115,68:[2,96],69:117,70:77,71:78,72:[1,79],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,118]},{32:119,33:[2,62],74:120,75:[1,121]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:122,74:123,75:[1,121]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,124]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,125]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,109]},{20:75,63:126,64:76,65:[1,44],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:75,33:[2,72],41:127,63:128,64:76,65:[1,44],69:129,70:77,71:78,72:[1,79],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,130]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,131]},{33:[2,63]},{72:[1,133],76:132},{33:[1,134]},{33:[2,69]},{15:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],
28
+ 60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:135,74:136,75:[1,121]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,138],77:[1,137]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,139]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],55:[2,55],57:[2,20],61:[2,57],74:[2,81],83:[2,85],87:[2,18],91:[2,89],102:[2,53],105:[2,93],111:[2,19],112:[2,77],117:[2,97],120:[2,63],123:[2,69],124:[2,12],136:[2,75],137:[2,32]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:(null!==n&&"undefined"!=typeof n||(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),"raw"===this.conditionStack[this.conditionStack.length-1]?15:(b.yytext=b.yytext.substr(5,b.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(b.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return b.yytext=e(1,2).replace(/\\"/g,'"'),80;case 32:return b.yytext=e(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return b.yytext=b.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();b.__esModule=!0,b["default"]=c},function(a,b,c){"use strict";function d(){var a=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.options=a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"ContentStatement"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"ContentStatement"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"ContentStatement"===d.type&&(c||!d.rightStripped)){var e=d.value;d.value=d.value.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"ContentStatement"===d.type&&(c||!d.leftStripped)){var e=d.value;return d.value=d.value.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==e,d.leftStripped}}var i=c(1)["default"];b.__esModule=!0;var j=c(28),k=i(j);d.prototype=new k["default"],d.prototype.Program=function(a){var b=!this.options.ignoreStandalone,c=!this.isRootSeen;this.isRootSeen=!0;for(var d=a.body,i=0,j=d.length;i<j;i++){var k=d[i],l=this.accept(k);if(l){var m=e(d,i,c),n=f(d,i,c),o=l.openStandalone&&m,p=l.closeStandalone&&n,q=l.inlineStandalone&&m&&n;l.close&&g(d,i,!0),l.open&&h(d,i,!0),b&&q&&(g(d,i),h(d,i)&&"PartialStatement"===k.type&&(k.indent=/([ \t]+$)/.exec(d[i-1].original)[1])),b&&o&&(g((k.program||k.inverse).body),h(d,i)),b&&p&&(g(d,i),h((k.inverse||k.program).body))}}return a},d.prototype.BlockStatement=d.prototype.DecoratorBlock=d.prototype.PartialBlockStatement=function(a){this.accept(a.program),this.accept(a.inverse);var b=a.program||a.inverse,c=a.program&&a.inverse,d=c,i=c;if(c&&c.chained)for(d=c.body[0].program;i.chained;)i=i.body[i.body.length-1].program;var j={open:a.openStrip.open,close:a.closeStrip.close,openStandalone:f(b.body),closeStandalone:e((d||b).body)};if(a.openStrip.close&&g(b.body,null,!0),c){var k=a.inverseStrip;k.open&&h(b.body,null,!0),k.close&&g(d.body,null,!0),a.closeStrip.open&&h(i.body,null,!0),!this.options.ignoreStandalone&&e(b.body)&&f(d.body)&&(h(b.body),g(d.body))}else a.closeStrip.open&&h(b.body,null,!0);return j},d.prototype.Decorator=d.prototype.MustacheStatement=function(a){return a.strip},d.prototype.PartialStatement=d.prototype.CommentStatement=function(a){var b=a.strip||{};return{inlineStandalone:!0,open:b.open,close:b.close}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(){this.parents=[]}function e(a){this.acceptRequired(a,"path"),this.acceptArray(a.params),this.acceptKey(a,"hash")}function f(a){e.call(this,a),this.acceptKey(a,"program"),this.acceptKey(a,"inverse")}function g(a){this.acceptRequired(a,"name"),this.acceptArray(a.params),this.acceptKey(a,"hash")}var h=c(1)["default"];b.__esModule=!0;var i=c(6),j=h(i);d.prototype={constructor:d,mutating:!1,acceptKey:function(a,b){var c=this.accept(a[b]);if(this.mutating){if(c&&!d.prototype[c.type])throw new j["default"]('Unexpected node type "'+c.type+'" found when accepting '+b+" on "+a.type);a[b]=c}},acceptRequired:function(a,b){if(this.acceptKey(a,b),!a[b])throw new j["default"](a.type+" requires "+b)},acceptArray:function(a){for(var b=0,c=a.length;b<c;b++)this.acceptKey(a,b),a[b]||(a.splice(b,1),b--,c--)},accept:function(a){if(a){if(!this[a.type])throw new j["default"]("Unknown type: "+a.type,a);this.current&&this.parents.unshift(this.current),this.current=a;var b=this[a.type](a);return this.current=this.parents.shift(),!this.mutating||b?b:b!==!1?a:void 0}},Program:function(a){this.acceptArray(a.body)},MustacheStatement:e,Decorator:e,BlockStatement:f,DecoratorBlock:f,PartialStatement:g,PartialBlockStatement:function(a){g.call(this,a),this.acceptKey(a,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:e,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(a){this.acceptArray(a.pairs)},HashPair:function(a){this.acceptRequired(a,"value")}},b["default"]=d,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b){if(b=b.path?b.path.original:b,a.path.original!==b){var c={loc:a.path.loc};throw new q["default"](a.path.original+" doesn't match "+b,c)}}function e(a,b){this.source=a,this.start={line:b.first_line,column:b.first_column},this.end={line:b.last_line,column:b.last_column}}function f(a){return/^\[.*\]$/.test(a)?a.substr(1,a.length-2):a}function g(a,b){return{open:"~"===a.charAt(2),close:"~"===b.charAt(b.length-3)}}function h(a){return a.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function i(a,b,c){c=this.locInfo(c);for(var d=a?"@":"",e=[],f=0,g="",h=0,i=b.length;h<i;h++){var j=b[h].part,k=b[h].original!==j;if(d+=(b[h].separator||"")+j,k||".."!==j&&"."!==j&&"this"!==j)e.push(j);else{if(e.length>0)throw new q["default"]("Invalid path: "+d,{loc:c});".."===j&&(f++,g+="../")}}return{type:"PathExpression",data:a,depth:f,parts:e,original:d,loc:c}}function j(a,b,c,d,e,f){var g=d.charAt(3)||d.charAt(2),h="{"!==g&&"&"!==g,i=/\*/.test(d);return{type:i?"Decorator":"MustacheStatement",path:a,params:b,hash:c,escaped:h,strip:e,loc:this.locInfo(f)}}function k(a,b,c,e){d(a,c),e=this.locInfo(e);var f={type:"Program",body:b,strip:{},loc:e};return{type:"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:e}}function l(a,b,c,e,f,g){e&&e.path&&d(a,e);var h=/\*/.test(a.open);b.blockParams=a.blockParams;var i=void 0,j=void 0;if(c){if(h)throw new q["default"]("Unexpected inverse block on decorator",c);c.chain&&(c.program.body[0].closeStrip=e.strip),j=c.strip,i=c.program}return f&&(f=i,i=b,b=f),{type:h?"DecoratorBlock":"BlockStatement",path:a.path,params:a.params,hash:a.hash,program:b,inverse:i,openStrip:a.strip,inverseStrip:j,closeStrip:e&&e.strip,loc:this.locInfo(g)}}function m(a,b){if(!b&&a.length){var c=a[0].loc,d=a[a.length-1].loc;c&&d&&(b={source:c.source,start:{line:c.start.line,column:c.start.column},end:{line:d.end.line,column:d.end.column}})}return{type:"Program",body:a,strip:{},loc:b}}function n(a,b,c,e){return d(a,c),{type:"PartialBlockStatement",name:a.path,params:a.params,hash:a.hash,program:b,openStrip:a.strip,closeStrip:c&&c.strip,loc:this.locInfo(e)}}var o=c(1)["default"];b.__esModule=!0,b.SourceLocation=e,b.id=f,b.stripFlags=g,b.stripComment=h,b.preparePath=i,b.prepareMustache=j,b.prepareRawBlock=k,b.prepareBlock=l,b.prepareProgram=m,b.preparePartialBlock=n;var p=c(6),q=o(p)},function(a,b,c){"use strict";function d(){}function e(a,b,c){if(null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a,b),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function f(a,b,c){function d(){var d=c.parse(a,b),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}function e(a,b){return f||(f=d()),f.call(this,a,b)}if(void 0===b&&(b={}),null==a||"string"!=typeof a&&"Program"!==a.type)throw new k["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var f=void 0;return e._setup=function(a){return f||(f=d()),f._setup(a)},e._child=function(a,b,c,e){return f||(f=d()),f._child(a,b,c,e)},e}function g(a,b){if(a===b)return!0;if(l.isArray(a)&&l.isArray(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!g(a[c],b[c]))return!1;return!0}}function h(a){if(!a.path.parts){var b=a.path;a.path={type:"PathExpression",data:!1,depth:0,parts:[b.original+""],original:b.original+"",loc:b.loc}}}var i=c(1)["default"];b.__esModule=!0,b.Compiler=d,b.precompile=e,b.compile=f;var j=c(6),k=i(j),l=c(5),m=c(24),n=i(m),o=[].slice;d.prototype={compiler:d,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!g(d.args,e.args))return!1}b=this.children.length;for(var c=0;c<b;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds,b.blockParams=b.blockParams||[];var c=b.knownHelpers;if(b.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)d in c&&(b.knownHelpers[d]=c[d]);return this.accept(a)},compileProgram:function(a){var b=new this.compiler,c=b.compile(a,this.options),d=this.guid++;return this.usePartial=this.usePartial||c.usePartial,this.children[d]=c,this.useDepths=this.useDepths||c.useDepths,d},accept:function(a){if(!this[a.type])throw new k["default"]("Unknown type: "+a.type,a);this.sourceNode.unshift(a);var b=this[a.type](a);return this.sourceNode.shift(),b},Program:function(a){this.options.blockParams.unshift(a.blockParams);for(var b=a.body,c=b.length,d=0;d<c;d++)this.accept(b[d]);return this.options.blockParams.shift(),this.isSimple=1===c,this.blockParams=a.blockParams?a.blockParams.length:0,this},BlockStatement:function(a){h(a);var b=a.program,c=a.inverse;b=b&&this.compileProgram(b),c=c&&this.compileProgram(c);var d=this.classifySexpr(a);"helper"===d?this.helperSexpr(a,b,c):"simple"===d?(this.simpleSexpr(a),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("blockValue",a.path.original)):(this.ambiguousSexpr(a,b,c),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(a){var b=a.program&&this.compileProgram(a.program),c=this.setupFullMustacheParams(a,b,void 0),d=a.path;this.useDecorators=!0,this.opcode("registerDecorator",c.length,d.original)},PartialStatement:function(a){this.usePartial=!0;var b=a.program;b&&(b=this.compileProgram(a.program));var c=a.params;if(c.length>1)throw new k["default"]("Unsupported number of partial arguments: "+c.length,a);c.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):c.push({type:"PathExpression",parts:[],depth:0}));var d=a.name.original,e="SubExpression"===a.name.type;e&&this.accept(a.name),this.setupFullMustacheParams(a,b,void 0,!0);var f=a.indent||"";this.options.preventIndent&&f&&(this.opcode("appendContent",f),f=""),this.opcode("invokePartial",e,d,f),this.opcode("append")},PartialBlockStatement:function(a){this.PartialStatement(a)},MustacheStatement:function(a){this.SubExpression(a),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(a){this.DecoratorBlock(a)},ContentStatement:function(a){a.value&&this.opcode("appendContent",a.value)},CommentStatement:function(){},SubExpression:function(a){h(a);var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ambiguousSexpr:function(a,b,c){var d=a.path,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),d.strict=!0,this.accept(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.path;b.strict=!0,this.accept(b),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.path,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new k["default"]("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.strict=!0,e.falsy=!0,this.accept(e),this.opcode("invokeHelper",d.length,e.original,n["default"].helpers.simpleId(e))}},PathExpression:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0],c=n["default"].helpers.scopedId(a),d=!a.depth&&!c&&this.blockParamIndex(b);d?this.opcode("lookupBlockParam",d,a.parts):b?a.data?(this.options.data=!0,this.opcode("lookupData",a.depth,a.parts,a.strict)):this.opcode("lookupOnContext",a.parts,a.falsy,a.strict,c):this.opcode("pushContext")},StringLiteral:function(a){this.opcode("pushString",a.value)},NumberLiteral:function(a){this.opcode("pushLiteral",a.value)},BooleanLiteral:function(a){this.opcode("pushLiteral",a.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(a){var b=a.pairs,c=0,d=b.length;for(this.opcode("pushHash");c<d;c++)this.pushParam(b[c].value);for(;c--;)this.opcode("assignToHash",b[c].key);this.opcode("popHash")},opcode:function(a){this.opcodes.push({opcode:a,args:o.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(a){a&&(this.useDepths=!0)},classifySexpr:function(a){var b=n["default"].helpers.simpleId(a.path),c=b&&!!this.blockParamIndex(a.path.parts[0]),d=!c&&n["default"].helpers.helperExpression(a),e=!c&&(d||b);if(e&&!d){var f=a.path.parts[0],g=this.options;g.knownHelpers[f]?d=!0:g.knownHelpersOnly&&(e=!1)}return d?"helper":e?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;b<c;b++)this.pushParam(a[b])},pushParam:function(a){var b=null!=a.value?a.value:a.original||"";if(this.stringParams)b.replace&&(b=b.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",b,a.type),"SubExpression"===a.type&&this.accept(a);else{if(this.trackIds){var c=void 0;if(!a.parts||n["default"].helpers.scopedId(a)||a.depth||(c=this.blockParamIndex(a.parts[0])),c){var d=a.parts.slice(1).join(".");this.opcode("pushId","BlockParam",c,d)}else b=a.original||b,b.replace&&(b=b.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",a.type,b)}this.accept(a)}},setupFullMustacheParams:function(a,b,c,d){var e=a.params;return this.pushParams(e),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.accept(a.hash):this.opcode("emptyHash",d),e},blockParamIndex:function(a){for(var b=0,c=this.options.blockParams.length;b<c;b++){var d=this.options.blockParams[b],e=d&&l.indexOf(d,a);if(d&&e>=0)return[b,e]}}}},function(a,b,c){"use strict";function d(a){this.value=a}function e(){}function f(a,b,c,d){var e=b.popStack(),f=0,g=c.length;for(a&&g--;f<g;f++)e=b.nameLookup(e,c[f],d);return a?[b.aliasable("container.strict"),"(",e,", ",b.quotedString(c[f]),")"]:e}var g=c(1)["default"];b.__esModule=!0;var h=c(4),i=c(6),j=g(i),k=c(5),l=c(32),m=g(l);e.prototype={nameLookup:function(a,b){return e.isValidJavaScriptVariableName(b)?[a,".",b]:[a,"[",JSON.stringify(b),"]"]},depthedLookup:function(a){return[this.aliasable("container.lookup"),'(depths, "',a,'")']},compilerInfo:function(){var a=h.COMPILER_REVISION,b=h.REVISION_CHANGES[a];return[a,b]},appendToBuffer:function(a,b,c){return k.isArray(a)||(a=[a]),a=this.source.wrap(a,b),this.environment.isSimple?["return ",a,";"]:c?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var e=a.opcodes,f=void 0,g=void 0,h=void 0,i=void 0;for(h=0,i=e.length;h<i;h++)f=e[h],this.source.currentLocation=f.loc,g=g||f.loc,this[f.opcode].apply(this,f.args);if(this.source.currentLocation=g,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new j["default"]("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend("var decorators = container.decorators;\n"),this.decorators.push("return fn;"),d?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"),this.decorators.push("}\n"),this.decorators=this.decorators.merge()));var k=this.createFunctionContext(d);if(this.isChild)return k;var l={compiler:this.compilerInfo(),main:k};this.decorators&&(l.main_d=this.decorators,l.useDecorators=!0);var m=this.context,n=m.programs,o=m.decorators;for(h=0,i=n.length;h<i;h++)n[h]&&(l[h]=n[h],o[h]&&(l[h+"_d"]=o[h],l.useDecorators=!0));return this.environment.usePartial&&(l.usePartial=!0),this.options.data&&(l.useData=!0),this.useDepths&&(l.useDepths=!0),this.useBlockParams&&(l.useBlockParams=!0),this.options.compat&&(l.compat=!0),d?l.compilerOptions=this.options:(l.compiler=JSON.stringify(l.compiler),this.source.currentLocation={start:{line:1,column:0}},l=this.objectLiteral(l),b.srcName?(l=l.toStringWithSourceMap({file:b.destName}),l.map=l.map&&l.map.toString()):l=l.toString()),l},preamble:function(){this.lastContext=0,this.source=new m["default"](this.options.srcName),this.decorators=new m["default"](this.options.srcName)},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));var d=0;for(var e in this.aliases){var f=this.aliases[e];this.aliases.hasOwnProperty(e)&&f.children&&f.referenceCount>1&&(b+=", alias"+ ++d+"="+e,f.children[0]="alias"+d)}var g=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&g.push("blockParams"),this.useDepths&&g.push("depths");var h=this.mergeSource(b);return a?(g.push(h),Function.apply(this,g)):this.source.wrap(["function(",g.join(","),") {\n ",h,"}"])},mergeSource:function(a){var b=this.environment.isSimple,c=!this.forceBuffer,d=void 0,e=void 0,f=void 0,g=void 0;return this.source.each(function(a){a.appendToBuffer?(f?a.prepend(" + "):f=a,g=a):(f&&(e?f.prepend("buffer += "):d=!0,g.add(";"),f=g=void 0),e=!0,b||(c=!1))}),c?f?(f.prepend("return "),g.add(";")):e||this.source.push('return "";'):(a+=", buffer = "+(d?"":this.initializeBuffer()),f?(f.prepend("return buffer + "),g.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(d?"":";\n")),this.source.merge()},blockValue:function(a){var b=this.aliasable("helpers.blockHelperMissing"),c=[this.contextName(0)];this.setupHelperArgs(a,0,c);var d=this.popStack();c.splice(1,0,d),this.push(this.source.functionCall(b,"call",c))},ambiguousBlockValue:function(){var a=this.aliasable("helpers.blockHelperMissing"),b=[this.contextName(0)];this.setupHelperArgs("",0,b,!0),this.flushInline();var c=this.topStack();b.splice(1,0,c),this.pushSource(["if (!",this.lastHelper,") { ",c," = ",this.source.functionCall(a,"call",b),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(a){return[" != null ? ",a,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c,d){var e=0;d||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[e++])),this.resolvePath("context",a,e,b,c)},lookupBlockParam:function(a,b){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",b,1)},lookupData:function(a,b,c){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",b,0,!0,c)},resolvePath:function(a,b,c,d,e){var g=this;if(this.options.strict||this.options.assumeObjects)return void this.push(f(this.options.strict&&e,this,b,a));for(var h=b.length;c<h;c++)this.replaceStack(function(e){var f=g.nameLookup(e,b[c],a);return d?[" && ",f]:[" != null ? ",f," : ",e]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"SubExpression"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,b){var c=this.nameLookup("decorators",b,"decorator"),d=this.setupHelperArgs(b,a);this.decorators.push(["fn = ",this.decorators.functionCall(c,"",["fn","props","container",d])," || fn;"])},invokeHelper:function(a,b,c){var d=this.popStack(),e=this.setupHelper(a,b),f=c?[e.name," || "]:"",g=["("].concat(f,d);this.options.strict||g.push(" || ",this.aliasable("helpers.helperMissing")),g.push(")"),this.push(this.source.functionCall(g,"call",e.callParams))},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(this.source.functionCall(c.name,"call",c.callParams))},invokeAmbiguous:function(a,b){this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper"),f=["(","(helper = ",e," || ",c,")"];this.options.strict||(f[0]="(helper = ",
29
+ f.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",f,d.paramsInit?["),(",d.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",d.callParams)," : helper))"])},invokePartial:function(a,b,c){var d=[],e=this.setupParams(b,1,d);a&&(b=this.popStack(),delete e.name),c&&(e.indent=JSON.stringify(c)),e.helpers="helpers",e.partials="partials",e.decorators="container.decorators",a?d.unshift(b):d.unshift(this.nameLookup("partials",b,"partial")),this.options.compat&&(e.depths="depths"),e=this.objectLiteral(e),d.push(e),this.push(this.source.functionCall("container.invokePartial","",d))},assignToHash:function(a){var b=this.popStack(),c=void 0,d=void 0,e=void 0;this.trackIds&&(e=this.popStack()),this.stringParams&&(d=this.popStack(),c=this.popStack());var f=this.hash;c&&(f.contexts[a]=c),d&&(f.types[a]=d),e&&(f.ids[a]=e),f.values[a]=b},pushId:function(a,b,c){"BlockParam"===a?this.pushStackLiteral("blockParams["+b[0]+"].path["+b[1]+"]"+(c?" + "+JSON.stringify("."+c):"")):"PathExpression"===a?this.pushString(b):"SubExpression"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:e,compileChildren:function(a,b){for(var c=a.children,d=void 0,e=void 0,f=0,g=c.length;f<g;f++){d=c[f],e=new this.compiler;var h=this.matchExistingProgram(d);if(null==h){this.context.programs.push("");var i=this.context.programs.length;d.index=i,d.name="program"+i,this.context.programs[i]=e.compile(d,b,this.context,!this.precompile),this.context.decorators[i]=e.decorators,this.context.environments[i]=d,this.useDepths=this.useDepths||e.useDepths,this.useBlockParams=this.useBlockParams||e.useBlockParams,d.useDepths=this.useDepths,d.useBlockParams=this.useBlockParams}else d.index=h.index,d.name="program"+h.index,this.useDepths=this.useDepths||h.useDepths,this.useBlockParams=this.useBlockParams||h.useBlockParams}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a))return d}},programExpression:function(a){var b=this.environment.children[a],c=[b.index,"data",b.blockParams];return(this.useBlockParams||this.useDepths)&&c.push("blockParams"),this.useDepths&&c.push("depths"),"container.program("+c.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof d||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new d(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var b=["("],c=void 0,e=void 0,f=void 0;if(!this.isInline())throw new j["default"]("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof d)c=[g.value],b=["(",c],f=!0;else{e=!0;var h=this.incrStack();b=["((",this.push(h)," = ",g,")"],c=this.topStack()}var i=a.call(this,c);f||this.popStack(),e&&this.stackSlot--,this.push(b.concat(i,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var e=a[b];if(e instanceof d)this.compileStack.push(e);else{var f=this.incrStack();this.pushSource([f," = ",e,";"]),this.compileStack.push(f)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof d)return c.value;if(!b){if(!this.stackSlot)throw new j["default"]("Invalid stack pop");this.stackSlot--}return c},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof d?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var b=this.aliases[a];return b?(b.referenceCount++,b):(b=this.aliases[a]=this.source.wrap(a),b.aliasable=!0,b.referenceCount=1,b)},setupHelper:function(a,b,c){var d=[],e=this.setupHelperArgs(b,a,d,c),f=this.nameLookup("helpers",b,"helper"),g=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : {}");return{params:d,paramsInit:e,name:f,callParams:[g].concat(d)}},setupParams:function(a,b,c){var d={},e=[],f=[],g=[],h=!c,i=void 0;h&&(c=[]),d.name=this.quotedString(a),d.hash=this.popStack(),this.trackIds&&(d.hashIds=this.popStack()),this.stringParams&&(d.hashTypes=this.popStack(),d.hashContexts=this.popStack());var j=this.popStack(),k=this.popStack();(k||j)&&(d.fn=k||"container.noop",d.inverse=j||"container.noop");for(var l=b;l--;)i=this.popStack(),c[l]=i,this.trackIds&&(g[l]=this.popStack()),this.stringParams&&(f[l]=this.popStack(),e[l]=this.popStack());return h&&(d.args=this.source.generateArray(c)),this.trackIds&&(d.ids=this.source.generateArray(g)),this.stringParams&&(d.types=this.source.generateArray(f),d.contexts=this.source.generateArray(e)),this.options.data&&(d.data="data"),this.useBlockParams&&(d.blockParams="blockParams"),d},setupHelperArgs:function(a,b,c,d){var e=this.setupParams(a,b,c);return e=this.objectLiteral(e),d?(this.useRegister("options"),c.push("options"),["options=",e]):c?(c.push(e),""):e}},function(){for(var a="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),b=e.RESERVED_WORDS={},c=0,d=a.length;c<d;c++)b[a[c]]=!0}(),e.isValidJavaScriptVariableName=function(a){return!e.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},b["default"]=e,a.exports=b["default"]},function(a,b,c){"use strict";function d(a,b,c){if(f.isArray(a)){for(var d=[],e=0,g=a.length;e<g;e++)d.push(b.wrap(a[e],c));return d}return"boolean"==typeof a||"number"==typeof a?a+"":a}function e(a){this.srcFile=a,this.source=[]}b.__esModule=!0;var f=c(5),g=void 0;try{}catch(h){}g||(g=function(a,b,c,d){this.src="",d&&this.add(d)},g.prototype={add:function(a){f.isArray(a)&&(a=a.join("")),this.src+=a},prepend:function(a){f.isArray(a)&&(a=a.join("")),this.src=a+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),e.prototype={isEmpty:function(){return!this.source.length},prepend:function(a,b){this.source.unshift(this.wrap(a,b))},push:function(a,b){this.source.push(this.wrap(a,b))},merge:function(){var a=this.empty();return this.each(function(b){a.add([" ",b,"\n"])}),a},each:function(a){for(var b=0,c=this.source.length;b<c;b++)a(this.source[b])},empty:function(){var a=this.currentLocation||{start:{}};return new g(a.start.line,a.start.column,this.srcFile)},wrap:function(a){var b=arguments.length<=1||void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return a instanceof g?a:(a=d(a,this,b),new g(b.start.line,b.start.column,this.srcFile,a))},functionCall:function(a,b,c){return c=this.generateList(c),this.wrap([a,b?"."+b+"(":"(",c,")"])},quotedString:function(a){return'"'+(a+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)if(a.hasOwnProperty(c)){var e=d(a[c],this);"undefined"!==e&&b.push([this.quotedString(c),":",e])}var f=this.generateList(b);return f.prepend("{"),f.add("}"),f},generateList:function(a){for(var b=this.empty(),c=0,e=a.length;c<e;c++)c&&b.add(","),b.add(d(a[c],this));return b},generateArray:function(a){var b=this.generateList(a);return b.prepend("["),b.add("]"),b}},b["default"]=e,a.exports=b["default"]}])});
assets/js/javascript.php CHANGED
@@ -8,6 +8,7 @@ Duplicator.UI = new Object();
8
  Duplicator.Pack = new Object();
9
  Duplicator.Settings = new Object();
10
  Duplicator.Tools = new Object();
 
11
 
12
  //GLOBAL CONSTANTS
13
  Duplicator.DEBUG_AJAX_RESPONSE = false;
@@ -59,14 +60,14 @@ Duplicator.OpenLogWindow = function(log)
59
  * ============================================================================ */
60
 
61
  /* Saves the state of a UI element */
62
- Duplicator.UI.SaveViewStateByPost = function (key, value)
63
  {
64
  if (key != undefined && value != undefined ) {
65
  jQuery.ajax({
66
  type: "POST",
67
  url: ajaxurl,
68
  dataType: "json",
69
- data: {action : 'DUP_UI_SaveViewStateByPost', key: key, value: value},
70
  success: function(data) {},
71
  error: function(data) {}
72
  });
@@ -98,7 +99,7 @@ Duplicator.UI.ToggleMetaBox = function()
98
  var key = $panel.attr('id');
99
  var value = $panel.is(":visible") ? 0 : 1;
100
  $panel.toggle();
101
- Duplicator.UI.SaveViewStateByPost(key, value);
102
  (value)
103
  ? $arrow.removeClass().addClass('fa fa-caret-up')
104
  : $arrow.removeClass().addClass('fa fa-caret-down');
8
  Duplicator.Pack = new Object();
9
  Duplicator.Settings = new Object();
10
  Duplicator.Tools = new Object();
11
+ Duplicator.Debug = new Object();
12
 
13
  //GLOBAL CONSTANTS
14
  Duplicator.DEBUG_AJAX_RESPONSE = false;
60
  * ============================================================================ */
61
 
62
  /* Saves the state of a UI element */
63
+ Duplicator.UI.SaveViewState = function (key, value)
64
  {
65
  if (key != undefined && value != undefined ) {
66
  jQuery.ajax({
67
  type: "POST",
68
  url: ajaxurl,
69
  dataType: "json",
70
+ data: {action : 'DUP_CTRL_UI_SaveViewState', key: key, value: value},
71
  success: function(data) {},
72
  error: function(data) {}
73
  });
99
  var key = $panel.attr('id');
100
  var value = $panel.is(":visible") ? 0 : 1;
101
  $panel.toggle();
102
+ Duplicator.UI.SaveViewState(key, value);
103
  (value)
104
  ? $arrow.removeClass().addClass('fa fa-caret-up')
105
  : $arrow.removeClass().addClass('fa fa-caret-down');
classes/scan.validator.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*Recursivly scans a directory and finds all sym-links and unreadable files */
4
+ class DUP_ScanValidator
5
+ {
6
+ public $FileCount = 0;
7
+ public $DirCount = 0;
8
+
9
+ /*If the MaxFiles or MaxDirs limit is reached then true */
10
+ public $LimitReached = false;
11
+
12
+ /*The maximum count of files before the recursive function stops */
13
+ public $MaxFiles = 1000000;
14
+
15
+ /*The maximum count of directories before the recursive function stops */
16
+ public $MaxDirs = 75000;
17
+
18
+ public $Recursion = true;
19
+
20
+ /*Stores a list of symbolic link files */
21
+ public $SymLinks = array();
22
+
23
+ /*Stores a list of files unreadable by PHP */
24
+ public $Unreadable = array();
25
+
26
+ public function Run($dir, &$results = array())
27
+ {
28
+ //Stop Recursion if Max search is reached
29
+ if ($this->FileCount > $this->MaxFiles || $this->DirCount > $this->MaxDirs)
30
+ {
31
+ $this->LimitReached = true;
32
+ return $results;
33
+ }
34
+
35
+ $files = @scandir($dir);
36
+ if (is_array($files))
37
+ {
38
+ foreach($files as $key => $value)
39
+ {
40
+ $path = realpath($dir.DIRECTORY_SEPARATOR.$value);
41
+ if ($path) {
42
+ //Files
43
+ if(!is_dir($path)) {
44
+ if (!is_readable($path))
45
+ {
46
+ $results[] = $path;
47
+ $this->Unreadable[] = $path;
48
+ }
49
+ else if ($this->_is_link($path))
50
+ {
51
+ $results[] = $path;
52
+ $this->SymLinks[] = $path;
53
+ }
54
+ $this->FileCount++;
55
+ }
56
+ //Dirs
57
+ else if($value != "." && $value != "..")
58
+ {
59
+ if (! $this->_is_link($path) && $this->Recursion)
60
+ {
61
+ $this->Run($path, $results);
62
+ }
63
+
64
+ if (!is_readable($path))
65
+ {
66
+ $results[] = $path;
67
+ $this->Unreadable[] = $path;
68
+ }
69
+ else if ($this->_is_link($path)) {
70
+ $results[] = $path;
71
+ $this->SymLinks[] = $path;
72
+ }
73
+ $this->DirCount++;
74
+ }
75
+ }
76
+ }
77
+ }
78
+ return $this;
79
+ }
80
+
81
+ //Supports windows and linux
82
+ private function _is_link($target)
83
+ {
84
+ if (defined('PHP_WINDOWS_VERSION_BUILD')) {
85
+ if(file_exists($target) && @readlink($target) != $target) {
86
+ return true;
87
+ }
88
+ } elseif (is_link($target)) {
89
+ return true;
90
+ }
91
+ return false;
92
+ }
93
+ }
classes/ui.php CHANGED
@@ -5,66 +5,37 @@ if ( ! defined('DUPLICATOR_VERSION') ) exit; // Exit if accessed directly
5
  * Helper Class for UI internactions
6
  * @package Dupicator\classes
7
  */
8
- class DUP_UI {
 
9
 
10
  /**
11
  * The key used in the wp_options table
12
  * @var string
13
  */
14
- private static $OptionsTableKey = 'duplicator_ui_view_state';
15
 
16
  /**
17
  * Save the view state of UI elements
18
  * @param string $key A unique key to define the ui element
19
  * @param string $value A generic value to use for the view state
20
  */
21
- public static function SaveViewState($key, $value) {
22
-
23
  $view_state = array();
24
- $view_state = get_option(self::$OptionsTableKey);
25
  $view_state[$key] = $value;
26
- $success = update_option(self::$OptionsTableKey, $view_state);
27
-
28
  return $success;
29
  }
30
 
31
 
32
- /**
33
- * Saves the state of a UI element via post params
34
- * @return json result string
35
- * <code>
36
- * //JavaScript Ajax Request
37
- * Duplicator.UI.SaveViewStateByPost('dup-pack-archive-panel', 1);
38
- *
39
- * //Call PHP Code
40
- * $view_state = DUP_UI::GetViewStateValue('dup-pack-archive-panel');
41
- * $ui_css_archive = ($view_state == 1) ? 'display:block' : 'display:none';
42
- * </code>
43
- */
44
- public static function SaveViewStateByPost() {
45
-
46
- DUP_Util::CheckPermissions('read');
47
-
48
- $post = stripslashes_deep($_POST);
49
- $key = esc_html($post['key']);
50
- $value = esc_html($post['value']);
51
- $success = self::SaveViewState($key, $value);
52
-
53
- //Show Results as JSON
54
- $json = array();
55
- $json['key'] = $key;
56
- $json['value'] = $value;
57
- $json['update-success'] = $success;
58
- die(json_encode($json));
59
- }
60
-
61
-
62
  /**
63
  * Gets all the values from the settings array
64
  * @return array Returns and array of all the values stored in the settings array
65
  */
66
- public static function GetViewStateArray() {
67
- return get_option(self::$OptionsTableKey);
 
68
  }
69
 
70
  /**
@@ -72,8 +43,9 @@ class DUP_UI {
72
  * @param type $searchKey The key to search on
73
  * @return string Returns the value of the key searched or null if key is not found
74
  */
75
- public static function GetViewStateValue($searchKey) {
76
- $view_state = get_option(self::$OptionsTableKey);
 
77
  if (is_array($view_state)) {
78
  foreach ($view_state as $key => $value) {
79
  if ($key == $searchKey) {
5
  * Helper Class for UI internactions
6
  * @package Dupicator\classes
7
  */
8
+ class DUP_UI
9
+ {
10
 
11
  /**
12
  * The key used in the wp_options table
13
  * @var string
14
  */
15
+ private static $OptionsViewStateKey = 'duplicator_ui_view_state';
16
 
17
  /**
18
  * Save the view state of UI elements
19
  * @param string $key A unique key to define the ui element
20
  * @param string $value A generic value to use for the view state
21
  */
22
+ public static function SaveViewState($key, $value)
23
+ {
24
  $view_state = array();
25
+ $view_state = get_option(self::$OptionsViewStateKey);
26
  $view_state[$key] = $value;
27
+ $success = update_option(self::$OptionsViewStateKey, $view_state);
 
28
  return $success;
29
  }
30
 
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  /**
33
  * Gets all the values from the settings array
34
  * @return array Returns and array of all the values stored in the settings array
35
  */
36
+ public static function GetViewStateArray()
37
+ {
38
+ return get_option(self::$OptionsViewStateKey);
39
  }
40
 
41
  /**
43
  * @param type $searchKey The key to search on
44
  * @return string Returns the value of the key searched or null if key is not found
45
  */
46
+ public static function GetViewStateValue($searchKey)
47
+ {
48
+ $view_state = get_option(self::$OptionsViewStateKey);
49
  if (is_array($view_state)) {
50
  foreach ($view_state as $key => $value) {
51
  if ($key == $searchKey) {
ctrls/ctrl.base.php ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once(DUPLICATOR_PLUGIN_PATH . '/classes/utility.php');
4
+
5
+ //Enum used to define the various test statues
6
+ final class DUP_CTRL_Status
7
+ {
8
+ const ERROR = -2;
9
+ const FAILED = -1;
10
+ const UNDEFINED = 0;
11
+ const SUCCESS = 1;
12
+ }
13
+
14
+ /**
15
+ * Base class for all controllers
16
+ *
17
+ * @package Dupicator\ctrls\
18
+ */
19
+ class DUP_CTRL_Base
20
+ {
21
+ //Represents the name of the Nonce Action
22
+ public $Action;
23
+
24
+ //The return type valiad options: PHP, JSON-AJAX, JSON
25
+ public $ReturnType = 'JSON-AJAX';
26
+
27
+ public function SetResponseType($type)
28
+ {
29
+ $opts = array('PHP', 'JSON-AJAX', 'JSON');
30
+ if (!in_array($type, $opts))
31
+ {
32
+ throw new Exception('The $type param must be one of the following: ' . implode(',', $opts) . ' for the following function [' . __FUNCTION__.']');
33
+ }
34
+ $this->ReturnType = $type;
35
+ }
36
+
37
+ public function PostParamMerge($post)
38
+ {
39
+ $post = is_array($post) ? $post : array();
40
+ return array_merge($_POST, $post);
41
+ }
42
+ }
43
+
44
+
45
+
46
+ /**
47
+ * A class structer used to report on controller methods
48
+ *
49
+ * @package Dupicator\ctrls\
50
+ */
51
+ class DUP_CTRL_Report
52
+ {
53
+ //Properties
54
+ public $RunTime;
55
+ public $ReturnType;
56
+ public $Results;
57
+ public $Status;
58
+ }
59
+
60
+
61
+ /**
62
+ * A class used format all controller responses in a consitent format
63
+ * Every controller response will have a Report and Payload structer
64
+ * The Payload is an array of the result response. The Report is used
65
+ * report on the overall status of the controller method
66
+ *
67
+ * @package Dupicator\ctrls\
68
+ */
69
+ class DUP_CTRL_Result
70
+ {
71
+ //Properties
72
+ public $Report;
73
+ public $Payload;
74
+
75
+ private $time_start;
76
+ private $time_end;
77
+ private $CTRL;
78
+
79
+ function __construct(DUP_CTRL_Base $CTRL_OBJ)
80
+ {
81
+ DUP_Util::CheckPermissions('read');
82
+ $this->time_start = $this->microtimeFloat();
83
+ $this->CTRL = $CTRL_OBJ;
84
+
85
+ //Report Data
86
+ $this->Report = new DUP_CTRL_Report();
87
+ $this->Report->ReturnType = $CTRL_OBJ->ReturnType;
88
+ }
89
+
90
+ public function Process($payload, $test = DUP_CTRL_Status::UNDEFINED)
91
+ {
92
+ if (is_array($this->Payload))
93
+ {
94
+ $this->Payload[] = $payload;
95
+ $this->Report->Results = count($this->Payload);
96
+ } else {
97
+ $this->Payload = $payload;
98
+ $this->Report->Results = 1;
99
+ }
100
+
101
+ $this->Report->Status = $test;
102
+ $this->getProcessTime();
103
+
104
+ switch ($this->CTRL->ReturnType)
105
+ {
106
+ case 'JSON' :
107
+ return json_encode($this);
108
+ break;
109
+
110
+ case 'PHP' :
111
+ return $this;
112
+ break;
113
+
114
+ default:
115
+ if (!headers_sent()) {
116
+ header('Content-Type: application/json');
117
+ }
118
+ return die(json_encode($this));
119
+ break;
120
+ }
121
+ }
122
+
123
+ public function ProcessError($exception)
124
+ {
125
+ $payload = array();
126
+ $payload['Message'] = $exception->getMessage();
127
+ $payload['File'] = $exception->getFile();
128
+ $payload['Line'] = $exception->getLine();
129
+ $payload['Trace'] = $exception->getTraceAsString();
130
+ $this->Process($payload, DUP_CTRL_Status::ERROR);
131
+ die(json_encode($this));
132
+ }
133
+
134
+ private function getProcessTime()
135
+ {
136
+ $this->time_end = $this->microtimeFloat();
137
+ $this->Report->RunTime = $this->time_end - $this->time_start;
138
+ }
139
+
140
+ private function microtimeFloat()
141
+ {
142
+ list($usec, $sec) = explode(" ", microtime());
143
+ return ((float)$usec + (float)$sec);
144
+ }
145
+
146
+
147
+
148
+ }
149
+ ?>
ctrls/ctrl.tools.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined('DUPLICATOR_VERSION') ) exit; // Exit if accessed directly
3
+
4
+ require_once(DUPLICATOR_PLUGIN_PATH . '/ctrls/ctrl.base.php');
5
+ require_once(DUPLICATOR_PLUGIN_PATH . '/classes/scan.validator.php');
6
+
7
+ /**
8
+ * Controller for Tools
9
+ * @package Dupicator\ctrls
10
+ */
11
+ class DUP_CTRL_Tools extends DUP_CTRL_Base
12
+ {
13
+
14
+ function __construct()
15
+ {
16
+ add_action('wp_ajax_DUP_CTRL_Tools_RunScanValidator', array($this, 'RunScanValidator'));
17
+ }
18
+
19
+ /**
20
+ * Calls the ScanValidator and returns a JSON result
21
+ *
22
+ * @param string $_POST['scan-path'] The path to start scanning from, defaults to DUPLICATOR_WPROOTPATH
23
+ * @param bool $_POST['scan-recursive'] Recursivly search the path
24
+ *
25
+ * @notes: Testing = /wp-admin/admin-ajax.php?action=DUP_CTRL_Tools_RunScanValidator
26
+ */
27
+ public function RunScanValidator($post)
28
+ {
29
+ $post = $this->PostParamMerge($post);
30
+ check_ajax_referer($post['action'], 'nonce');
31
+
32
+ $result = new DUP_CTRL_Result($this);
33
+
34
+ try
35
+ {
36
+ //CONTROLLER LOGIC
37
+ $path = isset($post['scan-path']) ? $post['scan-path'] : DUPLICATOR_WPROOTPATH;
38
+ if (!is_dir($path)) {
39
+ throw new Exception("Invalid directory provided '{$path}'!");
40
+ }
41
+ $scanner = new DUP_ScanValidator();
42
+ $scanner->Recursion = (isset($post['scan-recursive']) && $post['scan-recursive'] != 'false') ? true : false;
43
+ $payload = $scanner->Run($path);
44
+
45
+ //RETURN RESULT
46
+ $test = ($payload->FileCount > 0)
47
+ ? DUP_CTRL_Status::SUCCESS
48
+ : DUP_CTRL_Status::FAILED;
49
+ $result->Process($payload, $test);
50
+ }
51
+ catch (Exception $exc)
52
+ {
53
+ $result->ProcessError($exc);
54
+ }
55
+ }
56
+
57
+ }
58
+ ?>
ctrls/ctrl.ui.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined('DUPLICATOR_VERSION') ) exit; // Exit if accessed directly
3
+
4
+ require_once(DUPLICATOR_PLUGIN_PATH . '/ctrls/ctrl.base.php');
5
+ require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui.php');
6
+
7
+ /**
8
+ * Controller for Tools
9
+ * @package Dupicator\ctrls
10
+ */
11
+ class DUP_CTRL_UI extends DUP_CTRL_Base
12
+ {
13
+
14
+ function __construct()
15
+ {
16
+ add_action('wp_ajax_DUP_CTRL_UI_SaveViewState', array($this, 'SaveViewState'));
17
+ add_action('wp_ajax_DUP_CTRL_UI_GetViewStateList', array($this, 'GetViewStateList'));
18
+ }
19
+
20
+
21
+ /**
22
+ * Calls the SaveViewState and returns a JSON result
23
+ *
24
+ * @param string $_POST['key'] A unique key that idetifies the state of the UI element
25
+ * @param bool $_POST['value'] The value to store for the state of the UI element
26
+ *
27
+ * @notes: Testing: See Testing Interface
28
+ * URL = /wp-admin/admin-ajax.php?action=DUP_CTRL_UI_SaveViewState
29
+ *
30
+ * <code>
31
+ * //JavaScript Ajax Request
32
+ * Duplicator.UI.SaveViewState('dup-pack-archive-panel', 1);
33
+ *
34
+ * //Call PHP Code
35
+ * $view_state = DUP_UI::GetViewStateValue('dup-pack-archive-panel');
36
+ * $ui_css_archive = ($view_state == 1) ? 'display:block' : 'display:none';
37
+ * </code>
38
+ */
39
+ public function SaveViewState($post)
40
+ {
41
+ $post = $this->PostParamMerge($post);
42
+ $result = new DUP_CTRL_Result($this);
43
+
44
+ try
45
+ {
46
+ //CONTROLLER LOGIC
47
+ $post = stripslashes_deep($_POST);
48
+ $key = esc_html($post['key']);
49
+ $value = esc_html($post['value']);
50
+ $success = DUP_UI::SaveViewState($key, $value);
51
+
52
+ $payload = array();
53
+ $payload['key'] = $key;
54
+ $payload['value'] = $value;
55
+ $payload['update-success'] = $success;
56
+
57
+ //RETURN RESULT
58
+ $test = ($success)
59
+ ? DUP_CTRL_Status::SUCCESS
60
+ : DUP_CTRL_Status::FAILED;
61
+ return $result->Process($payload, $test);
62
+ }
63
+ catch (Exception $exc)
64
+ {
65
+ $result->ProcessError($exc);
66
+ }
67
+ }
68
+
69
+ /**
70
+ * Returns a JSON list of all saved view state items
71
+ *
72
+ * @notes: Testing: See Testing Interface
73
+ * URL = /wp-admin/admin-ajax.php?action=DUP_CTRL_UI_GetViewStateList
74
+ *
75
+ * <code>
76
+ * See SaveViewState()
77
+ * </code>
78
+ */
79
+ public function GetViewStateList()
80
+ {
81
+ $result = new DUP_CTRL_Result($this);
82
+
83
+ try
84
+ {
85
+ //CONTROLLER LOGIC
86
+ $payload = DUP_UI::GetViewStateArray();
87
+
88
+ //RETURN RESULT
89
+ $test = (count($payload))
90
+ ? DUP_CTRL_Status::SUCCESS
91
+ : DUP_CTRL_Status::FAILED;
92
+ return $result->Process($payload, $test);
93
+ }
94
+ catch (Exception $exc)
95
+ {
96
+ $result->ProcessError($exc);
97
+ }
98
+ }
99
+
100
+ }
101
+ ?>
debug/main.php ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ DUP_Util::CheckPermissions('read');
3
+
4
+ require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
5
+ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
6
+
7
+
8
+ function DUP_DEBUG_TestSetup($CTRL)
9
+ {
10
+ $title = $CTRL['Title'];
11
+ $action = $CTRL['Action'];
12
+ $testable = $CTRL['Test'] ? 1 : 0;
13
+ $test_css = $testable ? '' : 'style="display:none"';
14
+ $nonce = wp_create_nonce($action);
15
+
16
+ $html = <<<EOT
17
+ <div class="keys">
18
+ <input type="hidden" name="testable" value="{$testable}" />
19
+ <input type="hidden" name="action" value="{$action}" />
20
+ <input type="hidden" name="nonce" value="{$nonce}" />
21
+ <span class="result"><i class="fa fa-cube fa-lg"></i></span>
22
+ <input type='checkbox' id='{$action}' name='{$action}' {$test_css} />
23
+ <label for='{$action}'>{$title}</label> &nbsp;
24
+ <a href="javascript:void(0)" onclick="jQuery(this).closest('form').find('div.params').toggle()">Params</a> |
25
+ <a href="javascript:void(0)" onclick="jQuery(this).closest('form').submit()">Test</a>
26
+ </div>
27
+ EOT;
28
+ echo $html;
29
+ }
30
+
31
+ ?>
32
+ <style>
33
+ div.debug-area {line-height: 26px}
34
+ table.debug-toolbar {width:100%; margin: 3px 0 -10px -5px; }
35
+ table.debug-toolbar td {padding:3px; white-space: nowrap}
36
+ table.debug-toolbar td:last-child {width: 100%}
37
+
38
+ div.debug-area form {margin: 15px 0 0 0; border-top: 1px solid #dfdfdf; padding-top: 5px}
39
+ div.debug-area div.keys label {font-weight: bold; font-size: 14px; padding-right: 5px }
40
+ div.debug-area div.params label {width:150px; display:inline-block}
41
+ div.debug-area input[type=text] {width:400px}
42
+
43
+ div.section-hdr {margin:35px 0 0 0; font-size: 16px; font-weight: bold; border:1px solid silver; border-radius: 3px; padding:1px 5px 1px 5px; background: #dfdfdf;}
44
+ div.params {display:none}
45
+ i.result-pass {color:green}
46
+ i.result-fail {color:red}
47
+ </style>
48
+
49
+ <script>
50
+ var UNIT_TEST_FORMS;
51
+ var UNIT_TEST_CHKBOXES;
52
+ var UNIT_TEST_PASSED;
53
+ var UNIT_TEST_COUNTER;
54
+ var UNIT_TEST_RUNNING = false;
55
+ </script>
56
+
57
+ <div class="wrap dup-wrap dup-support-all">
58
+ <h1><?php _e('Testing Interface', 'duplicator'); ?></h1>
59
+ <hr size="1" />
60
+
61
+ <table class="debug-toolbar">
62
+ <tr>
63
+ <td>
64
+ <span id="results-all"><i class="fa fa-cube fa-lg"></i></span>
65
+ <input id="test-checkall" type="checkbox" onclick="Duplicator.Debug.CheckAllTests()">
66
+ </td>
67
+ <td>
68
+ <input type="button" class="button button-small" value="<?php _e('Run Tests', 'duplicator'); ?>" onclick="Duplicator.Debug.RunTests()" />
69
+ <input type="button" class="button button-small" value="<?php _e('Refresh Page', 'duplicator'); ?>" onclick="window.location.reload();" />
70
+ </td>
71
+ <td> <input type="checkbox" id="test-openwindow" onchange="Duplicator.Debug.TestNewWindow()" /> <label for="test-openwindow">Tests in new window</label> </td>
72
+ </tr>
73
+ </table>
74
+
75
+ <div class="debug-area">
76
+ <?php
77
+ include_once 'tst.tools.php';
78
+ include_once 'tst.ui.php';
79
+ include_once 'tst.packages.php';
80
+ ?>
81
+ </div>
82
+ </div>
83
+
84
+ <script>
85
+ jQuery(document).ready(function($)
86
+ {
87
+ //Run test on all checked options
88
+ Duplicator.Debug.RunTests = function()
89
+ {
90
+ try
91
+ {
92
+ UNIT_TEST_RUNNING = true;
93
+ UNIT_TEST_PASSED = true;
94
+ UNIT_TEST_COUNTER = 0;
95
+ UNIT_TEST_CHKBOXES = $("div.keys input[type='checkbox']:checked").length;
96
+ UNIT_TEST_FORMS = $("div.keys input[name='testable'][value='1']").closest('form');
97
+
98
+ $(UNIT_TEST_FORMS).each(function(index)
99
+ {
100
+ var $form = $(this);
101
+ var $result = $form.find('span.result');
102
+ var $check = $form.find('div.keys input[type="checkbox"]');
103
+ var input;
104
+
105
+ if ($check.is(':checked'))
106
+ {
107
+ $('#results-all').html('<i class="fa fa-cog fa-spin fa-fw fa-lg"></i>');
108
+ $result.html('<i class="fa fa-circle-o-notch fa-spin fa-fw fa-lg"></i>');
109
+
110
+ //Run any callbacks if defined
111
+ if ($form.attr("onsubmit") != undefined) {
112
+ $form.submit();
113
+ }
114
+ input = $form.serialize();
115
+
116
+ $.ajax({
117
+ type: "POST",
118
+ url: ajaxurl,
119
+ dataType: "json",
120
+ data: input,
121
+ success: function(data) { Duplicator.Debug.ProcessResult(data, $result) },
122
+ error: function(data) {},
123
+ done: function(data) {}
124
+ });
125
+ }
126
+ });
127
+ }
128
+ catch (e) {
129
+ console.log(e);
130
+ } finally {
131
+ UNIT_TEST_RUNNING = false;
132
+ }
133
+ }
134
+
135
+ //Call back used to test the status of a result
136
+ Duplicator.Debug.ProcessResult = function(data, result)
137
+ {
138
+ UNIT_TEST_COUNTER++;
139
+ var status = data.Report.Status || 0;
140
+ //console.log(data);
141
+
142
+ if (status > 0) {
143
+ result.html('<i class="fa fa-check-circle fa-lg result-pass"></i>');
144
+ } else {
145
+ UNIT_TEST_PASSED = false;
146
+ result.html('<i class="fa fa-check-circle fa-lg result-fail"></i>');
147
+ }
148
+
149
+ //Set after all tests have ran
150
+ if (UNIT_TEST_COUNTER >= UNIT_TEST_CHKBOXES) {
151
+ (UNIT_TEST_PASSED)
152
+ ? $('#results-all').html('<i class="fa fa-check-circle fa-lg result-pass"></i>')
153
+ : $('#results-all').html('<i class="fa fa-check-circle fa-lg result-fail"></i>');
154
+ }
155
+ }
156
+
157
+ //Check all of the check boxes
158
+ Duplicator.Debug.CheckAllTests = function()
159
+ {
160
+ var checkAll = $('#test-checkall').is(':checked');
161
+ $("div.keys input[type='checkbox']:visible").each(function() {
162
+ (checkAll)
163
+ ? $(this).attr('checked', '1')
164
+ : $(this).removeAttr('checked');
165
+ });
166
+ }
167
+
168
+ //Test links will open in seperate window if checked
169
+ Duplicator.Debug.TestNewWindow = function()
170
+ {
171
+ var check = $('#test-openwindow').is(':checked');
172
+ var count = 0;
173
+ $("form").each(function(index)
174
+ {
175
+ count++;
176
+ (check)
177
+ ? $(this).attr('target', 'dup_debug' + count)
178
+ : $(this).attr('target', 'dup_debug');
179
+ });
180
+ }
181
+
182
+ //INIT
183
+ $("form").each(function(index)
184
+ {
185
+ var $form = $(this);
186
+ $form.attr('action', 'admin-ajax.php');
187
+ $form.attr('target', 'dup_debug');
188
+ $form.attr('method', 'post');
189
+ });
190
+
191
+ });
192
+ </script>
debug/tst.packages.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="section-hdr">PACKAGE CTRLS</div>
2
+
3
+ <form>
4
+ <?php
5
+ $CTRL['Title'] = 'duplicator_package_scan';
6
+ $CTRL['Action'] = 'duplicator_package_scan';
7
+ $CTRL['Test'] = false;
8
+ DUP_DEBUG_TestSetup($CTRL);
9
+ ?>
10
+ <div class="params">
11
+ No Params
12
+ </div>
13
+ </form>
14
+
debug/tst.tools.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div class="section-tests">
3
+ <div class="section-hdr">TOOLS CTRLS</div>
4
+
5
+ <!-- METHOD TEST -->
6
+ <form>
7
+ <?php
8
+ $CTRL['Title'] = 'DUP_CTRL_Tools_RunScanValidator';
9
+ $CTRL['Action'] = 'DUP_CTRL_Tools_RunScanValidator';
10
+ $CTRL['Test'] = true;
11
+ DUP_DEBUG_TestSetup($CTRL);
12
+ ?>
13
+ <div class="params">
14
+ <label>Allow Recursion:</label>
15
+ <input type="checkbox" name="scan-recursive" /><br/>
16
+ <label>Search Path:</label>
17
+ <input type="text" name="scan-path" value="<?php echo DUPLICATOR_WPROOTPATH ?>" /> <br/>
18
+ </div>
19
+ </form>
20
+
21
+ <!-- METHOD TEST -->
22
+ <form>
23
+ <?php
24
+ $CTRL['Title'] = 'DUP_CTRL_Tools_RunScanValidatorFull';
25
+ $CTRL['Action'] = 'DUP_CTRL_Tools_RunScanValidator';
26
+ $CTRL['Test'] = true;
27
+ DUP_DEBUG_TestSetup($CTRL);
28
+ ?>
29
+ <div class="params">
30
+ <label>Recursion:</label> True
31
+ <input type="hidden" name="scan-recursive" value="true" /><br/>
32
+ <label>Search Path:</label>
33
+ <input type="text" name="scan-path" value="<?php echo DUPLICATOR_WPROOTPATH ?>" /> <br/>
34
+ </div>
35
+ </form>
36
+
37
+
38
+ </div>
debug/tst.ui.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <div class="section-tests">
3
+ <div class="section-hdr">UI CTRLS</div>
4
+
5
+ <!-- METHOD TEST -->
6
+ <script>
7
+ function JS_DUP_CTRL_UI_SaveViewState(form)
8
+ {
9
+ //value param must be dynamic with each submit or else
10
+ //wp update_option method will return false
11
+ jQuery(form).find('input[name="value"]').val(new Date(jQuery.now()));
12
+ return ! UNIT_TEST_RUNNING;
13
+ }
14
+ </script>
15
+ <form onsubmit="return JS_DUP_CTRL_UI_SaveViewState(this);">
16
+ <?php
17
+ $CTRL['Title'] = 'DUP_CTRL_UI_SaveViewState';
18
+ $CTRL['Action'] = 'DUP_CTRL_UI_SaveViewState';
19
+ $CTRL['Test'] = true;
20
+ DUP_DEBUG_TestSetup($CTRL);
21
+ ?>
22
+
23
+ <div class="params">
24
+ <label>Key:</label>
25
+ <input type="text" name="key" value="dup_ctrl_test" /><br/>
26
+ <label>Value:</label>
27
+ <input type="text" name="value" /> <br/>
28
+ </div>
29
+ </form>
30
+
31
+
32
+ <!-- METHOD TEST -->
33
+ <form>
34
+ <?php
35
+ $CTRL['Title'] = 'DUP_CTRL_UI_GetViewStateList';
36
+ $CTRL['Action'] = 'DUP_CTRL_UI_GetViewStateList';
37
+ $CTRL['Test'] = true;
38
+ DUP_DEBUG_TestSetup($CTRL);
39
+ ?>
40
+
41
+ <div class="params">No Params</div>
42
+ </form>
43
+
44
+
45
+ </div>
define.php CHANGED
@@ -2,7 +2,7 @@
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
- define('DUPLICATOR_VERSION', '1.1.26');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
+ define('DUPLICATOR_VERSION', '1.1.28');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
duplicator.php CHANGED
@@ -3,16 +3,15 @@
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
6
- Version: 1.1.26
7
- Author: LifeInTheGrid
8
- Author URI: http://www.lifeinthegrid.com
9
  Text Domain: duplicator
10
- Domain Path: /lang
11
  License: GPLv2 or later
12
  */
13
 
14
  /* ================================================================================
15
- Copyright 2011-2017 Cory Lamle
16
 
17
  This program is free software; you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License, version 2, as
@@ -35,16 +34,22 @@
35
 
36
  require_once("define.php");
37
 
38
- if (is_admin() == true) {
39
-
 
40
  require_once 'classes/logging.php';
41
  require_once 'classes/utility.php';
42
- require_once 'classes/ui.php';
43
  require_once 'classes/settings.php';
44
  require_once 'classes/server.php';
45
  require_once 'classes/package.php';
46
- require_once 'views/actions.php';
 
 
 
 
 
47
 
 
48
  /* ACTIVATION
49
  Only called when plugin is activated */
50
  function duplicator_activate()
@@ -112,20 +117,23 @@ if (is_admin() == true) {
112
  }
113
 
114
  //HOOKS
115
- register_activation_hook(__FILE__, 'duplicator_activate');
116
  register_deactivation_hook(__FILE__, 'duplicator_deactivate');
117
 
118
  //ACTIONS
119
- add_action('plugins_loaded', 'duplicator_update');
120
- add_action('admin_init', 'duplicator_init');
121
- add_action('admin_menu', 'duplicator_menu');
122
- add_action('wp_ajax_duplicator_package_scan', 'duplicator_package_scan');
123
- add_action('wp_ajax_duplicator_package_build', 'duplicator_package_build');
124
- add_action('wp_ajax_duplicator_package_delete', 'duplicator_package_delete');
125
- add_action('wp_ajax_DUP_UI_SaveViewStateByPost', array('DUP_UI', 'SaveViewStateByPost'));
126
- add_action('admin_notices', array('DUP_UI', 'ShowReservedFilesNotice'));
127
- add_action('plugins_loaded', 'duplicator_wpfront_integrate');
128
-
 
 
 
129
  //FILTERS
130
  add_filter('plugin_action_links', 'duplicator_manage_link', 10, 2);
131
  add_filter('plugin_row_meta', 'duplicator_meta_links', 10, 2);
@@ -146,6 +154,7 @@ if (is_admin() == true) {
146
  wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
147
  wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
148
  /* JS */
 
149
  wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
150
  wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
151
  }
@@ -154,20 +163,19 @@ if (is_admin() == true) {
154
  function duplicator_get_menu() {
155
  $current_page = isset($_REQUEST['page']) ? esc_html($_REQUEST['page']) : 'duplicator';
156
  switch ($current_page) {
157
- case 'duplicator': include('views/packages/controller.php');
158
  break;
159
  case 'duplicator-settings': include('views/settings/controller.php');
160
  break;
161
- case 'duplicator-tools': include('views/tools/controller.php');
162
  break;
163
- case 'duplicator-help': include('views/help/help.php');
164
  break;
165
- case 'duplicator-about': include('views/help/about.php');
166
- break;
167
- case 'duplicator-perks': include('views/help/perks.php');
168
-
169
  break;
170
- case 'duplicator-gopro': include('views/help/gopro.php');
 
 
171
  break;
172
 
173
  }
@@ -190,17 +198,17 @@ if (is_admin() == true) {
190
  $perms = apply_filters($wpfront_caps_translator, $perms);
191
  $lang_txt = __('Packages', 'duplicator');
192
  $page_packages = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator', 'duplicator_get_menu');
 
 
 
 
 
193
 
194
  $perms = 'manage_options';
195
  $perms = apply_filters($wpfront_caps_translator, $perms);
196
  $lang_txt = __('Settings', 'duplicator');
197
  $page_settings = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-settings', 'duplicator_get_menu');
198
 
199
- $perms = 'manage_options';
200
- $perms = apply_filters($wpfront_caps_translator, $perms);
201
- $lang_txt = __('Tools', 'duplicator');
202
- $page_tools = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-tools', 'duplicator_get_menu');
203
-
204
  $perms = 'manage_options';
205
  $perms = apply_filters($wpfront_caps_translator, $perms);
206
  $lang_txt = __('Help', 'duplicator');
@@ -211,18 +219,22 @@ if (is_admin() == true) {
211
  $lang_txt = __('About', 'duplicator');
212
  $page_about = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-about', 'duplicator_get_menu');
213
 
214
- //$perms = 'manage_options';
215
- //$lang_txt = __('Perks', 'duplicator');
216
- //$perms = apply_filters($wpfront_caps_translator, $perms);
217
- //$page_perks = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-perks', 'duplicator_get_menu');
218
-
219
  $perms = 'manage_options';
220
  $lang_txt = __('Go Pro!', 'duplicator');
221
  $go_pro_link = '<span style="color:#f18500">' . $lang_txt . '</span>';
222
  $perms = apply_filters($wpfront_caps_translator, $perms);
223
  $page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
224
 
225
-
 
 
 
 
 
 
 
 
 
226
 
227
  //Apply Scripts
228
  add_action('admin_print_scripts-' . $page_packages, 'duplicator_scripts');
@@ -230,16 +242,14 @@ if (is_admin() == true) {
230
  add_action('admin_print_scripts-' . $page_help, 'duplicator_scripts');
231
  add_action('admin_print_scripts-' . $page_tools, 'duplicator_scripts');
232
  add_action('admin_print_scripts-' . $page_about, 'duplicator_scripts');
233
- //add_action('admin_print_scripts-' . $page_perks, 'duplicator_scripts');
234
  add_action('admin_print_scripts-' . $page_gopro, 'duplicator_scripts');
235
-
236
  //Apply Styles
237
  add_action('admin_print_styles-' . $page_packages, 'duplicator_styles');
238
  add_action('admin_print_styles-' . $page_settings, 'duplicator_styles');
239
  add_action('admin_print_styles-' . $page_help, 'duplicator_styles');
240
  add_action('admin_print_styles-' . $page_tools, 'duplicator_styles');
241
  add_action('admin_print_styles-' . $page_about, 'duplicator_styles');
242
- //add_action('admin_print_styles-' . $page_perks, 'duplicator_styles');
243
  add_action('admin_print_styles-' . $page_gopro, 'duplicator_styles');
244
 
245
  }
@@ -253,6 +263,7 @@ if (is_admin() == true) {
253
  wp_enqueue_script('jquery-ui-progressbar');
254
  wp_enqueue_script('dup-parsley');
255
  wp_enqueue_script('dup-jquery-qtip');
 
256
  }
257
 
258
  /**
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
6
+ Version: 1.1.28
7
+ Author: Snap Creek
8
+ Author URI: http://www.snapcreek.com/duplicator/
9
  Text Domain: duplicator
 
10
  License: GPLv2 or later
11
  */
12
 
13
  /* ================================================================================
14
+ Copyright 2011-2017 SnapCreek LLC
15
 
16
  This program is free software; you can redistribute it and/or modify
17
  it under the terms of the GNU General Public License, version 2, as
34
 
35
  require_once("define.php");
36
 
37
+ if (is_admin() == true)
38
+ {
39
+ //Classes
40
  require_once 'classes/logging.php';
41
  require_once 'classes/utility.php';
 
42
  require_once 'classes/settings.php';
43
  require_once 'classes/server.php';
44
  require_once 'classes/package.php';
45
+ require_once 'classes/ui.php';
46
+
47
+ //Controllers
48
+ require_once 'views/actions.php';
49
+ require_once 'ctrls/ctrl.tools.php';
50
+ require_once 'ctrls/ctrl.ui.php';
51
 
52
+
53
  /* ACTIVATION
54
  Only called when plugin is activated */
55
  function duplicator_activate()
117
  }
118
 
119
  //HOOKS
120
+ register_activation_hook(__FILE__, 'duplicator_activate');
121
  register_deactivation_hook(__FILE__, 'duplicator_deactivate');
122
 
123
  //ACTIONS
124
+ add_action('plugins_loaded', 'duplicator_update');
125
+ add_action('plugins_loaded', 'duplicator_wpfront_integrate');
126
+ add_action('admin_init', 'duplicator_init');
127
+ add_action('admin_menu', 'duplicator_menu');
128
+ add_action('admin_notices', array('DUP_UI', 'ShowReservedFilesNotice'));
129
+
130
+ //CTRL ACTIONS
131
+ add_action('wp_ajax_duplicator_package_scan', 'duplicator_package_scan');
132
+ add_action('wp_ajax_duplicator_package_build', 'duplicator_package_build');
133
+ add_action('wp_ajax_duplicator_package_delete', 'duplicator_package_delete');
134
+ $GLOBALS['CTRLS_DUP_CTRL_UI'] = new DUP_CTRL_UI();
135
+ $GLOBALS['CTRLS_DUP_CTRL_Tools'] = new DUP_CTRL_Tools();
136
+
137
  //FILTERS
138
  add_filter('plugin_action_links', 'duplicator_manage_link', 10, 2);
139
  add_filter('plugin_row_meta', 'duplicator_meta_links', 10, 2);
154
  wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
155
  wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
156
  /* JS */
157
+ wp_register_script('dup-handlebars', DUPLICATOR_PLUGIN_URL . 'assets/js/handlebars.min.js', array('jquery'), '4.0.6');
158
  wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
159
  wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
160
  }
163
  function duplicator_get_menu() {
164
  $current_page = isset($_REQUEST['page']) ? esc_html($_REQUEST['page']) : 'duplicator';
165
  switch ($current_page) {
166
+ case 'duplicator': include('views/packages/controller.php');
167
  break;
168
  case 'duplicator-settings': include('views/settings/controller.php');
169
  break;
170
+ case 'duplicator-tools': include('views/tools/controller.php');
171
  break;
172
+ case 'duplicator-debug': include('debug/main.php');
173
  break;
174
+ case 'duplicator-help': include('views/help/help.php');
 
 
 
175
  break;
176
+ case 'duplicator-about': include('views/help/about.php');
177
+ break;
178
+ case 'duplicator-gopro': include('views/help/gopro.php');
179
  break;
180
 
181
  }
198
  $perms = apply_filters($wpfront_caps_translator, $perms);
199
  $lang_txt = __('Packages', 'duplicator');
200
  $page_packages = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator', 'duplicator_get_menu');
201
+
202
+ $perms = 'manage_options';
203
+ $perms = apply_filters($wpfront_caps_translator, $perms);
204
+ $lang_txt = __('Tools', 'duplicator');
205
+ $page_tools = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-tools', 'duplicator_get_menu');
206
 
207
  $perms = 'manage_options';
208
  $perms = apply_filters($wpfront_caps_translator, $perms);
209
  $lang_txt = __('Settings', 'duplicator');
210
  $page_settings = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-settings', 'duplicator_get_menu');
211
 
 
 
 
 
 
212
  $perms = 'manage_options';
213
  $perms = apply_filters($wpfront_caps_translator, $perms);
214
  $lang_txt = __('Help', 'duplicator');
219
  $lang_txt = __('About', 'duplicator');
220
  $page_about = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-about', 'duplicator_get_menu');
221
 
 
 
 
 
 
222
  $perms = 'manage_options';
223
  $lang_txt = __('Go Pro!', 'duplicator');
224
  $go_pro_link = '<span style="color:#f18500">' . $lang_txt . '</span>';
225
  $perms = apply_filters($wpfront_caps_translator, $perms);
226
  $page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
227
 
228
+ $package_debug = DUP_Settings::Get('package_debug');
229
+ if ($package_debug != null && $package_debug == true)
230
+ {
231
+ $perms = 'manage_options';
232
+ $perms = apply_filters($wpfront_caps_translator, $perms);
233
+ $lang_txt = __('Debug', 'duplicator');
234
+ $page_debug = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-debug', 'duplicator_get_menu');
235
+ add_action('admin_print_scripts-' . $page_debug, 'duplicator_scripts');
236
+ add_action('admin_print_styles-' . $page_debug, 'duplicator_styles');
237
+ }
238
 
239
  //Apply Scripts
240
  add_action('admin_print_scripts-' . $page_packages, 'duplicator_scripts');
242
  add_action('admin_print_scripts-' . $page_help, 'duplicator_scripts');
243
  add_action('admin_print_scripts-' . $page_tools, 'duplicator_scripts');
244
  add_action('admin_print_scripts-' . $page_about, 'duplicator_scripts');
 
245
  add_action('admin_print_scripts-' . $page_gopro, 'duplicator_scripts');
246
+
247
  //Apply Styles
248
  add_action('admin_print_styles-' . $page_packages, 'duplicator_styles');
249
  add_action('admin_print_styles-' . $page_settings, 'duplicator_styles');
250
  add_action('admin_print_styles-' . $page_help, 'duplicator_styles');
251
  add_action('admin_print_styles-' . $page_tools, 'duplicator_styles');
252
  add_action('admin_print_styles-' . $page_about, 'duplicator_styles');
 
253
  add_action('admin_print_styles-' . $page_gopro, 'duplicator_styles');
254
 
255
  }
263
  wp_enqueue_script('jquery-ui-progressbar');
264
  wp_enqueue_script('dup-parsley');
265
  wp_enqueue_script('dup-jquery-qtip');
266
+
267
  }
268
 
269
  /**
installer/build/ajax.step1.php CHANGED
@@ -309,7 +309,7 @@ DUPX_Log::Info("{$GLOBALS['SEPERATOR1']}");
309
  DUPX_Log::Info('DATABASE-ROUTINES');
310
  DUPX_Log::Info("{$GLOBALS['SEPERATOR1']}");
311
  DUPX_Log::Info("--------------------------------------");
312
- DUPX_Log::Info("SERVER ENVIROMENT");
313
  DUPX_Log::Info("--------------------------------------");
314
  DUPX_Log::Info("MYSQL VERSION:\tThis Server: {$dbvar_version} -- Build Server: {$GLOBALS['FW_VERSION_DB']}");
315
  DUPX_Log::Info("TIMEOUT:\t{$dbvar_maxtime}");
309
  DUPX_Log::Info('DATABASE-ROUTINES');
310
  DUPX_Log::Info("{$GLOBALS['SEPERATOR1']}");
311
  DUPX_Log::Info("--------------------------------------");
312
+ DUPX_Log::Info("SERVER ENVIRONMENT");
313
  DUPX_Log::Info("--------------------------------------");
314
  DUPX_Log::Info("MYSQL VERSION:\tThis Server: {$dbvar_version} -- Build Server: {$GLOBALS['FW_VERSION_DB']}");
315
  DUPX_Log::Info("TIMEOUT:\t{$dbvar_maxtime}");
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: www.lifeinthegrid.com/partner
4
  Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche site
5
  Requires at least: 4.0
6
  Tested up to: 4.7
7
- Stable tag: 1.1.26
8
  License: GPLv2
9
 
10
  Duplicate, clone, backup, move and transfer an entire site from one location to another.
4
  Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche site
5
  Requires at least: 4.0
6
  Tested up to: 4.7
7
+ Stable tag: 1.1.28
8
  License: GPLv2
9
 
10
  Duplicate, clone, backup, move and transfer an entire site from one location to another.
views/help/about.php CHANGED
@@ -49,7 +49,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
49
  </td>
50
  <td valign="top" style="padding-top:10px; font-size:14px">
51
  <?php
52
- _e("Created for Admins, Developers and Designers the Duplicator can streamline your workflows and help you quickly clone a WordPress application. Migrating a WordPress site manually can be very time consuming. The Duplicator was made to help you speed up the migration process. Please help us to continue the development effort of this plugin.", 'duplicator');
53
  ?>
54
  </td>
55
  </tr>
@@ -110,11 +110,11 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
110
  <br style="clear:both" /><br/>
111
 
112
 
113
- <div style='margin: auto; text-align: center; margin-top: 20px'>
114
  <a href="http://lifeinthegrid.com/tools" target="_blank" class="button button-large button-primary">
115
  <i class="fa fa-rocket" style="margin-right:8px"></i><?php _e('Get More Great Tools', 'duplicator') ?>...
116
  </a>
117
- </div>
118
 
119
  </div>
120
  </div><br/><br/><br/><br/>
49
  </td>
50
  <td valign="top" style="padding-top:10px; font-size:14px">
51
  <?php
52
+ _e("Duplicator helps you streamlines your workflows and quickly clone a WordPress site. The plugin was made to help you speed up the migration process of moving a WordPress site. Please help us to continue in the development effort of this plugin with a 5 star.", 'duplicator');
53
  ?>
54
  </td>
55
  </tr>
110
  <br style="clear:both" /><br/>
111
 
112
 
113
+ <!--div style='margin: auto; text-align: center; margin-top: 20px'>
114
  <a href="http://lifeinthegrid.com/tools" target="_blank" class="button button-large button-primary">
115
  <i class="fa fa-rocket" style="margin-right:8px"></i><?php _e('Get More Great Tools', 'duplicator') ?>...
116
  </a>
117
+ </div-->
118
 
119
  </div>
120
  </div><br/><br/><br/><br/>
views/packages/details/detail.php CHANGED
@@ -25,7 +25,7 @@ $dbbuild_mode = ($mysqldump_on) ? 'mysqldump (fast)' : 'PHP (slow)';
25
  table.dup-dtl-data-tbl {width:100%}
26
  table.dup-dtl-data-tbl tr {vertical-align: top}
27
  table.dup-dtl-data-tbl tr:first-child td {margin:0; padding-top:0 !important;}
28
- table.dup-dtl-data-tbl td {padding:0 6px 0 0; padding-top:15px !important;}
29
  table.dup-dtl-data-tbl td:first-child {font-weight: bold; width:150px}
30
  table.dup-sub-list td:first-child {white-space: nowrap; vertical-align: middle; width: 70px !important;}
31
  table.dup-sub-list td {white-space: nowrap; vertical-align:top; padding:0 !important; font-size:12px}
@@ -120,15 +120,15 @@ GENERAL -->
120
  <table class="dup-sub-list">
121
  <tr>
122
  <td><?php _e('Archive', 'duplicator') ?>: </td>
123
- <td><?php echo $package->Archive->File ?></td>
124
  </tr>
125
  <tr>
126
  <td><?php _e('Installer', 'duplicator') ?>: </td>
127
- <td><?php echo $package->Installer->File ?></td>
128
  </tr>
129
  <tr>
130
  <td><?php _e('Database', 'duplicator') ?>: </td>
131
- <td><?php echo $package->Database->File ?></td>
132
  </tr>
133
  </table>
134
  <?php endif; ?>
25
  table.dup-dtl-data-tbl {width:100%}
26
  table.dup-dtl-data-tbl tr {vertical-align: top}
27
  table.dup-dtl-data-tbl tr:first-child td {margin:0; padding-top:0 !important;}
28
+ table.dup-dtl-data-tbl td {padding:0 6px 0 0; padding-top:10px !important;}
29
  table.dup-dtl-data-tbl td:first-child {font-weight: bold; width:150px}
30
  table.dup-sub-list td:first-child {white-space: nowrap; vertical-align: middle; width: 70px !important;}
31
  table.dup-sub-list td {white-space: nowrap; vertical-align:top; padding:0 !important; font-size:12px}
120
  <table class="dup-sub-list">
121
  <tr>
122
  <td><?php _e('Archive', 'duplicator') ?>: </td>
123
+ <td><a href="<?php echo $link_archive ?>" target="_blank"><?php echo $package->Archive->File ?></a></td>
124
  </tr>
125
  <tr>
126
  <td><?php _e('Installer', 'duplicator') ?>: </td>
127
+ <td><a href="<?php echo $link_installer ?>" target="_blank"><?php echo $package->Installer->File ?></a></td>
128
  </tr>
129
  <tr>
130
  <td><?php _e('Database', 'duplicator') ?>: </td>
131
+ <td><a href="<?php echo $link_sql ?>" target="_blank"><?php echo $package->Database->File ?></a></td>
132
  </tr>
133
  </table>
134
  <?php endif; ?>
views/packages/main/controller.php CHANGED
@@ -4,25 +4,22 @@ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
4
 
5
  <style>
6
  //TOOLBAR TABLE
7
- table#dup-toolbar td {padding:0px; white-space:nowrap;}
8
- table#dup-toolbar td.dup-toolbar-btns {width:100%; text-align: right; vertical-align: bottom;white-space:nowrap;}
9
- table#dup-toolbar td.dup-toolbar-btns a {font-size:16px}
10
- table#dup-toolbar td.dup-toolbar-btns span {font-size:16px; font-weight: bold}
11
- table#dup-toolbar {width:100%; border:0 solid red; padding: 0; margin:0 0 10px 0; height: 35px}
 
12
 
13
  /*WIZARD TABS */
14
  div#dup-wiz {padding:0px; margin:0; }
15
  div#dup-wiz-steps {margin:10px 0px 0px 10px; padding:0px; clear:both; font-size:13px; min-width:350px;}
16
  div#dup-wiz-title {padding:2px 0px 0px 0px; font-size:18px;}
17
- /* wiz-steps default*/
18
  #dup-wiz a { position:relative; display:block; width:auto; min-width:55px; height:25px; margin-right:8px; padding:0px 10px 0px 10px; float:left; line-height:24px;
19
  color:#000; background:#E4E4E4; border-radius:5px; letter-spacing:1px; border:1px solid #E4E4E4; text-align: center }
20
- /* wiz-steps active*/
21
  #dup-wiz .active-step a {color:#fff; background:#ACACAC; font-weight: bold; border:1px solid #888}
22
- #dup-wiz .active-step span {color:#fff; border:1px solid #fff;}
23
- /* wiz-steps completed */
24
  #dup-wiz .completed-step a {color:#E1E1E1; background:#BBBBBB; }
25
- #dup-wiz .completed-step span {color:#E1E1E1;}
26
  /*Footer */
27
  div.dup-button-footer input {min-width: 105px}
28
  div.dup-button-footer {padding: 1px 10px 0px 0px; text-align: right}
4
 
5
  <style>
6
  //TOOLBAR TABLE
7
+ table#dup-toolbar td {white-space: nowrap !important; padding:10px 0 0 0}
8
+ table#dup-toolbar {width:100%; border:0 solid red; padding: 0; margin:8px 0 4px 0; height: 35px}
9
+ table#dup-toolbar td:last-child {font-size:16px; width:100%; text-align: right; vertical-align: bottom;white-space:nowrap;}
10
+ table#dup-toolbar td:last-child a {top:0; font-size:16px !important; margin-top:10px }
11
+ table#dup-toolbar td:last-child span {display:inline-block; font-weight: bold; padding:0 12px 5px 5px; color:#000}
12
+ hr.dup-toolbar-line {margin:2px 0 10px 0}
13
 
14
  /*WIZARD TABS */
15
  div#dup-wiz {padding:0px; margin:0; }
16
  div#dup-wiz-steps {margin:10px 0px 0px 10px; padding:0px; clear:both; font-size:13px; min-width:350px;}
17
  div#dup-wiz-title {padding:2px 0px 0px 0px; font-size:18px;}
 
18
  #dup-wiz a { position:relative; display:block; width:auto; min-width:55px; height:25px; margin-right:8px; padding:0px 10px 0px 10px; float:left; line-height:24px;
19
  color:#000; background:#E4E4E4; border-radius:5px; letter-spacing:1px; border:1px solid #E4E4E4; text-align: center }
 
20
  #dup-wiz .active-step a {color:#fff; background:#ACACAC; font-weight: bold; border:1px solid #888}
 
 
21
  #dup-wiz .completed-step a {color:#E1E1E1; background:#BBBBBB; }
22
+
23
  /*Footer */
24
  div.dup-button-footer input {min-width: 105px}
25
  div.dup-button-footer {padding: 1px 10px 0px 0px; text-align: right}
views/packages/main/new1.setup.php CHANGED
@@ -22,10 +22,14 @@ $dup_tests = array();
22
  $dup_tests = DUP_Server::GetRequirements();
23
  $default_name = DUP_Package::GetDefaultName();
24
 
25
- $view_state = DUP_UI::GetViewStateArray();
26
- $ui_css_storage = (isset($view_state['dup-pack-storage-panel']) && $view_state['dup-pack-storage-panel']) ? 'display:block' : 'display:none';
27
- $ui_css_archive = (isset($view_state['dup-pack-archive-panel']) && $view_state['dup-pack-archive-panel']) ? 'display:block' : 'display:none';
28
- $ui_css_installer = (isset($view_state['dup-pack-installer-panel']) && $view_state['dup-pack-installer-panel']) ? 'display:block' : 'display:none';
 
 
 
 
29
  $dup_intaller_files = implode(", ", array_keys(DUP_Server::GetInstallerFiles()));
30
  $dbbuild_mode = (DUP_Settings::Get('package_mysqldump') && DUP_Database::GetMySqlDumpPath()) ? 'mysqldump' : 'PHP';
31
 
@@ -61,13 +65,13 @@ TOOL BAR: STEPS -->
61
  </div>
62
  </div>
63
  </td>
64
- <td class="dup-toolbar-btns">
65
- <a id="dup-pro-create-new" href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></a> &nbsp;
66
- <span> <?php _e("Create New", 'duplicator'); ?></span>
67
  </td>
68
  </tr>
69
  </table>
70
- <hr style="margin-bottom:8px">
71
 
72
  <?php if (!empty($action_response)) : ?>
73
  <div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
22
  $dup_tests = DUP_Server::GetRequirements();
23
  $default_name = DUP_Package::GetDefaultName();
24
 
25
+ //View State
26
+ $ctrl_ui = new DUP_CTRL_UI();
27
+ $ctrl_ui->SetResponseType('PHP');
28
+ $data = $ctrl_ui->GetViewStateList();
29
+
30
+ $ui_css_storage = (isset($data->Payload['dup-pack-storage-panel']) && $data->Payload['dup-pack-storage-panel']) ? 'display:block' : 'display:none';
31
+ $ui_css_archive = (isset($data->Payload['dup-pack-archive-panel']) && $data->Payload['dup-pack-archive-panel']) ? 'display:block' : 'display:none';
32
+ $ui_css_installer = (isset($data->Payload['dup-pack-installer-panel']) && $data->Payload['dup-pack-installer-panel']) ? 'display:block' : 'display:none';
33
  $dup_intaller_files = implode(", ", array_keys(DUP_Server::GetInstallerFiles()));
34
  $dbbuild_mode = (DUP_Settings::Get('package_mysqldump') && DUP_Database::GetMySqlDumpPath()) ? 'mysqldump' : 'PHP';
35
 
65
  </div>
66
  </div>
67
  </td>
68
+ <td>
69
+ <a id="dup-pro-create-new" href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></a>
70
+ <span> <?php _e("Create New", 'duplicator'); ?></span>
71
  </td>
72
  </tr>
73
  </table>
74
+ <hr class="dup-toolbar-line">
75
 
76
  <?php if (!empty($action_response)) : ?>
77
  <div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
views/packages/main/new2.scan.php CHANGED
@@ -35,7 +35,7 @@
35
  PROGRESS ARES-CHECKS */
36
  div#dup-progress-area {text-align:center; max-width:650px; min-height:200px; margin:0px auto 0px auto; padding:0px;}
37
  div.dup-progress-title {font-size:22px; padding:5px 0 20px 0; font-weight: bold}
38
- div#dup-msg-success {color:#18592A; padding:5px; text-align: left}
39
  div#dup-msg-success-subtitle {font-style: italic; margin:7px 0px}
40
  div#dup-msg-error {color:#A62426; padding:5px; max-width: 790px;}
41
  div#dup-msg-error-response-text { max-height:500px; overflow-y:scroll; border:1px solid silver; border-radius:3px; padding:10px;background:#fff}
@@ -91,13 +91,13 @@ TOOL BAR: STEPS -->
91
  </div>
92
  </div>
93
  </td>
94
- <td class="dup-toolbar-btns">
95
- <a id="dup-pro-create-new" href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e('All Packages', 'duplicator'); ?></a> &nbsp;
96
  <span> <?php _e('Create New', 'duplicator'); ?></span>
97
  </td>
98
  </tr>
99
  </table>
100
- <hr style="margin-bottom:10px">
101
 
102
 
103
  <form id="form-duplicator" method="post" action="?page=duplicator&tab=new3">
@@ -226,7 +226,7 @@ TOOL BAR: STEPS -->
226
  </div><!-- end .dup-panel -->
227
  </div><!-- end .dup-panel-panel -->
228
 
229
- <h2 style="font-size:18px; font-weight:bold; margin:-15px 0 0 10px"><i class="fa fa-file-archive-o"></i>&nbsp;<?php _e('Archive', 'duplicator');?> </h2>
230
 
231
  <!-- ================================================================
232
  FILES
@@ -351,7 +351,6 @@ TOOL BAR: STEPS -->
351
  </div>
352
  <?php endif; ?>
353
  </div><!-- end .dup-panel -->
354
- <br/>
355
 
356
  <!-- ================================================================
357
  DATABASE
35
  PROGRESS ARES-CHECKS */
36
  div#dup-progress-area {text-align:center; max-width:650px; min-height:200px; margin:0px auto 0px auto; padding:0px;}
37
  div.dup-progress-title {font-size:22px; padding:5px 0 20px 0; font-weight: bold}
38
+ div#dup-msg-success {padding:5px; text-align: left}
39
  div#dup-msg-success-subtitle {font-style: italic; margin:7px 0px}
40
  div#dup-msg-error {color:#A62426; padding:5px; max-width: 790px;}
41
  div#dup-msg-error-response-text { max-height:500px; overflow-y:scroll; border:1px solid silver; border-radius:3px; padding:10px;background:#fff}
91
  </div>
92
  </div>
93
  </td>
94
+ <td>
95
+ <a id="dup-pro-create-new" href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e('All Packages', 'duplicator'); ?></a>
96
  <span> <?php _e('Create New', 'duplicator'); ?></span>
97
  </td>
98
  </tr>
99
  </table>
100
+ <hr class="dup-toolbar-line">
101
 
102
 
103
  <form id="form-duplicator" method="post" action="?page=duplicator&tab=new3">
226
  </div><!-- end .dup-panel -->
227
  </div><!-- end .dup-panel-panel -->
228
 
229
+ <h2 style="font-size:18px; font-weight:bold; margin:-10px 0 5px 10px"><i class="fa fa-file-archive-o"></i>&nbsp;<?php _e('Archive', 'duplicator');?> </h2>
230
 
231
  <!-- ================================================================
232
  FILES
351
  </div>
352
  <?php endif; ?>
353
  </div><!-- end .dup-panel -->
 
354
 
355
  <!-- ================================================================
356
  DATABASE
views/packages/main/new3.build.php CHANGED
@@ -42,13 +42,13 @@ TOOL BAR: STEPS -->
42
  </div>
43
  </div>
44
  </td>
45
- <td class="dup-toolbar-btns">
46
  <a id="dup-pro-create-new" href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></a> &nbsp;
47
  <span> <?php _e("Create New", 'duplicator'); ?></span>
48
  </td>
49
  </tr>
50
  </table>
51
- <hr style="margin-bottom:10px">
52
 
53
 
54
  <form id="form-duplicator" method="post" action="?page=duplicator">
@@ -90,7 +90,7 @@ TOOL BAR: STEPS -->
90
  <small><i><?php _e("click buttons to download", 'duplicator') ?></i></small>
91
  </div>
92
  <div class="dup-msg-success-links">
93
- <?php printf("<a href='?page=duplicator'>[ %s ]</a>", __('All Packages', 'duplicator'));?> &nbsp;
94
  <?php printf("<a href='?page=duplicator&tab=new1'>[ %s ]</a>", __('Create New', 'duplicator'));?>
95
  </div><br/>
96
 
42
  </div>
43
  </div>
44
  </td>
45
+ <td>
46
  <a id="dup-pro-create-new" href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></a> &nbsp;
47
  <span> <?php _e("Create New", 'duplicator'); ?></span>
48
  </td>
49
  </tr>
50
  </table>
51
+ <hr class="dup-toolbar-line">
52
 
53
 
54
  <form id="form-duplicator" method="post" action="?page=duplicator">
90
  <small><i><?php _e("click buttons to download", 'duplicator') ?></i></small>
91
  </div>
92
  <div class="dup-msg-success-links">
93
+ <?php printf("<a href='?page=duplicator'>[ %s ]</a>", __('All Packages', 'duplicator'));?>
94
  <?php printf("<a href='?page=duplicator&tab=new1'>[ %s ]</a>", __('Create New', 'duplicator'));?>
95
  </div><br/>
96
 
views/packages/main/packages.php CHANGED
@@ -57,8 +57,8 @@ TOOL-BAR -->
57
  <td align="center" >
58
  <a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
59
  </td>
60
- <td class="dup-toolbar-btns">
61
- <span><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></span> &nbsp;
62
  <a id="dup-pro-create-new" href="?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a>
63
  </td>
64
  </tr>
57
  <td align="center" >
58
  <a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
59
  </td>
60
+ <td>
61
+ <span><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></span>
62
  <a id="dup-pro-create-new" href="?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a>
63
  </td>
64
  </tr>
views/settings/general.php CHANGED
@@ -208,21 +208,18 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
208
 
209
  <label><?php _e("Add Custom Path:", 'duplicator'); ?></label><br/>
210
  <input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo $package_mysqldump_path; ?> " />
211
- <p class="description">
212
- <?php
213
- _e("This is the path to your mysqldump program.", 'duplicator');
214
- ?>
215
- </p>
216
  </div>
217
 
218
  <?php endif; ?>
219
  </td>
220
  </tr>
221
  <tr>
222
- <th scope="row"><label><?php _e("Package Debug", 'duplicator'); ?></label></th>
223
  <td>
224
  <input type="checkbox" name="package_debug" id="package_debug" <?php echo ($package_debug) ? 'checked="checked"' : ''; ?> />
225
- <label for="package_debug"><?php _e("Show Package Debug Status in Packages Screen", 'duplicator'); ?></label>
 
226
  </td>
227
  </tr>
228
 
208
 
209
  <label><?php _e("Add Custom Path:", 'duplicator'); ?></label><br/>
210
  <input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo $package_mysqldump_path; ?> " />
211
+ <p class="description"><?php _e("This is the path to your mysqldump program.", 'duplicator'); ?></p>
 
 
 
 
212
  </div>
213
 
214
  <?php endif; ?>
215
  </td>
216
  </tr>
217
  <tr>
218
+ <th scope="row"><label><?php _e("Debugging", 'duplicator'); ?></label></th>
219
  <td>
220
  <input type="checkbox" name="package_debug" id="package_debug" <?php echo ($package_debug) ? 'checked="checked"' : ''; ?> />
221
+ <label for="package_debug"><?php _e("Enable debug options throughout user interface", 'duplicator'); ?></label>
222
+ <p class="description"><?php _e("Refresh page after saving to show/hide Debug menu", 'duplicator'); ?></p>
223
  </td>
224
  </tr>
225
 
views/tools/controller.php CHANGED
@@ -23,7 +23,7 @@ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'logging';
23
  switch ($current_tab) {
24
  case 'logging': include('logging.php');
25
  break;
26
- case 'diagnostics': include('diagnostics.php');
27
  break;
28
  case 'cleanup': include('cleanup.php');
29
  break;
23
  switch ($current_tab) {
24
  case 'logging': include('logging.php');
25
  break;
26
+ case 'diagnostics': include('diagnostics/main.php');
27
  break;
28
  case 'cleanup': include('cleanup.php');
29
  break;
views/tools/diagnostics/inc.data.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $sql = "SELECT * FROM `{$wpdb->prefix}options` WHERE `option_name` LIKE '%duplicator_%' ORDER BY option_name";
4
+
5
+ ?>
6
+
7
+ <!-- ==============================
8
+ OPTIONS DATA -->
9
+ <div class="dup-box">
10
+ <div class="dup-box-title">
11
+ <i class="fa fa-th-list"></i>
12
+ <?php _e("Stored Data", 'duplicator'); ?>
13
+ <div class="dup-box-arrow"></div>
14
+ </div>
15
+ <div class="dup-box-panel" id="dup-settings-diag-opts-panel" style="<?php echo $ui_css_opts_panel?>">
16
+ <div style="padding:0px 20px 0px 25px">
17
+ <h3 class="title" style="margin-left:-15px"><?php _e("Options Values", 'duplicator') ?> </h3>
18
+
19
+ <table class="widefat" cellspacing="0">
20
+ <tr>
21
+ <th>Key</th>
22
+ <th>Value</th>
23
+ </tr>
24
+ <?php
25
+ foreach( $wpdb->get_results("{$sql}") as $key => $row) { ?>
26
+ <tr>
27
+ <td>
28
+ <?php
29
+ echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
30
+ ? "<a href='javascript:void(0)' onclick='Duplicator.Settings.DeleteOption(this)'>{$row->option_name}</a>"
31
+ : $row->option_name;
32
+ ?>
33
+ </td>
34
+ <td><textarea class="dup-opts-read" readonly="readonly"><?php echo $row->option_value?></textarea></td>
35
+ </tr>
36
+ <?php } ?>
37
+ </table>
38
+ </div>
39
+
40
+ </div>
41
+ </div>
42
+ <br/>
43
+
44
+ <script>
45
+ jQuery(document).ready(function($)
46
+ {
47
+ Duplicator.Settings.DeleteOption = function (anchor)
48
+ {
49
+ var key = $(anchor).text();
50
+ var result = confirm('<?php _e("Delete this option value", "duplicator"); ?> [' + key + '] ?');
51
+ if (! result) return;
52
+
53
+ jQuery('#dup-settings-form-action').val(key);
54
+ jQuery('#dup-settings-form').submit();
55
+ }
56
+ });
57
+ </script>
views/tools/diagnostics/inc.phpinfo.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ ob_start();
4
+ phpinfo();
5
+ $serverinfo = ob_get_contents();
6
+ ob_end_clean();
7
+
8
+ $serverinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms', '$1', $serverinfo);
9
+ $serverinfo = preg_replace( '%^.*<title>(.*)</title>.*$%ms','$1', $serverinfo);
10
+ ?>
11
+
12
+
13
+
14
+ <!-- ==============================
15
+ PHP INFORMATION -->
16
+ <div class="dup-box">
17
+ <div class="dup-box-title">
18
+ <i class="fa fa-info-circle"></i>
19
+ <?php _e("PHP Information", 'duplicator'); ?>
20
+ <div class="dup-box-arrow"></div>
21
+ </div>
22
+ <div class="dup-box-panel" style="display:none">
23
+ <div id="dup-phpinfo" style="width:95%">
24
+ <?php
25
+ echo "<div id='dup-server-info-area'>{$serverinfo}</div>";
26
+ $serverinfo = null;
27
+ ?>
28
+ </div><br/>
29
+ </div>
30
+ </div>
31
+ <br/>
views/tools/diagnostics/inc.settings.php ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $dbvar_maxtime = DUP_Util::MysqlVariableValue('wait_timeout');
3
+ $dbvar_maxpacks = DUP_Util::MysqlVariableValue('max_allowed_packet');
4
+ $dbvar_maxtime = is_null($dbvar_maxtime) ? __("unknow", 'duplicator') : $dbvar_maxtime;
5
+ $dbvar_maxpacks = is_null($dbvar_maxpacks) ? __("unknow", 'duplicator') : $dbvar_maxpacks;
6
+
7
+ $space = @disk_total_space(DUPLICATOR_WPROOTPATH);
8
+ $space_free = @disk_free_space(DUPLICATOR_WPROOTPATH);
9
+ $perc = @round((100/$space)*$space_free,2);
10
+ $mysqldumpPath = DUP_Database::GetMySqlDumpPath();
11
+ $mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';
12
+
13
+ $client_ip_address = DUP_Server::GetClientIP();
14
+ ?>
15
+
16
+ <!-- ==============================
17
+ SERVER SETTINGS -->
18
+ <div class="dup-box">
19
+ <div class="dup-box-title">
20
+ <i class="fa fa-tachometer"></i>
21
+ <?php _e("Server Settings", 'duplicator') ?>
22
+ <div class="dup-box-arrow"></div>
23
+ </div>
24
+ <div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo $ui_css_srv_panel?>">
25
+ <table class="widefat" cellspacing="0">
26
+ <tr>
27
+ <td class='dup-settings-diag-header' colspan="2"><?php _e("General", 'duplicator'); ?></td>
28
+ </tr>
29
+ <tr>
30
+ <td><?php _e("Duplicator Version", 'duplicator'); ?></td>
31
+ <td><?php echo DUPLICATOR_VERSION ?></td>
32
+ </tr>
33
+ <tr>
34
+ <td><?php _e("Operating System", 'duplicator'); ?></td>
35
+ <td><?php echo PHP_OS ?></td>
36
+ </tr>
37
+ <tr>
38
+ <td><?php _e("Timezone", 'duplicator'); ?></td>
39
+ <td><?php echo date_default_timezone_get() ; ?> &nbsp; <small><i>This is a <a href='options-general.php'>WordPress setting</a></i></small></td>
40
+ </tr>
41
+ <tr>
42
+ <td><?php _e("Server Time", 'duplicator'); ?></td>
43
+ <td><?php echo date("Y-m-d H:i:s"); ?></td>
44
+ </tr>
45
+ <tr>
46
+ <td><?php _e("Web Server", 'duplicator'); ?></td>
47
+ <td><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td>
48
+ </tr>
49
+ <tr>
50
+ <td><?php _e("APC Enabled", 'duplicator'); ?></td>
51
+ <td><?php echo DUP_Util::RunAPC() ? 'Yes' : 'No' ?></td>
52
+ </tr>
53
+ <tr>
54
+ <td><?php _e("Root Path", 'duplicator'); ?></td>
55
+ <td><?php echo DUPLICATOR_WPROOTPATH ?></td>
56
+ </tr>
57
+ <tr>
58
+ <td><?php _e("ABSPATH", 'duplicator'); ?></td>
59
+ <td><?php echo ABSPATH ?></td>
60
+ </tr>
61
+ <tr>
62
+ <td><?php _e("Plugins Path", 'duplicator'); ?></td>
63
+ <td><?php echo DUP_Util::SafePath(WP_PLUGIN_DIR) ?></td>
64
+ </tr>
65
+ <tr>
66
+ <td><?php _e("Loaded PHP INI", 'duplicator'); ?></td>
67
+ <td><?php echo php_ini_loaded_file() ;?></td>
68
+ </tr>
69
+ <tr>
70
+ <td><?php _e("Server IP", 'duplicator'); ?></td>
71
+ <td><?php echo $_SERVER['SERVER_ADDR'];?></td>
72
+ </tr>
73
+ <tr>
74
+ <td><?php _e("Client IP", 'duplicator'); ?></td>
75
+ <td><?php echo $client_ip_address;?></td>
76
+ </tr>
77
+ <tr>
78
+ <td class='dup-settings-diag-header' colspan="2">WordPress</td>
79
+ </tr>
80
+ <tr>
81
+ <td><?php _e("Version", 'duplicator'); ?></td>
82
+ <td><?php echo $wp_version ?></td>
83
+ </tr>
84
+ <tr>
85
+ <td><?php _e("Language", 'duplicator'); ?></td>
86
+ <td><?php echo get_bloginfo('language') ?></td>
87
+ </tr>
88
+ <tr>
89
+ <td><?php _e("Charset", 'duplicator'); ?></td>
90
+ <td><?php echo get_bloginfo('charset') ?></td>
91
+ </tr>
92
+ <tr>
93
+ <td><?php _e("Memory Limit ", 'duplicator'); ?></td>
94
+ <td><?php echo WP_MEMORY_LIMIT ?> (<?php _e("Max", 'duplicator'); echo '&nbsp;' . WP_MAX_MEMORY_LIMIT; ?>)</td>
95
+ </tr>
96
+ <tr>
97
+ <td class='dup-settings-diag-header' colspan="2">PHP</td>
98
+ </tr>
99
+ <tr>
100
+ <td><?php _e("Version", 'duplicator'); ?></td>
101
+ <td><?php echo phpversion() ?></td>
102
+ </tr>
103
+ <tr>
104
+ <td>SAPI</td>
105
+ <td><?php echo PHP_SAPI ?></td>
106
+ </tr>
107
+ <tr>
108
+ <td><?php _e("User", 'duplicator'); ?></td>
109
+ <td><?php echo DUP_Util::GetCurrentUser(); ?></td>
110
+ </tr>
111
+ <tr>
112
+ <td><?php _e("Process", 'duplicator'); ?></td>
113
+ <td><?php echo DUP_Util::GetProcessOwner(); ?></td>
114
+ </tr>
115
+ <tr>
116
+ <td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php _e("Safe Mode", 'duplicator'); ?></a></td>
117
+ <td>
118
+ <?php echo (((strtolower(@ini_get('safe_mode')) == 'on') || (strtolower(@ini_get('safe_mode')) == 'yes') ||
119
+ (strtolower(@ini_get('safe_mode')) == 'true') || (ini_get("safe_mode") == 1 )))
120
+ ? __('On', 'duplicator') : __('Off', 'duplicator');
121
+ ?>
122
+ </td>
123
+ </tr>
124
+ <tr>
125
+ <td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php _e("Memory Limit", 'duplicator'); ?></a></td>
126
+ <td><?php echo @ini_get('memory_limit') ?></td>
127
+ </tr>
128
+ <tr>
129
+ <td><?php _e("Memory In Use", 'duplicator'); ?></td>
130
+ <td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
131
+ </tr>
132
+ <tr>
133
+ <td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php _e("Max Execution Time", 'duplicator'); ?></a></td>
134
+ <td><?php echo @ini_get( 'max_execution_time' ); ?></td>
135
+ </tr>
136
+ <tr>
137
+ <td><a href="http://us3.php.net/shell_exec" target="_blank"><?php _e("Shell Exec", 'duplicator'); ?></a></td>
138
+ <td><?php echo (DUP_Util::IsShellExecAvailable()) ? _e("Is Supported", 'duplicator') : _e("Not Supported", 'duplicator'); ?></td>
139
+ </tr>
140
+ <tr>
141
+ <td><?php _e("Shell Exec Zip", 'duplicator'); ?></td>
142
+ <td><?php echo (DUP_Util::GetZipPath() != null) ? _e("Is Supported", 'duplicator') : _e("Not Supported", 'duplicator'); ?></td>
143
+ </tr>
144
+ <tr>
145
+ <td class='dup-settings-diag-header' colspan="2">MySQL</td>
146
+ </tr>
147
+ <tr>
148
+ <td><?php _e("Version", 'duplicator'); ?></td>
149
+ <td><?php echo $wpdb->db_version() ?></td>
150
+ </tr>
151
+ <tr>
152
+ <td><?php _e("Charset", 'duplicator'); ?></td>
153
+ <td><?php echo DB_CHARSET ?></td>
154
+ </tr>
155
+ <tr>
156
+ <td><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank"><?php _e("Wait Timeout", 'duplicator'); ?></a></td>
157
+ <td><?php echo $dbvar_maxtime ?></td>
158
+ </tr>
159
+ <tr>
160
+ <td style="white-space:nowrap"><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet" target="_blank"><?php _e("Max Allowed Packets", 'duplicator'); ?></a></td>
161
+ <td><?php echo $dbvar_maxpacks ?></td>
162
+ </tr>
163
+ <tr>
164
+ <td><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank"><?php _e("msyqldump Path", 'duplicator'); ?></a></td>
165
+ <td><?php echo $mysqlDumpSupport ?></td>
166
+ </tr>
167
+ <tr>
168
+ <td class='dup-settings-diag-header' colspan="2"><?php _e("Server Disk", 'duplicator'); ?></td>
169
+ </tr>
170
+ <tr valign="top">
171
+ <td><?php _e('Free space', 'hyper-cache'); ?></td>
172
+ <td><?php echo $perc;?>% -- <?php echo DUP_Util::ByteSize($space_free);?> from <?php echo DUP_Util::ByteSize($space);?><br/>
173
+ <small>
174
+ <?php _e("Note: This value is the physical servers hard-drive allocation.", 'duplicator'); ?> <br/>
175
+ <?php _e("On shared hosts check your control panel for the 'TRUE' disk space quota value.", 'duplicator'); ?>
176
+ </small>
177
+ </td>
178
+ </tr>
179
+
180
+ </table><br/>
181
+
182
+ </div> <!-- end .dup-box-panel -->
183
+ </div> <!-- end .dup-box -->
184
+ <br/>
views/tools/diagnostics/inc.validator.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $scan_run = (isset($_POST['action']) && $_POST['action'] == 'duplicator_recursion') ? true :false;
3
+ $ajax_nonce = wp_create_nonce('DUP_CTRL_Tools_RunScanValidator');
4
+ ?>
5
+
6
+ <style>
7
+ div#hb-result {padding: 10px 5px 0 5px; line-height: 22px}
8
+ </style>
9
+
10
+ <!-- ==============================
11
+ SCAN VALIDATOR -->
12
+ <div class="dup-box">
13
+ <div class="dup-box-title">
14
+ <i class="fa fa-check-square-o"></i>
15
+ <?php _e("Scan Validator", 'duplicator'); ?>
16
+ <div class="dup-box-arrow"></div>
17
+ </div>
18
+ <div class="dup-box-panel" style="display: <?php echo $scan_run ? 'block' : 'none'; ?>">
19
+ <?php
20
+ _e("This utility will help to find unreadable files and sys-links in your environment that can lead to issues during the scan process. ", "duplicator");
21
+ _e("The utility will also show how many files and directories you have in your system. This process may take several minutes to run. ", "duplicator");
22
+ _e("If there is a recursive loop on your system then the process has a built in check to stop after a large set of files and directories have been scanned. ", "duplicator");
23
+ _e("A message will show indicated that that a scan depth has been reached. ", "duplicator");
24
+ ?>
25
+ <br/><br/>
26
+
27
+
28
+ <button id="scan-run-btn" type="button" class="button button-large button-primary" onclick="Duplicator.Tools.RunScanValidator()">
29
+ <?php _e("Run Scan Integrity Validation", "duplicator"); ?>
30
+ </button>
31
+
32
+ <script id="hb-template" type="text/x-handlebars-template">
33
+ <b>Scan Path:</b> <?php echo DUPLICATOR_WPROOTPATH ?> <br/>
34
+ <b>Scan Results</b><br/>
35
+ <table>
36
+ <tr>
37
+ <td><b>Files:</b></td>
38
+ <td>{{Payload.FileCount}} </td>
39
+ </tr>
40
+ <tr>
41
+ <td><b>Dirs:</b></td>
42
+ <td>{{Payload.DirCount}} </td>
43
+ </tr>
44
+ </table>
45
+
46
+ <b>Unreadable Files:</b> <br/>
47
+ {{#if Payload.Unreadable}}
48
+ {{#each Payload.Unreadable}}
49
+ &nbsp; &nbsp; {{@index}} : {{this}}<br/>
50
+ {{/each}}
51
+ {{else}}
52
+ <i>No Unreadable items found</i> <br/>
53
+ {{/if}}
54
+
55
+ <b>Symbolic Links:</b> <br/>
56
+ {{#if Payload.SymLinks}}
57
+ {{#each Payload.SymLinks}}
58
+ &nbsp; &nbsp; {{@index}} : {{this}}<br/>
59
+ {{/each}}
60
+ {{else}}
61
+ <i>No Sym-links found</i> <br/>
62
+ {{/if}}
63
+ <br/>
64
+ </script>
65
+ <div id="hb-result"></div>
66
+
67
+ </div>
68
+ </div>
69
+ <br/>
70
+
71
+ <script>
72
+ jQuery(document).ready(function($)
73
+ {
74
+ //Run request to: admin-ajax.php?action=DUP_CTRL_Tools_RunScanValidator
75
+ Duplicator.Tools.RunScanValidator = function()
76
+ {
77
+ var result = confirm('<?php _e('This will run the scan validation check. This may take several minutes.\nDo you want to Continue?', 'duplicator'); ?>');
78
+ var data = {action : 'DUP_CTRL_Tools_RunScanValidator', nonce: '<?php echo $ajax_nonce; ?>', 'scan-recursive': true};
79
+
80
+ if (! result)
81
+ return;
82
+
83
+ $('#hb-result').html('<?php _e("Scanning Enviroment... This may take a few minutes.", "duplicator"); ?>');
84
+ $('#scan-run-btn').html('<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> Running Please Wait...');
85
+
86
+ $.ajax({
87
+ type: "POST",
88
+ url: ajaxurl,
89
+ dataType: "json",
90
+ data: data,
91
+ success: function(data) {Duplicator.Tools.IntScanValidator(data)},
92
+ error: function(data) {console.log(data)},
93
+ done: function(data) {console.log(data)}
94
+ });
95
+ }
96
+
97
+ //Process Ajax Template
98
+ Duplicator.Tools.IntScanValidator= function(data)
99
+ {
100
+ var template = $('#hb-template').html();
101
+ var templateScript = Handlebars.compile(template);
102
+ var html = templateScript(data);
103
+ $('#hb-result').html(html);
104
+ $('#scan-run-btn').html('<?php _e("Run Scan Integrity Validation", "duplicator"); ?>');
105
+ }
106
+ });
107
+ </script>
108
+
views/tools/diagnostics/main.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ wp_enqueue_script('dup-handlebars');
3
+ require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
4
+ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
5
+ require_once(DUPLICATOR_PLUGIN_PATH . '/classes/scan.validator.php');
6
+
7
+ global $wp_version;
8
+ global $wpdb;
9
+
10
+ $action_response = null;
11
+
12
+ $ctrl_ui = new DUP_CTRL_UI();
13
+ $ctrl_ui->SetResponseType('PHP');
14
+ $data = $ctrl_ui->GetViewStateList();
15
+
16
+ $ui_css_srv_panel = (isset($data->Payload['dup-settings-diag-srv-panel']) && $data->Payload['dup-settings-diag-srv-panel']) ? 'display:block' : 'display:none';
17
+ $ui_css_opts_panel = (isset($data->Payload['dup-settings-diag-opts-panel']) && $data->Payload['dup-settings-diag-opts-panel']) ? 'display:block' : 'display:none';
18
+
19
+
20
+ //POST BACK
21
+ if (isset($_POST['action'])) {
22
+ $action_result = DUP_Settings::DeleteWPOption($_POST['action']);
23
+ switch ($_POST['action'])
24
+ {
25
+ case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'duplicator'); break;
26
+ case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'duplicator'); break;
27
+ case 'duplicator_package_active' : $action_response = __('Active package settings reset.', 'duplicator'); break;
28
+ case 'clear_legacy_data':
29
+ DUP_Settings::LegacyClean();
30
+ $action_response = __('Legacy data removed.', 'duplicator');
31
+ break;
32
+ }
33
+ }
34
+ ?>
35
+
36
+ <style>
37
+ div#message {margin:0px 0px 10px 0px}
38
+ div#dup-server-info-area { padding:10px 5px; }
39
+ div#dup-server-info-area table { padding:1px; background:#dfdfdf; -webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px; width:100% !important; box-shadow:0 8px 6px -6px #777; }
40
+ div#dup-server-info-area td, th {padding:3px; background:#fff; -webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}
41
+ div#dup-server-info-area tr.h img { display:none; }
42
+ div#dup-server-info-area tr.h td{ background:none; }
43
+ div#dup-server-info-area tr.h th{ text-align:center; background-color:#efefef; }
44
+ div#dup-server-info-area td.e{ font-weight:bold }
45
+ td.dup-settings-diag-header {background-color:#D8D8D8; font-weight: bold; border-style: none; color:black}
46
+ .widefat th {font-weight:bold; }
47
+ .widefat td {padding:2px 2px 2px 8px}
48
+ .widefat td:nth-child(1) {width:10px;}
49
+ .widefat td:nth-child(2) {padding-left: 20px; width:100% !important}
50
+ textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
51
+ </style>
52
+
53
+ <form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics' ); ?>" method="post">
54
+ <?php wp_nonce_field( 'duplicator_settings_page' ); ?>
55
+ <input type="hidden" id="dup-settings-form-action" name="action" value="">
56
+ <br/>
57
+
58
+ <?php if (! empty($action_response)) : ?>
59
+ <div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
60
+ <?php endif; ?>
61
+
62
+ <?php
63
+ include_once 'inc.settings.php';
64
+ include_once 'inc.data.php';
65
+ include_once 'inc.validator.php';
66
+ include_once 'inc.phpinfo.php';
67
+ ?>
68
+ </form>
69
+
70
+
71
+
72
+