@kademi/keditor
Version:
KEditor is a jQuery plugin which provides a content editor with drag n drop, configurable contents
6 lines • 227 kB
JavaScript
/*!
* formBuilder - https://formbuilder.online/
* Version: 2.5.3
* Author: Kevin Chappell <kevin.b.chappell@gmail.com>
*/
var _Mathmax=Math.max,_StringfromCharCode=String.fromCharCode,_Mathmin=Math.min,_Mathfloor=Math.floor,_Mathpow=Math.pow;!function(A){function t(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return A[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e={};t.m=A,t.c=e,t.i=function(A){return A},t.d=function(A,e,r){t.o(A,e)||Object.defineProperty(A,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(e,"a",e),e},t.o=function(A,t){return Object.prototype.hasOwnProperty.call(A,t)},t.p="/assets/js/",t(t.s=147)}({108:function(A,t,e){(function(t){function e(A,t){var e=A[1]||"",o=A[3];if(!o)return e;if(t){var n=r(o);return[e].concat(o.sources.map(function(A){return"/*# sourceURL="+o.sourceRoot+A+" */"})).concat([n]).join("\n")}return[e].join("\n")}function r(A){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+new t(JSON.stringify(A)).toString("base64")+" */"}A.exports=function(A){var t=[];return t.toString=function(){return this.map(function(t){var r=e(t,A);return t[2]?"@media "+t[2]+"{"+r+"}":r}).join("")},t.i=function(A,e){"string"==typeof A&&(A=[[null,A,""]]);for(var r,o={},n=0;n<this.length;n++)"number"==typeof(r=this[n][0])&&(o[r]=!0);for(n=0;n<A.length;n++){var i=A[n];"number"==typeof i[0]&&o[i[0]]||(e&&!i[2]?i[2]=e:e&&(i[2]="("+i[2]+") and ("+e+")"),t.push(i))}},t}}).call(t,e(110).Buffer)},109:function(A,t){t.read=function(A,t,e,r,o){var n,i,s=8*o-r-1,a=(1<<s)-1,l=a>>1,c=-7,u=e?o-1:0,g=e?-1:1,f=A[t+u];for(u+=g,n=f&(1<<-c)-1,f>>=-c,c+=s;0<c;n=256*n+A[t+u],u+=g,c-=8);for(i=n&(1<<-c)-1,n>>=-c,c+=r;0<c;i=256*i+A[t+u],u+=g,c-=8);if(0===n)n=1-l;else{if(n===a)return i?NaN:1/0*(f?-1:1);i+=_Mathpow(2,r),n-=l}return(f?-1:1)*i*_Mathpow(2,n-r)},t.write=function(A,t,e,r,o,n){var i,s,a,l=8*n-o-1,c=(1<<l)-1,u=c>>1,g=23===o?5.960464477539062e-8:0,f=r?0:n-1,d=r?1:-1,p=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=c):(i=_Mathfloor(Math.log(t)/Math.LN2),1>t*(a=_Mathpow(2,-i))&&(i--,a*=2),t+=1<=i+u?g/a:g*_Mathpow(2,1-u),2<=t*a&&(i++,a/=2),i+u>=c?(s=0,i=c):1<=i+u?(s=(t*a-1)*_Mathpow(2,o),i+=u):(s=t*_Mathpow(2,u-1)*_Mathpow(2,o),i=0));8<=o;A[e+f]=255&s,f+=d,s/=256,o-=8);for(i=i<<o|s,l+=o;0<l;A[e+f]=255&i,f+=d,i/=256,l-=8);A[e+f-d]|=128*p}},110:function(A,t,e){"use strict";(function(A){function r(){return n.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(A,t){if(r()<t)throw new RangeError("Invalid typed array length");return n.TYPED_ARRAY_SUPPORT?(A=new Uint8Array(t),A.__proto__=n.prototype):(null===A&&(A=new n(t)),A.length=t),A}function n(A,t,e){if(!(n.TYPED_ARRAY_SUPPORT||this instanceof n))return new n(A,t,e);if("number"==typeof A){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,A)}return i(this,A,t,e)}function i(A,t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?g(A,t,e,r):"string"==typeof t?c(A,t,e):f(A,t)}function s(A){if("number"!=typeof A)throw new TypeError('"size" argument must be a number');if(0>A)throw new RangeError('"size" argument must not be negative')}function a(A,t,e,r){return s(t),0>=t?o(A,t):void 0===e?o(A,t):"string"==typeof r?o(A,t).fill(e,r):o(A,t).fill(e)}function l(A,t){if(s(t),A=o(A,0>t?0:0|d(t)),!n.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)A[e]=0;return A}function c(A,t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!n.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,e);A=o(A,r);var i=A.write(t,e);return i!==r&&(A=A.slice(0,i)),A}function u(A,t){var e=0>t.length?0:0|d(t.length);A=o(A,e);for(var r=0;r<e;r+=1)A[r]=255&t[r];return A}function g(A,t,e,r){if(t.byteLength,0>e||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),n.TYPED_ARRAY_SUPPORT?(A=t,A.__proto__=n.prototype):A=u(A,t),A}function f(A,t){if(n.isBuffer(t)){var e=0|d(t.length);return A=o(A,e),0===A.length?A:(t.copy(A,0,0,e),A)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||Z(t.length)?o(A,0):u(A,t);if("Buffer"===t.type&&q(t.data))return u(A,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function d(A){if(A>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|A}function p(A,t){if(n.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var e=A.length;if(0===e)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return P(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return V(A).length;default:if(r)return P(A).length;t=(""+t).toLowerCase(),r=!0}}function h(A,t,e){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),0>=e)return"";if(e>>>=0,t>>>=0,e<=t)return"";for(A||(A="utf8");;)switch(A){case"hex":return N(this,t,e);case"utf8":case"utf-8":return D(this,t,e);case"ascii":return x(this,t,e);case"latin1":case"binary":return Y(this,t,e);case"base64":return C(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,e);default:if(r)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),r=!0}}function B(A,t,e){var r=A[t];A[t]=A[e],A[e]=r}function w(A,t,e,r,o){if(0===A.length)return-1;if("string"==typeof e?(r=e,e=0):2147483647<e?e=2147483647:-2147483648>e&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:A.length-1),0>e&&(e=A.length+e),e>=A.length){if(o)return-1;e=A.length-1}else if(0>e){if(!o)return-1;e=0}if("string"==typeof t&&(t=n.from(t,r)),n.isBuffer(t))return 0===t.length?-1:E(A,t,e,r,o);if("number"==typeof t)return t&=255,n.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(A,t,e):Uint8Array.prototype.lastIndexOf.call(A,t,e):E(A,[t],e,r,o);throw new TypeError("val must be string, number or Buffer")}function E(A,t,e,r,o){function n(A,t){return 1==i?A[t]:A.readUInt16BE(t*i)}var i=1,s=A.length,a=t.length;if(void 0!==r&&("ucs2"===(r=(r+"").toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(2>A.length||2>t.length)return-1;i=2,s/=2,a/=2,e/=2}var l;if(o){var c=-1;for(l=e;l<s;l++)if(n(A,l)!==n(t,-1==c?0:l-c))-1!=c&&(l-=l-c),c=-1;else if(-1==c&&(c=l),l-c+1===a)return c*i}else for(e+a>s&&(e=s-a),l=e;0<=l;l--){for(var u=!0,g=0;g<a;g++)if(n(A,l+g)!==n(t,g)){u=!1;break}if(u)return l}return-1}function y(A,t,e,r){e=+e||0;var o=A.length-e;r?(r=+r)>o&&(r=o):r=o;var n=t.length;if(0!=n%2)throw new TypeError("Invalid hex string");r>n/2&&(r=n/2);for(var i,s=0;s<r;++s){if(i=parseInt(t.substr(2*s,2),16),isNaN(i))return s;A[e+s]=i}return s}function b(A,t,e,r){return W(P(t,A.length-e),A,e,r)}function M(A,t,e,r){return W(J(t),A,e,r)}function I(A,t,e,r){return M(A,t,e,r)}function m(A,t,e,r){return W(V(t),A,e,r)}function Q(A,t,e,r){return W(H(t,A.length-e),A,e,r)}function C(A,t,e){return 0===t&&e===A.length?K.fromByteArray(A):K.fromByteArray(A.slice(t,e))}function D(A,t,e){e=_Mathmin(A.length,e);for(var r=[],o=t;o<e;){var n=A[o],i=null,s=239<n?4:223<n?3:191<n?2:1;if(o+s<=e){var a,l,c,u;1==s?128>n&&(i=n):2==s?128==(192&(a=A[o+1]))&&127<(u=(31&n)<<6|63&a)&&(i=u):3==s?(a=A[o+1],l=A[o+2],128==(192&a)&&128==(192&l)&&2047<(u=(15&n)<<12|(63&a)<<6|63&l)&&(55296>u||57343<u)&&(i=u)):4==s&&(a=A[o+1],l=A[o+2],c=A[o+3],128==(192&a)&&128==(192&l)&&128==(192&c)&&65535<(u=(15&n)<<18|(63&a)<<12|(63&l)<<6|63&c)&&1114112>u&&(i=u))}null===i?(i=65533,s=1):65535<i&&(i-=65536,r.push(55296|1023&i>>>10),i=56320|1023&i),r.push(i),o+=s}return v(r)}function v(A){var t=A.length;if(t<=_)return _StringfromCharCode.apply(String,A);for(var e="",r=0;r<t;)e+=_StringfromCharCode.apply(String,A.slice(r,r+=_));return e}function x(A,t,e){var r="";e=_Mathmin(A.length,e);for(var o=t;o<e;++o)r+=_StringfromCharCode(127&A[o]);return r}function Y(A,t,e){var r="";e=_Mathmin(A.length,e);for(var o=t;o<e;++o)r+=_StringfromCharCode(A[o]);return r}function N(A,t,e){var r=A.length;(!t||0>t)&&(t=0),(!e||0>e||e>r)&&(e=r);for(var o="",n=t;n<e;++n)o+=O(A[n]);return o}function j(A,t,e){for(var r=A.slice(t,e),o="",n=0;n<r.length;n+=2)o+=_StringfromCharCode(r[n]+256*r[n+1]);return o}function F(A,t,e){if(0!=A%1||0>A)throw new RangeError("offset is not uint");if(A+t>e)throw new RangeError("Trying to access beyond buffer length")}function T(A,t,e,r,o,i){if(!n.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(e+r>A.length)throw new RangeError("Index out of range")}function R(A,t,e,r){0>t&&(t=65535+t+1);for(var o=0,n=_Mathmin(A.length-e,2);o<n;++o)A[e+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function L(A,t,e,r){0>t&&(t=4294967295+t+1);for(var o=0,n=_Mathmin(A.length-e,4);o<n;++o)A[e+o]=255&t>>>8*(r?o:3-o)}function U(A,t,e,r){if(e+r>A.length)throw new RangeError("Index out of range");if(0>e)throw new RangeError("Index out of range")}function G(A,t,e,r,o){return o||U(A,t,e,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(A,t,e,r,23,4),e+4}function S(A,t,e,r,o){return o||U(A,t,e,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(A,t,e,r,52,8),e+8}function k(A){if(A=z(A).replace($,""),2>A.length)return"";for(;0!=A.length%4;)A+="=";return A}function z(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")}function O(A){return 16>A?"0"+A.toString(16):A.toString(16)}function P(A,t){t=t||1/0;for(var e,r=A.length,o=null,n=[],i=0;i<r;++i){if(55295<(e=A.charCodeAt(i))&&57344>e){if(!o){if(56319<e){-1<(t-=3)&&n.push(239,191,189);continue}if(i+1===r){-1<(t-=3)&&n.push(239,191,189);continue}o=e;continue}if(56320>e){-1<(t-=3)&&n.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&-1<(t-=3)&&n.push(239,191,189);if(o=null,128>e){if(0>(t-=1))break;n.push(e)}else if(2048>e){if(0>(t-=2))break;n.push(192|e>>6,128|63&e)}else if(65536>e){if(0>(t-=3))break;n.push(224|e>>12,128|63&e>>6,128|63&e)}else{if(!(1114112>e))throw new Error("Invalid code point");if(0>(t-=4))break;n.push(240|e>>18,128|63&e>>12,128|63&e>>6,128|63&e)}}return n}function J(A){for(var t=[],e=0;e<A.length;++e)t.push(255&A.charCodeAt(e));return t}function H(A,t){for(var e,r,o,n=[],i=0;i<A.length&&!(0>(t-=2));++i)e=A.charCodeAt(i),r=e>>8,o=e%256,n.push(o),n.push(r);return n}function V(A){return K.toByteArray(k(A))}function W(A,t,e,r){for(var o=0;o<r&&!(o+e>=t.length||o>=A.length);++o)t[o+e]=A[o];return o}function Z(A){return A!==A}var K=e(81),X=e(109),q=e(111);t.Buffer=n,t.SlowBuffer=function(A){return+A!=A&&(A=0),n.alloc(+A)},t.INSPECT_MAX_BYTES=50,n.TYPED_ARRAY_SUPPORT=void 0===A.TYPED_ARRAY_SUPPORT?function(){try{var A=new Uint8Array(1);return A.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===A.foo()&&"function"==typeof A.subarray&&0===A.subarray(1,1).byteLength}catch(A){return!1}}():A.TYPED_ARRAY_SUPPORT,t.kMaxLength=r(),n.poolSize=8192,n._augment=function(A){return A.__proto__=n.prototype,A},n.from=function(A,t,e){return i(null,A,t,e)},n.TYPED_ARRAY_SUPPORT&&(n.prototype.__proto__=Uint8Array.prototype,n.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&n[Symbol.species]===n&&Object.defineProperty(n,Symbol.species,{value:null,configurable:!0})),n.alloc=function(A,t,e){return a(null,A,t,e)},n.allocUnsafe=function(A){return l(null,A)},n.allocUnsafeSlow=function(A){return l(null,A)},n.isBuffer=function(A){return!(null==A||!A._isBuffer)},n.compare=function(A,t){if(!n.isBuffer(A)||!n.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(A===t)return 0;for(var e=A.length,r=t.length,o=0,i=_Mathmin(e,r);o<i;++o)if(A[o]!==t[o]){e=A[o],r=t[o];break}return e<r?-1:r<e?1:0},n.isEncoding=function(A){switch((A+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(A,t){if(!q(A))throw new TypeError('"list" argument must be an Array of Buffers');if(0===A.length)return n.alloc(0);var e;if(void 0===t)for(t=0,e=0;e<A.length;++e)t+=A[e].length;var r=n.allocUnsafe(t),o=0;for(e=0;e<A.length;++e){var i=A[e];if(!n.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},n.byteLength=p,n.prototype._isBuffer=!0,n.prototype.swap16=function(){var A=this.length;if(0!=A%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<A;t+=2)B(this,t,t+1);return this},n.prototype.swap32=function(){var A=this.length;if(0!=A%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<A;t+=4)B(this,t,t+3),B(this,t+1,t+2);return this},n.prototype.swap64=function(){var A=this.length;if(0!=A%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<A;t+=8)B(this,t,t+7),B(this,t+1,t+6),B(this,t+2,t+5),B(this,t+3,t+4);return this},n.prototype.toString=function(){var A=0|this.length;return 0==A?"":0===arguments.length?D(this,0,A):h.apply(this,arguments)},n.prototype.equals=function(A){if(!n.isBuffer(A))throw new TypeError("Argument must be a Buffer");return this===A||0===n.compare(this,A)},n.prototype.inspect=function(){var A="",e=t.INSPECT_MAX_BYTES;return 0<this.length&&(A=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(A+=" ... ")),"<Buffer "+A+">"},n.prototype.compare=function(A,t,e,r,o){if(!n.isBuffer(A))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===e&&(e=A?A.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),0>t||e>A.length||0>r||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=e)return 0;if(r>=o)return-1;if(t>=e)return 1;if(t>>>=0,e>>>=0,r>>>=0,o>>>=0,this===A)return 0;for(var i=o-r,s=e-t,a=_Mathmin(i,s),l=this.slice(r,o),c=A.slice(t,e),u=0;u<a;++u)if(l[u]!==c[u]){i=l[u],s=c[u];break}return i<s?-1:s<i?1:0},n.prototype.includes=function(A,t,e){return-1!==this.indexOf(A,t,e)},n.prototype.indexOf=function(A,t,e){return w(this,A,t,e,!0)},n.prototype.lastIndexOf=function(A,t,e){return w(this,A,t,e,!1)},n.prototype.write=function(A,t,e,r){if(void 0===t)r="utf8",e=this.length,t=0;else if(void 0===e&&"string"==typeof t)r=t,e=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(e)?(e|=0,void 0===r&&(r="utf8")):(r=e,e=void 0)}var o=this.length-t;if((void 0===e||e>o)&&(e=o),0<A.length&&(0>e||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var n=!1;;)switch(r){case"hex":return y(this,A,t,e);case"utf8":case"utf-8":return b(this,A,t,e);case"ascii":return M(this,A,t,e);case"latin1":case"binary":return I(this,A,t,e);case"base64":return m(this,A,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,A,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),n=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;n.prototype.slice=function(A,t){var e=this.length;A=~~A,t=void 0===t?e:~~t,0>A?0>(A+=e)&&(A=0):A>e&&(A=e),0>t?0>(t+=e)&&(t=0):t>e&&(t=e),t<A&&(t=A);var r;if(n.TYPED_ARRAY_SUPPORT)r=this.subarray(A,t),r.__proto__=n.prototype;else{var o=t-A;r=new n(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+A]}return r},n.prototype.readUIntLE=function(A,t,e){A|=0,t|=0,e||F(A,t,this.length);for(var r=this[A],o=1,n=0;++n<t&&(o*=256);)r+=this[A+n]*o;return r},n.prototype.readUIntBE=function(A,t,e){A|=0,t|=0,e||F(A,t,this.length);for(var r=this[A+--t],o=1;0<t&&(o*=256);)r+=this[A+--t]*o;return r},n.prototype.readUInt8=function(A,t){return t||F(A,1,this.length),this[A]},n.prototype.readUInt16LE=function(A,t){return t||F(A,2,this.length),this[A]|this[A+1]<<8},n.prototype.readUInt16BE=function(A,t){return t||F(A,2,this.length),this[A]<<8|this[A+1]},n.prototype.readUInt32LE=function(A,t){return t||F(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},n.prototype.readUInt32BE=function(A,t){return t||F(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},n.prototype.readIntLE=function(A,t,e){A|=0,t|=0,e||F(A,t,this.length);for(var r=this[A],o=1,n=0;++n<t&&(o*=256);)r+=this[A+n]*o;return o*=128,r>=o&&(r-=_Mathpow(2,8*t)),r},n.prototype.readIntBE=function(A,t,e){A|=0,t|=0,e||F(A,t,this.length);for(var r=t,o=1,n=this[A+--r];0<r&&(o*=256);)n+=this[A+--r]*o;return o*=128,n>=o&&(n-=_Mathpow(2,8*t)),n},n.prototype.readInt8=function(A,t){return t||F(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},n.prototype.readInt16LE=function(A,t){t||F(A,2,this.length);var e=this[A]|this[A+1]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt16BE=function(A,t){t||F(A,2,this.length);var e=this[A+1]|this[A]<<8;return 32768&e?4294901760|e:e},n.prototype.readInt32LE=function(A,t){return t||F(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},n.prototype.readInt32BE=function(A,t){return t||F(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},n.prototype.readFloatLE=function(A,t){return t||F(A,4,this.length),X.read(this,A,!0,23,4)},n.prototype.readFloatBE=function(A,t){return t||F(A,4,this.length),X.read(this,A,!1,23,4)},n.prototype.readDoubleLE=function(A,t){return t||F(A,8,this.length),X.read(this,A,!0,52,8)},n.prototype.readDoubleBE=function(A,t){return t||F(A,8,this.length),X.read(this,A,!1,52,8)},n.prototype.writeUIntLE=function(A,t,e,r){if(A=+A,t|=0,e|=0,!r){T(this,A,t,e,_Mathpow(2,8*e)-1,0)}var o=1,n=0;for(this[t]=255&A;++n<e&&(o*=256);)this[t+n]=255&A/o;return t+e},n.prototype.writeUIntBE=function(A,t,e,r){if(A=+A,t|=0,e|=0,!r){T(this,A,t,e,_Mathpow(2,8*e)-1,0)}var o=e-1,n=1;for(this[t+o]=255&A;0<=--o&&(n*=256);)this[t+o]=255&A/n;return t+e},n.prototype.writeUInt8=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,1,255,0),n.TYPED_ARRAY_SUPPORT||(A=_Mathfloor(A)),this[t]=255&A,t+1},n.prototype.writeUInt16LE=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=255&A,this[t+1]=A>>>8):R(this,A,t,!0),t+2},n.prototype.writeUInt16BE=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[t]=A>>>8,this[t+1]=255&A):R(this,A,t,!1),t+2},n.prototype.writeUInt32LE=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t+3]=A>>>24,this[t+2]=A>>>16,this[t+1]=A>>>8,this[t]=255&A):L(this,A,t,!0),t+4},n.prototype.writeUInt32BE=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[t]=A>>>24,this[t+1]=A>>>16,this[t+2]=A>>>8,this[t+3]=255&A):L(this,A,t,!1),t+4},n.prototype.writeIntLE=function(A,t,e,r){if(A=+A,t|=0,!r){var o=_Mathpow(2,8*e-1);T(this,A,t,e,o-1,-o)}var n=0,i=1,s=0;for(this[t]=255&A;++n<e&&(i*=256);)0>A&&0==s&&0!==this[t+n-1]&&(s=1),this[t+n]=255&(A/i>>0)-s;return t+e},n.prototype.writeIntBE=function(A,t,e,r){if(A=+A,t|=0,!r){var o=_Mathpow(2,8*e-1);T(this,A,t,e,o-1,-o)}var n=e-1,i=1,s=0;for(this[t+n]=255&A;0<=--n&&(i*=256);)0>A&&0==s&&0!==this[t+n+1]&&(s=1),this[t+n]=255&(A/i>>0)-s;return t+e},n.prototype.writeInt8=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,1,127,-128),n.TYPED_ARRAY_SUPPORT||(A=_Mathfloor(A)),0>A&&(A=255+A+1),this[t]=255&A,t+1},n.prototype.writeInt16LE=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=255&A,this[t+1]=A>>>8):R(this,A,t,!0),t+2},n.prototype.writeInt16BE=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[t]=A>>>8,this[t+1]=255&A):R(this,A,t,!1),t+2},n.prototype.writeInt32LE=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[t]=255&A,this[t+1]=A>>>8,this[t+2]=A>>>16,this[t+3]=A>>>24):L(this,A,t,!0),t+4},n.prototype.writeInt32BE=function(A,t,e){return A=+A,t|=0,e||T(this,A,t,4,2147483647,-2147483648),0>A&&(A=4294967295+A+1),n.TYPED_ARRAY_SUPPORT?(this[t]=A>>>24,this[t+1]=A>>>16,this[t+2]=A>>>8,this[t+3]=255&A):L(this,A,t,!1),t+4},n.prototype.writeFloatLE=function(A,t,e){return G(this,A,t,!0,e)},n.prototype.writeFloatBE=function(A,t,e){return G(this,A,t,!1,e)},n.prototype.writeDoubleLE=function(A,t,e){return S(this,A,t,!0,e)},n.prototype.writeDoubleBE=function(A,t,e){return S(this,A,t,!1,e)},n.prototype.copy=function(A,t,e,r){if(e||(e=0),r||0===r||(r=this.length),t>=A.length&&(t=A.length),t||(t=0),0<r&&r<e&&(r=e),r===e)return 0;if(0===A.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>e||e>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),A.length-t<r-e&&(r=A.length-t+e);var o,i=r-e;if(this===A&&e<t&&t<r)for(o=i-1;0<=o;--o)A[o+t]=this[o+e];else if(1e3>i||!n.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)A[o+t]=this[o+e];else Uint8Array.prototype.set.call(A,this.subarray(e,e+i),t);return i},n.prototype.fill=function(A,t,e,r){if("string"==typeof A){if("string"==typeof t?(r=t,t=0,e=this.length):"string"==typeof e&&(r=e,e=this.length),1===A.length){var o=A.charCodeAt(0);256>o&&(A=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!n.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof A&&(A&=255);if(0>t||this.length<t||this.length<e)throw new RangeError("Out of range index");if(e<=t)return this;t>>>=0,e=void 0===e?this.length:e>>>0,A||(A=0);var i;if("number"==typeof A)for(i=t;i<e;++i)this[i]=A;else{var s=n.isBuffer(A)?A:P(new n(A,r).toString()),a=s.length;for(i=0;i<e-t;++i)this[i+t]=s[i%a]}return this};var $=/[^+\/0-9A-Za-z-_]/g}).call(t,e(45))},111:function(A){var t={}.toString;A.exports=Array.isArray||function(A){return"[object Array]"==t.call(A)}},112:function(A,t,e){function r(A,t){for(var e=0;e<A.length;e++){var r=A[e],o=d[r.id];if(o){o.refs++;for(var n=0;n<o.parts.length;n++)o.parts[n](r.parts[n]);for(;n<r.parts.length;n++)o.parts.push(c(r.parts[n],t))}else{for(var i=[],n=0;n<r.parts.length;n++)i.push(c(r.parts[n],t));d[r.id]={id:r.id,refs:1,parts:i}}}}function o(A){for(var t=[],e={},r=0;r<A.length;r++){var o=A[r],n=o[0],i=o[1],s=o[2],a=o[3],l={css:i,media:s,sourceMap:a};e[n]?e[n].parts.push(l):t.push(e[n]={id:n,parts:[l]})}return t}function n(A,t){var e=h(A.insertInto);if(!e)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=E[E.length-1];if("top"===A.insertAt)r?r.nextSibling?e.insertBefore(t,r.nextSibling):e.appendChild(t):e.insertBefore(t,e.firstChild),E.push(t);else{if("bottom"!==A.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");e.appendChild(t)}}function i(A){A.parentNode.removeChild(A);var t=E.indexOf(A);0<=t&&E.splice(t,1)}function s(A){var t=document.createElement("style");return A.attrs.type="text/css",l(t,A.attrs),n(A,t),t}function a(A){var t=document.createElement("link");return A.attrs.type="text/css",A.attrs.rel="stylesheet",l(t,A.attrs),n(A,t),t}function l(A,t){Object.keys(t).forEach(function(e){A.setAttribute(e,t[e])})}function c(A,t){var e,r,o;if(t.singleton){var n=w++;e=B||(B=s(t)),r=u.bind(null,e,n,!1),o=u.bind(null,e,n,!0)}else A.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=a(t),r=f.bind(null,e,t),o=function(){i(e),e.href&&URL.revokeObjectURL(e.href)}):(e=s(t),r=g.bind(null,e),o=function(){i(e)});return r(A),function(t){if(t){if(t.css===A.css&&t.media===A.media&&t.sourceMap===A.sourceMap)return;r(A=t)}else o()}}function u(A,t,e,r){var o=e?"":r.css;if(A.styleSheet)A.styleSheet.cssText=b(t,o);else{var n=document.createTextNode(o),i=A.childNodes;i[t]&&A.removeChild(i[t]),i.length?A.insertBefore(n,i[t]):A.appendChild(n)}}function g(A,t){var e=t.css,r=t.media;if(r&&A.setAttribute("media",r),A.styleSheet)A.styleSheet.cssText=e;else{for(;A.firstChild;)A.removeChild(A.firstChild);A.appendChild(document.createTextNode(e))}}function f(A,t,e){var r=e.css,o=e.sourceMap,n=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||n)&&(r=y(r)),o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),s=A.href;A.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}var d={},p=function(A){var t;return function(){return void 0===t&&(t=A.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),h=function(A){var t={};return function(e){return void 0===t[e]&&(t[e]=A.call(this,e)),t[e]}}(function(A){return document.querySelector(A)}),B=null,w=0,E=[],y=e(113);A.exports=function(A,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},void 0===t.singleton&&(t.singleton=p()),void 0===t.insertInto&&(t.insertInto="head"),void 0===t.insertAt&&(t.insertAt="bottom");var e=o(A);return r(e,t),function(A){for(var n=[],i=0;i<e.length;i++){var s=e[i],a=d[s.id];a.refs--,n.push(a)}if(A){r(o(A),t)}for(var a,i=0;i<n.length;i++)if(a=n[i],0===a.refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete d[a.id]}}};var b=function(){var A=[];return function(t,e){return A[t]=e,A.filter(Boolean).join("\n")}}()},113:function(A){A.exports=function(A){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!A||"string"!=typeof A)return A;var e=t.protocol+"//"+t.host,r=e+t.pathname.replace(/\/[^\/]*$/,"/");return A.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(A,t){var o=t.trim().replace(/^"(.*)"$/,function(A,t){return t}).replace(/^'(.*)'$/,function(A,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o))return A;var n;return n=0===o.indexOf("//")?o:0===o.indexOf("/")?e+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(n)+")"})}},114:function(A,t){"use strict";function e(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=t.instanceData={};t.Data=function A(t){e(this,A),this.formData={},this.formID=t,this.layout="",r[t]=this},t.availablefields={}},143:function(A,t,e){"use strict";function r(A){return A&&A.__esModule?A:{default:A}}function o(A,t){var e={};for(var r in A)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(A,r)&&(e[r]=A[r]);return e}function n(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=e(51),s=e(114),a=e(19),l=r(a),c=e(53),u=r(c),g=e(26),f=r(g),d=e(52),p=e(6),h=r(p),B=e(34),w=r(B),E=l.default.markup,y=function(){function A(t,e){n(this,A),this.data=s.instanceData[t],this.d=i.instanceDom[t],this.doCancel=!1,this.layout=e}return A.prototype.startMoving=function(A,t){t.item.show().addClass("moving"),this.doCancel=!0,this.from=t.item.parent()},A.prototype.stopMoving=function(A,t){var e=this;t.item.removeClass("moving"),e.doCancel&&(t.sender&&$(t.sender).sortable("cancel"),this.from.sortable("cancel")),e.save(),e.doCancel=!1},A.prototype.beforeStop=function(A,t){var e=this,r=d.config.opts,o=e.d.stage,n=o.childNodes.length-1,i=[];e.stopIndex=t.placeholder.index()-1,!r.sortableControls&&t.item.parent().hasClass("frmb-control")&&i.push(!0),r.prepend&&i.push(0===e.stopIndex),r.append&&i.push(e.stopIndex+1===n),e.doCancel=i.some(function(A){return!0===A})},A.prototype.getTypes=function(A){var t={type:A.attr("type")},e=$(".fld-subtype",A).val();return e!==t.type&&(t.subtype=e),t},A.prototype.fieldOptionData=function(A){var t=[],e=$(".sortable-options li",A);return e.each(function(A){var r=$(e[A]),o=$(".option-selected",r).is(":checked"),n={label:$(".option-label",r).val(),value:$(".option-value",r).val()};o&&(n.selected=o),t.push(n)}),t},A.prototype.xmlSave=function(A){var t=this.prepData(A),e=["<form-template>\n\t<fields>"];return l.default.forEach(t,function(A,t){var r=null,o=i.optionFieldsRegEx;if(t.type.match(o)){for(var n=t.values,s=[],a=0;a<n.length;a++){var l=n[a],c=E("option",l.label,l).outerHTML;s.push("\n\t\t\t"+c)}s.push("\n\t\t"),r=s.join(""),delete t.values}var u=E("field",r,t);e.push("\n\t\t"+u.outerHTML)}),e.push("\n\t</fields>\n</form-template>"),e.join("")},A.prototype.prepData=function(A){var t=[],e=this.d,r=this;return 0!==A.childNodes.length&&l.default.forEach(A.childNodes,function(A,o){var n=$(o);if(!n.hasClass("disabled-field")){var i=r.getTypes(n),s=$(".roles-field:checked",o),a=s.map(function(A){return s[A].value}).get();if(r.setAttrVals(o,i),i.subtype)if("quill"===i.subtype){var c=i.name+"-preview";if(window.fbEditors.quill[c]){var u=window.fbEditors.quill[c].instance,g=u.getContents();i.value=window.JSON.stringify(g.ops)}}else if("tinymce"===i.subtype&&window.tinymce){var f=i.name+"-preview";if(window.tinymce.editors[f]){var d=window.tinymce.editors[f];i.value=d.getContent()}}if(a.length&&(i.role=a.join(",")),i.className=i.className||i.class,i.className){var p=/(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(i.className);p&&(i.style=p[1])}i=l.default.trimObj(i);i.type.match(e.optionFieldsRegEx)&&(i.values=r.fieldOptionData(n)),t.push(i)}}),t},A.prototype.getData=function(A){var t=this.data;return A||(A=d.config.opts.formData),!!A&&(t.formData={xml:function(A){return l.default.parseXML(A)},json:function(A){return window.JSON.parse(A)}}[d.config.opts.dataType](A)||[],t.formData)},A.prototype.save=function(A){var t=this,e=this.data;return A||(A=this.d.stage),e.formData={xml:function(){return t.xmlSave(A)},json:function(){return window.JSON.stringify(t.prepData(A),null,"\t")}}[d.config.opts.dataType](A),document.dispatchEvent(u.default.formSaved),e.formData},A.prototype.incrementId=function(A){var t=A.lastIndexOf("-"),e=parseInt(A.substring(t+1))+1;return A.substring(0,t)+"-"+e},A.prototype.setAttrVals=function(A,t){var e=A.querySelectorAll('[class*="fld-"]');l.default.forEach(e,function(A){var r,o=e[A],n=l.default.camelCase(o.getAttribute("name"));r=o.attributes.contenteditable?o.innerHTML:"checkbox"===o.type?o.checked:o.value,t[n]=r})},A.prototype.updatePreview=function(A){var t=this,e=this.d,r=A.attr("class"),o=A[0];if(-1===r.indexOf("input-control")){var n,s=A.attr("type"),a=$(".prev-holder",o),c={type:s};t.setAttrVals(o,c);var g=$(".btn-style",o).val();g&&(c.style=g),s.match(e.optionFieldsRegEx)&&(c.values=[],c.multiple=$('[name="multiple"]',o).is(":checked"),$(".sortable-options li",o).each(function(A,t){var e={};e.selected=$(".option-selected",t).is(":checked"),e.value=$(".option-value",t).val(),e.label=$(".option-label",t).val(),c.values.push(e)})),c=l.default.trimObj(c),c.className=t.classNames(o,c),$(".fld-className",o).val(c.className),A.data("fieldData",c);var f=w.default.lookup(c.type),d=f?f.class:h.default.getClass(c.type,c.subtype);n=this.layout.build(d,c),(0,i.empty)(a[0]),a[0].appendChild(n),n.dispatchEvent(u.default.fieldRendered)}},A.prototype.disabledTT=function(A){var t=function(A,t){var e=t.field.getBoundingClientRect(),r=A.clientX-e.left-21,o=A.clientY-e.top-t.tt.offsetHeight-12;t.tt.style.transform="translate("+r+"px, "+o+"px)"},e=A.querySelectorAll(".disabled-field");l.default.forEach(e,function(A){var r=e[A],o=f.default.get("fieldNonEditable");if(o){var n=l.default.markup("p",o,{className:"frmb-tt"});r.appendChild(n),r.addEventListener("mousemove",function(A){return t(A,{tt:n,field:r})})}})},A.prototype.classNames=function(A,t){var e=A.querySelector(".fld-className");if(e){var r=void 0,o=t.type,n=t.style,i=e.value.split(" "),s={button:"btn",submit:"btn"}[o];if(s){if(n){for(r=0;r<i.length;r++){var a=new RegExp("(?:^|s)"+s+"-(.*?)(?:s|$)+","g");i[r].match(a)&&i.splice(r,1)}i.push(s+"-"+n)}i.push(s)}return l.default.unique(i).join(" ").trim()}},A.prototype.closeConfirm=function(A,t){A||(A=document.getElementsByClassName("form-builder-overlay")[0]),t||(t=document.getElementsByClassName("form-builder-dialog")[0]),A.classList.remove("visible"),(0,i.remove)(t),(0,i.remove)(A),document.dispatchEvent(u.default.modalClosed)},A.prototype.editorLayout=function(A){return{left:{stage:"pull-right",controls:"pull-left"},right:{stage:"pull-left",controls:"pull-right"}}[A]||""},A.prototype.showOverlay=function(){var A=this,t=l.default.markup("div",null,{className:"form-builder-overlay"});return document.body.appendChild(t),t.classList.add("visible"),t.onclick=function(){A.closeConfirm(t)},t},A.prototype.confirm=function(A,t){var e=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"",o=this,n=f.default.current,i=o.showOverlay(),s=E("button",n.yes,{className:"yes btn btn-success btn-sm"}),a=E("button",n.no,{className:"no btn btn-danger btn-sm"});a.onclick=function(){o.closeConfirm(i)},s.onclick=function(){t(),o.closeConfirm(i)};var l=E("div",[a,s],{className:"button-wrap"});r="form-builder-dialog "+r;var c=E("div",[A,l],{className:r});if(e)c.classList.add("positioned");else{var u=document.documentElement;e={pageX:_Mathmax(u.clientWidth,window.innerWidth||0)/2,pageY:_Mathmax(u.clientHeight,window.innerHeight||0)/2},c.style.position="fixed"}return c.style.left=e.pageX+"px",c.style.top=e.pageY+"px",document.body.appendChild(c),s.focus(),c},A.prototype.dialog=function(A){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=this,o=document.documentElement.clientWidth,n=document.documentElement.clientHeight;r.showOverlay(),e="form-builder-dialog "+e;var i=l.default.markup("div",A,{className:e});return t?i.classList.add("positioned"):(t={pageX:_Mathmax(o,window.innerWidth||0)/2,pageY:_Mathmax(n,window.innerHeight||0)/2},i.style.position="fixed"),i.style.left=t.pageX+"px",i.style.top=t.pageY+"px",document.body.appendChild(i),document.dispatchEvent(u.default.modalOpened),-1!==e.indexOf("data-dialog")&&document.dispatchEvent(u.default.viewData),i},A.prototype.confirmRemoveAll=function(A){var t=this,e=A.target.id.match(/frmb-\d{13}/)[0],r=document.getElementById(e),o=f.default.current,n=$("li.form-field",r),i=A.target.getBoundingClientRect(),s=document.body.getBoundingClientRect(),a={pageX:i.left+i.width/2,pageY:i.top-s.top-12};n.length?t.confirm(o.clearAllMessage,function(){t.removeAllFields.call(t,r),d.config.opts.notify.success(o.allFieldsRemoved),d.config.opts.onClearAll()},a):t.dialog(o.noFieldsToClear,a)},A.prototype.removeAllFields=function(A){var t=this,e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=f.default.current,o=d.config.opts,n=A.querySelectorAll("li.form-field"),s=[];if(!n.length)return!1;if(o.prepend&&s.push(!0),o.append&&s.push(!0),s.some(function(A){return!0===A})||(A.parentElement.classList.add("empty"),A.parentElement.dataset.content=r.getStarted),e){A.classList.add("removing");var a=0;l.default.forEach(n,function(A){return a+=n[A].offsetHeight+3}),n[0].style.marginTop=-a+"px",setTimeout(function(){(0,i.empty)(A).classList.remove("removing"),t.save()},400)}else(0,i.empty)(A),this.save()},A.prototype.setFieldOrder=function(A){if(!d.config.opts.sortableControls)return!1;var t=window,e=t.sessionStorage,r=t.JSON,o=[];return A.children().each(function(A,t){var e=$(t).data("type");e&&o.push(e)}),e&&e.setItem("fieldOrder",r.stringify(o)),o},A.prototype.orderFields=function(A){var t,e=d.config.opts,r=e.controlOrder.concat(A);return window.sessionStorage&&(e.sortableControls?t=window.sessionStorage.getItem("fieldOrder"):window.sessionStorage.removeItem("fieldOrder")),t?(t=window.JSON.parse(t),t=l.default.unique(t.concat(A)),t=Object.keys(t).map(function(A){return t[A]})):t=l.default.unique(r),t.forEach(function(A){var e=/-[\d]{4}$/;if(A.match(e)){var r=t.indexOf(A.replace(e,""));-1!==r&&(t.splice(t.indexOf(A),1),t.splice(r+1,t.indexOf(A),A))}}),e.disableFields.length&&(t=t.filter(function(A){return-1==e.disableFields.indexOf(A)})),t.filter(Boolean)},A.prototype.closeAllEdit=function(){var A=this,t=$("> li.editing",A.d.stage),e=$(".toggle-form",A.d.stage),r=$(".frm-holder",t);e.removeClass("open"),t.removeClass("editing"),$(".prev-holder",t).show(),r.hide()},A.prototype.toggleEdit=function(A){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],e=document.getElementById(A),r=$(".toggle-form",e),o=$(".frm-holder",e);e.classList.toggle("editing"),r.toggleClass("open"),t?($(".prev-holder",e).slideToggle(250),o.slideToggle(250)):($(".prev-holder",e).toggle(),o.toggle()),this.updatePreview($(e))},A.prototype.stickyControls=function(){var A=this.d,t=$(A.controls).parent(),e=$(A.stage).parent(),r=t.width(),o=A.controls.getBoundingClientRect();$(window).scroll(function(n){var i=$(n.target).scrollTop(),s={top:5,bottom:"auto",right:"auto",left:o.left},a=Object.assign({},s,d.config.opts.stickyControls.offset);if(i>e.offset().top){var l=Object.assign({position:"fixed",width:r},a),c=t.offset(),u=e.offset(),g=c.top+t.height(),f=u.top+e.height(),p=g===f&&c.top>i;g>f&&c.top!==u.top&&t.css({position:"absolute",top:"auto",bottom:0,right:0,left:"auto"}),(g<f||p)&&t.css(l)}else A.controls.parentElement.removeAttribute("style")})},A.prototype.showData=function(){var A=this.data,t=l.default.escapeHtml(A.formData),e=E("code",t,{className:"formData-"+d.config.opts.dataType});this.dialog(E("pre",e),null,"data-dialog")},A.prototype.removeField=function(A){var t=!1,e=this,r=this.d.stage,o=r.getElementsByClassName("form-field");if(!o.length)return console.warn("No fields to remove"),!1;if(!A){var n=[].slice.call(o).map(function(A){return A.id});console.warn("fieldID required to remove specific fields."),console.warn("Removing last field since no ID was supplied."),console.warn("Available IDs: "+n.join(", ")),A=r.lastChild.id}var i=document.getElementById(A),s=$(i);return i?(s.slideUp(250,function(){if(s.removeClass("deleting"),s.remove(),t=!0,e.save(),!r.childNodes.length){var A=r.parentElement;A.classList.add("empty"),A.dataset.content=f.default.current.getStarted}}),document.dispatchEvent(u.default.fieldRemoved),t):(console.warn("Field not found"),!1)},A.prototype.processActionButtons=function(A){var t=A.label,e=A.events,r=o(A,["label","events"]),n=this.data;t=t?f.default.current[t]||t:r.id?f.default.current[r.id]||l.default.capitalize(r.id):"",r.id=r.id?n.formID+"-"+r.id+"-action":n.formID+"-action-"+Math.round(1e3*Math.random());var i=E("button",t,r);if(e){for(var s in e)!function(A){e.hasOwnProperty(A)&&i.addEventListener(A,function(t){return e[A](t)})}(s)}return i},A.prototype.processSubtypes=function(A){for(var t in A)if(A.hasOwnProperty(t)){var e=h.default.getClass(t);h.default.register(A[t],e,t)}var r=h.default.getRegisteredSubtypes(),o={};for(var n in r)if(r.hasOwnProperty(n)){for(var i=[],s=r[n],a=Array.isArray(s),l=0,s=a?s:s[Symbol.iterator]();;){var c;if(a){if(l>=s.length)break;c=s[l++]}else{if(l=s.next(),l.done)break;c=l.value}var u=c,g=h.default.getClass(n,u);i.push({label:g.mi18n(u),value:u})}o[n]=i}return o},A.prototype.editorUI=function(){var A=this.d,t=this.data;A.stage=E("ul",null,{id:t.formID,className:"frmb"}),A.controls=E("ul",null,{id:t.formID+"-control-box",className:"frmb-control"})},A.prototype.processOptions=function(A){var t=this,e=A.actionButtons,r=o(A,["actionButtons"]);return e=[{type:"button",id:"clear",className:"clear-all btn btn-danger",events:{click:t.confirmRemoveAll.bind(t)}},{type:"button",label:"viewJSON",id:"data",className:"btn btn-default",events:{click:t.showData.bind(t)}},{type:"button",id:"save",className:"btn btn-primary save-template",events:{click:function(A){t.save(),d.config.opts.onSave(A,t.data.formData)}}}].concat(A.actionButtons),d.config.opts=Object.assign({},{actionButtons:e},r),d.config.opts},A.prototype.input=function(){var A=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return E("input",null,A)},A.prototype.getFormData=function(){var A=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"js",t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=this;return{js:function(){return e.prepData(e.d.stage)},xml:function(){return e.xmlSave(e.d.stage)},json:function(A){return A?window.JSON.stringify(e.prepData(e.d.stage),null,"\t"):window.JSON.stringify(e.prepData(e.d.stage))}}[A](t)},A}();t.default=y},145:function(A,t,e){var r=e(330);"string"==typeof r&&(r=[[A.i,r,""]]),e(112)(r,{attrs:{class:"formBuilder-injected-style"}}),r.locals&&(A.exports=r.locals)},147:function(A,t,e){"use strict";function r(A){return A&&A.__esModule?A:{default:A}}function o(A,t){var e={};for(var r in A)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(A,r)&&(e[r]=A[r]);return e}function n(A){return function(){var t=A.apply(this,arguments);return new Promise(function(A,e){function r(o,n){try{var i=t[o](n),s=i.value}catch(A){return void e(A)}return i.done?void A(s):Promise.resolve(s).then(function(A){r("next",A)},function(A){r("throw",A)})}return r("next")})}}e(60),e(145);var i=e(51),s=r(i),a=e(114),l=e(26),c=r(l),u=e(19),g=r(u),f=e(53),d=r(f),p=e(59),h=r(p),B=e(143),w=r(B),E=e(52),y=e(6),b=r(y);e(58);var M=e(34),I=r(M),m=(new Date).getTime(),Q=function A(t,e){function r(A,t){var e=[];for(var r in A)if(A.hasOwnProperty(r)){var n=p[r],i=A[r],s=i.value;i.value=t[r]||i.value||"",i.label&&(p[r]=i.label),i.options?e.push(l(r,i)):e.push(o(r,i)),p[r]=n,i.value=s}return e.join("")}function o(A,t){var e={id:A+"-"+y.lastID,title:t.description||t.label||A.toUpperCase(),name:A,type:t.type||"text",className:["fld-"+A]},r='<label for="'+e.id+'">'+p[A]+"</label>";return g.default.inArray(e.type,["checkbox","checkbox-group","radio-group"])||e.className.push("form-control"),e=Object.assign({},t,e),'<div class="form-group '+A+'-wrap">'+r+'<div class="input-wrap"><input '+g.default.attrString(e)+"></div></div>"}function l(A,t){var e=Object.keys(t.options).map(function(A){var e={value:A};return A===t.value&&(e.selected=null),D("option",t.options[A],e).outerHTML}),r={id:A+"-"+y.lastID,title:t.description||t.label||A.toUpperCase(),name:A,className:"fld-"+A+" form-control"},o='<label for="'+r.id+'">'+p[A]+"</label>";return Object.keys(t).filter(function(A){return!g.default.inArray(A,["value","options","label"])}).forEach(function(A){r[A]=t[A]}),'<div class="form-group '+A+'-wrap">'+o+'<div class="input-wrap">'+D("select",e,r).outerHTML+"</div></div>"}var u=this,f=this,p=c.default.current,B="frmb-"+m++,y=new a.Data(B),M=new s.default(B);t.layout||(t.layout=h.default);var Q=new t.layout(t.layoutTemplates,!0);b.default.controlConfig=t.controlConfig||{};var C=new w.default(B,Q),D=g.default.markup,v=t;b.default.loadCustom(t.controls),Object.keys(t.fields).length&&I.default.register(t.templates,t.fields),t=C.processOptions(t);var x=E.config.subtypes=C.processSubtypes(t.subtypes);C.editorUI(B);var Y=$(M.stage);y.layout=C.editorLayout(t.controlPosition),y.formID=B,y.lastID=y.formID+"-fld-1";var N=b.default.getRegistered(),j=I.default.getRegistered();j&&$.merge(N,j),t.sortableControls&&M.controls.classList.add("sort-enabled");for(var F=$(M.controls),T=[],R={},L=0;L<N.length;L++){var U=N[L],G=I.default.lookup(U),S=void 0;if(G)S=G.class;else if(G={},!(S=b.default.getClass(U))||!S.active(U))continue;var k=G.icon||S.icon(U),z=G.label||S.label(U),O=k?"":G.iconClassName||"icon-"+U.replace(/-[\d]{4}$/,"");k&&(z='<span class="control-icon">'+k+"</span>"+z);var P=D("li",D("span",z),{className:O+" input-control input-control-"+L});P.dataset.type=U,T.push(U),R[U]=P}t.inputSets.length&&t.inputSets.forEach(function(A,t){A.name=A.name||g.default.makeClassName(A.label);var e=D("li",A.label,{className:"input-set-control input-set-"+t});e.dataset.type=A.name,T.push(A.name),R[A.name]=e}),C.orderFields(T).forEach(function(A){R[A]&&M.controls.appendChild(R[A])}),Y.sortable({cursor:"move",opacity:.9,revert:150,beforeStop:function(A,t){return C.beforeStop.call(C,A,t)},start:function(A,t){return C.startMoving.call(C,A,t)},stop:function(A,t){return C.stopMoving.call(C,A,t)},cancel:["input","select","textarea",".disabled-field",".form-elements",".btn","button"].join(", "),placeholder:"frmb-placeholder"}),F.sortable({helper:"clone",opacity:.9,connectWith:Y,cancel:".fb-separator",cursor:"move",scroll:!1,placeholder:"ui-state-highlight",start:function(A,t){return C.startMoving.call(C,A,t)},stop:function(A,t){return C.stopMoving.call(C,A,t)},revert:150,beforeStop:function(A,t){return C.beforeStop.call(C,A,t)},distance:3,update:function(A,e){return!C.doCancel&&void(e.item.parent()[0]===M.stage?(C.doCancel=!0,J(e.item)):(C.setFieldOrder(F),C.doCancel=!t.sortableControls))}});var J=function(A){if(A[0].classList.contains("input-set-control")){var e=[],r=t.inputSets.find(function(t){return t.name===A[0].dataset.type});if(r&&r.showHeader){var o={type:"header",subtype:"h2",id:r.name,label:r.label};e.push(o)}e.push.apply(e,r.fields),e.forEach(function(A){AA(A,!0),(C.stopIndex||0===C.stopIndex)&&C.stopIndex++})}else AA(A,!0)};M.editorWrap=D("div",null,{id:y.formID+"-form-wrap",className:"form-wrap form-builder"+g.default.mobileClass()});var H=$(M.editorWrap),V=D("div",M.controls,{id:y.formID+"-cb-wrap",className:"cb-wrap "+y.layout.controls});if(t.showActionButtons){var W=t.actionButtons.map(function(A){if(A.id&&-1===t.disabledActionButtons.indexOf(A.id))return C.processActionButtons(A)}),Z=M.formActions=D("div",W,{className:"form-actions btn-group"});V.appendChild(Z)}var K=D("div",[M.stage,V],{id:y.formID+"-stage-wrap",className:"stage-wrap "+y.layout.stage});H.append(K,V),"textarea"===e.type?$(e).replaceWith(H):$(e).append(H);var X=g.default.debounce(function(A){if(A){if("keyup"===A.type&&"className"===A.target.name)return!1;var t=$(A.target).closest(".form-field");C.updatePreview(t),C.save.call(C)}}),q=[".form-elements input",".form-elements select",".form-elements textarea"].join(", ");Y.on("change blur keyup",q,X),$("li",M.controls).click(function(A){var t=$(A.target).closest("li");C.stopIndex=void 0,J(t),C.save.call(C)});var _=function(){var A=[],e=function(A){return g.default.markup("li",t[A],{className:"disabled-field form-"+A})};return t.prepend&&!$(".disabled-field.form-prepend",M.stage).length&&(A.push(!0),Y.prepend(e("prepend"))),t.append&&!$(".disabled-field.form-.append",M.stage).length&&(A.push(!0),Y.append(e("append"))),C.disabledTT(M.stage),A.some(function(A){return!0===A})},AA=function(A){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e={};if(A instanceof jQuery)if(e.type=A[0].dataset.type,e.type){var r=I.default.lookup(e.type);if(r)e=Object.assign({},r);else{var o=b.default.getClass(e.type);e.label=o.label(e.type)}}else{var n=A[0].attributes;t||(e.values=A.children().map(function(A,t){return{label:$(t).text(),value:$(t).attr("value"),selected:!!$(t).attr("selected")}}));for(var i=n.length-1;0<=i;i--)e[n[i].name]=n[i].value}else e=Object.assign({},A);e.name||(e.name=g.default.nameAttr(e)),t&&g.default.inArray(e.type,["text","number","file","date","select","textarea","autocomplete"])&&(e.className=e.className||"form-control");var s=/(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(e.className);s&&(e.style=s[1]),uA(e,t),t&&document.dispatchEvent(d.default.fieldAdded),K.classList.remove("empty")},tA=function(A){if((A=C.getData(A))&&A.length){for(var e,r=0;r<A.length;r++)e=g.default.trimObj(A[r]),AA(e);K.classList.remove("empty")}else t.defaultFields&&t.defaultFields.length?(t.defaultFields.forEach(function(A){return AA(A)}),K.classList.remove("empty")):t.prepend||t.append||(K.classList.add("empty"),K.dataset.content=p.getStarted);_()&&K.classList.remove("empty"),C.save()},eA=function(A){var t=A.type,e=A.values,r=A.name,o=[g.default.markup("a",p.addOption,{className:"add add-opt"})],n=['<label class="false-label">'+p.selectOptions+"</label>"],i=A.multiple||"checkbox-group"===t,s=function(A){var e={label:A,value:g.default.hyphenCase(A)};return"autocomplete"!==t&&(e.selected=!1),e};if(e&&e.length)e.forEach(function(A){return Object.assign({},{selected:!1},A)});else{var a=[1,2,3];g.default.inArray(t,["checkbox-group","checkbox"])&&(a=[1]),e=a.map(function(A){var t=p.option+" "+A;return s(t)});var l=e[0];l.hasOwnProperty("selected")&&(l.selected=!0)}return n.push('<div class="sortable-options-wrap">'),n.push('<ol class="sortable-options">'),g.default.forEach(e,function(A){n.push(gA(r,e[A],i))}),n.push("</ol>"),n.push(g.default.markup("div",o,{className:"option-actions"}).outerHTML),n.push("</div>"),g.default.markup("div",n.join(""),{className:"form-group field-options"}).outerHTML},rA=function(A){var t=["required","label","description","placeholder","className","name","access","value"],e=["header","paragraph","file","autocomplete"].concat(M.optionFields),r=!g.default.inArray(A,e),o={autocomplete:t.concat(["options"]),button:["label","subtype","style","className","name","value","access"],checkbox:["required","label","description","toggle","inline","className","name","access","other","options"],text:t.concat(["subtype","maxlength"]),date:t,file:t.concat(["subtype","multiple"]),header:["label","subtype","className","access"],hidden:["name","value","access"],paragraph:["label","subtype","className","access"],number:t.concat(["min","max","step"]),select:t.concat(["multiple","options"]),textarea:t.concat(["subtype","maxlength","rows"])};o["checkbox-group"]=o.checkbox,o["radio-group"]=o.checkbox;var n=o[A];return"radio-group"===A&&g.default.remove("toggle",n),g.default.inArray(A,["header","paragraph","button"])&&g.default.remove("description",n),r||g.defau