shinbada-form-vue 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,7 +13,7 @@ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.
|
|
|
13
13
|
* Released under MIT license <https://lodash.com/license>
|
|
14
14
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
15
15
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
16
|
-
*/(function(){var r="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",c="[object Array]",u="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",h="[object Map]",g="[object Number]",b="[object Object]",v="[object RegExp]",y="[object Set]",_="[object String]",w="[object Symbol]",x="[object WeakMap]",k="[object ArrayBuffer]",O="[object DataView]",C="[object Float32Array]",S="[object Float64Array]",D="[object Int8Array]",P="[object Int16Array]",E="[object Int32Array]",j="[object Uint8Array]",M="[object Uint16Array]",F="[object Uint32Array]",T=/\b__p \+= '';/g,I=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,A=/[&<>"']/g,L=RegExp(R.source),N=RegExp(A.source),W=/<%-([\s\S]+?)%>/g,V=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,U=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/[\\^$.*+?()[\]{}|]/g,G=RegExp(H.source),q=/^\s+/,X=/\s/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Y=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,Z=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ie=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,de=/['\n\r\u2028\u2029\\]/g,fe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",me="[\\ud800-\\udfff]",he="["+pe+"]",ge="["+fe+"]",be="\\d+",ve="[\\u2700-\\u27bf]",ye="[a-z\\xdf-\\xf6\\xf8-\\xff]",_e="[^\\ud800-\\udfff"+pe+be+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",we="\\ud83c[\\udffb-\\udfff]",xe="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Oe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Se="(?:"+ye+"|"+_e+")",De="(?:"+Ce+"|"+_e+")",Pe="(?:"+ge+"|"+we+")"+"?",Ee="[\\ufe0e\\ufe0f]?"+Pe+("(?:\\u200d(?:"+[xe,ke,Oe].join("|")+")[\\ufe0e\\ufe0f]?"+Pe+")*"),je="(?:"+[ve,ke,Oe].join("|")+")"+Ee,Me="(?:"+[xe+ge+"?",ge,ke,Oe,me].join("|")+")",Fe=RegExp("['’]","g"),Te=RegExp(ge,"g"),Ie=RegExp(we+"(?="+we+")|"+Me+Ee,"g"),$e=RegExp([Ce+"?"+ye+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[he,Ce,"$"].join("|")+")",De+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[he,Ce+Se,"$"].join("|")+")",Ce+"?"+Se+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ce+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",be,je].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+fe+"\\ufe0e\\ufe0f]"),Ae=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Le=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ne=-1,We={};We[C]=We[S]=We[D]=We[P]=We[E]=We[j]=We["[object Uint8ClampedArray]"]=We[M]=We[F]=!0,We[l]=We[c]=We[k]=We[u]=We[O]=We[d]=We[f]=We[p]=We[h]=We[g]=We[b]=We[v]=We[y]=We[_]=We[x]=!1;var Ve={};Ve[l]=Ve[c]=Ve[k]=Ve[O]=Ve[u]=Ve[d]=Ve[C]=Ve[S]=Ve[D]=Ve[P]=Ve[E]=Ve[h]=Ve[g]=Ve[b]=Ve[v]=Ve[y]=Ve[_]=Ve[w]=Ve[j]=Ve["[object Uint8ClampedArray]"]=Ve[M]=Ve[F]=!0,Ve[f]=Ve[p]=Ve[x]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,Ke=parseInt,Ue="object"==typeof e&&e&&e.Object===Object&&e,He="object"==typeof self&&self&&self.Object===Object&&self,Ge=Ue||He||Function("return this")(),qe=t&&!t.nodeType&&t,Xe=qe&&"object"==typeof i&&i&&!i.nodeType&&i,Je=Xe&&Xe.exports===qe,Ye=Je&&Ue.process,Qe=function(){try{var e=Xe&&Xe.require&&Xe.require("util").types;return e||Ye&&Ye.binding&&Ye.binding("util")}catch(e){}}(),Ze=Qe&&Qe.isArrayBuffer,et=Qe&&Qe.isDate,tt=Qe&&Qe.isMap,nt=Qe&&Qe.isRegExp,it=Qe&&Qe.isSet,ot=Qe&&Qe.isTypedArray;function rt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,i){for(var o=-1,r=null==e?0:e.length;++o<r;){var a=e[o];t(i,a,n(a),e)}return i}function st(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ct(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function ut(e,t){for(var n=-1,i=null==e?0:e.length,o=0,r=[];++n<i;){var a=e[n];t(a,n,e)&&(r[o++]=a)}return r}function dt(e,t){return!!(null==e?0:e.length)&&wt(e,t,0)>-1}function ft(e,t,n){for(var i=-1,o=null==e?0:e.length;++i<o;)if(n(t,e[i]))return!0;return!1}function pt(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}function mt(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}function ht(e,t,n,i){var o=-1,r=null==e?0:e.length;for(i&&r&&(n=e[++o]);++o<r;)n=t(n,e[o],o,e);return n}function gt(e,t,n,i){var o=null==e?0:e.length;for(i&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function bt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var vt=Ct("length");function yt(e,t,n){var i;return n(e,(function(e,n,o){if(t(e,n,o))return i=n,!1})),i}function _t(e,t,n,i){for(var o=e.length,r=n+(i?1:-1);i?r--:++r<o;)if(t(e[r],r,e))return r;return-1}function wt(e,t,n){return t==t?function(e,t,n){var i=n-1,o=e.length;for(;++i<o;)if(e[i]===t)return i;return-1}(e,t,n):_t(e,kt,n)}function xt(e,t,n,i){for(var o=n-1,r=e.length;++o<r;)if(i(e[o],t))return o;return-1}function kt(e){return e!=e}function Ot(e,t){var n=null==e?0:e.length;return n?Pt(e,t)/n:NaN}function Ct(e){return function(t){return null==t?void 0:t[e]}}function St(e){return function(t){return null==e?void 0:e[t]}}function Dt(e,t,n,i,o){return o(e,(function(e,o,r){n=i?(i=!1,e):t(n,e,o,r)})),n}function Pt(e,t){for(var n,i=-1,o=e.length;++i<o;){var r=t(e[i]);void 0!==r&&(n=void 0===n?r:n+r)}return n}function Et(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function jt(e){return e?e.slice(0,qt(e)+1).replace(q,""):e}function Mt(e){return function(t){return e(t)}}function Ft(e,t){return pt(t,(function(t){return e[t]}))}function Tt(e,t){return e.has(t)}function It(e,t){for(var n=-1,i=e.length;++n<i&&wt(t,e[n],0)>-1;);return n}function $t(e,t){for(var n=e.length;n--&&wt(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var At=St({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Lt=St({"&":"&","<":"<",">":">",'"':""","'":"'"});function Nt(e){return"\\"+ze[e]}function Wt(e){return Re.test(e)}function Vt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Bt(e,t){for(var n=-1,i=e.length,o=0,r=[];++n<i;){var s=e[n];s!==t&&s!==a||(e[n]=a,r[o++]=n)}return r}function Kt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Ht(e){return Wt(e)?function(e){var t=Ie.lastIndex=0;for(;Ie.test(e);)++t;return t}(e):vt(e)}function Gt(e){return Wt(e)?function(e){return e.match(Ie)||[]}(e):function(e){return e.split("")}(e)}function qt(e){for(var t=e.length;t--&&X.test(e.charAt(t)););return t}var Xt=St({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Jt=function e(t){var n,i=(t=null==t?Ge:Jt.defaults(Ge.Object(),t,Jt.pick(Ge,Le))).Array,o=t.Date,X=t.Error,fe=t.Function,pe=t.Math,me=t.Object,he=t.RegExp,ge=t.String,be=t.TypeError,ve=i.prototype,ye=fe.prototype,_e=me.prototype,we=t["__core-js_shared__"],xe=ye.toString,ke=_e.hasOwnProperty,Oe=0,Ce=(n=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Se=_e.toString,De=xe.call(me),Pe=Ge._,Ee=he("^"+xe.call(ke).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),je=Je?t.Buffer:void 0,Me=t.Symbol,Ie=t.Uint8Array,Re=je?je.allocUnsafe:void 0,ze=zt(me.getPrototypeOf,me),Ue=me.create,He=_e.propertyIsEnumerable,qe=ve.splice,Xe=Me?Me.isConcatSpreadable:void 0,Ye=Me?Me.iterator:void 0,Qe=Me?Me.toStringTag:void 0,vt=function(){try{var e=tr(me,"defineProperty");return e({},"",{}),e}catch(e){}}(),St=t.clearTimeout!==Ge.clearTimeout&&t.clearTimeout,Yt=o&&o.now!==Ge.Date.now&&o.now,Qt=t.setTimeout!==Ge.setTimeout&&t.setTimeout,Zt=pe.ceil,en=pe.floor,tn=me.getOwnPropertySymbols,nn=je?je.isBuffer:void 0,on=t.isFinite,rn=ve.join,an=zt(me.keys,me),sn=pe.max,ln=pe.min,cn=o.now,un=t.parseInt,dn=pe.random,fn=ve.reverse,pn=tr(t,"DataView"),mn=tr(t,"Map"),hn=tr(t,"Promise"),gn=tr(t,"Set"),bn=tr(t,"WeakMap"),vn=tr(me,"create"),yn=bn&&new bn,_n={},wn=Pr(pn),xn=Pr(mn),kn=Pr(hn),On=Pr(gn),Cn=Pr(bn),Sn=Me?Me.prototype:void 0,Dn=Sn?Sn.valueOf:void 0,Pn=Sn?Sn.toString:void 0;function En(e){if(Ua(e)&&!Ia(e)&&!(e instanceof Tn)){if(e instanceof Fn)return e;if(ke.call(e,"__wrapped__"))return Er(e)}return new Fn(e)}var jn=function(){function e(){}return function(t){if(!Ka(t))return{};if(Ue)return Ue(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Mn(){}function Fn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Tn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function In(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function An(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Rn;++t<n;)this.add(e[t])}function Ln(e){var t=this.__data__=new $n(e);this.size=t.size}function Nn(e,t){var n=Ia(e),i=!n&&Ta(e),o=!n&&!i&&La(e),r=!n&&!i&&!o&&Za(e),a=n||i||o||r,s=a?Et(e.length,ge):[],l=s.length;for(var c in e)!t&&!ke.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||lr(c,l))||s.push(c);return s}function Wn(e){var t=e.length;return t?e[Ai(0,t-1)]:void 0}function Vn(e,t){return Cr(yo(e),Jn(t,0,e.length))}function zn(e){return Cr(yo(e))}function Bn(e,t,n){(void 0!==n&&!ja(e[t],n)||void 0===n&&!(t in e))&&qn(e,t,n)}function Kn(e,t,n){var i=e[t];ke.call(e,t)&&ja(i,n)&&(void 0!==n||t in e)||qn(e,t,n)}function Un(e,t){for(var n=e.length;n--;)if(ja(e[n][0],t))return n;return-1}function Hn(e,t,n,i){return ti(e,(function(e,o,r){t(i,e,n(e),r)})),i}function Gn(e,t){return e&&_o(t,ws(t),e)}function qn(e,t,n){"__proto__"==t&&vt?vt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Xn(e,t){for(var n=-1,o=t.length,r=i(o),a=null==e;++n<o;)r[n]=a?void 0:gs(e,t[n]);return r}function Jn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Yn(e,t,n,i,o,r){var a,s=1&t,c=2&t,f=4&t;if(n&&(a=o?n(e,i,o,r):n(e)),void 0!==a)return a;if(!Ka(e))return e;var x=Ia(e);if(x){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&ke.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return yo(e,a)}else{var T=or(e),I=T==p||T==m;if(La(e))return po(e,s);if(T==b||T==l||I&&!o){if(a=c||I?{}:ar(e),!s)return c?function(e,t){return _o(e,ir(e),t)}(e,function(e,t){return e&&_o(t,xs(t),e)}(a,e)):function(e,t){return _o(e,nr(e),t)}(e,Gn(a,e))}else{if(!Ve[T])return o?e:{};a=function(e,t,n){var i=e.constructor;switch(t){case k:return mo(e);case u:case d:return new i(+e);case O:return function(e,t){var n=t?mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case C:case S:case D:case P:case E:case j:case"[object Uint8ClampedArray]":case M:case F:return ho(e,n);case h:return new i;case g:case _:return new i(e);case v:return function(e){var t=new e.constructor(e.source,ie.exec(e));return t.lastIndex=e.lastIndex,t}(e);case y:return new i;case w:return o=e,Dn?me(Dn.call(o)):{}}var o}(e,T,s)}}r||(r=new Ln);var $=r.get(e);if($)return $;r.set(e,a),Ja(e)?e.forEach((function(i){a.add(Yn(i,t,n,i,e,r))})):Ha(e)&&e.forEach((function(i,o){a.set(o,Yn(i,t,n,o,e,r))}));var R=x?void 0:(f?c?qo:Go:c?xs:ws)(e);return st(R||e,(function(i,o){R&&(i=e[o=i]),Kn(a,o,Yn(i,t,n,o,e,r))})),a}function Qn(e,t,n){var i=n.length;if(null==e)return!i;for(e=me(e);i--;){var o=n[i],r=t[o],a=e[o];if(void 0===a&&!(o in e)||!r(a))return!1}return!0}function Zn(e,t,n){if("function"!=typeof e)throw new be(r);return wr((function(){e.apply(void 0,n)}),t)}function ei(e,t,n,i){var o=-1,r=dt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=pt(t,Mt(n))),i?(r=ft,a=!1):t.length>=200&&(r=Tt,a=!1,t=new An(t));e:for(;++o<s;){var u=e[o],d=null==n?u:n(u);if(u=i||0!==u?u:0,a&&d==d){for(var f=c;f--;)if(t[f]===d)continue e;l.push(u)}else r(t,d,i)||l.push(u)}return l}En.templateSettings={escape:W,evaluate:V,interpolate:z,variable:"",imports:{_:En}},En.prototype=Mn.prototype,En.prototype.constructor=En,Fn.prototype=jn(Mn.prototype),Fn.prototype.constructor=Fn,Tn.prototype=jn(Mn.prototype),Tn.prototype.constructor=Tn,In.prototype.clear=function(){this.__data__=vn?vn(null):{},this.size=0},In.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},In.prototype.get=function(e){var t=this.__data__;if(vn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ke.call(t,e)?t[e]:void 0},In.prototype.has=function(e){var t=this.__data__;return vn?void 0!==t[e]:ke.call(t,e)},In.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=vn&&void 0===t?"__lodash_hash_undefined__":t,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=Un(t,e);return!(n<0)&&(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,!0)},$n.prototype.get=function(e){var t=this.__data__,n=Un(t,e);return n<0?void 0:t[n][1]},$n.prototype.has=function(e){return Un(this.__data__,e)>-1},$n.prototype.set=function(e,t){var n=this.__data__,i=Un(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new In,map:new(mn||$n),string:new In}},Rn.prototype.delete=function(e){var t=Zo(this,e).delete(e);return this.size-=t?1:0,t},Rn.prototype.get=function(e){return Zo(this,e).get(e)},Rn.prototype.has=function(e){return Zo(this,e).has(e)},Rn.prototype.set=function(e,t){var n=Zo(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},An.prototype.add=An.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},An.prototype.has=function(e){return this.__data__.has(e)},Ln.prototype.clear=function(){this.__data__=new $n,this.size=0},Ln.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ln.prototype.get=function(e){return this.__data__.get(e)},Ln.prototype.has=function(e){return this.__data__.has(e)},Ln.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $n){var i=n.__data__;if(!mn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rn(i)}return n.set(e,t),this.size=n.size,this};var ti=ko(ci),ni=ko(ui,!0);function ii(e,t){var n=!0;return ti(e,(function(e,i,o){return n=!!t(e,i,o)})),n}function oi(e,t,n){for(var i=-1,o=e.length;++i<o;){var r=e[i],a=t(r);if(null!=a&&(void 0===s?a==a&&!Qa(a):n(a,s)))var s=a,l=r}return l}function ri(e,t){var n=[];return ti(e,(function(e,i,o){t(e,i,o)&&n.push(e)})),n}function ai(e,t,n,i,o){var r=-1,a=e.length;for(n||(n=sr),o||(o=[]);++r<a;){var s=e[r];t>0&&n(s)?t>1?ai(s,t-1,n,i,o):mt(o,s):i||(o[o.length]=s)}return o}var si=Oo(),li=Oo(!0);function ci(e,t){return e&&si(e,t,ws)}function ui(e,t){return e&&li(e,t,ws)}function di(e,t){return ut(t,(function(t){return Va(e[t])}))}function fi(e,t){for(var n=0,i=(t=lo(t,e)).length;null!=e&&n<i;)e=e[Dr(t[n++])];return n&&n==i?e:void 0}function pi(e,t,n){var i=t(e);return Ia(e)?i:mt(i,n(e))}function mi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Qe&&Qe in me(e)?function(e){var t=ke.call(e,Qe),n=e[Qe];try{e[Qe]=void 0;var i=!0}catch(e){}var o=Se.call(e);i&&(t?e[Qe]=n:delete e[Qe]);return o}(e):function(e){return Se.call(e)}(e)}function hi(e,t){return e>t}function gi(e,t){return null!=e&&ke.call(e,t)}function bi(e,t){return null!=e&&t in me(e)}function vi(e,t,n){for(var o=n?ft:dt,r=e[0].length,a=e.length,s=a,l=i(a),c=1/0,u=[];s--;){var d=e[s];s&&t&&(d=pt(d,Mt(t))),c=ln(d.length,c),l[s]=!n&&(t||r>=120&&d.length>=120)?new An(s&&d):void 0}d=e[0];var f=-1,p=l[0];e:for(;++f<r&&u.length<c;){var m=d[f],h=t?t(m):m;if(m=n||0!==m?m:0,!(p?Tt(p,h):o(u,h,n))){for(s=a;--s;){var g=l[s];if(!(g?Tt(g,h):o(e[s],h,n)))continue e}p&&p.push(h),u.push(m)}}return u}function yi(e,t,n){var i=null==(e=br(e,t=lo(t,e)))?e:e[Dr(Wr(t))];return null==i?void 0:rt(i,e,n)}function _i(e){return Ua(e)&&mi(e)==l}function wi(e,t,n,i,o){return e===t||(null==e||null==t||!Ua(e)&&!Ua(t)?e!=e&&t!=t:function(e,t,n,i,o,r){var a=Ia(e),s=Ia(t),p=a?c:or(e),m=s?c:or(t),x=(p=p==l?b:p)==b,C=(m=m==l?b:m)==b,S=p==m;if(S&&La(e)){if(!La(t))return!1;a=!0,x=!1}if(S&&!x)return r||(r=new Ln),a||Za(e)?Uo(e,t,n,i,o,r):function(e,t,n,i,o,r,a){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!r(new Ie(e),new Ie(t)));case u:case d:case g:return ja(+e,+t);case f:return e.name==t.name&&e.message==t.message;case v:case _:return e==t+"";case h:var s=Vt;case y:var l=1&i;if(s||(s=Kt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;i|=2,a.set(e,t);var p=Uo(s(e),s(t),i,o,r,a);return a.delete(e),p;case w:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,p,n,i,o,r);if(!(1&n)){var D=x&&ke.call(e,"__wrapped__"),P=C&&ke.call(t,"__wrapped__");if(D||P){var E=D?e.value():e,j=P?t.value():t;return r||(r=new Ln),o(E,j,n,i,r)}}if(!S)return!1;return r||(r=new Ln),function(e,t,n,i,o,r){var a=1&n,s=Go(e),l=s.length,c=Go(t).length;if(l!=c&&!a)return!1;var u=l;for(;u--;){var d=s[u];if(!(a?d in t:ke.call(t,d)))return!1}var f=r.get(e),p=r.get(t);if(f&&p)return f==t&&p==e;var m=!0;r.set(e,t),r.set(t,e);var h=a;for(;++u<l;){d=s[u];var g=e[d],b=t[d];if(i)var v=a?i(b,g,d,t,e,r):i(g,b,d,e,t,r);if(!(void 0===v?g===b||o(g,b,n,i,r):v)){m=!1;break}h||(h="constructor"==d)}if(m&&!h){var y=e.constructor,_=t.constructor;y==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,n,i,o,r)}(e,t,n,i,wi,o))}function xi(e,t,n,i){var o=n.length,r=o,a=!i;if(null==e)return!r;for(e=me(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<r;){var l=(s=n[o])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new Ln;if(i)var f=i(c,u,l,e,t,d);if(!(void 0===f?wi(u,c,3,i,d):f))return!1}}return!0}function ki(e){return!(!Ka(e)||(t=e,Ce&&Ce in t))&&(Va(e)?Ee:ae).test(Pr(e));var t}function Oi(e){return"function"==typeof e?e:null==e?Gs:"object"==typeof e?Ia(e)?ji(e[0],e[1]):Ei(e):nl(e)}function Ci(e){if(!pr(e))return an(e);var t=[];for(var n in me(e))ke.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Si(e){if(!Ka(e))return function(e){var t=[];if(null!=e)for(var n in me(e))t.push(n);return t}(e);var t=pr(e),n=[];for(var i in e)("constructor"!=i||!t&&ke.call(e,i))&&n.push(i);return n}function Di(e,t){return e<t}function Pi(e,t){var n=-1,o=Ra(e)?i(e.length):[];return ti(e,(function(e,i,r){o[++n]=t(e,i,r)})),o}function Ei(e){var t=er(e);return 1==t.length&&t[0][2]?hr(t[0][0],t[0][1]):function(n){return n===e||xi(n,e,t)}}function ji(e,t){return ur(e)&&mr(t)?hr(Dr(e),t):function(n){var i=gs(n,e);return void 0===i&&i===t?bs(n,e):wi(t,i,3)}}function Mi(e,t,n,i,o){e!==t&&si(t,(function(r,a){if(o||(o=new Ln),Ka(r))!function(e,t,n,i,o,r,a){var s=yr(e,n),l=yr(t,n),c=a.get(l);if(c)return void Bn(e,n,c);var u=r?r(s,l,n+"",e,t,a):void 0,d=void 0===u;if(d){var f=Ia(l),p=!f&&La(l),m=!f&&!p&&Za(l);u=l,f||p||m?Ia(s)?u=s:Aa(s)?u=yo(s):p?(d=!1,u=po(l,!0)):m?(d=!1,u=ho(l,!0)):u=[]:qa(l)||Ta(l)?(u=s,Ta(s)?u=ss(s):Ka(s)&&!Va(s)||(u=ar(l))):d=!1}d&&(a.set(l,u),o(u,l,i,r,a),a.delete(l));Bn(e,n,u)}(e,t,a,n,Mi,i,o);else{var s=i?i(yr(e,a),r,a+"",e,t,o):void 0;void 0===s&&(s=r),Bn(e,a,s)}}),xs)}function Fi(e,t){var n=e.length;if(n)return lr(t+=t<0?n:0,n)?e[t]:void 0}function Ti(e,t,n){t=t.length?pt(t,(function(e){return Ia(e)?function(t){return fi(t,1===e.length?e[0]:e)}:e})):[Gs];var i=-1;return t=pt(t,Mt(Qo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Pi(e,(function(e,n,o){return{criteria:pt(t,(function(t){return t(e)})),index:++i,value:e}})),(function(e,t){return function(e,t,n){var i=-1,o=e.criteria,r=t.criteria,a=o.length,s=n.length;for(;++i<a;){var l=go(o[i],r[i]);if(l){if(i>=s)return l;var c=n[i];return l*("desc"==c?-1:1)}}return e.index-t.index}(e,t,n)}))}function Ii(e,t,n){for(var i=-1,o=t.length,r={};++i<o;){var a=t[i],s=fi(e,a);n(s,a)&&zi(r,lo(a,e),s)}return r}function $i(e,t,n,i){var o=i?xt:wt,r=-1,a=t.length,s=e;for(e===t&&(t=yo(t)),n&&(s=pt(e,Mt(n)));++r<a;)for(var l=0,c=t[r],u=n?n(c):c;(l=o(s,u,l,i))>-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}function Ri(e,t){for(var n=e?t.length:0,i=n-1;n--;){var o=t[n];if(n==i||o!==r){var r=o;lr(o)?qe.call(e,o,1):eo(e,o)}}return e}function Ai(e,t){return e+en(dn()*(t-e+1))}function Li(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function Ni(e,t){return xr(gr(e,t,Gs),e+"")}function Wi(e){return Wn(js(e))}function Vi(e,t){var n=js(e);return Cr(n,Jn(t,0,n.length))}function zi(e,t,n,i){if(!Ka(e))return e;for(var o=-1,r=(t=lo(t,e)).length,a=r-1,s=e;null!=s&&++o<r;){var l=Dr(t[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var u=s[l];void 0===(c=i?i(u,l,s):void 0)&&(c=Ka(u)?u:lr(t[o+1])?[]:{})}Kn(s,l,c),s=s[l]}return e}var Bi=yn?function(e,t){return yn.set(e,t),e}:Gs,Ki=vt?function(e,t){return vt(e,"toString",{configurable:!0,enumerable:!1,value:Ks(t),writable:!0})}:Gs;function Ui(e){return Cr(js(e))}function Hi(e,t,n){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=i(r);++o<r;)a[o]=e[o+t];return a}function Gi(e,t){var n;return ti(e,(function(e,i,o){return!(n=t(e,i,o))})),!!n}function qi(e,t,n){var i=0,o=null==e?i:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;i<o;){var r=i+o>>>1,a=e[r];null!==a&&!Qa(a)&&(n?a<=t:a<t)?i=r+1:o=r}return o}return Xi(e,t,Gs,n)}function Xi(e,t,n,i){var o=0,r=null==e?0:e.length;if(0===r)return 0;for(var a=(t=n(t))!=t,s=null===t,l=Qa(t),c=void 0===t;o<r;){var u=en((o+r)/2),d=n(e[u]),f=void 0!==d,p=null===d,m=d==d,h=Qa(d);if(a)var g=i||m;else g=c?m&&(i||f):s?m&&f&&(i||!p):l?m&&f&&!p&&(i||!h):!p&&!h&&(i?d<=t:d<t);g?o=u+1:r=u}return ln(r,4294967294)}function Ji(e,t){for(var n=-1,i=e.length,o=0,r=[];++n<i;){var a=e[n],s=t?t(a):a;if(!n||!ja(s,l)){var l=s;r[o++]=0===a?0:a}}return r}function Yi(e){return"number"==typeof e?e:Qa(e)?NaN:+e}function Qi(e){if("string"==typeof e)return e;if(Ia(e))return pt(e,Qi)+"";if(Qa(e))return Pn?Pn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zi(e,t,n){var i=-1,o=dt,r=e.length,a=!0,s=[],l=s;if(n)a=!1,o=ft;else if(r>=200){var c=t?null:No(e);if(c)return Kt(c);a=!1,o=Tt,l=new An}else l=t?[]:s;e:for(;++i<r;){var u=e[i],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}function eo(e,t){return null==(e=br(e,t=lo(t,e)))||delete e[Dr(Wr(t))]}function to(e,t,n,i){return zi(e,t,n(fi(e,t)),i)}function no(e,t,n,i){for(var o=e.length,r=i?o:-1;(i?r--:++r<o)&&t(e[r],r,e););return n?Hi(e,i?0:r,i?r+1:o):Hi(e,i?r+1:0,i?o:r)}function io(e,t){var n=e;return n instanceof Tn&&(n=n.value()),ht(t,(function(e,t){return t.func.apply(t.thisArg,mt([e],t.args))}),n)}function oo(e,t,n){var o=e.length;if(o<2)return o?Zi(e[0]):[];for(var r=-1,a=i(o);++r<o;)for(var s=e[r],l=-1;++l<o;)l!=r&&(a[r]=ei(a[r]||s,e[l],t,n));return Zi(ai(a,1),t,n)}function ro(e,t,n){for(var i=-1,o=e.length,r=t.length,a={};++i<o;){var s=i<r?t[i]:void 0;n(a,e[i],s)}return a}function ao(e){return Aa(e)?e:[]}function so(e){return"function"==typeof e?e:Gs}function lo(e,t){return Ia(e)?e:ur(e,t)?[e]:Sr(ls(e))}var co=Ni;function uo(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:Hi(e,t,n)}var fo=St||function(e){return Ge.clearTimeout(e)};function po(e,t){if(t)return e.slice();var n=e.length,i=Re?Re(n):new e.constructor(n);return e.copy(i),i}function mo(e){var t=new e.constructor(e.byteLength);return new Ie(t).set(new Ie(e)),t}function ho(e,t){var n=t?mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function go(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,r=Qa(e),a=void 0!==t,s=null===t,l=t==t,c=Qa(t);if(!s&&!c&&!r&&e>t||r&&a&&l&&!s&&!c||i&&a&&l||!n&&l||!o)return 1;if(!i&&!r&&!c&&e<t||c&&n&&o&&!i&&!r||s&&n&&o||!a&&o||!l)return-1}return 0}function bo(e,t,n,o){for(var r=-1,a=e.length,s=n.length,l=-1,c=t.length,u=sn(a-s,0),d=i(c+u),f=!o;++l<c;)d[l]=t[l];for(;++r<s;)(f||r<a)&&(d[n[r]]=e[r]);for(;u--;)d[l++]=e[r++];return d}function vo(e,t,n,o){for(var r=-1,a=e.length,s=-1,l=n.length,c=-1,u=t.length,d=sn(a-l,0),f=i(d+u),p=!o;++r<d;)f[r]=e[r];for(var m=r;++c<u;)f[m+c]=t[c];for(;++s<l;)(p||r<a)&&(f[m+n[s]]=e[r++]);return f}function yo(e,t){var n=-1,o=e.length;for(t||(t=i(o));++n<o;)t[n]=e[n];return t}function _o(e,t,n,i){var o=!n;n||(n={});for(var r=-1,a=t.length;++r<a;){var s=t[r],l=i?i(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?qn(n,s,l):Kn(n,s,l)}return n}function wo(e,t){return function(n,i){var o=Ia(n)?at:Hn,r=t?t():{};return o(n,e,Qo(i,2),r)}}function xo(e){return Ni((function(t,n){var i=-1,o=n.length,r=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(r=e.length>3&&"function"==typeof r?(o--,r):void 0,a&&cr(n[0],n[1],a)&&(r=o<3?void 0:r,o=1),t=me(t);++i<o;){var s=n[i];s&&e(t,s,i,r)}return t}))}function ko(e,t){return function(n,i){if(null==n)return n;if(!Ra(n))return e(n,i);for(var o=n.length,r=t?o:-1,a=me(n);(t?r--:++r<o)&&!1!==i(a[r],r,a););return n}}function Oo(e){return function(t,n,i){for(var o=-1,r=me(t),a=i(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(r[l],l,r))break}return t}}function Co(e){return function(t){var n=Wt(t=ls(t))?Gt(t):void 0,i=n?n[0]:t.charAt(0),o=n?uo(n,1).join(""):t.slice(1);return i[e]()+o}}function So(e){return function(t){return ht(Vs(Ts(t).replace(Fe,"")),e,"")}}function Do(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=jn(e.prototype),i=e.apply(n,t);return Ka(i)?i:n}}function Po(e){return function(t,n,i){var o=me(t);if(!Ra(t)){var r=Qo(n,3);t=ws(t),n=function(e){return r(o[e],e,o)}}var a=e(t,n,i);return a>-1?o[r?t[a]:a]:void 0}}function Eo(e){return Ho((function(t){var n=t.length,i=n,o=Fn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new be(r);if(o&&!s&&"wrapper"==Jo(a))var s=new Fn([],!0)}for(i=s?i:n;++i<n;){var l=Jo(a=t[i]),c="wrapper"==l?Xo(a):void 0;s=c&&dr(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[Jo(c[0])].apply(s,c[3]):1==a.length&&dr(a)?s[l]():s.thru(a)}return function(){var e=arguments,i=e[0];if(s&&1==e.length&&Ia(i))return s.plant(i).value();for(var o=0,r=n?t[o].apply(this,e):i;++o<n;)r=t[o].call(this,r);return r}}))}function jo(e,t,n,o,r,a,s,l,c,u){var d=128&t,f=1&t,p=2&t,m=24&t,h=512&t,g=p?void 0:Do(e);return function b(){for(var v=arguments.length,y=i(v),_=v;_--;)y[_]=arguments[_];if(m)var w=Yo(b),x=Rt(y,w);if(o&&(y=bo(y,o,r,m)),a&&(y=vo(y,a,s,m)),v-=x,m&&v<u){var k=Bt(y,w);return Ao(e,t,jo,b.placeholder,n,y,k,l,c,u-v)}var O=f?n:this,C=p?O[e]:e;return v=y.length,l?y=vr(y,l):h&&v>1&&y.reverse(),d&&c<v&&(y.length=c),this&&this!==Ge&&this instanceof b&&(C=g||Do(C)),C.apply(O,y)}}function Mo(e,t){return function(n,i){return function(e,t,n,i){return ci(e,(function(e,o,r){t(i,n(e),o,r)})),i}(n,e,t(i),{})}}function Fo(e,t){return function(n,i){var o;if(void 0===n&&void 0===i)return t;if(void 0!==n&&(o=n),void 0!==i){if(void 0===o)return i;"string"==typeof n||"string"==typeof i?(n=Qi(n),i=Qi(i)):(n=Yi(n),i=Yi(i)),o=e(n,i)}return o}}function To(e){return Ho((function(t){return t=pt(t,Mt(Qo())),Ni((function(n){var i=this;return e(t,(function(e){return rt(e,i,n)}))}))}))}function Io(e,t){var n=(t=void 0===t?" ":Qi(t)).length;if(n<2)return n?Li(t,e):t;var i=Li(t,Zt(e/Ht(t)));return Wt(t)?uo(Gt(i),0,e).join(""):i.slice(0,e)}function $o(e){return function(t,n,o){return o&&"number"!=typeof o&&cr(t,n,o)&&(n=o=void 0),t=is(t),void 0===n?(n=t,t=0):n=is(n),function(e,t,n,o){for(var r=-1,a=sn(Zt((t-e)/(n||1)),0),s=i(a);a--;)s[o?a:++r]=e,e+=n;return s}(t,n,o=void 0===o?t<n?1:-1:is(o),e)}}function Ro(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=as(t),n=as(n)),e(t,n)}}function Ao(e,t,n,i,o,r,a,s,l,c){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,o,u?r:void 0,u?a:void 0,u?void 0:r,u?void 0:a,s,l,c],f=n.apply(void 0,d);return dr(e)&&_r(f,d),f.placeholder=i,kr(f,e,t)}function Lo(e){var t=pe[e];return function(e,n){if(e=as(e),(n=null==n?0:ln(os(n),292))&&on(e)){var i=(ls(e)+"e").split("e");return+((i=(ls(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var No=gn&&1/Kt(new gn([,-0]))[1]==1/0?function(e){return new gn(e)}:Qs;function Wo(e){return function(t){var n=or(t);return n==h?Vt(t):n==y?Ut(t):function(e,t){return pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Vo(e,t,n,o,s,l,c,u){var d=2&t;if(!d&&"function"!=typeof e)throw new be(r);var f=o?o.length:0;if(f||(t&=-97,o=s=void 0),c=void 0===c?c:sn(os(c),0),u=void 0===u?u:os(u),f-=s?s.length:0,64&t){var p=o,m=s;o=s=void 0}var h=d?void 0:Xo(e),g=[e,t,n,o,s,p,m,l,c,u];if(h&&function(e,t){var n=e[1],i=t[1],o=n|i,r=o<131,s=128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!r&&!s)return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?bo(c,l,t[4]):l,e[4]=c?Bt(e[3],a):t[4]}(l=t[5])&&(c=e[5],e[5]=c?vo(c,l,t[6]):l,e[6]=c?Bt(e[5],a):t[6]);(l=t[7])&&(e[7]=l);128&i&&(e[8]=null==e[8]?t[8]:ln(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(g,h),e=g[0],t=g[1],n=g[2],o=g[3],s=g[4],!(u=g[9]=void 0===g[9]?d?0:e.length:sn(g[9]-f,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var o=Do(e);return function r(){for(var a=arguments.length,s=i(a),l=a,c=Yo(r);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:Bt(s,c);if((a-=u.length)<n)return Ao(e,t,jo,r.placeholder,void 0,s,u,void 0,void 0,n-a);var d=this&&this!==Ge&&this instanceof r?o:e;return rt(d,this,s)}}(e,t,u):32!=t&&33!=t||s.length?jo.apply(void 0,g):function(e,t,n,o){var r=1&t,a=Do(e);return function t(){for(var s=-1,l=arguments.length,c=-1,u=o.length,d=i(u+l),f=this&&this!==Ge&&this instanceof t?a:e;++c<u;)d[c]=o[c];for(;l--;)d[c++]=arguments[++s];return rt(f,r?n:this,d)}}(e,t,n,o);else var b=function(e,t,n){var i=1&t,o=Do(e);return function t(){var r=this&&this!==Ge&&this instanceof t?o:e;return r.apply(i?n:this,arguments)}}(e,t,n);return kr((h?Bi:_r)(b,g),e,t)}function zo(e,t,n,i){return void 0===e||ja(e,_e[n])&&!ke.call(i,n)?t:e}function Bo(e,t,n,i,o,r){return Ka(e)&&Ka(t)&&(r.set(t,e),Mi(e,t,void 0,Bo,r),r.delete(t)),e}function Ko(e){return qa(e)?void 0:e}function Uo(e,t,n,i,o,r){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=r.get(e),u=r.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=2&n?new An:void 0;for(r.set(e,t),r.set(t,e);++d<s;){var m=e[d],h=t[d];if(i)var g=a?i(h,m,d,t,e,r):i(m,h,d,e,t,r);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!bt(t,(function(e,t){if(!Tt(p,t)&&(m===e||o(m,e,n,i,r)))return p.push(t)}))){f=!1;break}}else if(m!==h&&!o(m,h,n,i,r)){f=!1;break}}return r.delete(e),r.delete(t),f}function Ho(e){return xr(gr(e,void 0,$r),e+"")}function Go(e){return pi(e,ws,nr)}function qo(e){return pi(e,xs,ir)}var Xo=yn?function(e){return yn.get(e)}:Qs;function Jo(e){for(var t=e.name+"",n=_n[t],i=ke.call(_n,t)?n.length:0;i--;){var o=n[i],r=o.func;if(null==r||r==e)return o.name}return t}function Yo(e){return(ke.call(En,"placeholder")?En:e).placeholder}function Qo(){var e=En.iteratee||qs;return e=e===qs?Oi:e,arguments.length?e(arguments[0],arguments[1]):e}function Zo(e,t){var n,i,o=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function er(e){for(var t=ws(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,mr(o)]}return t}function tr(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ki(n)?n:void 0}var nr=tn?function(e){return null==e?[]:(e=me(e),ut(tn(e),(function(t){return He.call(e,t)})))}:rl,ir=tn?function(e){for(var t=[];e;)mt(t,nr(e)),e=ze(e);return t}:rl,or=mi;function rr(e,t,n){for(var i=-1,o=(t=lo(t,e)).length,r=!1;++i<o;){var a=Dr(t[i]);if(!(r=null!=e&&n(e,a)))break;e=e[a]}return r||++i!=o?r:!!(o=null==e?0:e.length)&&Ba(o)&&lr(a,o)&&(Ia(e)||Ta(e))}function ar(e){return"function"!=typeof e.constructor||pr(e)?{}:jn(ze(e))}function sr(e){return Ia(e)||Ta(e)||!!(Xe&&e&&e[Xe])}function lr(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&le.test(e))&&e>-1&&e%1==0&&e<t}function cr(e,t,n){if(!Ka(n))return!1;var i=typeof t;return!!("number"==i?Ra(n)&&lr(t,n.length):"string"==i&&t in n)&&ja(n[t],e)}function ur(e,t){if(Ia(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Qa(e))||(K.test(e)||!B.test(e)||null!=t&&e in me(t))}function dr(e){var t=Jo(e),n=En[t];if("function"!=typeof n||!(t in Tn.prototype))return!1;if(e===n)return!0;var i=Xo(n);return!!i&&e===i[0]}(pn&&or(new pn(new ArrayBuffer(1)))!=O||mn&&or(new mn)!=h||hn&&"[object Promise]"!=or(hn.resolve())||gn&&or(new gn)!=y||bn&&or(new bn)!=x)&&(or=function(e){var t=mi(e),n=t==b?e.constructor:void 0,i=n?Pr(n):"";if(i)switch(i){case wn:return O;case xn:return h;case kn:return"[object Promise]";case On:return y;case Cn:return x}return t});var fr=we?Va:al;function pr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}function mr(e){return e==e&&!Ka(e)}function hr(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in me(n)))}}function gr(e,t,n){return t=sn(void 0===t?e.length-1:t,0),function(){for(var o=arguments,r=-1,a=sn(o.length-t,0),s=i(a);++r<a;)s[r]=o[t+r];r=-1;for(var l=i(t+1);++r<t;)l[r]=o[r];return l[t]=n(s),rt(e,this,l)}}function br(e,t){return t.length<2?e:fi(e,Hi(t,0,-1))}function vr(e,t){for(var n=e.length,i=ln(t.length,n),o=yo(e);i--;){var r=t[i];e[i]=lr(r,n)?o[r]:void 0}return e}function yr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _r=Or(Bi),wr=Qt||function(e,t){return Ge.setTimeout(e,t)},xr=Or(Ki);function kr(e,t,n){var i=t+"";return xr(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(J,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return st(s,(function(n){var i="_."+n[0];t&n[1]&&!dt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(Y);return t?t[1].split(Q):[]}(i),n)))}function Or(e){var t=0,n=0;return function(){var i=cn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Cr(e,t){var n=-1,i=e.length,o=i-1;for(t=void 0===t?i:t;++n<t;){var r=Ai(n,o),a=e[r];e[r]=e[n],e[n]=a}return e.length=t,e}var Sr=function(e){var t=Oa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(U,(function(e,n,i,o){t.push(i?o.replace(te,"$1"):n||e)})),t}));function Dr(e){if("string"==typeof e||Qa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Pr(e){if(null!=e){try{return xe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Er(e){if(e instanceof Tn)return e.clone();var t=new Fn(e.__wrapped__,e.__chain__);return t.__actions__=yo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var jr=Ni((function(e,t){return Aa(e)?ei(e,ai(t,1,Aa,!0)):[]})),Mr=Ni((function(e,t){var n=Wr(t);return Aa(n)&&(n=void 0),Aa(e)?ei(e,ai(t,1,Aa,!0),Qo(n,2)):[]})),Fr=Ni((function(e,t){var n=Wr(t);return Aa(n)&&(n=void 0),Aa(e)?ei(e,ai(t,1,Aa,!0),void 0,n):[]}));function Tr(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=null==n?0:os(n);return o<0&&(o=sn(i+o,0)),_t(e,Qo(t,3),o)}function Ir(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return void 0!==n&&(o=os(n),o=n<0?sn(i+o,0):ln(o,i-1)),_t(e,Qo(t,3),o,!0)}function $r(e){return(null==e?0:e.length)?ai(e,1):[]}function Rr(e){return e&&e.length?e[0]:void 0}var Ar=Ni((function(e){var t=pt(e,ao);return t.length&&t[0]===e[0]?vi(t):[]})),Lr=Ni((function(e){var t=Wr(e),n=pt(e,ao);return t===Wr(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?vi(n,Qo(t,2)):[]})),Nr=Ni((function(e){var t=Wr(e),n=pt(e,ao);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?vi(n,void 0,t):[]}));function Wr(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Vr=Ni(zr);function zr(e,t){return e&&e.length&&t&&t.length?$i(e,t):e}var Br=Ho((function(e,t){var n=null==e?0:e.length,i=Xn(e,t);return Ri(e,pt(t,(function(e){return lr(e,n)?+e:e})).sort(go)),i}));function Kr(e){return null==e?e:fn.call(e)}var Ur=Ni((function(e){return Zi(ai(e,1,Aa,!0))})),Hr=Ni((function(e){var t=Wr(e);return Aa(t)&&(t=void 0),Zi(ai(e,1,Aa,!0),Qo(t,2))})),Gr=Ni((function(e){var t=Wr(e);return t="function"==typeof t?t:void 0,Zi(ai(e,1,Aa,!0),void 0,t)}));function qr(e){if(!e||!e.length)return[];var t=0;return e=ut(e,(function(e){if(Aa(e))return t=sn(e.length,t),!0})),Et(t,(function(t){return pt(e,Ct(t))}))}function Xr(e,t){if(!e||!e.length)return[];var n=qr(e);return null==t?n:pt(n,(function(e){return rt(t,void 0,e)}))}var Jr=Ni((function(e,t){return Aa(e)?ei(e,t):[]})),Yr=Ni((function(e){return oo(ut(e,Aa))})),Qr=Ni((function(e){var t=Wr(e);return Aa(t)&&(t=void 0),oo(ut(e,Aa),Qo(t,2))})),Zr=Ni((function(e){var t=Wr(e);return t="function"==typeof t?t:void 0,oo(ut(e,Aa),void 0,t)})),ea=Ni(qr);var ta=Ni((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Xr(e,n)}));function na(e){var t=En(e);return t.__chain__=!0,t}function ia(e,t){return t(e)}var oa=Ho((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return Xn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Tn&&lr(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:ia,args:[o],thisArg:void 0}),new Fn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)}));var ra=wo((function(e,t,n){ke.call(e,n)?++e[n]:qn(e,n,1)}));var aa=Po(Tr),sa=Po(Ir);function la(e,t){return(Ia(e)?st:ti)(e,Qo(t,3))}function ca(e,t){return(Ia(e)?lt:ni)(e,Qo(t,3))}var ua=wo((function(e,t,n){ke.call(e,n)?e[n].push(t):qn(e,n,[t])}));var da=Ni((function(e,t,n){var o=-1,r="function"==typeof t,a=Ra(e)?i(e.length):[];return ti(e,(function(e){a[++o]=r?rt(t,e,n):yi(e,t,n)})),a})),fa=wo((function(e,t,n){qn(e,n,t)}));function pa(e,t){return(Ia(e)?pt:Pi)(e,Qo(t,3))}var ma=wo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ha=Ni((function(e,t){if(null==e)return[];var n=t.length;return n>1&&cr(e,t[0],t[1])?t=[]:n>2&&cr(t[0],t[1],t[2])&&(t=[t[0]]),Ti(e,ai(t,1),[])})),ga=Yt||function(){return Ge.Date.now()};function ba(e,t,n){return t=n?void 0:t,Vo(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function va(e,t){var n;if("function"!=typeof t)throw new be(r);return e=os(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ya=Ni((function(e,t,n){var i=1;if(n.length){var o=Bt(n,Yo(ya));i|=32}return Vo(e,i,t,n,o)})),_a=Ni((function(e,t,n){var i=3;if(n.length){var o=Bt(n,Yo(_a));i|=32}return Vo(t,i,e,n,o)}));function wa(e,t,n){var i,o,a,s,l,c,u=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new be(r);function m(t){var n=i,r=o;return i=o=void 0,u=t,s=e.apply(r,n)}function h(e){return u=e,l=wr(b,t),d?m(e):s}function g(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-u>=a}function b(){var e=ga();if(g(e))return v(e);l=wr(b,function(e){var n=t-(e-c);return f?ln(n,a-(e-u)):n}(e))}function v(e){return l=void 0,p&&i?m(e):(i=o=void 0,s)}function y(){var e=ga(),n=g(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return h(c);if(f)return fo(l),l=wr(b,t),m(c)}return void 0===l&&(l=wr(b,t)),s}return t=as(t)||0,Ka(n)&&(d=!!n.leading,a=(f="maxWait"in n)?sn(as(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),y.cancel=function(){void 0!==l&&fo(l),u=0,i=c=o=l=void 0},y.flush=function(){return void 0===l?s:v(ga())},y}var xa=Ni((function(e,t){return Zn(e,1,t)})),ka=Ni((function(e,t,n){return Zn(e,as(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new be(r);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var a=e.apply(this,i);return n.cache=r.set(o,a)||r,a};return n.cache=new(Oa.Cache||Rn),n}function Ca(e){if("function"!=typeof e)throw new be(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Rn;var Sa=co((function(e,t){var n=(t=1==t.length&&Ia(t[0])?pt(t[0],Mt(Qo())):pt(ai(t,1),Mt(Qo()))).length;return Ni((function(i){for(var o=-1,r=ln(i.length,n);++o<r;)i[o]=t[o].call(this,i[o]);return rt(e,this,i)}))})),Da=Ni((function(e,t){return Vo(e,32,void 0,t,Bt(t,Yo(Da)))})),Pa=Ni((function(e,t){return Vo(e,64,void 0,t,Bt(t,Yo(Pa)))})),Ea=Ho((function(e,t){return Vo(e,256,void 0,void 0,void 0,t)}));function ja(e,t){return e===t||e!=e&&t!=t}var Ma=Ro(hi),Fa=Ro((function(e,t){return e>=t})),Ta=_i(function(){return arguments}())?_i:function(e){return Ua(e)&&ke.call(e,"callee")&&!He.call(e,"callee")},Ia=i.isArray,$a=Ze?Mt(Ze):function(e){return Ua(e)&&mi(e)==k};function Ra(e){return null!=e&&Ba(e.length)&&!Va(e)}function Aa(e){return Ua(e)&&Ra(e)}var La=nn||al,Na=et?Mt(et):function(e){return Ua(e)&&mi(e)==d};function Wa(e){if(!Ua(e))return!1;var t=mi(e);return t==f||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!qa(e)}function Va(e){if(!Ka(e))return!1;var t=mi(e);return t==p||t==m||"[object AsyncFunction]"==t||"[object Proxy]"==t}function za(e){return"number"==typeof e&&e==os(e)}function Ba(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ka(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ua(e){return null!=e&&"object"==typeof e}var Ha=tt?Mt(tt):function(e){return Ua(e)&&or(e)==h};function Ga(e){return"number"==typeof e||Ua(e)&&mi(e)==g}function qa(e){if(!Ua(e)||mi(e)!=b)return!1;var t=ze(e);if(null===t)return!0;var n=ke.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&xe.call(n)==De}var Xa=nt?Mt(nt):function(e){return Ua(e)&&mi(e)==v};var Ja=it?Mt(it):function(e){return Ua(e)&&or(e)==y};function Ya(e){return"string"==typeof e||!Ia(e)&&Ua(e)&&mi(e)==_}function Qa(e){return"symbol"==typeof e||Ua(e)&&mi(e)==w}var Za=ot?Mt(ot):function(e){return Ua(e)&&Ba(e.length)&&!!We[mi(e)]};var es=Ro(Di),ts=Ro((function(e,t){return e<=t}));function ns(e){if(!e)return[];if(Ra(e))return Ya(e)?Gt(e):yo(e);if(Ye&&e[Ye])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ye]());var t=or(e);return(t==h?Vt:t==y?Kt:js)(e)}function is(e){return e?(e=as(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function os(e){var t=is(e),n=t%1;return t==t?n?t-n:t:0}function rs(e){return e?Jn(os(e),0,4294967295):0}function as(e){if("number"==typeof e)return e;if(Qa(e))return NaN;if(Ka(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ka(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=jt(e);var n=re.test(e);return n||se.test(e)?Ke(e.slice(2),n?2:8):oe.test(e)?NaN:+e}function ss(e){return _o(e,xs(e))}function ls(e){return null==e?"":Qi(e)}var cs=xo((function(e,t){if(pr(t)||Ra(t))_o(t,ws(t),e);else for(var n in t)ke.call(t,n)&&Kn(e,n,t[n])})),us=xo((function(e,t){_o(t,xs(t),e)})),ds=xo((function(e,t,n,i){_o(t,xs(t),e,i)})),fs=xo((function(e,t,n,i){_o(t,ws(t),e,i)})),ps=Ho(Xn);var ms=Ni((function(e,t){e=me(e);var n=-1,i=t.length,o=i>2?t[2]:void 0;for(o&&cr(t[0],t[1],o)&&(i=1);++n<i;)for(var r=t[n],a=xs(r),s=-1,l=a.length;++s<l;){var c=a[s],u=e[c];(void 0===u||ja(u,_e[c])&&!ke.call(e,c))&&(e[c]=r[c])}return e})),hs=Ni((function(e){return e.push(void 0,Bo),rt(Os,void 0,e)}));function gs(e,t,n){var i=null==e?void 0:fi(e,t);return void 0===i?n:i}function bs(e,t){return null!=e&&rr(e,t,bi)}var vs=Mo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),e[t]=n}),Ks(Gs)),ys=Mo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),ke.call(e,t)?e[t].push(n):e[t]=[n]}),Qo),_s=Ni(yi);function ws(e){return Ra(e)?Nn(e):Ci(e)}function xs(e){return Ra(e)?Nn(e,!0):Si(e)}var ks=xo((function(e,t,n){Mi(e,t,n)})),Os=xo((function(e,t,n,i){Mi(e,t,n,i)})),Cs=Ho((function(e,t){var n={};if(null==e)return n;var i=!1;t=pt(t,(function(t){return t=lo(t,e),i||(i=t.length>1),t})),_o(e,qo(e),n),i&&(n=Yn(n,7,Ko));for(var o=t.length;o--;)eo(n,t[o]);return n}));var Ss=Ho((function(e,t){return null==e?{}:function(e,t){return Ii(e,t,(function(t,n){return bs(e,n)}))}(e,t)}));function Ds(e,t){if(null==e)return{};var n=pt(qo(e),(function(e){return[e]}));return t=Qo(t),Ii(e,n,(function(e,n){return t(e,n[0])}))}var Ps=Wo(ws),Es=Wo(xs);function js(e){return null==e?[]:Ft(e,ws(e))}var Ms=So((function(e,t,n){return t=t.toLowerCase(),e+(n?Fs(t):t)}));function Fs(e){return Ws(ls(e).toLowerCase())}function Ts(e){return(e=ls(e))&&e.replace(ce,At).replace(Te,"")}var Is=So((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),$s=So((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Rs=Co("toLowerCase");var As=So((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ls=So((function(e,t,n){return e+(n?" ":"")+Ws(t)}));var Ns=So((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ws=Co("toUpperCase");function Vs(e,t,n){return e=ls(e),void 0===(t=n?void 0:t)?function(e){return Ae.test(e)}(e)?function(e){return e.match($e)||[]}(e):function(e){return e.match(Z)||[]}(e):e.match(t)||[]}var zs=Ni((function(e,t){try{return rt(e,void 0,t)}catch(e){return Wa(e)?e:new X(e)}})),Bs=Ho((function(e,t){return st(t,(function(t){t=Dr(t),qn(e,t,ya(e[t],e))})),e}));function Ks(e){return function(){return e}}var Us=Eo(),Hs=Eo(!0);function Gs(e){return e}function qs(e){return Oi("function"==typeof e?e:Yn(e,1))}var Xs=Ni((function(e,t){return function(n){return yi(n,e,t)}})),Js=Ni((function(e,t){return function(n){return yi(e,n,t)}}));function Ys(e,t,n){var i=ws(t),o=di(t,i);null!=n||Ka(t)&&(o.length||!i.length)||(n=t,t=e,e=this,o=di(t,ws(t)));var r=!(Ka(n)&&"chain"in n&&!n.chain),a=Va(e);return st(o,(function(n){var i=t[n];e[n]=i,a&&(e.prototype[n]=function(){var t=this.__chain__;if(r||t){var n=e(this.__wrapped__),o=n.__actions__=yo(this.__actions__);return o.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,mt([this.value()],arguments))})})),e}function Qs(){}var Zs=To(pt),el=To(ct),tl=To(bt);function nl(e){return ur(e)?Ct(Dr(e)):function(e){return function(t){return fi(t,e)}}(e)}var il=$o(),ol=$o(!0);function rl(){return[]}function al(){return!1}var sl=Fo((function(e,t){return e+t}),0),ll=Lo("ceil"),cl=Fo((function(e,t){return e/t}),1),ul=Lo("floor");var dl,fl=Fo((function(e,t){return e*t}),1),pl=Lo("round"),ml=Fo((function(e,t){return e-t}),0);return En.after=function(e,t){if("function"!=typeof t)throw new be(r);return e=os(e),function(){if(--e<1)return t.apply(this,arguments)}},En.ary=ba,En.assign=cs,En.assignIn=us,En.assignInWith=ds,En.assignWith=fs,En.at=ps,En.before=va,En.bind=ya,En.bindAll=Bs,En.bindKey=_a,En.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ia(e)?e:[e]},En.chain=na,En.chunk=function(e,t,n){t=(n?cr(e,t,n):void 0===t)?1:sn(os(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var r=0,a=0,s=i(Zt(o/t));r<o;)s[a++]=Hi(e,r,r+=t);return s},En.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,o=[];++t<n;){var r=e[t];r&&(o[i++]=r)}return o},En.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return mt(Ia(n)?yo(n):[n],ai(t,1))},En.cond=function(e){var t=null==e?0:e.length,n=Qo();return e=t?pt(e,(function(e){if("function"!=typeof e[1])throw new be(r);return[n(e[0]),e[1]]})):[],Ni((function(n){for(var i=-1;++i<t;){var o=e[i];if(rt(o[0],this,n))return rt(o[1],this,n)}}))},En.conforms=function(e){return function(e){var t=ws(e);return function(n){return Qn(n,e,t)}}(Yn(e,1))},En.constant=Ks,En.countBy=ra,En.create=function(e,t){var n=jn(e);return null==t?n:Gn(n,t)},En.curry=function e(t,n,i){var o=Vo(t,8,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return o.placeholder=e.placeholder,o},En.curryRight=function e(t,n,i){var o=Vo(t,16,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return o.placeholder=e.placeholder,o},En.debounce=wa,En.defaults=ms,En.defaultsDeep=hs,En.defer=xa,En.delay=ka,En.difference=jr,En.differenceBy=Mr,En.differenceWith=Fr,En.drop=function(e,t,n){var i=null==e?0:e.length;return i?Hi(e,(t=n||void 0===t?1:os(t))<0?0:t,i):[]},En.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?Hi(e,0,(t=i-(t=n||void 0===t?1:os(t)))<0?0:t):[]},En.dropRightWhile=function(e,t){return e&&e.length?no(e,Qo(t,3),!0,!0):[]},En.dropWhile=function(e,t){return e&&e.length?no(e,Qo(t,3),!0):[]},En.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&cr(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=os(n))<0&&(n=-n>o?0:o+n),(i=void 0===i||i>o?o:os(i))<0&&(i+=o),i=n>i?0:rs(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},En.filter=function(e,t){return(Ia(e)?ut:ri)(e,Qo(t,3))},En.flatMap=function(e,t){return ai(pa(e,t),1)},En.flatMapDeep=function(e,t){return ai(pa(e,t),1/0)},En.flatMapDepth=function(e,t,n){return n=void 0===n?1:os(n),ai(pa(e,t),n)},En.flatten=$r,En.flattenDeep=function(e){return(null==e?0:e.length)?ai(e,1/0):[]},En.flattenDepth=function(e,t){return(null==e?0:e.length)?ai(e,t=void 0===t?1:os(t)):[]},En.flip=function(e){return Vo(e,512)},En.flow=Us,En.flowRight=Hs,En.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var o=e[t];i[o[0]]=o[1]}return i},En.functions=function(e){return null==e?[]:di(e,ws(e))},En.functionsIn=function(e){return null==e?[]:di(e,xs(e))},En.groupBy=ua,En.initial=function(e){return(null==e?0:e.length)?Hi(e,0,-1):[]},En.intersection=Ar,En.intersectionBy=Lr,En.intersectionWith=Nr,En.invert=vs,En.invertBy=ys,En.invokeMap=da,En.iteratee=qs,En.keyBy=fa,En.keys=ws,En.keysIn=xs,En.map=pa,En.mapKeys=function(e,t){var n={};return t=Qo(t,3),ci(e,(function(e,i,o){qn(n,t(e,i,o),e)})),n},En.mapValues=function(e,t){var n={};return t=Qo(t,3),ci(e,(function(e,i,o){qn(n,i,t(e,i,o))})),n},En.matches=function(e){return Ei(Yn(e,1))},En.matchesProperty=function(e,t){return ji(e,Yn(t,1))},En.memoize=Oa,En.merge=ks,En.mergeWith=Os,En.method=Xs,En.methodOf=Js,En.mixin=Ys,En.negate=Ca,En.nthArg=function(e){return e=os(e),Ni((function(t){return Fi(t,e)}))},En.omit=Cs,En.omitBy=function(e,t){return Ds(e,Ca(Qo(t)))},En.once=function(e){return va(2,e)},En.orderBy=function(e,t,n,i){return null==e?[]:(Ia(t)||(t=null==t?[]:[t]),Ia(n=i?void 0:n)||(n=null==n?[]:[n]),Ti(e,t,n))},En.over=Zs,En.overArgs=Sa,En.overEvery=el,En.overSome=tl,En.partial=Da,En.partialRight=Pa,En.partition=ma,En.pick=Ss,En.pickBy=Ds,En.property=nl,En.propertyOf=function(e){return function(t){return null==e?void 0:fi(e,t)}},En.pull=Vr,En.pullAll=zr,En.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,Qo(n,2)):e},En.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,void 0,n):e},En.pullAt=Br,En.range=il,En.rangeRight=ol,En.rearg=Ea,En.reject=function(e,t){return(Ia(e)?ut:ri)(e,Ca(Qo(t,3)))},En.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,o=[],r=e.length;for(t=Qo(t,3);++i<r;){var a=e[i];t(a,i,e)&&(n.push(a),o.push(i))}return Ri(e,o),n},En.rest=function(e,t){if("function"!=typeof e)throw new be(r);return Ni(e,t=void 0===t?t:os(t))},En.reverse=Kr,En.sampleSize=function(e,t,n){return t=(n?cr(e,t,n):void 0===t)?1:os(t),(Ia(e)?Vn:Vi)(e,t)},En.set=function(e,t,n){return null==e?e:zi(e,t,n)},En.setWith=function(e,t,n,i){return i="function"==typeof i?i:void 0,null==e?e:zi(e,t,n,i)},En.shuffle=function(e){return(Ia(e)?zn:Ui)(e)},En.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&cr(e,t,n)?(t=0,n=i):(t=null==t?0:os(t),n=void 0===n?i:os(n)),Hi(e,t,n)):[]},En.sortBy=ha,En.sortedUniq=function(e){return e&&e.length?Ji(e):[]},En.sortedUniqBy=function(e,t){return e&&e.length?Ji(e,Qo(t,2)):[]},En.split=function(e,t,n){return n&&"number"!=typeof n&&cr(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=ls(e))&&("string"==typeof t||null!=t&&!Xa(t))&&!(t=Qi(t))&&Wt(e)?uo(Gt(e),0,n):e.split(t,n):[]},En.spread=function(e,t){if("function"!=typeof e)throw new be(r);return t=null==t?0:sn(os(t),0),Ni((function(n){var i=n[t],o=uo(n,0,t);return i&&mt(o,i),rt(e,this,o)}))},En.tail=function(e){var t=null==e?0:e.length;return t?Hi(e,1,t):[]},En.take=function(e,t,n){return e&&e.length?Hi(e,0,(t=n||void 0===t?1:os(t))<0?0:t):[]},En.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Hi(e,(t=i-(t=n||void 0===t?1:os(t)))<0?0:t,i):[]},En.takeRightWhile=function(e,t){return e&&e.length?no(e,Qo(t,3),!1,!0):[]},En.takeWhile=function(e,t){return e&&e.length?no(e,Qo(t,3)):[]},En.tap=function(e,t){return t(e),e},En.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new be(r);return Ka(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),wa(e,t,{leading:i,maxWait:t,trailing:o})},En.thru=ia,En.toArray=ns,En.toPairs=Ps,En.toPairsIn=Es,En.toPath=function(e){return Ia(e)?pt(e,Dr):Qa(e)?[e]:yo(Sr(ls(e)))},En.toPlainObject=ss,En.transform=function(e,t,n){var i=Ia(e),o=i||La(e)||Za(e);if(t=Qo(t,4),null==n){var r=e&&e.constructor;n=o?i?new r:[]:Ka(e)&&Va(r)?jn(ze(e)):{}}return(o?st:ci)(e,(function(e,i,o){return t(n,e,i,o)})),n},En.unary=function(e){return ba(e,1)},En.union=Ur,En.unionBy=Hr,En.unionWith=Gr,En.uniq=function(e){return e&&e.length?Zi(e):[]},En.uniqBy=function(e,t){return e&&e.length?Zi(e,Qo(t,2)):[]},En.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zi(e,void 0,t):[]},En.unset=function(e,t){return null==e||eo(e,t)},En.unzip=qr,En.unzipWith=Xr,En.update=function(e,t,n){return null==e?e:to(e,t,so(n))},En.updateWith=function(e,t,n,i){return i="function"==typeof i?i:void 0,null==e?e:to(e,t,so(n),i)},En.values=js,En.valuesIn=function(e){return null==e?[]:Ft(e,xs(e))},En.without=Jr,En.words=Vs,En.wrap=function(e,t){return Da(so(t),e)},En.xor=Yr,En.xorBy=Qr,En.xorWith=Zr,En.zip=ea,En.zipObject=function(e,t){return ro(e||[],t||[],Kn)},En.zipObjectDeep=function(e,t){return ro(e||[],t||[],zi)},En.zipWith=ta,En.entries=Ps,En.entriesIn=Es,En.extend=us,En.extendWith=ds,Ys(En,En),En.add=sl,En.attempt=zs,En.camelCase=Ms,En.capitalize=Fs,En.ceil=ll,En.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=as(n))==n?n:0),void 0!==t&&(t=(t=as(t))==t?t:0),Jn(as(e),t,n)},En.clone=function(e){return Yn(e,4)},En.cloneDeep=function(e){return Yn(e,5)},En.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},En.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},En.conformsTo=function(e,t){return null==t||Qn(e,t,ws(t))},En.deburr=Ts,En.defaultTo=function(e,t){return null==e||e!=e?t:e},En.divide=cl,En.endsWith=function(e,t,n){e=ls(e),t=Qi(t);var i=e.length,o=n=void 0===n?i:Jn(os(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},En.eq=ja,En.escape=function(e){return(e=ls(e))&&N.test(e)?e.replace(A,Lt):e},En.escapeRegExp=function(e){return(e=ls(e))&&G.test(e)?e.replace(H,"\\$&"):e},En.every=function(e,t,n){var i=Ia(e)?ct:ii;return n&&cr(e,t,n)&&(t=void 0),i(e,Qo(t,3))},En.find=aa,En.findIndex=Tr,En.findKey=function(e,t){return yt(e,Qo(t,3),ci)},En.findLast=sa,En.findLastIndex=Ir,En.findLastKey=function(e,t){return yt(e,Qo(t,3),ui)},En.floor=ul,En.forEach=la,En.forEachRight=ca,En.forIn=function(e,t){return null==e?e:si(e,Qo(t,3),xs)},En.forInRight=function(e,t){return null==e?e:li(e,Qo(t,3),xs)},En.forOwn=function(e,t){return e&&ci(e,Qo(t,3))},En.forOwnRight=function(e,t){return e&&ui(e,Qo(t,3))},En.get=gs,En.gt=Ma,En.gte=Fa,En.has=function(e,t){return null!=e&&rr(e,t,gi)},En.hasIn=bs,En.head=Rr,En.identity=Gs,En.includes=function(e,t,n,i){e=Ra(e)?e:js(e),n=n&&!i?os(n):0;var o=e.length;return n<0&&(n=sn(o+n,0)),Ya(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&wt(e,t,n)>-1},En.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=null==n?0:os(n);return o<0&&(o=sn(i+o,0)),wt(e,t,o)},En.inRange=function(e,t,n){return t=is(t),void 0===n?(n=t,t=0):n=is(n),function(e,t,n){return e>=ln(t,n)&&e<sn(t,n)}(e=as(e),t,n)},En.invoke=_s,En.isArguments=Ta,En.isArray=Ia,En.isArrayBuffer=$a,En.isArrayLike=Ra,En.isArrayLikeObject=Aa,En.isBoolean=function(e){return!0===e||!1===e||Ua(e)&&mi(e)==u},En.isBuffer=La,En.isDate=Na,En.isElement=function(e){return Ua(e)&&1===e.nodeType&&!qa(e)},En.isEmpty=function(e){if(null==e)return!0;if(Ra(e)&&(Ia(e)||"string"==typeof e||"function"==typeof e.splice||La(e)||Za(e)||Ta(e)))return!e.length;var t=or(e);if(t==h||t==y)return!e.size;if(pr(e))return!Ci(e).length;for(var n in e)if(ke.call(e,n))return!1;return!0},En.isEqual=function(e,t){return wi(e,t)},En.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?wi(e,t,void 0,n):!!i},En.isError=Wa,En.isFinite=function(e){return"number"==typeof e&&on(e)},En.isFunction=Va,En.isInteger=za,En.isLength=Ba,En.isMap=Ha,En.isMatch=function(e,t){return e===t||xi(e,t,er(t))},En.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,xi(e,t,er(t),n)},En.isNaN=function(e){return Ga(e)&&e!=+e},En.isNative=function(e){if(fr(e))throw new X("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return ki(e)},En.isNil=function(e){return null==e},En.isNull=function(e){return null===e},En.isNumber=Ga,En.isObject=Ka,En.isObjectLike=Ua,En.isPlainObject=qa,En.isRegExp=Xa,En.isSafeInteger=function(e){return za(e)&&e>=-9007199254740991&&e<=9007199254740991},En.isSet=Ja,En.isString=Ya,En.isSymbol=Qa,En.isTypedArray=Za,En.isUndefined=function(e){return void 0===e},En.isWeakMap=function(e){return Ua(e)&&or(e)==x},En.isWeakSet=function(e){return Ua(e)&&"[object WeakSet]"==mi(e)},En.join=function(e,t){return null==e?"":rn.call(e,t)},En.kebabCase=Is,En.last=Wr,En.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return void 0!==n&&(o=(o=os(n))<0?sn(i+o,0):ln(o,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,o):_t(e,kt,o,!0)},En.lowerCase=$s,En.lowerFirst=Rs,En.lt=es,En.lte=ts,En.max=function(e){return e&&e.length?oi(e,Gs,hi):void 0},En.maxBy=function(e,t){return e&&e.length?oi(e,Qo(t,2),hi):void 0},En.mean=function(e){return Ot(e,Gs)},En.meanBy=function(e,t){return Ot(e,Qo(t,2))},En.min=function(e){return e&&e.length?oi(e,Gs,Di):void 0},En.minBy=function(e,t){return e&&e.length?oi(e,Qo(t,2),Di):void 0},En.stubArray=rl,En.stubFalse=al,En.stubObject=function(){return{}},En.stubString=function(){return""},En.stubTrue=function(){return!0},En.multiply=fl,En.nth=function(e,t){return e&&e.length?Fi(e,os(t)):void 0},En.noConflict=function(){return Ge._===this&&(Ge._=Pe),this},En.noop=Qs,En.now=ga,En.pad=function(e,t,n){e=ls(e);var i=(t=os(t))?Ht(e):0;if(!t||i>=t)return e;var o=(t-i)/2;return Io(en(o),n)+e+Io(Zt(o),n)},En.padEnd=function(e,t,n){e=ls(e);var i=(t=os(t))?Ht(e):0;return t&&i<t?e+Io(t-i,n):e},En.padStart=function(e,t,n){e=ls(e);var i=(t=os(t))?Ht(e):0;return t&&i<t?Io(t-i,n)+e:e},En.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(ls(e).replace(q,""),t||0)},En.random=function(e,t,n){if(n&&"boolean"!=typeof n&&cr(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=is(e),void 0===t?(t=e,e=0):t=is(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=dn();return ln(e+o*(t-e+Be("1e-"+((o+"").length-1))),t)}return Ai(e,t)},En.reduce=function(e,t,n){var i=Ia(e)?ht:Dt,o=arguments.length<3;return i(e,Qo(t,4),n,o,ti)},En.reduceRight=function(e,t,n){var i=Ia(e)?gt:Dt,o=arguments.length<3;return i(e,Qo(t,4),n,o,ni)},En.repeat=function(e,t,n){return t=(n?cr(e,t,n):void 0===t)?1:os(t),Li(ls(e),t)},En.replace=function(){var e=arguments,t=ls(e[0]);return e.length<3?t:t.replace(e[1],e[2])},En.result=function(e,t,n){var i=-1,o=(t=lo(t,e)).length;for(o||(o=1,e=void 0);++i<o;){var r=null==e?void 0:e[Dr(t[i])];void 0===r&&(i=o,r=n),e=Va(r)?r.call(e):r}return e},En.round=pl,En.runInContext=e,En.sample=function(e){return(Ia(e)?Wn:Wi)(e)},En.size=function(e){if(null==e)return 0;if(Ra(e))return Ya(e)?Ht(e):e.length;var t=or(e);return t==h||t==y?e.size:Ci(e).length},En.snakeCase=As,En.some=function(e,t,n){var i=Ia(e)?bt:Gi;return n&&cr(e,t,n)&&(t=void 0),i(e,Qo(t,3))},En.sortedIndex=function(e,t){return qi(e,t)},En.sortedIndexBy=function(e,t,n){return Xi(e,t,Qo(n,2))},En.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=qi(e,t);if(i<n&&ja(e[i],t))return i}return-1},En.sortedLastIndex=function(e,t){return qi(e,t,!0)},En.sortedLastIndexBy=function(e,t,n){return Xi(e,t,Qo(n,2),!0)},En.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=qi(e,t,!0)-1;if(ja(e[n],t))return n}return-1},En.startCase=Ls,En.startsWith=function(e,t,n){return e=ls(e),n=null==n?0:Jn(os(n),0,e.length),t=Qi(t),e.slice(n,n+t.length)==t},En.subtract=ml,En.sum=function(e){return e&&e.length?Pt(e,Gs):0},En.sumBy=function(e,t){return e&&e.length?Pt(e,Qo(t,2)):0},En.template=function(e,t,n){var i=En.templateSettings;n&&cr(e,t,n)&&(t=void 0),e=ls(e),t=ds({},t,i,zo);var o,r,a=ds({},t.imports,i.imports,zo),s=ws(a),l=Ft(a,s),c=0,u=t.interpolate||ue,d="__p += '",f=he((t.escape||ue).source+"|"+u.source+"|"+(u===z?ne:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),p="//# sourceURL="+(ke.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ne+"]")+"\n";e.replace(f,(function(t,n,i,a,s,l){return i||(i=a),d+=e.slice(c,l).replace(de,Nt),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(r=!0,d+="';\n"+s+";\n__p += '"),i&&(d+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=l+t.length,t})),d+="';\n";var m=ke.call(t,"variable")&&t.variable;if(m){if(ee.test(m))throw new X("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(r?d.replace(T,""):d).replace(I,"$1").replace($,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(r?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var h=zs((function(){return fe(s,p+"return "+d).apply(void 0,l)}));if(h.source=d,Wa(h))throw h;return h},En.times=function(e,t){if((e=os(e))<1||e>9007199254740991)return[];var n=4294967295,i=ln(e,4294967295);e-=4294967295;for(var o=Et(i,t=Qo(t));++n<e;)t(n);return o},En.toFinite=is,En.toInteger=os,En.toLength=rs,En.toLower=function(e){return ls(e).toLowerCase()},En.toNumber=as,En.toSafeInteger=function(e){return e?Jn(os(e),-9007199254740991,9007199254740991):0===e?e:0},En.toString=ls,En.toUpper=function(e){return ls(e).toUpperCase()},En.trim=function(e,t,n){if((e=ls(e))&&(n||void 0===t))return jt(e);if(!e||!(t=Qi(t)))return e;var i=Gt(e),o=Gt(t);return uo(i,It(i,o),$t(i,o)+1).join("")},En.trimEnd=function(e,t,n){if((e=ls(e))&&(n||void 0===t))return e.slice(0,qt(e)+1);if(!e||!(t=Qi(t)))return e;var i=Gt(e);return uo(i,0,$t(i,Gt(t))+1).join("")},En.trimStart=function(e,t,n){if((e=ls(e))&&(n||void 0===t))return e.replace(q,"");if(!e||!(t=Qi(t)))return e;var i=Gt(e);return uo(i,It(i,Gt(t))).join("")},En.truncate=function(e,t){var n=30,i="...";if(Ka(t)){var o="separator"in t?t.separator:o;n="length"in t?os(t.length):n,i="omission"in t?Qi(t.omission):i}var r=(e=ls(e)).length;if(Wt(e)){var a=Gt(e);r=a.length}if(n>=r)return e;var s=n-Ht(i);if(s<1)return i;var l=a?uo(a,0,s).join(""):e.slice(0,s);if(void 0===o)return l+i;if(a&&(s+=l.length-s),Xa(o)){if(e.slice(s).search(o)){var c,u=l;for(o.global||(o=he(o.source,ls(ie.exec(o))+"g")),o.lastIndex=0;c=o.exec(u);)var d=c.index;l=l.slice(0,void 0===d?s:d)}}else if(e.indexOf(Qi(o),s)!=s){var f=l.lastIndexOf(o);f>-1&&(l=l.slice(0,f))}return l+i},En.unescape=function(e){return(e=ls(e))&&L.test(e)?e.replace(R,Xt):e},En.uniqueId=function(e){var t=++Oe;return ls(e)+t},En.upperCase=Ns,En.upperFirst=Ws,En.each=la,En.eachRight=ca,En.first=Rr,Ys(En,(dl={},ci(En,(function(e,t){ke.call(En.prototype,t)||(dl[t]=e)})),dl),{chain:!1}),En.VERSION="4.17.21",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){En[e].placeholder=En})),st(["drop","take"],(function(e,t){Tn.prototype[e]=function(n){n=void 0===n?1:sn(os(n),0);var i=this.__filtered__&&!t?new Tn(this):this.clone();return i.__filtered__?i.__takeCount__=ln(n,i.__takeCount__):i.__views__.push({size:ln(n,4294967295),type:e+(i.__dir__<0?"Right":"")}),i},Tn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Tn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Qo(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Tn.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Tn.prototype[e]=function(){return this.__filtered__?new Tn(this):this[n](1)}})),Tn.prototype.compact=function(){return this.filter(Gs)},Tn.prototype.find=function(e){return this.filter(e).head()},Tn.prototype.findLast=function(e){return this.reverse().find(e)},Tn.prototype.invokeMap=Ni((function(e,t){return"function"==typeof e?new Tn(this):this.map((function(n){return yi(n,e,t)}))})),Tn.prototype.reject=function(e){return this.filter(Ca(Qo(e)))},Tn.prototype.slice=function(e,t){e=os(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Tn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=os(t))<0?n.dropRight(-t):n.take(t-e)),n)},Tn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Tn.prototype.toArray=function(){return this.take(4294967295)},ci(Tn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=En[i?"take"+("last"==t?"Right":""):t],r=i||/^find/.test(t);o&&(En.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,s=t instanceof Tn,l=a[0],c=s||Ia(t),u=function(e){var t=o.apply(En,mt([e],a));return i&&d?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(s=c=!1);var d=this.__chain__,f=!!this.__actions__.length,p=r&&!d,m=s&&!f;if(!r&&c){t=m?t:new Tn(this);var h=e.apply(t,a);return h.__actions__.push({func:ia,args:[u],thisArg:void 0}),new Fn(h,d)}return p&&m?e.apply(this,a):(h=this.thru(u),p?i?h.value()[0]:h.value():h)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ve[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);En.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var o=this.value();return t.apply(Ia(o)?o:[],e)}return this[n]((function(n){return t.apply(Ia(n)?n:[],e)}))}})),ci(Tn.prototype,(function(e,t){var n=En[t];if(n){var i=n.name+"";ke.call(_n,i)||(_n[i]=[]),_n[i].push({name:t,func:n})}})),_n[jo(void 0,2).name]=[{name:"wrapper",func:void 0}],Tn.prototype.clone=function(){var e=new Tn(this.__wrapped__);return e.__actions__=yo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yo(this.__views__),e},Tn.prototype.reverse=function(){if(this.__filtered__){var e=new Tn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Tn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ia(e),i=t<0,o=n?e.length:0,r=function(e,t,n){var i=-1,o=n.length;for(;++i<o;){var r=n[i],a=r.size;switch(r.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=ln(t,e+a);break;case"takeRight":e=sn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=r.start,s=r.end,l=s-a,c=i?s:a-1,u=this.__iteratees__,d=u.length,f=0,p=ln(l,this.__takeCount__);if(!n||!i&&o==l&&p==l)return io(e,this.__actions__);var m=[];e:for(;l--&&f<p;){for(var h=-1,g=e[c+=t];++h<d;){var b=u[h],v=b.iteratee,y=b.type,_=v(g);if(2==y)g=_;else if(!_){if(1==y)continue e;break e}}m[f++]=g}return m},En.prototype.at=oa,En.prototype.chain=function(){return na(this)},En.prototype.commit=function(){return new Fn(this.value(),this.__chain__)},En.prototype.next=function(){void 0===this.__values__&&(this.__values__=ns(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},En.prototype.plant=function(e){for(var t,n=this;n instanceof Mn;){var i=Er(n);i.__index__=0,i.__values__=void 0,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},En.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Tn){var t=e;return this.__actions__.length&&(t=new Tn(this)),(t=t.reverse()).__actions__.push({func:ia,args:[Kr],thisArg:void 0}),new Fn(t,this.__chain__)}return this.thru(Kr)},En.prototype.toJSON=En.prototype.valueOf=En.prototype.value=function(){return io(this.__wrapped__,this.__actions__)},En.prototype.first=En.prototype.head,Ye&&(En.prototype[Ye]=function(){return this}),En}();Ge._=Jt,void 0===(o=function(){return Jt}.call(t,n,t,i))||(i.exports=o)}).call(this)}).call(this,n("c8ba"),n("62e4")(e))},"2f9e":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n("551c");var i=function(e){return new Promise((function(t,n){new Promise((function(e,t){window.FormMaking_OPTIONS.jsPDF?e(window.FormMaking_OPTIONS.jsPDF):window.jspdf?e(window.jspdf.jsPDF):t("jsPDF not found")})).then((function(i){new Promise((function(e,t){window.FormMaking_OPTIONS.html2canvas?e(window.FormMaking_OPTIONS.html2canvas):window.html2canvas?e(window.html2canvas):t("html2canvas not found")})).then((function(o){var r=new i("p","pt","a4");o(e,{dpi:300,scale:4,allowTaint:!0,useCORS:!0}).then((function(e){var n=e.getContext("2d");n.mozImageSmoothingEnabled=!1,n.webkitImageSmoothingEnabled=!1,n.msImageSmoothingEnabled=!1,n.imageSmoothingEnabled=!1;var i=r.internal.pageSize.getWidth(),o=r.internal.pageSize.getHeight(),a=i-20-20,s=o-20-30,l=a,c=e.height*l/e.width,u=c,d=1;if(u<s){var f=e.toDataURL("image/jpeg");r.addImage(f,"JPEG",20,20,l,c)}else for(;u>0;){var p=e.width,m=p*s/a,h=document.createElement("canvas"),g=h.getContext("2d");g.mozImageSmoothingEnabled=!1,g.webkitImageSmoothingEnabled=!1,g.msImageSmoothingEnabled=!1,g.imageSmoothingEnabled=!1,h.width=p,h.height=m;var b=e.height-(d-1)*m;if(b<m){h.height=b,g.drawImage(e,0,(d-1)*m,e.width,b,0,0,p,b);var v=h.toDataURL("image/jpeg");r.addImage(v,"JPEG",20,20,a,s/m*b)}else{g.drawImage(e,0,(d-1)*m,e.width,m,0,0,p,m);var y=h.toDataURL("image/jpeg");r.addImage(y,"JPEG",20,20,a,s)}s,(u-=s)>0&&(r.addPage(),d++)}for(var _=r.internal.getNumberOfPages(),w=1;w<=_;w++)r.setPage(w),r.setTextColor(144,147,153),r.setFontSize(10),r.text("Powered by FormMaking - https://form.making.link",i-247,o-20);t(r.output("blob"))})).catch((function(){n()}))})).catch((function(e){return n(e)}))})).catch((function(e){return n(e)}))}))}},"2fdb":function(e,t,n){"use strict";var i=n("5ca1"),o=n("d2c8");i(i.P+i.F*n("5147")("includes"),"String",{includes:function(e){return!!~o(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},3024:function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},"30b5":function(e,t,n){"use strict";var i=n("c532");function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(i.isURLSearchParams(t))r=t.toString();else{var a=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),r=a.join("&")}return r&&(e+=(-1===e.indexOf("?")?"?":"&")+r),e}},"30f1":function(e,t,n){"use strict";var i=n("b8e3"),o=n("63b6"),r=n("9138"),a=n("35e8"),s=n("481b"),l=n("8f60"),c=n("45f2"),u=n("53e2"),d=n("5168")("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,m,h,g,b){l(n,t,m);var v,y,_,w=function(e){if(!f&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",k="values"==h,O=!1,C=e.prototype,S=C[d]||C["@@iterator"]||h&&C[h],D=S||w(h),P=h?k?w("entries"):D:void 0,E="Array"==t&&C.entries||S;if(E&&(_=u(E.call(new e)))!==Object.prototype&&_.next&&(c(_,x,!0),i||"function"==typeof _[d]||a(_,d,p)),k&&S&&"values"!==S.name&&(O=!0,D=function(){return S.call(this)}),i&&!b||!f&&!O&&C[d]||a(C,d,D),s[t]=D,s[x]=p,h)if(v={values:k?D:w("values"),keys:g?D:w("keys"),entries:P},b)for(y in v)y in C||r(C,y,v[y]);else o(o.P+o.F*(f||O),t,v);return v}},"31c5":function(e,t,n){!function(e){"use strict";var t="CodeMirror-activeline-background";function n(e){for(var n=0;n<e.state.activeLines.length;n++)e.removeLineClass(e.state.activeLines[n],"wrap","CodeMirror-activeline"),e.removeLineClass(e.state.activeLines[n],"background",t),e.removeLineClass(e.state.activeLines[n],"gutter","CodeMirror-activeline-gutter")}function i(e,i){for(var o=[],r=0;r<i.length;r++){var a=i[r],s=e.getOption("styleActiveLine");if("object"==typeof s&&s.nonEmpty?a.anchor.line==a.head.line:a.empty()){var l=e.getLineHandleVisualStart(a.head.line);o[o.length-1]!=l&&o.push(l)}}(function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0})(e.state.activeLines,o)||e.operation((function(){n(e);for(var i=0;i<o.length;i++)e.addLineClass(o[i],"wrap","CodeMirror-activeline"),e.addLineClass(o[i],"background",t),e.addLineClass(o[i],"gutter","CodeMirror-activeline-gutter");e.state.activeLines=o}))}function o(e,t){i(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,r,a){var s=a!=e.Init&&a;r!=s&&(s&&(t.off("beforeSelectionChange",o),n(t),delete t.state.activeLines),r&&(t.state.activeLines=[],i(t,t.listSelections()),t.on("beforeSelectionChange",o)))}))}(n("56b3"))},"31f4":function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},"32e9":function(e,t,n){var i=n("86cc"),o=n("4630");e.exports=n("9e1e")?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"32fc":function(e,t,n){var i=n("e53d").document;e.exports=i&&i.documentElement},"335c":function(e,t,n){var i=n("6b4c");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},3398:function(e,t,n){},"33a4":function(e,t,n){var i=n("84f2"),o=n("2b4c")("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||r[o]===e)}},3459:function(e,t,n){"use strict";n("86a9")},"355d":function(e,t){t.f={}.propertyIsEnumerable},"35e8":function(e,t,n){var i=n("d9f6"),o=n("aebd");e.exports=n("8e60")?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"366e":function(e,t,n){e.exports=n("ccb9").f("toPrimitive")},"36bd":function(e,t,n){"use strict";var i=n("4bf8"),o=n("77f1"),r=n("9def");e.exports=function(e){for(var t=i(this),n=r(t.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:o(l,n);c>s;)t[s++]=e;return t}},"36c3":function(e,t,n){var i=n("335c"),o=n("25eb");e.exports=function(e){return i(o(e))}},"36eb":function(e,t,n){},3702:function(e,t,n){var i=n("481b"),o=n("5168")("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||r[o]===e)}},"37c8":function(e,t,n){t.f=n("2b4c")},3822:function(e,t,n){},3846:function(e,t,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"387f":function(e,t,n){"use strict";e.exports=function(e,t,n,i,o){return e.config=t,n&&(e.code=n),e.request=i,e.response=o,e}},"38c4":function(e,t,n){},"38fd":function(e,t,n){var i=n("69a8"),o=n("4bf8"),r=n("613b")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},3934:function(e,t,n){"use strict";var i=n("c532");e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=i.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},"3a38":function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},"3a52":function(e,t,n){},"3a72":function(e,t,n){var i=n("7726"),o=n("8378"),r=n("2d00"),a=n("37c8"),s=n("86cc").f;e.exports=function(e){var t=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},"3b2b":function(e,t,n){var i=n("7726"),o=n("5dbc"),r=n("86cc").f,a=n("9093").f,s=n("aae3"),l=n("0bfb"),c=i.RegExp,u=c,d=c.prototype,f=/a/g,p=/a/g,m=new c(f)!==f;if(n("9e1e")&&(!m||n("79e5")((function(){return p[n("2b4c")("match")]=!1,c(f)!=f||c(p)==p||"/a/i"!=c(f,"i")})))){c=function(e,t){var n=this instanceof c,i=s(e),r=void 0===t;return!n&&i&&e.constructor===c&&r?e:o(m?new u(i&&!r?e.source:e,t):u((i=e instanceof c)?e.source:e,i&&r?l.call(e):t),n?this:d,c)};for(var h=function(e){e in c||r(c,e,{configurable:!0,get:function(){return u[e]},set:function(t){u[e]=t}})},g=a(u),b=0;g.length>b;)h(g[b++]);d.constructor=c,c.prototype=d,n("2aba")(i,"RegExp",c)}n("7a56")("RegExp")},"3b44":function(e,t,n){"use strict";n("01cd")},"3b8d":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("696e"),o=n.n(i);function r(e,t,n,i,r,a,s){try{var l=e[a](s),c=l.value}catch(e){return void n(e)}l.done?t(c):o.a.resolve(c).then(i,r)}function a(e){return function(){var t=this,n=arguments;return new o.a((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,l,"next",e)}function l(e){r(a,i,o,s,l,"throw",e)}s(void 0)}))}}},"3c11":function(e,t,n){"use strict";var i=n("63b6"),o=n("584a"),r=n("e53d"),a=n("f201"),s=n("cd78");i(i.P+i.R,"Promise",{finally:function(e){var t=a(this,o.Promise||r.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},"3faa":function(e,t,n){"use strict";n("932c")},"40c3":function(e,t,n){var i=n("6b4c"),o=n("5168")("toStringTag"),r="Arguments"==i(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:r?i(t):"Object"==(a=i(t))&&"function"==typeof t.callee?"Arguments":a}},4178:function(e,t,n){var i,o,r,a=n("d864"),s=n("3024"),l=n("32fc"),c=n("1ec9"),u=n("e53d"),d=u.process,f=u.setImmediate,p=u.clearImmediate,m=u.MessageChannel,h=u.Dispatch,g=0,b={},v=function(){var e=+this;if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}},y=function(e){v.call(e.data)};f&&p||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return b[++g]=function(){s("function"==typeof e?e:Function(e),t)},i(g),g},p=function(e){delete b[e]},"process"==n("6b4c")(d)?i=function(e){d.nextTick(a(v,e,1))}:h&&h.now?i=function(e){h.now(a(v,e,1))}:m?(r=(o=new m).port2,o.port1.onmessage=y,i=a(r.postMessage,r,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(e){u.postMessage(e+"","*")},u.addEventListener("message",y,!1)):i="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),e.exports={set:f,clear:p}},"41a0":function(e,t,n){"use strict";var i=n("2aeb"),o=n("4630"),r=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(a,{next:o(1,n)}),r(e,t+" Iterator")}},"41e9":function(e,t,n){"use strict";n("f900")},4260:function(e,t,n){"use strict";n.d(t,"i",(function(){return o})),n.d(t,"f",(function(){return r})),n.d(t,"g",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"l",(function(){return l})),n.d(t,"k",(function(){return c})),n.d(t,"m",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"a",(function(){return m})),n.d(t,"j",(function(){return h})),n.d(t,"c",(function(){return g}));var i=n("7618"),o=(n("456d"),n("20d6"),n("ac6a"),n("cadf"),n("4f7f"),n("5df3"),n("1c4c"),n("28a5"),n("6b54"),n("a481"),n("551c"),function(e){return new Promise((function(t,n){var i=document.createElement("script");i.src=e,i.type="text/javascript",document.body.appendChild(i),i.onload=function(){t()}}))}),r=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e[t].columns.length;n++)e[t].columns[n].key=Math.random().toString(36).slice(-8);return e},a=function(e){for(var t=0;t<e.length;t++)e[t].key=Math.random().toString(36).slice(-8);return e},s=function(e){for(var t=0;t<e.length;t++)e[t].key=Math.random().toString(36).slice(-8);return e},l=function(e){if(!e)return[];return e.split(/}\s+./).filter((function(e){return e})).map((function(e){return"."!==(e=e.trim())[0]&&(e="."+e),"}"!==e[e.length-1]&&(e+="}"),e}))},c=function(e){return Array.from(new Set(e.map((function(e){var t=e.indexOf(" "),n=e.indexOf("{"),i=n;return t>0&&t<n&&(i=t),e=e.substring(1,i)}))))},u=function(e,t){var n=document.styleSheets[0];if(n.href){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",i.appendChild(o),n=o.sheet||o.styleSheet}for(var r=0;n.cssRules.length>r;)n.cssRules[r].selectorText&&0===n.cssRules[r].selectorText.indexOf(t)?n.deleteRule(r):r++;for(var a=0;a<e.length;a++)n.insertRule(t+e[a],0)},d=function(e){var t=document.styleSheets[0];if(t.href)return!1;for(var n=0;t.cssRules.length>n;)t.cssRules[n].selectorText&&0===t.cssRules[n].selectorText.indexOf(e)?t.deleteRule(n):n++},f=function(e,t){var n=e.findIndex((function(e){return!e.key}));n>=0&&e.splice(t,0,e.splice(n,1)[0])},p=function(e,t){var n={};return Object.keys(t).forEach((function(o){"object"===Object(i.a)(t[o])&&e[o]?Array.isArray(e[o])?n[o]=e[o].map((function(e){return p(e,t[o])})):n[o]=p(e[o],t[o]):n[o]=e[o]})),n},m=function(e,t){e.classList.add(t)},h=function(e,t){e.classList.remove(t)},g=function(e){Function("\n window.console && console.error('[FormMaking error]: ".concat(e,"');\n "))()}},4388:function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=n("5531"),r=n("09cf"),a=n("6ca6"),s={name:"generate-report",components:{GenerateFormItem:o.default,GenerateInline:r.default,GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"93bd"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"7a6e"))}},props:["element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model}},computed:{currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(a.c)(this.element.options.hidden)||!Object(a.a)(Object(a.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},methods:{},watch:{model:{deep:!0,handler:function(e){this.dataModels=this.model}}}},l=n("2877"),c=Object(l.a)(s,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"fm-report-table__wrapper"},[e.elementDisplay?t("table",{staticClass:"fm-report-table__table",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!(!e.element.options||!e.element.options.customClass)),style:{"border-top-width":e.element.options.borderWidth+"px","border-top-color":e.element.options.borderColor,"border-left-width":e.element.options.borderWidth+"px","border-left-color":e.element.options.borderColor,width:e.element.options.width||"auto"}},[t("tr",[e._l(e.element.headerRow,(function(e,n){return[t("th",{key:n,style:{width:e.options.width,height:0,padding:0}})]}))],2),e._l(e.element.rows,(function(n,o){return t("tr",{key:o},e._l(n.columns,(function(n,r){return n.options.invisible?e._e():t("td",{key:o+"-"+r,staticClass:"fm-report-table__td",class:Object(i.a)({},n.options.customClass,!!n.options.customClass),style:{"border-right-width":e.element.options.borderWidth+"px","border-right-color":e.element.options.borderColor,"border-bottom-width":e.element.options.borderWidth+"px","border-bottom-color":e.element.options.borderColor,width:n.options.width,height:n.options.height||"40px","min-height":"40px","text-align":n.options.textAlign,"vertical-align":n.options.verticalAlign},attrs:{colspan:n.options.colspan,rowspan:n.options.rowspan,valign:"top"}},[e._l(n.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.dataModels,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)})),0)}))],2):e._e()])}),[],!1,null,null,null);t.default=c.exports},"43fc":function(e,t,n){"use strict";var i=n("63b6"),o=n("656e"),r=n("4439");i(i.S,"Promise",{try:function(e){var t=o.f(this),n=r(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},4439:function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},4498:function(e,t,n){},"454f":function(e,t,n){n("46a7");var i=n("584a").Object;e.exports=function(e,t,n){return i.defineProperty(e,t,n)}},"456d":function(e,t,n){var i=n("4bf8"),o=n("0d58");n("5eda")("keys",(function(){return function(e){return o(i(e))}}))},4588:function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},"45f2":function(e,t,n){var i=n("d9f6").f,o=n("07e3"),r=n("5168")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,r)&&i(e,r,{configurable:!0,value:t})}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"467f":function(e,t,n){"use strict";var i=n("2d83");e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},"46a7":function(e,t,n){var i=n("63b6");i(i.S+i.F*!n("8e60"),"Object",{defineProperty:n("d9f6").f})},"47ee":function(e,t,n){var i=n("c3a1"),o=n("9aa9"),r=n("355d");e.exports=function(e){var t=i(e),n=o.f;if(n)for(var a,s=n(e),l=r.f,c=0;s.length>c;)l.call(e,a=s[c++])&&t.push(a);return t}},"481b":function(e,t){e.exports={}},4917:function(e,t,n){"use strict";var i=n("cb7c"),o=n("9def"),r=n("0390"),a=n("5f1b");n("214f")("match",1,(function(e,t,n,s){return[function(n){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i):new RegExp(n)[t](String(i))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=i(e),c=String(this);if(!l.global)return a(l,c);var u=l.unicode;l.lastIndex=0;for(var d,f=[],p=0;null!==(d=a(l,c));){var m=String(d[0]);f[p]=m,""===m&&(l.lastIndex=r(c,o(l.lastIndex),u)),p++}return 0===p?null:f}]}))},"4a59":function(e,t,n){var i=n("9b43"),o=n("1fa8"),r=n("33a4"),a=n("cb7c"),s=n("9def"),l=n("27ee"),c={},u={};(t=e.exports=function(e,t,n,d,f){var p,m,h,g,b=f?function(){return e}:l(e),v=i(n,d,t?2:1),y=0;if("function"!=typeof b)throw TypeError(e+" is not iterable!");if(r(b)){for(p=s(e.length);p>y;y++)if((g=t?v(a(m=e[y])[0],m[1]):v(e[y]))===c||g===u)return g}else for(h=b.call(e);!(m=h.next()).done;)if((g=o(h,v,m.value,t))===c||g===u)return g}).BREAK=c,t.RETURN=u},"4bf8":function(e,t,n){var i=n("be13");e.exports=function(e){return Object(i(e))}},"4c95":function(e,t,n){"use strict";var i=n("e53d"),o=n("584a"),r=n("d9f6"),a=n("8e60"),s=n("5168")("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:i[e];a&&t&&!t[s]&&r.f(t,s,{configurable:!0,get:function(){return this}})}},"4d34":function(e,t,n){"use strict";n("213d")},"4e19":function(e,t,n){},"4ee1":function(e,t,n){var i=n("5168")("iterator"),o=!1;try{var r=[7][i]();r.return=function(){o=!0},Array.from(r,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},e(r)}catch(e){}return n}},"4f7f":function(e,t,n){"use strict";var i=n("c26b"),o=n("b39a");e.exports=n("e0b8")("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return i.def(o(this,"Set"),e=0===e?0:e,e)}},i)},"50ed":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},5147:function(e,t,n){var i=n("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[i]=!1,!"/./"[e](t)}catch(e){}}return!0}},5168:function(e,t,n){var i=n("dbdb")("wks"),o=n("62a0"),r=n("e53d").Symbol,a="function"==typeof r;(e.exports=function(e){return i[e]||(i[e]=a&&r[e]||(a?r:o)("Symbol."+e))}).store=i},"520a":function(e,t,n){"use strict";var i,o,r=n("0bfb"),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,c=(i=/a/,o=/b*/g,a.call(i,"a"),a.call(o,"a"),0!==i.lastIndex||0!==o.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(l=function(e){var t,n,i,o,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),c&&(t=l.lastIndex),i=a.call(l,e),c&&i&&(l.lastIndex=l.global?i.index+i[0].length:t),u&&i&&i.length>1&&s.call(i[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i}),e.exports=l},"522c":function(e,t,n){},5270:function(e,t,n){"use strict";var i=n("c532"),o=n("c401"),r=n("2e67"),a=n("2444"),s=n("d925"),l=n("e683");function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!s(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return r(t)||(c(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"52a7":function(e,t){t.f={}.propertyIsEnumerable},"53e2":function(e,t,n){var i=n("07e3"),o=n("241e"),r=n("5559")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},5485:function(e,t,n){"use strict";n("6919")},"549b":function(e,t,n){"use strict";var i=n("d864"),o=n("63b6"),r=n("241e"),a=n("b0dc"),s=n("3702"),l=n("b447"),c=n("20fd"),u=n("7cd6");o(o.S+o.F*!n("4ee1")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,o,d,f=r(e),p="function"==typeof this?this:Array,m=arguments.length,h=m>1?arguments[1]:void 0,g=void 0!==h,b=0,v=u(f);if(g&&(h=i(h,m>2?arguments[2]:void 0,2)),null==v||p==Array&&s(v))for(n=new p(t=l(f.length));t>b;b++)c(n,b,g?h(f[b],b):f[b]);else for(d=v.call(f),n=new p;!(o=d.next()).done;b++)c(n,b,g?a(d,h,[o.value,b],!0):o.value);return n.length=b,n}})},"551c":function(e,t,n){"use strict";var i,o,r,a,s=n("2d00"),l=n("7726"),c=n("9b43"),u=n("23c6"),d=n("5ca1"),f=n("d3f4"),p=n("d8e8"),m=n("f605"),h=n("4a59"),g=n("ebd6"),b=n("1991").set,v=n("8079")(),y=n("a5b8"),_=n("9c80"),w=n("a25f"),x=n("bcaa"),k=l.TypeError,O=l.process,C=O&&O.versions,S=C&&C.v8||"",D=l.Promise,P="process"==u(O),E=function(){},j=o=y.f,M=!!function(){try{var e=D.resolve(1),t=(e.constructor={})[n("2b4c")("species")]=function(e){e(E,E)};return(P||"function"==typeof PromiseRejectionEvent)&&e.then(E)instanceof t&&0!==S.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),F=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},T=function(e,t){if(!e._n){e._n=!0;var n=e._c;v((function(){for(var i=e._v,o=1==e._s,r=0,a=function(t){var n,r,a,s=o?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(o||(2==e._h&&R(e),e._h=1),!0===s?n=i:(u&&u.enter(),n=s(i),u&&(u.exit(),a=!0)),n===t.promise?c(k("Promise-chain cycle")):(r=F(n))?r.call(n,l,c):l(n)):c(i)}catch(e){u&&!a&&u.exit(),c(e)}};n.length>r;)a(n[r++]);e._c=[],e._n=!1,t&&!e._h&&I(e)}))}},I=function(e){b.call(l,(function(){var t,n,i,o=e._v,r=$(e);if(r&&(t=_((function(){P?O.emit("unhandledRejection",o,e):(n=l.onunhandledrejection)?n({promise:e,reason:o}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",o)})),e._h=P||$(e)?2:1),e._a=void 0,r&&t.e)throw t.v}))},$=function(e){return 1!==e._h&&0===(e._a||e._c).length},R=function(e){b.call(l,(function(){var t;P?O.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},A=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},L=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=F(e))?v((function(){var i={_w:n,_d:!1};try{t.call(e,c(L,i,1),c(A,i,1))}catch(e){A.call(i,e)}})):(n._v=e,n._s=1,T(n,!1))}catch(e){A.call({_w:n,_d:!1},e)}}};M||(D=function(e){m(this,D,"Promise","_h"),p(e),i.call(this);try{e(c(L,this,1),c(A,this,1))}catch(e){A.call(this,e)}},(i=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n("dcbc")(D.prototype,{then:function(e,t){var n=j(g(this,D));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=P?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),r=function(){var e=new i;this.promise=e,this.resolve=c(L,e,1),this.reject=c(A,e,1)},y.f=j=function(e){return e===D||e===a?new r(e):o(e)}),d(d.G+d.W+d.F*!M,{Promise:D}),n("7f20")(D,"Promise"),n("7a56")("Promise"),a=n("8378").Promise,d(d.S+d.F*!M,"Promise",{reject:function(e){var t=j(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(s||!M),"Promise",{resolve:function(e){return x(s&&this===a?D:this,e)}}),d(d.S+d.F*!(M&&n("5cc5")((function(e){D.all(e).catch(E)}))),"Promise",{all:function(e){var t=this,n=j(t),i=n.resolve,o=n.reject,r=_((function(){var n=[],r=0,a=1;h(e,!1,(function(e){var s=r++,l=!1;n.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--a||i(n))}),o)})),--a||i(n)}));return r.e&&o(r.v),n.promise},race:function(e){var t=this,n=j(t),i=n.reject,o=_((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,i)}))}));return o.e&&i(o.v),n.promise}})},5531:function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=(n("8e6e"),n("7514"),n("7618")),r=(n("551c"),n("28a5"),n("ac6a"),n("cadf"),n("456d"),n("6762"),n("2fdb"),n("75fc"));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=n("c7f0"),c=n("fca1"),u=n("d511"),d=n("095c"),f=n("2ef0"),p=n.n(f),m=n("4260"),h=n("9058");function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={name:"fm-sub-form",components:{GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))},GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"5531"))},GenerateInline:function(){return Promise.resolve().then(n.bind(null,"09cf"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"4388"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"93bd"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"7a6e"))}},props:["showControl","list","value","models","remote","blanks","disableddata","rules","name","remoteOption","preview","platform","dataSourceValue","eventFunction","widget","printRead","paging","pageSize","containerKey","isAdd","isDelete","isDialog","dialogName","group","fieldNode"],data:function(){return{subformData:this.value||[],displayFields:{},changeItem:{},pagingData:[],pagingLength:0,currentPage:1,itemModel:{},subHideFields:[],subDisabledFields:[],itemDisabled:{}}},created:function(){var e=this;this._generateModel(this.list),this.loadPagingData(),this.subHideFields=this.subformData.map((function(t){return Object.fromEntries(Object.keys(e.displayFields).map((function(t){return[t,!e.displayFields[t]]})))})),this.subDisabledFields=this.subformData.map((function(t){return Object.fromEntries(Object.keys(e.itemDisabled).map((function(t){return[t,!e.itemDisabled[t]]})))}))},provide:function(){return{setSubformData:this.setSubformData}},inject:["onFormDisabled","onFormHide","onFormDisplay"],methods:{handleMouseover:function(e){Object(m.a)(this.$refs["formSubformItem_".concat(e)][0],"is-hover")},handleMouseout:function(e){Object(m.j)(this.$refs["formSubformItem_".concat(e)][0],"is-hover")},setSubformData:function(e,t,n){var i=p.a.cloneDeep(this.subformData);i[t][n]=e,this.subformData=i},setData:function(e,t){var n=this;return new Promise("number"!=typeof e?function(i){t=e,n.subformData.forEach((function(e,i){Object.keys(t).forEach((function(e){n.setSubformData(t[e],i,e)}))})),i()}:function(i){n.$nextTick((function(){Object.keys(t).forEach((function(i){n.setSubformData(t[i],e,i)})),i()}))})},handleAddRow:function(){var e=this;if(this.subformData=[].concat(Object(r.a)(this.subformData),[b({},this.itemModel)]),this.subHideFields.push(Object.fromEntries(Object.keys(this.displayFields).map((function(t){return[t,!e.displayFields[t]]})))),this.subDisabledFields.push(Object.fromEntries(Object.keys(this.itemDisabled).map((function(t){return[t,!e.itemDisabled[t]]})))),this.widget&&this.widget.events&&this.widget.events.onRowAdd){var t=this.widget.events.onRowAdd;this.eventFunction[t]({rowIndex:this.subformData.length-1,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}this.paging&&this.$nextTick((function(){e.subformData.length>e.currentPage*e.pageSize&&(e.currentPage=parseInt((e.subformData.length-1)/e.pageSize)+1),e.loadPagingData()}))},handleRemove:function(e){var t=this,n=b({},this.subformData[e]),i=Object(r.a)(this.subformData);if(i.splice(e,1),this.subformData=i,this.subHideFields.splice(e,1),this.subDisabledFields.splice(e,1),this.widget&&this.widget.events&&this.widget.events.onRowRemove){var o=this.widget.events.onRowRemove;this.eventFunction[o]({removeIndex:e,removeData:n,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}this.pagingData=[],this.pagingLength=0,this.paging&&this.$nextTick((function(){t.subformData.length%t.pageSize==0&&t.currentPage>parseInt(t.subformData.length/t.pageSize)&&(t.currentPage=parseInt(t.subformData.length/t.pageSize)),t.loadPagingData()}))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),Object.keys(this.displayFields).forEach((function(n){e.indexOf(n)>=0&&(t.displayFields[n]=!0)})),this.displayFields=b({},this.displayFields),this.subformData.forEach((function(n,i){e.forEach((function(e){t.$set(t.subHideFields[i],e,!1)}))}))},disabled:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){n.onFormDisplay("".concat(n.fieldNode,".").concat(e))}))},hideChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormHide("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},displayChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormDisplay("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},disabledChild:function(e,t,n){var i=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){i.$set(i.subDisabledFields[e],t,n),i.onFormDisabled("".concat(i.fieldNode,".").concat(e,".").concat(t),n)}))},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.list,e,t)},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(h.a)(n.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(h.a)(n.list,e.split("."),t,"remove")}))},handlePageChange:function(e){var t=this;if(this.currentPage=e,this.pagingData=[],this.pagingLength=0,this.$nextTick((function(){t.loadPagingData()})),this.widget&&this.widget.events&&this.widget.events.onPageChange){var n=this.widget.events.onPageChange;this.eventFunction[n]({currentPage:e,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}},loadPagingData:function(){var e=(this.currentPage-1)*this.pageSize,t=e+this.pageSize;this.pagingData=this.subformData.slice(e,t),this.pagingLength=this.pagingData.length},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.displayFields[e[n].model]=!e[n].options.hidden,e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.displayFields[e[n].model]=!e[n].options.hidden):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.displayFields[e[n].model]=!e[n].options.hidden):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.displayFields[e[n].model]=!e[n].options.hidden):("blank"==e[n].type?this.itemModel[e[n].model]="String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]:this.itemModel[e[n].model]=p.a.cloneDeep(e[n].options.defaultValue),this.displayFields[e[n].model]=!e[n].options.hidden,this.itemDisabled[e[n].model]=!e[n].options.disabled)},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(this.$set(e[o].options,"disabled",n),this.$set(this.itemDisabled,e[o].model,!n))},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):("inline"===e[o].type||"card"===e[o].type)&&i._setOptions(e[o].list,t,n),t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)}},watch:{value:function(e){this.subformData=e;for(var t=[],n=[],i=0;i<this.value.length;i++){for(var o=Object.keys(this.displayFields),r={},a=0;a<o.length;a++){var s,l;r[o[a]]=(null===(s=this.subHideFields)||void 0===s||null===(l=s[i])||void 0===l?void 0:l[o[a]])||!this.displayFields[o[a]]}t.push(r);for(var c=Object.keys(this.itemDisabled),u={},d=0;d<c.length;d++){var f,p;u[c[d]]=(null===(f=this.subDisabledFields)||void 0===f||null===(p=f[i])||void 0===p?void 0:p[c[d]])||!this.itemDisabled[c[d]]}n.push(u)}this.subHideFields=t,this.subDisabledFields=n},subformData:{deep:!0,handler:function(e){this.loadPagingData(),this.$emit("input",e)}}}},y=(n("64dc"),n("2877")),_=Object(y.a)(v,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-subform"},[e._l(e.paging?e.pagingLength:e.subformData,(function(n,i){return t("div",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+i,ref:"formSubformItem_".concat((e.paging?e.pageSize*(e.currentPage-1):0)+i),refInFor:!0,staticClass:"form-subform-item",on:{mouseover:function(t){t.stopPropagation(),e.handleMouseover((e.paging?e.pageSize*(e.currentPage-1):0)+i)},mouseout:function(t){e.handleMouseout((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[e.showControl?t("div",{staticClass:"form-subform-index"},[t("el-tag",{attrs:{round:"",size:"small"}},[e._v("#"+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))])],1):e._e(),e.showControl?t("div",{staticClass:"form-subform-remove"},[t("el-popconfirm",{attrs:{teleported:!1,title:e.$t("fm.description.deleteConfirm")},on:{confirm:function(t){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[!e.printRead&&e.isDelete?t("el-button",{attrs:{slot:"reference",disabled:e.disableddata,type:"danger",icon:"el-icon-delete",circle:""},slot:"reference"}):e._e()],1),e.printRead||!e.isDelete?t("el-tag",{attrs:{round:"",size:"small"}},[e._v("#"+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))]):e._e()],1):e._e(),t("div",{staticClass:"form-subform-content"},[e._l(e.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)])})),t("el-row",{staticClass:"form-subform-action"},[t("el-col",{attrs:{span:e.preview&&"mobile"!=e.platform||!e.preview?12:24,xs:24}},[!e.disableddata&&e.isAdd?t("el-button",{attrs:{type:"text"},on:{click:e.handleAddRow}},[t("i",{staticClass:"fm-iconfont icon-plus",staticStyle:{"font-size":"12px",margin:"5px"}}),e._v(e._s(e.$t("fm.actions.add"))+"\n ")]):e._e()],1),t("el-col",{attrs:{span:(!e.preview||"mobile"==e.platform)&&e.preview||e.disableddata?24:12,xs:24}},[e.paging&&e.subformData.length?t("el-pagination",{staticStyle:{float:"right"},attrs:{layout:"total, prev, pager, next","page-size":e.pageSize,"current-page":e.currentPage,total:e.subformData.length,"pager-count":5},on:{"current-change":e.handlePageChange}}):e._e()],1)],1)],2)}),[],!1,null,null,null).exports,w=(n("20d6"),n("5df3"),{name:"fm-group",components:{GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))},GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"5531"))},GenerateInline:function(){return Promise.resolve().then(n.bind(null,"09cf"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"4388"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"93bd"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"7a6e"))}},props:["value","models","rules","element","remote","blanks","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","group","fieldNode"],data:function(){return{displayFields:{},groupModel:this.value||{},groupDisabled:{}}},inject:["generateComponentInstance","deleteComponentInstance","getFormComponent","onFormHide","onFormDisplay"],created:function(){this._generateModel(this.element.list)},mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode,this.$refs["generate-group-".concat(this.element.model)].$parent)},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode)},provide:function(){return{setGroupData:this.setGroupData}},methods:{setGroupData:function(e,t){this.$set(this.groupModel,t,e)},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.$set(this.displayFields,e[n].model,!e[n].options.hidden),e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):("blank"==e[n].type?this.$set(this.groupModel,e[n].model,"String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]):this.$set(this.groupModel,e[n].model,this.value[e[n].model]||p.a.cloneDeep(e[n].options.defaultValue)),this.$set(this.displayFields,e[n].model,!e[n].options.hidden),this.$set(this.groupDisabled,e[n].model,!e[n].options.disabled))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},disabled:function(e,t){"string"==typeof e&&(e=[e]),this._setDisabled(this.element.list,e,t)},validate:function(){var e=this;return new Promise((function(t,n){var i=e._getAllRuleFields();Promise.all(i.map((function(t){return new Promise((function(n){e.getFormComponent().validateField(t,(function(e){n(e)}))}))}))).then((function(e){e.findIndex((function(e){return e}))>=0?n():t()}))}))},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.element.list,e,t)},setData:function(e){var t=this;return new Promise((function(n){t.$nextTick((function(){Object.keys(e).forEach((function(n){t.$set(t.groupModel,n,e[n])})),n()}))}))},getValues:function(){return this.groupModel},getValue:function(e){return this.groupModel[e]},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(h.a)(n.element.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(h.a)(n.element.list,e.split("."),t,"remove")}))},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(e[o].options.disabled=n)},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?i._setOptions(e[o].list,t,n):t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)},_getAllRuleFields:function(){var e=this,t=[];return Object.keys(this.groupModel).forEach((function(n){Array.isArray(e.groupModel[n])?e.groupModel[n].forEach((function(i,o){Object.keys(i).forEach((function(i){t.push("".concat(e.fieldNode,".").concat(n,".").concat(o,".").concat(i))}))})):t.push("".concat(e.fieldNode,".").concat(n))})),t}},watch:{groupModel:{deep:!0,handler:function(e){this.$emit("input",e)}},value:{deep:!0,handler:function(e){this.groupModel=e}}}}),x=Object(y.a)(w,(function(){var e=this,t=e._self._c;return t("div",{ref:"generate-group-".concat(e.element.model),style:{width:e.element.options.width}},[e._l(e.element.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.groupModel,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)}),[],!1,null,null,null).exports,k=n("8bbf"),O=n.n(k),C=n("0f01"),S=n("6ca6");function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E={name:"generate-element-item",components:{FmUpload:l.a,FmFormTable:c.a,FmFileUpload:u.a,FmEditor:d.a,FmSubForm:_,FmGroup:x},props:["widget","value","models","remote","isTable","blanks","disabled","edit","remoteOption","rules","platform","preview","dataSourceValue","eventFunction","rowIndex","tableName","printRead","isMobile","isSubform","subName","isDialog","dialogName","group","fieldNode","containerKey","isGroup"],data:function(){return{dataModel:this.value,dataModels:this.models,key:(new Date).getTime(),modelName:this.widget.model,remoteOptions:[],dynamicEvents:this.handleOnDynamicEvent(),propsTransfer:{key:"key",label:"label"},generateDisabled:void 0,remoteToken:""}},computed:{elementDisabled:function(){var e=this.widget.options.disabled;return Object(S.c)(this.widget.options.disabled)&&(e=Object(S.a)(Object(S.b)(this.widget.options.disabled),this.currentOptions,this.formContext)),"boolean"==typeof this.generateDisabled?!this.edit||this.generateDisabled:!this.edit||Boolean(e)},currentOptions:function(){return this.isTable||this.isSubform?{value:this.dataModel,fieldNode:this.fieldNode,currentRef:this.$refs["fm-"+this.widget.model],rowIndex:this.rowIndex,row:p.a.cloneDeep(this.models),field:this.widget.model,group:this.group}:{value:this.dataModel,fieldNode:this.fieldNode,currentRef:this.$refs["fm-"+this.widget.model],field:this.widget.model,group:this.group}},extendProps:function(){var e=this,t={};return this.widget.options.extendProps&&Object.keys(this.widget.options.extendProps).forEach((function(n){var i=e.widget.options.extendProps[n];Object(S.c)(i)?t[n]=Object(S.a)(Object(S.b)(i),e.currentOptions,e.formContext):t[n]=i})),t},groupNode:function(){return this.group?this.group+"."+this.widget.model:this.widget.model}},created:function(){var e=this;if(this.widget.options.remote||("steps"==this.widget.type?this.loadOptions(this.widget.options.steps):"transfer"==this.widget.type?this.loadOptions(this.widget.options.data):this.loadOptions(this.widget.options.options)),!this.widget.options.remote||Object.keys(this.widget.options).indexOf("remoteType")>=0&&"func"!=this.widget.options.remoteType||!this.remote[this.widget.options.remoteFunc]||this.remote[this.widget.options.remoteFunc]((function(t){e.loadOptions(t)})),this.widget.options.remote&&"option"==this.widget.options.remoteType&&this.remoteOption[this.widget.options.remoteOption]&&this.loadOptions(this.remoteOption[this.widget.options.remoteOption]),this.widget.options.remote&&"datasource"==this.widget.options.remoteType&&this.dataSourceValue){var t=this.getDataSourceOptions();t&&t.value&&this.loadOptions(t.value)}if(this.widget.options.remote&&"fx"==this.widget.options.remoteType){var n=Object(S.a)(this.widget.options.remoteFx,{},this.formContext);n&&this.loadOptions(n)}if("imgupload"!==this.widget.type&&"fileupload"!==this.widget.type||!this.widget.options.isQiniu||this.loadUploadConfig(),"component"==this.widget.type){var i=this;O.a.component("component-".concat(this.widget.key,"-").concat(this.key),{template:"".concat(this.widget.options.template),props:["value"],data:function(){return{dataModel:e.value,formState:e.formContext}},watch:{dataModel:function(e){"antd"==this.ui?C.a.$emit("on-field-change",this.$attrs.id,e):this.$emit("input",e)},value:function(e){this.dataModel=e}},methods:{triggerEvent:function(e,t){if(i.eventScriptConfig()){var n=i.eventScriptConfig().find((function(t){return t.name==e}));n&&i.eventFunction[n.key](P(P({},i.currentOptions),{},{$eventArgs:t}))}}}})}},inject:["generateComponentInstance","deleteComponentInstance","eventScriptConfig","dynamicValueData","formContext","sendRequest"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode,this.$refs["fm-"+this.widget.model]),this.handleOnMounted()},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode)},methods:{handleTest:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]},handleOnDynamicEvent:function(){var e={};for(var t in this.widget.events){var n=this.widget.events[t];n&&(e[t]=this.callbackDynamicFunc(n))}return e},callbackDynamicFunc:function(e){var t=this;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];t.eventFunction[e](P(P({},t.currentOptions),{},{$eventArgs:i}))}},refreshOptionData:function(e){var t=this;return new Promise((function(n,i){if(t.widget.options.remote&&"fx"===t.widget.options.remoteType&&t.widget.options.remoteFx){var r=Object(S.a)(t.widget.options.remoteFx,t.currentOptions,t.formContext);null!==r&&t.loadOptions(r),n(r)}if(t.widget.options.remote&&"datasource"===t.widget.options.remoteType&&t.widget.options.remoteDataSource){var a="string"==typeof t.widget.options.remoteArgs?{}:P({},t.widget.options.remoteArgs);for(var s in a)Object(S.c)(a[s])&&(a[s]=Object(S.a)(Object(S.b)(a[s]),t.currentOptions,t.formContext));e&&"object"===Object(o.a)(e)&&(a=P(P({},a),e));var l=t.group?t.group+"."+t.widget.model+"."+t.widget.options.remoteDataSource:t.widget.model+"."+t.widget.options.remoteDataSource,c=t.dataSourceValue.find((function(e){return e.key===l&&p.a.isEqual(e.args,a)}));c?(t.loadOptions(c.value),n(c.value)):t.sendRequest(t.widget.options.remoteDataSource,a).then((function(e){t.loadOptions(e),n(e)})).catch((function(e){i(e)}))}}))},loadOptions:function(e){var t=this;Array.isArray(e)&&(this.remoteOptions=e.map((function(e){return t.widget.options.props.children&&t.widget.options.props.children.length&&Object.keys(e).includes(t.widget.options.props.children)?{value:e[t.widget.options.props.value],label:e[t.widget.options.props.label],children:t.processRemoteProps(e[t.widget.options.props.children],t.widget.options.props)}:"steps"==t.widget.type?{title:e[t.widget.options.props.title]+"",description:e[t.widget.options.props.description]}:"transfer"==t.widget.type?{key:e[t.widget.options.props.key],label:e[t.widget.options.props.label]}:{value:e[t.widget.options.props.value],label:e[t.widget.options.props.label]}})))},getOptions:function(){return JSON.parse(JSON.stringify(this.remoteOptions))},processRemoteProps:function(e,t){var n=this;return e&&e.length?e.map((function(e){return n.processRemoteProps(e[t.children],t).length?{value:e[t.value],label:e[t.label],children:n.processRemoteProps(e[t.children],t)}:{value:e[t.value],label:e[t.label]}})):[]},onCascaderChange:function(e){var t=this;e&&this.$nextTick((function(){t.$parent&&t.$parent.clearValidate(),t.$parent&&t.$parent.$parent&&t.$parent.$parent.$refs.generateFormItem&&t.$parent.$parent.$refs.generateFormItem.clearValidate()}))},handleTransferChange:function(e){this.dataModel=e},getCascaderText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e.length>=1){var i=null==t?void 0:t.find((function(t){return t.value==e[0]}));return i&&n.push(i.label),e.splice(0,1),this.getCascaderText(e,null==i?void 0:i.children,n)}if(0==e.length)return n},loadUploadConfig:function(){var e=this;if("func"===this.widget.options.tokenType)!this.widget.options.token&&this.remote[this.widget.options.tokenFunc]((function(t){e.remoteToken=t}));else if("fx"===this.widget.options.tokenType){var t=Object(S.a)(this.widget.options.tokenFx,this.currentOptions,this.formContext);t&&(this.remoteToken=t)}else if(this.dataSourceValue){var n=this.getDataSourceOptions("tokenDataSource");n&&n.value&&(this.remoteToken=n.value)}},handleOnMounted:function(){this.execFunction("onMounted",{})},handleOnClick:function(){this.execFunction("onClick",{})},handleOnFocus:function(){this.execFunction("onFocus",{})},handleOnBlur:function(){this.execFunction("onBlur",{})},handleOnUploadSelect:function(e){return this.execFunction("onSelect",{file:e})},handleOnUploadSuccess:function(e){this.execFunction("onUploadSuccess",{file:e})},handleOnUploadError:function(e){this.execFunction("onUploadError",{file:e})},handleOnUploadProgress:function(e){this.execFunction("onUploadProgress",{file:e})},handleOnUploadRemove:function(e){this.execFunction("onRemove",{file:e})},execFunction:function(e,t){if(this.widget.events&&this.widget.events[e]){var n=this.widget.events[e];return this.eventFunction[n](P(P({},this.currentOptions),t))}},getDataSourceOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"remoteDataSource",t=this.group?this.group+"."+this.widget.model+"."+this.widget.options[e]:this.widget.model+"."+this.widget.options[e];return this.dataSourceValue.find((function(e){return e.key===t}))},disabledElement:function(e){this.generateDisabled=e}},watch:{value:function(e){this.dataModel=e},dataModel:function(e,t){JSON.stringify(e)!=JSON.stringify(t)&&this.$emit("input",e)},remoteOption:{deep:!0,handler:function(e){Object.keys(this.remoteOption).indexOf(this.widget.options.remoteOption)>=0&&this.widget.options.remote&&"option"==this.widget.options.remoteType&&this.loadOptions(this.remoteOption[this.widget.options.remoteOption])}},dataSourceValue:{deep:!0,handler:function(e){if(this.dataSourceValue){var t=this.getDataSourceOptions();t&&t.value&&this.loadOptions(t.value)}"imgupload"!==this.widget.type&&"fileupload"!==this.widget.type||!this.widget.options.isQiniu||this.loadUploadConfig()}}}};function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F={components:{GenerateElementItem:Object(y.a)(E,(function(){var e,t,n,i,a,l,c,u=this,d=u._self._c;return d("span",{class:{"print-read-label":u.printRead}},["blank"==u.widget.type?[d("div",{style:{width:u.isTable?"100%":u.widget.options.width}},[u._t(u.widget.model,null,{model:u.dataModels})],2)]:u._e(),"component"==u.widget.type?[d("div",{style:{width:u.isTable?"100%":u.widget.options.width}},[d("component-".concat(u.widget.key,"-").concat(u.key),{key:u.key,ref:"fm-"+u.widget.model,tag:"component",model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})],1)]:u._e(),"custom"==u.widget.type?[d("div",{style:{width:u.isTable?"100%":u.widget.options.width}},[d(u.widget.el,u._g(u._b({ref:"fm-"+u.widget.model,tag:"component",attrs:{width:u.widget.options.width,height:u.widget.options.height,placeholder:u.$t(u.widget.options.placeholder),readonly:u.widget.options.readonly,disabled:u.elementDisabled,editable:u.widget.options.editable,clearable:u.widget.options.clearable,"print-read":u.printRead},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"component",s(s({},u.widget.options.customProps),u.extendProps),!1),u.dynamicEvents))],1)]:u._e(),"input"==u.widget.type?[u.printRead?[d("span",[u._v(u._s(u.dataModel))])]:[!u.widget.options.dataTypeCheck||"number"!=u.widget.options.dataType&&"integer"!=u.widget.options.dataType&&"float"!=u.widget.options.dataType?d("el-input",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{type:u.widget.options.dataTypeCheck?u.widget.options.dataType:"text",disabled:u.elementDisabled,placeholder:u.$t(u.widget.options.placeholder),"show-password":u.widget.options.showPassword,clearable:u.widget.options.clearable,maxlength:u.widget.options.maxlength,"show-word-limit":u.widget.options.showWordLimit},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-input",s(s({},u.widget.options.customProps),u.extendProps),!1)):d("el-input",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{type:"number",disabled:u.elementDisabled,placeholder:u.$t(u.widget.options.placeholder),"show-password":u.widget.options.showPassword,clearable:u.widget.options.clearable},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=u._n(e)},expression:"dataModel"}},"el-input",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"textarea"==u.widget.type?[u.printRead?[d("pre",[u._v(u._s(u.dataModel))])]:[d("el-input",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{type:"textarea",rows:u.widget.options.rows,disabled:u.elementDisabled,placeholder:u.$t(u.widget.options.placeholder),clearable:u.widget.options.clearable,maxlength:u.widget.options.maxlength,"show-word-limit":u.widget.options.showWordLimit,autosize:u.widget.options.autosize},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-input",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"number"==u.widget.type?[u.printRead?[d("span",[u._v(u._s("number"==typeof u.dataModel?u.dataModel.toFixed(u.widget.options.precision):u.dataModel))])]:[d("el-input-number",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{step:u.widget.options.step,disabled:u.elementDisabled,min:u.widget.options.min,max:u.widget.options.max,"controls-position":u.widget.options.controlsPosition,precision:u.widget.options.precision,controls:u.widget.options.controls},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-input-number",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"radio"==u.widget.type?[u.printRead?[u.widget.options.remote?[u._v("\n "+u._s(u.remoteOptions.find((function(e){return e.value==u.dataModel}))&&u.remoteOptions.find((function(e){return e.value==u.dataModel})).label)+"\n ")]:[u._v("\n "+u._s(u.widget.options.showLabel?u.remoteOptions.find((function(e){return e.value==u.dataModel}))&&u.remoteOptions.find((function(e){return e.value==u.dataModel})).label:u.dataModel)+"\n ")]]:[d("el-radio-group",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-radio-group",s(s({},u.widget.options.customProps),u.extendProps),!1),u._l(u.remoteOptions,(function(e,t){return d("el-radio",{key:t,style:{display:u.widget.options.inline?"inline-block":"block"},attrs:{label:e.value}},[u.widget.options.remote?[u._v(u._s(u.$t(e.label)))]:[u._v(u._s(u.$t(u.widget.options.showLabel?e.label:e.value)))]],2)})),1)]]:u._e(),"checkbox"==u.widget.type?[u.printRead?[u.widget.options.remote?[u._v("\n "+u._s(u.dataModel.map((function(e){return u.remoteOptions.find((function(t){return t.value==e}))&&u.remoteOptions.find((function(t){return t.value==e})).label})).join("、"))+"\n ")]:[u._v("\n "+u._s(u.widget.options.showLabel?u.dataModel.map((function(e){return u.remoteOptions.find((function(t){return t.value==e}))&&u.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):u.dataModel.join("、"))+"\n ")]]:[d("el-checkbox-group",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-checkbox-group",s(s({},u.widget.options.customProps),u.extendProps),!1),u._l(u.remoteOptions,(function(e,t){return d("el-checkbox",{key:t,style:{display:u.widget.options.inline?"inline-block":"block"},attrs:{label:e.value}},[u.widget.options.remote?[u._v(u._s(u.$t(e.label)))]:[u._v(u._s(u.$t(u.widget.options.showLabel?e.label:e.value)))]],2)})),1)]]:u._e(),"time"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-time-picker",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{"is-range":u.widget.options.isRange,placeholder:u.$t(u.widget.options.placeholder),"start-placeholder":u.widget.options.startPlaceholder,"end-placeholder":u.widget.options.endPlaceholder,readonly:u.widget.options.readonly,disabled:u.elementDisabled,editable:u.widget.options.editable,clearable:u.widget.options.clearable,arrowControl:u.widget.options.arrowControl,"value-format":u.widget.options.format},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-time-picker",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"date"==u.widget.type?[u.printRead?[u._v("\n "+u._s("dates"==u.widget.options.type?null===(e=u.dataModel)||void 0===e?void 0:e.join("、"):"object"==Object(o.a)(u.dataModel)?u.dataModel.join(" ~ "):u.dataModel)+"\n ")]:[d("el-date-picker",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{type:u.widget.options.type,placeholder:u.$t(u.widget.options.placeholder),"start-placeholder":u.widget.options.startPlaceholder,"end-placeholder":u.widget.options.endPlaceholder,readonly:u.widget.options.readonly,disabled:u.elementDisabled,editable:u.widget.options.editable,clearable:u.widget.options.clearable,"value-format":u.widget.options.timestamp?"timestamp":u.widget.options.format,format:u.widget.options.format},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-date-picker",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"rate"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-rate",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width,display:"inline-block"},attrs:{max:u.widget.options.max,disabled:u.elementDisabled,"allow-half":u.widget.options.allowHalf,"show-score":u.widget.options.showScore},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-rate",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"color"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-color-picker",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,"show-alpha":u.widget.options.showAlpha},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-color-picker",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"select"==u.widget.type?[u.printRead?[u.widget.options.remote?[u._v("\n "+u._s("object"==Object(o.a)(u.dataModel)?u.dataModel.map((function(e){return u.remoteOptions.find((function(t){return t.value==e}))&&u.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):u.remoteOptions.find((function(e){return e.value==u.dataModel}))&&u.remoteOptions.find((function(e){return e.value==u.dataModel})).label)+"\n ")]:[u._v("\n "+u._s(u.widget.options.showLabel?"object"==Object(o.a)(u.dataModel)?u.dataModel.map((function(e){return u.remoteOptions.find((function(t){return t.value==e}))&&u.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):u.remoteOptions.find((function(e){return e.value==u.dataModel}))&&u.remoteOptions.find((function(e){return e.value==u.dataModel})).label:"object"==Object(o.a)(u.dataModel)?u.dataModel.join("、"):u.dataModel)+"\n ")]]:[d("el-select",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,multiple:u.widget.options.multiple,clearable:u.widget.options.clearable,placeholder:u.$t(u.widget.options.placeholder),filterable:u.widget.options.filterable},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-select",s(s({},u.widget.options.customProps),u.extendProps),!1),u._l(u.remoteOptions,(function(e){return d("el-option",{key:e.value,attrs:{value:e.value,label:u.$t(u.widget.options.showLabel||u.widget.options.remote?e.label:e.value)}})})),1)]]:u._e(),"switch"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-switch",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-switch",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"slider"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-slider",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{min:u.widget.options.min,max:u.widget.options.max,disabled:u.elementDisabled,step:u.widget.options.step,"show-input":u.widget.options.showInput,range:u.widget.options.range},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-slider",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"imgupload"==u.widget.type?[d("fm-upload",{ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,readonly:u.widget.options.readonly||u.printRead,width:u.widget.options.size.width,height:u.widget.options.size.height,token:u.remoteToken,domain:u.widget.options.domain,multiple:u.widget.options.multiple,limit:u.widget.options.limit,"is-qiniu":u.widget.options.isQiniu,"is-delete":u.widget.options.isDelete,min:u.widget.options.min,"is-edit":u.widget.options.isEdit,action:u.widget.options.action,headers:u.widget.options.headers||[],withCredentials:u.widget.options.withCredentials,"print-read":u.printRead,"on-select":u.handleOnUploadSelect},on:{"on-upload-success":u.handleOnUploadSuccess,"on-upload-error":u.handleOnUploadError,"on-upload-remove":u.handleOnUploadRemove,"on-upload-progress":u.handleOnUploadProgress},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"editor"==u.widget.type?[u.printRead?[d("div",{staticClass:"ql-editor",domProps:{innerHTML:u._s(u.dataModel)}})]:[d("fm-editor",{ref:"fm-"+u.widget.model,attrs:{sty:{width:u.isTable?"100%":u.widget.options.width,cursor:u.elementDisabled?"no-drop":"",backgroundColor:u.elementDisabled?"#F5F7FA":""},toolbar:u.widget.options.customToolbar,disabled:u.elementDisabled,readonly:!0},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]]:u._e(),"cascader"==u.widget.type?[u.printRead?[(u.widget.options.remote,[u._v("\n "+u._s(u.widget.options.multiple?u.dataModel.map((function(e){return u.getCascaderText(Object(r.a)(e),u.remoteOptions).join(" / ")})).join("、"):u.getCascaderText(Object(r.a)(u.dataModel),u.remoteOptions).join(" / "))+"\n ")])]:[d("el-cascader",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,clearable:u.widget.options.clearable,placeholder:u.$t(u.widget.options.placeholder),options:u.remoteOptions,props:s({multiple:u.widget.options.multiple,checkStrictly:u.widget.options.checkStrictly},null!==(t=u.extendProps.props)&&void 0!==t?t:{}),"collapse-tags":"",filterable:u.widget.options.filterable},on:{change:u.onCascaderChange,focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-cascader",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"text"==u.widget.type?[d("span",{ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width||"100%",display:"inline-block"}},[u._v(u._s(u.dataModel))])]:u._e(),"html"==u.widget.type?[d("span",{ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width||"100%",display:"inline-block"},domProps:{innerHTML:u._s(u.dataModel)}})]:u._e(),"table"==u.widget.type?[d("fm-form-table",{ref:"fm-"+u.widget.model,attrs:{columns:u.widget.tableColumns,models:u.dataModels,remote:u.remote,blanks:u.blanks,disableddata:u.elementDisabled||u.printRead,rules:u.rules,name:u.widget.model,"remote-option":u.remoteOption,preview:u.preview,platform:u.platform,"data-source-value":u.dataSourceValue,"event-function":u.eventFunction,widget:u.widget,"print-read":u.printRead,paging:u.widget.options.paging,"page-size":u.widget.options.pageSize,"container-key":u.containerKey,"is-delete":null===(n=u.widget.options.isDelete)||void 0===n||n,"is-add":null===(i=u.widget.options.isAdd)||void 0===i||i,"show-control":null===(a=u.widget.options.showControl)||void 0===a||a,"is-dialog":u.isDialog,"dialog-name":u.dialogName,"is-group":u.isGroup,group:u.group,"field-node":u.fieldNode},scopedSlots:u._u([u._l(u.blanks,(function(e){return{key:e.name,fn:function(t){return[u._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"subform"==u.widget.type?[d("fm-sub-form",{ref:"fm-"+u.widget.model,attrs:{list:u.widget.list,models:u.dataModels,remote:u.remote,blanks:u.blanks,disableddata:u.elementDisabled||u.printRead,rules:u.rules,name:u.widget.model,"remote-option":u.remoteOption,preview:u.preview,platform:u.platform,"data-source-value":u.dataSourceValue,"event-function":u.eventFunction,widget:u.widget,"print-read":u.printRead,paging:u.widget.options.paging,"page-size":u.widget.options.pageSize,"show-control":u.widget.options.showControl,"is-delete":null===(l=u.widget.options.isDelete)||void 0===l||l,"is-add":null===(c=u.widget.options.isAdd)||void 0===c||c,"is-dialog":u.isDialog,"dialog-name":u.dialogName,"is-group":u.isGroup,group:u.group,"field-node":u.fieldNode,"container-key":u.containerKey},scopedSlots:u._u([u._l(u.blanks,(function(e){return{key:e.name,fn:function(t){return[u._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"group"==u.widget.type?[d("fm-group",{ref:"fm-"+u.widget.model,attrs:{rules:u.rules,element:u.widget,remote:u.remote,blanks:u.blanks,edit:!u.elementDisabled,"remote-option":u.remoteOption,platform:u.platform,preview:u.preview,"container-key":u.containerKey,"data-source-value":u.dataSourceValue,"event-function":u.eventFunction,"print-read":u.printRead,"is-group":u.isGroup,group:u.group,"field-node":u.fieldNode},scopedSlots:u._u([u._l(u.blanks,(function(e){return{key:e.name,fn:function(t){return[u._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"fileupload"==u.widget.type?[d("fm-file-upload",{ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,token:u.remoteToken,domain:u.widget.options.domain,multiple:u.widget.options.multiple,limit:u.widget.options.limit,"is-qiniu":u.widget.options.isQiniu,min:u.widget.options.min,action:u.widget.options.action,headers:u.widget.options.headers||[],withCredentials:u.widget.options.withCredentials,"print-read":u.printRead,accept:u.widget.options.accept,"on-select":u.handleOnUploadSelect},on:{"on-upload-success":u.handleOnUploadSuccess,"on-upload-error":u.handleOnUploadError,"on-upload-remove":u.handleOnUploadRemove,"on-upload-progress":u.handleOnUploadProgress},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"button"==u.widget.type?[d("el-button",u._b({ref:"fm-"+u.widget.model,style:{width:u.widget.options.width,"vertical-align":"top"},attrs:{disabled:u.elementDisabled,type:u.widget.options.buttonType,plain:u.widget.options.buttonPlain,round:u.widget.options.buttonRound,circle:u.widget.options.buttonCircle},on:{click:u.handleOnClick}},"el-button",s(s({},u.widget.options.customProps),u.extendProps),!1),[u._v(u._s(u.$t(u.widget.options.buttonName))+"\n ")])]:u._e(),"link"==u.widget.type?[d("el-link",u._b({ref:"fm-"+u.widget.model,attrs:{disabled:u.elementDisabled,type:u.widget.options.linkType,underline:u.widget.options.underline,href:u.widget.options.href,target:u.widget.options.blank?"_blank":"_self"},on:{click:u.handleOnClick}},"el-link",s(s({},u.widget.options.customProps),u.extendProps),!1),[u._v("\n "+u._s(u.$t(u.widget.options.linkName))+"\n ")])]:u._e(),"steps"==u.widget.type?[d("el-steps",u._b({ref:"fm-"+u.widget.model,style:{"line-height":"normal"},attrs:{active:u.dataModel,space:u.widget.options.space,direction:u.widget.options.direction,"process-status":u.widget.options.processStatus,"finish-status":u.widget.options.finishStatus,"align-center":u.widget.options.alignCenter,simple:u.widget.options.simple}},"el-steps",s(s({},u.widget.options.customProps),u.extendProps),!1),u._l(u.remoteOptions,(function(e,t){return d("el-step",{key:t,attrs:{title:u.$t(e.title),description:u.$t(e.description)}})})),1)]:u._e(),"pagination"==u.widget.type?[u.printRead?[u._v("\n Page "+u._s(u.dataModel)+"\n ")]:[d("el-pagination",u._b({ref:"fm-"+u.widget.model,attrs:{"current-page":u.dataModel,"page-size":u.widget.options.pageSize,"pager-count":u.widget.options.pagerCount,disabled:u.widget.options.disabled,background:u.widget.options.background,layout:"total, prev, pager, next",total:u.widget.options.total},on:{"update:currentPage":function(e){u.dataModel=e},"update:current-page":function(e){u.dataModel=e}}},"el-pagination",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"transfer"==u.widget.type?[u.printRead?[u.widget.options.remote?[u._v("\n "+u._s(u.dataModel.map((function(e){var t;return null===(t=u.widget.options.remoteOptions.find((function(t){return t[u.widget.options.props.key]==e})))||void 0===t?void 0:t[u.widget.options.props.label]})).join("、"))+"\n ")]:[u._v("\n "+u._s(u.dataModel.map((function(e){var t;return null===(t=u.remoteOptions.find((function(t){return t[u.propsTransfer.key]==e})))||void 0===t?void 0:t[u.propsTransfer.label]})).join("、"))+"\n ")]]:[d("el-transfer",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{value:u.dataModel,disabled:u.elementDisabled,data:u.remoteOptions,filterable:u.widget.options.filterable,props:u.propsTransfer,titles:u.widget.options.titles},on:{change:u.handleTransferChange}},"el-transfer",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e()],2)}),[],!1,null,null,null).exports},props:["widget","models","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup","isTable","isMobile","tableName"],data:function(){return{dataModel:Object.keys(this.models).includes(this.widget.model)?this.models[this.widget.model]:p.a.cloneDeep(this.widget.options.defaultValue),dataModels:this.models}},computed:{ruleProp:function(){var e=this.widget.model;return this.group&&(e=this.group+"."+e),e},currentOptions:function(){var e,t;return this.isTable||this.isSubform?{value:this.dataModel,fieldNode:this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,currentRef:null===(e=this.$refs.generateElementItem)||void 0===e?void 0:e.$refs["fm-".concat(this.widget.model)],rowIndex:this.rowIndex,row:p.a.cloneDeep(this.models),field:this.widget.model,group:this.group}:{value:this.dataModel,fieldNode:this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,currentRef:null===(t=this.$refs.generateElementItem)||void 0===t?void 0:t.$refs["fm-".concat(this.widget.model)],field:this.widget.model,group:this.group}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,t=this.group?this.group+"."+this.widget.model:this.widget.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.widget.options.hidden?!this.widget.options.hidden:!Object(S.c)(this.widget.options.hidden)||!Object(S.a)(Object(S.b)(this.widget.options.hidden),this.currentOptions,this.formContext)},groupNode:function(){return this.group?this.group+"."+this.widget.model:this.widget.model},elementNode:function(){return this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model}},inject:{setSubformData:{default:function(){}},setDialogData:{default:function(){}},setGroupData:{default:function(){}},setTableData:{default:function(){}},onChange:{default:function(){}},dynamicValueData:{default:[]},formContext:{default:{}},dynamicHideFields:{default:{}},generateFormItemContext:{default:function(){}},deleteFormItemContext:{default:function(){}},sendRequest:{default:function(){}}},created:function(){this.refreshDynamicValue()},mounted:function(){this.generateFormItemContext(this.elementNode,this)},beforeDestroy:function(){this.deleteFormItemContext(this.elementNode)},methods:{getTip:function(e){var t=this;return e.split("\n").map((function(e){return t.$t(e)})).join("<br/>")},refreshDynamicValue:function(e){var t=this;return new Promise((function(n,i){if(t.widget.options.isDynamicValue&&"datasource"==t.widget.options.dynamicValueType&&t.widget.options.dynamicValueDataSource){var r=t.group?t.group+"."+t.widget.model+"."+t.widget.options.dynamicValueDataSource:t.widget.model+"."+t.widget.options.dynamicValueDataSource,a=M({},t.widget.options.dynamicValueArgs);for(var s in a)Object(S.c)(a[s])&&(a[s]=Object(S.a)(Object(S.b)(a[s]),t.currentOptions,t.formContext));e&&"object"===Object(o.a)(e)&&(a=M(M({},a),e));var l=t.dynamicValueData.find((function(e){return e.key===r&&p.a.isEqual(e.args,a)}));if(l)if(t.widget.options.dynamicValueStruct)try{t.dataModel=new Function("data","return data.".concat(t.widget.options.dynamicValueStruct))(l.value),n(t.dataModel)}catch(e){i(e)}else t.dataModel=l.value,n(t.dataModel);else t.sendRequest(t.widget.options.dynamicValueDataSource,a).then((function(e){if(t.widget.options.dynamicValueStruct)try{t.dataModel=new Function("data","return data.".concat(t.widget.options.dynamicValueStruct))(e),n(t.dataModel)}catch(e){i(e)}else t.dataModel=e,n(t.dataModel)}))}if(t.widget.options.isDynamicValue&&"fx"==t.widget.options.dynamicValueType&&t.widget.options.dynamicValueFx){var c=Object(S.a)(t.widget.options.dynamicValueFx,t.currentOptions,t.formContext);null!==c&&t.$nextTick((function(){t.dataModel=c})),n(c)}}))}},watch:{dataModel:{deep:!0,handler:function(e,t){var n=this;if(JSON.stringify(e)==JSON.stringify(t))return!1;this.isTable?this.setTableData(e,this.rowIndex,this.widget.model):this.isSubform?this.setSubformData(e,this.rowIndex,this.widget.model):this.isDialog?this.setDialogData(e,this.widget.model):this.isGroup?this.setGroupData(e,this.widget.model):this.onChange(e,this.widget.model),this.$nextTick((function(){if(n.eventFunction.onFormChange&&n.eventFunction.onFormChange(n.currentOptions),n.widget.events&&n.widget.events.onChange){var e=n.widget.events.onChange;n.eventFunction[e](n.currentOptions)}}))}},models:{deep:!0,handler:function(e){this.dataModels=e,this.dataModel=Object.keys(e).includes(this.widget.model)?e[this.widget.model]:p.a.cloneDeep(this.widget.options.defaultValue)}}}},T=Object(y.a)(F,(function(){var e=this,t=e._self._c;return e.widget.key?t("div",{staticClass:"fm-form-item",attrs:{"data-id":e.widget.model}},["divider"!=e.widget.type&&"alert"!=e.widget.type&&e.elementDisplay?t("el-form-item",{key:e.widget.key,ref:"generateFormItem",class:Object(i.a)(Object(i.a)(Object(i.a)({},e.widget.options&&e.widget.options.customClass,!(!e.widget.options||!e.widget.options.customClass)),"no-label-form-item",e.widget.options.isLabelWidth&&0==e.widget.options.labelWidth),"fm-label-wrap",e.widget.options.labelWrap),attrs:{prop:e.fieldNode?e.fieldNode+"."+e.widget.model:e.widget.model,rules:e.rules[e.ruleProp],label:e.widget.options.hideLabel||e.isTable&&!e.isMobile?"":e.$t(e.widget.name),"label-width":e.widget.options.hideLabel?"0px":e.widget.options.isLabelWidth?e.widget.options.labelWidth+"px":"",required:e.widget.options.required}},[e.widget.options.tip?t("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:e._s(e.getTip(e.widget.options.tip))}}):e._e(),t("generate-element-item",{key:e.widget.key,ref:"generateElementItem",attrs:{blanks:e.blanks,"is-table":e.isTable,"table-name":e.tableName,widget:e.widget,models:e.dataModels,remote:e.remote,edit:e.edit,"remote-option":e.remoteOption,rules:e.rules,platform:e.platform,preview:e.preview,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"container-key":e.containerKey,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode?e.fieldNode+"."+e.widget.model:e.widget.model},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0),model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1):e._e(),"divider"==e.widget.type&&e.elementDisplay?t("el-form-item",{attrs:{"label-width":"0"}},[t("el-divider",e._b({ref:"fm-"+e.widget.model,attrs:{"content-position":e.widget.options.contentPosition}},"el-divider",e.widget.options.customProps,!1),[e._v("\n "+e._s(e.$t(e.widget.name))+"\n ")])],1):e._e(),"alert"==e.widget.type&&e.elementDisplay?t("el-form-item",{attrs:{"label-width":"0"}},[t("el-alert",e._b({ref:"fm-"+e.widget.model,style:{width:e.widget.options.width},attrs:{title:e.$t(e.widget.options.title),type:e.widget.options.type,description:e.$t(e.widget.options.description),closable:e.widget.options.closable,center:e.widget.options.center,"show-icon":e.widget.options.showIcon,effect:e.widget.options.effect}},"el-alert",e.widget.options.customProps,!1))],1):e._e()],1):e._e()}),[],!1,null,null,null);t.default=T.exports},5537:function(e,t,n){var i=n("8378"),o=n("7726"),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n("2d00")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},5559:function(e,t,n){var i=n("dbdb")("keys"),o=n("62a0");e.exports=function(e){return i[e]||(i[e]=o(e))}},"56b3":function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),i=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),r=/Edge\/(\d+)/.exec(e),a=i||o||r,s=a&&(i?document.documentMode||6:+(r||o)[1]),l=!r&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!r&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),b=/Android/.test(e),v=g||b||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),_=/\bCrOS\b/.test(e),w=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,l=!0);var k=y&&(c||f&&(null==x||x<12.11)),O=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,D=function(e,t){var n=e.className,i=C(t).exec(n);if(i){var o=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(o?i[1]+o:"")}};function P(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return P(e).appendChild(t)}function j(e,t,n,i){var o=document.createElement(e);if(n&&(o.className=n),i&&(o.style.cssText=i),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var r=0;r<t.length;++r)o.appendChild(t[r]);return o}function M(e,t,n,i){var o=j(e,t,n,i);return o.setAttribute("role","presentation"),o}function F(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function T(e){var t,n=e.ownerDocument||e;try{t=e.activeElement}catch(e){t=n.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function I(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function $(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]&&!C(n[i]).test(t)&&(t+=" "+n[i]);return t}S=document.createRange?function(e,t,n,i){var o=document.createRange();return o.setEnd(i||e,n),o.setStart(e,t),o}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(e){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i};var R=function(e){e.select()};function A(e){return e.display.wrapper.ownerDocument}function L(e){return N(e.display.wrapper)}function N(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function W(e){return A(e).defaultView}function V(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,n){for(var i in t||(t={}),e)!e.hasOwnProperty(i)||!1===n&&t.hasOwnProperty(i)||(t[i]=e[i]);return t}function B(e,t,n,i,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var r=i||0,a=o||0;;){var s=e.indexOf("\t",r);if(s<0||s>=t)return a+(t-r);a+=s-r,a+=n-a%n,r=s+1}}g?R=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(R=function(e){try{e.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=V(this.onTimeout,this)};function U(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}K.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},K.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var H={toString:function(){return"CodeMirror.Pass"}},G={scroll:!1},q={origin:"*mouse"},X={origin:"+move"};function J(e,t,n){for(var i=0,o=0;;){var r=e.indexOf("\t",i);-1==r&&(r=e.length);var a=r-i;if(r==e.length||o+a>=t)return i+Math.min(a,t-o);if(o+=r-i,i=r+1,(o+=n-o%n)>=t)return i}}var Y=[""];function Q(e){for(;Y.length<=e;)Y.push(Z(Y)+" ");return Y[e]}function Z(e){return e[e.length-1]}function ee(e,t){for(var n=[],i=0;i<e.length;i++)n[i]=t(e[i],i);return n}function te(){}function ne(e,t){var n;return Object.create?n=Object.create(e):(te.prototype=e,n=new te),t&&z(t,n),n}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function oe(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&oe(e))||t.test(e):oe(e)}function ae(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var se=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function le(e){return e.charCodeAt(0)>=768&&se.test(e)}function ce(e,t,n){for(;(n<0?t>0:t<e.length)&&le(e.charAt(t));)t+=n;return t}function ue(e,t,n){for(var i=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,r=i<0?Math.ceil(o):Math.floor(o);if(r==t)return e(r)?t:n;e(r)?n=r:t=r+i}}var de=null;function fe(e,t,n){var i;de=null;for(var o=0;o<e.length;++o){var r=e[o];if(r.from<t&&r.to>t)return o;r.to==t&&(r.from!=r.to&&"before"==n?i=o:de=o),r.from==t&&(r.from!=r.to&&"before"!=n?i=o:de=o)}return null!=i?i:de}var pe=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,i=/[Lb1n]/,o=/[1n]/;function r(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c,u=a.length,d=[],f=0;f<u;++f)d.push((c=a.charCodeAt(f))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var p=0,m=l;p<u;++p){var h=d[p];"m"==h?d[p]=m:m=h}for(var g=0,b=l;g<u;++g){var v=d[g];"1"==v&&"r"==b?d[g]="n":n.test(v)&&(b=v,"r"==v&&(d[g]="R"))}for(var y=1,_=d[0];y<u-1;++y){var w=d[y];"+"==w&&"1"==_&&"1"==d[y+1]?d[y]="1":","!=w||_!=d[y+1]||"1"!=_&&"n"!=_||(d[y]=_),_=w}for(var x=0;x<u;++x){var k=d[x];if(","==k)d[x]="N";else if("%"==k){var O=void 0;for(O=x+1;O<u&&"%"==d[O];++O);for(var C=x&&"!"==d[x-1]||O<u&&"1"==d[O]?"1":"N",S=x;S<O;++S)d[S]=C;x=O-1}}for(var D=0,P=l;D<u;++D){var E=d[D];"L"==P&&"1"==E?d[D]="L":n.test(E)&&(P=E)}for(var j=0;j<u;++j)if(t.test(d[j])){var M=void 0;for(M=j+1;M<u&&t.test(d[M]);++M);for(var F="L"==(j?d[j-1]:l),T=F==("L"==(M<u?d[M]:l))?F?"L":"R":l,I=j;I<M;++I)d[I]=T;j=M-1}for(var $,R=[],A=0;A<u;)if(i.test(d[A])){var L=A;for(++A;A<u&&i.test(d[A]);++A);R.push(new r(0,L,A))}else{var N=A,W=R.length,V="rtl"==s?1:0;for(++A;A<u&&"L"!=d[A];++A);for(var z=N;z<A;)if(o.test(d[z])){N<z&&(R.splice(W,0,new r(1,N,z)),W+=V);var B=z;for(++z;z<A&&o.test(d[z]);++z);R.splice(W,0,new r(2,B,z)),W+=V,N=z}else++z;N<A&&R.splice(W,0,new r(1,N,A))}return"ltr"==s&&(1==R[0].level&&($=a.match(/^\s+/))&&(R[0].from=$[0].length,R.unshift(new r(0,0,$[0].length))),1==Z(R).level&&($=a.match(/\s+$/))&&(Z(R).to-=$[0].length,R.push(new r(0,u-$[0].length,u)))),"rtl"==s?R.reverse():R}}();function me(e,t){var n=e.order;return null==n&&(n=e.order=pe(e.text,t)),n}var he=[],ge=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var i=e._handlers||(e._handlers={});i[t]=(i[t]||he).concat(n)}};function be(e,t){return e._handlers&&e._handlers[t]||he}function ve(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var i=e._handlers,o=i&&i[t];if(o){var r=U(o,n);r>-1&&(i[t]=o.slice(0,r).concat(o.slice(r+1)))}}}function ye(e,t){var n=be(e,t);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,i)}function _e(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,n||t.type,e,t),Se(t)||t.codemirrorIgnore}function we(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)-1==U(n,t[i])&&n.push(t[i])}function xe(e,t){return be(e,t).length>0}function ke(e){e.prototype.on=function(e,t){ge(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function Oe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function De(e){Oe(e),Ce(e)}function Pe(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var je,Me,Fe=function(){if(a&&s<9)return!1;var e=j("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==je){var t=j("span","");E(e,j("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(je=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=je?j("span",""):j("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ie(e){if(null!=Me)return Me;var t=E(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),i=S(t,1,2).getBoundingClientRect();return P(e),!(!n||n.left==n.right)&&(Me=i.right-n.right<3)}var $e,Re=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;t<=i;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var r=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=r.indexOf("\r");-1!=a?(n.push(r.slice(0,a)),t+=a+1):(n.push(r),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ae=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Le="oncopy"in($e=j("div"))||($e.setAttribute("oncopy","return;"),"function"==typeof $e.oncopy),Ne=null,We={},Ve={};function ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),We[e]=t}function Be(e){if("string"==typeof e&&Ve.hasOwnProperty(e))e=Ve[e];else if(e&&"string"==typeof e.name&&Ve.hasOwnProperty(e.name)){var t=Ve[e.name];"string"==typeof t&&(t={name:t}),(e=ne(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Be("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Be("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ke(e,t){t=Be(t);var n=We[t.name];if(!n)return Ke(e,"text/plain");var i=n(e,t);if(Ue.hasOwnProperty(t.name)){var o=Ue[t.name];for(var r in o)o.hasOwnProperty(r)&&(i.hasOwnProperty(r)&&(i["_"+r]=i[r]),i[r]=o[r])}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)i[a]=t.modeProps[a];return i}var Ue={};function He(e,t){z(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function Ge(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var o=t[i];o instanceof Array&&(o=o.concat([])),n[i]=o}return n}function qe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Xe(e,t,n){return!e.startState||e.startState(t,n)}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ye(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var o=n.children[i],r=o.chunkSize();if(t<r){n=o;break}t-=r}return n.lines[t]}function Qe(e,t,n){var i=[],o=t.line;return e.iter(t.line,n.line+1,(function(e){var r=e.text;o==n.line&&(r=r.slice(0,n.ch)),o==t.line&&(r=r.slice(t.ch)),i.push(r),++o})),i}function Ze(e,t,n){var i=[];return e.iter(t,n,(function(e){i.push(e.text)})),i}function et(e,t){var n=t-e.height;if(n)for(var i=e;i;i=i.parent)i.height+=n}function tt(e){if(null==e.parent)return null;for(var t=e.parent,n=U(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var o=0;i.children[o]!=t;++o)n+=i.children[o].chunkSize();return n+t.first}function nt(e,t){var n=e.first;e:do{for(var i=0;i<e.children.length;++i){var o=e.children[i],r=o.height;if(t<r){e=o;continue e}t-=r,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function it(e,t){return t>=e.first&&t<e.first+e.size}function ot(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function rt(e,t,n){if(void 0===n&&(n=null),!(this instanceof rt))return new rt(e,t,n);this.line=e,this.ch=t,this.sticky=n}function at(e,t){return e.line-t.line||e.ch-t.ch}function st(e,t){return e.sticky==t.sticky&&0==at(e,t)}function lt(e){return rt(e.line,e.ch)}function ct(e,t){return at(e,t)<0?t:e}function ut(e,t){return at(e,t)<0?e:t}function dt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ft(e,t){if(t.line<e.first)return rt(e.first,0);var n=e.first+e.size-1;return t.line>n?rt(n,Ye(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?rt(e.line,t):n<0?rt(e.line,0):e}(t,Ye(e,t.line).text.length)}function pt(e,t){for(var n=[],i=0;i<t.length;i++)n[i]=ft(e,t[i]);return n}Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=B(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var mt=function(e,t){this.state=e,this.lookAhead=t},ht=function(e,t,n,i){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,n,i){var o=[e.state.modeGen],r={};Ct(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),r,i);for(var a=n.state,s=function(i){n.baseTokens=o;var s=e.state.overlays[i],l=1,c=0;n.state=!0,Ct(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var i=o[l];i>e&&o.splice(l,1,e,o[l+1],i),l+=2,c=Math.min(e,i)}if(t)if(s.opaque)o.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var r=o[n+1];o[n+1]=(r?r+" ":"")+"overlay "+t}}),r),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:o,classes:r.bgClass||r.textClass?r:null}}function bt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=vt(e,tt(t)),o=t.text.length>e.options.maxHighlightLength&&Ge(e.doc.mode,i.state),r=gt(e,t,i);o&&(i.state=o),t.stateAfter=i.save(!o),t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function vt(e,t,n){var i=e.doc,o=e.display;if(!i.mode.startState)return new ht(i,!0,t);var r=function(e,t,n){for(var i,o,r=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=r.first)return r.first;var l=Ye(r,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof mt?c.lookAhead:0)<=r.modeFrontier))return s;var u=B(l.text,null,e.options.tabSize);(null==o||i>u)&&(o=s-1,i=u)}return o}(e,t,n),a=r>i.first&&Ye(i,r-1).stateAfter,s=a?ht.fromSaved(i,a,r):new ht(i,Xe(i.mode),r);return i.iter(r,t,(function(n){yt(e,n.text,s);var i=s.line;n.stateAfter=i==t-1||i%5==0||i>=o.viewFrom&&i<o.viewTo?s.save():null,s.nextLine()})),n&&(i.modeFrontier=s.line),s}function yt(e,t,n,i){var o=e.doc.mode,r=new Je(t,e.options.tabSize,n);for(r.start=r.pos=i||0,""==t&&_t(o,n.state);!r.eol();)wt(o,r,n.state),r.start=r.pos}function _t(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=qe(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function wt(e,t,n,i){for(var o=0;o<10;o++){i&&(i[0]=qe(e,n).mode);var r=e.token(t,n);if(t.pos>t.start)return r}throw new Error("Mode "+e.name+" failed to advance stream.")}ht.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ht.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ht.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ht.fromSaved=function(e,t,n){return t instanceof mt?new ht(e,Ge(e.mode,t.state),n,t.lookAhead):new ht(e,Ge(e.mode,t),n)},ht.prototype.save=function(e){var t=!1!==e?Ge(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mt(t,this.maxLookAhead):t};var xt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function kt(e,t,n,i){var o,r,a=e.doc,s=a.mode,l=Ye(a,(t=ft(a,t)).line),c=vt(e,t.line,n),u=new Je(l.text,e.options.tabSize,c);for(i&&(r=[]);(i||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=wt(s,u,c.state),i&&r.push(new xt(u,o,Ge(a.mode,c.state)));return i?r:new xt(u,o,c.state)}function Ot(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==t[i]?t[i]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[i])||(t[i]+=" "+n[2])}return e}function Ct(e,t,n,i,o,r,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new Je(t,e.options.tabSize,i),f=e.options.addModeClass&&[null];for(""==t&&Ot(_t(n,i.state),r);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&yt(e,t,i,d.pos),d.pos=t.length,l=null):l=Ot(wt(n,d,i.state,f),r),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c<d.start;)o(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var m=Math.min(d.pos,c+5e3);o(m,u),c=m}}var St=!1,Dt=!1;function Pt(e,t,n){this.marker=e,this.from=t,this.to=n}function Et(e,t){if(e)for(var n=0;n<e.length;++n){var i=e[n];if(i.marker==t)return i}}function jt(e,t){for(var n,i=0;i<e.length;++i)e[i]!=t&&(n||(n=[])).push(e[i]);return n}function Mt(e,t){if(t.full)return null;var n=it(e,t.from.line)&&Ye(e,t.from.line).markedSpans,i=it(e,t.to.line)&&Ye(e,t.to.line).markedSpans;if(!n&&!i)return null;var o=t.from.ch,r=t.to.ch,a=0==at(t.from,t.to),s=function(e,t,n){var i;if(e)for(var o=0;o<e.length;++o){var r=e[o],a=r.marker;if(null==r.from||(a.inclusiveLeft?r.from<=t:r.from<t)||r.from==t&&"bookmark"==a.type&&(!n||!r.marker.insertLeft)){var s=null==r.to||(a.inclusiveRight?r.to>=t:r.to>t);(i||(i=[])).push(new Pt(a,r.from,s?null:r.to))}}return i}(n,o,a),l=function(e,t,n){var i;if(e)for(var o=0;o<e.length;++o){var r=e[o],a=r.marker;if(null==r.to||(a.inclusiveRight?r.to>=t:r.to>t)||r.from==t&&"bookmark"==a.type&&(!n||r.marker.insertLeft)){var s=null==r.from||(a.inclusiveLeft?r.from<=t:r.from<t);(i||(i=[])).push(new Pt(a,s?null:r.from-t,null==r.to?null:r.to-t))}}return i}(i,r,a),c=1==t.text.length,u=Z(t.text).length+(c?o:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null==f.to){var p=Et(l,f.marker);p?c&&(f.to=null==p.to?null:p.to+u):f.to=o}}if(l)for(var m=0;m<l.length;++m){var h=l[m];null!=h.to&&(h.to+=u),null==h.from?Et(s,h.marker)||(h.from=u,c&&(s||(s=[])).push(h)):(h.from+=u,c&&(s||(s=[])).push(h))}s&&(s=Ft(s)),l&&l!=s&&(l=Ft(l));var g=[s];if(!c){var b,v=t.text.length-2;if(v>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(b||(b=[])).push(new Pt(s[y].marker,null,null));for(var _=0;_<v;++_)g.push(b);g.push(l)}return g}function Ft(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Tt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function It(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function $t(e){return e.inclusiveLeft?-1:0}function Rt(e){return e.inclusiveRight?1:0}function At(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var i=e.find(),o=t.find(),r=at(i.from,o.from)||$t(e)-$t(t);if(r)return-r;var a=at(i.to,o.to)||Rt(e)-Rt(t);return a||t.id-e.id}function Lt(e,t){var n,i=Dt&&e.markedSpans;if(i)for(var o=void 0,r=0;r<i.length;++r)(o=i[r]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||At(n,o.marker)<0)&&(n=o.marker);return n}function Nt(e){return Lt(e,!0)}function Wt(e){return Lt(e,!1)}function Vt(e,t){var n,i=Dt&&e.markedSpans;if(i)for(var o=0;o<i.length;++o){var r=i[o];r.marker.collapsed&&(null==r.from||r.from<t)&&(null==r.to||r.to>t)&&(!n||At(n,r.marker)<0)&&(n=r.marker)}return n}function zt(e,t,n,i,o){var r=Ye(e,t),a=Dt&&r.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=at(c.from,n)||$t(l.marker)-$t(o),d=at(c.to,i)||Rt(l.marker)-Rt(o);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?at(c.to,n)>=0:at(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?at(c.from,i)<=0:at(c.from,i)<0)))return!0}}}function Bt(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Kt(e,t){var n=Ye(e,t),i=Bt(n);return n==i?t:tt(i)}function Ut(e,t){if(t>e.lastLine())return t;var n,i=Ye(e,t);if(!Ht(e,i))return t;for(;n=Wt(i);)i=n.find(1,!0).line;return tt(i)+1}function Ht(e,t){var n=Dt&&t.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)if((i=n[o]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&Gt(e,t,i))return!0}}function Gt(e,t,n){if(null==n.to){var i=n.marker.find(1,!0);return Gt(e,i.line,Et(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,r=0;r<t.markedSpans.length;++r)if((o=t.markedSpans[r]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&Gt(e,t,o))return!0}function qt(e){for(var t=0,n=(e=Bt(e)).parent,i=0;i<n.lines.length;++i){var o=n.lines[i];if(o==e)break;t+=o.height}for(var r=n.parent;r;r=(n=r).parent)for(var a=0;a<r.children.length;++a){var s=r.children[a];if(s==n)break;t+=s.height}return t}function Xt(e){if(0==e.height)return 0;for(var t,n=e.text.length,i=e;t=Nt(i);){var o=t.find(0,!0);i=o.from.line,n+=o.from.ch-o.to.ch}for(i=e;t=Wt(i);){var r=t.find(0,!0);n-=i.text.length-r.from.ch,n+=(i=r.to.line).text.length-r.to.ch}return n}function Jt(e){var t=e.display,n=e.doc;t.maxLine=Ye(n,n.first),t.maxLineLength=Xt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Xt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Yt=function(e,t,n){this.text=e,It(this,t),this.height=n?n(this):1};function Qt(e){e.parent=null,Tt(e)}Yt.prototype.lineNo=function(){return tt(this)},ke(Yt);var Zt={},en={};function tn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?en:Zt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function nn(e,t){var n=M("span",null,null,l?"padding-right: .1px":null),i={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var r=o?t.rest[o-1]:t.line,a=void 0;i.pos=0,i.addToken=rn,Ie(e.display.measure)&&(a=me(r,e.doc.direction))&&(i.addToken=an(i.addToken,a)),i.map=[],ln(r,i,bt(e,r,t!=e.display.externalMeasured&&tt(r))),r.styleClasses&&(r.styleClasses.bgClass&&(i.bgClass=$(r.styleClasses.bgClass,i.bgClass||"")),r.styleClasses.textClass&&(i.textClass=$(r.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Te(e.display.measure))),0==o?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=i.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=$(i.pre.className,i.textClass||"")),i}function on(e){var t=j("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function rn(e,t,n,i,o,r,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,i="",o=0;o<e.length;o++){var r=e.charAt(o);" "!=r||!n||o!=e.length-1&&32!=e.charCodeAt(o+1)||(r=" "),i+=r,n=" "==r}return i}(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var m=d.exec(t),h=m?m.index-p:t.length-p;if(h){var g=document.createTextNode(u.slice(p,p+h));a&&s<9?c.appendChild(j("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!m)break;p+=h+1;var b=void 0;if("\t"==m[0]){var v=e.cm.options.tabSize,y=v-e.col%v;(b=c.appendChild(j("span",Q(y),"cm-tab"))).setAttribute("role","presentation"),b.setAttribute("cm-text","\t"),e.col+=y}else"\r"==m[0]||"\n"==m[0]?((b=c.appendChild(j("span","\r"==m[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",m[0]),e.col+=1):((b=e.cm.options.specialCharPlaceholder(m[0])).setAttribute("cm-text",m[0]),a&&s<9?c.appendChild(j("span",[b])):c.appendChild(b),e.col+=1);e.map.push(e.pos,e.pos+1,b),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||i||o||f||r||l){var _=n||"";i&&(_+=i),o&&(_+=o);var w=j("span",[c],_,r);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&w.setAttribute(x,l[x]);return e.content.appendChild(w)}e.content.appendChild(c)}}function an(e,t){return function(n,i,o,r,a,s,l){o=o?o+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+i.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(n,i,o,r,a,s,l);e(n,i.slice(0,d.to-c),o,r,null,s,l),r=null,i=i.slice(d.to-c),c=d.to}}}function sn(e,t,n,i){var o=!i&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!i&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function ln(e,t,n){var i=e.markedSpans,o=e.text,r=0;if(i)for(var a,s,l,c,u,d,f,p=o.length,m=0,h=1,g="",b=0;;){if(b==m){l=c=u=s="",f=null,d=null,b=1/0;for(var v=[],y=void 0,_=0;_<i.length;++_){var w=i[_],x=w.marker;if("bookmark"==x.type&&w.from==m&&x.widgetNode)v.push(x);else if(w.from<=m&&(null==w.to||w.to>m||x.collapsed&&w.to==m&&w.from==m)){if(null!=w.to&&w.to!=m&&b>w.to&&(b=w.to,c=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==m&&(u+=" "+x.startStyle),x.endStyle&&w.to==b&&(y||(y=[])).push(x.endStyle,w.to),x.title&&((f||(f={})).title=x.title),x.attributes)for(var k in x.attributes)(f||(f={}))[k]=x.attributes[k];x.collapsed&&(!d||At(d.marker,x)<0)&&(d=w)}else w.from>m&&b>w.from&&(b=w.from)}if(y)for(var O=0;O<y.length;O+=2)y[O+1]==b&&(c+=" "+y[O]);if(!d||d.from==m)for(var C=0;C<v.length;++C)sn(t,0,v[C]);if(d&&(d.from||0)==m){if(sn(t,(null==d.to?p+1:d.to)-m,d.marker,null==d.from),null==d.to)return;d.to==m&&(d=!1)}}if(m>=p)break;for(var S=Math.min(p,b);;){if(g){var D=m+g.length;if(!d){var P=D>S?g.slice(0,S-m):g;t.addToken(t,P,a?a+l:l,u,m+P.length==b?c:"",s,f)}if(D>=S){g=g.slice(S-m),m=S;break}m=D,u=""}g=o.slice(r,r=n[h++]),a=tn(n[h++],t.cm.options)}}else for(var E=1;E<n.length;E+=2)t.addToken(t,o.slice(r,r=n[E]),tn(n[E+1],t.cm.options))}function cn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Wt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?tt(Z(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ht(e,t)}function un(e,t,n){for(var i,o=[],r=t;r<n;r=i){var a=new cn(e.doc,Ye(e.doc,r),r);i=r+a.size,o.push(a)}return o}var dn=null,fn=null;function pn(e,t){var n=be(e,t);if(n.length){var i,o=Array.prototype.slice.call(arguments,2);dn?i=dn.delayedCallbacks:fn?i=fn:(i=fn=[],setTimeout(mn,0));for(var r=function(e){i.push((function(){return n[e].apply(null,o)}))},a=0;a<n.length;++a)r(a)}}function mn(){var e=fn;fn=null;for(var t=0;t<e.length;++t)e[t]()}function hn(e,t,n,i){for(var o=0;o<t.changes.length;o++){var r=t.changes[o];"text"==r?vn(e,t):"gutter"==r?_n(e,t,n,i):"class"==r?yn(e,t):"widget"==r&&wn(e,t,i)}t.changes=null}function gn(e){return e.node==e.text&&(e.node=j("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function bn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):nn(e,t)}function vn(e,t){var n=t.text.className,i=bn(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,yn(e,t)):n&&(t.text.className=n)}function yn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var i=gn(t);t.background=i.insertBefore(j("div",null,n),i.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?gn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function _n(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=gn(t);t.gutterBackground=j("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var r=t.line.gutterMarkers;if(e.options.lineNumbers||r){var a=gn(t),s=t.gutter=j("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||r&&r["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(j("div",ot(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),r)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=r.hasOwnProperty(c)&&r[c];u&&s.appendChild(j("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function wn(e,t,n){t.alignable&&(t.alignable=null);for(var i=C("CodeMirror-linewidget"),o=t.node.firstChild,r=void 0;o;o=r)r=o.nextSibling,i.test(o.className)&&t.node.removeChild(o);kn(e,t,n)}function xn(e,t,n,i){var o=bn(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),yn(e,t),_n(e,t,n,i),kn(e,t,i),t.node}function kn(e,t,n){if(On(e,t.line,t,n,!0),t.rest)for(var i=0;i<t.rest.length;i++)On(e,t.rest[i],t,n,!1)}function On(e,t,n,i,o){if(t.widgets)for(var r=gn(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=j("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Cn(l,c,n,i),e.display.input.setUneditable(c),o&&l.above?r.insertBefore(c,n.gutter||n.text):r.appendChild(c),pn(l,"redraw")}}function Cn(e,t,n,i){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(o-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function Sn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!F(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),E(t.display.measure,j("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Dn(e,t){for(var n=Pe(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Pn(e){return e.lineSpace.offsetTop}function En(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function jn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=E(e.measure,j("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function Mn(e){return 50-e.display.nativeBarWidth}function Fn(e){return e.display.scroller.clientWidth-Mn(e)-e.display.barWidth}function Tn(e){return e.display.scroller.clientHeight-Mn(e)-e.display.barHeight}function In(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var o=0;o<e.rest.length;o++)if(tt(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function $n(e,t,n,i){return Ln(e,An(e,t),n,i)}function Rn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[hi(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function An(e,t){var n=tt(t),i=Rn(e,n);i&&!i.text?i=null:i&&i.changes&&(hn(e,i,n,ui(e)),e.curOp.forceUpdate=!0),i||(i=function(e,t){var n=tt(t=Bt(t)),i=e.display.externalMeasured=new cn(e.doc,t,n);i.lineN=n;var o=i.built=nn(e,i);return i.text=o.pre,E(e.display.lineMeasure,o.pre),i}(e,t));var o=In(i,t,n);return{line:t,view:i,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Ln(e,t,n,i,o){t.before&&(n=-1);var r,l=n+(i||"");return t.cache.hasOwnProperty(l)?r=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var i=e.options.lineWrapping,o=i&&Fn(e);if(!t.measure.heights||i&&t.measure.width!=o){var r=t.measure.heights=[];if(i){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&r.push((l.bottom+c.top)/2-n.top)}}r.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(r=function(e,t,n,i){var o,r=Vn(t.map,n,i),l=r.node,c=r.start,u=r.end,d=r.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&le(t.line.text.charAt(r.coverStart+c));)--c;for(;r.coverStart+u<r.coverEnd&&le(t.line.text.charAt(r.coverStart+u));)++u;if((o=a&&s<9&&0==c&&u==r.coverEnd-r.coverStart?l.parentNode.getBoundingClientRect():zn(S(l,c,u).getClientRects(),i)).left||o.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(o=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Ne)return Ne;var t=E(e,j("span","x")),n=t.getBoundingClientRect(),i=S(t,0,1).getBoundingClientRect();return Ne=Math.abs(n.left-i.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*i,bottom:t.bottom*i}}(e.display.measure,o))}else{var p;c>0&&(d=i="right"),o=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==i?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!o||!o.left&&!o.right)){var m=l.parentNode.getClientRects()[0];o=m?{left:m.left,right:m.left+ci(e.display),top:m.top,bottom:m.bottom}:Wn}for(var h=o.top-t.rect.top,g=o.bottom-t.rect.top,b=(h+g)/2,v=t.view.measure.heights,y=0;y<v.length-1&&!(b<v[y]);y++);var _=y?v[y-1]:0,w=v[y],x={left:("right"==d?o.right:o.left)-t.rect.left,right:("left"==d?o.left:o.right)-t.rect.left,top:_,bottom:w};return o.left||o.right||(x.bogus=!0),e.options.singleCursorHeightPerLine||(x.rtop=h,x.rbottom=g),x}(e,t,n,i)).bogus||(t.cache[l]=r)),{left:r.left,right:r.right,top:o?r.rtop:r.top,bottom:o?r.rbottom:r.bottom}}var Nn,Wn={left:0,right:0,top:0,bottom:0};function Vn(e,t,n){for(var i,o,r,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(o=0,r=1,a="left"):t<l?r=1+(o=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(o=(r=l-s)-1,t>=l&&(a="right")),null!=o){if(i=e[c+2],s==l&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)i=e[2+(c-=3)],a="left";if("right"==n&&o==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)i=e[(c+=3)+2],a="right";break}return{node:i,start:o,end:r,collapse:a,coverStart:s,coverEnd:l}}function zn(e,t){var n=Wn;if("left"==t)for(var i=0;i<e.length&&(n=e[i]).left==n.right;i++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function Bn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Kn(e){e.display.externalMeasure=null,P(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Bn(e.display.view[t])}function Un(e){Kn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Hn(e){return u&&b?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Gn(e){return u&&b?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function qn(e){var t=Bt(e).widgets,n=0;if(t)for(var i=0;i<t.length;++i)t[i].above&&(n+=Sn(t[i]));return n}function Xn(e,t,n,i,o){if(!o){var r=qn(t);n.top+=r,n.bottom+=r}if("line"==i)return n;i||(i="local");var a=qt(t);if("local"==i?a+=Pn(e.display):a-=e.display.viewOffset,"page"==i||"window"==i){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==i?0:Gn(A(e)));var l=s.left+("window"==i?0:Hn(A(e)));n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function Jn(e,t,n){if("div"==n)return t;var i=t.left,o=t.top;if("page"==n)i-=Hn(A(e)),o-=Gn(A(e));else if("local"==n||!n){var r=e.display.sizer.getBoundingClientRect();i+=r.left,o+=r.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:o-a.top}}function Yn(e,t,n,i,o){return i||(i=Ye(e.doc,t.line)),Xn(e,i,$n(e,i,t.ch,o),n)}function Qn(e,t,n,i,o,r){function a(t,a){var s=Ln(e,o,t,a?"right":"left",r);return a?s.left=s.right:s.right=s.left,Xn(e,i,s,n)}i=i||Ye(e.doc,t.line),o||(o=An(e,i));var s=me(i,e.doc.direction),l=t.ch,c=t.sticky;if(l>=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=fe(s,l,c),f=de,p=u(l,d,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function Zn(e,t){var n=0;t=ft(e.doc,t),e.options.lineWrapping||(n=ci(e.display)*t.ch);var i=Ye(e.doc,t.line),o=qt(i)+Pn(e.display);return{left:n,right:n,top:o,bottom:o+i.height}}function ei(e,t,n,i,o){var r=rt(e,t,n);return r.xRel=o,i&&(r.outside=i),r}function ti(e,t,n){var i=e.doc;if((n+=e.display.viewOffset)<0)return ei(i.first,0,null,-1,-1);var o=nt(i,n),r=i.first+i.size-1;if(o>r)return ei(i.first+i.size-1,Ye(i,r).text.length,null,1,1);t<0&&(t=0);for(var a=Ye(i,o);;){var s=ri(e,a,o,t,n),l=Vt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==o)return c;a=Ye(i,o=c.line)}}function ni(e,t,n,i){i-=qn(t);var o=t.text.length,r=ue((function(t){return Ln(e,n,t-1).bottom<=i}),o,0);return{begin:r,end:o=ue((function(t){return Ln(e,n,t).top>i}),r,o)}}function ii(e,t,n,i){return n||(n=An(e,t)),ni(e,t,n,Xn(e,t,Ln(e,n,i),"line").top)}function oi(e,t,n,i){return!(e.bottom<=n)&&(e.top>n||(i?e.left:e.right)>t)}function ri(e,t,n,i,o){o-=qt(t);var r=An(e,t),a=qn(t),s=0,l=t.text.length,c=!0,u=me(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?si:ai)(e,t,n,r,u,i,o);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,p,m=null,h=null,g=ue((function(t){var n=Ln(e,r,t);return n.top+=a,n.bottom+=a,!!oi(n,i,o,!1)&&(n.top<=o&&n.left<=i&&(m=t,h=n),!0)}),s,l),b=!1;if(h){var v=i-h.left<h.right-i,y=v==c;g=m+(y?0:1),p=y?"after":"before",f=v?h.left:h.right}else{c||g!=l&&g!=s||g++,p=0==g?"after":g==t.text.length?"before":Ln(e,r,g-(c?1:0)).bottom+a<=o==c?"after":"before";var _=Qn(e,rt(n,g,p),"line",t,r);f=_.left,b=o<_.top?-1:o>=_.bottom?1:0}return ei(n,g=ce(t.text,g,1),p,b,i-f)}function ai(e,t,n,i,o,r,a){var s=ue((function(s){var l=o[s],c=1!=l.level;return oi(Qn(e,rt(n,c?l.to:l.from,c?"before":"after"),"line",t,i),r,a,!0)}),0,o.length-1),l=o[s];if(s>0){var c=1!=l.level,u=Qn(e,rt(n,c?l.from:l.to,c?"after":"before"),"line",t,i);oi(u,r,a,!0)&&u.top>a&&(l=o[s-1])}return l}function si(e,t,n,i,o,r,a){var s=ni(e,t,i,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<o.length;f++){var p=o[f];if(!(p.from>=c||p.to<=l)){var m=Ln(e,i,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,h=m<r?r-m+1e9:m-r;(!u||d>h)&&(u=p,d=h)}}return u||(u=o[o.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function li(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nn){Nn=j("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(j("br"));Nn.appendChild(document.createTextNode("x"))}E(e.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),P(e.measure),n||1}function ci(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=j("span","xxxxxxxxxx"),n=j("pre",[t],"CodeMirror-line-like");E(e.measure,n);var i=t.getBoundingClientRect(),o=(i.right-i.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ui(e){for(var t=e.display,n={},i={},o=t.gutters.clientLeft,r=t.gutters.firstChild,a=0;r;r=r.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=r.offsetLeft+r.clientLeft+o,i[s]=r.clientWidth}return{fixedPos:di(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function di(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function fi(e){var t=li(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/ci(e.display)-3);return function(o){if(Ht(e.doc,o))return 0;var r=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(r+=o.widgets[a].height);return n?r+(Math.ceil(o.text.length/i)||1)*t:r+t}}function pi(e){var t=e.doc,n=fi(e);t.iter((function(e){var t=n(e);t!=e.height&&et(e,t)}))}function mi(e,t,n,i){var o=e.display;if(!n&&"true"==Pe(t).getAttribute("cm-not-content"))return null;var r,a,s=o.lineSpace.getBoundingClientRect();try{r=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=ti(e,r,a);if(i&&c.xRel>0&&(l=Ye(e.doc,c.line).text).length==c.ch){var u=B(l,l.length,e.options.tabSize)-l.length;c=rt(c.line,Math.max(0,Math.round((r-jn(e.display).left)/ci(e.display))-u))}return c}function hi(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,i=0;i<n.length;i++)if((t-=n[i].size)<0)return i}function gi(e,t,n,i){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),i||(i=0);var o=e.display;if(i&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Dt&&Kt(e.doc,t)<o.viewTo&&vi(e);else if(n<=o.viewFrom)Dt&&Ut(e.doc,n+i)>o.viewFrom?vi(e):(o.viewFrom+=i,o.viewTo+=i);else if(t<=o.viewFrom&&n>=o.viewTo)vi(e);else if(t<=o.viewFrom){var r=yi(e,n,n+i,1);r?(o.view=o.view.slice(r.index),o.viewFrom=r.lineN,o.viewTo+=i):vi(e)}else if(n>=o.viewTo){var a=yi(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):vi(e)}else{var s=yi(e,t,t,-1),l=yi(e,n,n+i,1);s&&l?(o.view=o.view.slice(0,s.index).concat(un(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=i):vi(e)}var c=o.externalMeasured;c&&(n<c.lineN?c.lineN+=i:t<c.lineN+c.size&&(o.externalMeasured=null))}function bi(e,t,n){e.curOp.viewChanged=!0;var i=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(i.externalMeasured=null),!(t<i.viewFrom||t>=i.viewTo)){var r=i.view[hi(e,t)];if(null!=r.node){var a=r.changes||(r.changes=[]);-1==U(a,n)&&a.push(n)}}}function vi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function yi(e,t,n,i){var o,r=hi(e,t),a=e.display.view;if(!Dt||n==e.doc.first+e.doc.size)return{index:r,lineN:n};for(var s=e.display.viewFrom,l=0;l<r;l++)s+=a[l].size;if(s!=t){if(i>0){if(r==a.length-1)return null;o=s+a[r].size-t,r++}else o=s-t;t+=o,n+=o}for(;Kt(e.doc,n)!=n;){if(r==(i<0?0:a.length-1))return null;n+=i*a[r-(i<0?1:0)].size,r+=i}return{index:r,lineN:n}}function _i(e){for(var t=e.display.view,n=0,i=0;i<t.length;i++){var o=t[i];o.hidden||o.node&&!o.changes||++n}return n}function wi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function xi(e,t){void 0===t&&(t=!0);var n=e.doc,i={},o=i.cursors=document.createDocumentFragment(),r=i.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var l=n.sel.ranges[s];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(a){var u=a(e,l);u&&ki(e,u,o)}else(c||e.options.showCursorWhenSelecting)&&ki(e,l.head,o);c||Ci(e,l,r)}}return i}function ki(e,t,n){var i=Qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(j("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var r=Yn(e,t,"div",null,null),a=r.right-r.left;o.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(i.other){var s=n.appendChild(j("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=i.other.left+"px",s.style.top=i.other.top+"px",s.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Oi(e,t){return e.top-t.top||e.left-t.left}function Ci(e,t,n){var i=e.display,o=e.doc,r=document.createDocumentFragment(),a=jn(e.display),s=a.left,l=Math.max(i.sizerWidth,Fn(e)-i.sizer.offsetLeft)-a.right,c="ltr"==o.direction;function u(e,t,n,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),r.appendChild(j("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(i-t)+"px"))}function d(t,n,i){var r,a,d=Ye(o,t),f=d.text.length;function p(n,i){return Yn(e,rt(t,n),"div",d,i)}function m(t,n,i){var o=ii(e,d,null,t),r="ltr"==n==("after"==i)?"left":"right";return p("after"==i?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),r)[r]}var h=me(d,o.direction);return function(e,t,n,i){if(!e)return i(t,n,"ltr",0);for(var o=!1,r=0;r<e.length;++r){var a=e[r];(a.from<n&&a.to>t||t==n&&a.to==t)&&(i(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",r),o=!0)}o||i(t,n,"ltr")}(h,n||0,null==i?f:i,(function(e,t,o,d){var g="ltr"==o,b=p(e,g?"left":"right"),v=p(t-1,g?"right":"left"),y=null==n&&0==e,_=null==i&&t==f,w=0==d,x=!h||d==h.length-1;if(v.top-b.top<=3){var k=(c?_:y)&&x,O=(c?y:_)&&w?s:(g?b:v).left,C=k?l:(g?v:b).right;u(O,b.top,C-O,b.bottom)}else{var S,D,P,E;g?(S=c&&y&&w?s:b.left,D=c?l:m(e,o,"before"),P=c?s:m(t,o,"after"),E=c&&_&&x?l:v.right):(S=c?m(e,o,"before"):s,D=!c&&y&&w?l:b.right,P=!c&&_&&x?s:v.left,E=c?m(t,o,"after"):l),u(S,b.top,D-S,b.bottom),b.bottom<v.top&&u(s,b.bottom,null,v.top),u(P,v.top,E-P,v.bottom)}(!r||Oi(b,r)<0)&&(r=b),Oi(v,r)<0&&(r=v),(!a||Oi(b,a)<0)&&(a=b),Oi(v,a)<0&&(a=v)})),{start:r,end:a}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var m=Ye(o,f.line),h=Ye(o,p.line),g=Bt(m)==Bt(h),b=d(f.line,f.ch,g?m.text.length+1:null).end,v=d(p.line,g?0:null,p.ch).start;g&&(b.top<v.top-2?(u(b.right,b.top,null,b.bottom),u(s,v.top,v.left,v.bottom)):u(b.right,b.top,v.left-b.right,b.bottom)),b.bottom<v.top&&u(s,b.bottom,null,v.top)}n.appendChild(r)}function Si(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||ji(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Di(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ei(e))}function Pi(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ji(e))}),100)}function Ei(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Si(e))}function ji(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,D(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Mi(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,r=0,l=0;l<t.view.length;l++){var c=t.view[l],u=e.options.lineWrapping,d=void 0,f=0;if(!c.hidden){if(o+=c.line.height,a&&s<8){var p=c.node.offsetTop+c.node.offsetHeight;d=p-n,n=p}else{var m=c.node.getBoundingClientRect();d=m.bottom-m.top,!u&&c.text.firstChild&&(f=c.text.firstChild.getBoundingClientRect().right-m.left-1)}var h=c.line.height-d;if((h>.005||h<-.005)&&(o<i&&(r-=h),et(c.line,d),Fi(c.line),c.rest))for(var g=0;g<c.rest.length;g++)Fi(c.rest[g]);if(f>e.display.sizerWidth){var b=Math.ceil(f/ci(e.display));b>e.display.maxLineLength&&(e.display.maxLineLength=b,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(r)>2&&(t.scroller.scrollTop+=r)}function Fi(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function Ti(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-Pn(e));var o=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,r=nt(t,i),a=nt(t,o);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<r?(r=s,a=nt(t,qt(Ye(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(r=nt(t,qt(Ye(t,l))-e.wrapper.clientHeight),a=l)}return{from:r,to:Math.max(a,r+1)}}function Ii(e,t){var n=e.display,i=li(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,r=Tn(e),a={};t.bottom-t.top>r&&(t.bottom=t.top+r);var s=e.doc.height+En(n),l=t.top<i,c=t.bottom>s-i;if(t.top<o)a.scrollTop=l?0:t.top;else if(t.bottom>o+r){var u=Math.min(t.top,(c?s:t.bottom)-r);u!=o&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Fn(e)-n.gutters.offsetWidth,m=t.right-t.left>p;return m&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left+d-(m?0:10)):t.right>p+f-3&&(a.scrollLeft=t.right+(m?0:10)-p),a}function $i(e,t){null!=t&&(Li(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Ri(e){Li(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ai(e,t,n){null==t&&null==n||Li(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Li(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Ni(e,Zn(e,t.from),Zn(e,t.to),t.margin))}function Ni(e,t,n,i){var o=Ii(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-i,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+i});Ai(e,o.scrollLeft,o.scrollTop)}function Wi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||mo(e,{top:t}),Vi(e,t,!0),n&&mo(e),lo(e,100))}function Vi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function zi(e,t,n,i){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!i||(e.doc.scrollLeft=t,bo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Bi(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+En(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Mn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ki=function(e,t,n){this.cm=n;var i=this.vert=j("div",[j("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=j("div",[j("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=o.tabIndex=-1,e(i),e(o),ge(i,"scroll",(function(){i.clientHeight&&t(i.scrollTop,"vertical")})),ge(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ki.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var o=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var r=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+r)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:t?i:0}},Ki.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ki.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ki.prototype.zeroWidthHack=function(){var e=y&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},Ki.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="",t.set(1e3,(function i(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,i)}))},Ki.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ui=function(){};function Hi(e,t){t||(t=Bi(e));var n=e.display.barWidth,i=e.display.barHeight;Gi(e,t);for(var o=0;o<4&&n!=e.display.barWidth||i!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Mi(e),Gi(e,Bi(e)),n=e.display.barWidth,i=e.display.barHeight}function Gi(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ui.prototype.update=function(){return{bottom:0,right:0}},Ui.prototype.setScrollLeft=function(){},Ui.prototype.setScrollTop=function(){},Ui.prototype.clear=function(){};var qi={native:Ki,null:Ui};function Xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&D(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new qi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ge(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?zi(e,t):Wi(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Ji=0;function Yi(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ji,markArrays:null},t=e.curOp,dn?dn.ops.push(t):t.ownsGroup=dn={ops:[t],delayedCallbacks:[]}}function Qi(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var i=0;i<e.ops.length;i++){var o=e.ops[i];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}(n)}finally{dn=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Zi(t[n]);for(var i=0;i<t.length;i++)eo(t[i]);for(var o=0;o<t.length;o++)to(t[o]);for(var r=0;r<t.length;r++)no(t[r]);for(var a=0;a<t.length;a++)io(t[a])}(e)}))}function Zi(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Mn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Mn(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Jt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new uo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function eo(e){e.updatedDisplay=e.mustUpdate&&fo(e.cm,e.update)}function to(e){var t=e.cm,n=t.display;e.updatedDisplay&&Mi(t),e.barMeasure=Bi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=$n(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Mn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Fn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function no(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&zi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==T(L(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Hi(t,e.barMeasure),e.updatedDisplay&&go(t,e.barMeasure),e.selectionChanged&&Si(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Di(e.cm)}function io(e){var t=e.cm,n=t.display,i=t.doc;e.updatedDisplay&&po(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Vi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&zi(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!_e(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),o=null,r=n.wrapper.ownerDocument;if(t.top+i.top<0?o=!0:t.bottom+i.top>(r.defaultView.innerHeight||r.documentElement.clientHeight)&&(o=!1),null!=o&&!h){var a=j("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Pn(e.display))+"px;\n height: "+(t.bottom-t.top+Mn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,i){var o;null==i&&(i=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?rt(t.line,t.ch+1,"before"):t,t=t.ch?rt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var r=0;r<5;r++){var a=!1,s=Qn(e,t),l=n&&n!=t?Qn(e,n):s,c=Ii(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-i,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+i}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Wi(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(zi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(t,ft(i,e.scrollToPos.from),ft(i,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,r=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||ye(o[a],"hide");if(r)for(var s=0;s<r.length;++s)r[s].lines.length&&ye(r[s],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function oo(e,t){if(e.curOp)return t();Yi(e);try{return t()}finally{Qi(e)}}function ro(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Yi(e);try{return t.apply(e,arguments)}finally{Qi(e)}}}function ao(e){return function(){if(this.curOp)return e.apply(this,arguments);Yi(this);try{return e.apply(this,arguments)}finally{Qi(this)}}}function so(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Yi(t);try{return e.apply(this,arguments)}finally{Qi(t)}}}function lo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,V(co,e))}function co(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,i=vt(e,t.highlightFrontier),o=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(r){if(i.line>=e.display.viewFrom){var a=r.styles,s=r.text.length>e.options.maxHighlightLength?Ge(t.mode,i.state):null,l=gt(e,r,i,!0);s&&(i.state=s),r.styles=l.styles;var c=r.styleClasses,u=l.classes;u?r.styleClasses=u:c&&(r.styleClasses=null);for(var d=!a||a.length!=r.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=r.styles[f];d&&o.push(i.line),r.stateAfter=i.save(),i.nextLine()}else r.text.length<=e.options.maxHighlightLength&&yt(e,r.text,i),r.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return lo(e,e.options.workDelay),!0})),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),o.length&&oo(e,(function(){for(var t=0;t<o.length;t++)bi(e,o[t],"text")}))}}var uo=function(e,t,n){var i=e.display;this.viewport=t,this.visible=Ti(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Fn(e),this.force=n,this.dims=ui(e),this.events=[]};function fo(e,t){var n=e.display,i=e.doc;if(t.editorIsHidden)return vi(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==_i(e))return!1;vo(e)&&(vi(e),t.dims=ui(e));var o=i.first+i.size,r=Math.max(t.visible.from-e.options.viewportMargin,i.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFrom<r&&r-n.viewFrom<20&&(r=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Dt&&(r=Kt(e.doc,r),a=Ut(e.doc,a));var s=r!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var i=e.display;0==i.view.length||t>=i.viewTo||n<=i.viewFrom?(i.view=un(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=un(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(hi(e,t))),i.viewFrom=t,i.viewTo<n?i.view=i.view.concat(un(e,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,hi(e,n)))),i.viewTo=n}(e,r,a),n.viewOffset=qt(Ye(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=_i(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=T(L(e));if(!t||!F(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var i=W(e).getSelection();i.anchorNode&&i.extend&&F(e.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var i=e.display,o=e.options.lineNumbers,r=i.lineDiv,a=r.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=i.view,u=i.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==r){for(;a!=f.node;)a=s(a);var p=o&&null!=t&&t<=u&&f.lineNumber;f.changes&&(U(f.changes,"gutter")>-1&&(p=!1),hn(e,f,u,n)),p&&(P(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ot(e.options,u)))),a=f.node.nextSibling}else{var m=xn(e,f,u,n);r.insertBefore(m,a)}u+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=T(N(e.activeElt))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&F(document.body,e.anchorNode)&&F(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),i=t.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),n.removeAllRanges(),n.addRange(i),n.extend(e.focusNode,e.focusOffset)}}(u),P(n.cursorDiv),P(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,lo(e,400)),n.updateLineNumbers=null,!0}function po(e,t){for(var n=t.viewport,i=!0;;i=!1){if(i&&e.options.lineWrapping&&t.oldDisplayWidth!=Fn(e))i&&(t.visible=Ti(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+En(e.display)-Tn(e),n.top)}),t.visible=Ti(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!fo(e,t))break;Mi(e);var o=Bi(e);wi(e),Hi(e,o),go(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function mo(e,t){var n=new uo(e,t);if(fo(e,n)){Mi(e),po(e,n);var i=Bi(e);wi(e),Hi(e,i),go(e,i),n.finish()}}function ho(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",pn(e,"gutterChanged",e)}function go(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Mn(e)+"px"}function bo(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=di(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,r=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=r),n[a].gutterBackground&&(n[a].gutterBackground.style.left=r));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=r}e.options.fixedGutter&&(t.gutters.style.left=i+o+"px")}}function vo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ot(e.options,t.first+t.size-1),i=e.display;if(n.length!=i.lineNumChars){var o=i.measure.appendChild(j("div",[j("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),r=o.firstChild.offsetWidth,a=o.offsetWidth-r;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(r,i.lineGutter.offsetWidth-a)+1,i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",ho(e.display),!0}return!1}function yo(e,t){for(var n=[],i=!1,o=0;o<e.length;o++){var r=e[o],a=null;if("string"!=typeof r&&(a=r.style,r=r.className),"CodeMirror-linenumbers"==r){if(!t)continue;i=!0}n.push({className:r,style:a})}return t&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function _o(e){var t=e.gutters,n=e.gutterSpecs;P(t),e.lineGutter=null;for(var i=0;i<n.length;++i){var o=n[i],r=o.className,a=o.style,s=t.appendChild(j("div",null,"CodeMirror-gutter "+r));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==r&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ho(e)}function wo(e){_o(e.display),gi(e),bo(e)}function xo(e,t,i,o){var r=this;this.input=i,r.scrollbarFiller=j("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=j("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=M("div",null,"CodeMirror-code"),r.selectionDiv=j("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=j("div",null,"CodeMirror-cursors"),r.measure=j("div",null,"CodeMirror-measure"),r.lineMeasure=j("div",null,"CodeMirror-measure"),r.lineSpace=M("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var c=M("div",[r.lineSpace],"CodeMirror-lines");r.mover=j("div",[c],null,"position: relative"),r.sizer=j("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=j("div",null,null,"position: absolute; height: 50px; width: 1px;"),r.gutters=j("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=j("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=j("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),u&&105===d&&(r.wrapper.style.clipPath="inset(0px)"),r.wrapper.setAttribute("translate","no"),a&&s<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),l||n&&v||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,r.gutterSpecs=yo(o.gutters,o.lineNumbers),_o(r),i.init(r)}uo.prototype.signal=function(e,t){xe(e,t)&&this.events.push(arguments)},uo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};var ko=0,Oo=null;function Co(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function So(e){var t=Co(e);return t.x*=Oo,t.y*=Oo,t}function Do(e,t){u&&102==d&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var i=Co(t),o=i.x,r=i.y,a=Oo;0===t.deltaMode&&(o=t.deltaX,r=t.deltaY,a=1);var s=e.display,c=s.scroller,p=c.scrollWidth>c.clientWidth,m=c.scrollHeight>c.clientHeight;if(o&&p||r&&m){if(r&&y&&l)e:for(var h=t.target,g=s.view;h!=c;h=h.parentNode)for(var b=0;b<g.length;b++)if(g[b].node==h){e.display.currentWheelTarget=h;break e}if(o&&!n&&!f&&null!=a)return r&&m&&Wi(e,Math.max(0,c.scrollTop+r*a)),zi(e,Math.max(0,c.scrollLeft+o*a)),(!r||r&&m)&&Oe(t),void(s.wheelStartX=null);if(r&&null!=a){var v=r*a,_=e.doc.scrollTop,w=_+s.wrapper.clientHeight;v<0?_=Math.max(0,_+v-50):w=Math.min(e.doc.height,w+v+50),mo(e,{top:_,bottom:w})}ko<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=c.scrollLeft,s.wheelStartY=c.scrollTop,s.wheelDX=o,s.wheelDY=r,setTimeout((function(){if(null!=s.wheelStartX){var e=c.scrollLeft-s.wheelStartX,t=c.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(Oo=(Oo*ko+n)/(ko+1),++ko)}}),200)):(s.wheelDX+=o,s.wheelDY+=r))}}a?Oo=-.53:n?Oo=15:u?Oo=-.7:p&&(Oo=-1/3);var Po=function(e,t){this.ranges=e,this.primIndex=t};Po.prototype.primary=function(){return this.ranges[this.primIndex]},Po.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],i=e.ranges[t];if(!st(n.anchor,i.anchor)||!st(n.head,i.head))return!1}return!0},Po.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Eo(lt(this.ranges[t].anchor),lt(this.ranges[t].head));return new Po(e,this.primIndex)},Po.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Po.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(at(t,i.from())>=0&&at(e,i.to())<=0)return n}return-1};var Eo=function(e,t){this.anchor=e,this.head=t};function jo(e,t,n){var i=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return at(e.from(),t.from())})),n=U(t,o);for(var r=1;r<t.length;r++){var a=t[r],s=t[r-1],l=at(s.to(),a.from());if(i&&!a.empty()?l>0:l>=0){var c=ut(s.from(),a.from()),u=ct(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;r<=n&&--n,t.splice(--r,2,new Eo(d?u:c,d?c:u))}}return new Po(t,n)}function Mo(e,t){return new Po([new Eo(e,t||e)],0)}function Fo(e){return e.text?rt(e.from.line+e.text.length-1,Z(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function To(e,t){if(at(e,t.from)<0)return e;if(at(e,t.to)<=0)return Fo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=Fo(t).ch-t.to.ch),rt(n,i)}function Io(e,t){for(var n=[],i=0;i<e.sel.ranges.length;i++){var o=e.sel.ranges[i];n.push(new Eo(To(o.anchor,t),To(o.head,t)))}return jo(e.cm,n,e.sel.primIndex)}function $o(e,t,n){return e.line==t.line?rt(n.line,e.ch-t.ch+n.ch):rt(n.line+(e.line-t.line),e.ch)}function Ro(e){e.doc.mode=Ke(e.options,e.doc.modeOption),Ao(e)}function Ao(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,lo(e,100),e.state.modeGen++,e.curOp&&gi(e)}function Lo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Z(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function No(e,t,n,i){function o(e){return n?n[e]:null}function r(e,n,o){!function(e,t,n,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Tt(e),It(e,n);var o=i?i(e):1;o!=e.height&&et(e,o)}(e,n,o,i),pn(e,"change",e,t)}function a(e,t){for(var n=[],r=e;r<t;++r)n.push(new Yt(c[r],o(r),i));return n}var s=t.from,l=t.to,c=t.text,u=Ye(e,s.line),d=Ye(e,l.line),f=Z(c),p=o(c.length-1),m=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Lo(e,t)){var h=a(0,c.length-1);r(d,d.text,p),m&&e.remove(s.line,m),h.length&&e.insert(s.line,h)}else if(u==d)if(1==c.length)r(u,u.text.slice(0,s.ch)+f+u.text.slice(l.ch),p);else{var g=a(1,c.length-1);g.push(new Yt(f+u.text.slice(l.ch),p,i)),r(u,u.text.slice(0,s.ch)+c[0],o(0)),e.insert(s.line+1,g)}else if(1==c.length)r(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),o(0)),e.remove(s.line+1,m);else{r(u,u.text.slice(0,s.ch)+c[0],o(0)),r(d,f+d.text.slice(l.ch),p);var b=a(1,c.length-1);m>1&&e.remove(s.line+1,m-1),e.insert(s.line+1,b)}pn(e,"change",e,t)}function Wo(e,t,n){!function e(i,o,r){if(i.linked)for(var a=0;a<i.linked.length;++a){var s=i.linked[a];if(s.doc!=o){var l=r&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,i,l))}}}(e,null,!0)}function Vo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,pi(e),Ro(e),zo(e),e.options.direction=t.direction,e.options.lineWrapping||Jt(e),e.options.mode=t.modeOption,gi(e)}function zo(e){("rtl"==e.doc.direction?I:D)(e.display.lineDiv,"CodeMirror-rtl")}function Bo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Ko(e,t){var n={from:lt(t.from),to:Fo(t),text:Qe(e,t.from,t.to)};return Xo(e,n,t.from.line,t.to.line+1),Wo(e,(function(e){return Xo(e,n,t.from.line,t.to.line+1)}),!0),n}function Uo(e){for(;e.length&&Z(e).ranges;)e.pop()}function Ho(e,t,n,i){var o=e.history;o.undone.length=0;var r,a,s=+new Date;if((o.lastOp==i||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(r=function(e,t){return t?(Uo(e.done),Z(e.done)):e.done.length&&!Z(e.done).ranges?Z(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Z(e.done)):void 0}(o,o.lastOp==i)))a=Z(r.changes),0==at(t.from,t.to)&&0==at(t.from,a.to)?a.to=Fo(t):r.changes.push(Ko(e,t));else{var l=Z(o.done);for(l&&l.ranges||qo(e.sel,o.done),r={changes:[Ko(e,t)],generation:o.generation},o.done.push(r);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=i,o.lastOrigin=o.lastSelOrigin=t.origin,a||ye(e,"historyAdded")}function Go(e,t,n,i){var o=e.history,r=i&&i.origin;n==o.lastSelOp||r&&o.lastSelOrigin==r&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==r||function(e,t,n,i){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,r,Z(o.done),t))?o.done[o.done.length-1]=t:qo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=r,o.lastSelOp=n,i&&!1!==i.clearRedo&&Uo(o.undone)}function qo(e,t){var n=Z(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Xo(e,t,n,i){var o=t["spans_"+e.id],r=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[r]=n.markedSpans),++r}))}function Jo(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Yo(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var i=[],o=0;o<t.text.length;++o)i.push(Jo(n[o]));return i}(e,t),i=Mt(e,t);if(!n)return i;if(!i)return n;for(var o=0;o<n.length;++o){var r=n[o],a=i[o];if(r&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<r.length;++c)if(r[c].marker==l.marker)continue e;r.push(l)}else a&&(n[o]=a)}return n}function Qo(e,t,n){for(var i=[],o=0;o<e.length;++o){var r=e[o];if(r.ranges)i.push(n?Po.prototype.deepCopy.call(r):r);else{var a=r.changes,s=[];i.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(Z(s)[d]=c[d],delete c[d])}}}return i}function Zo(e,t,n,i){if(i){var o=e.anchor;if(n){var r=at(t,o)<0;r!=at(n,o)<0?(o=t,t=n):r!=at(t,n)<0&&(t=n)}return new Eo(o,t)}return new Eo(n||t,t)}function er(e,t,n,i,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),rr(e,new Po([Zo(e.sel.primary(),t,n,o)],0),i)}function tr(e,t,n){for(var i=[],o=e.cm&&(e.cm.display.shift||e.extend),r=0;r<e.sel.ranges.length;r++)i[r]=Zo(e.sel.ranges[r],t[r],null,o);rr(e,jo(e.cm,i,e.sel.primIndex),n)}function nr(e,t,n,i){var o=e.sel.ranges.slice(0);o[t]=n,rr(e,jo(e.cm,o,e.sel.primIndex),i)}function ir(e,t,n,i){rr(e,Mo(t,n),i)}function or(e,t,n){var i=e.history.done,o=Z(i);o&&o.ranges?(i[i.length-1]=t,ar(e,t,n)):rr(e,t,n)}function rr(e,t,n){ar(e,t,n),Go(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ar(e,t,n){(xe(e,"beforeSelectionChange")||e.cm&&xe(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var i={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Eo(ft(e,t[n].anchor),ft(e,t[n].head))},origin:n&&n.origin};return ye(e,"beforeSelectionChange",e,i),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?jo(e.cm,i.ranges,i.ranges.length-1):t}(e,t,n));var i=n&&n.bias||(at(t.primary().head,e.sel.primary().head)<0?-1:1);sr(e,cr(e,t,i,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Ri(e.cm)}function sr(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,we(e.cm)),pn(e,"cursorActivity",e))}function lr(e){sr(e,cr(e,e.sel,null,!1))}function cr(e,t,n,i){for(var o,r=0;r<t.ranges.length;r++){var a=t.ranges[r],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[r],l=dr(e,a.anchor,s&&s.anchor,n,i),c=a.head==a.anchor?l:dr(e,a.head,s&&s.head,n,i);(o||l!=a.anchor||c!=a.head)&&(o||(o=t.ranges.slice(0,r)),o[r]=new Eo(l,c))}return o?jo(e.cm,o,t.primIndex):t}function ur(e,t,n,i,o){var r=Ye(e,t.line);if(r.markedSpans)for(var a=0;a<r.markedSpans.length;++a){var s=r.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(o&&(ye(l,"beforeCursorEnter"),l.explicitlyCleared)){if(r.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(i<0?1:-1),f=void 0;if((i<0?u:c)&&(d=fr(e,d,-i,d&&d.line==t.line?r:null)),d&&d.line==t.line&&(f=at(d,n))&&(i<0?f<0:f>0))return ur(e,d,t,i,o)}var p=l.find(i<0?-1:1);return(i<0?c:u)&&(p=fr(e,p,i,p.line==t.line?r:null)),p?ur(e,p,t,i,o):null}}return t}function dr(e,t,n,i,o){var r=i||1,a=ur(e,t,n,r,o)||!o&&ur(e,t,n,r,!0)||ur(e,t,n,-r,o)||!o&&ur(e,t,n,-r,!0);return a||(e.cantEdit=!0,rt(e.first,0))}function fr(e,t,n,i){return n<0&&0==t.ch?t.line>e.first?ft(e,rt(t.line-1)):null:n>0&&t.ch==(i||Ye(e,t.line)).text.length?t.line<e.first+e.size-1?rt(t.line+1,0):null:new rt(t.line,t.ch+n)}function pr(e){e.setSelection(rt(e.firstLine(),0),rt(e.lastLine()),G)}function mr(e,t,n){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(t,n,o,r){t&&(i.from=ft(e,t)),n&&(i.to=ft(e,n)),o&&(i.text=o),void 0!==r&&(i.origin=r)}),ye(e,"beforeChange",e,i),e.cm&&ye(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function hr(e,t,n){if(e.cm){if(!e.cm.curOp)return ro(e.cm,hr)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"))||(t=mr(e,t,!0))){var i=St&&!n&&function(e,t,n){var i=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||i&&-1!=U(i,n)||(i||(i=[])).push(n)}})),!i)return null;for(var o=[{from:t,to:n}],r=0;r<i.length;++r)for(var a=i[r],s=a.find(0),l=0;l<o.length;++l){var c=o[l];if(!(at(c.to,s.from)<0||at(c.from,s.to)>0)){var u=[l,1],d=at(c.from,s.from),f=at(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),o.splice.apply(o,u),l+=u.length-3}}return o}(e,t.from,t.to);if(i)for(var o=i.length-1;o>=0;--o)gr(e,{from:i[o].from,to:i[o].to,text:o?[""]:t.text,origin:t.origin});else gr(e,t)}}function gr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=at(t.from,t.to)){var n=Io(e,t);Ho(e,t,n,e.cm?e.cm.curOp.id:NaN),yr(e,t,n,Mt(e,t));var i=[];Wo(e,(function(e,n){n||-1!=U(i,e.history)||(kr(e.history,t),i.push(e.history)),yr(e,t,null,Mt(e,t))}))}}function br(e,t,n){var i=e.cm&&e.cm.state.suppressEdits;if(!i||n){for(var o,r=e.history,a=e.sel,s="undo"==t?r.done:r.undone,l="undo"==t?r.undone:r.done,c=0;c<s.length&&(o=s[c],n?!o.ranges||o.equals(e.sel):o.ranges);c++);if(c!=s.length){for(r.lastOrigin=r.lastSelOrigin=null;;){if(!(o=s.pop()).ranges){if(i)return void s.push(o);break}if(qo(o,l),n&&!o.equals(e.sel))return void rr(e,o,{clearRedo:!1});a=o}var u=[];qo(a,l),l.push({changes:u,generation:r.generation}),r.generation=o.generation||++r.maxGeneration;for(var d=xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"),f=function(n){var i=o.changes[n];if(i.origin=t,d&&!mr(e,i,!1))return s.length=0,{};u.push(Ko(e,i));var r=n?Io(e,i):Z(s);yr(e,i,r,Yo(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Fo(i)});var a=[];Wo(e,(function(e,t){t||-1!=U(a,e.history)||(kr(e.history,i),a.push(e.history)),yr(e,i,null,Yo(e,i))}))},p=o.changes.length-1;p>=0;--p){var m=f(p);if(m)return m.v}}}}function vr(e,t){if(0!=t&&(e.first+=t,e.sel=new Po(ee(e.sel.ranges,(function(e){return new Eo(rt(e.anchor.line+t,e.anchor.ch),rt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){gi(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;i<n.viewTo;i++)bi(e.cm,i,"gutter")}}function yr(e,t,n,i){if(e.cm&&!e.cm.curOp)return ro(e.cm,yr)(e,t,n,i);if(t.to.line<e.first)vr(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);vr(e,o),t={from:rt(e.first,0),to:rt(t.to.line+o,t.to.ch),text:[Z(t.text)],origin:t.origin}}var r=e.lastLine();t.to.line>r&&(t={from:t.from,to:rt(r,Ye(e,r).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qe(e,t.from,t.to),n||(n=Io(e,t)),e.cm?function(e,t,n){var i=e.doc,o=e.display,r=t.from,a=t.to,s=!1,l=r.line;e.options.lineWrapping||(l=tt(Bt(Ye(i,r.line))),i.iter(l,a.line+1,(function(e){if(e==o.maxLine)return s=!0,!0}))),i.sel.contains(t.from,t.to)>-1&&we(e),No(i,t,n,fi(e)),e.options.lineWrapping||(i.iter(l,r.line+t.text.length,(function(e){var t=Xt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,i=t-1;i>n;i--){var o=Ye(e,i).stateAfter;if(o&&(!(o instanceof mt)||i+o.lookAhead<t)){n=i+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(i,r.line),lo(e,400);var c=t.text.length-(a.line-r.line)-1;t.full?gi(e):r.line!=a.line||1!=t.text.length||Lo(e.doc,t)?gi(e,r.line,a.line+1,c):bi(e,r.line,"text");var u=xe(e,"changes"),d=xe(e,"change");if(d||u){var f={from:r,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&pn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,i):No(e,t,i),ar(e,n,G),e.cantEdit&&dr(e,rt(e.firstLine(),0))&&(e.cantEdit=!1)}}function _r(e,t,n,i,o){var r;i||(i=n),at(i,n)<0&&(n=(r=[i,n])[0],i=r[1]),"string"==typeof t&&(t=e.splitLines(t)),hr(e,{from:n,to:i,text:t,origin:o})}function wr(e,t,n,i){n<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function xr(e,t,n,i){for(var o=0;o<e.length;++o){var r=e[o],a=!0;if(r.ranges){r.copied||((r=e[o]=r.deepCopy()).copied=!0);for(var s=0;s<r.ranges.length;s++)wr(r.ranges[s].anchor,t,n,i),wr(r.ranges[s].head,t,n,i)}else{for(var l=0;l<r.changes.length;++l){var c=r.changes[l];if(n<c.from.line)c.from=rt(c.from.line+i,c.from.ch),c.to=rt(c.to.line+i,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function kr(e,t){var n=t.from.line,i=t.to.line,o=t.text.length-(i-n)-1;xr(e.done,n,i,o),xr(e.undone,n,i,o)}function Or(e,t,n,i){var o=t,r=t;return"number"==typeof t?r=Ye(e,dt(e,t)):o=tt(t),null==o?null:(i(r,o)&&e.cm&&bi(e.cm,o,n),r)}function Cr(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function Sr(e){this.children=e;for(var t=0,n=0,i=0;i<e.length;++i){var o=e[i];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}Eo.prototype.from=function(){return ut(this.anchor,this.head)},Eo.prototype.to=function(){return ct(this.anchor,this.head)},Eo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Cr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,i=e+t;n<i;++n){var o=this.lines[n];this.height-=o.height,Qt(o),pn(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,n){for(var i=e+t;e<i;++e)if(n(this.lines[e]))return!0}},Sr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var r=Math.min(t,o-e),a=i.height;if(i.removeInner(e,r),this.height-=a-i.height,o==r&&(this.children.splice(n--,1),i.parent=null),0==(t-=r))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Cr))){var s=[];this.collapse(s),this.children=[new Cr(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var i=0;i<this.children.length;++i){var o=this.children[i],r=o.chunkSize();if(e<=r){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,s=a;s<o.lines.length;){var l=new Cr(o.lines.slice(s,s+=25));o.height-=l.height,this.children.splice(++i,0,l),l.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=r}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Sr(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=U(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var i=new Sr(e.children);i.parent=e,e.children=[i,t],e=i}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;i<this.children.length;++i){var o=this.children[i],r=o.chunkSize();if(e<r){var a=Math.min(t,r-e);if(o.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=r}}};var Dr=function(e,t,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=e,this.node=t};function Pr(e,t,n){qt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&$i(e,n)}Dr.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,i=tt(n);if(null!=i&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var r=Sn(this);et(n,Math.max(0,n.height-r)),e&&(oo(e,(function(){Pr(e,n,-r),bi(e,i,"widget")})),pn(e,"lineWidgetCleared",e,this,i))}},Dr.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,i=this.line;this.height=null;var o=Sn(this)-t;o&&(Ht(this.doc,i)||et(i,i.height+o),n&&oo(n,(function(){n.curOp.forceUpdate=!0,Pr(n,i,o),pn(n,"lineWidgetChanged",n,e,tt(i))})))},ke(Dr);var Er=0,jr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Er};function Mr(e,t,n,i,o){if(i&&i.shared)return function(e,t,n,i,o){(i=z(i)).shared=!1;var r=[Mr(e,t,n,i,o)],a=r[0],s=i.widgetNode;return Wo(e,(function(e){s&&(i.widgetNode=s.cloneNode(!0)),r.push(Mr(e,ft(e,t),ft(e,n),i,o));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=Z(r)})),new Fr(r,a)}(e,t,n,i,o);if(e.cm&&!e.cm.curOp)return ro(e.cm,Mr)(e,t,n,i,o);var r=new jr(e,o),a=at(t,n);if(i&&z(i,r,!1),a>0||0==a&&!1!==r.clearWhenEmpty)return r;if(r.replacedWith&&(r.collapsed=!0,r.widgetNode=M("span",[r.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||r.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(r.widgetNode.insertLeft=!0)),r.collapsed){if(zt(e,t.line,t,n,r)||t.line!=n.line&&zt(e,n.line,t,n,r))throw new Error("Inserting collapsed marker partially overlapping an existing one");Dt=!0}r.addToHistory&&Ho(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(i){c&&r.collapsed&&!c.options.lineWrapping&&Bt(i)==c.display.maxLine&&(s=!0),r.collapsed&&l!=t.line&&et(i,0),function(e,t,n){var i=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));i&&e.markedSpans&&i.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],i&&i.add(e.markedSpans)),t.marker.attachLine(e)}(i,new Pt(r,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),r.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&et(t,0)})),r.clearOnEnter&&ge(r,"beforeCursorEnter",(function(){return r.clear()})),r.readOnly&&(St=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),r.collapsed&&(r.id=++Er,r.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),r.collapsed)gi(c,t.line,n.line+1);else if(r.className||r.startStyle||r.endStyle||r.css||r.attributes||r.title)for(var u=t.line;u<=n.line;u++)bi(c,u,"text");r.atomic&&lr(c.doc),pn(c,"markerAdded",c,r)}return r}jr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Yi(e),xe(this,"clear")){var n=this.find();n&&pn(this,"clear",n.from,n.to)}for(var i=null,o=null,r=0;r<this.lines.length;++r){var a=this.lines[r],s=Et(a.markedSpans,this);e&&!this.collapsed?bi(e,tt(a),"text"):e&&(null!=s.to&&(o=tt(a)),null!=s.from&&(i=tt(a))),a.markedSpans=jt(a.markedSpans,s),null==s.from&&this.collapsed&&!Ht(this.doc,a)&&e&&et(a,li(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Bt(this.lines[l]),u=Xt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&gi(e,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&lr(e.doc)),e&&pn(e,"markerCleared",e,this,i,o),t&&Qi(e),this.parent&&this.parent.clear()}},jr.prototype.find=function(e,t){var n,i;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var r=this.lines[o],a=Et(r.markedSpans,this);if(null!=a.from&&(n=rt(t?r:tt(r),a.from),-1==e))return n;if(null!=a.to&&(i=rt(t?r:tt(r),a.to),1==e))return i}return n&&{from:n,to:i}},jr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,i=this.doc.cm;t&&i&&oo(i,(function(){var o=t.line,r=tt(t.line),a=Rn(i,r);if(a&&(Bn(a),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!Ht(n.doc,o)&&null!=n.height){var s=n.height;n.height=null;var l=Sn(n)-s;l&&et(o,o.height+l)}pn(i,"markerChanged",i,e)}))},jr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=U(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},jr.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ke(jr);var Fr=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Tr(e){return e.findMarks(rt(e.first,0),e.clipPos(rt(e.lastLine())),(function(e){return e.parent}))}function Ir(e){for(var t=function(t){var n=e[t],i=[n.primary.doc];Wo(n.primary.doc,(function(e){return i.push(e)}));for(var o=0;o<n.markers.length;o++){var r=n.markers[o];-1==U(i,r.doc)&&(r.parent=null,n.markers.splice(o--,1))}},n=0;n<e.length;n++)t(n)}Fr.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();pn(this,"clear")}},Fr.prototype.find=function(e,t){return this.primary.find(e,t)},ke(Fr);var $r=0,Rr=function(e,t,n,i,o){if(!(this instanceof Rr))return new Rr(e,t,n,i,o);null==n&&(n=0),Sr.call(this,[new Cr([new Yt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var r=rt(n,0);this.sel=Mo(r),this.history=new Bo(null),this.id=++$r,this.modeOption=t,this.lineSep=i,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),No(this,{from:r,to:r,text:e}),rr(this,Mo(r),G)};Rr.prototype=ne(Sr.prototype,{constructor:Rr,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,i=0;i<t.length;++i)n+=t[i].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ze(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:so((function(e){var t=rt(this.first,0),n=this.first+this.size-1;hr(this,{from:t,to:rt(n,Ye(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ai(this.cm,0,0),rr(this,Mo(t),G)})),replaceRange:function(e,t,n,i){_r(this,e,t=ft(this,t),n=n?ft(this,n):t,i)},getRange:function(e,t,n){var i=Qe(this,ft(this,e),ft(this,t));return!1===n?i:""===n?i.join(""):i.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(it(this,e))return Ye(this,e)},getLineNumber:function(e){return tt(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ye(this,e)),Bt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ft(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:so((function(e,t,n){ir(this,ft(this,"number"==typeof e?rt(e,t||0):e),null,n)})),setSelection:so((function(e,t,n){ir(this,ft(this,e),ft(this,t||e),n)})),extendSelection:so((function(e,t,n){er(this,ft(this,e),t&&ft(this,t),n)})),extendSelections:so((function(e,t){tr(this,pt(this,e),t)})),extendSelectionsBy:so((function(e,t){tr(this,pt(this,ee(this.sel.ranges,e)),t)})),setSelections:so((function(e,t,n){if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new Eo(ft(this,e[o].anchor),ft(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),rr(this,jo(this.cm,i,t),n)}})),addSelection:so((function(e,t,n){var i=this.sel.ranges.slice(0);i.push(new Eo(ft(this,e),ft(this,t||e))),rr(this,jo(this.cm,i,i.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,i=0;i<n.length;i++){var o=Qe(this,n[i].from(),n[i].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=Qe(this,n[i].from(),n[i].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[i]=o}return t},replaceSelection:function(e,t,n){for(var i=[],o=0;o<this.sel.ranges.length;o++)i[o]=e;this.replaceSelections(i,t,n||"+input")},replaceSelections:so((function(e,t,n){for(var i=[],o=this.sel,r=0;r<o.ranges.length;r++){var a=o.ranges[r];i[r]={from:a.from(),to:a.to(),text:this.splitLines(e[r]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var i=[],o=rt(e.first,0),r=o,a=0;a<t.length;a++){var s=t[a],l=$o(s.from,o,r),c=$o(Fo(s),o,r);if(o=s.to,r=c,"around"==n){var u=e.sel.ranges[a],d=at(u.head,u.anchor)<0;i[a]=new Eo(d?c:l,d?l:c)}else i[a]=new Eo(l,l)}return new Po(i,e.sel.primIndex)}(this,i,t),l=i.length-1;l>=0;l--)hr(this,i[l]);s?or(this,s):this.cm&&Ri(this.cm)})),undo:so((function(){br(this,"undo")})),redo:so((function(){br(this,"redo")})),undoSelection:so((function(){br(this,"undo",!0)})),redoSelection:so((function(){br(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Bo(this.history),Wo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Qo(this.history.done),undone:Qo(this.history.undone)}},setHistory:function(e){var t=this.history=new Bo(this.history);t.done=Qo(e.done.slice(0),null,!0),t.undone=Qo(e.undone.slice(0),null,!0)},setGutterMarker:so((function(e,t,n){return Or(this,e,"gutter",(function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=n,!n&&ae(i)&&(e.gutterMarkers=null),!0}))})),clearGutter:so((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Or(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,ae(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!it(this,e))return null;if(t=e,!(e=Ye(this,e)))return null}else if(null==(t=tt(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:so((function(e,t,n){return Or(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[i]){if(C(n).test(e[i]))return!1;e[i]+=" "+n}else e[i]=n;return!0}))})),removeLineClass:so((function(e,t,n){return Or(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[i];if(!o)return!1;if(null==n)e[i]=null;else{var r=o.match(C(n));if(!r)return!1;var a=r.index+r[0].length;e[i]=o.slice(0,r.index)+(r.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0}))})),addLineWidget:so((function(e,t,n){return function(e,t,n,i){var o=new Dr(e,n,i),r=e.cm;return r&&o.noHScroll&&(r.display.alignWidgets=!0),Or(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length,Math.max(0,o.insertAt)),0,o),o.line=t,r&&!Ht(e,t)){var i=qt(t)<e.scrollTop;et(t,t.height+Sn(o)),i&&$i(r,o.height),r.curOp.forceUpdate=!0}return!0})),r&&pn(r,"lineWidgetAdded",r,o,"number"==typeof t?t:tt(t)),o}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Mr(this,ft(this,e),ft(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Mr(this,e=ft(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ye(this,(e=ft(this,e)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=ft(this,e),t=ft(this,t);var i=[],o=e.line;return this.iter(e.line,t.line+1,(function(r){var a=r.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&o==e.line&&e.ch>=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++o})),i},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&e.push(n[i].marker)})),e},posFromIndex:function(e){var t,n=this.first,i=this.lineSeparator().length;return this.iter((function(o){var r=o.text.length+i;if(r>e)return t=e,!0;e-=r,++n})),ft(this,rt(n,t))},indexFromPos:function(e){var t=(e=ft(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Rr(Ze(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var i=new Rr(Ze(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var i=t[n],o=i.find(),r=e.clipPos(o.from),a=e.clipPos(o.to);if(at(r,a)){var s=Mr(e,r,a,i.primary,i.primary.type);i.markers.push(s),s.parent=i}}}(i,Tr(this)),i},unlinkDoc:function(e){if(e instanceof Fa&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ir(Tr(this));break}if(e.history==this.history){var n=[e.id];Wo(e,(function(e){return n.push(e.id)}),!0),e.history=new Bo(null),e.history.done=Qo(this.history.done,n),e.history.undone=Qo(this.history.undone,n)}},iterLinkedDocs:function(e){Wo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Re(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:so((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&oo(t=this.cm,(function(){zo(t),gi(t)})))}))}),Rr.prototype.eachLine=Rr.prototype.iter;var Ar=0;function Lr(e){var t=this;if(Nr(t),!_e(t,e)&&!Dn(t.display,e)){Oe(e),a&&(Ar=+new Date);var n=mi(t,e,!0),i=e.dataTransfer.files;if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var o=i.length,r=Array(o),s=0,l=function(){++s==o&&ro(t,(function(){var e={from:n=ft(t.doc,n),to:n,text:t.doc.splitLines(r.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};hr(t.doc,e),or(t.doc,Mo(ft(t.doc,n),ft(t.doc,Fo(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))l();else{var i=new FileReader;i.onerror=function(){return l()},i.onload=function(){var e=i.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(r[n]=e),l()},i.readAsText(e)}},u=0;u<i.length;u++)c(i[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),ar(t.doc,Mo(n,n)),f)for(var p=0;p<f.length;++p)_r(t.doc,"",f[p].anchor,f[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Nr(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Wr(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<t.length;i++){var o=t[i].CodeMirror;o&&n.push(o)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Vr=!1;function zr(){var e;Vr||(ge(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Wr(Br)}),100))})),ge(window,"blur",(function(){return Wr(ji)})),Vr=!0)}function Br(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Kr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ur=0;Ur<10;Ur++)Kr[Ur+48]=Kr[Ur+96]=String(Ur);for(var Hr=65;Hr<=90;Hr++)Kr[Hr]=String.fromCharCode(Hr);for(var Gr=1;Gr<=12;Gr++)Kr[Gr+111]=Kr[Gr+63235]="F"+Gr;var qr={};function Xr(e){var t,n,i,o,r=e.split(/-(?!$)/);e=r[r.length-1];for(var a=0;a<r.length-1;a++){var s=r[a];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Jr(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete e[n];continue}for(var o=ee(n.split(" "),Xr),r=0;r<o.length;r++){var a=void 0,s=void 0;r==o.length-1?(s=o.join(" "),a=i):(s=o.slice(0,r+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Yr(e,t,n,i){var o=(t=ta(t)).call?t.call(e,i):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Yr(e,t.fallthrough,n,i);for(var r=0;r<t.fallthrough.length;r++){var a=Yr(e,t.fallthrough[r],n,i);if(a)return a}}}function Qr(e){var t="string"==typeof e?e:Kr[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Zr(e,t,n){var i=e;return t.altKey&&"Alt"!=i&&(e="Alt-"+e),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=i&&(e="Ctrl-"+e),(k?t.ctrlKey:t.metaKey)&&"Mod"!=i&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=i&&(e="Shift-"+e),e}function ea(e,t){if(f&&34==e.keyCode&&e.char)return!1;var n=Kr[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Zr(n,e,t))}function ta(e){return"string"==typeof e?qr[e]:e}function na(e,t){for(var n=e.doc.sel.ranges,i=[],o=0;o<n.length;o++){for(var r=t(n[o]);i.length&&at(r.from,Z(i).to)<=0;){var a=i.pop();if(at(a.from,r.from)<0){r.from=a.from;break}}i.push(r)}oo(e,(function(){for(var t=i.length-1;t>=0;t--)_r(e.doc,"",i[t].from,i[t].to,"+delete");Ri(e)}))}function ia(e,t,n){var i=ce(e.text,t+n,n);return i<0||i>e.text.length?null:i}function oa(e,t,n){var i=ia(e,t.ch,n);return null==i?null:new rt(t.line,i,n<0?"after":"before")}function ra(e,t,n,i,o){if(e){"rtl"==t.doc.direction&&(o=-o);var r=me(n,t.doc.direction);if(r){var a,s=o<0?Z(r):r[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=An(t,n);a=o<0?n.text.length-1:0;var u=Ln(t,c,a).top;a=ue((function(e){return Ln(t,c,e).top==u}),o<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=ia(n,a,1))}else a=o<0?s.to:s.from;return new rt(i,a,l)}}return new rt(i,o<0?n.text.length:0,o<0?"before":"after")}qr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},qr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},qr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},qr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},qr.default=y?qr.macDefault:qr.pcDefault;var aa={selectAll:pr,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),G)},killLine:function(e){return na(e,(function(t){if(t.empty()){var n=Ye(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:rt(t.head.line+1,0)}:{from:t.head,to:rt(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return na(e,(function(t){return{from:rt(t.from().line,0),to:ft(e.doc,rt(t.to().line+1,0))}}))},delLineLeft:function(e){return na(e,(function(e){return{from:rt(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return na(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return na(e,(function(t){var n=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:i}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(rt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(rt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return sa(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return la(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ye(e.doc,t),i=function(e){for(var t;t=Wt(e);)e=t.find(1,!0).line;return e}(n);return i!=n&&(t=tt(i)),ra(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),X)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),X)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:n},"div");return i.ch<e.getLine(i.line).search(/\S/)?la(e,t.head):i}),X)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),i=e.options.tabSize,o=0;o<n.length;o++){var r=n[o].from(),a=B(e.getLine(r.line),r.ch,i);t.push(Q(i-a%i))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return oo(e,(function(){for(var t=e.listSelections(),n=[],i=0;i<t.length;i++)if(t[i].empty()){var o=t[i].head,r=Ye(e.doc,o.line).text;if(r)if(o.ch==r.length&&(o=new rt(o.line,o.ch-1)),o.ch>0)o=new rt(o.line,o.ch+1),e.replaceRange(r.charAt(o.ch-1)+r.charAt(o.ch-2),rt(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Ye(e.doc,o.line-1).text;a&&(o=new rt(o.line,1),e.replaceRange(r.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),rt(o.line-1,a.length-1),o,"+transpose"))}n.push(new Eo(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return oo(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var i=0;i<t.length;i++)e.indentLine(t[i].from().line,null,!0);Ri(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function sa(e,t){var n=Ye(e.doc,t),i=Bt(n);return i!=n&&(t=tt(i)),ra(!0,e,i,t,1)}function la(e,t){var n=sa(e,t.line),i=Ye(e.doc,n.line),o=me(i,e.doc.direction);if(!o||0==o[0].level){var r=Math.max(n.ch,i.text.search(/\S/)),a=t.line==n.line&&t.ch<=r&&t.ch;return rt(n.line,a?0:r,n.sticky)}return n}function ca(e,t,n){if("string"==typeof t&&!(t=aa[t]))return!1;e.display.input.ensurePolled();var i=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=H}finally{e.display.shift=i,e.state.suppressEdits=!1}return o}var ua=new K;function da(e,t,n,i){var o=e.state.keySeq;if(o){if(Qr(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ua.set(50,(function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())})),fa(e,o+" "+t,n,i))return!0}return fa(e,t,n,i)}function fa(e,t,n,i){var o=function(e,t,n){for(var i=0;i<e.state.keyMaps.length;i++){var o=Yr(t,e.state.keyMaps[i],n,e);if(o)return o}return e.options.extraKeys&&Yr(t,e.options.extraKeys,n,e)||Yr(t,e.options.keyMap,n,e)}(e,t,i);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&pn(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(Oe(n),Si(e)),!!o}function pa(e,t){var n=ea(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?da(e,"Shift-"+n,t,(function(t){return ca(e,t,!0)}))||da(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ca(e,t)})):da(e,n,t,(function(t){return ca(e,t)})))}var ma=null;function ha(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=T(L(t)),_e(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=16==i||e.shiftKey;var o=pa(t,e);f&&(ma=o?i:null,o||88!=i||Le||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!o&&46==i&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=i||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(D(t,"CodeMirror-crosshair"),ve(document,"keyup",n),ve(document,"mouseover",n))}I(t,"CodeMirror-crosshair"),ge(document,"keyup",n),ge(document,"mouseover",n)}(t)}}function ga(e){16==e.keyCode&&(this.doc.sel.shift=!1),_e(this,e)}function ba(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Dn(t.display,e)||_e(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,i=e.charCode;if(f&&n==ma)return ma=null,void Oe(e);if(!f||e.which&&!(e.which<10)||!pa(t,e)){var o=String.fromCharCode(null==i?n:i);"\b"!=o&&(function(e,t,n){return da(e,"'"+n+"'",t,(function(t){return ca(e,t,!0)}))}(t,e,o)||t.display.input.onKeyPress(e))}}}var va,ya,_a=function(e,t,n){this.time=e,this.pos=t,this.button=n};function wa(e){var t=this,n=t.display;if(!(_e(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Dn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Oa(t,e)){var i=mi(t,e),o=Ee(e),r=i?function(e,t){var n=+new Date;return ya&&ya.compare(n,e,t)?(va=ya=null,"triple"):va&&va.compare(n,e,t)?(ya=new _a(n,e,t),va=null,"double"):(va=new _a(n,e,t),ya=null,"single")}(i,o):"single";W(t).focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),i&&function(e,t,n,i,o){var r="Click";return"double"==i?r="Double"+r:"triple"==i&&(r="Triple"+r),da(e,Zr(r=(1==t?"Left":2==t?"Middle":"Right")+r,o),o,(function(t){if("string"==typeof t&&(t=aa[t]),!t)return!1;var i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i=t(e,n)!=H}finally{e.state.suppressEdits=!1}return i}))}(t,o,i,r,e)||(1==o?i?function(e,t,n,i){a?setTimeout(V(Di,e),0):e.curOp.focus=T(L(e));var o,r=function(e,t,n){var i=e.getOption("configureMouse"),o=i?i(e,t,n):{};if(null==o.unit){var r=_?n.shiftKey&&n.metaKey:n.altKey;o.unit=r?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=y?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(y?n.altKey:n.ctrlKey)),o}(e,n,i),c=e.doc.sel;e.options.dragDrop&&Fe&&!e.isReadOnly()&&"single"==n&&(o=c.contains(t))>-1&&(at((o=c.ranges[o]).from(),t)<0||t.xRel>0)&&(at(o.to(),t)>0||t.xRel<0)?function(e,t,n,i){var o=e.display,r=!1,c=ro(e,(function(t){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Pi(e)),ve(o.wrapper.ownerDocument,"mouseup",c),ve(o.wrapper.ownerDocument,"mousemove",u),ve(o.scroller,"dragstart",d),ve(o.scroller,"drop",c),r||(Oe(t),i.addNew||er(e.doc,n,null,null,i.extend),l&&!p||a&&9==s?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),u=function(e){r=r||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return r=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!i.moveOnDrag,ge(o.wrapper.ownerDocument,"mouseup",c),ge(o.wrapper.ownerDocument,"mousemove",u),ge(o.scroller,"dragstart",d),ge(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,i,t,r):function(e,t,n,i){a&&Pi(e);var o=e.display,r=e.doc;Oe(t);var s,l,c=r.sel,u=c.ranges;if(i.addNew&&!i.extend?(l=r.sel.contains(n),s=l>-1?u[l]:new Eo(n,n)):(s=r.sel.primary(),l=r.sel.primIndex),"rectangle"==i.unit)i.addNew||(s=new Eo(n,n)),n=mi(e,t,!0,!0),l=-1;else{var d=xa(e,n,i.unit);s=i.extend?Zo(s,d.anchor,d.head,i.extend):d}i.addNew?-1==l?(l=u.length,rr(r,jo(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==i.unit&&!i.extend?(rr(r,jo(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=r.sel):nr(r,l,s,q):(l=0,rr(r,new Po([s],0),q),c=r.sel);var f=n;function p(t){if(0!=at(f,t))if(f=t,"rectangle"==i.unit){for(var o=[],a=e.options.tabSize,u=B(Ye(r,n.line).text,n.ch,a),d=B(Ye(r,t.line).text,t.ch,a),p=Math.min(u,d),m=Math.max(u,d),h=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));h<=g;h++){var b=Ye(r,h).text,v=J(b,p,a);p==m?o.push(new Eo(rt(h,v),rt(h,v))):b.length>v&&o.push(new Eo(rt(h,v),rt(h,J(b,m,a))))}o.length||o.push(new Eo(n,n)),rr(r,jo(e,c.ranges.slice(0,l).concat(o),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,_=s,w=xa(e,t,i.unit),x=_.anchor;at(w.anchor,x)>0?(y=w.head,x=ut(_.from(),w.anchor)):(y=w.anchor,x=ct(_.to(),w.head));var k=c.ranges.slice(0);k[l]=function(e,t){var n=t.anchor,i=t.head,o=Ye(e.doc,n.line);if(0==at(n,i)&&n.sticky==i.sticky)return t;var r=me(o);if(!r)return t;var a=fe(r,n.ch,n.sticky),s=r[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==r.length)return t;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=fe(r,i.ch,i.sticky),d=u-a||(i.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=r[c+(l?-1:0)],p=l==(1==f.level),m=p?f.from:f.to,h=p?"after":"before";return n.ch==m&&n.sticky==h?t:new Eo(new rt(n.line,m,h),i)}(e,new Eo(ft(r,x),y)),rr(r,jo(e,k,l),q)}}var m=o.wrapper.getBoundingClientRect(),h=0;function g(t){e.state.selectingText=!1,h=1/0,t&&(Oe(t),o.input.focus()),ve(o.wrapper.ownerDocument,"mousemove",b),ve(o.wrapper.ownerDocument,"mouseup",v),r.history.lastSelOrigin=null}var b=ro(e,(function(t){0!==t.buttons&&Ee(t)?function t(n){var a=++h,s=mi(e,n,!0,"rectangle"==i.unit);if(s)if(0!=at(s,f)){e.curOp.focus=T(L(e)),p(s);var l=Ti(o,r);(s.line>=l.to||s.line<l.from)&&setTimeout(ro(e,(function(){h==a&&t(n)})),150)}else{var c=n.clientY<m.top?-20:n.clientY>m.bottom?20:0;c&&setTimeout(ro(e,(function(){h==a&&(o.scroller.scrollTop+=c,t(n))})),50)}}(t):g(t)})),v=ro(e,g);e.state.selectingText=v,ge(o.wrapper.ownerDocument,"mousemove",b),ge(o.wrapper.ownerDocument,"mouseup",v)}(e,i,t,r)}(t,i,r,e):Pe(e)==n.scroller&&Oe(e):2==o?(i&&er(t.doc,i),setTimeout((function(){return n.input.focus()}),20)):3==o&&(O?t.display.input.onContextMenu(e):Pi(t)))}}function xa(e,t,n){if("char"==n)return new Eo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Eo(rt(t.line,0),ft(e.doc,rt(t.line+1,0)));var i=n(e,t);return new Eo(i.from,i.to)}function ka(e,t,n,i){var o,r;if(t.touches)o=t.touches[0].clientX,r=t.touches[0].clientY;else try{o=t.clientX,r=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Oe(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(r>s.bottom||!xe(e,n))return Se(t);r-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=o)return ye(e,n,e,nt(e.doc,r),e.display.gutterSpecs[l].className,t),Se(t)}}function Oa(e,t){return ka(e,t,"gutterClick",!0)}function Ca(e,t){Dn(e.display,t)||function(e,t){return!!xe(e,"gutterContextMenu")&&ka(e,t,"gutterContextMenu",!1)}(e,t)||_e(e,t,"contextmenu")||O||e.display.input.onContextMenu(t)}function Sa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}_a.prototype.compare=function(e,t,n){return this.time+400>e&&0==at(t,this.pos)&&n==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Pa={},Ea={};function ja(e,t,n){if(!t!=!(n&&n!=Da)){var i=e.display.dragFunctions,o=t?ge:ve;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Ma(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(D(e.display.wrapper,"CodeMirror-wrap"),Jt(e)),pi(e),gi(e),Un(e),setTimeout((function(){return Hi(e)}),100)}function Fa(e,t){var n=this;if(!(this instanceof Fa))return new Fa(e,t);this.options=t=t?z(t):{},z(Pa,t,!1);var i=t.value;"string"==typeof i?i=new Rr(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var o=new Fa.inputStyles[t.inputStyle](this),r=this.display=new xo(e,i,o,t);for(var c in r.wrapper.CodeMirror=this,Sa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Xi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new K,keySeq:null,specialChars:null},t.autofocus&&!v&&r.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;ge(t.scroller,"mousedown",ro(e,wa)),ge(t.scroller,"dblclick",a&&s<11?ro(e,(function(t){if(!_e(e,t)){var n=mi(e,t);if(n&&!Oa(e,t)&&!Dn(e.display,t)){Oe(t);var i=e.findWordAt(n);er(e.doc,i.anchor,i.head)}}})):function(t){return _e(e,t)||Oe(t)}),ge(t.scroller,"contextmenu",(function(t){return Ca(e,t)})),ge(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ca(e,n)}));var n,i={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(i=t.activeTouch).end=+new Date)}function r(e,t){if(null==t.left)return!0;var n=t.left-e.left,i=t.top-e.top;return n*n+i*i>400}ge(t.scroller,"touchstart",(function(o){if(!_e(e,o)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(o)&&!Oa(e,o)){t.input.ensurePolled(),clearTimeout(n);var r=+new Date;t.activeTouch={start:r,moved:!1,prev:r-i.end<=300?i:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),ge(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),ge(t.scroller,"touchend",(function(n){var i=t.activeTouch;if(i&&!Dn(t,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!i.prev||r(i,i.prev)?new Eo(s,s):!i.prev.prev||r(i,i.prev.prev)?e.findWordAt(s):new Eo(rt(s.line,0),ft(e.doc,rt(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Oe(n)}o()})),ge(t.scroller,"touchcancel",o),ge(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Wi(e,t.scroller.scrollTop),zi(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))})),ge(t.scroller,"mousewheel",(function(t){return Do(e,t)})),ge(t.scroller,"DOMMouseScroll",(function(t){return Do(e,t)})),ge(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){_e(e,t)||De(t)},over:function(t){_e(e,t)||(function(e,t){var n=mi(e,t);if(n){var i=document.createDocumentFragment();ki(e,n,i),e.display.dragCursor||(e.display.dragCursor=j("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,i)}}(e,t),De(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Ar<100))De(t);else if(!_e(e,t)&&!Dn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=j("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:ro(e,Lr),leave:function(t){_e(e,t)||Nr(e)}};var l=t.input.getField();ge(l,"keyup",(function(t){return ga.call(e,t)})),ge(l,"keydown",ro(e,ha)),ge(l,"keypress",ro(e,ba)),ge(l,"focus",(function(t){return Ei(e,t)})),ge(l,"blur",(function(t){return ji(e,t)}))}(this),zr(),Yi(this),this.curOp.forceUpdate=!0,Vo(this,i),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Ei(n)}),20):ji(this),Ea)Ea.hasOwnProperty(c)&&Ea[c](this,t[c],Da);vo(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ta.length;++u)Ta[u](this);Qi(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(r.lineDiv).textRendering&&(r.lineDiv.style.textRendering="auto")}Fa.defaults=Pa,Fa.optionHandlers=Ea;var Ta=[];function Ia(e,t,n,i){var o,r=e.doc;null==n&&(n="add"),"smart"==n&&(r.mode.indent?o=vt(e,t).state:n="prev");var a=e.options.tabSize,s=Ye(r,t),l=B(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(i||/\S/.test(s.text)){if("smart"==n&&((c=r.mode.indent(o,s.text.slice(u.length),s.text))==H||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>r.first?B(Ye(r,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(f<c&&(d+=Q(c-f)),d!=u)return _r(r,d,rt(t,0),rt(t,u.length),"+input"),s.stateAfter=null,!0;for(var m=0;m<r.sel.ranges.length;m++){var h=r.sel.ranges[m];if(h.head.line==t&&h.head.ch<u.length){var g=rt(t,u.length);nr(r,m,new Eo(g,g));break}}}Fa.defineInitHook=function(e){return Ta.push(e)};var $a=null;function Ra(e){$a=e}function Aa(e,t,n,i,o){var r=e.doc;e.display.shift=!1,i||(i=r.sel);var a=+new Date-200,s="paste"==o||e.state.pasteIncoming>a,l=Re(t),c=null;if(s&&i.ranges.length>1)if($a&&$a.text.join("\n")==t){if(i.ranges.length%$a.text.length==0){c=[];for(var u=0;u<$a.text.length;u++)c.push(r.splitLines($a.text[u]))}}else l.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(c=ee(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=i.ranges.length-1;f>=0;f--){var p=i.ranges[f],m=p.from(),h=p.to();p.empty()&&(n&&n>0?m=rt(m.line,m.ch-n):e.state.overwrite&&!s?h=rt(h.line,Math.min(Ye(r,h.line).text.length,h.ch+Z(l).length)):s&&$a&&$a.lineWise&&$a.text.join("\n")==l.join("\n")&&(m=h=rt(m.line,0)));var g={from:m,to:h,text:c?c[f%c.length]:l,origin:o||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};hr(e.doc,g),pn(e,"inputRead",e,g)}t&&!s&&Na(e,t),Ri(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function La(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||oo(t,(function(){return Aa(t,n,0,null,"paste")})),!0}function Na(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var o=n.ranges[i];if(!(o.head.ch>100||i&&n.ranges[i-1].head.line==o.head.line)){var r=e.getModeAt(o.head),a=!1;if(r.electricChars){for(var s=0;s<r.electricChars.length;s++)if(t.indexOf(r.electricChars.charAt(s))>-1){a=Ia(e,o.head.line,"smart");break}}else r.electricInput&&r.electricInput.test(Ye(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Ia(e,o.head.line,"smart"));a&&pn(e,"electricInput",e,o.head.line)}}}function Wa(e){for(var t=[],n=[],i=0;i<e.doc.sel.ranges.length;i++){var o=e.doc.sel.ranges[i].head.line,r={anchor:rt(o,0),head:rt(o+1,0)};n.push(r),t.push(e.getRange(r.anchor,r.head))}return{text:t,ranges:n}}function Va(e,t,n,i){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",i?"on":"off"),e.setAttribute("spellcheck",!!t)}function za(){var e=j("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=j("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),t}function Ba(e,t,n,i,o){var r=t,a=n,s=Ye(e,t.line),l=o&&"rtl"==e.direction?-n:n;function c(r){var a,c;if("codepoint"==i){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new rt(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else a=o?function(e,t,n,i){var o=me(t,e.doc.direction);if(!o)return oa(t,n,i);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var r=fe(o,n.ch,n.sticky),a=o[r];if("ltr"==e.doc.direction&&a.level%2==0&&(i>0?a.to>n.ch:a.from<n.ch))return oa(t,n,i);var s,l=function(e,n){return ia(t,e instanceof rt?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||An(e,t),ii(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==i<0,f=l(n,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var p=d?"before":"after";return new rt(n.line,f,p)}}var m=function(e,t,i){for(var r=function(e,t){return t?new rt(n.line,l(e,1),"before"):new rt(n.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],s=t>0==(1!=a.level),c=s?i.begin:l(i.end,-1);if(a.from<=c&&c<a.to)return r(c,s);if(c=s?a.from:l(a.to,-1),i.begin<=c&&c<i.end)return r(c,s)}},h=m(r+i,i,u);if(h)return h;var g=i>0?u.end:l(u.begin,-1);return null==g||i>0&&g==t.text.length||!(h=m(i>0?0:o.length-1,i,c(g)))?null:h}(e.cm,s,t,n):oa(s,t,n);if(null==a){if(r||(c=t.line+l)<e.first||c>=e.first+e.size||(t=new rt(c,t.ch,t.sticky),!(s=Ye(e,c))))return!1;t=ra(o,e.cm,s,t.line,l)}else t=a;return!0}if("char"==i||"codepoint"==i)c();else if("column"==i)c(!0);else if("word"==i||"group"==i)for(var u=null,d="group"==i,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var m=s.text.charAt(t.ch)||"\n",h=re(m,f)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||p||h||(h="s"),u&&u!=h){n<0&&(n=1,c(),t.sticky="after");break}if(h&&(u=h),n>0&&!c(!p))break}var g=dr(e,t,r,a,!0);return st(r,g)&&(g.hitSide=!0),g}function Ka(e,t,n,i){var o,r,a=e.doc,s=t.left;if("page"==i){var l=Math.min(e.display.wrapper.clientHeight,W(e).innerHeight||a(e).documentElement.clientHeight),c=Math.max(l-.5*li(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else"line"==i&&(o=n>0?t.bottom+3:t.top-3);for(;(r=ti(e,s,o)).outside;){if(n<0?o<=0:o>=a.height){r.hitSide=!0;break}o+=5*n}return r}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(e,t){var n=Rn(e,t.line);if(!n||n.hidden)return null;var i=Ye(e.doc,t.line),o=In(n,i,t.line),r=me(i,e.doc.direction),a="left";r&&(a=fe(r,t.ch)%2?"right":"left");var s=Vn(o.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ga(e,t){return t&&(e.bad=!0),e}function qa(e,t,n){var i;if(t==e.display.lineDiv){if(!(i=e.display.lineDiv.childNodes[n]))return Ga(e.clipPos(rt(e.display.viewTo-1)),!0);t=null,n=0}else for(i=t;;i=i.parentNode){if(!i||i==e.display.lineDiv)return null;if(i.parentNode&&i.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var r=e.display.view[o];if(r.node==i)return Xa(r,t,n)}}function Xa(e,t,n){var i=e.text.firstChild,o=!1;if(!t||!F(i,t))return Ga(rt(tt(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var r=e.rest?Z(e.rest):e.line;return Ga(rt(tt(r),r.text.length),o)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,i){for(var o=-1;o<(c?c.length:0);o++)for(var r=o<0?l.map:c[o],a=0;a<r.length;a+=3){var s=r[a+2];if(s==t||s==n){var u=tt(o<0?e.line:e.rest[o]),d=r[a]+i;return(i<0||s!=t)&&(d=r[a+(i?1:0)]),rt(u,d)}}}var d=u(a,s,n);if(d)return Ga(d,o);for(var f=s.nextSibling,p=a?a.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return Ga(rt(d.line,d.ch-p),o);p+=f.textContent.length}for(var m=s.previousSibling,h=n;m;m=m.previousSibling){if(d=u(m,m.firstChild,-1))return Ga(rt(d.line,d.ch+h),o);h+=m.textContent.length}}Ua.prototype.init=function(e){var t=this,n=this,i=n.cm,o=n.div=e.lineDiv;function r(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(r(e)&&!_e(i,e)){if(i.somethingSelected())Ra({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Wa(i);Ra({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation((function(){i.setSelections(t.ranges,0,G),i.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=$a.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=za(),l=s.firstChild;Va(l),i.display.lineSpace.insertBefore(s,i.display.lineSpace.firstChild),l.value=$a.text.join("\n");var c=T(N(o));R(l),setTimeout((function(){i.display.lineSpace.removeChild(s),c.focus(),c==o&&n.showPrimarySelection()}),50)}}o.contentEditable=!0,Va(o,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),ge(o,"paste",(function(e){!r(e)||_e(i,e)||La(e,i)||s<=11&&setTimeout(ro(i,(function(){return t.updateFromDOM()})),20)})),ge(o,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),ge(o,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),ge(o,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),ge(o,"touchstart",(function(){return n.forceCompositionEnd()})),ge(o,"input",(function(){t.composing||t.readFromDOMSoon()})),ge(o,"copy",a),ge(o,"cut",a)},Ua.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ua.prototype.prepareSelection=function(){var e=xi(this.cm,!1);return e.focus=T(N(this.div))==this.div,e},Ua.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ua.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ua.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),o=i.from(),r=i.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||r.line<t.display.viewFrom)e.removeAllRanges();else{var a=qa(t,e.anchorNode,e.anchorOffset),s=qa(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=at(ut(a,s),o)||0!=at(ct(a,s),r)){var l=t.display.view,c=o.line>=t.display.viewFrom&&Ha(t,o)||{node:l[0].measure.map[2],offset:0},u=r.line<t.display.viewTo&&Ha(t,r);if(!u){var d=l[l.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var p,m=e.rangeCount&&e.getRangeAt(0);try{p=S(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),m&&null==e.anchorNode?e.addRange(m):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ua.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Ua.prototype.showMultipleSelections=function(e){E(this.cm.display.cursorDiv,e.cursors),E(this.cm.display.selectionDiv,e.selection)},Ua.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ua.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return F(this.div,t)},Ua.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&T(N(this.div))==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ua.prototype.blur=function(){this.div.blur()},Ua.prototype.getField=function(){return this.div},Ua.prototype.supportsTouch=function(){return!0},Ua.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):oo(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},Ua.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ua.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(b&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=qa(t,e.anchorNode,e.anchorOffset),i=qa(t,e.focusNode,e.focusOffset);n&&i&&oo(t,(function(){rr(t.doc,Mo(n,i),G),(n.bad||i.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ua.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,i=this.cm,o=i.display,r=i.doc.sel.primary(),a=r.from(),s=r.to();if(0==a.ch&&a.line>i.firstLine()&&(a=rt(a.line-1,Ye(i.doc,a.line-1).length)),s.ch==Ye(i.doc,s.line).text.length&&s.line<i.lastLine()&&(s=rt(s.line+1,0)),a.line<o.viewFrom||s.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(e=hi(i,a.line))?(t=tt(o.view[0].line),n=o.view[0].node):(t=tt(o.view[e].line),n=o.view[e-1].node.nextSibling);var l,c,u=hi(i,s.line);if(u==o.view.length-1?(l=o.viewTo-1,c=o.lineDiv.lastChild):(l=tt(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!n)return!1;for(var d=i.doc.splitLines(function(e,t,n,i,o){var r="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(r+=s,l&&(r+=s),a=l=!1)}function u(e){e&&(c(),r+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var r,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(rt(i,0),rt(o+1,0),(g=+f,function(e){return e.id==g}));return void(p.length&&(r=p[0].find(0))&&u(Qe(e.doc,r.from,r.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var h=0;h<t.childNodes.length;h++)d(t.childNodes[h]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),m&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(t),t!=n;)t=t.nextSibling,l=!1;return r}(i,n,c,t,l)),f=Qe(i.doc,rt(t,0),rt(l,Ye(i.doc,l).text.length));d.length>1&&f.length>1;)if(Z(d)==Z(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,m=0,h=d[0],g=f[0],b=Math.min(h.length,g.length);p<b&&h.charCodeAt(p)==g.charCodeAt(p);)++p;for(var v=Z(d),y=Z(f),_=Math.min(v.length-(1==d.length?p:0),y.length-(1==f.length?p:0));m<_&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)++m;if(1==d.length&&1==f.length&&t==a.line)for(;p&&p>a.ch&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)p--,m++;d[d.length-1]=v.slice(0,v.length-m).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=rt(t,p),x=rt(l,f.length?Z(f).length-m:0);return d.length>1||d[0]||at(w,x)?(_r(i.doc,d,w,x,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||oo(this.cm,(function(){return gi(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ro(this.cm,Aa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Ja=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};Ja.prototype.init=function(e){var t=this,n=this,i=this.cm;this.createField(e);var o=this.textarea;function r(e){if(!_e(i,e)){if(i.somethingSelected())Ra({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Wa(i);Ra({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,G):(n.prevInput="",o.value=t.text.join("\n"),R(o))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(o.style.width="0px"),ge(o,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),ge(o,"paste",(function(e){_e(i,e)||La(e,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),ge(o,"cut",r),ge(o,"copy",r),ge(e.scroller,"paste",(function(t){if(!Dn(e,t)&&!_e(i,t)){if(!o.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var r=new Event("paste");r.clipboardData=t.clipboardData,o.dispatchEvent(r)}})),ge(e.lineSpace,"selectstart",(function(t){Dn(e,t)||Oe(t)})),ge(o,"compositionstart",(function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}})),ge(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ja.prototype.createField=function(e){this.wrapper=za(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Va(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Ja.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ja.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,i=xi(e);if(e.options.moveInputWithCursor){var o=Qn(e,n.sel.primary().head,"div"),r=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-r.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-r.left))}return i},Ja.prototype.showSelection=function(e){var t=this.cm.display;E(t.cursorDiv,e.cursors),E(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ja.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&R(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null));this.resetting=!1}},Ja.prototype.getField=function(){return this.textarea},Ja.prototype.supportsTouch=function(){return!1},Ja.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||T(N(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},Ja.prototype.blur=function(){this.textarea.blur()},Ja.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ja.prototype.receivedFocus=function(){this.slowPoll()},Ja.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ja.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ja.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Ae(n)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==i&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||y&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var r=o.charCodeAt(0);if(8203!=r||i||(i=""),8666==r)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,o.length);l<c&&i.charCodeAt(l)==o.charCodeAt(l);)++l;return oo(t,(function(){Aa(t,o.slice(l),i.length-l,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ja.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ja.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ja.prototype.onContextMenu=function(e){var t=this,n=t.cm,i=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var r=mi(n,e),c=i.scroller.scrollTop;if(r&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(r)&&ro(n,rr)(n.doc,Mo(r),G);var u,d=o.style.cssText,p=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=o.ownerDocument.defaultView.scrollY),i.input.focus(),l&&o.ownerDocument.defaultView.scrollTo(null,u),i.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=b,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),a&&s>=9&&g(),O){De(e);var h=function(){ve(window,"mouseup",h),setTimeout(b,20)};ge(window,"mouseup",h)}else setTimeout(b,50)}function g(){if(null!=o.selectionStart){var e=n.somethingSelected(),r=""+(e?o.value:"");o.value="⇚",o.value=r,t.prevInput=e?"":"",o.selectionStart=1,o.selectionEnd=r.length,i.selForContextMenu=n.doc.sel}}function b(){if(t.contextMenuPending==b&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=d,a&&s<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&s<9)&&g();var e=0,r=function(){i.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&""==t.prevInput?ro(n,pr)(n):e++<10?i.detectingSelectAll=setTimeout(r,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(r,200)}}},Ja.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ja.prototype.setUneditable=function(){},Ja.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,i,o,r){e.defaults[n]=i,o&&(t[n]=r?function(e,t,n){n!=Da&&o(e,t,n)}:o)}e.defineOption=n,e.Init=Da,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ro(e)}),!0),n("indentUnit",2,Ro,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Ao(e),Un(e),gi(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],i=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var r=e.text.indexOf(t,o);if(-1==r)break;o=r+t.length,n.push(rt(i,r))}i++}));for(var o=n.length-1;o>=0;o--)_r(e.doc,t,n[o],rt(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Da&&e.refresh()})),n("specialCharPlaceholder",on,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Sa(e),wo(e)}),!0),n("keyMap","default",(function(e,t,n){var i=ta(t),o=n!=Da&&ta(n);o&&o.detach&&o.detach(e,i),i.attach&&i.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ma,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=yo(t,e.options.lineNumbers),wo(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?di(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hi(e)}),!0),n("scrollbarStyle","native",(function(e){Xi(e),Hi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=yo(e.options.gutters,t),wo(e)}),!0),n("firstLineNumber",1,wo,!0),n("lineNumberFormatter",(function(e){return e}),wo,!0),n("showCursorWhenSelecting",!1,wi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(ji(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,ja),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,wi,!0),n("singleCursorHeightPerLine",!0,wi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ao,!0),n("addModeClass",!1,Ao,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Ao,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Fa),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){W(this).focus(),this.display.input.focus()},setOption:function(e,n){var i=this.options,o=i[e];i[e]==n&&"mode"!=e||(i[e]=n,t.hasOwnProperty(e)&&ro(this,t[e])(this,n,o),ye(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](ta(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ao((function(t,n){var i=t.token?t:e.getMode(this.options,t);if(i.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var i=0,o=n(t);i<e.length&&n(e[i])<=o;)i++;e.splice(i,0,t)}(this.state.overlays,{mode:i,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,gi(this)})),removeOverlay:ao((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var i=t[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return t.splice(n,1),this.state.modeGen++,void gi(this)}})),indentLine:ao((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),it(this.doc,e)&&Ia(this,e,t,n)})),indentSelection:ao((function(e){for(var t=this.doc.sel.ranges,n=-1,i=0;i<t.length;i++){var o=t[i];if(o.empty())o.head.line>n&&(Ia(this,o.head.line,e,!0),n=o.head.line,i==this.doc.sel.primIndex&&Ri(this));else{var r=o.from(),a=o.to(),s=Math.max(n,r.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Ia(this,l,e);var c=this.doc.sel.ranges;0==r.ch&&t.length==c.length&&c[i].from().ch>0&&nr(this.doc,i,new Eo(r,c[i].to()),G)}}})),getTokenAt:function(e,t){return kt(this,e,t)},getLineTokens:function(e,t){return kt(this,rt(e),t,!0)},getTokenTypeAt:function(e){e=ft(this.doc,e);var t,n=bt(this,Ye(this.doc,e.line)),i=0,o=(n.length-1)/2,r=e.ch;if(0==r)t=n[2];else for(;;){var a=i+o>>1;if((a?n[2*a-1]:0)>=r)o=a;else{if(!(n[2*a+1]<r)){t=n[2*a+2];break}i=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var i=[];if(!n.hasOwnProperty(t))return i;var o=n[t],r=this.getModeAt(e);if("string"==typeof r[t])o[r[t]]&&i.push(o[r[t]]);else if(r[t])for(var a=0;a<r[t].length;a++){var s=o[r[t][a]];s&&i.push(s)}else r.helperType&&o[r.helperType]?i.push(o[r.helperType]):o[r.name]&&i.push(o[r.name]);for(var l=0;l<o._global.length;l++){var c=o._global[l];c.pred(r,this)&&-1==U(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(e,t){var n=this.doc;return vt(this,(e=dt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Qn(this,null==e?n.head:"object"==typeof e?ft(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Yn(this,ft(this.doc,e),t||"page")},coordsChar:function(e,t){return ti(this,(e=Jn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Jn(this,{top:e,left:0},t||"page").top,nt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var i,o=!1;if("number"==typeof e){var r=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>r&&(e=r,o=!0),i=Ye(this.doc,e)}else i=e;return Xn(this,i,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-qt(i):0)},defaultTextHeight:function(){return li(this.display)},defaultCharWidth:function(){return ci(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,o){var r,a,s,l=this.display,c=(e=Qn(this,ft(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==i)c=e.top;else if("above"==i||"near"==i){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==o?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(r=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Ii(r,a)).scrollTop&&Wi(r,s.scrollTop),null!=s.scrollLeft&&zi(r,s.scrollLeft))},triggerOnKeyDown:ao(ha),triggerOnKeyPress:ao(ba),triggerOnKeyUp:ga,triggerOnMouseDown:ao(wa),execCommand:function(e){if(aa.hasOwnProperty(e))return aa[e].call(null,this)},triggerElectric:ao((function(e){Na(this,e)})),findPosH:function(e,t,n,i){var o=1;t<0&&(o=-1,t=-t);for(var r=ft(this.doc,e),a=0;a<t&&!(r=Ba(this.doc,r,o,n,i)).hitSide;++a);return r},moveH:ao((function(e,t){var n=this;this.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?Ba(n.doc,i.head,e,t,n.options.rtlMoveVisually):e<0?i.from():i.to()}),X)})),deleteH:ao((function(e,t){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):na(this,(function(n){var o=Ba(i,n.head,e,t,!1);return e<0?{from:o,to:n.head}:{from:n.head,to:o}}))})),findPosV:function(e,t,n,i){var o=1,r=i;t<0&&(o=-1,t=-t);for(var a=ft(this.doc,e),s=0;s<t;++s){var l=Qn(this,a,"div");if(null==r?r=l.left:l.left=r,(a=Ka(this,l,o,n)).hitSide)break}return a},moveV:ao((function(e,t){var n=this,i=this.doc,o=[],r=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(a){if(r)return e<0?a.from():a.to();var s=Qn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),o.push(s.left);var l=Ka(n,s,e,t);return"page"==t&&a==i.sel.primary()&&$i(n,Yn(n,l,"div").top-s.top),l}),X),o.length)for(var a=0;a<i.sel.ranges.length;a++)i.sel.ranges[a].goalColumn=o[a]})),findWordAt:function(e){var t=Ye(this.doc,e.line).text,n=e.ch,i=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=t.length||!n?++i:--n;for(var r=t.charAt(n),a=re(r,o)?function(e){return re(e,o)}:/\s/.test(r)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!re(e)};n>0&&a(t.charAt(n-1));)--n;for(;i<t.length&&a(t.charAt(i));)++i}return new Eo(rt(e.line,n),rt(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):D(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==T(L(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ao((function(e,t){Ai(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Mn(this)-this.display.barHeight,width:e.scrollWidth-Mn(this)-this.display.barWidth,clientHeight:Tn(this),clientWidth:Fn(this)}},scrollIntoView:ao((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:rt(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Li(e),e.curOp.scrollToPos=t}(this,e):Ni(this,e.from,e.to,e.margin)})),setSize:ao((function(e,t){var n=this,i=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=i(e)),null!=t&&(this.display.wrapper.style.height=i(t)),this.options.lineWrapping&&Kn(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){bi(n,o,"widget");break}++o})),this.curOp.forceUpdate=!0,ye(this,"refresh",this)})),operation:function(e){return oo(this,e)},startOperation:function(){return Yi(this)},endOperation:function(){return Qi(this)},refresh:ao((function(){var e=this.display.cachedTextHeight;gi(this),this.curOp.forceUpdate=!0,Un(this),Ai(this,this.doc.scrollLeft,this.doc.scrollTop),ho(this.display),(null==e||Math.abs(e-li(this.display))>.5||this.options.lineWrapping)&&pi(this),ye(this,"refresh",this)})),swapDoc:ao((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Vo(this,e),Un(this),this.display.input.reset(),Ai(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,pn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ke(e),e.registerHelper=function(t,i,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][i]=o},e.registerGlobalHelper=function(t,i,o,r){e.registerHelper(t,i,r),n[t]._global.push({pred:o,val:r})}}(Fa);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Qa in Rr.prototype)Rr.prototype.hasOwnProperty(Qa)&&U(Ya,Qa)<0&&(Fa.prototype[Qa]=function(e){return function(){return e.apply(this.doc,arguments)}}(Rr.prototype[Qa]));return ke(Rr),Fa.inputStyles={textarea:Ja,contenteditable:Ua},Fa.defineMode=function(e){Fa.defaults.mode||"null"==e||(Fa.defaults.mode=e),ze.apply(this,arguments)},Fa.defineMIME=function(e,t){Ve[e]=t},Fa.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Fa.defineMIME("text/plain","null"),Fa.defineExtension=function(e,t){Fa.prototype[e]=t},Fa.defineDocExtension=function(e,t){Rr.prototype[e]=t},Fa.fromTextArea=function(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=T(N(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function i(){e.value=s.getValue()}var o;if(e.form&&(ge(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var r=e.form;o=r.submit;try{var a=r.submit=function(){i(),r.submit=o,r.submit(),r.submit=a}}catch(e){}}t.finishInit=function(n){n.save=i,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,i(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",i),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var s=Fa((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=ve,e.on=ge,e.wheelEventPixels=So,e.Doc=Rr,e.splitLines=Re,e.countColumn=B,e.findColumn=J,e.isWordChar=oe,e.Pass=H,e.signal=ye,e.Line=Yt,e.changeEnd=Fo,e.scrollbarModel=qi,e.Pos=rt,e.cmpPos=at,e.modes=We,e.mimeModes=Ve,e.resolveMode=Be,e.getMode=Ke,e.modeExtensions=Ue,e.extendMode=He,e.copyState=Ge,e.startState=Xe,e.innerMode=qe,e.commands=aa,e.keyMap=qr,e.keyName=ea,e.isModifierKey=Qr,e.lookupKey=Yr,e.normalizeKeyMap=Jr,e.StringStream=Je,e.SharedTextMarker=Fr,e.TextMarker=jr,e.LineWidget=Dr,e.e_preventDefault=Oe,e.e_stopPropagation=Ce,e.e_stop=De,e.addClass=I,e.contains=F,e.rmClass=D,e.keyNames=Kr}(Fa),Fa.version="5.65.20",Fa}()},"584a":function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},"5b4e":function(e,t,n){var i=n("36c3"),o=n("b447"),r=n("0fc9");e.exports=function(e){return function(t,n,a){var s,l=i(t),c=o(l.length),u=r(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},"5c95":function(e,t,n){var i=n("35e8");e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:i(e,o,t[o]);return e}},"5ca1":function(e,t,n){var i=n("7726"),o=n("8378"),r=n("32e9"),a=n("2aba"),s=n("9b43"),l=function(e,t,n){var c,u,d,f,p=e&l.F,m=e&l.G,h=e&l.S,g=e&l.P,b=e&l.B,v=m?i:h?i[t]||(i[t]={}):(i[t]||{}).prototype,y=m?o:o[t]||(o[t]={}),_=y.prototype||(y.prototype={});for(c in m&&(n=t),n)d=((u=!p&&v&&void 0!==v[c])?v:n)[c],f=b&&u?s(d,i):g&&"function"==typeof d?s(Function.call,d):d,v&&a(v,c,d,e&l.U),y[c]!=d&&r(y,c,f),g&&_[c]!=d&&(_[c]=d)};i.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},"5cc5":function(e,t,n){var i=n("2b4c")("iterator"),o=!1;try{var r=[7][i]();r.return=function(){o=!0},Array.from(r,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},e(r)}catch(e){}return n}},"5dbc":function(e,t,n){var i=n("d3f4"),o=n("8b97").set;e.exports=function(e,t,n){var r,a=t.constructor;return a!==n&&"function"==typeof a&&(r=a.prototype)!==n.prototype&&i(r)&&o&&o(e,r),e}},"5df0":function(e,t,n){"use strict";n("85a4")},"5df3":function(e,t,n){"use strict";var i=n("02f4")(!0);n("01f9")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})}))},"5e15":function(e,t,n){"use strict";var i=n("aa47"),o=n("23ca");function r(e,t){this.$nextTick(()=>this.$emit(e.toLowerCase(),t))}function a(e){return t=>{null!==this.realList&&this["onDrag"+e](t),r.call(this,e,t)}}function s(e){return["transition-group","TransitionGroup"].includes(e)}function l(e,t,n){return e[n]||(t[n]?t[n]():void 0)}const c=["Start","Add","Remove","Update","End"],u=["Choose","Unchoose","Sort","Filter","Clone"],d=["Move",...c,...u].map(e=>"on"+e);var f=null;const p={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1}),render(e){const t=this.$slots.default;this.transitionMode=function(e){if(!e||1!==e.length)return!1;const[{componentOptions:t}]=e;return!!t&&s(t.tag)}(t);const{children:n,headerOffset:i,footerOffset:o}=function(e,t,n){let i=0,o=0;const r=l(t,n,"header");r&&(i=r.length,e=e?[...r,...e]:[...r]);const a=l(t,n,"footer");return a&&(o=a.length,e=e?[...e,...a]:[...a]),{children:e,headerOffset:i,footerOffset:o}}(t,this.$slots,this.$scopedSlots);this.headerOffset=i,this.footerOffset=o;const r=function(e,t){let n=null;const i=(e,t)=>{n=function(e,t,n){return void 0===n||((e=e||{})[t]=n),e}(n,e,t)};if(i("attrs",Object.keys(e).filter(e=>"id"===e||e.startsWith("data-")).reduce((t,n)=>(t[n]=e[n],t),{})),!t)return n;const{on:o,props:r,attrs:a}=t;return i("on",o),i("props",r),Object.assign(n.attrs,a),n}(this.$attrs,this.componentData);return e(this.getTag(),r,n)},created(){null!==this.list&&null!==this.value&&o.b.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&o.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&o.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted(){if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: "+this.getTag());const e={};c.forEach(t=>{e["on"+t]=a.call(this,t)}),u.forEach(t=>{e["on"+t]=r.bind(this,t)});const t=Object.keys(this.$attrs).reduce((e,t)=>(e[Object(o.a)(t)]=this.$attrs[t],e),{}),n=Object.assign({},this.options,t,e,{onMove:(e,t)=>this.onDragMove(e,t)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new i.default(this.rootContainer,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer(){return this.transitionMode?this.$el.children[0]:this.$el},realList(){return this.list?this.list:this.value}},watch:{options:{handler(e){this.updateOptions(e)},deep:!0},$attrs:{handler(e){this.updateOptions(e)},deep:!0},realList(){this.computeIndexes()}},methods:{getIsFunctional(){const{fnOptions:e}=this._vnode;return e&&e.functional},getTag(){return this.tag||this.element},updateOptions(e){for(var t in e){const n=Object(o.a)(t);-1===d.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;const e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=function(e,t,n,i){if(!e)return[];const o=e.map(e=>e.elm),r=t.length-i,a=[...t].map((e,t)=>t>=r?o.length:o.indexOf(e));return n?a.filter(e=>-1!==e):a}(this.getChildrenNodes(),this.rootContainer.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(e){const t=function(e,t){return e.map(e=>e.elm).indexOf(t)}(this.getChildrenNodes()||[],e);if(-1===t)return null;return{index:t,element:this.realList[t]}},getUnderlyingPotencialDraggableComponent:({__vue__:e})=>e&&e.$options&&s(e.$options._componentTag)?e.$parent:!("realList"in e)&&1===e.$children.length&&"realList"in e.$children[0]?e.$children[0]:e,emitChanges(e){this.$nextTick(()=>{this.$emit("change",e)})},alterList(e){if(this.list)return void e(this.list);const t=[...this.value];e(t),this.$emit("input",t)},spliceList(){this.alterList(e=>e.splice(...arguments))},updatePosition(e,t){this.alterList(n=>n.splice(t,0,n.splice(e,1)[0]))},getRelatedContextFromMoveEvent({to:e,related:t}){const n=this.getUnderlyingPotencialDraggableComponent(e);if(!n)return{component:n};const i=n.realList,o={list:i,component:n};if(e!==t&&i&&n.getUnderlyingVm){const e=n.getUnderlyingVm(t);if(e)return Object.assign(e,o)}return o},getVmIndex(e){const t=this.visibleIndexes,n=t.length;return e>n-1?n:t[e]},getComponent(){return this.$slots.default[0].componentInstance},resetTransitionData(e){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[e].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),f=e.item},onDragAdd(e){const t=e.item._underlying_vm_;if(void 0===t)return;Object(o.d)(e.item);const n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();const i={element:t,newIndex:n};this.emitChanges({added:i})},onDragRemove(e){if(Object(o.c)(this.rootContainer,e.item,e.oldIndex),"clone"===e.pullMode)return void Object(o.d)(e.clone);const t=this.context.index;this.spliceList(t,1);const n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})},onDragUpdate(e){Object(o.d)(e.item),Object(o.c)(e.from,e.item,e.oldIndex);const t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);const i={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:i})},updateProperty(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex(e,t){if(!e.element)return 0;const n=[...t.to.children].filter(e=>"none"!==e.style.display),i=n.indexOf(t.related),o=e.component.getVmIndex(i);return-1!==n.indexOf(f)||!t.willInsertAfter?o:o+1},onDragMove(e,t){const n=this.move;if(!n||!this.realList)return!0;const i=this.getRelatedContextFromMoveEvent(e),o=this.context,r=this.computeFutureIndex(i,e);Object.assign(o,{futureIndex:r});return n(Object.assign({},e,{relatedContext:i,draggedContext:o}),t)},onDragEnd(){this.computeIndexes(),f=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",p),t.a=p},"5e3d":function(e,t,n){"use strict";n("a512")},"5eda":function(e,t,n){var i=n("5ca1"),o=n("8378"),r=n("79e5");e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),i(i.S+i.F*r((function(){n(1)})),"Object",a)}},"5f1b":function(e,t,n){"use strict";var i=n("23c6"),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==i(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},"5f53":function(e,t,n){"use strict";n("d00c")},"5f72":function(e,t){e.exports=require("element-ui")},"613b":function(e,t,n){var i=n("5537")("keys"),o=n("ca5a");e.exports=function(e){return i[e]||(i[e]=o(e))}},"626a":function(e,t,n){var i=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},"62a0":function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},"62e4":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"63b6":function(e,t,n){var i=n("e53d"),o=n("584a"),r=n("d864"),a=n("35e8"),s=n("07e3"),l=function(e,t,n){var c,u,d,f=e&l.F,p=e&l.G,m=e&l.S,h=e&l.P,g=e&l.B,b=e&l.W,v=p?o:o[t]||(o[t]={}),y=v.prototype,_=p?i:m?i[t]:(i[t]||{}).prototype;for(c in p&&(n=t),n)(u=!f&&_&&void 0!==_[c])&&s(v,c)||(d=u?_[c]:n[c],v[c]=p&&"function"!=typeof _[c]?n[c]:g&&u?r(d,i):b&&_[c]==d?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):h&&"function"==typeof d?r(Function.call,d):d,h&&((v.virtual||(v.virtual={}))[c]=d,e&l.R&&y&&!y[c]&&a(y,c,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},"64dc":function(e,t,n){"use strict";n("e19c")},"656e":function(e,t,n){"use strict";var i=n("79aa");function o(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)}e.exports.f=function(e){return new o(e)}},6718:function(e,t,n){var i=n("e53d"),o=n("584a"),r=n("b8e3"),a=n("ccb9"),s=n("d9f6").f;e.exports=function(e){var t=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},6762:function(e,t,n){"use strict";var i=n("5ca1"),o=n("c366")(!0);i(i.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},"67ab":function(e,t,n){var i=n("ca5a")("meta"),o=n("d3f4"),r=n("69a8"),a=n("86cc").f,s=0,l=Object.isExtensible||function(){return!0},c=!n("79e5")((function(){return l(Object.preventExtensions({}))})),u=function(e){a(e,i,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!r(e,i)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[i].i},getWeak:function(e,t){if(!r(e,i)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[i].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!r(e,i)&&u(e),e}}},"67c8":function(e,t,n){"use strict";n.r(t);n("a481"),n("7f7f");var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("75fc")),r=(n("6b54"),n("28a5"),n("b76a")),a=n.n(r),s=n("6b69"),l=n("2ef0"),c=n.n(l),u=n("0f01"),d=n("4260");function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={components:{WidgetElementItem:s.a},props:["element","select","index","data","platform","formKey"],data:function(){return{selectWidget:this.select||{}}},methods:{handleMouseover:function(e){Object(d.a)(this.$refs.widgetTableItem,"is-hover")},handleMouseout:function(e){Object(d.j)(this.$refs.widgetTableItem,"is-hover")},handleSelectWidget:function(e){this.selectWidget=this.data[e]},handleWidgetDelete:function(e){var t=this;1==this.data.length?this.$emit("select-change",-1):this.data.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((function(){t.data.splice(e,1),setTimeout((function(){u.a.$emit("on-history-add-"+t.formKey)}),20)}))},handleWidgetClone:function(e){var t=this,n=Math.random().toString(36).slice(-8),i=p(p({},c.a.cloneDeep(this.data[e])),{},{key:n,model:this.data[e].type+"_"+n});this.data.splice(e+1,0,i),this.$nextTick((function(){t.selectWidget=t.data[e+1],t.$nextTick((function(){u.a.$emit("on-history-add-"+t.formKey)}))}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!1}}},h=n("2877"),g=Object(h.a)(m,(function(){var e,t=this,n=t._self._c;return t.element&&t.element.key?n("div",{ref:"widgetTableItem",staticClass:"widget-table-view",class:{active:t.selectWidget.key==t.element.key,is_req:t.element.options.required,is_hidden:t.element.options.hidden,mobile:"mobile"==t.platform},style:{width:"mobile"!=t.platform?t.element.options.width?t.element.options.width:"200px":""},on:{click:function(e){return e.stopPropagation(),t.handleSelectWidget(t.index)},mouseover:function(e){return e.stopPropagation(),t.handleMouseover.apply(null,arguments)},mouseout:t.handleMouseout}},["mobile"!=t.platform?n("el-table",{attrs:{"row-class-name":"widget-table-row",data:[{}]}},[n("el-table-column",{attrs:{label:t.element.options.hideLabel?"":t.element.name,"class-name":null===(e=t.element.options)||void 0===e?void 0:e.customClass,"label-class-name":t.element.options.required?"required":""}},[n("widget-element-item",{attrs:{element:t.element,"is-table":!0}})],1)],1):t._e(),"mobile"==t.platform?n("el-form-item",{class:Object(i.a)(Object(i.a)({},t.element.options&&t.element.options.customClass,!!t.element.options.customClass),"fm-label-wrap",t.element.options.labelWrap),attrs:{label:t.element.options.hideLabel?"":t.element.name,"label-width":t.element.options.hideLabel?"0px":t.element.options.isLabelWidth?t.element.options.labelWidth+"px":""}},[n("widget-element-item",{attrs:{element:t.element,"is-table":!0}})],1):t._e(),t.selectWidget.key==t.element.key?n("div",{staticClass:"widget-view-action"},[n("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:t.$t("fm.tooltip.clone")},on:{click:function(e){return e.stopPropagation(),t.handleWidgetClone(t.index)}}}),n("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:t.$t("fm.tooltip.trash")},on:{click:function(e){return e.stopPropagation(),t.handleWidgetDelete(t.index)}}})]):t._e(),t.selectWidget.key==t.element.key?n("div",{staticClass:"widget-view-drag"},[n("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):t._e(),n("div",{staticClass:"widget-view-model",style:{color:t.element.options.dataBind?"":"#666"}},[n("span",[t._v(t._s(t.element.model))])]),n("div",{staticClass:"widget-view-type"},[n("span",[t._v(t._s(t.element.type?this.$t("fm.components.fields."+t.element.type):""))])])],1):t._e()}),[],!1,null,null,null).exports,b=n("ca17");function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _={components:{Draggable:a.a,WidgetTableItem:g},props:["element","select","index","data","platform","formKey"],inject:["setDragging","getDragging"],data:function(){return{selectWidget:this.select||{},columnsWidthStyle:"200px"}},computed:{widgetTableLeftWidth:function(){var e=1;return this.element.options.showControl&&(e+=50),this.element.options.selection&&(e+=50),e+"px"}},mounted:function(){this.calcTableColumnsWidth()},methods:{handleMouseover:function(e){!this.getDragging()&&Object(d.a)(this.$refs.widgetTable,"is-hover")},handleMouseout:function(e){Object(d.j)(this.$refs.widgetTable,"is-hover")},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){u.a.$emit("on-history-add-"+t.formKey)}),20)},handleTableClone:function(e){var t=this,n=c.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(b.a)(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){u.a.$emit("on-history-add-"+t.formKey)}))}))},handleWidgetTableUpdate:function(e){var t=this;this.$nextTick((function(){u.a.$emit("on-history-add-"+t.formKey)}))},calcTableColumnsWidth:function(){this.columnsWidthStyle="calc(200px)";for(var e=[],t=0;t<this.element.tableColumns.length;t++)this.element.tableColumns[t].options.width?e.push(this.element.tableColumns[t].options.width):e.push("200px");e.length&&(this.columnsWidthStyle="calc(200px + ".concat(e.join(" + "),")"))},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-col")>=0||n.className.split(" ").indexOf("widget-table")>=0||n.className.split(" ").indexOf("widget-tab")>=0||n.className.split(" ").indexOf("widget-report")>=0||n.className.split(" ").indexOf("widget-inline")>=0||n.className.split(" ").indexOf("widget-subform")>=0||n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("widget-card")>=0||n.className.split(" ").indexOf("widget-group")>=0||n.className.split(" ").indexOf("no-put")>=0||n.children[0].className.split(" ").indexOf("no-put")>=0)},handleWidgetTableAdd:function(e,t){var n=this,i=e.newIndex,r=Math.random().toString(36).slice(-8);this.$set(t.tableColumns,i,c.a.cloneDeep(t.tableColumns[i])),this.$set(t.tableColumns,i,y(y({},t.tableColumns[i]),{},{options:y(y({},t.tableColumns[i].options),{},{remoteFunc:t.tableColumns[i].options.remoteFunc||"func_"+r,remoteOption:t.tableColumns[i].options.remoteOption||"option_"+r,tableColumn:!0,subform:!!this.subform}),novalid:y({},t.tableColumns[i].novalid),key:t.tableColumns[i].key?t.tableColumns[i].key:r,model:t.tableColumns[i].model?t.tableColumns[i].model:t.tableColumns[i].type+"_"+r,rules:t.tableColumns[i].rules?Object(o.a)(t.tableColumns[i].rules):[]})),this.selectWidget=t.tableColumns[i],this.$nextTick((function(){u.a.$emit("on-history-add-"+n.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?n.element.tableColumns[e]:n.data.list[n.index]}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!1,handler:function(e){this.$emit("update:select",e)}},element:{deep:!0,handler:function(e){this.calcTableColumnsWidth()}}}},w=Object(h.a)(_,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetTable",staticClass:"widget-table widget-view",class:{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden,mobile:"mobile"==e.platform},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-form-item",{class:Object(i.a)(Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),"fm-label-wrap",e.element.options.labelWrap),attrs:{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":""}},[e.element.options.tip?t("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:e._s(e.element.options.tip.replace(/\n/g,"<br/>"))}}):e._e(),t("div",{staticClass:"widget-table-wrapper",class:{mobile:"mobile"==e.platform}},["mobile"!=e.platform?t("el-table",{staticClass:"widget-table-left",style:{width:e.widgetTableLeftWidth},attrs:{data:[{}],"row-class-name":"widget-table-row"}},[e.element.options.selection?t("el-table-column",{attrs:{fixed:"",type:"selection",width:"50"}}):e._e(),e.element.options.showControl?t("el-table-column",{attrs:{label:"#",width:"50",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.$index+1))]}}],null,!1,811300409)}):e._e()],1):e._e(),"mobile"==e.platform?t("div",{staticClass:"widget-table-top"},[e.element.options.selection?t("el-checkbox",{staticStyle:{"margin-right":"10px"}}):e._e(),e._v("\n # 1\n ")],1):e._e(),t("div",{staticClass:"widget-table-content",class:{mobile:"mobile"==e.platform}},[0==e.element.tableColumns.length?t("div",{staticClass:"table-empty"},[e._v(e._s(e.$t("fm.description.tableEmpty")))]):e._e(),t("draggable",e._b({attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetTableAdd(t,e.element)},update:e.handleWidgetTableUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:e.element.tableColumns,callback:function(t){e.$set(e.element,"tableColumns",t)},expression:"element.tableColumns"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[t("transition-group",{staticClass:"widget-table-col",style:{width:"mobile"!=e.platform?e.columnsWidthStyle:"100%"},attrs:{name:"fade",tag:"div"}},e._l(e.element.tableColumns,(function(n,i){return n.key?t("widget-table-item",{key:n.key,attrs:{element:n,tableElement:e.element,select:e.selectWidget,index:i,data:e.element.tableColumns,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):e._e()})),1)],1)],1)],1)]),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleTableClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-col-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])],1)}),[],!1,null,null,null);t.default=w.exports},6821:function(e,t,n){var i=n("626a"),o=n("be13");e.exports=function(e){return i(o(e))}},6919:function(e,t,n){},"696e":function(e,t,n){n("c207"),n("1654"),n("6c1c"),n("24c5"),n("3c11"),n("43fc"),e.exports=n("584a").Promise},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"69d3":function(e,t,n){n("6718")("asyncIterator")},"6a99":function(e,t,n){var i=n("d3f4");e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},"6abf":function(e,t,n){var i=n("e6f3"),o=n("1691").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},"6b4c":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"6b54":function(e,t,n){"use strict";n("3846");var i=n("cb7c"),o=n("0bfb"),r=n("9e1e"),a=/./.toString,s=function(e){n("2aba")(RegExp.prototype,"toString",e,!0)};n("79e5")((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var e=i(this);return"/".concat(e.source,"/","flags"in e?e.flags:!r&&e instanceof RegExp?o.call(e):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},"6b69":function(e,t,n){"use strict";n("8e6e"),n("ac6a"),n("cadf"),n("456d");var i=n("bd86");function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n("6b54");var a=n("c7f0"),s=n("8bbf"),l=n.n(s),c=n("6ca6"),u={components:{FmUpload:a.a},props:["element","isTable"],data:function(){return{key:Math.random().toString(36).slice(-8),elementKey:Math.random().toString(36).slice(-8)}},computed:{elementDisabled:function(){return!!Object(c.c)(this.element.options.disabled)||this.element.options.disabled},extendProps:function(){var e=this,t={};return this.element.options.extendProps&&Object.keys(this.element.options.extendProps).forEach((function(n){var i=e.element.options.extendProps[n];Object(c.c)(i)?t[n]=Object(c.a)(Object(c.b)(i),e.currentOptions,e.formContext):t[n]=i})),t}},created:function(){"component"==this.element.type&&l.a.component("component-".concat(this.element.key),{template:"<span>".concat(this.element.options.template,"</span>"),props:["dataModel","formState"]})},watch:{"element.options.template":function(e){l.a.component("component-".concat(this.element.key),{template:"<span>".concat(e,"</span>"),props:["dataModel","formState"]}),this.key=Math.random().toString(36).slice(-8)},"element.options.defaultValue":function(e){this.elementKey=Math.random().toString(36).slice(-8)}}},d=n("2877"),f=Object(d.a)(u,(function(){var e=this,t=e._self._c;return t("span",["input"==e.element.type?[t("el-input",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{placeholder:e.$t(e.element.options.placeholder),disabled:e.elementDisabled,"show-password":e.element.options.showPassword,maxlength:e.element.options.maxlength,"show-word-limit":e.element.options.showWordLimit},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-input",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"textarea"==e.element.type?[t("el-input",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{type:"textarea",rows:e.element.options.rows,disabled:e.elementDisabled,placeholder:e.$t(e.element.options.placeholder),maxlength:e.element.options.maxlength,"show-word-limit":e.element.options.showWordLimit,autosize:e.element.options.autosize},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-input",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"number"==e.element.type?[t("el-input-number",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled,"controls-position":e.element.options.controlsPosition,precision:e.element.options.precision,controls:e.element.options.controls},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-input-number",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"radio"==e.element.type?[t("el-radio-group",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-radio-group",r(r({},e.element.options.customProps),e.extendProps),!1),e._l(e.element.options.options,(function(n,i){return t("el-radio",{key:n.value+i,style:{display:e.element.options.inline?"inline-block":"block"},attrs:{label:n.value}},[e._v("\n "+e._s(e.element.options.showLabel?e.$t(n.label):e.$t(n.value))+"\n ")])})),1)]:e._e(),"checkbox"==e.element.type?[t("el-checkbox-group",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-checkbox-group",r(r({},e.element.options.customProps),e.extendProps),!1),e._l(e.element.options.options,(function(n,i){return t("el-checkbox",{key:n.value+i,style:{display:e.element.options.inline?"inline-block":"block"},attrs:{label:n.value}},[e._v("\n "+e._s(e.element.options.showLabel?e.$t(n.label):e.$t(n.value))+"\n ")])})),1)]:e._e(),"time"==e.element.type?[t("el-time-picker",e._b({key:e.elementKey,style:{width:e.isTable?"100%":e.element.options.width},attrs:{"default-value":e.element.options.defaultValue,"is-range":e.element.options.isRange,placeholder:e.$t(e.element.options.placeholder),"start-placeholder":e.element.options.startPlaceholder,"end-placeholder":e.element.options.endPlaceholder,readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable,"value-format":e.element.options.format},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-time-picker",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"date"==e.element.type?[t("el-date-picker",e._b({key:e.elementKey,style:{width:e.isTable?"100%":e.element.options.width},attrs:{type:e.element.options.type,"is-range":e.element.options.isRange,placeholder:e.$t(e.element.options.placeholder),"start-placeholder":e.element.options.startPlaceholder,"end-placeholder":e.element.options.endPlaceholder,readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable,"value-format":e.element.options.timestamp?"timestamp":e.element.options.format,format:e.element.options.format},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-date-picker",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"rate"==e.element.type?[t("el-rate",e._b({style:{width:e.isTable?"100%":e.element.options.width,display:"inline-block"},attrs:{max:e.element.options.max,disabled:e.elementDisabled,"allow-half":e.element.options.allowHalf,"show-score":e.element.options.showScore},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-rate",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"color"==e.element.type?[t("el-color-picker",e._b({attrs:{disabled:e.elementDisabled,"show-alpha":e.element.options.showAlpha},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-color-picker",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"select"==e.element.type?[t("el-select",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled,multiple:e.element.options.multiple,clearable:e.element.options.clearable,placeholder:e.$t(e.element.options.placeholder)},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-select",r(r({},e.element.options.customProps),e.extendProps),!1),e._l(e.element.options.options,(function(n){return t("el-option",{key:n.value,attrs:{value:n.value,label:e.element.options.showLabel?e.$t(n.label):e.$t(n.value)}})})),1)]:e._e(),"switch"==e.element.type?[t("el-switch",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-switch",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"slider"==e.element.type?[t("el-slider",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{min:e.element.options.min,max:e.element.options.max,disabled:e.elementDisabled,step:e.element.options.step,"show-input":e.element.options.showInput,range:e.element.options.range},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-slider",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"imgupload"==e.element.type?[t("fm-upload",{style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled,width:e.element.options.size.width,height:e.element.options.size.height,token:"xxx",domain:"xxx"},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}})]:e._e(),"cascader"==e.element.type?[t("el-cascader",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled,clearable:e.element.options.clearable,placeholder:e.$t(e.element.options.placeholder),options:e.element.options.remote?[]:e.element.options.options,props:{multiple:e.element.options.multiple,checkStrictly:e.element.options.checkStrictly}},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-cascader",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"editor"==e.element.type?[t("vue-editor",{staticClass:"fm-editor",style:{width:e.isTable?"100%":e.element.options.width,cursor:e.elementDisabled?"no-drop":"",backgroundColor:e.elementDisabled?"#F5F7FA":""},attrs:{"editor-toolbar":e.element.options.customToolbar,disabled:e.elementDisabled},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}})]:e._e(),"blank"==e.element.type?[t("div",{staticStyle:{height:"50px",color:"#999",background:"#eee","line-height":"50px","text-align":"center"}},[e._v(e._s(e.element.model))])]:e._e(),"component"==e.element.type?[t("component-".concat(e.element.key),{key:e.key,tag:"component",style:{width:e.isTable?"100%":e.element.options.width},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}})]:e._e(),"custom"==e.element.type?[t(e.element.el,e._b({tag:"component",attrs:{width:e.element.options.width,height:e.element.options.height,placeholder:e.$t(e.element.options.placeholder),readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"component",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"text"==e.element.type?[t("span",{style:{width:e.isTable?"100%":e.element.options.width||"100%",display:"inline-block"}},[e._v(e._s(e.element.options.defaultValue))])]:e._e(),"html"==e.element.type?[t("span",{style:{width:e.isTable?"100%":e.element.options.width||"100%",display:"inline-block"},domProps:{innerHTML:e._s(e.element.options.defaultValue)}})]:e._e(),"fileupload"==e.element.type?[t("el-upload",{style:{width:e.isTable?"100%":e.element.options.width},attrs:{action:"https://jsonplaceholder.typicode.com/posts/",disabled:e.elementDisabled,limit:e.element.options.limit}},[t("el-button",{attrs:{size:"small",type:"primary"}},[e._v(e._s(e.$t("fm.actions.upload")))])],1)]:e._e(),"button"==e.element.type?[t("el-button",e._b({style:{width:e.element.options.width},attrs:{disabled:e.elementDisabled,type:e.element.options.buttonType,plain:e.element.options.buttonPlain,round:e.element.options.buttonRound,circle:e.element.options.buttonCircle}},"el-button",r(r({},e.element.options.customProps),e.extendProps),!1),[e._v("\n "+e._s(e.$t(e.element.options.buttonName))+"\n ")])]:e._e(),"link"==e.element.type?[t("el-link",e._b({attrs:{disabled:e.elementDisabled,type:e.element.options.linkType,underline:e.element.options.underline}},"el-link",r(r({},e.element.options.customProps),e.extendProps),!1),[e._v("\n "+e._s(e.$t(e.element.options.linkName))+"\n ")])]:e._e(),"steps"==e.element.type?[t("el-steps",e._b({style:{"line-height":"normal"},attrs:{active:e.element.options.defaultValue,space:e.element.options.space,direction:e.element.options.direction,"process-status":e.element.options.processStatus,"finish-status":e.element.options.finishStatus,"align-center":e.element.options.alignCenter,simple:e.element.options.simple}},"el-steps",r(r({},e.element.options.customProps),e.extendProps),!1),e._l(e.element.options.steps,(function(n,i){return t("el-step",{key:i,attrs:{title:e.$t(n.title),description:e.$t(n.description)}})})),1)]:e._e(),"pagination"==e.element.type?[t("el-pagination",e._b({attrs:{"current-page":e.element.options.defaultValue,"page-size":e.element.options.pageSize,"pager-count":e.element.options.pagerCount,disabled:e.elementDisabled,background:e.element.options.background,layout:"total, prev, pager, next",total:e.element.options.total},on:{"update:currentPage":function(t){return e.$set(e.element.options,"defaultValue",t)},"update:current-page":function(t){return e.$set(e.element.options,"defaultValue",t)}}},"el-pagination",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"transfer"==e.element.type?[t("el-transfer",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{value:e.element.options.defaultValue,data:e.element.options.data,filterable:e.element.options.filterable,titles:e.$t(e.element.options.titles)}},"el-transfer",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e()],2)}),[],!1,null,null,null);t.a=f.exports},"6c1c":function(e,t,n){n("c367");for(var i=n("e53d"),o=n("35e8"),r=n("481b"),a=n("5168")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var c=s[l],u=i[c],d=u&&u.prototype;d&&!d[a]&&o(d,a,c),r[c]=r.Array}},"6c59":function(e,t,n){"use strict";n("acc5")},"6c7b":function(e,t,n){var i=n("5ca1");i(i.P,"Array",{fill:n("36bd")}),n("9c6c")("fill")},"6c7c":function(e,t,n){"use strict";n("36eb")},"6ca6":function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return r}));var i=function(e){return/^\s*{{[\s\S]*?}}\s*$/.test(e)},o=function(e){var t=/^\s*{{([\s\S]*?)}}\s*$/.exec(e);return t?t[1]:""},r=function(e,t,n){try{return n?Function("args","return ".concat(e)).bind(n)(t):Function("args","return ".concat(e))(t)}catch(e){return null}}},"6d6a":function(e,t,n){"use strict";n("7f7f"),n("8e6e");var i=n("bd86"),o=(n("28a5"),n("456d"),n("20d6"),n("cadf"),n("5df3"),n("551c"),n("ac6a"),n("87b7")),r=n("908f"),a=n("bec1"),s=n("e66c"),l=n("9195"),c=n("d6ee"),u=n("093a"),d=n("9058"),f=n("2ef0"),p=n.n(f);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g={components:{GenerateColItem:r.default,GenerateFormItem:o.default,GenerateInline:l.default,GenerateReport:s.default,GenerateTabItem:a.default,GenerateCollapse:c.default,GenerateCard:u.default},props:["config","models","rules","element","remote","blanks","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","group","fieldNode","componentInstance"],data:function(){return{visible:this.element.options.visible,displayFields:{},dialogModel:this.models[this.element.model]||{},dialogDisabled:{},activeElement:""}},inject:["generateComponentInstance","deleteComponentInstance","getFormComponent","onFormHide","onFormDisplay"],created:function(){this._generateModel(this.element.list)},mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.element.model,this.$refs["generate-dialog-".concat(this.element.model)].$parent)},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.element.model)},provide:function(){return{setDialogData:this.setDialogData}},methods:{setDialogData:function(e,t){this.$set(this.dialogModel,t,e)},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.displayFields[e[n].model]=!e[n].options.hidden,e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.displayFields[e[n].model]=!e[n].options.hidden):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.displayFields[e[n].model]=!e[n].options.hidden):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.displayFields[e[n].model]=!e[n].options.hidden):("blank"==e[n].type?this.$set(this.dialogModel,e[n].model,"String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]):this.$set(this.dialogModel,e[n].model,this.models[this.element.model][e[n].model]||p.a.cloneDeep(e[n].options.defaultValue)),this.displayFields[e[n].model]=!e[n].options.hidden,this.dialogDisabled[e[n].model]=!e[n].options.disabled)},open:function(){var e=this;if(this.activeElement=document.activeElement,document.activeElement&&document.activeElement.blur(),this.visible=!0,this.element&&this.element.events&&this.element.events.onOpen){var t=this.element.events.onOpen;this.$nextTick((function(){e.eventFunction[t]({field:e.element.model,currentRef:e})}))}},close:function(){if(this.activeElement&&(this.activeElement.focus(),this.activeElement=""),this.visible=!1,this.element&&this.element.events&&this.element.events.onClose){var e=this.element.events.onClose;this.eventFunction[e]({field:this.element.model,currentRef:this})}},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},disabled:function(e,t){"string"==typeof e&&(e=[e]),this._setDisabled(this.element.list,e,t)},validate:function(){var e=this;return new Promise((function(t,n){var i=e._getAllRuleFields();Promise.all(i.map((function(t){return new Promise((function(n){e.getFormComponent().validateField(t,(function(e,t){n(t)}))}))}))).then((function(e){e.findIndex((function(e){return e}))>=0?n():t()}))}))},clearValidate:function(){var e=this._getAllRuleFields();this.getFormComponent().clearValidate(e)},handleCancel:function(){if(this.element&&this.element.events&&this.element.events.onCancel){var e=this.element.events.onCancel;this.eventFunction[e]({field:this.element.model,currentRef:this})}},handleConfirm:function(){if(this.element&&this.element.events&&this.element.events.onConfirm){var e=this.element.events.onConfirm;this.eventFunction[e]({field:this.element.model,currentRef:this})}},confirmLoading:function(e){this.element.options.confirmLoading=e},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.element.list,e,t)},setData:function(e){var t=this;return new Promise((function(n){t.$nextTick((function(){Object.keys(e).forEach((function(n){t.$set(t.dialogModel,n,e[n])})),n()}))}))},getValues:function(){return this.dialogModel},getValue:function(e){return this.dialogModel[e]},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.element.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.element.list,e.split("."),t,"remove")}))},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(e[o].options.disabled=n)},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):("inline"===e[o].type||"card"===e[o].type)&&i._setOptions(e[o].list,t,n),t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)},_getAllRuleFields:function(){var e=this,t=[];return Object.keys(this.dialogModel).forEach((function(n){Array.isArray(e.dialogModel[n])?e.dialogModel[n].forEach((function(i,o){Object.keys(i).forEach((function(i){e.componentInstance["".concat(e.element.model,".").concat(n,".").concat(o,".").concat(i)]&&t.push("".concat(e.element.model,".").concat(n,".").concat(o,".").concat(i))}))})):e.componentInstance["".concat(e.element.model,".").concat(n)]&&t.push("".concat(e.element.model,".").concat(n))})),t}},watch:{dialogModel:{deep:!0,handler:function(e){this.$emit("update:models",h(h({},this.models),{},Object(i.a)({},this.element.model,e)))}},models:{deep:!0,handler:function(e){this.dialogModel=this.models[this.element.model]}}}},b=(n("3459"),n("2877")),v=Object(b.a)(g,(function(){var e,t,n=this,i=n._self._c;return i("a-modal",{ref:"generate-dialog-".concat(n.element.model),style:{top:n.element.options.top||"15vh"},attrs:{title:n.element.options.title,width:n.element.options.width||"50%","mask-closable":!1,closable:n.element.options.showClose,"destroy-on-close":"","z-index":3e3,"wrap-class-name":"fm-generate-ant-dialog fm-form "+(n.element.options.showCancel||n.element.options.showOk?"":"no-footer ")+(n.element.options.center?"center ":"")+(null!==(e=n.element.options)&&void 0!==e&&e.customClass?null===(t=n.element.options)||void 0===t?void 0:t.customClass:"")},on:{cancel:n.close},scopedSlots:n._u([{key:"footer",fn:function(){return[i("div",[n.element.options.showCancel?i("a-button",{key:"back",on:{click:n.handleCancel}},[n._v(n._s(n.element.options.cancelText))]):n._e(),n.element.options.showOk?i("a-button",{key:"submit",attrs:{type:"primary",loading:n.element.options.confirmLoading},on:{click:n.handleConfirm}},[n._v(n._s(n.element.options.okText))]):n._e()],1)]},proxy:!0}]),model:{value:n.visible,callback:function(e){n.visible=e},expression:"visible"}},[i("div",[n._l(n.element.list,(function(e){return["grid"==e.type?i("generate-col-item",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"tabs"==e.type?i("generate-tab-item",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"collapse"==e.type?i("generate-collapse",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"report"==e.type?i("generate-report",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"card"==e.type?i("generate-card",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"inline"==e.type?i("generate-inline",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):i("generate-form-item",{key:e.key,attrs:{models:n.dialogModel,rules:n.rules,widget:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)})]}))],2)])}),[],!1,null,null,null);t.a=v.exports},"6ecf":function(e,t,n){},"6ee3":function(e,t,n){"use strict";n("15d7")},"70fb":function(e,t,n){"use strict";n("7f7f");var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("6b54"),n("28a5"),n("6b69")),r=n("2ef0"),a=n.n(r),s=n("0f01"),l=n("4260");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d={props:["element","select","index","data","formKey"],components:{WidgetElementItem:o.a},inject:["getDragging"],data:function(){return{selectWidget:this.select||{}}},mounted:function(){},methods:{getTip:function(e){var t=this;return e.split("\n").map((function(e){return t.$t(e)})).join("<br/>")},handleMouseover:function(e){!this.getDragging()&&Object(l.a)(this.$refs.widgetFormItem,"is-hover")},handleMouseout:function(e){Object(l.j)(this.$refs.widgetFormItem,"is-hover")},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((function(){t.data.list.splice(e,1),setTimeout((function(){s.a.$emit("on-history-add-"+t.formKey)}),20)}))},handleWidgetClone:function(e){var t=this,n=Math.random().toString(36).slice(-8),i=u(u({},a.a.cloneDeep(this.data.list[e])),{},{key:n,model:this.data.list[e].type+"_"+n});this.data.list.splice(e+1,0,i),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!1}}},f=n("2877"),p=Object(f.a)(d,(function(){var e=this,t=e._self._c;return t("div",[e.element&&e.element.key&&"divider"!=e.element.type&&"alert"!=e.element.type?t("div",{ref:"widgetFormItem",staticClass:"widget-view",class:{active:e.selectWidget.key==e.element.key,is_req:e.element.options.required,is_hidden:e.element.options.hidden},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-form-item",{class:Object(i.a)(Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),"fm-label-wrap",e.element.options.labelWrap),attrs:{label:e.element.options.hideLabel?"":e.$t(e.element.name),"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":""}},[e.element.options.tip?t("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:e._s(e.getTip(e.element.options.tip))}}):e._e(),t("widget-element-item",{key:e.element.key,attrs:{element:e.element,"is-table":!1}})],1),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])],1):e._e(),e.element&&e.element.key&&("divider"==e.element.type||"alert"==e.element.type)?t("div",{ref:"widgetFormItem",staticClass:"widget-view no-put",class:{active:e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden},staticStyle:{"padding-bottom":"0"},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-form-item",{attrs:{"label-width":"0"}},["divider"==e.element.type?t("el-divider",e._b({attrs:{"content-position":e.element.options.contentPosition}},"el-divider",e.element.options.customProps,!1),[e._v("\n "+e._s(e.$t(e.element.name))+"\n ")]):e._e(),"alert"==e.element.type?t("el-alert",e._b({style:{width:e.element.options.width},attrs:{title:e.$t(e.element.options.title),type:e.element.options.type,description:e.$t(e.element.options.description),closable:e.element.options.closable,center:e.element.options.center,"show-icon":e.element.options.showIcon,effect:e.element.options.effect}},"el-alert",e.element.options.customProps,!1)):e._e()],1),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])],1):e._e()])}),[],!1,null,null,null);t.a=p.exports},"71c1":function(e,t,n){var i=n("3a38"),o=n("25eb");e.exports=function(e){return function(t,n){var r,a,s=String(o(t)),l=i(n),c=s.length;return l<0||l>=c?e?"":void 0:(r=s.charCodeAt(l))<55296||r>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):r:e?s.slice(l,l+2):a-56320+(r-55296<<10)+65536}}},7514:function(e,t,n){"use strict";var i=n("5ca1"),o=n("0a49")(5),r=!0;"find"in[]&&Array(1).find((function(){r=!1})),i(i.P+i.F*r,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("find")},"75fc":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("f410"),o=n.n(i);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var a=n("f921"),s=n.n(a),l=n("d8d6"),c=n.n(l),u=n("d2d5"),d=n.n(u);function f(e){return function(e){if(o()(e))return r(e)}(e)||function(e){if(void 0!==s.a&&null!=e[c.a]||null!=e["@@iterator"])return d()(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?d()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},7618:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("f921"),o=n.n(i),r=n("d8d6"),a=n.n(r);function s(e){return(s="function"==typeof o.a&&"symbol"==typeof a.a?function(e){return typeof e}:function(e){return e&&"function"==typeof o.a&&e.constructor===o.a&&e!==o.a.prototype?"symbol":typeof e})(e)}},"765d":function(e,t,n){n("6718")("observable")},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(e,t,n){var i=n("4588"),o=Math.max,r=Math.min;e.exports=function(e,t){return(e=i(e))<0?o(e+t,0):r(e,t)}},"784d":function(e,t,n){},"794b":function(e,t,n){e.exports=!n("8e60")&&!n("294c")((function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a}))},"79aa":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"7a56":function(e,t,n){"use strict";var i=n("7726"),o=n("86cc"),r=n("9e1e"),a=n("2b4c")("species");e.exports=function(e){var t=i[e];r&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},"7a6e":function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=n("5531"),r=n("09cf"),a=n("6ca6"),s={name:"generate-card",components:{GenerateFormItem:o.default,GenerateInline:r.default,GenerateReport:function(){return Promise.resolve().then(n.bind(null,"4388"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"93bd"))},GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))}},props:["element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},computed:{padding:function(){return this.element.options.padding||"20px"},currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(a.c)(this.element.options.hidden)||!Object(a.a)(Object(a.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},methods:{},watch:{model:{deep:!0,handler:function(e){this.dataModels=e}}}},l=(n("c4f8"),n("2877")),c=Object(l.a)(s,(function(){var e,t,n=this,o=n._self._c;return n.elementDisplay?o("el-card",{class:Object(i.a)({},null===(e=n.element.options)||void 0===e?void 0:e.customClass,!(null===(t=n.element.options)||void 0===t||!t.customClass)),style:{width:n.element.options.width,"border-width":n.element.options.bordered?"1px":"0px","--padding":n.padding},attrs:{shadow:n.element.options.shadow,"body-style":{padding:n.element.options.padding}},scopedSlots:n._u([n.element.options.showHeader?{key:"header",fn:function(){return[o("div",[o("span",[n._v(n._s(n.$t(n.element.options.title)))])])]},proxy:!0}:null],null,!0)},[o("div",[n._l(n.element.list,(function(e){return["grid"==e.type?o("generate-col-item",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"tabs"==e.type?o("generate-tab-item",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"collapse"==e.type?o("generate-collapse",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"report"==e.type?o("generate-report",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"inline"==e.type?o("generate-inline",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"card"==e.type?o("generate-card",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):o("generate-form-item",{key:e.key,attrs:{models:n.dataModels,rules:n.rules,widget:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)})]}))],2)]):n._e()}),[],!1,null,null,null);t.default=c.exports},"7a77":function(e,t,n){"use strict";function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},"7aac":function(e,t,n){"use strict";var i=n("c532");e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,o,r,a){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(o)&&s.push("path="+o),i.isString(r)&&s.push("domain="+r),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"7bbc":function(e,t,n){var i=n("6821"),o=n("9093").f,r={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==r.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(i(e))}},"7cd6":function(e,t,n){var i=n("40c3"),o=n("5168")("iterator"),r=n("481b");e.exports=n("584a").getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||r[i(e)]}},"7e90":function(e,t,n){var i=n("d9f6"),o=n("e4ae"),r=n("c3a1");e.exports=n("8e60")?Object.defineProperties:function(e,t){o(e);for(var n,a=r(t),s=a.length,l=0;s>l;)i.f(e,n=a[l++],t[n]);return e}},"7f20":function(e,t,n){var i=n("86cc").f,o=n("69a8"),r=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,r)&&i(e,r,{configurable:!0,value:t})}},"7f7f":function(e,t,n){var i=n("86cc").f,o=Function.prototype,r=/^\s*function ([^ (]*)/;"name"in o||n("9e1e")&&i(o,"name",{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(e){return""}}})},8079:function(e,t,n){var i=n("7726"),o=n("1991").set,r=i.MutationObserver||i.WebKitMutationObserver,a=i.process,s=i.Promise,l="process"==n("2d95")(a);e.exports=function(){var e,t,n,c=function(){var i,o;for(l&&(i=a.domain)&&i.exit();e;){o=e.fn,e=e.next;try{o()}catch(i){throw e?n():t=void 0,i}}t=void 0,i&&i.enter()};if(l)n=function(){a.nextTick(c)};else if(!r||i.navigator&&i.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(c)}}else n=function(){o.call(i,c)};else{var d=!0,f=document.createTextNode("");new r(c).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(i){var o={fn:i,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},"811c":function(e,t,n){"use strict";n("17a4")},8125:function(e,t,n){"use strict";n("b6d8")},"81a6":function(e,t,n){},8378:function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},8436:function(e,t){e.exports=function(){}},"84f2":function(e,t){e.exports={}},"85a4":function(e,t,n){},"86a9":function(e,t,n){},"86cc":function(e,t,n){var i=n("cb7c"),o=n("c69a"),r=n("6a99"),a=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(i(e),t=r(t,!0),i(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},8791:function(e,t,n){"use strict";n.r(t);var i=n("bd86"),o=(n("8e6e"),n("cadf"),n("456d"),n("20d6"),n("ac6a"),n("5df3"),n("1c4c"),n("75fc")),r=(n("28a5"),n("6b54"),n("70fb")),a=n("67c8"),s=n("a141"),l=n("b76a"),c=n.n(l),u=n("2ef0"),d=n.n(u),f=n("ca17"),p=n("0f01"),m=n("4260");function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b={name:"widget-report",components:{Draggable:c.a,WidgetFormItem:r.a,WidgetTable:a.default,WidgetInline:s.a,WidgetColItem:function(){return Promise.resolve().then(n.bind(null,"956f"))},WidgetTabItem:function(){return Promise.resolve().then(n.bind(null,"1d67"))},WidgetSubForm:function(){return Promise.resolve().then(n.bind(null,"fa24"))},WidgetCollapse:function(){return Promise.resolve().then(n.bind(null,"ca11"))},WidgetCard:function(){return Promise.resolve().then(n.bind(null,"af3f"))},WidgetGroup:function(){return Promise.resolve().then(n.bind(null,"a071"))}},props:["element","select","index","data","platform","formKey","subform"],inject:["getDragging","setDragging"],data:function(){return{selectWidget:this.select||{},selectR:-1,selectC:-1,selectIndex:-1}},created:function(){this.element.headerRow||(this.element.headerRow=this.element.rows[0].columns.map((function(e){return{type:"th",options:{width:e.options.width},key:Math.random().toString(36).slice(-8)}})))},computed:{showRight:function(){if(this.selectR>=0&&this.selectC>=0){var e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan;if(this.selectC+t<this.element.rows[this.selectR].columns.length){var n=this.element.rows[this.selectR].columns[t+this.selectC];if(!n.options.invisible&&e==n.options.rowspan)return!0}}return!1},showBottom:function(){if(this.selectR>=0&&this.selectC>=0){var e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan;if(e+this.selectR<this.element.rows.length){var n=this.element.rows[e+this.selectR].columns[this.selectC];if(!n.options.invisible&&t==n.options.colspan)return!0}}return!1},showRemoveRow:function(){if(this.element.rows.length>1&&this.selectR>=0&&this.selectC>=0){var e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan;if(1==e)return!0;for(var t=0;t<this.element.rows[this.selectR].columns.length;t++)if(e!=this.element.rows[this.selectR].columns[t].options.rowspan||this.element.rows[this.selectR].columns[t].options.invisible)return!1;if(this.element.rows[this.selectR].columns.length==t)return!0}return!1},showRemoveColumn:function(){if(this.selectR>=0&&this.selectC>=0&&this.element.rows[this.selectR].columns.length>1){var e=this.element.rows[this.selectR].columns[this.selectC].options.colspan;if(1==e)return!0;for(var t=0;t<this.element.rows.length;t++)if(e!=this.element.rows[t].columns[this.selectC].options.colspan||this.element.rows[t].columns[this.selectC].options.invisible)return!1;if(this.element.rows.length==t)return!0}return!1},showSplitColumn:function(){return this.selectR>=0&&this.selectC>=0&&this.element.rows[this.selectR].columns[this.selectC].options.colspan>1},showSplitRow:function(){return this.selectR>=0&&this.selectC>=0&&this.element.rows[this.selectR].columns[this.selectC].options.rowspan>1}},methods:{handleMouseover:function(e){!this.getDragging()&&Object(m.a)(this.$refs.widgetReport,"is-hover")},handleMouseout:function(e){Object(m.j)(this.$refs.widgetReport,"is-hover")},handleMouseoverTD:function(e,t){!this.getDragging()&&Object(m.a)(this.$refs["widgetTD_".concat(e,"_").concat(t)][0],"is-hover")},handleMouseoutTD:function(e,t){Object(m.j)(this.$refs["widgetTD_".concat(e,"_").concat(t)][0],"is-hover")},handleMouseoverTH:function(e){!this.getDragging()&&Object(m.a)(this.$refs["widgetTH_".concat(e)][0],"is-hover")},handleMouseoutTH:function(e){Object(m.j)(this.$refs["widgetTH_".concat(e)][0],"is-hover")},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("dialog-put")>=0||n.children[0].className.split(" ").indexOf("dialog-put")>=0)},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleSelectItemWidget:function(e,t){this.selectWidget=this.data.list[this.index].rows[e].columns[t],this.selectR=e,this.selectC=t},handleSelectHeaderWidget:function(e){this.selectWidget=this.data.list[this.index].headerRow[e]},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){p.a.$emit("on-history-add-"+t.formKey)}),20)},handleWidgetItemAdd:function(e,t,n,i){var r=e.newIndex;Object(m.d)(t.rows[n].columns[i].list,r);var a=Math.random().toString(36).slice(-8);this.$set(t.rows[n].columns[i].list,r,d.a.cloneDeep(t.rows[n].columns[i].list[r])),this.$set(t.rows[n].columns[i].list,r,g(g({},t.rows[n].columns[i].list[r]),{},{options:g(g({},t.rows[n].columns[i].list[r].options),{},{remoteFunc:t.rows[n].columns[i].list[r].options.remoteFunc||"func_"+a,remoteOption:t.rows[n].columns[i].list[r].options.remoteOption||"option_"+a,tableColumn:!1,hideLabel:!0,subform:!!this.subform}),key:t.rows[n].columns[i].list[r].key?t.rows[n].columns[i].list[r].key:a,model:t.rows[n].columns[i].list[r].model?t.rows[n].columns[i].list[r].model:t.rows[n].columns[i].list[r].type+"_"+a,rules:t.rows[n].columns[i].list[r].rules?Object(o.a)(t.rows[n].columns[i].list[r].rules):[]})),"report"==t.rows[n].columns[i].list[r].type&&(t.rows[n].columns[i].list[r].rows=Object(m.f)(t.rows[n].columns[i].list[r].rows),t.rows[n].columns[i].list[r].headerRow=Object(m.g)(t.rows[n].columns[i].list[r].headerRow)),"grid"==t.rows[n].columns[i].list[r].type&&(t.rows[n].columns[i].list[r].columns=Object(m.e)(t.rows[n].columns[i].list[r].columns)),this.selectWidget=t.rows[n].columns[i].list[r],p.a.$emit("on-history-add-"+this.formKey)},handleWidgetItemUpdate:function(){p.a.$emit("on-history-add-"+this.formKey)},handleReportClone:function(e){var t=this,n=d.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(f.a)(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))}))},handleAddRow:function(e){var t=this,n=this.data.list[e].rows[this.data.list[e].rows.length-1].columns.length;this.data.list[e].rows.push({columns:Array.from({length:n},(function(e){return{type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)}}))}),this.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))},handleAddColumns:function(e){var t=this;this.data.list[e].headerRow.push({type:"th",options:{width:""},key:Math.random().toString(36).slice(-8)}),this.data.list[e].rows.forEach((function(e){e.columns.push({type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)})})),this.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))},insertColumns:function(e){this.element.headerRow.splice(e,0,{type:"th",options:{width:""},key:Math.random().toString(36).slice(-8)});for(var t=0;t<this.element.rows.length;t++){var n=this.findPrevColIndex(t,e);if(n!=e&&this.element.rows[t].columns[e].options.invisible){this.element.rows[t].columns.splice(e,0,{type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:"",invisible:!0},key:Math.random().toString(36).slice(-8)});var i=this.element.rows[t].columns[n].options.colspan;this.element.rows[t].columns[n].options.colspan=i+1;for(var o=0;o<i+1;o++)this.element.rows[t].columns[n+o].options.markCol=o}else this.element.rows[t].columns.splice(e,0,{type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)})}},insertRow:function(e){for(var t=this,n=[],i=0;i<this.element.rows[0].columns.length;i++){var o=this.findPrevRowIndex(e,i);o!=e&&this.element.rows[e].columns[i].options.invisible?(n.push({type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:"",invisible:!0},key:Math.random().toString(36).slice(-8)}),this.element.rows[o].columns[i].options.rowspan=this.element.rows[o].columns[i].options.rowspan+1):n.push({type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)})}this.element.rows.splice(e,0,{columns:n}),this.$nextTick((function(){for(var n=0;n<t.element.rows[e].columns.length;n++)if(t.element.rows[e].columns[n].options.invisible){var i=t.findPrevRowIndex(e-1,n);t.element.rows[i].columns[n].options.invisible||t.markTableItem(i,n)}}))},handleInsertLeft:function(){var e=this,t=this.selectC;this.insertColumns(t),this.selectC=this.selectC++,this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleInsertRight:function(){var e=this,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan>1?this.findNextColIndex(this.selectR,this.selectC+1):this.selectC+1;this.insertColumns(t),this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleInserBefore:function(){var e=this,t=this.selectR;this.insertRow(t),this.selectR=this.selectR++,this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleInserAfter:function(){var e=this,t=this.element.rows[this.selectR].columns[this.selectC].options.rowspan>1?this.findNextRowIndex(this.selectR+1,this.selectC):this.selectR+1;this.insertRow(t),this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},markTableItem:function(e,t){for(var n=this.element.rows[e].columns[t].options.colspan,i=this.element.rows[e].columns[t].options.rowspan,o=0;o<i;o++)for(var r=0;r<n;r++)this.element.rows[e+o].columns[t+r].options.markCol=r,this.element.rows[e+o].columns[t+r].options.markRow=o},handleRight:function(e){var t=this,n=e.options.colspan,i=this.selectC+n,r=this.element.rows[this.selectR].columns[i].options.colspan;this.$set(e.options,"colspan",n+r),this.element.rows[this.selectR].columns[i].options.invisible=!0;var a=Object(o.a)(this.element.rows[this.selectR].columns[i].list);this.element.rows[this.selectR].columns[i].list=[],e.list=e.list.concat(a),this.markTableItem(this.selectR,this.selectC),this.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))},handleBottom:function(e){var t=this,n=e.options.rowspan,i=this.selectR+n,r=this.element.rows[i].columns[this.selectC].options.rowspan;this.$set(e.options,"rowspan",n+r),this.element.rows[i].columns[this.selectC].options.invisible=!0;var a=Object(o.a)(this.element.rows[i].columns[this.selectC].list);this.element.rows[i].columns[this.selectC].list=[],e.list=e.list.concat(a),this.markTableItem(this.selectR,this.selectC),this.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))},handleSplitColumn:function(){for(var e=this,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan,n=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,i=0;i<t;i++)this.element.rows[this.selectR].columns[this.selectC+i].options.invisible=!1,this.element.rows[this.selectR].columns[this.selectC+i].options.colspan=1,this.element.rows[this.selectR].columns[this.selectC+i].options.rowspan=n,this.markTableItem(this.selectR,this.selectC+i);this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleSplitRow:function(){for(var e=this,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan,n=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,i=0;i<n;i++)this.element.rows[this.selectR+i].columns[this.selectC].options.invisible=!1,this.element.rows[this.selectR+i].columns[this.selectC].options.rowspan=1,this.element.rows[this.selectR+i].columns[this.selectC].options.colspan=t,this.markTableItem(this.selectR+i,this.selectC);this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},findPrevRowIndex:function(e,t){return e>=this.element.rows.length||!this.element.rows[e].columns[t].options.markRow?e:this.findPrevRowIndex(e-1,t)},findPrevColIndex:function(e,t){return t>=this.element.rows[e].columns.length||!this.element.rows[e].columns[t].options.markCol?t:this.findPrevColIndex(e,t-1)},findNextColIndex:function(e,t){return t>=this.element.rows[e].columns.length||!this.element.rows[e].columns[t].options.markCol?t:this.findNextColIndex(e,t+1)},findNextRowIndex:function(e,t){return e>=this.element.rows.length||!this.element.rows[e].columns[t].options.markRow?e:this.findNextRowIndex(e+1,t)},handleRemoveRow:function(){for(var e=this,t=0;t<this.element.rows[this.selectR].columns.length;t++){var n=this.element.rows[this.selectR].columns[t].options.rowspan,i=this.element.rows[this.selectR].columns[t].options.colspan;if(this.element.rows[this.selectR].columns[t].options.invisible){var r=this.findPrevRowIndex(this.selectR,t);r!=this.selectR&&this.element.rows[r].columns[t].options.rowspan>1&&(this.element.rows[r].columns[t].options.rowspan=this.element.rows[r].columns[t].options.rowspan-1)}else n>1&&(this.element.rows[this.selectR+1].columns[t].list=Object(o.a)(this.element.rows[this.selectR].columns[t].list),this.element.rows[this.selectR+1].columns[t].options.invisible=!1,this.element.rows[this.selectR+1].columns[t].options.rowspan=n-1,this.element.rows[this.selectR+1].columns[t].options.colspan=i,this.markTableItem(this.selectR+1,t))}this.element.rows.splice(this.selectR,1),this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleRemoveColumn:function(){for(var e=this,t=0;t<this.element.rows.length;t++){var n=this.element.rows[t].columns[this.selectC].options.colspan,i=this.element.rows[t].columns[this.selectC].options.rowspan;if(this.element.rows[t].columns[this.selectC].options.invisible){var r=this.findPrevColIndex(t,this.selectC);r!=this.selectC&&this.element.rows[t].columns[r].options.colspan>1&&(this.element.rows[t].columns[r].options.colspan=this.element.rows[t].columns[r].options.colspan-1)}else n>1&&(this.element.rows[t].columns[this.selectC+1].list=Object(o.a)(this.element.rows[t].columns[this.selectC].list),this.element.rows[t].columns[this.selectC+1].options.invisible=!1,this.element.rows[t].columns[this.selectC+1].options.colspan=n-1,this.element.rows[t].columns[this.selectC+1].options.rowspan=i,this.markTableItem(t,this.selectC+1));this.element.rows[t].columns.splice(this.selectC,1)}this.element.headerRow.splice(this.selectC,1),this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleSetColumnWidth:function(){this.selectWidget=this.data.list[this.index].headerRow[this.selectC]},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.list[e]:n.data.list[n.index]}))}},watch:{select:function(e){this.selectWidget=e,this.element.headerRow&&(this.selectIndex=this.element.headerRow.findIndex((function(t){return t.key===e.key})))},selectWidget:{deep:!1,handler:function(e){this.$emit("update:select",e),this.element.headerRow&&(this.selectIndex=this.element.headerRow.findIndex((function(t){return t.key===e.key})))}}}},v=n("2877"),y=Object(v.a)(b,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetReport",staticClass:"widget-report widget-view fm-report-table",class:{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("div",[t("table",{staticClass:"fm-report-table__table",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),style:{border:0,width:e.element.options.width||"auto"}},[t("tr",[e._l(e.element.headerRow,(function(n,i){return[t("th",{key:i,ref:"widgetTH_".concat(i),refInFor:!0,staticClass:"widget-report-item widget-report-header",class:{active:e.select.key&&e.select.key==n.key},style:{"border-style":"solid","border-width":e.element.options.borderWidth+"px","border-color":e.element.options.borderColor,width:n.options.width},attrs:{valign:"top"},on:{click:function(t){return t.stopPropagation(),e.handleSelectHeaderWidget(i)},mouseover:function(t){return t.stopPropagation(),e.handleMouseoverTH(i)},mouseout:function(t){return e.handleMouseoutTH(i)}}},[t("div",{staticStyle:{"text-align":"center",height:"10px","line-height":"10px","font-size":"12px"}},[e._v(e._s(n.options.width))])])]}))],2),e._l(e.element.rows,(function(n,o){return t("tr",{key:o},e._l(n.columns,(function(n,r){return n.options.invisible?e._e():t("td",{key:o+"-"+r,ref:"widgetTD_".concat(o,"_").concat(r),refInFor:!0,staticClass:"widget-report-item fm-report-table__td",class:Object(i.a)(Object(i.a)({active:e.selectWidget.key&&e.selectWidget.key==n.key},n.options.customClass,!!n.options.customClass),"selected",e.selectIndex==r&&1==n.options.colspan),style:{"border-style":"solid","border-width":e.element.options.borderWidth+"px","border-color":e.element.options.borderColor,width:n.options.width,height:n.options.height,"text-align":n.options.textAlign,"vertical-align":n.options.verticalAlign},attrs:{colspan:n.options.colspan,rowspan:n.options.rowspan,valign:"top"},on:{click:function(t){return t.stopPropagation(),e.handleSelectItemWidget(o,r)},mouseover:function(t){return t.stopPropagation(),e.handleMouseoverTD(o,r)},mouseout:function(t){return e.handleMouseoutTD(o,r)}}},[t("draggable",e._b({staticClass:"widget-col-list",style:{"text-align":n.options.textAlign,"vertical-align":n.options.verticalAlign},attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetItemAdd(t,e.element,o,r)},update:e.handleWidgetItemUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:n.list,callback:function(t){e.$set(n,"list",t)},expression:"column.list"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[e._l(n.list,(function(i,o){return i&&i.key?["tabs"===i.type?t("widget-tab-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"collapse"===i.type?t("widget-collapse",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"table"===i.type?t("widget-table",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"subform"===i.type?t("widget-sub-form",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"card"===i.type?t("widget-card",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"group"===i.type?t("widget-group",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"inline"===i.type?t("widget-inline",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"report"===i.type?t("widget-report",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"grid"!==i.type?t("widget-form-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):t("widget-col-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}})]:e._e()}))],2),e.selectWidget.key==n.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("el-dropdown",{attrs:{size:"small",trigger:"click"}},[t("span",{staticClass:"el-dropdown-link"},[t("i",{staticClass:"fm-iconfont icon-biaogeshezhi",attrs:{title:e.$t("fm.tooltip.cellsetting")}})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",{attrs:{command:"insertleft"},nativeOn:{click:function(t){return t.stopPropagation(),e.handleInsertLeft.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.insertcolumnleft")))]),t("el-dropdown-item",{attrs:{command:"insertright"},nativeOn:{click:function(t){return t.stopPropagation(),e.handleInsertRight.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.insertcolumnright")))]),t("el-dropdown-item",{attrs:{command:"insertbefore"},nativeOn:{click:function(t){return t.stopPropagation(),e.handleInserBefore.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.insertrowbefore")))]),t("el-dropdown-item",{attrs:{command:"insertafter"},nativeOn:{click:function(t){return t.stopPropagation(),e.handleInserAfter.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.insertrowafter")))]),t("el-dropdown-item",{attrs:{command:"right",disabled:!e.showRight,divided:""},nativeOn:{click:function(t){return t.stopPropagation(),e.handleRight(n)}}},[e._v(e._s(e.$t("fm.tooltip.mergeright")))]),t("el-dropdown-item",{attrs:{command:"bottom",disabled:!e.showBottom},nativeOn:{click:function(t){return t.stopPropagation(),e.handleBottom(n)}}},[e._v(e._s(e.$t("fm.tooltip.mergedown")))]),t("el-dropdown-item",{attrs:{command:"splitcolumns",divided:"",disabled:!e.showSplitColumn},nativeOn:{click:function(t){return t.stopPropagation(),e.handleSplitColumn.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.splitcolumns")))]),t("el-dropdown-item",{attrs:{command:"splitrows",disabled:!e.showSplitRow},nativeOn:{click:function(t){return t.stopPropagation(),e.handleSplitRow.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.splitrows")))]),t("el-dropdown-item",{attrs:{command:"removecolumn",disabled:!e.showRemoveColumn,divided:""},nativeOn:{click:function(t){return t.stopPropagation(),e.handleRemoveColumn.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.deletecolumn")))]),t("el-dropdown-item",{attrs:{command:"removerow",disabled:!e.showRemoveRow},nativeOn:{click:function(t){return t.stopPropagation(),e.handleRemoveRow.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.deleterow")))]),t("el-dropdown-item",{attrs:{command:"setcolwidth",disabled:1!==n.options.colspan,divided:""},nativeOn:{click:function(t){return t.stopPropagation(),e.handleSetColumnWidth.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.setcolwidth")))])],1)],1)],1):e._e(),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(n.type?e.$t("fm.components.fields."+n.type):""))])])],1)})),0)}))],2)]),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("i",{staticClass:"fm-iconfont icon--charuhang",attrs:{title:e.$t("fm.tooltip.addrow")},on:{click:function(t){return t.stopPropagation(),e.handleAddRow(e.index)}}}),t("i",{staticClass:"fm-iconfont icon--charulie",attrs:{title:e.$t("fm.tooltip.addcolumn")},on:{click:function(t){return t.stopPropagation(),e.handleAddColumns(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleReportClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-col-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?e.$t("fm.components.fields."+e.element.type):""))])])])}),[],!1,null,null,null);t.default=y.exports},"87b7":function(e,t,n){"use strict";n.r(t);n("a481");var i=n("bd86"),o=(n("7f7f"),n("8e6e"),n("7514"),n("7618")),r=(n("551c"),n("ac6a"),n("cadf"),n("456d"),n("6762"),n("2fdb"),n("99a1")),a=n("2ef0"),s=n.n(a),l=n("6ca6");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({components:{GenerateElementItem:r.default},props:["config","widget","models","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup","isTable","isMobile","tableName"],data:function(){return{dataModel:Object.keys(this.models).includes(this.widget.model)?this.models[this.widget.model]:s.a.cloneDeep(this.widget.options.defaultValue),dataModels:this.models,formItemComponent:null}},mounted:function(){this.formItemComponent=this.$refs.generateFormItem},computed:{labelWidth:function(){return this.widget.options.hideLabel?"0px":this.widget.options.isLabelWidth?this.widget.options.labelWidth+"px":this.config.labelWidth+"px"},ruleProp:function(){var e=this.widget.model;return this.group&&(e=this.group+"."+e),e},currentOptions:function(){var e,t;return this.isTable||this.isSubform?{value:this.dataModel,fieldNode:this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,currentRef:null===(e=this.$refs.generateElementItem)||void 0===e?void 0:e.$refs["fm-".concat(this.widget.model)],rowIndex:this.rowIndex,row:s.a.cloneDeep(this.models),field:this.widget.model,group:this.group}:{value:this.dataModel,fieldNode:this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,currentRef:null===(t=this.$refs.generateElementItem)||void 0===t?void 0:t.$refs["fm-".concat(this.widget.model)],field:this.widget.model,group:this.group}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,t=this.group?this.group+"."+this.widget.model:this.widget.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.widget.options.hidden?!this.widget.options.hidden:!Object(l.c)(this.widget.options.hidden)||!Object(l.a)(Object(l.b)(this.widget.options.hidden),this.currentOptions,this.formContext)},groupNode:function(){return this.group?this.group+"."+this.widget.model:this.widget.model},elementNode:function(){return this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model}},inject:{setSubformData:{default:function(){}},setDialogData:{default:function(){}},setGroupData:{default:function(){}},setTableData:{default:function(){}},getFormComponent:{default:function(){return null}},onChange:{default:function(){}},dynamicHideFields:{default:{}},dynamicValueData:{default:[]},formContext:{default:{}},generateFormItemContext:{default:function(){}},deleteFormItemContext:{default:function(){}},sendRequest:{default:function(){}}},created:function(){this.refreshDynamicValue()}},"mounted",(function(){this.generateFormItemContext(this.elementNode,this)})),"beforeDestroy",(function(){this.deleteFormItemContext(this.elementNode)})),"methods",{refreshDynamicValue:function(e){var t=this;return new Promise((function(n,i){if(t.widget.options.isDynamicValue&&"datasource"==t.widget.options.dynamicValueType&&t.widget.options.dynamicValueDataSource){var r=t.group?t.group+"."+t.widget.model+"."+t.widget.options.dynamicValueDataSource:t.widget.model+"."+t.widget.options.dynamicValueDataSource,a=u({},t.widget.options.dynamicValueArgs);for(var c in a)Object(l.c)(a[c])&&(a[c]=Object(l.a)(Object(l.b)(a[c]),t.currentOptions,t.formContext));e&&"object"===Object(o.a)(e)&&(a=u(u({},a),e));var d=t.dynamicValueData.find((function(e){return e.key===r&&s.a.isEqual(e.args,a)}));if(d)if(t.widget.options.dynamicValueStruct)try{t.dataModel=new Function("data","return data.".concat(t.widget.options.dynamicValueStruct))(d.value),n(t.dataModel)}catch(e){i(e)}else t.dataModel=d.value,n(t.dataModel);else t.sendRequest(t.widget.options.dynamicValueDataSource,a).then((function(e){if(t.widget.options.dynamicValueStruct)try{t.dataModel=new Function("data","return data.".concat(t.widget.options.dynamicValueStruct))(e),n(t.dataModel)}catch(e){i(e)}else t.dataModel=e,n(t.dataModel)}))}if(t.widget.options.isDynamicValue&&"fx"==t.widget.options.dynamicValueType&&t.widget.options.dynamicValueFx){var f=Object(l.a)(t.widget.options.dynamicValueFx,t.currentOptions,t.formContext);null!==f&&t.$nextTick((function(){t.dataModel=f})),n(f)}}))}}),"watch",{dataModel:{deep:!0,handler:function(e,t){var n=this;if(JSON.stringify(e)==JSON.stringify(t))return!1;this.isTable?this.setTableData(e,this.rowIndex,this.widget.model):this.isSubform?this.setSubformData(e,this.rowIndex,this.widget.model):this.isDialog?this.setDialogData(e,this.widget.model):this.isGroup?this.setGroupData(e,this.widget.model):this.onChange(e,this.widget.model),this.$nextTick((function(){if(n.eventFunction.onFormChange&&n.eventFunction.onFormChange(n.currentOptions),n.widget.events&&n.widget.events.onChange){var e=n.widget.events.onChange;n.eventFunction[e](n.currentOptions)}}))}},models:{deep:!0,handler:function(e){this.dataModels=e,this.dataModel=Object.keys(e).includes(this.widget.model)?e[this.widget.model]:s.a.cloneDeep(this.widget.options.defaultValue)}}}),f=(n("5f53"),n("2877")),p=Object(f.a)(d,(function(){var e,t=this,n=t._self._c;return t.widget.key?n("div",{staticClass:"fm-form-item",style:{"--labelWidth":t.labelWidth},attrs:{"data-id":t.widget.model}},["divider"!=t.widget.type&&"alert"!=t.widget.type&&t.elementDisplay?n("a-form-model-item",{key:t.widget.key,ref:"generateFormItem",class:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},t.widget.options&&t.widget.options.customClass,!(!t.widget.options||!t.widget.options.customClass)),"no-label-form-item",t.widget.options.isLabelWidth&&0==t.widget.options.labelWidth),"no-label-left",""===t.widget.name),"fm-label-wrap",t.widget.options.labelWrap),attrs:{prop:t.fieldNode?"".concat(t.fieldNode,".").concat(t.widget.model):t.widget.model,rules:t.rules[t.ruleProp],label:t.widget.options.hideLabel||t.isTable&&!t.isMobile?"":t.widget.name,required:t.widget.options.required,colon:!(null===(e=t.config)||void 0===e||!e.labelSuffix),validateFirst:""}},[t.widget.options.tip?n("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:t._s(t.widget.options.tip.replace(/\n/g,"<br/>"))}}):t._e(),n("generate-element-item",{key:t.widget.key,ref:"generateElementItem",attrs:{blanks:t.blanks,"is-table":t.isTable,"table-name":t.tableName,widget:t.widget,models:t.dataModels,remote:t.remote,edit:t.edit,"remote-option":t.remoteOption,rules:t.rules,platform:t.platform,preview:t.preview,"data-source-value":t.dataSourceValue,"event-function":t.eventFunction,"container-key":t.containerKey,"print-read":t.printRead,config:t.config,"is-subform":t.isSubform,"row-index":t.rowIndex,"sub-name":t.subName,"is-dialog":t.isDialog,"dialog-name":t.dialogName,"is-group":t.isGroup,group:t.group,"field-node":t.fieldNode?t.fieldNode+"."+t.widget.model:t.widget.model,"form-item-component":t.formItemComponent},scopedSlots:t._u([t._l(t.blanks,(function(e){return{key:e.name,fn:function(n){return[t._t(e.name,null,{model:n.model})]}}}))],null,!0),model:{value:t.dataModel,callback:function(e){t.dataModel=e},expression:"dataModel"}})],1):t._e(),"divider"==t.widget.type&&t.elementDisplay?n("a-form-model-item",{staticClass:"fill-form-item",attrs:{wrapperCol:{offset:0}}},[n("a-divider",t._b({ref:"fm-"+t.widget.model,attrs:{orientation:t.widget.options.contentPosition}},"a-divider",t.widget.options.customProps,!1),[t._v("\n "+t._s(t.widget.name)+"\n ")])],1):t._e(),"alert"==t.widget.type&&t.elementDisplay?n("a-form-model-item",{staticClass:"fill-form-item",attrs:{wrapperCol:{offset:0}}},[n("a-alert",t._b({ref:"fm-"+t.widget.model,style:{width:t.widget.options.width},attrs:{message:t.widget.options.title,type:t.widget.options.type,description:t.widget.options.description,closable:t.widget.options.closable,center:t.widget.options.center,"show-icon":t.widget.options.showIcon,effect:t.widget.options.effect}},"a-alert",t.widget.options.customProps,!1))],1):t._e()],1):t._e()}),[],!1,null,null,null);t.default=p.exports},"8a81":function(e,t,n){"use strict";var i=n("7726"),o=n("69a8"),r=n("9e1e"),a=n("5ca1"),s=n("2aba"),l=n("67ab").KEY,c=n("79e5"),u=n("5537"),d=n("7f20"),f=n("ca5a"),p=n("2b4c"),m=n("37c8"),h=n("3a72"),g=n("d4c0"),b=n("1169"),v=n("cb7c"),y=n("d3f4"),_=n("4bf8"),w=n("6821"),x=n("6a99"),k=n("4630"),O=n("2aeb"),C=n("7bbc"),S=n("11e9"),D=n("2621"),P=n("86cc"),E=n("0d58"),j=S.f,M=P.f,F=C.f,T=i.Symbol,I=i.JSON,$=I&&I.stringify,R=p("_hidden"),A=p("toPrimitive"),L={}.propertyIsEnumerable,N=u("symbol-registry"),W=u("symbols"),V=u("op-symbols"),z=Object.prototype,B="function"==typeof T&&!!D.f,K=i.QObject,U=!K||!K.prototype||!K.prototype.findChild,H=r&&c((function(){return 7!=O(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=j(z,t);i&&delete z[t],M(e,t,n),i&&e!==z&&M(z,t,i)}:M,G=function(e){var t=W[e]=O(T.prototype);return t._k=e,t},q=B&&"symbol"==typeof T.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof T},X=function(e,t,n){return e===z&&X(V,t,n),v(e),t=x(t,!0),v(n),o(W,t)?(n.enumerable?(o(e,R)&&e[R][t]&&(e[R][t]=!1),n=O(n,{enumerable:k(0,!1)})):(o(e,R)||M(e,R,k(1,{})),e[R][t]=!0),H(e,t,n)):M(e,t,n)},J=function(e,t){v(e);for(var n,i=g(t=w(t)),o=0,r=i.length;r>o;)X(e,n=i[o++],t[n]);return e},Y=function(e){var t=L.call(this,e=x(e,!0));return!(this===z&&o(W,e)&&!o(V,e))&&(!(t||!o(this,e)||!o(W,e)||o(this,R)&&this[R][e])||t)},Q=function(e,t){if(e=w(e),t=x(t,!0),e!==z||!o(W,t)||o(V,t)){var n=j(e,t);return!n||!o(W,t)||o(e,R)&&e[R][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=F(w(e)),i=[],r=0;n.length>r;)o(W,t=n[r++])||t==R||t==l||i.push(t);return i},ee=function(e){for(var t,n=e===z,i=F(n?V:w(e)),r=[],a=0;i.length>a;)!o(W,t=i[a++])||n&&!o(z,t)||r.push(W[t]);return r};B||(s((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===z&&t.call(V,n),o(this,R)&&o(this[R],e)&&(this[R][e]=!1),H(this,e,k(1,n))};return r&&U&&H(z,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",(function(){return this._k})),S.f=Q,P.f=X,n("9093").f=C.f=Z,n("52a7").f=Y,D.f=ee,r&&!n("2d00")&&s(z,"propertyIsEnumerable",Y,!0),m.f=function(e){return G(p(e))}),a(a.G+a.W+a.F*!B,{Symbol:T});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)p(te[ne++]);for(var ie=E(p.store),oe=0;ie.length>oe;)h(ie[oe++]);a(a.S+a.F*!B,"Symbol",{for:function(e){return o(N,e+="")?N[e]:N[e]=T(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in N)if(N[t]===e)return t},useSetter:function(){U=!0},useSimple:function(){U=!1}}),a(a.S+a.F*!B,"Object",{create:function(e,t){return void 0===t?O(e):J(O(e),t)},defineProperty:X,defineProperties:J,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:ee});var re=c((function(){D.f(1)}));a(a.S+a.F*re,"Object",{getOwnPropertySymbols:function(e){return D.f(_(e))}}),I&&a(a.S+a.F*(!B||c((function(){var e=T();return"[null]"!=$([e])||"{}"!=$({a:e})||"{}"!=$(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=t=i[1],(y(t)||void 0!==e)&&!q(e))return b(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),i[1]=t,$.apply(I,i)}}),T.prototype[A]||n("32e9")(T.prototype,A,T.prototype.valueOf),d(T,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},"8b97":function(e,t,n){var i=n("d3f4"),o=n("cb7c"),r=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{(i=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return r(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:r}},"8bbf":function(e,t){e.exports=require("vue")},"8df4":function(e,t,n){"use strict";var i=n("7a77");function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},"8e56":function(e,t,n){"use strict";n("1b92")},"8e60":function(e,t,n){e.exports=!n("294c")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"8e6e":function(e,t,n){var i=n("5ca1"),o=n("990b"),r=n("6821"),a=n("11e9"),s=n("f1ae");i(i.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,i=r(e),l=a.f,c=o(i),u={},d=0;c.length>d;)void 0!==(n=l(i,t=c[d++]))&&s(u,t,n);return u}})},"8f40":function(e,t,n){},"8f60":function(e,t,n){"use strict";var i=n("a159"),o=n("aebd"),r=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(a,{next:o(1,n)}),r(e,t+" Iterator")}},9003:function(e,t,n){var i=n("6b4c");e.exports=Array.isArray||function(e){return"Array"==i(e)}},9058:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("20d6");var i=n("75fc"),o=(n("28a5"),n("6762"),n("2fdb"),n("ac6a"),function(e,t,n,r){for(var a=0;a<e.length;a++)if("grid"===e[a].type)e[a].columns.forEach((function(e){o(e.list,t,n,r)}));else if("tabs"===e[a].type)e[a].tabs.forEach((function(e){o(e.list,t,n,r)}));else if("collapse"===e[a].type)e[a].tabs.forEach((function(e){o(e.list,t,n,r)}));else if("report"===e[a].type)e[a].rows.forEach((function(e){e.columns.forEach((function(e){o(e.list,t,n,r)}))}));else if("inline"===e[a].type)o(e[a].list,t,n,r);else if("card"===e[a].type)o(e[a].list,t,n,r);else if(1===t.length){if(e[a].model===t[0]&&("add"!=r||e[a].options.customClass.split(" ").includes(n)||(e[a].options.customClass=[].concat(Object(i.a)(e[a].options.customClass.split(" ")),[n]).join(" ")),"remove"==r&&e[a].options.customClass.split(" ").includes(n))){var s=e[a].options.customClass.split(" ");s.splice(s.findIndex((function(e){return e==n})),1),e[a].options.customClass=s.join(" ")}}else if(e[a].model===t[0]){var l=Object(i.a)(t);l.splice(0,1),"table"===e[a].type&&o(e[a].tableColumns,l,n,r),"subform"===e[a].type&&o(e[a].list,l,n,r),"group"===e[a].type&&o(e[a].list,l,n,r),"dialog"===e[a].type&&o(e[a].list,l,n,r)}})},"908f":function(e,t,n){"use strict";n.r(t);n("7f7f"),n("6762"),n("2fdb");var i=n("bd86"),o=n("87b7"),r=n("9195"),a=n("6ca6"),s={name:"generate-col-item",components:{GenerateFormItem:o.default,GenerateInline:r.default,GenerateReport:function(){return Promise.resolve().then(n.bind(null,"e66c"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"d6ee"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bec1"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"093a"))}},props:["config","element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model,hideCols:[]}},computed:{currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(a.c)(this.element.options.hidden)||!Object(a.a)(Object(a.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},methods:{getColXS:function(e){return this.preview?"pc"==this.platform?e.md:"pad"==this.platform?e.sm:"mobile"==this.platform?e.xs:void 0:e.xs},getColSM:function(e){return this.preview?"pc"==this.platform?e.md:"pad"==this.platform?e.sm:"mobile"==this.platform?e.xs:void 0:e.sm},getColMD:function(e){return this.preview?"pc"==this.platform?e.md:"pad"==this.platform?e.sm:"mobile"==this.platform?e.xs:void 0:e.md},hideCol:function(e){!this.hideCols.includes(e)&&this.hideCols.push(e)},displayCol:function(e){this.hideCols.includes(e)&&this.hideCols.splice(this.hideCols.indexOf(e),1)}},watch:{model:{deep:!0,handler:function(e){this.dataModels=e}}}},l=n("2877"),c=Object(l.a)(s,(function(){var e=this,t=e._self._c;return e.elementDisplay?t("a-row",{class:Object(i.a)({},e.element.options&&e.element.options.customClass,!(!e.element.options||!e.element.options.customClass)),attrs:{type:e.element.options.flex?"flex":void 0,gutter:e.element.options.gutter||0,justify:e.element.options.justify,align:e.element.options.align}},e._l(e.element.columns,(function(n,o){return e.hideCols.includes(o)?e._e():t("a-col",{key:o,class:Object(i.a)({},n.options&&n.options.customClass,!(!n.options||!n.options.customClass)),attrs:{xs:n.options?e.getColXS(n.options):n.span,sm:n.options?e.getColXS(n.options):n.span,md:n.options?e.getColSM(n.options):n.span,lg:n.options?e.getColMD(n.options):n.span,offset:n.options?n.options.offset:0,push:n.options?n.options.push:0,pull:n.options?n.options.pull:0}},[e._l(n.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.dataModels,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)})),1):e._e()}),[],!1,null,null,null);t.default=c.exports},9093:function(e,t,n){var i=n("ce10"),o=n("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},9138:function(e,t,n){e.exports=n("35e8")},9195:function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=n("87b7"),r=n("6ca6"),a={name:"generate-inline",components:{GenerateFormItem:o.default},props:["config","element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model}},computed:{currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(r.c)(this.element.options.hidden)||!Object(r.a)(Object(r.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},methods:{},watch:{model:{deep:!0,handler:function(e){this.dataModels=this.model}}}},s=(n("1a6b"),n("2877")),l=Object(s.a)(a,(function(){var e=this,t=e._self._c;return e.elementDisplay?t("div",{staticClass:"fm-inline-container",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!(!e.element.options||!e.element.options.customClass)),style:{display:e.element.options.flex?"flex":"block","flex-direction":"row","flex-wrap":"wrap","justify-content":e.element.options.flexJustify||"normal","align-items":e.element.options.flexAlign||"normal"}},[e._l(e.element.list,(function(n){return[t("generate-form-item",{key:n.key,style:{"margin-right":e.element.options.spaceSize+"px"},attrs:{models:e.dataModels,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2):e._e()}),[],!1,null,null,null);t.default=l.exports},"932c":function(e,t,n){},"93bd":function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=n("7618"),r=(n("7514"),n("5531")),a=n("09cf"),s=n("6ca6"),l={name:"generate-collapse",components:{GenerateFormItem:r.default,GenerateInline:a.default,GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"4388"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"7a6e"))}},props:["element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model,tabActive:this.element.tabs.length?[this.element.tabs[0].name]:""}},computed:{currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(s.c)(this.element.options.hidden)||!Object(s.a)(Object(s.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},methods:{activateCollapse:function(e){var t=this;if("string"==typeof e){var n=this.element.tabs.find((function(t){return t.title==e}));n&&(this.tabActive=n.name)}if("object"===Object(o.a)(e)&&Array.isArray(e)){var i=e.map((function(e){var n=t.element.tabs.find((function(t){return t.title==e}));return n?n.name:""}));this.tabActive=i}}},watch:{model:{deep:!0,handler:function(e){this.dataModels=this.model}}}},c=n("2877"),u=Object(c.a)(l,(function(){var e=this,t=e._self._c;return e.elementDisplay?t("el-collapse",{class:Object(i.a)({},e.element.options.customClass,!!e.element.options.customClass),staticStyle:{"margin-bottom":"18px"},attrs:{accordion:e.element.options.accordion},model:{value:e.tabActive,callback:function(t){e.tabActive=t},expression:"tabActive"}},e._l(e.element.tabs,(function(n){return t("el-collapse-item",{key:n.name,attrs:{title:e.$t(n.title),name:n.name}},[e._l(n.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.dataModels,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)})),1):e._e()}),[],!1,null,null,null);t.default=u.exports},"956f":function(e,t,n){"use strict";n.r(t);var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("75fc")),r=(n("6b54"),n("28a5"),n("70fb")),a=n("67c8"),s=n("1d67"),l=n("a141"),c=n("b76a"),u=n.n(c),d=n("2ef0"),f=n.n(d),p=n("ca17"),m=n("0f01"),h=n("4260");function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={name:"widget-col-item",components:{Draggable:u.a,WidgetFormItem:r.a,WidgetTable:a.default,WidgetTabItem:s.default,WidgetInline:l.a,WidgetReport:function(){return Promise.resolve().then(n.bind(null,"8791"))},WidgetCollapse:function(){return Promise.resolve().then(n.bind(null,"ca11"))},WidgetSubForm:function(){return Promise.resolve().then(n.bind(null,"fa24"))},WidgetCard:function(){return Promise.resolve().then(n.bind(null,"af3f"))},WidgetGroup:function(){return Promise.resolve().then(n.bind(null,"a071"))}},props:["element","select","index","data","platform","formKey","subform"],inject:["getDragging","setDragging"],data:function(){return{selectWidget:this.select||{},selectIndex:-1}},methods:{handleMouseover:function(e){!this.getDragging()&&Object(h.a)(this.$refs.widgetCol,"is-hover")},handleMouseout:function(e){Object(h.j)(this.$refs.widgetCol,"is-hover")},handleMouseoverCol:function(e){Object(h.a)(this.$refs.widgetColItem[e].$el,"is-hover")},handleMouseoutCol:function(e){!this.getDragging()&&Object(h.j)(this.$refs.widgetColItem[e].$el,"is-hover")},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("dialog-put")>=0||n.children[0].className.split(" ").indexOf("dialog-put")>=0)},getColSpan:function(e){return"pc"==this.platform?e&&e.md:"pad"==this.platform?e&&e.sm:"mobile"==this.platform?e&&e.xs:void 0},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleSelectItemWidget:function(e){this.selectWidget=this.data.list[this.index].columns[e],this.selectIndex=e},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){m.a.$emit("on-history-add-"+t.formKey)}),20)},handleColItemDelete:function(e,t){var n=this;this.data.list[e].columns.splice(t,1),this.selectWidget=0==t?this.data.list[e].columns[0]:this.data.list[e].columns[t-1],setTimeout((function(){m.a.$emit("on-history-add-"+n.formKey)}),20)},handleAddCol:function(e){var t=this;this.data.list[e].columns.push({type:"col",options:{span:24,offset:0,push:0,pull:0,xs:24,sm:24,md:24,lg:24,xl:24,customClass:""},list:[],key:Math.random().toString(36).slice(-8)}),this.$nextTick((function(){m.a.$emit("on-history-add-"+t.formKey)}))},handleColClone:function(e){var t=this,n=f.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(p.a)(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){m.a.$emit("on-history-add-"+t.formKey)}))}))},handleColItemClone:function(e,t){var n=this,i=f.a.cloneDeep(this.data.list[e].columns[t]);this.data.list[e].columns.splice(t+1,0,Object(p.a)(i)),this.$nextTick((function(){n.selectWidget=n.data.list[e].columns[t+1],n.$nextTick((function(){m.a.$emit("on-history-add-"+n.formKey)}))}))},handleWidgetColUpdate:function(e){var t=this;this.$nextTick((function(){m.a.$emit("on-history-add-"+t.formKey)}))},handleWidgetColAdd:function(e,t,n){var i=this,r=e.newIndex;Object(h.d)(t.columns[n].list,r),this.$set(t.columns[n].list,r,f.a.cloneDeep(t.columns[n].list[r]));var a=Math.random().toString(36).slice(-8);this.$set(t.columns[n].list,r,b(b({},t.columns[n].list[r]),{},{options:b(b({},t.columns[n].list[r].options),{},{remoteFunc:t.columns[n].list[r].options.remoteFunc||"func_"+a,remoteOption:t.columns[n].list[r].options.remoteOption||"option_"+a,tableColumn:!1,subform:!!this.subform}),novalid:b({},t.columns[n].list[r].novalid),key:t.columns[n].list[r].key?t.columns[n].list[r].key:a,model:t.columns[n].list[r].model?t.columns[n].list[r].model:t.columns[n].list[r].type+"_"+a,rules:t.columns[n].list[r].rules?Object(o.a)(t.columns[n].list[r].rules):[]})),"report"==t.columns[n].list[r].type&&(t.columns[n].list[r].rows=Object(h.f)(t.columns[n].list[r].rows),t.columns[n].list[r].headerRow=Object(h.g)(t.columns[n].list[r].headerRow)),"grid"==t.columns[n].list[r].type&&(t.columns[n].list[r].columns=Object(h.e)(t.columns[n].list[r].columns)),this.selectWidget=t.columns[n].list[r],this.$nextTick((function(){m.a.$emit("on-history-add-"+i.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.list[e]:{}}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!1,handler:function(e){this.$emit("update:select",e)}}}},y=n("2877"),_=Object(y.a)(v,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetCol",staticClass:"widget-col widget-view",class:{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-row",{class:Object(i.a)({},e.element.options&&e.element.options.customClass,!(!e.element.options||!e.element.options.customClass)),attrs:{type:e.element.options.flex?"flex":"",gutter:e.element.options.gutter||0,justify:e.element.options.justify,align:e.element.options.align}},e._l(e.element.columns,(function(n,o){return t("el-col",{key:n.key,ref:"widgetColItem",refInFor:!0,staticClass:"widget-col-item",class:Object(i.a)({active:e.selectWidget.key&&e.selectWidget.key==n.key},n.options&&n.options.customClass,!(!n.options||!n.options.customClass)),attrs:{span:e.getColSpan(n.options),offset:n.options?n.options.offset:0,push:n.options?n.options.push:0,pull:n.options?n.options.pull:0},nativeOn:{click:function(t){return t.stopPropagation(),e.handleSelectItemWidget(o)},mouseover:function(t){return t.stopPropagation(),e.handleMouseoverCol(o)},mouseout:function(t){return e.handleMouseoutCol(o)}}},[t("draggable",e._b({staticClass:"widget-col-list",attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetColAdd(t,e.element,o)},update:e.handleWidgetColUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:n.list,callback:function(t){e.$set(n,"list",t)},expression:"item.list"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[e._l(n.list,(function(i,o){return i&&i.key?["grid"===i.type?t("widget-col-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"tabs"===i.type?t("widget-tab-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"collapse"===i.type?t("widget-collapse",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"report"===i.type?t("widget-report",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"table"===i.type?t("widget-table",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"subform"===i.type?t("widget-sub-form",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"card"===i.type?t("widget-card",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"group"===i.type?t("widget-group",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"inline"===i.type?t("widget-inline",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):t("widget-form-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}})]:e._e()}))],2),e.selectWidget.key==n.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleColItemClone(e.index,o)}}}),e.element.columns.length>1?t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleColItemDelete(e.index,o)}}}):e._e()]):e._e(),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(n.type?e.$t("fm.components.fields."+n.type):""))])])],1)})),1),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("i",{staticClass:"fm-iconfont icon-tianjiazengjiajia",attrs:{title:e.$t("fm.actions.addColumn")},on:{click:function(t){return t.stopPropagation(),e.handleAddCol(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleColClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-col-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?e.$t("fm.components.fields."+e.element.type):""))])])],1)}),[],!1,null,null,null);t.default=_.exports},"96cf":function(e,t){!function(t){"use strict";var n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag",l="object"==typeof e,c=t.regeneratorRuntime;if(c)l&&(e.exports=c);else{(c=t.regeneratorRuntime=l?e.exports:{}).wrap=h;var u={},d={};d[r]=function(){return this};var f=Object.getPrototypeOf,p=f&&f(f(S([])));p&&p!==n&&i.call(p,r)&&(d=p);var m=y.prototype=b.prototype=Object.create(d);v.prototype=m.constructor=y,y.constructor=v,y[s]=v.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(m),e},c.awrap=function(e){return{__await:e}},_(w.prototype),w.prototype[a]=function(){return this},c.AsyncIterator=w,c.async=function(e,t,n,i){var o=new w(h(e,t,n,i));return c.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},_(m),m[s]="Generator",m[r]=function(){return this},m.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},c.values=S,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(s&&l){if(this.prev<r.catchLoc)return n(r.catchLoc,!0);if(this.prev<r.finallyLoc)return n(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return n(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return n(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function h(e,t,n,i){var o=t&&t.prototype instanceof b?t:b,r=Object.create(o.prototype),a=new C(i||[]);return r._invoke=function(e,t,n){var i="suspendedStart";return function(o,r){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw r;return D()}for(n.method=o,n.arg=r;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=g(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function g(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function b(){}function v(){}function y(){}function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function w(e){var t;this._invoke=function(n,o){function r(){return new Promise((function(t,r){!function t(n,o,r,a){var s=g(e[n],e,o);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,r,a)}),(function(e){t("throw",e,r,a)})):Promise.resolve(c).then((function(e){l.value=e,r(l)}),a)}a(s.arg)}(n,o,t,r)}))}return t=t?t.then(r,r):r()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var i=g(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,u;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function S(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:D}}function D(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},9803:function(e,t,n){},"990b":function(e,t,n){var i=n("9093"),o=n("2621"),r=n("cb7c"),a=n("7726").Reflect;e.exports=a&&a.ownKeys||function(e){var t=i.f(r(e)),n=o.f;return n?t.concat(n(e)):t}},"99a1":function(e,t,n){"use strict";n.r(t);n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("7f7f");var i=n("75fc"),o=n("7618"),r=(n("7514"),n("c5f6"),n("bd86"));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n("6762"),n("2fdb"),n("551c");var l=n("c7f0"),c=(n("6c7b"),n("28a5"),n("2ef0")),u=n.n(c),d=n("9058"),f=n("6ca6");function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h={components:{GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"87b7"))},GenerateElementItem:function(){return Promise.resolve().then(n.bind(null,"99a1"))}},props:["config","columns","value","models","remote","blanks","disableddata","rules","name","remoteOption","preview","platform","dataSourceValue","eventFunction","widget","containerKey","printRead","paging","pageSize","isAdd","isDelete","showControl","isDialog","dialogName","group","fieldNode"],data:function(){return{tableData:this.value||[],displayFields:{},disabledFields:{},changeItem:{},pagingData:[],pagingLength:0,currentPage:1,tableHideFields:[],tableDisabledFields:[],mobileScreen:window.innerWidth<768}},created:function(){for(var e=this,t=0;t<this.columns.length;t++)this.displayFields[this.columns[t].model]=!this.columns[t].options.hidden,this.disabledFields[this.columns[t].model]=this.columns[t].options.disabled;this.tableHideFields=this.value?this.value.map((function(t){return Object.fromEntries(Object.keys(e.displayFields).map((function(t){return[t,!e.displayFields[t]]})))})):[],this.tableDisabledFields=this.value?this.value.map((function(t){return Object.fromEntries(Object.keys(e.disabledFields).map((function(t){return[t,e.disabledFields[t]]})))})):[],window.addEventListener("resize",this.getMobileScreen),this.loadPagingData()},computed:{tableSize:function(){if(!this.config||!this.config.size)return"middle";switch(this.config.size){case"large":return"default";case"default":return"middle";case"small":return"small"}}},provide:function(){return{setTableData:this.setTableData}},inject:["onFormDisabled","dynamicHideFields","onFormHide","onFormDisplay","formContext"],methods:{columnDisplay:function(e,t){var n=this.group?"".concat(this.group,".").concat(this.widget.model,".").concat(e):"".concat(this.widget.model,".").concat(e);return null!=this.dynamicHideFields[n]?!this.dynamicHideFields[n]:"boolean"==typeof t.options.hidden?!t.options.hidden:!Object(f.c)(t.options.hidden)||!Object(f.a)(Object(f.b)(t.options.hidden),{},this.formContext)},getMobileScreen:function(){this.mobileScreen=window.innerWidth<768},setData:function(e,t){var n=this;return new Promise("number"!=typeof e?function(i){t=e,n.tableData.forEach((function(e,i){Object.keys(t).forEach((function(e){n.setTableData(t[e],i,e)}))})),i()}:function(i){n.$nextTick((function(){Object.keys(t).forEach((function(i){n.setTableData(t[i],e,i)})),i()}))})},setTableData:function(e,t,n){var i=u.a.cloneDeep(this.tableData);i[t][n]=e,this.tableData=i},handleAddRow:function(){for(var e=this,t={},n={},o={},r=0;r<this.columns.length;r++)"blank"===this.columns[r].type?t[this.columns[r].model]="String"==this.columns[r].options.defaultType?"":"Object"==this.columns[r].options.defaultType?{}:[]:"component"===this.columns[r].type||"link"===this.columns[r].type||"button"===this.columns[r].type?t[this.columns[r].model]=void 0:t[this.columns[r].model]=u.a.cloneDeep(this.columns[r].options.defaultValue),n[this.columns[r].model]=!this.displayFields[this.columns[r].model],o[this.columns[r].model]=this.disabledFields[this.columns[r].model];this.tableData=[].concat(Object(i.a)(this.tableData),[m({},t)]),this.tableHideFields.push(n),this.tableDisabledFields.push(o),this.changeItem={},this.$nextTick((function(){if(e.widget.events&&e.widget.events.onRowAdd){var t=e.widget.events.onRowAdd;e.eventFunction[t]({rowIndex:e.tableData.length-1,field:e.widget.model,currentRef:e,group:e.group,fieldNode:e.fieldNode})}e.paging&&(e.tableData.length>e.currentPage*e.pageSize&&(e.currentPage=parseInt((e.tableData.length-1)/e.pageSize)+1),e.loadPagingData())}))},handleRemove:function(e){var t=this,n=m({},this.tableData[e]),o=Object(i.a)(this.tableData);if(o.splice(e,1),this.tableData=o,this.widget.events&&this.widget.events.onRowRemove){var r=this.widget.events.onRowRemove;this.eventFunction[r]({removeIndex:e,removeData:n,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}this.changeItem={},this.pagingData=[],this.pagingLength=0,this.paging&&this.$nextTick((function(){t.tableData.length%t.pageSize==0&&t.currentPage>parseInt(t.tableData.length/t.pageSize)&&(t.currentPage=parseInt(t.tableData.length/t.pageSize)),t.loadPagingData()}))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},hideChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormHide("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},displayChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormDisplay("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},disabled:function(e,t){var n=this;"string"==typeof e&&(e=[e]);for(var i=0;i<this.columns.length;i++)e.indexOf(this.columns[i].model)>=0&&(this.$set(this.columns[i].options,"disabled",t),this.$set(this.disabledFields,this.columns[i].model,t));this.tableData.forEach((function(i,o){e.forEach((function(e){n.$set(n.tableDisabledFields[o],e,t)}))}))},disabledChild:function(e,t,n){var i=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){i.$set(i.tableDisabledFields[e],t,n),i.onFormDisabled("".concat(i.fieldNode,".").concat(e,".").concat(t),n)}))},setOptions:function(e,t){var n=this;"string"==typeof e&&(e=[e]);for(var i=function(i){e.indexOf(n.columns[i].model)>=0&&Object.keys(t).forEach((function(e){n.columns[i].options[e]=t[e]}))},o=0;o<this.columns.length;o++)i(o)},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.columns,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.columns,e.split("."),t,"remove")}))},handleTableChange:function(e){this.changeItem=e},handlePageChange:function(e){var t=this;if(this.currentPage=e,this.pagingData=[],this.pagingLength=0,this.$nextTick((function(){t.loadPagingData()})),this.widget&&this.widget.events&&this.widget.events.onPageChange){var n=this.widget.events.onPageChange;this.eventFunction[n]({currentPage:e,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}},loadPagingData:function(){var e,t=(this.currentPage-1)*this.pageSize,n=t+this.pageSize;this.pagingData=null===(e=this.tableData)||void 0===e?void 0:e.slice(t,n),this.pagingLength=this.pagingData.length}},beforeDestroy:function(){window.removeEventListener("resize",this.getMobileScreen)},watch:{value:function(e){this.tableData=e;for(var t=[],n=[],i=0;i<(null===(o=this.value)||void 0===o?void 0:o.length);i++){for(var o,r=this.value[i],a=Object.keys(r),s={},l={},c=0;c<a.length;c++){var u,d,f,p;s[a[c]]=(null===(u=this.tableHideFields)||void 0===u||null===(d=u[i])||void 0===d?void 0:d[a[c]])||!1,l[a[c]]=(null===(f=this.tableDisabledFields)||void 0===f||null===(p=f[i])||void 0===p?void 0:p[a[c]])||!1}t.push(s),n.push(l)}this.tableHideFields=t,this.tableDisabledFields=n},tableData:{deep:!0,handler:function(e){this.loadPagingData(),this.$emit("input",e)}}}},g=(n("ca14"),n("2877")),b=Object(g.a)(h,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"antd-form-table",class:{"is-disabled":e.disableddata}},[e.preview&&"mobile"!=e.platform||!e.preview&&!e.mobileScreen?t("a-table",{class:{"antd-form-table-pc":!e.preview},attrs:{dataSource:e.paging?Array(e.pagingLength).fill({}):e.tableData,pagination:!1,bordered:"","table-layout":"auto",size:e.tableSize}},[e.showControl?t("a-table-column",{key:"#",attrs:{scopedSlots:{customRender:"#"},title:"#","data-index":"#",fixed:"left",width:80},scopedSlots:e._u([{key:"default",fn:function(n,i,o){return[t("div",{staticClass:"scope-index"},[t("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+o+1))])]),t("div",{staticClass:"scope-action"},[t("a-popconfirm",{attrs:{disabled:e.disableddata,title:e.$t("fm.description.deleteConfirm")},on:{confirm:function(t){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+o)}}},[!e.printRead&&e.isDelete?t("a-button",{attrs:{disabled:e.disableddata,type:"danger",shape:"circle",icon:"minus",size:"small"}}):e._e()],1),e.printRead||!e.isDelete?t("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+o+1))]):e._e()],1)]}}],null,!1,2663213834)}):e._e(),0==e.columns.length?t("a-table-column"):e._l(e.columns,(function(n){return e.columnDisplay(n.model,n)?t("a-table-column",{key:n.key,class:n.options.required?"required":"",attrs:{"data-index":n.key,title:n.options.hideLabel?"":n.name,width:n.options.width,scopedSlots:{customRender:n.key},fixed:!!n.options.fixedColumn&&(n.options.fixedColumnPosition||"left")},scopedSlots:e._u([{key:"default",fn:function(i,o,r){return[t("generate-form-item",{key:"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+r,".").concat(n.key),attrs:{models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+r],rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.tableHideFields,"sub-disabled-fields":e.tableDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-table":!0,"is-mobile":!1,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+r,"table-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+r)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}}],null,!0)}):e._e()}))],2):e._e(),e.preview&&"mobile"===e.platform||!e.preview&&e.mobileScreen?t("div",{staticClass:"antd-form-table-mobile",style:{display:e.preview?"block":""}},e._l(e.paging?e.pagingLength:e.tableData,(function(n,i){return t("div",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+i,staticClass:"antd-form-table-mobile-item"},[e.showControl?t("div",{staticClass:"antd-form-table-mobile-item__top"},[t("span",[e._v("# "+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))]),t("a-popconfirm",{attrs:{disabled:e.disableddata,title:e.$t("fm.description.deleteConfirm")},on:{confirm:function(t){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[!e.printRead&&e.isDelete?t("a-button",{attrs:{disabled:e.disableddata,type:"danger",shape:"circle",icon:"minus",size:"small"}}):e._e()],1)],1):e._e(),t("div",{staticClass:"antd-form-table-mobile-item__content"},e._l(e.columns,(function(n){return e.displayFields[n.model]?t("generate-form-item",{key:n.key,attrs:{models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.tableHideFields,"sub-disabled-fields":e.tableDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-table":!0,"is-mobile":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"table-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):e._e()})),1)])})),0):e._e(),t("a-row",[t("a-col",{attrs:{md:e.preview&&"mobile"!=e.platform||!e.preview?12:24,xs:24,sm:24}},[!e.disableddata&&e.isAdd?t("a-button",{attrs:{type:"link"},on:{click:e.handleAddRow}},[t("i",{staticClass:"fm-iconfont icon-plus",staticStyle:{"font-size":"12px",margin:"5px"}}),e._v(e._s(e.$t("fm.actions.add"))+"\n ")]):e._e()],1),t("a-col",{attrs:{md:(!e.preview||"mobile"==e.platform)&&e.preview||e.disableddata?24:12,xs:24,sm:24}},[e.paging&&e.tableData.length?t("a-pagination",{staticStyle:{float:"right","padding-top":"5px","white-space":"nowrap"},attrs:{layout:"total, prev, pager, next","page-size":e.pageSize,total:e.tableData.length,"pager-count":5,"show-less-items":""},on:{change:e.handlePageChange},model:{value:e.currentPage,callback:function(t){e.currentPage=t},expression:"currentPage"}}):e._e()],1)],1)],1)}),[],!1,null,null,null).exports,v=n("d511"),y=n("095c"),_=n("4260");function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k={name:"fm-sub-form",components:{GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"908f"))},GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"87b7"))},GenerateInline:function(){return Promise.resolve().then(n.bind(null,"9195"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"e66c"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bec1"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"d6ee"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"093a"))}},props:["showControl","config","list","value","models","remote","blanks","disableddata","rules","name","remoteOption","preview","platform","dataSourceValue","eventFunction","widget","printRead","paging","pageSize","containerKey","isAdd","isDelete","isDialog","dialogName","group","fieldNode"],data:function(){return{subformData:this.value||[],displayFields:{},changeItem:{},pagingData:[],pagingLength:0,currentPage:1,itemModel:{},subHideFields:[],subDisabledFields:[],itemDisabled:{}}},created:function(){var e=this;this._generateModel(this.list),this.loadPagingData(),this.subHideFields=this.value.map((function(t){return Object.fromEntries(Object.keys(e.displayFields).map((function(t){return[t,!e.displayFields[t]]})))})),this.subDisabledFields=this.value.map((function(t){return Object.fromEntries(Object.keys(e.itemDisabled).map((function(t){return[t,!e.itemDisabled[t]]})))}))},provide:function(){return{setSubformData:this.setSubformData}},inject:["onFormDisabled","onFormHide","onFormDisplay"],methods:{handleMouseover:function(e){Object(_.a)(this.$refs["formSubformItem_".concat(e)][0],"is-hover")},handleMouseout:function(e){Object(_.j)(this.$refs["formSubformItem_".concat(e)][0],"is-hover")},setSubformData:function(e,t,n){var i=u.a.cloneDeep(this.subformData);i[t][n]=e,this.subformData=i},setData:function(e,t){var n=this;return new Promise("number"!=typeof e?function(i){t=e,n.subformData.forEach((function(e,i){Object.keys(t).forEach((function(e){n.setSubformData(t[e],i,e)}))})),i()}:function(i){n.$nextTick((function(){Object.keys(t).forEach((function(i){n.setSubformData(t[i],e,i)})),i()}))})},handleAddRow:function(){var e=this;if(this.subformData=[].concat(Object(i.a)(this.subformData),[x({},this.itemModel)]),this.subHideFields.push(Object.fromEntries(Object.keys(this.displayFields).map((function(t){return[t,!e.displayFields[t]]})))),this.subDisabledFields.push(Object.fromEntries(Object.keys(this.itemDisabled).map((function(t){return[t,!e.itemDisabled[t]]})))),this.widget&&this.widget.events&&this.widget.events.onRowAdd){var t=this.widget.events.onRowAdd;this.eventFunction[t]({rowIndex:this.subformData.length-1,field:this.widget.model,currentRef:this})}this.paging&&this.$nextTick((function(){e.subformData.length>e.currentPage*e.pageSize&&(e.currentPage=parseInt((e.subformData.length-1)/e.pageSize)+1),e.loadPagingData()}))},handleRemove:function(e){var t=this,n=x({},this.subformData[e]),o=Object(i.a)(this.subformData);if(o.splice(e,1),this.subformData=o,this.subHideFields.splice(e,1),this.subDisabledFields.splice(e,1),this.widget&&this.widget.events&&this.widget.events.onRowRemove){var r=this.widget.events.onRowRemove;this.eventFunction[r]({removeIndex:e,removeData:n,field:this.widget.model,currentRef:this})}this.pagingData=[],this.pagingLength=0,this.paging&&this.$nextTick((function(){t.subformData.length%t.pageSize==0&&t.currentPage>parseInt(t.subformData.length/t.pageSize)&&(t.currentPage=parseInt(t.subformData.length/t.pageSize)),t.loadPagingData()}))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},disabled:function(e,t){var n=this;"string"==typeof e&&(e=[e]),this.subformData.forEach((function(i,o){e.forEach((function(e){n.$set(n.subDisabledFields[o],e,t)}))})),this._setDisabled(this.list,e,t)},hideChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormHide("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},displayChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormDisplay("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},disabledChild:function(e,t,n){var i=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){i.$set(i.subDisabledFields[e],t,n),i.onFormDisabled("".concat(i.fieldNode,".").concat(e,".").concat(t),n)}))},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.list,e,t)},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.list,e.split("."),t,"remove")}))},handlePageChange:function(e){var t=this;if(this.currentPage=e,this.pagingData=[],this.pagingLength,this.$nextTick((function(){t.loadPagingData()})),this.widget&&this.widget.events&&this.widget.events.onPageChange){var n=this.widget.events.onPageChange;this.eventFunction[n]({currentPage:e,field:this.widget.model,currentRef:this})}},loadPagingData:function(){var e=(this.currentPage-1)*this.pageSize,t=e+this.pageSize;this.pagingData=this.subformData.slice(e,t),this.pagingLength=this.pagingData.length},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.displayFields[e[n].model]=!e[n].options.hidden,e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.displayFields[e[n].model]=!e[n].options.hidden):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.displayFields[e[n].model]=!e[n].options.hidden):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.displayFields[e[n].model]=!e[n].options.hidden):("blank"==e[n].type?this.itemModel[e[n].model]="String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]:this.itemModel[e[n].model]=u.a.cloneDeep(e[n].options.defaultValue),this.displayFields[e[n].model]=!e[n].options.hidden,this.itemDisabled[e[n].model]=!e[n].options.disabled)},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(this.$set(e[o].options,"disabled",n),this.$set(this.itemDisabled,e[o].model,!n))},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):("inline"===e[o].type||"card"===e[o].type)&&i._setOptions(e[o].list,t,n),t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)}},watch:{value:function(e){this.subformData=e;for(var t=[],n=[],i=0;i<this.value.length;i++){for(var o=Object.keys(this.displayFields),r={},a=0;a<o.length;a++){var s,l;r[o[a]]=(null===(s=this.subHideFields)||void 0===s||null===(l=s[i])||void 0===l?void 0:l[o[a]])||!this.displayFields[o[a]]}t.push(r);for(var c=Object.keys(this.itemDisabled),u={},d=0;d<c.length;d++){var f,p;u[c[d]]=(null===(f=this.subDisabledFields)||void 0===f||null===(p=f[i])||void 0===p?void 0:p[c[d]])||!this.itemDisabled[c[d]]}n.push(u)}this.subHideFields=t,this.subDisabledFields=n},subformData:{deep:!0,handler:function(e){this.loadPagingData(),this.$emit("input",e)}}}},O=(n("a8ba"),Object(g.a)(k,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-subform"},[e._l(e.paging?e.pagingLength:e.subformData,(function(n,i){return t("div",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+i,ref:"formSubformItem_".concat((e.paging?e.pageSize*(e.currentPage-1):0)+i),refInFor:!0,staticClass:"form-subform-item",on:{mouseover:function(t){t.stopPropagation(),e.handleMouseover((e.paging?e.pageSize*(e.currentPage-1):0)+i)},mouseout:function(t){e.handleMouseout((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[e.showControl?t("div",{staticClass:"form-subform-index"},[t("a-tag",{attrs:{color:"blue"}},[e._v("#"+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))])],1):e._e(),e.showControl?t("div",{staticClass:"form-subform-remove"},[t("a-popconfirm",{attrs:{disabled:e.disableddata,title:e.$t("fm.description.deleteConfirm")},on:{confirm:function(t){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[!e.printRead&&e.isDelete?t("a-button",{attrs:{disabled:e.disableddata,type:"danger",shape:"circle",icon:"minus",size:"small"}}):e._e()],1),e.printRead||!e.isDelete?t("a-tag",{attrs:{color:"blue"}},[e._v("#"+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))]):e._e()],1):e._e(),t("div",{staticClass:"form-subform-content"},[e._l(e.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)])})),t("a-row",{staticClass:"form-subform-action"},[t("a-col",{attrs:{md:e.preview&&"mobile"!=e.platform||!e.preview?12:24,sm:24}},[!e.disableddata&&e.isAdd?t("a-button",{attrs:{type:"link"},on:{click:e.handleAddRow}},[t("i",{staticClass:"fm-iconfont icon-plus",staticStyle:{"font-size":"12px",margin:"5px"}}),e._v(e._s(e.$t("fm.actions.add"))+"\n ")]):e._e()],1),t("a-col",{attrs:{md:(!e.preview||"mobile"==e.platform)&&e.preview||e.disableddata?24:12,xs:24,sm:24}},[e.paging&&e.subformData.length?t("a-pagination",{staticStyle:{float:"right","padding-top":"5px","white-space":"nowrap"},attrs:{layout:"total, prev, pager, next","page-size":e.pageSize,total:e.subformData.length,"pager-count":5,"show-less-items":""},on:{change:e.handlePageChange},model:{value:e.currentPage,callback:function(t){e.currentPage=t},expression:"currentPage"}}):e._e()],1)],1)],2)}),[],!1,null,null,null).exports),C=n("8bbf"),S=n.n(C),D=n("0f01"),P=(n("20d6"),n("5df3"),{name:"fm-group",components:{GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"908f"))},GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"87b7"))},GenerateInline:function(){return Promise.resolve().then(n.bind(null,"9195"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"e66c"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bec1"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"d6ee"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"093a"))}},props:["config","value","models","rules","element","remote","blanks","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","group","fieldNode"],data:function(){return{displayFields:{},groupModel:this.value||{},groupDisabled:{}}},inject:["generateComponentInstance","deleteComponentInstance","getFormComponent","onFormHide","onFormDisplay"],created:function(){this._generateModel(this.element.list)},mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode,this.$refs["generate-group-".concat(this.element.model)].$parent)},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode)},provide:function(){return{setGroupData:this.setGroupData}},methods:{setGroupData:function(e,t){this.$set(this.groupModel,t,e)},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.$set(this.displayFields,e[n].model,!e[n].options.hidden),e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):("blank"==e[n].type?this.$set(this.groupModel,e[n].model,"String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]):this.$set(this.groupModel,e[n].model,this.value[e[n].model]||u.a.cloneDeep(e[n].options.defaultValue)),this.$set(this.displayFields,e[n].model,!e[n].options.hidden),this.$set(this.groupDisabled,e[n].model,!e[n].options.disabled))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},disabled:function(e,t){"string"==typeof e&&(e=[e]),this._setDisabled(this.element.list,e,t)},validate:function(){var e=this;return new Promise((function(t,n){var i=e._getAllRuleFields();Promise.all(i.map((function(t){return new Promise((function(n){e.getFormComponent().validateField(t,(function(e,t){n(t)}))}))}))).then((function(e){e.findIndex((function(e){return e}))>=0?n():t()}))}))},clearValidate:function(){var e=this._getAllRuleFields();this.getFormComponent().clearValidate(e)},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.element.list,e,t)},setData:function(e){var t=this;return new Promise((function(n){t.$nextTick((function(){Object.keys(e).forEach((function(n){t.$set(t.groupModel,n,e[n])})),n()}))}))},getValues:function(){return this.groupModel},getValue:function(e){return this.groupModel[e]},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.element.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.element.list,e.split("."),t,"remove")}))},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(e[o].options.disabled=n)},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):("inline"===e[o].type||"card"===e[o].type)&&i._setOptions(e[o].list,t,n),t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)},_getAllRuleFields:function(){var e=this,t=[];return Object.keys(this.groupModel).forEach((function(n){Array.isArray(e.groupModel[n])?e.groupModel[n].forEach((function(i,o){Object.keys(i).forEach((function(i){t.push("".concat(e.fieldNode,".").concat(n,".").concat(o,".").concat(i))}))})):t.push("".concat(e.fieldNode,".").concat(n))})),t}},watch:{groupModel:{deep:!0,handler:function(e){this.$emit("input",e)}},value:{deep:!0,handler:function(e){this.groupModel=e}}}}),E=Object(g.a)(P,(function(){var e=this,t=e._self._c;return t("div",{ref:"generate-group-".concat(e.element.model),style:{width:e.element.options.width}},[e._l(e.element.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.groupModel,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)}),[],!1,null,null,null).exports;function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F={name:"generate-element-item",components:{FmUpload:l.a,FmFormTable:b,FmFileUpload:v.a,FmEditor:y.a,FmSubForm:O,FmGroup:E},props:["config","widget","value","models","remote","isTable","blanks","disabled","edit","remoteOption","rules","platform","preview","dataSourceValue","eventFunction","rowIndex","tableName","containerKey","printRead","isMobile","isSubform","subName","isDialog","dialogName","group","fieldNode","isGroup","formItemComponent"],data:function(){var e,t;return{dataModel:this.value,dataModels:this.models,key:(new Date).getTime(),modelName:this.widget.model,remoteOptions:[],dynamicEvents:this.handleOnDynamicEvent(),dataOnly:null===(e=this.widget.options)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((function(e){return M(M({},e),{},{title:e.label})})),generateDisabled:void 0,remoteToken:""}},computed:{elementDisabled:function(){var e=this.widget.options.disabled;return Object(f.c)(this.widget.options.disabled)&&(e=Object(f.a)(Object(f.b)(this.widget.options.disabled),this.currentOptions,this.formContext)),"boolean"==typeof this.generateDisabled?!this.edit||this.generateDisabled:!this.edit||Boolean(e)},currentOptions:function(){return this.isTable||this.isSubform?{value:this.dataModel,fieldNode:this.fieldNode,currentRef:this.$refs["fm-"+this.widget.model],rowIndex:this.rowIndex,row:u.a.cloneDeep(this.models),field:this.widget.model,group:this.group}:{value:this.dataModel,fieldNode:this.fieldNode,currentRef:this.$refs["fm-"+this.widget.model],field:this.widget.model,group:this.group}},extendProps:function(){var e=this,t={};return this.widget.options.extendProps&&Object.keys(this.widget.options.extendProps).forEach((function(n){var i=e.widget.options.extendProps[n];Object(f.c)(i)?t[n]=Object(f.a)(Object(f.b)(i),e.currentOptions,e.formContext):t[n]=i})),t},groupNode:function(){return this.group?this.group+"."+this.widget.model:this.widget.model}},inject:["generateComponentInstance","deleteComponentInstance","eventScriptConfig","dynamicValueData","formContext","sendRequest"],created:function(){var e=this;if(this.widget.options.remote||("steps"==this.widget.type?this.loadOptions(this.widget.options.steps):"transfer"==this.widget.type?this.loadOptions(this.widget.options.data):this.loadOptions(this.widget.options.options)),!this.widget.options.remote||Object.keys(this.widget.options).indexOf("remoteType")>=0&&"func"!=this.widget.options.remoteType||!this.remote[this.widget.options.remoteFunc]||this.remote[this.widget.options.remoteFunc]((function(t){e.loadOptions(t)})),this.widget.options.remote&&"option"==this.widget.options.remoteType&&this.remoteOption[this.widget.options.remoteOption]&&this.loadOptions(this.remoteOption[this.widget.options.remoteOption]),this.widget.options.remote&&"datasource"==this.widget.options.remoteType&&this.dataSourceValue){var t=this.getDataSourceOptions();t&&t.value&&this.loadOptions(t.value)}if("imgupload"!==this.widget.type&&"fileupload"!==this.widget.type||!this.widget.options.isQiniu||this.loadUploadConfig(),this.widget.options.remote&&"fx"==this.widget.options.remoteType){var n=Object(f.a)(this.widget.options.remoteFx,{},this.formContext);n&&this.loadOptions(n)}if("component"==this.widget.type){var i=this;S.a.component("component-".concat(this.widget.key,"-").concat(this.key),{template:"".concat(this.widget.options.template),props:["value"],data:function(){return{dataModel:e.value,formState:e.formContext}},watch:{dataModel:function(e){"antd"==this.ui?D.a.$emit("on-field-change",this.$attrs.id,e):this.$emit("input",e)},value:function(e){this.dataModel=e}},methods:{triggerEvent:function(e,t){if(i.eventScriptConfig()){var n=i.eventScriptConfig().find((function(t){return t.name==e}));n&&i.eventFunction[n.key](M(M({},i.currentOptions),{},{$eventArgs:t}))}}}})}},mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode,this.$refs["fm-"+this.widget.model]),this.handleOnMounted()},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode)},methods:{handleOnDynamicEvent:function(){var e={};for(var t in this.widget.events){var n=this.widget.events[t];n&&(e[t]=this.callbackDynamicFunc(n))}return e},callbackDynamicFunc:function(e){var t=this;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];t.eventFunction[e](M(M({},t.currentOptions),{},{$eventArgs:i}))}},refreshOptionData:function(e){var t=this;return new Promise((function(n,i){if(t.widget.options.remote&&"fx"===t.widget.options.remoteType&&t.widget.options.remoteFx){var r=Object(f.a)(t.widget.options.remoteFx,t.currentOptions,t.formContext);null!==r&&t.loadOptions(r),n(r)}if(t.widget.options.remote&&"datasource"===t.widget.options.remoteType&&t.widget.options.remoteDataSource){var a="string"==typeof t.widget.options.remoteArgs?{}:M({},t.widget.options.remoteArgs);for(var s in a)Object(f.c)(a[s])&&(a[s]=Object(f.a)(Object(f.b)(a[s]),t.currentOptions,t.formContext));e&&"object"===Object(o.a)(e)&&(a=M(M({},a),e));var l=t.group?t.group+"."+t.widget.model+"."+t.widget.options.remoteDataSource:t.widget.model+"."+t.widget.options.remoteDataSource,c=t.dataSourceValue.find((function(e){return e.key===l&&u.a.isEqual(e.args,a)}));c?(t.loadOptions(c.value),n(c.value)):t.sendRequest(t.widget.options.remoteDataSource,a).then((function(e){t.loadOptions(e),n(e)})).catch((function(e){i(e)}))}}))},loadOptions:function(e){var t=this;Array.isArray(e)&&(this.remoteOptions=e.map((function(e){return t.widget.options.props.children&&t.widget.options.props.children.length&&Object.keys(e).includes(t.widget.options.props.children)?{value:e[t.widget.options.props.value],label:e[t.widget.options.props.label],children:t.processRemoteProps(e[t.widget.options.props.children],t.widget.options.props)}:"steps"==t.widget.type?{title:e[t.widget.options.props.title],description:e[t.widget.options.props.description]}:"transfer"==t.widget.type?{key:e[t.widget.options.props.key]+"",title:e[t.widget.options.props.label],disabled:e[t.widget.options.props.disabled]}:{value:e[t.widget.options.props.value],label:e[t.widget.options.props.label]}})))},getOptions:function(){return JSON.parse(JSON.stringify(this.remoteOptions))},processRemoteProps:function(e,t){var n=this;return e&&e.length?e.map((function(e){return n.processRemoteProps(e[t.children],t).length?{value:e[t.value],label:e[t.label],children:n.processRemoteProps(e[t.children],t)}:{value:e[t.value],label:e[t.label]}})):[]},loadUploadConfig:function(){var e=this;if("func"===this.widget.options.tokenType)!this.widget.options.token&&this.remote[this.widget.options.tokenFunc]((function(t){e.remoteToken=t}));else if("fx"===this.widget.options.tokenType){var t=Object(f.a)(this.widget.options.tokenFx,this.currentOptions,this.formContext);t&&(this.remoteToken=t)}else if(this.dataSourceValue){var n=this.getDataSourceOptions("tokenDataSource");n&&n.value&&(this.remoteToken=n.value)}},handleOnMounted:function(){this.execFunction("onMounted",{})},handleOnClick:function(){this.execFunction("onClick",{})},handleOnFocus:function(){this.execFunction("onFocus",{})},handleOnBlur:function(){D.a.$emit("on-validate-"+this.containerKey,this.fieldNode,this.containerKey),this.execFunction("onBlur",{})},handleOnUploadSelect:function(e){return this.execFunction("onSelect",{file:e})},handleOnUploadSuccess:function(e){this.execFunction("onUploadSuccess",{file:e})},handleOnUploadError:function(e){this.execFunction("onUploadError",{file:e})},handleOnUploadProgress:function(e){this.execFunction("onUploadProgress",{file:e})},handleOnUploadRemove:function(e){this.execFunction("onRemove",{file:e})},execFunction:function(e,t){if(this.widget.events&&this.widget.events[e]){var n=this.widget.events[e];return this.eventFunction[n](M(M({},this.currentOptions),t))}},getCascaderText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e.length>=1){var i=null==t?void 0:t.find((function(t){return t.value==e[0]}));return i&&n.push(i.label),e.splice(0,1),this.getCascaderText(e,null==i?void 0:i.children,n)}if(0==e.length)return n},getDataSourceOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"remoteDataSource",t=this.group?this.group+"."+this.widget.model+"."+this.widget.options[e]:this.widget.model+"."+this.widget.options[e];return this.dataSourceValue.find((function(e){return e.key===t}))},handleTransferChange:function(e){this.dataModel=e},disabledElement:function(e){this.generateDisabled=e}},watch:{value:function(e){this.dataModel=e},dataModel:function(e,t){var n=this;JSON.stringify(e)!=JSON.stringify(t)&&(this.$emit("input",e),setTimeout((function(){n.formItemComponent&&n.formItemComponent.onFieldChange()})))},remoteOption:{deep:!0,handler:function(e){Object.keys(this.remoteOption).indexOf(this.widget.options.remoteOption)>=0&&this.widget.options.remote&&"option"==this.widget.options.remoteType&&this.loadOptions(this.remoteOption[this.widget.options.remoteOption])}},dataSourceValue:{deep:!0,handler:function(e){if(this.dataSourceValue){var t=this.getDataSourceOptions();t&&t.value&&this.loadOptions(t.value)}"imgupload"!==this.widget.type&&"fileupload"!==this.widget.type||!this.widget.options.isQiniu||this.loadUploadConfig()}}}},T=Object(g.a)(F,(function(){var e,t,n,r,a,l=this,c=l._self._c;return c("span",{class:{"print-read-label":l.printRead}},["blank"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width}},[l._t(l.widget.model,null,{model:l.dataModels})],2)]:l._e(),"component"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width}},[c("component-".concat(l.widget.key,"-").concat(l.key),{key:l.key,ref:"fm-"+l.widget.model,tag:"component",model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})],1)]:l._e(),"custom"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width}},[c(l.widget.el,l._g(l._b({ref:"fm-"+l.widget.model,tag:"component",attrs:{width:l.widget.options.width,height:l.widget.options.height,size:l.config.size,placeholder:l.widget.options.placeholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,editable:l.widget.options.editable,clearable:l.widget.options.clearable,"print-read":l.printRead},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"component",s(s({},l.widget.options.customProps),l.extendProps),!1),l.dynamicEvents))],1)]:l._e(),"input"==l.widget.type?[l.printRead?[c("span",[l._v(l._s(l.dataModel))])]:[l.widget.options.showPassword?[c("a-input-password",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.dataTypeCheck?l.widget.options.dataType:"text",disabled:l.elementDisabled,placeholder:l.widget.options.placeholder,size:l.config.size,"allow-clear":l.widget.options.clearable,autocomplete:"off"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-input-password",s(s({},l.widget.options.customProps),l.extendProps),!1))]:[c("a-input",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.dataTypeCheck?l.widget.options.dataType:"text",disabled:l.elementDisabled,placeholder:l.widget.options.placeholder,"show-password":l.widget.options.showPassword,size:l.config.size,"allow-clear":l.widget.options.clearable,maxLength:l.widget.options.maxlength?Number(l.widget.options.maxlength):null,"show-count":l.widget.options.showWordLimit},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-input",s(s({},l.widget.options.customProps),l.extendProps),!1))]]]:l._e(),"textarea"==l.widget.type?[l.printRead?[c("pre",[l._v(l._s(l.dataModel))])]:[c("a-input",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:"textarea",rows:l.widget.options.rows,disabled:l.elementDisabled,placeholder:l.widget.options.placeholder,"allow-clear":l.widget.options.clearable,size:l.config.size,maxLength:l.widget.options.maxlength?Number(l.widget.options.maxlength):null,"show-count":l.widget.options.showWordLimit,autoSize:l.widget.options.autosize},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-input",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"number"==l.widget.type?[l.printRead?[c("span",[l._v(l._s(l.dataModel.toFixed(l.widget.options.precision)))])]:[c("a-input-number",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{step:l.widget.options.step,disabled:l.elementDisabled,min:l.widget.options.min,max:l.widget.options.max,"controls-position":l.widget.options.controlsPosition,precision:l.widget.options.precision,controls:l.widget.options.controls,size:l.config.size},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-input-number",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"radio"==l.widget.type?[l.printRead?[l.widget.options.remote?[l._v("\n "+l._s(l.remoteOptions.find((function(e){return e.value==l.dataModel}))&&l.remoteOptions.find((function(e){return e.value==l.dataModel})).label)+"\n ")]:[l._v("\n "+l._s(l.widget.options.showLabel?l.remoteOptions.find((function(e){return e.value==l.dataModel}))&&l.remoteOptions.find((function(e){return e.value==l.dataModel})).label:l.dataModel)+"\n ")]]:[c("a-radio-group",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-radio-group",s(s({},l.widget.options.customProps),l.extendProps),!1),l._l(l.remoteOptions,(function(e,t){return c("a-radio",{key:t,staticStyle:{"line-height":"30px"},style:{display:l.widget.options.inline?"inline-block":"block"},attrs:{value:e.value}},[l.widget.options.remote?[l._v(l._s(e.label))]:[l._v(l._s(l.widget.options.showLabel?e.label:e.value))]],2)})),1)]]:l._e(),"checkbox"==l.widget.type?[l.printRead?[l.widget.options.remote?[l._v("\n "+l._s(l.dataModel.map((function(e){return l.remoteOptions.find((function(t){return t.value==e}))&&l.remoteOptions.find((function(t){return t.value==e})).label})).join("、"))+"\n ")]:[l._v("\n "+l._s(l.widget.options.showLabel?l.dataModel.map((function(e){return l.remoteOptions.find((function(t){return t.value==e}))&&l.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):l.dataModel.join("、"))+"\n ")]]:[c("a-checkbox-group",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-checkbox-group",s(s({},l.widget.options.customProps),l.extendProps),!1),l._l(l.remoteOptions,(function(e,t){return c("a-checkbox",{key:t,style:{display:l.widget.options.inline?"inline-block":"block"},attrs:{value:e.value}},[l.widget.options.remote?[l._v(l._s(e.label))]:[l._v(l._s(l.widget.options.showLabel?e.label:e.value))]],2)})),1)]]:l._e(),"time"==l.widget.type?[l.printRead?[l._v("\n "+l._s(l.dataModel)+"\n ")]:[c("a-time-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{"is-range":l.widget.options.isRange,placeholder:l.widget.options.placeholder,"start-placeholder":l.widget.options.startPlaceholder,"end-placeholder":l.widget.options.endPlaceholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,arrowControl:l.widget.options.arrowControl,"value-format":l.widget.options.format,format:l.widget.options.format,size:l.config.size,popupClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-time-picker",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"date"==l.widget.type?[l.printRead?[l._v("\n "+l._s("dates"==l.widget.options.type?l.dataModel.join("、"):"object"==Object(o.a)(l.dataModel)?l.dataModel.join(" ~ "):l.dataModel)+"\n ")]:["date"==l.widget.options.type||"datetime"==l.widget.options.type?c("a-date-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.type,placeholder:l.widget.options.placeholder,"start-placeholder":l.widget.options.startPlaceholder,"end-placeholder":l.widget.options.endPlaceholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,"value-format":l.widget.options.timestamp?"timestamp":l.widget.options.format,format:l.widget.options.format,size:l.config.size,"show-time":"datetime"==l.widget.options.type&&{format:l.widget.options.format},dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-date-picker",s(s({},l.widget.options.customProps),l.extendProps),!1)):l._e(),"month"==l.widget.options.type?c("a-month-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.type,mode:l.widget.options.type,placeholder:l.widget.options.placeholder,"start-placeholder":l.widget.options.startPlaceholder,"end-placeholder":l.widget.options.endPlaceholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,"value-format":l.widget.options.timestamp?"timestamp":l.widget.options.format,format:l.widget.options.format,size:l.config.size,dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-month-picker",s(s({},l.widget.options.customProps),l.extendProps),!1)):l._e(),"week"==l.widget.options.type?c("a-week-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.type,mode:l.widget.options.type,placeholder:l.widget.options.placeholder,"start-placeholder":l.widget.options.startPlaceholder,"end-placeholder":l.widget.options.endPlaceholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,"value-format":l.widget.options.timestamp?"timestamp":l.widget.options.format,format:l.widget.options.format,size:l.config.size,dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-week-picker",s(s({},l.widget.options.customProps),l.extendProps),!1)):l._e(),"daterange"==l.widget.options.type||"datetimerange"==l.widget.options.type?c("a-range-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{placeholder:[l.widget.options.startPlaceholder,l.widget.options.endPlaceholder],readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,"value-format":l.widget.options.timestamp?"timestamp":l.widget.options.format,format:l.widget.options.format,size:l.config.size,"show-time":"datetimerange"==l.widget.options.type&&{format:l.widget.options.format},dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-range-picker",s(s({},l.widget.options.customProps),l.extendProps),!1)):l._e()]]:l._e(),"rate"==l.widget.type?[l.printRead?[l._v("\n "+l._s(l.dataModel)+"\n ")]:[c("a-rate",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{max:l.widget.options.max,count:l.widget.options.max,disabled:l.elementDisabled,"allow-half":l.widget.options.allowHalf,"show-score":l.widget.options.showScore,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-rate",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"color"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width,color:"#999"}},[l._v("\n Not currently supported.\n ")])]:l._e(),"select"==l.widget.type?[l.printRead?[l.widget.options.remote?[l._v("\n "+l._s("object"==Object(o.a)(l.dataModel)?l.dataModel.map((function(e){return l.remoteOptions.find((function(t){return t.value==e}))&&l.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):l.remoteOptions.find((function(e){return e.value==l.dataModel}))&&l.remoteOptions.find((function(e){return e.value==l.dataModel})).label)+"\n ")]:[l._v("\n "+l._s(l.widget.options.showLabel?"object"==Object(o.a)(l.dataModel)?l.dataModel.map((function(e){return l.remoteOptions.find((function(t){return t.value==e}))&&l.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):l.remoteOptions.find((function(e){return e.value==l.dataModel}))&&l.remoteOptions.find((function(e){return e.value==l.dataModel})).label:"object"==Object(o.a)(l.dataModel)?l.dataModel.join("、"):l.dataModel)+"\n ")]]:[c("a-select",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,mode:l.widget.options.multiple?"multiple":"default","allow-clear":l.widget.options.clearable,placeholder:l.widget.options.placeholder,"show-search":l.widget.options.filterable,"option-filter-prop":"children",size:l.config.size,dropdownClassName:"fm-select-dropdown"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-select",s(s({},l.widget.options.customProps),l.extendProps),!1),l._l(l.remoteOptions,(function(e){return c("a-select-option",{key:e.value,attrs:{value:e.value}},[l._v("\n "+l._s(l.widget.options.showLabel||l.widget.options.remote?e.label:e.value)+"\n ")])})),1)]]:l._e(),"switch"==l.widget.type?[l.printRead?[l._v("\n "+l._s(l.dataModel)+"\n ")]:[c("a-switch",l._b({ref:"fm-"+l.widget.model,attrs:{"default-checked":l.dataModel,disabled:l.elementDisabled,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-switch",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"slider"==l.widget.type?[l.printRead?[l._v("\n "+l._s(l.dataModel)+"\n ")]:[c("a-slider",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{min:l.widget.options.min,max:l.widget.options.max,disabled:l.elementDisabled,step:l.widget.options.step,"show-input":l.widget.options.showInput,range:l.widget.options.range,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-slider",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"imgupload"==l.widget.type?[c("fm-upload",{ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,readonly:l.widget.options.readonly||l.printRead,width:l.widget.options.size.width,height:l.widget.options.size.height,token:l.remoteToken,domain:l.widget.options.domain,multiple:l.widget.options.multiple,limit:l.widget.options.limit,"is-qiniu":l.widget.options.isQiniu,"is-delete":l.widget.options.isDelete,min:l.widget.options.min,"is-edit":l.widget.options.isEdit,action:l.widget.options.action,ui:"antd",headers:l.widget.options.headers||[],withCredentials:l.widget.options.withCredentials,"print-read":l.printRead,"on-select":l.handleOnUploadSelect,size:l.config.size},on:{"on-upload-success":l.handleOnUploadSuccess,"on-upload-error":l.handleOnUploadError,"on-upload-remove":l.handleOnUploadRemove,"on-upload-progress":l.handleOnUploadProgress},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"editor"==l.widget.type?[l.printRead?[c("div",{staticClass:"ql-editor",domProps:{innerHTML:l._s(l.dataModel)}})]:[c("fm-editor",{ref:"fm-"+l.widget.model,attrs:{sty:{width:l.isTable?"100%":l.widget.options.width,cursor:l.elementDisabled?"no-drop":"",backgroundColor:l.elementDisabled?"#F5F7FA":""},toolbar:l.widget.options.customToolbar,disabled:l.elementDisabled,ui:"antd",size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]]:l._e(),"cascader"==l.widget.type?[l.printRead?[(l.widget.options.remote,[l._v("\n "+l._s(l.getCascaderText(Object(i.a)(l.dataModel),l.remoteOptions).join(" / "))+"\n ")])]:[c("a-cascader",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,"allow-clear":l.widget.options.clearable,placeholder:l.widget.options.placeholder,options:l.remoteOptions,showSearch:l.widget.options.filterable,"change-on-select":l.widget.options.checkStrictly,size:l.config.size,dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-cascader",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"text"==l.widget.type?[c("span",{ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width||"100%",display:"inline-block"}},[l._v(l._s(l.dataModel))])]:l._e(),"html"==l.widget.type?[c("span",{ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width||"100%",display:"inline-block"},domProps:{innerHTML:l._s(l.dataModel)}})]:l._e(),"table"==l.widget.type?[c("fm-form-table",{ref:"fm-"+l.widget.model,attrs:{columns:l.widget.tableColumns,models:l.dataModels,remote:l.remote,blanks:l.blanks,disableddata:l.elementDisabled||l.printRead,rules:l.rules,name:l.widget.model,"remote-option":l.remoteOption,preview:l.preview,platform:l.platform,"data-source-value":l.dataSourceValue,"event-function":l.eventFunction,widget:l.widget,"container-key":l.containerKey,"print-read":l.printRead,paging:l.widget.options.paging,"page-size":l.widget.options.pageSize,config:l.config,"is-add":null===(e=l.widget.options.isAdd)||void 0===e||e,"is-delete":null===(t=l.widget.options.isDelete)||void 0===t||t,"show-control":null===(n=l.widget.options.showControl)||void 0===n||n,"is-dialog":l.isDialog,"dialog-name":l.dialogName,"is-group":l.isGroup,group:l.group,"field-node":l.fieldNode},scopedSlots:l._u([l._l(l.blanks,(function(e){return{key:e.name,fn:function(t){return[l._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"subform"==l.widget.type?[c("fm-sub-form",{ref:"fm-"+l.widget.model,attrs:{list:l.widget.list,models:l.dataModels,remote:l.remote,blanks:l.blanks,disableddata:l.elementDisabled||l.printRead,rules:l.rules,name:l.widget.model,"remote-option":l.remoteOption,preview:l.preview,platform:l.platform,"data-source-value":l.dataSourceValue,"event-function":l.eventFunction,widget:l.widget,"print-read":l.printRead,paging:l.widget.options.paging,"page-size":l.widget.options.pageSize,config:l.config,"container-key":l.containerKey,"show-control":l.widget.options.showControl,"is-delete":null===(r=l.widget.options.isDelete)||void 0===r||r,"is-add":null===(a=l.widget.options.isAdd)||void 0===a||a,"is-dialog":l.isDialog,"dialog-name":l.dialogName,"is-group":l.isGroup,group:l.group,"field-node":l.fieldNode},scopedSlots:l._u([l._l(l.blanks,(function(e){return{key:e.name,fn:function(t){return[l._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"group"==l.widget.type?[c("fm-group",{ref:"fm-"+l.widget.model,attrs:{rules:l.rules,element:l.widget,remote:l.remote,blanks:l.blanks,edit:!l.elementDisabled,"remote-option":l.remoteOption,platform:l.platform,preview:l.preview,"container-key":l.containerKey,"data-source-value":l.dataSourceValue,"event-function":l.eventFunction,"print-read":l.printRead,"is-group":l.isGroup,group:l.group,"field-node":l.fieldNode,config:l.config},scopedSlots:l._u([l._l(l.blanks,(function(e){return{key:e.name,fn:function(t){return[l._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"fileupload"==l.widget.type?[c("fm-file-upload",{ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,token:l.remoteToken,domain:l.widget.options.domain,multiple:l.widget.options.multiple,limit:l.widget.options.limit,"is-qiniu":l.widget.options.isQiniu,min:l.widget.options.min,action:l.widget.options.action,ui:"antd",headers:l.widget.options.headers||[],withCredentials:l.widget.options.withCredentials,"print-read":l.printRead,"on-select":l.handleOnUploadSelect,size:l.config.size,accept:l.widget.options.accept},on:{"on-upload-success":l.handleOnUploadSuccess,"on-upload-error":l.handleOnUploadError,"on-upload-remove":l.handleOnUploadRemove,"on-upload-progress":l.handleOnUploadProgress},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"button"==l.widget.type?[c("a-button",l._b({ref:"fm-"+l.widget.model,style:{width:l.widget.options.width},attrs:{disabled:l.elementDisabled,size:l.config.size,type:"text"==l.widget.options.buttonType?"link":l.widget.options.buttonType,shape:l.widget.options.buttonCircle?"circle":l.widget.options.buttonRound?"round":null,ghost:l.widget.options.buttonPlain},on:{click:l.handleOnClick}},"a-button",s(s({},l.widget.options.customProps),l.extendProps),!1),[l._v(l._s(l.widget.options.buttonName)+"\n ")])]:l._e(),"link"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width,color:"#999"}},[l._v("\n Not currently supported.\n ")])]:l._e(),"steps"==l.widget.type?[c("a-steps",l._b({ref:"fm-"+l.widget.model,style:{"line-height":"normal"},attrs:{current:l.dataModel,space:l.widget.options.space,direction:l.widget.options.direction,status:l.widget.options.processStatus}},"a-steps",s(s({},l.widget.options.customProps),l.extendProps),!1),l._l(l.remoteOptions,(function(e,t){return c("a-step",{key:t,attrs:{title:e.title,description:e.description}})})),1)]:l._e(),"pagination"==l.widget.type?[l.printRead?[l._v("\n Page "+l._s(l.dataModel)+"\n ")]:[c("a-pagination",l._b({ref:"fm-"+l.widget.model,attrs:{"page-size":l.widget.options.pageSize,"pager-count":l.widget.options.pagerCount,disabled:l.widget.options.disabled,background:l.widget.options.background,total:l.widget.options.total,"show-total":function(e){return"".concat(l.$t("fm.config.widget.total")," ").concat(e)},"show-less-items":"","show-size-changer":!1,size:l.widget.options.background?"":"small"},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-pagination",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"transfer"==l.widget.type?[l.printRead?[l.widget.options.remote?[l._v("\n "+l._s(l.dataModel.map((function(e){var t;return null===(t=l.widget.options.remoteOptions.find((function(t){return t.key==e})))||void 0===t?void 0:t.title})).join("、"))+"\n ")]:[l._v("\n "+l._s(l.dataModel.map((function(e){var t;return null===(t=l.remoteOptions.find((function(t){return t.key==e})))||void 0===t?void 0:t.label})).join("、"))+"\n ")]]:[c("a-transfer",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{targetKeys:l.dataModel,disabled:l.elementDisabled,dataSource:l.widget.options.remote?l.remoteOptions:l.dataOnly,render:function(e){return"".concat(e.title)},showSearch:l.widget.options.filterable,titles:l.widget.options.titles},on:{change:l.handleTransferChange}},"a-transfer",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e()],2)}),[],!1,null,null,null);t.default=T.exports},"9aa9":function(e,t){t.f=Object.getOwnPropertySymbols},"9b43":function(e,t,n){var i=n("d8e8");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}},"9b52":function(e,t,n){},"9c6c":function(e,t,n){var i=n("2b4c")("unscopables"),o=Array.prototype;null==o[i]&&n("32e9")(o,i,{}),e.exports=function(e){o[i][e]=!0}},"9c80":function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},"9def":function(e,t,n){var i=n("4588"),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a071:function(e,t,n){"use strict";n.r(t);n("a481"),n("7f7f");var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("75fc")),r=(n("6b54"),n("28a5"),n("5e15")),a=n("70fb"),s=n("a141"),l=n("2ef0"),c=n.n(l),u=n("ca17"),d=n("0f01"),f=n("4260");function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h={name:"widget-group",components:{Draggable:r.a,WidgetFormItem:a.a,WidgetInline:s.a,WidgetColItem:function(){return Promise.resolve().then(n.bind(null,"956f"))},WidgetTabItem:function(){return Promise.resolve().then(n.bind(null,"1d67"))},WidgetReport:function(){return Promise.resolve().then(n.bind(null,"8791"))},WidgetCollapse:function(){return Promise.resolve().then(n.bind(null,"ca11"))},WidgetTable:function(){return Promise.resolve().then(n.bind(null,"67c8"))},WidgetSubForm:function(){return Promise.resolve().then(n.bind(null,"fa24"))},WidgetCard:function(){return Promise.resolve().then(n.bind(null,"af3f"))}},props:["element","select","index","data","platform","formKey","subform"],inject:["getDragging","setDragging"],data:function(){return{selectWidget:this.select||{}}},methods:{handleMouseover:function(e){!this.getDragging()&&Object(f.a)(this.$refs.widgetGroup,"is-hover")},handleMouseout:function(e){Object(f.j)(this.$refs.widgetGroup,"is-hover")},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("dialog-put")>=0||n.children[0].className.split(" ").indexOf("dialog-put")>=0)},handleSelectWidget:function(e){this.$emit("update:select",this.data.list[e])},handleSelectChange:function(e,t){var n=this;setTimeout((function(){e>=0?n.$emit("update:select",n.element.list[e]):n.$emit("update:select",n.data.list[n.index])}))},handleWidgetClone:function(e){var t=this,n=c.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(u.a)(n)),this.$nextTick((function(){t.$emit("update:select",t.data.list[e+1]),t.$nextTick((function(){d.a.$emit("on-history-add-"+t.formKey)}))}))},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){d.a.$emit("on-history-add-"+t.formKey)}),20)},handleWidgetGroupAdd:function(e,t){var n=this,i=e.newIndex,r=Math.random().toString(36).slice(-8);Object(f.d)(t.list,i),t.list[i]=c.a.cloneDeep(t.list[i]),t.list[i]=m(m({},t.list[i]),{},{options:m(m({},t.list[i].options),{},{remoteFunc:t.list[i].options.remoteFunc||"func_"+r,remoteOption:t.list[i].options.remoteOption||"option_"+r,tableColumn:!1,subform:!1}),key:t.list[i].key?t.list[i].key:r,model:t.list[i].model?t.list[i].model:t.list[i].type+"_"+r,rules:t.list[i].rules?Object(o.a)(t.list[i].rules):[]}),"report"==t.list[i].type&&(t.list[i].rows=Object(f.f)(t.list[i].rows),t.list[i].headerRow=Object(f.g)(t.list[i].headerRow)),"grid"==t.list[i].type&&(t.list[i].columns=Object(f.e)(t.list[i].columns)),this.selectWidget=t.list[i],this.$nextTick((function(){d.a.$emit("on-history-add-"+n.formKey)}))},handleWidgetGroupUpdate:function(){d.a.$emit("on-history-add-"+this.formKey)}},watch:{select:function(e){this.selectWidget=e},selectWidget:function(e){this.$emit("update:select",e)}}},g=n("2877"),b=Object(g.a)(h,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetGroup",staticClass:"widget-group widget-view",class:{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-form-item",{class:Object(i.a)(Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),"fm-label-wrap",e.element.options.labelWrap),attrs:{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":""}},[e.element.options.tip?t("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:e._s(e.element.options.tip.replace(/\n/g,"<br/>"))}}):e._e(),t("div",{style:{width:e.element.options.width}},[t("draggable",e._b({staticClass:"widget-col-list",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetGroupAdd(t,e.element)},update:e.handleWidgetGroupUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:e.element.list,callback:function(t){e.$set(e.element,"list",t)},expression:"element.list"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[e._l(e.element.list,(function(n,i){return n&&n.key?["tabs"===n.type?t("widget-tab-item",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"collapse"===n.type?t("widget-collapse",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"table"===n.type?t("widget-table",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"subform"===n.type?t("widget-sub-form",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"card"===n.type?t("widget-card",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"inline"===n.type?t("widget-inline",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"report"===n.type?t("widget-report",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"group"===n.type?t("widget-group",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"grid"!==n.type?t("widget-form-item",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):t("widget-col-item",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}})]:e._e()}))],2)],1)]),e.select.key==e.element.key?t("div",{staticClass:"widget-view-action widget-subform-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.select.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-subform-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])],1)}),[],!1,null,null,null);t.default=b.exports},a141:function(e,t,n){"use strict";var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("75fc")),r=(n("6b54"),n("28a5"),n("70fb")),a=n("b76a"),s=n.n(a),l=n("2ef0"),c=n.n(l),u=n("ca17"),d=n("0f01"),f=n("4260");function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h={name:"widget-inline",components:{Draggable:s.a,WidgetFormItem:r.a},props:["element","select","index","data","platform","formKey","subform"],inject:["setDragging","getDragging"],data:function(){return{selectWidget:this.select||{}}},methods:{handleMouseover:function(e){!this.getDragging()&&Object(f.a)(this.$refs.widgetInline,"is-hover")},handleMouseout:function(e){Object(f.j)(this.$refs.widgetInline,"is-hover")},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-col")>=0||n.className.split(" ").indexOf("widget-table")>=0||n.className.split(" ").indexOf("widget-tab")>=0||n.className.split(" ").indexOf("widget-inline")>=0||n.className.split(" ").indexOf("widget-report")>=0||n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("widget-card")>=0||n.className.split(" ").indexOf("no-put")>=0||n.children[0].className.split(" ").indexOf("no-put")>=0)},handleWidgetInlineAdd:function(e,t){var n=this,i=e.newIndex,r=Math.random().toString(36).slice(-8);this.$set(t.list,i,c.a.cloneDeep(t.list[i])),this.$set(t.list,i,m(m({},t.list[i]),{},{options:m(m({},t.list[i].options),{},{remoteFunc:t.list[i].options.remoteFunc||"func_"+r,remoteOption:t.list[i].options.remoteOption||"option_"+r,subform:!!this.subform,tableColumn:!1}),key:t.list[i].key?t.list[i].key:r,model:t.list[i].model?t.list[i].model:t.list[i].type+"_"+r,rules:t.list[i].rules?Object(o.a)(t.list[i].rules):[]})),this.selectWidget=t.list[i],this.$nextTick((function(){d.a.$emit("on-history-add-"+n.formKey)}))},handleInlineClone:function(e){var t=this,n=c.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(u.a)(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){d.a.$emit("on-history-add-"+t.formKey)}))}))},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){d.a.$emit("on-history-add-"+t.formKey)}),20)},handleWidgetInlineUpdate:function(){var e=this;this.$nextTick((function(){d.a.$emit("on-history-add-"+e.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.list[e]:n.data.list[n.index]}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!1,handler:function(e){this.$emit("update:select",e)}}}},g=n("2877"),b=Object(g.a)(h,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetInline",staticClass:"widget-inline widget-view",class:{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden},attrs:{size:e.element.options.size},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("div",{staticClass:"widget-inline-content"},[t("draggable",e._b({staticClass:"widget-inline-list",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),style:{display:e.element.options.flex?"flex":"block","flex-direction":"row","flex-wrap":"wrap","justify-content":e.element.options.flexJustify||"normal","align-items":e.element.options.flexAlign||"normal"},attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetInlineAdd(t,e.element)},update:e.handleWidgetInlineUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:e.element.list,callback:function(t){e.$set(e.element,"list",t)},expression:"element.list"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[e._l(e.element.list,(function(n,i){return n&&n.key?[t("widget-form-item",{key:n.key,style:{"margin-right":e.element.options.spaceSize+"px"},attrs:{element:n,select:e.selectWidget,index:i,data:e.element,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,e.element)}}})]:e._e()}))],2)],1),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action widget-inline-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleInlineClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-inline-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])])}),[],!1,null,null,null);t.a=b.exports},a159:function(e,t,n){var i=n("e4ae"),o=n("7e90"),r=n("1691"),a=n("5559")("IE_PROTO"),s=function(){},l=function(){var e,t=n("1ec9")("iframe"),i=r.length;for(t.style.display="none",n("32fc").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;i--;)delete l.prototype[r[i]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=i(e),n=new s,s.prototype=null,n[a]=e):n=l(),void 0===t?n:o(n,t)}},a22a:function(e,t,n){var i=n("d864"),o=n("b0dc"),r=n("3702"),a=n("e4ae"),s=n("b447"),l=n("7cd6"),c={},u={};(t=e.exports=function(e,t,n,d,f){var p,m,h,g,b=f?function(){return e}:l(e),v=i(n,d,t?2:1),y=0;if("function"!=typeof b)throw TypeError(e+" is not iterable!");if(r(b)){for(p=s(e.length);p>y;y++)if((g=t?v(a(m=e[y])[0],m[1]):v(e[y]))===c||g===u)return g}else for(h=b.call(e);!(m=h.next()).done;)if((g=o(h,v,m.value,t))===c||g===u)return g}).BREAK=c,t.RETURN=u},a231:function(e,t,n){"use strict";n("38c4")},a25f:function(e,t,n){var i=n("7726").navigator;e.exports=i&&i.userAgent||""},a281:function(e,t,n){"use strict";n("af8a")},a481:function(e,t,n){"use strict";var i=n("cb7c"),o=n("4bf8"),r=n("9def"),a=n("4588"),s=n("0390"),l=n("5f1b"),c=Math.max,u=Math.min,d=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n("214f")("replace",2,(function(e,t,n,m){return[function(i,o){var r=e(this),a=null==i?void 0:i[t];return void 0!==a?a.call(i,r,o):n.call(String(r),i,o)},function(e,t){var o=m(n,e,this,t);if(o.done)return o.value;var d=i(e),f=String(this),p="function"==typeof t;p||(t=String(t));var g=d.global;if(g){var b=d.unicode;d.lastIndex=0}for(var v=[];;){var y=l(d,f);if(null===y)break;if(v.push(y),!g)break;""===String(y[0])&&(d.lastIndex=s(f,r(d.lastIndex),b))}for(var _,w="",x=0,k=0;k<v.length;k++){y=v[k];for(var O=String(y[0]),C=c(u(a(y.index),f.length),0),S=[],D=1;D<y.length;D++)S.push(void 0===(_=y[D])?_:String(_));var P=y.groups;if(p){var E=[O].concat(S,C,f);void 0!==P&&E.push(P);var j=String(t.apply(void 0,E))}else j=h(O,f,C,S,P,t);C>=x&&(w+=f.slice(x,C)+j,x=C+O.length)}return w+f.slice(x)}];function h(e,t,i,r,a,s){var l=i+e.length,c=r.length,u=p;return void 0!==a&&(a=o(a),u=f),n.call(s,u,(function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,i);case"'":return t.slice(l);case"<":s=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return n;if(u>c){var f=d(u/10);return 0===f?n:f<=c?void 0===r[f-1]?o.charAt(1):r[f-1]+o.charAt(1):n}s=r[u-1]}return void 0===s?"":s}))}}))},a512:function(e,t,n){},a5b8:function(e,t,n){"use strict";var i=n("d8e8");function o(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)}e.exports.f=function(e){return new o(e)}},a7be:function(e,t,n){},a8ba:function(e,t,n){"use strict";n("81a6")},aa47:function(e,t,n){"use strict";
|
|
16
|
+
*/(function(){var r="Expected a function",a="__lodash_placeholder__",s=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",c="[object Array]",u="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",h="[object Map]",g="[object Number]",b="[object Object]",v="[object RegExp]",y="[object Set]",_="[object String]",w="[object Symbol]",x="[object WeakMap]",k="[object ArrayBuffer]",O="[object DataView]",C="[object Float32Array]",S="[object Float64Array]",D="[object Int8Array]",P="[object Int16Array]",E="[object Int32Array]",j="[object Uint8Array]",M="[object Uint16Array]",F="[object Uint32Array]",T=/\b__p \+= '';/g,I=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,A=/[&<>"']/g,L=RegExp(R.source),N=RegExp(A.source),W=/<%-([\s\S]+?)%>/g,V=/<%([\s\S]+?)%>/g,z=/<%=([\s\S]+?)%>/g,B=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K=/^\w*$/,U=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/[\\^$.*+?()[\]{}|]/g,G=RegExp(H.source),q=/^\s+/,X=/\s/,J=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Y=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,Z=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ee=/[()=,{}\[\]\/\s]/,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ie=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,re=/^0b[01]+$/i,ae=/^\[object .+?Constructor\]$/,se=/^0o[0-7]+$/i,le=/^(?:0|[1-9]\d*)$/,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,de=/['\n\r\u2028\u2029\\]/g,fe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",me="[\\ud800-\\udfff]",he="["+pe+"]",ge="["+fe+"]",be="\\d+",ve="[\\u2700-\\u27bf]",ye="[a-z\\xdf-\\xf6\\xf8-\\xff]",_e="[^\\ud800-\\udfff"+pe+be+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",we="\\ud83c[\\udffb-\\udfff]",xe="[^\\ud800-\\udfff]",ke="(?:\\ud83c[\\udde6-\\uddff]){2}",Oe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Se="(?:"+ye+"|"+_e+")",De="(?:"+Ce+"|"+_e+")",Pe="(?:"+ge+"|"+we+")"+"?",Ee="[\\ufe0e\\ufe0f]?"+Pe+("(?:\\u200d(?:"+[xe,ke,Oe].join("|")+")[\\ufe0e\\ufe0f]?"+Pe+")*"),je="(?:"+[ve,ke,Oe].join("|")+")"+Ee,Me="(?:"+[xe+ge+"?",ge,ke,Oe,me].join("|")+")",Fe=RegExp("['’]","g"),Te=RegExp(ge,"g"),Ie=RegExp(we+"(?="+we+")|"+Me+Ee,"g"),$e=RegExp([Ce+"?"+ye+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[he,Ce,"$"].join("|")+")",De+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[he,Ce+Se,"$"].join("|")+")",Ce+"?"+Se+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ce+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",be,je].join("|"),"g"),Re=RegExp("[\\u200d\\ud800-\\udfff"+fe+"\\ufe0e\\ufe0f]"),Ae=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Le=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ne=-1,We={};We[C]=We[S]=We[D]=We[P]=We[E]=We[j]=We["[object Uint8ClampedArray]"]=We[M]=We[F]=!0,We[l]=We[c]=We[k]=We[u]=We[O]=We[d]=We[f]=We[p]=We[h]=We[g]=We[b]=We[v]=We[y]=We[_]=We[x]=!1;var Ve={};Ve[l]=Ve[c]=Ve[k]=Ve[O]=Ve[u]=Ve[d]=Ve[C]=Ve[S]=Ve[D]=Ve[P]=Ve[E]=Ve[h]=Ve[g]=Ve[b]=Ve[v]=Ve[y]=Ve[_]=Ve[w]=Ve[j]=Ve["[object Uint8ClampedArray]"]=Ve[M]=Ve[F]=!0,Ve[f]=Ve[p]=Ve[x]=!1;var ze={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Be=parseFloat,Ke=parseInt,Ue="object"==typeof e&&e&&e.Object===Object&&e,He="object"==typeof self&&self&&self.Object===Object&&self,Ge=Ue||He||Function("return this")(),qe=t&&!t.nodeType&&t,Xe=qe&&"object"==typeof i&&i&&!i.nodeType&&i,Je=Xe&&Xe.exports===qe,Ye=Je&&Ue.process,Qe=function(){try{var e=Xe&&Xe.require&&Xe.require("util").types;return e||Ye&&Ye.binding&&Ye.binding("util")}catch(e){}}(),Ze=Qe&&Qe.isArrayBuffer,et=Qe&&Qe.isDate,tt=Qe&&Qe.isMap,nt=Qe&&Qe.isRegExp,it=Qe&&Qe.isSet,ot=Qe&&Qe.isTypedArray;function rt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function at(e,t,n,i){for(var o=-1,r=null==e?0:e.length;++o<r;){var a=e[o];t(i,a,n(a),e)}return i}function st(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function ct(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function ut(e,t){for(var n=-1,i=null==e?0:e.length,o=0,r=[];++n<i;){var a=e[n];t(a,n,e)&&(r[o++]=a)}return r}function dt(e,t){return!!(null==e?0:e.length)&&wt(e,t,0)>-1}function ft(e,t,n){for(var i=-1,o=null==e?0:e.length;++i<o;)if(n(t,e[i]))return!0;return!1}function pt(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o}function mt(e,t){for(var n=-1,i=t.length,o=e.length;++n<i;)e[o+n]=t[n];return e}function ht(e,t,n,i){var o=-1,r=null==e?0:e.length;for(i&&r&&(n=e[++o]);++o<r;)n=t(n,e[o],o,e);return n}function gt(e,t,n,i){var o=null==e?0:e.length;for(i&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function bt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var vt=Ct("length");function yt(e,t,n){var i;return n(e,(function(e,n,o){if(t(e,n,o))return i=n,!1})),i}function _t(e,t,n,i){for(var o=e.length,r=n+(i?1:-1);i?r--:++r<o;)if(t(e[r],r,e))return r;return-1}function wt(e,t,n){return t==t?function(e,t,n){var i=n-1,o=e.length;for(;++i<o;)if(e[i]===t)return i;return-1}(e,t,n):_t(e,kt,n)}function xt(e,t,n,i){for(var o=n-1,r=e.length;++o<r;)if(i(e[o],t))return o;return-1}function kt(e){return e!=e}function Ot(e,t){var n=null==e?0:e.length;return n?Pt(e,t)/n:NaN}function Ct(e){return function(t){return null==t?void 0:t[e]}}function St(e){return function(t){return null==e?void 0:e[t]}}function Dt(e,t,n,i,o){return o(e,(function(e,o,r){n=i?(i=!1,e):t(n,e,o,r)})),n}function Pt(e,t){for(var n,i=-1,o=e.length;++i<o;){var r=t(e[i]);void 0!==r&&(n=void 0===n?r:n+r)}return n}function Et(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function jt(e){return e?e.slice(0,qt(e)+1).replace(q,""):e}function Mt(e){return function(t){return e(t)}}function Ft(e,t){return pt(t,(function(t){return e[t]}))}function Tt(e,t){return e.has(t)}function It(e,t){for(var n=-1,i=e.length;++n<i&&wt(t,e[n],0)>-1;);return n}function $t(e,t){for(var n=e.length;n--&&wt(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var At=St({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Lt=St({"&":"&","<":"<",">":">",'"':""","'":"'"});function Nt(e){return"\\"+ze[e]}function Wt(e){return Re.test(e)}function Vt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function zt(e,t){return function(n){return e(t(n))}}function Bt(e,t){for(var n=-1,i=e.length,o=0,r=[];++n<i;){var s=e[n];s!==t&&s!==a||(e[n]=a,r[o++]=n)}return r}function Kt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Ht(e){return Wt(e)?function(e){var t=Ie.lastIndex=0;for(;Ie.test(e);)++t;return t}(e):vt(e)}function Gt(e){return Wt(e)?function(e){return e.match(Ie)||[]}(e):function(e){return e.split("")}(e)}function qt(e){for(var t=e.length;t--&&X.test(e.charAt(t)););return t}var Xt=St({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Jt=function e(t){var n,i=(t=null==t?Ge:Jt.defaults(Ge.Object(),t,Jt.pick(Ge,Le))).Array,o=t.Date,X=t.Error,fe=t.Function,pe=t.Math,me=t.Object,he=t.RegExp,ge=t.String,be=t.TypeError,ve=i.prototype,ye=fe.prototype,_e=me.prototype,we=t["__core-js_shared__"],xe=ye.toString,ke=_e.hasOwnProperty,Oe=0,Ce=(n=/[^.]+$/.exec(we&&we.keys&&we.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Se=_e.toString,De=xe.call(me),Pe=Ge._,Ee=he("^"+xe.call(ke).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),je=Je?t.Buffer:void 0,Me=t.Symbol,Ie=t.Uint8Array,Re=je?je.allocUnsafe:void 0,ze=zt(me.getPrototypeOf,me),Ue=me.create,He=_e.propertyIsEnumerable,qe=ve.splice,Xe=Me?Me.isConcatSpreadable:void 0,Ye=Me?Me.iterator:void 0,Qe=Me?Me.toStringTag:void 0,vt=function(){try{var e=tr(me,"defineProperty");return e({},"",{}),e}catch(e){}}(),St=t.clearTimeout!==Ge.clearTimeout&&t.clearTimeout,Yt=o&&o.now!==Ge.Date.now&&o.now,Qt=t.setTimeout!==Ge.setTimeout&&t.setTimeout,Zt=pe.ceil,en=pe.floor,tn=me.getOwnPropertySymbols,nn=je?je.isBuffer:void 0,on=t.isFinite,rn=ve.join,an=zt(me.keys,me),sn=pe.max,ln=pe.min,cn=o.now,un=t.parseInt,dn=pe.random,fn=ve.reverse,pn=tr(t,"DataView"),mn=tr(t,"Map"),hn=tr(t,"Promise"),gn=tr(t,"Set"),bn=tr(t,"WeakMap"),vn=tr(me,"create"),yn=bn&&new bn,_n={},wn=Pr(pn),xn=Pr(mn),kn=Pr(hn),On=Pr(gn),Cn=Pr(bn),Sn=Me?Me.prototype:void 0,Dn=Sn?Sn.valueOf:void 0,Pn=Sn?Sn.toString:void 0;function En(e){if(Ua(e)&&!Ia(e)&&!(e instanceof Tn)){if(e instanceof Fn)return e;if(ke.call(e,"__wrapped__"))return Er(e)}return new Fn(e)}var jn=function(){function e(){}return function(t){if(!Ka(t))return{};if(Ue)return Ue(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Mn(){}function Fn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Tn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function In(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function An(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Rn;++t<n;)this.add(e[t])}function Ln(e){var t=this.__data__=new $n(e);this.size=t.size}function Nn(e,t){var n=Ia(e),i=!n&&Ta(e),o=!n&&!i&&La(e),r=!n&&!i&&!o&&Za(e),a=n||i||o||r,s=a?Et(e.length,ge):[],l=s.length;for(var c in e)!t&&!ke.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||lr(c,l))||s.push(c);return s}function Wn(e){var t=e.length;return t?e[Ai(0,t-1)]:void 0}function Vn(e,t){return Cr(yo(e),Jn(t,0,e.length))}function zn(e){return Cr(yo(e))}function Bn(e,t,n){(void 0!==n&&!ja(e[t],n)||void 0===n&&!(t in e))&&qn(e,t,n)}function Kn(e,t,n){var i=e[t];ke.call(e,t)&&ja(i,n)&&(void 0!==n||t in e)||qn(e,t,n)}function Un(e,t){for(var n=e.length;n--;)if(ja(e[n][0],t))return n;return-1}function Hn(e,t,n,i){return ti(e,(function(e,o,r){t(i,e,n(e),r)})),i}function Gn(e,t){return e&&_o(t,ws(t),e)}function qn(e,t,n){"__proto__"==t&&vt?vt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Xn(e,t){for(var n=-1,o=t.length,r=i(o),a=null==e;++n<o;)r[n]=a?void 0:gs(e,t[n]);return r}function Jn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Yn(e,t,n,i,o,r){var a,s=1&t,c=2&t,f=4&t;if(n&&(a=o?n(e,i,o,r):n(e)),void 0!==a)return a;if(!Ka(e))return e;var x=Ia(e);if(x){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&ke.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return yo(e,a)}else{var T=or(e),I=T==p||T==m;if(La(e))return po(e,s);if(T==b||T==l||I&&!o){if(a=c||I?{}:ar(e),!s)return c?function(e,t){return _o(e,ir(e),t)}(e,function(e,t){return e&&_o(t,xs(t),e)}(a,e)):function(e,t){return _o(e,nr(e),t)}(e,Gn(a,e))}else{if(!Ve[T])return o?e:{};a=function(e,t,n){var i=e.constructor;switch(t){case k:return mo(e);case u:case d:return new i(+e);case O:return function(e,t){var n=t?mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case C:case S:case D:case P:case E:case j:case"[object Uint8ClampedArray]":case M:case F:return ho(e,n);case h:return new i;case g:case _:return new i(e);case v:return function(e){var t=new e.constructor(e.source,ie.exec(e));return t.lastIndex=e.lastIndex,t}(e);case y:return new i;case w:return o=e,Dn?me(Dn.call(o)):{}}var o}(e,T,s)}}r||(r=new Ln);var $=r.get(e);if($)return $;r.set(e,a),Ja(e)?e.forEach((function(i){a.add(Yn(i,t,n,i,e,r))})):Ha(e)&&e.forEach((function(i,o){a.set(o,Yn(i,t,n,o,e,r))}));var R=x?void 0:(f?c?qo:Go:c?xs:ws)(e);return st(R||e,(function(i,o){R&&(i=e[o=i]),Kn(a,o,Yn(i,t,n,o,e,r))})),a}function Qn(e,t,n){var i=n.length;if(null==e)return!i;for(e=me(e);i--;){var o=n[i],r=t[o],a=e[o];if(void 0===a&&!(o in e)||!r(a))return!1}return!0}function Zn(e,t,n){if("function"!=typeof e)throw new be(r);return wr((function(){e.apply(void 0,n)}),t)}function ei(e,t,n,i){var o=-1,r=dt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=pt(t,Mt(n))),i?(r=ft,a=!1):t.length>=200&&(r=Tt,a=!1,t=new An(t));e:for(;++o<s;){var u=e[o],d=null==n?u:n(u);if(u=i||0!==u?u:0,a&&d==d){for(var f=c;f--;)if(t[f]===d)continue e;l.push(u)}else r(t,d,i)||l.push(u)}return l}En.templateSettings={escape:W,evaluate:V,interpolate:z,variable:"",imports:{_:En}},En.prototype=Mn.prototype,En.prototype.constructor=En,Fn.prototype=jn(Mn.prototype),Fn.prototype.constructor=Fn,Tn.prototype=jn(Mn.prototype),Tn.prototype.constructor=Tn,In.prototype.clear=function(){this.__data__=vn?vn(null):{},this.size=0},In.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},In.prototype.get=function(e){var t=this.__data__;if(vn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ke.call(t,e)?t[e]:void 0},In.prototype.has=function(e){var t=this.__data__;return vn?void 0!==t[e]:ke.call(t,e)},In.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=vn&&void 0===t?"__lodash_hash_undefined__":t,this},$n.prototype.clear=function(){this.__data__=[],this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=Un(t,e);return!(n<0)&&(n==t.length-1?t.pop():qe.call(t,n,1),--this.size,!0)},$n.prototype.get=function(e){var t=this.__data__,n=Un(t,e);return n<0?void 0:t[n][1]},$n.prototype.has=function(e){return Un(this.__data__,e)>-1},$n.prototype.set=function(e,t){var n=this.__data__,i=Un(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new In,map:new(mn||$n),string:new In}},Rn.prototype.delete=function(e){var t=Zo(this,e).delete(e);return this.size-=t?1:0,t},Rn.prototype.get=function(e){return Zo(this,e).get(e)},Rn.prototype.has=function(e){return Zo(this,e).has(e)},Rn.prototype.set=function(e,t){var n=Zo(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},An.prototype.add=An.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},An.prototype.has=function(e){return this.__data__.has(e)},Ln.prototype.clear=function(){this.__data__=new $n,this.size=0},Ln.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ln.prototype.get=function(e){return this.__data__.get(e)},Ln.prototype.has=function(e){return this.__data__.has(e)},Ln.prototype.set=function(e,t){var n=this.__data__;if(n instanceof $n){var i=n.__data__;if(!mn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Rn(i)}return n.set(e,t),this.size=n.size,this};var ti=ko(ci),ni=ko(ui,!0);function ii(e,t){var n=!0;return ti(e,(function(e,i,o){return n=!!t(e,i,o)})),n}function oi(e,t,n){for(var i=-1,o=e.length;++i<o;){var r=e[i],a=t(r);if(null!=a&&(void 0===s?a==a&&!Qa(a):n(a,s)))var s=a,l=r}return l}function ri(e,t){var n=[];return ti(e,(function(e,i,o){t(e,i,o)&&n.push(e)})),n}function ai(e,t,n,i,o){var r=-1,a=e.length;for(n||(n=sr),o||(o=[]);++r<a;){var s=e[r];t>0&&n(s)?t>1?ai(s,t-1,n,i,o):mt(o,s):i||(o[o.length]=s)}return o}var si=Oo(),li=Oo(!0);function ci(e,t){return e&&si(e,t,ws)}function ui(e,t){return e&&li(e,t,ws)}function di(e,t){return ut(t,(function(t){return Va(e[t])}))}function fi(e,t){for(var n=0,i=(t=lo(t,e)).length;null!=e&&n<i;)e=e[Dr(t[n++])];return n&&n==i?e:void 0}function pi(e,t,n){var i=t(e);return Ia(e)?i:mt(i,n(e))}function mi(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Qe&&Qe in me(e)?function(e){var t=ke.call(e,Qe),n=e[Qe];try{e[Qe]=void 0;var i=!0}catch(e){}var o=Se.call(e);i&&(t?e[Qe]=n:delete e[Qe]);return o}(e):function(e){return Se.call(e)}(e)}function hi(e,t){return e>t}function gi(e,t){return null!=e&&ke.call(e,t)}function bi(e,t){return null!=e&&t in me(e)}function vi(e,t,n){for(var o=n?ft:dt,r=e[0].length,a=e.length,s=a,l=i(a),c=1/0,u=[];s--;){var d=e[s];s&&t&&(d=pt(d,Mt(t))),c=ln(d.length,c),l[s]=!n&&(t||r>=120&&d.length>=120)?new An(s&&d):void 0}d=e[0];var f=-1,p=l[0];e:for(;++f<r&&u.length<c;){var m=d[f],h=t?t(m):m;if(m=n||0!==m?m:0,!(p?Tt(p,h):o(u,h,n))){for(s=a;--s;){var g=l[s];if(!(g?Tt(g,h):o(e[s],h,n)))continue e}p&&p.push(h),u.push(m)}}return u}function yi(e,t,n){var i=null==(e=br(e,t=lo(t,e)))?e:e[Dr(Wr(t))];return null==i?void 0:rt(i,e,n)}function _i(e){return Ua(e)&&mi(e)==l}function wi(e,t,n,i,o){return e===t||(null==e||null==t||!Ua(e)&&!Ua(t)?e!=e&&t!=t:function(e,t,n,i,o,r){var a=Ia(e),s=Ia(t),p=a?c:or(e),m=s?c:or(t),x=(p=p==l?b:p)==b,C=(m=m==l?b:m)==b,S=p==m;if(S&&La(e)){if(!La(t))return!1;a=!0,x=!1}if(S&&!x)return r||(r=new Ln),a||Za(e)?Uo(e,t,n,i,o,r):function(e,t,n,i,o,r,a){switch(n){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!r(new Ie(e),new Ie(t)));case u:case d:case g:return ja(+e,+t);case f:return e.name==t.name&&e.message==t.message;case v:case _:return e==t+"";case h:var s=Vt;case y:var l=1&i;if(s||(s=Kt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;i|=2,a.set(e,t);var p=Uo(s(e),s(t),i,o,r,a);return a.delete(e),p;case w:if(Dn)return Dn.call(e)==Dn.call(t)}return!1}(e,t,p,n,i,o,r);if(!(1&n)){var D=x&&ke.call(e,"__wrapped__"),P=C&&ke.call(t,"__wrapped__");if(D||P){var E=D?e.value():e,j=P?t.value():t;return r||(r=new Ln),o(E,j,n,i,r)}}if(!S)return!1;return r||(r=new Ln),function(e,t,n,i,o,r){var a=1&n,s=Go(e),l=s.length,c=Go(t).length;if(l!=c&&!a)return!1;var u=l;for(;u--;){var d=s[u];if(!(a?d in t:ke.call(t,d)))return!1}var f=r.get(e),p=r.get(t);if(f&&p)return f==t&&p==e;var m=!0;r.set(e,t),r.set(t,e);var h=a;for(;++u<l;){d=s[u];var g=e[d],b=t[d];if(i)var v=a?i(b,g,d,t,e,r):i(g,b,d,e,t,r);if(!(void 0===v?g===b||o(g,b,n,i,r):v)){m=!1;break}h||(h="constructor"==d)}if(m&&!h){var y=e.constructor,_=t.constructor;y==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _||(m=!1)}return r.delete(e),r.delete(t),m}(e,t,n,i,o,r)}(e,t,n,i,wi,o))}function xi(e,t,n,i){var o=n.length,r=o,a=!i;if(null==e)return!r;for(e=me(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<r;){var l=(s=n[o])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var d=new Ln;if(i)var f=i(c,u,l,e,t,d);if(!(void 0===f?wi(u,c,3,i,d):f))return!1}}return!0}function ki(e){return!(!Ka(e)||(t=e,Ce&&Ce in t))&&(Va(e)?Ee:ae).test(Pr(e));var t}function Oi(e){return"function"==typeof e?e:null==e?Gs:"object"==typeof e?Ia(e)?ji(e[0],e[1]):Ei(e):nl(e)}function Ci(e){if(!pr(e))return an(e);var t=[];for(var n in me(e))ke.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Si(e){if(!Ka(e))return function(e){var t=[];if(null!=e)for(var n in me(e))t.push(n);return t}(e);var t=pr(e),n=[];for(var i in e)("constructor"!=i||!t&&ke.call(e,i))&&n.push(i);return n}function Di(e,t){return e<t}function Pi(e,t){var n=-1,o=Ra(e)?i(e.length):[];return ti(e,(function(e,i,r){o[++n]=t(e,i,r)})),o}function Ei(e){var t=er(e);return 1==t.length&&t[0][2]?hr(t[0][0],t[0][1]):function(n){return n===e||xi(n,e,t)}}function ji(e,t){return ur(e)&&mr(t)?hr(Dr(e),t):function(n){var i=gs(n,e);return void 0===i&&i===t?bs(n,e):wi(t,i,3)}}function Mi(e,t,n,i,o){e!==t&&si(t,(function(r,a){if(o||(o=new Ln),Ka(r))!function(e,t,n,i,o,r,a){var s=yr(e,n),l=yr(t,n),c=a.get(l);if(c)return void Bn(e,n,c);var u=r?r(s,l,n+"",e,t,a):void 0,d=void 0===u;if(d){var f=Ia(l),p=!f&&La(l),m=!f&&!p&&Za(l);u=l,f||p||m?Ia(s)?u=s:Aa(s)?u=yo(s):p?(d=!1,u=po(l,!0)):m?(d=!1,u=ho(l,!0)):u=[]:qa(l)||Ta(l)?(u=s,Ta(s)?u=ss(s):Ka(s)&&!Va(s)||(u=ar(l))):d=!1}d&&(a.set(l,u),o(u,l,i,r,a),a.delete(l));Bn(e,n,u)}(e,t,a,n,Mi,i,o);else{var s=i?i(yr(e,a),r,a+"",e,t,o):void 0;void 0===s&&(s=r),Bn(e,a,s)}}),xs)}function Fi(e,t){var n=e.length;if(n)return lr(t+=t<0?n:0,n)?e[t]:void 0}function Ti(e,t,n){t=t.length?pt(t,(function(e){return Ia(e)?function(t){return fi(t,1===e.length?e[0]:e)}:e})):[Gs];var i=-1;return t=pt(t,Mt(Qo())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(Pi(e,(function(e,n,o){return{criteria:pt(t,(function(t){return t(e)})),index:++i,value:e}})),(function(e,t){return function(e,t,n){var i=-1,o=e.criteria,r=t.criteria,a=o.length,s=n.length;for(;++i<a;){var l=go(o[i],r[i]);if(l){if(i>=s)return l;var c=n[i];return l*("desc"==c?-1:1)}}return e.index-t.index}(e,t,n)}))}function Ii(e,t,n){for(var i=-1,o=t.length,r={};++i<o;){var a=t[i],s=fi(e,a);n(s,a)&&zi(r,lo(a,e),s)}return r}function $i(e,t,n,i){var o=i?xt:wt,r=-1,a=t.length,s=e;for(e===t&&(t=yo(t)),n&&(s=pt(e,Mt(n)));++r<a;)for(var l=0,c=t[r],u=n?n(c):c;(l=o(s,u,l,i))>-1;)s!==e&&qe.call(s,l,1),qe.call(e,l,1);return e}function Ri(e,t){for(var n=e?t.length:0,i=n-1;n--;){var o=t[n];if(n==i||o!==r){var r=o;lr(o)?qe.call(e,o,1):eo(e,o)}}return e}function Ai(e,t){return e+en(dn()*(t-e+1))}function Li(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=en(t/2))&&(e+=e)}while(t);return n}function Ni(e,t){return xr(gr(e,t,Gs),e+"")}function Wi(e){return Wn(js(e))}function Vi(e,t){var n=js(e);return Cr(n,Jn(t,0,n.length))}function zi(e,t,n,i){if(!Ka(e))return e;for(var o=-1,r=(t=lo(t,e)).length,a=r-1,s=e;null!=s&&++o<r;){var l=Dr(t[o]),c=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var u=s[l];void 0===(c=i?i(u,l,s):void 0)&&(c=Ka(u)?u:lr(t[o+1])?[]:{})}Kn(s,l,c),s=s[l]}return e}var Bi=yn?function(e,t){return yn.set(e,t),e}:Gs,Ki=vt?function(e,t){return vt(e,"toString",{configurable:!0,enumerable:!1,value:Ks(t),writable:!0})}:Gs;function Ui(e){return Cr(js(e))}function Hi(e,t,n){var o=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=i(r);++o<r;)a[o]=e[o+t];return a}function Gi(e,t){var n;return ti(e,(function(e,i,o){return!(n=t(e,i,o))})),!!n}function qi(e,t,n){var i=0,o=null==e?i:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;i<o;){var r=i+o>>>1,a=e[r];null!==a&&!Qa(a)&&(n?a<=t:a<t)?i=r+1:o=r}return o}return Xi(e,t,Gs,n)}function Xi(e,t,n,i){var o=0,r=null==e?0:e.length;if(0===r)return 0;for(var a=(t=n(t))!=t,s=null===t,l=Qa(t),c=void 0===t;o<r;){var u=en((o+r)/2),d=n(e[u]),f=void 0!==d,p=null===d,m=d==d,h=Qa(d);if(a)var g=i||m;else g=c?m&&(i||f):s?m&&f&&(i||!p):l?m&&f&&!p&&(i||!h):!p&&!h&&(i?d<=t:d<t);g?o=u+1:r=u}return ln(r,4294967294)}function Ji(e,t){for(var n=-1,i=e.length,o=0,r=[];++n<i;){var a=e[n],s=t?t(a):a;if(!n||!ja(s,l)){var l=s;r[o++]=0===a?0:a}}return r}function Yi(e){return"number"==typeof e?e:Qa(e)?NaN:+e}function Qi(e){if("string"==typeof e)return e;if(Ia(e))return pt(e,Qi)+"";if(Qa(e))return Pn?Pn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Zi(e,t,n){var i=-1,o=dt,r=e.length,a=!0,s=[],l=s;if(n)a=!1,o=ft;else if(r>=200){var c=t?null:No(e);if(c)return Kt(c);a=!1,o=Tt,l=new An}else l=t?[]:s;e:for(;++i<r;){var u=e[i],d=t?t(u):u;if(u=n||0!==u?u:0,a&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}function eo(e,t){return null==(e=br(e,t=lo(t,e)))||delete e[Dr(Wr(t))]}function to(e,t,n,i){return zi(e,t,n(fi(e,t)),i)}function no(e,t,n,i){for(var o=e.length,r=i?o:-1;(i?r--:++r<o)&&t(e[r],r,e););return n?Hi(e,i?0:r,i?r+1:o):Hi(e,i?r+1:0,i?o:r)}function io(e,t){var n=e;return n instanceof Tn&&(n=n.value()),ht(t,(function(e,t){return t.func.apply(t.thisArg,mt([e],t.args))}),n)}function oo(e,t,n){var o=e.length;if(o<2)return o?Zi(e[0]):[];for(var r=-1,a=i(o);++r<o;)for(var s=e[r],l=-1;++l<o;)l!=r&&(a[r]=ei(a[r]||s,e[l],t,n));return Zi(ai(a,1),t,n)}function ro(e,t,n){for(var i=-1,o=e.length,r=t.length,a={};++i<o;){var s=i<r?t[i]:void 0;n(a,e[i],s)}return a}function ao(e){return Aa(e)?e:[]}function so(e){return"function"==typeof e?e:Gs}function lo(e,t){return Ia(e)?e:ur(e,t)?[e]:Sr(ls(e))}var co=Ni;function uo(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:Hi(e,t,n)}var fo=St||function(e){return Ge.clearTimeout(e)};function po(e,t){if(t)return e.slice();var n=e.length,i=Re?Re(n):new e.constructor(n);return e.copy(i),i}function mo(e){var t=new e.constructor(e.byteLength);return new Ie(t).set(new Ie(e)),t}function ho(e,t){var n=t?mo(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function go(e,t){if(e!==t){var n=void 0!==e,i=null===e,o=e==e,r=Qa(e),a=void 0!==t,s=null===t,l=t==t,c=Qa(t);if(!s&&!c&&!r&&e>t||r&&a&&l&&!s&&!c||i&&a&&l||!n&&l||!o)return 1;if(!i&&!r&&!c&&e<t||c&&n&&o&&!i&&!r||s&&n&&o||!a&&o||!l)return-1}return 0}function bo(e,t,n,o){for(var r=-1,a=e.length,s=n.length,l=-1,c=t.length,u=sn(a-s,0),d=i(c+u),f=!o;++l<c;)d[l]=t[l];for(;++r<s;)(f||r<a)&&(d[n[r]]=e[r]);for(;u--;)d[l++]=e[r++];return d}function vo(e,t,n,o){for(var r=-1,a=e.length,s=-1,l=n.length,c=-1,u=t.length,d=sn(a-l,0),f=i(d+u),p=!o;++r<d;)f[r]=e[r];for(var m=r;++c<u;)f[m+c]=t[c];for(;++s<l;)(p||r<a)&&(f[m+n[s]]=e[r++]);return f}function yo(e,t){var n=-1,o=e.length;for(t||(t=i(o));++n<o;)t[n]=e[n];return t}function _o(e,t,n,i){var o=!n;n||(n={});for(var r=-1,a=t.length;++r<a;){var s=t[r],l=i?i(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),o?qn(n,s,l):Kn(n,s,l)}return n}function wo(e,t){return function(n,i){var o=Ia(n)?at:Hn,r=t?t():{};return o(n,e,Qo(i,2),r)}}function xo(e){return Ni((function(t,n){var i=-1,o=n.length,r=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(r=e.length>3&&"function"==typeof r?(o--,r):void 0,a&&cr(n[0],n[1],a)&&(r=o<3?void 0:r,o=1),t=me(t);++i<o;){var s=n[i];s&&e(t,s,i,r)}return t}))}function ko(e,t){return function(n,i){if(null==n)return n;if(!Ra(n))return e(n,i);for(var o=n.length,r=t?o:-1,a=me(n);(t?r--:++r<o)&&!1!==i(a[r],r,a););return n}}function Oo(e){return function(t,n,i){for(var o=-1,r=me(t),a=i(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(r[l],l,r))break}return t}}function Co(e){return function(t){var n=Wt(t=ls(t))?Gt(t):void 0,i=n?n[0]:t.charAt(0),o=n?uo(n,1).join(""):t.slice(1);return i[e]()+o}}function So(e){return function(t){return ht(Vs(Ts(t).replace(Fe,"")),e,"")}}function Do(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=jn(e.prototype),i=e.apply(n,t);return Ka(i)?i:n}}function Po(e){return function(t,n,i){var o=me(t);if(!Ra(t)){var r=Qo(n,3);t=ws(t),n=function(e){return r(o[e],e,o)}}var a=e(t,n,i);return a>-1?o[r?t[a]:a]:void 0}}function Eo(e){return Ho((function(t){var n=t.length,i=n,o=Fn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new be(r);if(o&&!s&&"wrapper"==Jo(a))var s=new Fn([],!0)}for(i=s?i:n;++i<n;){var l=Jo(a=t[i]),c="wrapper"==l?Xo(a):void 0;s=c&&dr(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?s[Jo(c[0])].apply(s,c[3]):1==a.length&&dr(a)?s[l]():s.thru(a)}return function(){var e=arguments,i=e[0];if(s&&1==e.length&&Ia(i))return s.plant(i).value();for(var o=0,r=n?t[o].apply(this,e):i;++o<n;)r=t[o].call(this,r);return r}}))}function jo(e,t,n,o,r,a,s,l,c,u){var d=128&t,f=1&t,p=2&t,m=24&t,h=512&t,g=p?void 0:Do(e);return function b(){for(var v=arguments.length,y=i(v),_=v;_--;)y[_]=arguments[_];if(m)var w=Yo(b),x=Rt(y,w);if(o&&(y=bo(y,o,r,m)),a&&(y=vo(y,a,s,m)),v-=x,m&&v<u){var k=Bt(y,w);return Ao(e,t,jo,b.placeholder,n,y,k,l,c,u-v)}var O=f?n:this,C=p?O[e]:e;return v=y.length,l?y=vr(y,l):h&&v>1&&y.reverse(),d&&c<v&&(y.length=c),this&&this!==Ge&&this instanceof b&&(C=g||Do(C)),C.apply(O,y)}}function Mo(e,t){return function(n,i){return function(e,t,n,i){return ci(e,(function(e,o,r){t(i,n(e),o,r)})),i}(n,e,t(i),{})}}function Fo(e,t){return function(n,i){var o;if(void 0===n&&void 0===i)return t;if(void 0!==n&&(o=n),void 0!==i){if(void 0===o)return i;"string"==typeof n||"string"==typeof i?(n=Qi(n),i=Qi(i)):(n=Yi(n),i=Yi(i)),o=e(n,i)}return o}}function To(e){return Ho((function(t){return t=pt(t,Mt(Qo())),Ni((function(n){var i=this;return e(t,(function(e){return rt(e,i,n)}))}))}))}function Io(e,t){var n=(t=void 0===t?" ":Qi(t)).length;if(n<2)return n?Li(t,e):t;var i=Li(t,Zt(e/Ht(t)));return Wt(t)?uo(Gt(i),0,e).join(""):i.slice(0,e)}function $o(e){return function(t,n,o){return o&&"number"!=typeof o&&cr(t,n,o)&&(n=o=void 0),t=is(t),void 0===n?(n=t,t=0):n=is(n),function(e,t,n,o){for(var r=-1,a=sn(Zt((t-e)/(n||1)),0),s=i(a);a--;)s[o?a:++r]=e,e+=n;return s}(t,n,o=void 0===o?t<n?1:-1:is(o),e)}}function Ro(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=as(t),n=as(n)),e(t,n)}}function Ao(e,t,n,i,o,r,a,s,l,c){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,o,u?r:void 0,u?a:void 0,u?void 0:r,u?void 0:a,s,l,c],f=n.apply(void 0,d);return dr(e)&&_r(f,d),f.placeholder=i,kr(f,e,t)}function Lo(e){var t=pe[e];return function(e,n){if(e=as(e),(n=null==n?0:ln(os(n),292))&&on(e)){var i=(ls(e)+"e").split("e");return+((i=(ls(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var No=gn&&1/Kt(new gn([,-0]))[1]==1/0?function(e){return new gn(e)}:Qs;function Wo(e){return function(t){var n=or(t);return n==h?Vt(t):n==y?Ut(t):function(e,t){return pt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Vo(e,t,n,o,s,l,c,u){var d=2&t;if(!d&&"function"!=typeof e)throw new be(r);var f=o?o.length:0;if(f||(t&=-97,o=s=void 0),c=void 0===c?c:sn(os(c),0),u=void 0===u?u:os(u),f-=s?s.length:0,64&t){var p=o,m=s;o=s=void 0}var h=d?void 0:Xo(e),g=[e,t,n,o,s,p,m,l,c,u];if(h&&function(e,t){var n=e[1],i=t[1],o=n|i,r=o<131,s=128==i&&8==n||128==i&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!r&&!s)return e;1&i&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?bo(c,l,t[4]):l,e[4]=c?Bt(e[3],a):t[4]}(l=t[5])&&(c=e[5],e[5]=c?vo(c,l,t[6]):l,e[6]=c?Bt(e[5],a):t[6]);(l=t[7])&&(e[7]=l);128&i&&(e[8]=null==e[8]?t[8]:ln(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=o}(g,h),e=g[0],t=g[1],n=g[2],o=g[3],s=g[4],!(u=g[9]=void 0===g[9]?d?0:e.length:sn(g[9]-f,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,n){var o=Do(e);return function r(){for(var a=arguments.length,s=i(a),l=a,c=Yo(r);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:Bt(s,c);if((a-=u.length)<n)return Ao(e,t,jo,r.placeholder,void 0,s,u,void 0,void 0,n-a);var d=this&&this!==Ge&&this instanceof r?o:e;return rt(d,this,s)}}(e,t,u):32!=t&&33!=t||s.length?jo.apply(void 0,g):function(e,t,n,o){var r=1&t,a=Do(e);return function t(){for(var s=-1,l=arguments.length,c=-1,u=o.length,d=i(u+l),f=this&&this!==Ge&&this instanceof t?a:e;++c<u;)d[c]=o[c];for(;l--;)d[c++]=arguments[++s];return rt(f,r?n:this,d)}}(e,t,n,o);else var b=function(e,t,n){var i=1&t,o=Do(e);return function t(){var r=this&&this!==Ge&&this instanceof t?o:e;return r.apply(i?n:this,arguments)}}(e,t,n);return kr((h?Bi:_r)(b,g),e,t)}function zo(e,t,n,i){return void 0===e||ja(e,_e[n])&&!ke.call(i,n)?t:e}function Bo(e,t,n,i,o,r){return Ka(e)&&Ka(t)&&(r.set(t,e),Mi(e,t,void 0,Bo,r),r.delete(t)),e}function Ko(e){return qa(e)?void 0:e}function Uo(e,t,n,i,o,r){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=r.get(e),u=r.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=2&n?new An:void 0;for(r.set(e,t),r.set(t,e);++d<s;){var m=e[d],h=t[d];if(i)var g=a?i(h,m,d,t,e,r):i(m,h,d,e,t,r);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!bt(t,(function(e,t){if(!Tt(p,t)&&(m===e||o(m,e,n,i,r)))return p.push(t)}))){f=!1;break}}else if(m!==h&&!o(m,h,n,i,r)){f=!1;break}}return r.delete(e),r.delete(t),f}function Ho(e){return xr(gr(e,void 0,$r),e+"")}function Go(e){return pi(e,ws,nr)}function qo(e){return pi(e,xs,ir)}var Xo=yn?function(e){return yn.get(e)}:Qs;function Jo(e){for(var t=e.name+"",n=_n[t],i=ke.call(_n,t)?n.length:0;i--;){var o=n[i],r=o.func;if(null==r||r==e)return o.name}return t}function Yo(e){return(ke.call(En,"placeholder")?En:e).placeholder}function Qo(){var e=En.iteratee||qs;return e=e===qs?Oi:e,arguments.length?e(arguments[0],arguments[1]):e}function Zo(e,t){var n,i,o=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function er(e){for(var t=ws(e),n=t.length;n--;){var i=t[n],o=e[i];t[n]=[i,o,mr(o)]}return t}function tr(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ki(n)?n:void 0}var nr=tn?function(e){return null==e?[]:(e=me(e),ut(tn(e),(function(t){return He.call(e,t)})))}:rl,ir=tn?function(e){for(var t=[];e;)mt(t,nr(e)),e=ze(e);return t}:rl,or=mi;function rr(e,t,n){for(var i=-1,o=(t=lo(t,e)).length,r=!1;++i<o;){var a=Dr(t[i]);if(!(r=null!=e&&n(e,a)))break;e=e[a]}return r||++i!=o?r:!!(o=null==e?0:e.length)&&Ba(o)&&lr(a,o)&&(Ia(e)||Ta(e))}function ar(e){return"function"!=typeof e.constructor||pr(e)?{}:jn(ze(e))}function sr(e){return Ia(e)||Ta(e)||!!(Xe&&e&&e[Xe])}function lr(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&le.test(e))&&e>-1&&e%1==0&&e<t}function cr(e,t,n){if(!Ka(n))return!1;var i=typeof t;return!!("number"==i?Ra(n)&&lr(t,n.length):"string"==i&&t in n)&&ja(n[t],e)}function ur(e,t){if(Ia(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Qa(e))||(K.test(e)||!B.test(e)||null!=t&&e in me(t))}function dr(e){var t=Jo(e),n=En[t];if("function"!=typeof n||!(t in Tn.prototype))return!1;if(e===n)return!0;var i=Xo(n);return!!i&&e===i[0]}(pn&&or(new pn(new ArrayBuffer(1)))!=O||mn&&or(new mn)!=h||hn&&"[object Promise]"!=or(hn.resolve())||gn&&or(new gn)!=y||bn&&or(new bn)!=x)&&(or=function(e){var t=mi(e),n=t==b?e.constructor:void 0,i=n?Pr(n):"";if(i)switch(i){case wn:return O;case xn:return h;case kn:return"[object Promise]";case On:return y;case Cn:return x}return t});var fr=we?Va:al;function pr(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_e)}function mr(e){return e==e&&!Ka(e)}function hr(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in me(n)))}}function gr(e,t,n){return t=sn(void 0===t?e.length-1:t,0),function(){for(var o=arguments,r=-1,a=sn(o.length-t,0),s=i(a);++r<a;)s[r]=o[t+r];r=-1;for(var l=i(t+1);++r<t;)l[r]=o[r];return l[t]=n(s),rt(e,this,l)}}function br(e,t){return t.length<2?e:fi(e,Hi(t,0,-1))}function vr(e,t){for(var n=e.length,i=ln(t.length,n),o=yo(e);i--;){var r=t[i];e[i]=lr(r,n)?o[r]:void 0}return e}function yr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var _r=Or(Bi),wr=Qt||function(e,t){return Ge.setTimeout(e,t)},xr=Or(Ki);function kr(e,t,n){var i=t+"";return xr(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(J,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return st(s,(function(n){var i="_."+n[0];t&n[1]&&!dt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(Y);return t?t[1].split(Q):[]}(i),n)))}function Or(e){var t=0,n=0;return function(){var i=cn(),o=16-(i-n);if(n=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Cr(e,t){var n=-1,i=e.length,o=i-1;for(t=void 0===t?i:t;++n<t;){var r=Ai(n,o),a=e[r];e[r]=e[n],e[n]=a}return e.length=t,e}var Sr=function(e){var t=Oa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(U,(function(e,n,i,o){t.push(i?o.replace(te,"$1"):n||e)})),t}));function Dr(e){if("string"==typeof e||Qa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Pr(e){if(null!=e){try{return xe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Er(e){if(e instanceof Tn)return e.clone();var t=new Fn(e.__wrapped__,e.__chain__);return t.__actions__=yo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var jr=Ni((function(e,t){return Aa(e)?ei(e,ai(t,1,Aa,!0)):[]})),Mr=Ni((function(e,t){var n=Wr(t);return Aa(n)&&(n=void 0),Aa(e)?ei(e,ai(t,1,Aa,!0),Qo(n,2)):[]})),Fr=Ni((function(e,t){var n=Wr(t);return Aa(n)&&(n=void 0),Aa(e)?ei(e,ai(t,1,Aa,!0),void 0,n):[]}));function Tr(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=null==n?0:os(n);return o<0&&(o=sn(i+o,0)),_t(e,Qo(t,3),o)}function Ir(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i-1;return void 0!==n&&(o=os(n),o=n<0?sn(i+o,0):ln(o,i-1)),_t(e,Qo(t,3),o,!0)}function $r(e){return(null==e?0:e.length)?ai(e,1):[]}function Rr(e){return e&&e.length?e[0]:void 0}var Ar=Ni((function(e){var t=pt(e,ao);return t.length&&t[0]===e[0]?vi(t):[]})),Lr=Ni((function(e){var t=Wr(e),n=pt(e,ao);return t===Wr(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?vi(n,Qo(t,2)):[]})),Nr=Ni((function(e){var t=Wr(e),n=pt(e,ao);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?vi(n,void 0,t):[]}));function Wr(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Vr=Ni(zr);function zr(e,t){return e&&e.length&&t&&t.length?$i(e,t):e}var Br=Ho((function(e,t){var n=null==e?0:e.length,i=Xn(e,t);return Ri(e,pt(t,(function(e){return lr(e,n)?+e:e})).sort(go)),i}));function Kr(e){return null==e?e:fn.call(e)}var Ur=Ni((function(e){return Zi(ai(e,1,Aa,!0))})),Hr=Ni((function(e){var t=Wr(e);return Aa(t)&&(t=void 0),Zi(ai(e,1,Aa,!0),Qo(t,2))})),Gr=Ni((function(e){var t=Wr(e);return t="function"==typeof t?t:void 0,Zi(ai(e,1,Aa,!0),void 0,t)}));function qr(e){if(!e||!e.length)return[];var t=0;return e=ut(e,(function(e){if(Aa(e))return t=sn(e.length,t),!0})),Et(t,(function(t){return pt(e,Ct(t))}))}function Xr(e,t){if(!e||!e.length)return[];var n=qr(e);return null==t?n:pt(n,(function(e){return rt(t,void 0,e)}))}var Jr=Ni((function(e,t){return Aa(e)?ei(e,t):[]})),Yr=Ni((function(e){return oo(ut(e,Aa))})),Qr=Ni((function(e){var t=Wr(e);return Aa(t)&&(t=void 0),oo(ut(e,Aa),Qo(t,2))})),Zr=Ni((function(e){var t=Wr(e);return t="function"==typeof t?t:void 0,oo(ut(e,Aa),void 0,t)})),ea=Ni(qr);var ta=Ni((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Xr(e,n)}));function na(e){var t=En(e);return t.__chain__=!0,t}function ia(e,t){return t(e)}var oa=Ho((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,o=function(t){return Xn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Tn&&lr(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:ia,args:[o],thisArg:void 0}),new Fn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(o)}));var ra=wo((function(e,t,n){ke.call(e,n)?++e[n]:qn(e,n,1)}));var aa=Po(Tr),sa=Po(Ir);function la(e,t){return(Ia(e)?st:ti)(e,Qo(t,3))}function ca(e,t){return(Ia(e)?lt:ni)(e,Qo(t,3))}var ua=wo((function(e,t,n){ke.call(e,n)?e[n].push(t):qn(e,n,[t])}));var da=Ni((function(e,t,n){var o=-1,r="function"==typeof t,a=Ra(e)?i(e.length):[];return ti(e,(function(e){a[++o]=r?rt(t,e,n):yi(e,t,n)})),a})),fa=wo((function(e,t,n){qn(e,n,t)}));function pa(e,t){return(Ia(e)?pt:Pi)(e,Qo(t,3))}var ma=wo((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ha=Ni((function(e,t){if(null==e)return[];var n=t.length;return n>1&&cr(e,t[0],t[1])?t=[]:n>2&&cr(t[0],t[1],t[2])&&(t=[t[0]]),Ti(e,ai(t,1),[])})),ga=Yt||function(){return Ge.Date.now()};function ba(e,t,n){return t=n?void 0:t,Vo(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function va(e,t){var n;if("function"!=typeof t)throw new be(r);return e=os(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var ya=Ni((function(e,t,n){var i=1;if(n.length){var o=Bt(n,Yo(ya));i|=32}return Vo(e,i,t,n,o)})),_a=Ni((function(e,t,n){var i=3;if(n.length){var o=Bt(n,Yo(_a));i|=32}return Vo(t,i,e,n,o)}));function wa(e,t,n){var i,o,a,s,l,c,u=0,d=!1,f=!1,p=!0;if("function"!=typeof e)throw new be(r);function m(t){var n=i,r=o;return i=o=void 0,u=t,s=e.apply(r,n)}function h(e){return u=e,l=wr(b,t),d?m(e):s}function g(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-u>=a}function b(){var e=ga();if(g(e))return v(e);l=wr(b,function(e){var n=t-(e-c);return f?ln(n,a-(e-u)):n}(e))}function v(e){return l=void 0,p&&i?m(e):(i=o=void 0,s)}function y(){var e=ga(),n=g(e);if(i=arguments,o=this,c=e,n){if(void 0===l)return h(c);if(f)return fo(l),l=wr(b,t),m(c)}return void 0===l&&(l=wr(b,t)),s}return t=as(t)||0,Ka(n)&&(d=!!n.leading,a=(f="maxWait"in n)?sn(as(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),y.cancel=function(){void 0!==l&&fo(l),u=0,i=c=o=l=void 0},y.flush=function(){return void 0===l?s:v(ga())},y}var xa=Ni((function(e,t){return Zn(e,1,t)})),ka=Ni((function(e,t,n){return Zn(e,as(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new be(r);var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var a=e.apply(this,i);return n.cache=r.set(o,a)||r,a};return n.cache=new(Oa.Cache||Rn),n}function Ca(e){if("function"!=typeof e)throw new be(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Rn;var Sa=co((function(e,t){var n=(t=1==t.length&&Ia(t[0])?pt(t[0],Mt(Qo())):pt(ai(t,1),Mt(Qo()))).length;return Ni((function(i){for(var o=-1,r=ln(i.length,n);++o<r;)i[o]=t[o].call(this,i[o]);return rt(e,this,i)}))})),Da=Ni((function(e,t){return Vo(e,32,void 0,t,Bt(t,Yo(Da)))})),Pa=Ni((function(e,t){return Vo(e,64,void 0,t,Bt(t,Yo(Pa)))})),Ea=Ho((function(e,t){return Vo(e,256,void 0,void 0,void 0,t)}));function ja(e,t){return e===t||e!=e&&t!=t}var Ma=Ro(hi),Fa=Ro((function(e,t){return e>=t})),Ta=_i(function(){return arguments}())?_i:function(e){return Ua(e)&&ke.call(e,"callee")&&!He.call(e,"callee")},Ia=i.isArray,$a=Ze?Mt(Ze):function(e){return Ua(e)&&mi(e)==k};function Ra(e){return null!=e&&Ba(e.length)&&!Va(e)}function Aa(e){return Ua(e)&&Ra(e)}var La=nn||al,Na=et?Mt(et):function(e){return Ua(e)&&mi(e)==d};function Wa(e){if(!Ua(e))return!1;var t=mi(e);return t==f||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!qa(e)}function Va(e){if(!Ka(e))return!1;var t=mi(e);return t==p||t==m||"[object AsyncFunction]"==t||"[object Proxy]"==t}function za(e){return"number"==typeof e&&e==os(e)}function Ba(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Ka(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ua(e){return null!=e&&"object"==typeof e}var Ha=tt?Mt(tt):function(e){return Ua(e)&&or(e)==h};function Ga(e){return"number"==typeof e||Ua(e)&&mi(e)==g}function qa(e){if(!Ua(e)||mi(e)!=b)return!1;var t=ze(e);if(null===t)return!0;var n=ke.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&xe.call(n)==De}var Xa=nt?Mt(nt):function(e){return Ua(e)&&mi(e)==v};var Ja=it?Mt(it):function(e){return Ua(e)&&or(e)==y};function Ya(e){return"string"==typeof e||!Ia(e)&&Ua(e)&&mi(e)==_}function Qa(e){return"symbol"==typeof e||Ua(e)&&mi(e)==w}var Za=ot?Mt(ot):function(e){return Ua(e)&&Ba(e.length)&&!!We[mi(e)]};var es=Ro(Di),ts=Ro((function(e,t){return e<=t}));function ns(e){if(!e)return[];if(Ra(e))return Ya(e)?Gt(e):yo(e);if(Ye&&e[Ye])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ye]());var t=or(e);return(t==h?Vt:t==y?Kt:js)(e)}function is(e){return e?(e=as(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function os(e){var t=is(e),n=t%1;return t==t?n?t-n:t:0}function rs(e){return e?Jn(os(e),0,4294967295):0}function as(e){if("number"==typeof e)return e;if(Qa(e))return NaN;if(Ka(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ka(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=jt(e);var n=re.test(e);return n||se.test(e)?Ke(e.slice(2),n?2:8):oe.test(e)?NaN:+e}function ss(e){return _o(e,xs(e))}function ls(e){return null==e?"":Qi(e)}var cs=xo((function(e,t){if(pr(t)||Ra(t))_o(t,ws(t),e);else for(var n in t)ke.call(t,n)&&Kn(e,n,t[n])})),us=xo((function(e,t){_o(t,xs(t),e)})),ds=xo((function(e,t,n,i){_o(t,xs(t),e,i)})),fs=xo((function(e,t,n,i){_o(t,ws(t),e,i)})),ps=Ho(Xn);var ms=Ni((function(e,t){e=me(e);var n=-1,i=t.length,o=i>2?t[2]:void 0;for(o&&cr(t[0],t[1],o)&&(i=1);++n<i;)for(var r=t[n],a=xs(r),s=-1,l=a.length;++s<l;){var c=a[s],u=e[c];(void 0===u||ja(u,_e[c])&&!ke.call(e,c))&&(e[c]=r[c])}return e})),hs=Ni((function(e){return e.push(void 0,Bo),rt(Os,void 0,e)}));function gs(e,t,n){var i=null==e?void 0:fi(e,t);return void 0===i?n:i}function bs(e,t){return null!=e&&rr(e,t,bi)}var vs=Mo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),e[t]=n}),Ks(Gs)),ys=Mo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Se.call(t)),ke.call(e,t)?e[t].push(n):e[t]=[n]}),Qo),_s=Ni(yi);function ws(e){return Ra(e)?Nn(e):Ci(e)}function xs(e){return Ra(e)?Nn(e,!0):Si(e)}var ks=xo((function(e,t,n){Mi(e,t,n)})),Os=xo((function(e,t,n,i){Mi(e,t,n,i)})),Cs=Ho((function(e,t){var n={};if(null==e)return n;var i=!1;t=pt(t,(function(t){return t=lo(t,e),i||(i=t.length>1),t})),_o(e,qo(e),n),i&&(n=Yn(n,7,Ko));for(var o=t.length;o--;)eo(n,t[o]);return n}));var Ss=Ho((function(e,t){return null==e?{}:function(e,t){return Ii(e,t,(function(t,n){return bs(e,n)}))}(e,t)}));function Ds(e,t){if(null==e)return{};var n=pt(qo(e),(function(e){return[e]}));return t=Qo(t),Ii(e,n,(function(e,n){return t(e,n[0])}))}var Ps=Wo(ws),Es=Wo(xs);function js(e){return null==e?[]:Ft(e,ws(e))}var Ms=So((function(e,t,n){return t=t.toLowerCase(),e+(n?Fs(t):t)}));function Fs(e){return Ws(ls(e).toLowerCase())}function Ts(e){return(e=ls(e))&&e.replace(ce,At).replace(Te,"")}var Is=So((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),$s=So((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Rs=Co("toLowerCase");var As=So((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Ls=So((function(e,t,n){return e+(n?" ":"")+Ws(t)}));var Ns=So((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ws=Co("toUpperCase");function Vs(e,t,n){return e=ls(e),void 0===(t=n?void 0:t)?function(e){return Ae.test(e)}(e)?function(e){return e.match($e)||[]}(e):function(e){return e.match(Z)||[]}(e):e.match(t)||[]}var zs=Ni((function(e,t){try{return rt(e,void 0,t)}catch(e){return Wa(e)?e:new X(e)}})),Bs=Ho((function(e,t){return st(t,(function(t){t=Dr(t),qn(e,t,ya(e[t],e))})),e}));function Ks(e){return function(){return e}}var Us=Eo(),Hs=Eo(!0);function Gs(e){return e}function qs(e){return Oi("function"==typeof e?e:Yn(e,1))}var Xs=Ni((function(e,t){return function(n){return yi(n,e,t)}})),Js=Ni((function(e,t){return function(n){return yi(e,n,t)}}));function Ys(e,t,n){var i=ws(t),o=di(t,i);null!=n||Ka(t)&&(o.length||!i.length)||(n=t,t=e,e=this,o=di(t,ws(t)));var r=!(Ka(n)&&"chain"in n&&!n.chain),a=Va(e);return st(o,(function(n){var i=t[n];e[n]=i,a&&(e.prototype[n]=function(){var t=this.__chain__;if(r||t){var n=e(this.__wrapped__),o=n.__actions__=yo(this.__actions__);return o.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,mt([this.value()],arguments))})})),e}function Qs(){}var Zs=To(pt),el=To(ct),tl=To(bt);function nl(e){return ur(e)?Ct(Dr(e)):function(e){return function(t){return fi(t,e)}}(e)}var il=$o(),ol=$o(!0);function rl(){return[]}function al(){return!1}var sl=Fo((function(e,t){return e+t}),0),ll=Lo("ceil"),cl=Fo((function(e,t){return e/t}),1),ul=Lo("floor");var dl,fl=Fo((function(e,t){return e*t}),1),pl=Lo("round"),ml=Fo((function(e,t){return e-t}),0);return En.after=function(e,t){if("function"!=typeof t)throw new be(r);return e=os(e),function(){if(--e<1)return t.apply(this,arguments)}},En.ary=ba,En.assign=cs,En.assignIn=us,En.assignInWith=ds,En.assignWith=fs,En.at=ps,En.before=va,En.bind=ya,En.bindAll=Bs,En.bindKey=_a,En.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ia(e)?e:[e]},En.chain=na,En.chunk=function(e,t,n){t=(n?cr(e,t,n):void 0===t)?1:sn(os(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var r=0,a=0,s=i(Zt(o/t));r<o;)s[a++]=Hi(e,r,r+=t);return s},En.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,o=[];++t<n;){var r=e[t];r&&(o[i++]=r)}return o},En.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return mt(Ia(n)?yo(n):[n],ai(t,1))},En.cond=function(e){var t=null==e?0:e.length,n=Qo();return e=t?pt(e,(function(e){if("function"!=typeof e[1])throw new be(r);return[n(e[0]),e[1]]})):[],Ni((function(n){for(var i=-1;++i<t;){var o=e[i];if(rt(o[0],this,n))return rt(o[1],this,n)}}))},En.conforms=function(e){return function(e){var t=ws(e);return function(n){return Qn(n,e,t)}}(Yn(e,1))},En.constant=Ks,En.countBy=ra,En.create=function(e,t){var n=jn(e);return null==t?n:Gn(n,t)},En.curry=function e(t,n,i){var o=Vo(t,8,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return o.placeholder=e.placeholder,o},En.curryRight=function e(t,n,i){var o=Vo(t,16,void 0,void 0,void 0,void 0,void 0,n=i?void 0:n);return o.placeholder=e.placeholder,o},En.debounce=wa,En.defaults=ms,En.defaultsDeep=hs,En.defer=xa,En.delay=ka,En.difference=jr,En.differenceBy=Mr,En.differenceWith=Fr,En.drop=function(e,t,n){var i=null==e?0:e.length;return i?Hi(e,(t=n||void 0===t?1:os(t))<0?0:t,i):[]},En.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?Hi(e,0,(t=i-(t=n||void 0===t?1:os(t)))<0?0:t):[]},En.dropRightWhile=function(e,t){return e&&e.length?no(e,Qo(t,3),!0,!0):[]},En.dropWhile=function(e,t){return e&&e.length?no(e,Qo(t,3),!0):[]},En.fill=function(e,t,n,i){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&cr(e,t,n)&&(n=0,i=o),function(e,t,n,i){var o=e.length;for((n=os(n))<0&&(n=-n>o?0:o+n),(i=void 0===i||i>o?o:os(i))<0&&(i+=o),i=n>i?0:rs(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},En.filter=function(e,t){return(Ia(e)?ut:ri)(e,Qo(t,3))},En.flatMap=function(e,t){return ai(pa(e,t),1)},En.flatMapDeep=function(e,t){return ai(pa(e,t),1/0)},En.flatMapDepth=function(e,t,n){return n=void 0===n?1:os(n),ai(pa(e,t),n)},En.flatten=$r,En.flattenDeep=function(e){return(null==e?0:e.length)?ai(e,1/0):[]},En.flattenDepth=function(e,t){return(null==e?0:e.length)?ai(e,t=void 0===t?1:os(t)):[]},En.flip=function(e){return Vo(e,512)},En.flow=Us,En.flowRight=Hs,En.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var o=e[t];i[o[0]]=o[1]}return i},En.functions=function(e){return null==e?[]:di(e,ws(e))},En.functionsIn=function(e){return null==e?[]:di(e,xs(e))},En.groupBy=ua,En.initial=function(e){return(null==e?0:e.length)?Hi(e,0,-1):[]},En.intersection=Ar,En.intersectionBy=Lr,En.intersectionWith=Nr,En.invert=vs,En.invertBy=ys,En.invokeMap=da,En.iteratee=qs,En.keyBy=fa,En.keys=ws,En.keysIn=xs,En.map=pa,En.mapKeys=function(e,t){var n={};return t=Qo(t,3),ci(e,(function(e,i,o){qn(n,t(e,i,o),e)})),n},En.mapValues=function(e,t){var n={};return t=Qo(t,3),ci(e,(function(e,i,o){qn(n,i,t(e,i,o))})),n},En.matches=function(e){return Ei(Yn(e,1))},En.matchesProperty=function(e,t){return ji(e,Yn(t,1))},En.memoize=Oa,En.merge=ks,En.mergeWith=Os,En.method=Xs,En.methodOf=Js,En.mixin=Ys,En.negate=Ca,En.nthArg=function(e){return e=os(e),Ni((function(t){return Fi(t,e)}))},En.omit=Cs,En.omitBy=function(e,t){return Ds(e,Ca(Qo(t)))},En.once=function(e){return va(2,e)},En.orderBy=function(e,t,n,i){return null==e?[]:(Ia(t)||(t=null==t?[]:[t]),Ia(n=i?void 0:n)||(n=null==n?[]:[n]),Ti(e,t,n))},En.over=Zs,En.overArgs=Sa,En.overEvery=el,En.overSome=tl,En.partial=Da,En.partialRight=Pa,En.partition=ma,En.pick=Ss,En.pickBy=Ds,En.property=nl,En.propertyOf=function(e){return function(t){return null==e?void 0:fi(e,t)}},En.pull=Vr,En.pullAll=zr,En.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,Qo(n,2)):e},En.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,void 0,n):e},En.pullAt=Br,En.range=il,En.rangeRight=ol,En.rearg=Ea,En.reject=function(e,t){return(Ia(e)?ut:ri)(e,Ca(Qo(t,3)))},En.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,o=[],r=e.length;for(t=Qo(t,3);++i<r;){var a=e[i];t(a,i,e)&&(n.push(a),o.push(i))}return Ri(e,o),n},En.rest=function(e,t){if("function"!=typeof e)throw new be(r);return Ni(e,t=void 0===t?t:os(t))},En.reverse=Kr,En.sampleSize=function(e,t,n){return t=(n?cr(e,t,n):void 0===t)?1:os(t),(Ia(e)?Vn:Vi)(e,t)},En.set=function(e,t,n){return null==e?e:zi(e,t,n)},En.setWith=function(e,t,n,i){return i="function"==typeof i?i:void 0,null==e?e:zi(e,t,n,i)},En.shuffle=function(e){return(Ia(e)?zn:Ui)(e)},En.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&cr(e,t,n)?(t=0,n=i):(t=null==t?0:os(t),n=void 0===n?i:os(n)),Hi(e,t,n)):[]},En.sortBy=ha,En.sortedUniq=function(e){return e&&e.length?Ji(e):[]},En.sortedUniqBy=function(e,t){return e&&e.length?Ji(e,Qo(t,2)):[]},En.split=function(e,t,n){return n&&"number"!=typeof n&&cr(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=ls(e))&&("string"==typeof t||null!=t&&!Xa(t))&&!(t=Qi(t))&&Wt(e)?uo(Gt(e),0,n):e.split(t,n):[]},En.spread=function(e,t){if("function"!=typeof e)throw new be(r);return t=null==t?0:sn(os(t),0),Ni((function(n){var i=n[t],o=uo(n,0,t);return i&&mt(o,i),rt(e,this,o)}))},En.tail=function(e){var t=null==e?0:e.length;return t?Hi(e,1,t):[]},En.take=function(e,t,n){return e&&e.length?Hi(e,0,(t=n||void 0===t?1:os(t))<0?0:t):[]},En.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Hi(e,(t=i-(t=n||void 0===t?1:os(t)))<0?0:t,i):[]},En.takeRightWhile=function(e,t){return e&&e.length?no(e,Qo(t,3),!1,!0):[]},En.takeWhile=function(e,t){return e&&e.length?no(e,Qo(t,3)):[]},En.tap=function(e,t){return t(e),e},En.throttle=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new be(r);return Ka(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),wa(e,t,{leading:i,maxWait:t,trailing:o})},En.thru=ia,En.toArray=ns,En.toPairs=Ps,En.toPairsIn=Es,En.toPath=function(e){return Ia(e)?pt(e,Dr):Qa(e)?[e]:yo(Sr(ls(e)))},En.toPlainObject=ss,En.transform=function(e,t,n){var i=Ia(e),o=i||La(e)||Za(e);if(t=Qo(t,4),null==n){var r=e&&e.constructor;n=o?i?new r:[]:Ka(e)&&Va(r)?jn(ze(e)):{}}return(o?st:ci)(e,(function(e,i,o){return t(n,e,i,o)})),n},En.unary=function(e){return ba(e,1)},En.union=Ur,En.unionBy=Hr,En.unionWith=Gr,En.uniq=function(e){return e&&e.length?Zi(e):[]},En.uniqBy=function(e,t){return e&&e.length?Zi(e,Qo(t,2)):[]},En.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Zi(e,void 0,t):[]},En.unset=function(e,t){return null==e||eo(e,t)},En.unzip=qr,En.unzipWith=Xr,En.update=function(e,t,n){return null==e?e:to(e,t,so(n))},En.updateWith=function(e,t,n,i){return i="function"==typeof i?i:void 0,null==e?e:to(e,t,so(n),i)},En.values=js,En.valuesIn=function(e){return null==e?[]:Ft(e,xs(e))},En.without=Jr,En.words=Vs,En.wrap=function(e,t){return Da(so(t),e)},En.xor=Yr,En.xorBy=Qr,En.xorWith=Zr,En.zip=ea,En.zipObject=function(e,t){return ro(e||[],t||[],Kn)},En.zipObjectDeep=function(e,t){return ro(e||[],t||[],zi)},En.zipWith=ta,En.entries=Ps,En.entriesIn=Es,En.extend=us,En.extendWith=ds,Ys(En,En),En.add=sl,En.attempt=zs,En.camelCase=Ms,En.capitalize=Fs,En.ceil=ll,En.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=as(n))==n?n:0),void 0!==t&&(t=(t=as(t))==t?t:0),Jn(as(e),t,n)},En.clone=function(e){return Yn(e,4)},En.cloneDeep=function(e){return Yn(e,5)},En.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:void 0)},En.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:void 0)},En.conformsTo=function(e,t){return null==t||Qn(e,t,ws(t))},En.deburr=Ts,En.defaultTo=function(e,t){return null==e||e!=e?t:e},En.divide=cl,En.endsWith=function(e,t,n){e=ls(e),t=Qi(t);var i=e.length,o=n=void 0===n?i:Jn(os(n),0,i);return(n-=t.length)>=0&&e.slice(n,o)==t},En.eq=ja,En.escape=function(e){return(e=ls(e))&&N.test(e)?e.replace(A,Lt):e},En.escapeRegExp=function(e){return(e=ls(e))&&G.test(e)?e.replace(H,"\\$&"):e},En.every=function(e,t,n){var i=Ia(e)?ct:ii;return n&&cr(e,t,n)&&(t=void 0),i(e,Qo(t,3))},En.find=aa,En.findIndex=Tr,En.findKey=function(e,t){return yt(e,Qo(t,3),ci)},En.findLast=sa,En.findLastIndex=Ir,En.findLastKey=function(e,t){return yt(e,Qo(t,3),ui)},En.floor=ul,En.forEach=la,En.forEachRight=ca,En.forIn=function(e,t){return null==e?e:si(e,Qo(t,3),xs)},En.forInRight=function(e,t){return null==e?e:li(e,Qo(t,3),xs)},En.forOwn=function(e,t){return e&&ci(e,Qo(t,3))},En.forOwnRight=function(e,t){return e&&ui(e,Qo(t,3))},En.get=gs,En.gt=Ma,En.gte=Fa,En.has=function(e,t){return null!=e&&rr(e,t,gi)},En.hasIn=bs,En.head=Rr,En.identity=Gs,En.includes=function(e,t,n,i){e=Ra(e)?e:js(e),n=n&&!i?os(n):0;var o=e.length;return n<0&&(n=sn(o+n,0)),Ya(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&wt(e,t,n)>-1},En.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=null==n?0:os(n);return o<0&&(o=sn(i+o,0)),wt(e,t,o)},En.inRange=function(e,t,n){return t=is(t),void 0===n?(n=t,t=0):n=is(n),function(e,t,n){return e>=ln(t,n)&&e<sn(t,n)}(e=as(e),t,n)},En.invoke=_s,En.isArguments=Ta,En.isArray=Ia,En.isArrayBuffer=$a,En.isArrayLike=Ra,En.isArrayLikeObject=Aa,En.isBoolean=function(e){return!0===e||!1===e||Ua(e)&&mi(e)==u},En.isBuffer=La,En.isDate=Na,En.isElement=function(e){return Ua(e)&&1===e.nodeType&&!qa(e)},En.isEmpty=function(e){if(null==e)return!0;if(Ra(e)&&(Ia(e)||"string"==typeof e||"function"==typeof e.splice||La(e)||Za(e)||Ta(e)))return!e.length;var t=or(e);if(t==h||t==y)return!e.size;if(pr(e))return!Ci(e).length;for(var n in e)if(ke.call(e,n))return!1;return!0},En.isEqual=function(e,t){return wi(e,t)},En.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===i?wi(e,t,void 0,n):!!i},En.isError=Wa,En.isFinite=function(e){return"number"==typeof e&&on(e)},En.isFunction=Va,En.isInteger=za,En.isLength=Ba,En.isMap=Ha,En.isMatch=function(e,t){return e===t||xi(e,t,er(t))},En.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,xi(e,t,er(t),n)},En.isNaN=function(e){return Ga(e)&&e!=+e},En.isNative=function(e){if(fr(e))throw new X("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return ki(e)},En.isNil=function(e){return null==e},En.isNull=function(e){return null===e},En.isNumber=Ga,En.isObject=Ka,En.isObjectLike=Ua,En.isPlainObject=qa,En.isRegExp=Xa,En.isSafeInteger=function(e){return za(e)&&e>=-9007199254740991&&e<=9007199254740991},En.isSet=Ja,En.isString=Ya,En.isSymbol=Qa,En.isTypedArray=Za,En.isUndefined=function(e){return void 0===e},En.isWeakMap=function(e){return Ua(e)&&or(e)==x},En.isWeakSet=function(e){return Ua(e)&&"[object WeakSet]"==mi(e)},En.join=function(e,t){return null==e?"":rn.call(e,t)},En.kebabCase=Is,En.last=Wr,En.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var o=i;return void 0!==n&&(o=(o=os(n))<0?sn(i+o,0):ln(o,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,o):_t(e,kt,o,!0)},En.lowerCase=$s,En.lowerFirst=Rs,En.lt=es,En.lte=ts,En.max=function(e){return e&&e.length?oi(e,Gs,hi):void 0},En.maxBy=function(e,t){return e&&e.length?oi(e,Qo(t,2),hi):void 0},En.mean=function(e){return Ot(e,Gs)},En.meanBy=function(e,t){return Ot(e,Qo(t,2))},En.min=function(e){return e&&e.length?oi(e,Gs,Di):void 0},En.minBy=function(e,t){return e&&e.length?oi(e,Qo(t,2),Di):void 0},En.stubArray=rl,En.stubFalse=al,En.stubObject=function(){return{}},En.stubString=function(){return""},En.stubTrue=function(){return!0},En.multiply=fl,En.nth=function(e,t){return e&&e.length?Fi(e,os(t)):void 0},En.noConflict=function(){return Ge._===this&&(Ge._=Pe),this},En.noop=Qs,En.now=ga,En.pad=function(e,t,n){e=ls(e);var i=(t=os(t))?Ht(e):0;if(!t||i>=t)return e;var o=(t-i)/2;return Io(en(o),n)+e+Io(Zt(o),n)},En.padEnd=function(e,t,n){e=ls(e);var i=(t=os(t))?Ht(e):0;return t&&i<t?e+Io(t-i,n):e},En.padStart=function(e,t,n){e=ls(e);var i=(t=os(t))?Ht(e):0;return t&&i<t?Io(t-i,n)+e:e},En.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),un(ls(e).replace(q,""),t||0)},En.random=function(e,t,n){if(n&&"boolean"!=typeof n&&cr(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=is(e),void 0===t?(t=e,e=0):t=is(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var o=dn();return ln(e+o*(t-e+Be("1e-"+((o+"").length-1))),t)}return Ai(e,t)},En.reduce=function(e,t,n){var i=Ia(e)?ht:Dt,o=arguments.length<3;return i(e,Qo(t,4),n,o,ti)},En.reduceRight=function(e,t,n){var i=Ia(e)?gt:Dt,o=arguments.length<3;return i(e,Qo(t,4),n,o,ni)},En.repeat=function(e,t,n){return t=(n?cr(e,t,n):void 0===t)?1:os(t),Li(ls(e),t)},En.replace=function(){var e=arguments,t=ls(e[0]);return e.length<3?t:t.replace(e[1],e[2])},En.result=function(e,t,n){var i=-1,o=(t=lo(t,e)).length;for(o||(o=1,e=void 0);++i<o;){var r=null==e?void 0:e[Dr(t[i])];void 0===r&&(i=o,r=n),e=Va(r)?r.call(e):r}return e},En.round=pl,En.runInContext=e,En.sample=function(e){return(Ia(e)?Wn:Wi)(e)},En.size=function(e){if(null==e)return 0;if(Ra(e))return Ya(e)?Ht(e):e.length;var t=or(e);return t==h||t==y?e.size:Ci(e).length},En.snakeCase=As,En.some=function(e,t,n){var i=Ia(e)?bt:Gi;return n&&cr(e,t,n)&&(t=void 0),i(e,Qo(t,3))},En.sortedIndex=function(e,t){return qi(e,t)},En.sortedIndexBy=function(e,t,n){return Xi(e,t,Qo(n,2))},En.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=qi(e,t);if(i<n&&ja(e[i],t))return i}return-1},En.sortedLastIndex=function(e,t){return qi(e,t,!0)},En.sortedLastIndexBy=function(e,t,n){return Xi(e,t,Qo(n,2),!0)},En.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=qi(e,t,!0)-1;if(ja(e[n],t))return n}return-1},En.startCase=Ls,En.startsWith=function(e,t,n){return e=ls(e),n=null==n?0:Jn(os(n),0,e.length),t=Qi(t),e.slice(n,n+t.length)==t},En.subtract=ml,En.sum=function(e){return e&&e.length?Pt(e,Gs):0},En.sumBy=function(e,t){return e&&e.length?Pt(e,Qo(t,2)):0},En.template=function(e,t,n){var i=En.templateSettings;n&&cr(e,t,n)&&(t=void 0),e=ls(e),t=ds({},t,i,zo);var o,r,a=ds({},t.imports,i.imports,zo),s=ws(a),l=Ft(a,s),c=0,u=t.interpolate||ue,d="__p += '",f=he((t.escape||ue).source+"|"+u.source+"|"+(u===z?ne:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),p="//# sourceURL="+(ke.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ne+"]")+"\n";e.replace(f,(function(t,n,i,a,s,l){return i||(i=a),d+=e.slice(c,l).replace(de,Nt),n&&(o=!0,d+="' +\n__e("+n+") +\n'"),s&&(r=!0,d+="';\n"+s+";\n__p += '"),i&&(d+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),c=l+t.length,t})),d+="';\n";var m=ke.call(t,"variable")&&t.variable;if(m){if(ee.test(m))throw new X("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(r?d.replace(T,""):d).replace(I,"$1").replace($,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(r?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var h=zs((function(){return fe(s,p+"return "+d).apply(void 0,l)}));if(h.source=d,Wa(h))throw h;return h},En.times=function(e,t){if((e=os(e))<1||e>9007199254740991)return[];var n=4294967295,i=ln(e,4294967295);e-=4294967295;for(var o=Et(i,t=Qo(t));++n<e;)t(n);return o},En.toFinite=is,En.toInteger=os,En.toLength=rs,En.toLower=function(e){return ls(e).toLowerCase()},En.toNumber=as,En.toSafeInteger=function(e){return e?Jn(os(e),-9007199254740991,9007199254740991):0===e?e:0},En.toString=ls,En.toUpper=function(e){return ls(e).toUpperCase()},En.trim=function(e,t,n){if((e=ls(e))&&(n||void 0===t))return jt(e);if(!e||!(t=Qi(t)))return e;var i=Gt(e),o=Gt(t);return uo(i,It(i,o),$t(i,o)+1).join("")},En.trimEnd=function(e,t,n){if((e=ls(e))&&(n||void 0===t))return e.slice(0,qt(e)+1);if(!e||!(t=Qi(t)))return e;var i=Gt(e);return uo(i,0,$t(i,Gt(t))+1).join("")},En.trimStart=function(e,t,n){if((e=ls(e))&&(n||void 0===t))return e.replace(q,"");if(!e||!(t=Qi(t)))return e;var i=Gt(e);return uo(i,It(i,Gt(t))).join("")},En.truncate=function(e,t){var n=30,i="...";if(Ka(t)){var o="separator"in t?t.separator:o;n="length"in t?os(t.length):n,i="omission"in t?Qi(t.omission):i}var r=(e=ls(e)).length;if(Wt(e)){var a=Gt(e);r=a.length}if(n>=r)return e;var s=n-Ht(i);if(s<1)return i;var l=a?uo(a,0,s).join(""):e.slice(0,s);if(void 0===o)return l+i;if(a&&(s+=l.length-s),Xa(o)){if(e.slice(s).search(o)){var c,u=l;for(o.global||(o=he(o.source,ls(ie.exec(o))+"g")),o.lastIndex=0;c=o.exec(u);)var d=c.index;l=l.slice(0,void 0===d?s:d)}}else if(e.indexOf(Qi(o),s)!=s){var f=l.lastIndexOf(o);f>-1&&(l=l.slice(0,f))}return l+i},En.unescape=function(e){return(e=ls(e))&&L.test(e)?e.replace(R,Xt):e},En.uniqueId=function(e){var t=++Oe;return ls(e)+t},En.upperCase=Ns,En.upperFirst=Ws,En.each=la,En.eachRight=ca,En.first=Rr,Ys(En,(dl={},ci(En,(function(e,t){ke.call(En.prototype,t)||(dl[t]=e)})),dl),{chain:!1}),En.VERSION="4.17.21",st(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){En[e].placeholder=En})),st(["drop","take"],(function(e,t){Tn.prototype[e]=function(n){n=void 0===n?1:sn(os(n),0);var i=this.__filtered__&&!t?new Tn(this):this.clone();return i.__filtered__?i.__takeCount__=ln(n,i.__takeCount__):i.__views__.push({size:ln(n,4294967295),type:e+(i.__dir__<0?"Right":"")}),i},Tn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),st(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Tn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Qo(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),st(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Tn.prototype[e]=function(){return this[n](1).value()[0]}})),st(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Tn.prototype[e]=function(){return this.__filtered__?new Tn(this):this[n](1)}})),Tn.prototype.compact=function(){return this.filter(Gs)},Tn.prototype.find=function(e){return this.filter(e).head()},Tn.prototype.findLast=function(e){return this.reverse().find(e)},Tn.prototype.invokeMap=Ni((function(e,t){return"function"==typeof e?new Tn(this):this.map((function(n){return yi(n,e,t)}))})),Tn.prototype.reject=function(e){return this.filter(Ca(Qo(e)))},Tn.prototype.slice=function(e,t){e=os(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Tn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=os(t))<0?n.dropRight(-t):n.take(t-e)),n)},Tn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Tn.prototype.toArray=function(){return this.take(4294967295)},ci(Tn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),o=En[i?"take"+("last"==t?"Right":""):t],r=i||/^find/.test(t);o&&(En.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,s=t instanceof Tn,l=a[0],c=s||Ia(t),u=function(e){var t=o.apply(En,mt([e],a));return i&&d?t[0]:t};c&&n&&"function"==typeof l&&1!=l.length&&(s=c=!1);var d=this.__chain__,f=!!this.__actions__.length,p=r&&!d,m=s&&!f;if(!r&&c){t=m?t:new Tn(this);var h=e.apply(t,a);return h.__actions__.push({func:ia,args:[u],thisArg:void 0}),new Fn(h,d)}return p&&m?e.apply(this,a):(h=this.thru(u),p?i?h.value()[0]:h.value():h)})})),st(["pop","push","shift","sort","splice","unshift"],(function(e){var t=ve[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);En.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var o=this.value();return t.apply(Ia(o)?o:[],e)}return this[n]((function(n){return t.apply(Ia(n)?n:[],e)}))}})),ci(Tn.prototype,(function(e,t){var n=En[t];if(n){var i=n.name+"";ke.call(_n,i)||(_n[i]=[]),_n[i].push({name:t,func:n})}})),_n[jo(void 0,2).name]=[{name:"wrapper",func:void 0}],Tn.prototype.clone=function(){var e=new Tn(this.__wrapped__);return e.__actions__=yo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=yo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=yo(this.__views__),e},Tn.prototype.reverse=function(){if(this.__filtered__){var e=new Tn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Tn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ia(e),i=t<0,o=n?e.length:0,r=function(e,t,n){var i=-1,o=n.length;for(;++i<o;){var r=n[i],a=r.size;switch(r.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=ln(t,e+a);break;case"takeRight":e=sn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=r.start,s=r.end,l=s-a,c=i?s:a-1,u=this.__iteratees__,d=u.length,f=0,p=ln(l,this.__takeCount__);if(!n||!i&&o==l&&p==l)return io(e,this.__actions__);var m=[];e:for(;l--&&f<p;){for(var h=-1,g=e[c+=t];++h<d;){var b=u[h],v=b.iteratee,y=b.type,_=v(g);if(2==y)g=_;else if(!_){if(1==y)continue e;break e}}m[f++]=g}return m},En.prototype.at=oa,En.prototype.chain=function(){return na(this)},En.prototype.commit=function(){return new Fn(this.value(),this.__chain__)},En.prototype.next=function(){void 0===this.__values__&&(this.__values__=ns(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},En.prototype.plant=function(e){for(var t,n=this;n instanceof Mn;){var i=Er(n);i.__index__=0,i.__values__=void 0,t?o.__wrapped__=i:t=i;var o=i;n=n.__wrapped__}return o.__wrapped__=e,t},En.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Tn){var t=e;return this.__actions__.length&&(t=new Tn(this)),(t=t.reverse()).__actions__.push({func:ia,args:[Kr],thisArg:void 0}),new Fn(t,this.__chain__)}return this.thru(Kr)},En.prototype.toJSON=En.prototype.valueOf=En.prototype.value=function(){return io(this.__wrapped__,this.__actions__)},En.prototype.first=En.prototype.head,Ye&&(En.prototype[Ye]=function(){return this}),En}();Ge._=Jt,void 0===(o=function(){return Jt}.call(t,n,t,i))||(i.exports=o)}).call(this)}).call(this,n("c8ba"),n("62e4")(e))},"2f9e":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n("551c");var i=function(e){return new Promise((function(t,n){new Promise((function(e,t){window.FormMaking_OPTIONS.jsPDF?e(window.FormMaking_OPTIONS.jsPDF):window.jspdf?e(window.jspdf.jsPDF):t("jsPDF not found")})).then((function(i){new Promise((function(e,t){window.FormMaking_OPTIONS.html2canvas?e(window.FormMaking_OPTIONS.html2canvas):window.html2canvas?e(window.html2canvas):t("html2canvas not found")})).then((function(o){var r=new i("p","pt","a4");o(e,{dpi:300,scale:4,allowTaint:!0,useCORS:!0}).then((function(e){var n=e.getContext("2d");n.mozImageSmoothingEnabled=!1,n.webkitImageSmoothingEnabled=!1,n.msImageSmoothingEnabled=!1,n.imageSmoothingEnabled=!1;var i=r.internal.pageSize.getWidth(),o=r.internal.pageSize.getHeight(),a=i-20-20,s=o-20-30,l=a,c=e.height*l/e.width,u=c,d=1;if(u<s){var f=e.toDataURL("image/jpeg");r.addImage(f,"JPEG",20,20,l,c)}else for(;u>0;){var p=e.width,m=p*s/a,h=document.createElement("canvas"),g=h.getContext("2d");g.mozImageSmoothingEnabled=!1,g.webkitImageSmoothingEnabled=!1,g.msImageSmoothingEnabled=!1,g.imageSmoothingEnabled=!1,h.width=p,h.height=m;var b=e.height-(d-1)*m;if(b<m){h.height=b,g.drawImage(e,0,(d-1)*m,e.width,b,0,0,p,b);var v=h.toDataURL("image/jpeg");r.addImage(v,"JPEG",20,20,a,s/m*b)}else{g.drawImage(e,0,(d-1)*m,e.width,m,0,0,p,m);var y=h.toDataURL("image/jpeg");r.addImage(y,"JPEG",20,20,a,s)}s,(u-=s)>0&&(r.addPage(),d++)}for(var _=r.internal.getNumberOfPages(),w=1;w<=_;w++)r.setPage(w),r.setTextColor(144,147,153),r.setFontSize(10),r.text("Powered by FormMaking - https://form.making.link",i-247,o-20);t(r.output("blob"))})).catch((function(){n()}))})).catch((function(e){return n(e)}))})).catch((function(e){return n(e)}))}))}},"2fdb":function(e,t,n){"use strict";var i=n("5ca1"),o=n("d2c8");i(i.P+i.F*n("5147")("includes"),"String",{includes:function(e){return!!~o(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},3024:function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},"30b5":function(e,t,n){"use strict";var i=n("c532");function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var r;if(n)r=n(t);else if(i.isURLSearchParams(t))r=t.toString();else{var a=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),r=a.join("&")}return r&&(e+=(-1===e.indexOf("?")?"?":"&")+r),e}},"30f1":function(e,t,n){"use strict";var i=n("b8e3"),o=n("63b6"),r=n("9138"),a=n("35e8"),s=n("481b"),l=n("8f60"),c=n("45f2"),u=n("53e2"),d=n("5168")("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,m,h,g,b){l(n,t,m);var v,y,_,w=function(e){if(!f&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",k="values"==h,O=!1,C=e.prototype,S=C[d]||C["@@iterator"]||h&&C[h],D=S||w(h),P=h?k?w("entries"):D:void 0,E="Array"==t&&C.entries||S;if(E&&(_=u(E.call(new e)))!==Object.prototype&&_.next&&(c(_,x,!0),i||"function"==typeof _[d]||a(_,d,p)),k&&S&&"values"!==S.name&&(O=!0,D=function(){return S.call(this)}),i&&!b||!f&&!O&&C[d]||a(C,d,D),s[t]=D,s[x]=p,h)if(v={values:k?D:w("values"),keys:g?D:w("keys"),entries:P},b)for(y in v)y in C||r(C,y,v[y]);else o(o.P+o.F*(f||O),t,v);return v}},"31c5":function(e,t,n){!function(e){"use strict";var t="CodeMirror-activeline-background";function n(e){for(var n=0;n<e.state.activeLines.length;n++)e.removeLineClass(e.state.activeLines[n],"wrap","CodeMirror-activeline"),e.removeLineClass(e.state.activeLines[n],"background",t),e.removeLineClass(e.state.activeLines[n],"gutter","CodeMirror-activeline-gutter")}function i(e,i){for(var o=[],r=0;r<i.length;r++){var a=i[r],s=e.getOption("styleActiveLine");if("object"==typeof s&&s.nonEmpty?a.anchor.line==a.head.line:a.empty()){var l=e.getLineHandleVisualStart(a.head.line);o[o.length-1]!=l&&o.push(l)}}(function(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0})(e.state.activeLines,o)||e.operation((function(){n(e);for(var i=0;i<o.length;i++)e.addLineClass(o[i],"wrap","CodeMirror-activeline"),e.addLineClass(o[i],"background",t),e.addLineClass(o[i],"gutter","CodeMirror-activeline-gutter");e.state.activeLines=o}))}function o(e,t){i(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,r,a){var s=a!=e.Init&&a;r!=s&&(s&&(t.off("beforeSelectionChange",o),n(t),delete t.state.activeLines),r&&(t.state.activeLines=[],i(t,t.listSelections()),t.on("beforeSelectionChange",o)))}))}(n("56b3"))},"31f4":function(e,t){e.exports=function(e,t,n){var i=void 0===n;switch(t.length){case 0:return i?e():e.call(n);case 1:return i?e(t[0]):e.call(n,t[0]);case 2:return i?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return i?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return i?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},"32e9":function(e,t,n){var i=n("86cc"),o=n("4630");e.exports=n("9e1e")?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"32fc":function(e,t,n){var i=n("e53d").document;e.exports=i&&i.documentElement},"335c":function(e,t,n){var i=n("6b4c");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},3398:function(e,t,n){},"33a4":function(e,t,n){var i=n("84f2"),o=n("2b4c")("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||r[o]===e)}},3459:function(e,t,n){"use strict";n("86a9")},"355d":function(e,t){t.f={}.propertyIsEnumerable},"35e8":function(e,t,n){var i=n("d9f6"),o=n("aebd");e.exports=n("8e60")?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"366e":function(e,t,n){e.exports=n("ccb9").f("toPrimitive")},"36bd":function(e,t,n){"use strict";var i=n("4bf8"),o=n("77f1"),r=n("9def");e.exports=function(e){for(var t=i(this),n=r(t.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:o(l,n);c>s;)t[s++]=e;return t}},"36c3":function(e,t,n){var i=n("335c"),o=n("25eb");e.exports=function(e){return i(o(e))}},"36eb":function(e,t,n){},3702:function(e,t,n){var i=n("481b"),o=n("5168")("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||r[o]===e)}},"37c8":function(e,t,n){t.f=n("2b4c")},3822:function(e,t,n){},3846:function(e,t,n){n("9e1e")&&"g"!=/./g.flags&&n("86cc").f(RegExp.prototype,"flags",{configurable:!0,get:n("0bfb")})},"387f":function(e,t,n){"use strict";e.exports=function(e,t,n,i,o){return e.config=t,n&&(e.code=n),e.request=i,e.response=o,e}},"38c4":function(e,t,n){},"38fd":function(e,t,n){var i=n("69a8"),o=n("4bf8"),r=n("613b")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},3934:function(e,t,n){"use strict";var i=n("c532");e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=i.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},"3a38":function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},"3a52":function(e,t,n){},"3a72":function(e,t,n){var i=n("7726"),o=n("8378"),r=n("2d00"),a=n("37c8"),s=n("86cc").f;e.exports=function(e){var t=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},"3b2b":function(e,t,n){var i=n("7726"),o=n("5dbc"),r=n("86cc").f,a=n("9093").f,s=n("aae3"),l=n("0bfb"),c=i.RegExp,u=c,d=c.prototype,f=/a/g,p=/a/g,m=new c(f)!==f;if(n("9e1e")&&(!m||n("79e5")((function(){return p[n("2b4c")("match")]=!1,c(f)!=f||c(p)==p||"/a/i"!=c(f,"i")})))){c=function(e,t){var n=this instanceof c,i=s(e),r=void 0===t;return!n&&i&&e.constructor===c&&r?e:o(m?new u(i&&!r?e.source:e,t):u((i=e instanceof c)?e.source:e,i&&r?l.call(e):t),n?this:d,c)};for(var h=function(e){e in c||r(c,e,{configurable:!0,get:function(){return u[e]},set:function(t){u[e]=t}})},g=a(u),b=0;g.length>b;)h(g[b++]);d.constructor=c,c.prototype=d,n("2aba")(i,"RegExp",c)}n("7a56")("RegExp")},"3b44":function(e,t,n){"use strict";n("01cd")},"3b8d":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("696e"),o=n.n(i);function r(e,t,n,i,r,a,s){try{var l=e[a](s),c=l.value}catch(e){return void n(e)}l.done?t(c):o.a.resolve(c).then(i,r)}function a(e){return function(){var t=this,n=arguments;return new o.a((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,l,"next",e)}function l(e){r(a,i,o,s,l,"throw",e)}s(void 0)}))}}},"3c11":function(e,t,n){"use strict";var i=n("63b6"),o=n("584a"),r=n("e53d"),a=n("f201"),s=n("cd78");i(i.P+i.R,"Promise",{finally:function(e){var t=a(this,o.Promise||r.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},"3faa":function(e,t,n){"use strict";n("932c")},"40c3":function(e,t,n){var i=n("6b4c"),o=n("5168")("toStringTag"),r="Arguments"==i(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:r?i(t):"Object"==(a=i(t))&&"function"==typeof t.callee?"Arguments":a}},4178:function(e,t,n){var i,o,r,a=n("d864"),s=n("3024"),l=n("32fc"),c=n("1ec9"),u=n("e53d"),d=u.process,f=u.setImmediate,p=u.clearImmediate,m=u.MessageChannel,h=u.Dispatch,g=0,b={},v=function(){var e=+this;if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}},y=function(e){v.call(e.data)};f&&p||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return b[++g]=function(){s("function"==typeof e?e:Function(e),t)},i(g),g},p=function(e){delete b[e]},"process"==n("6b4c")(d)?i=function(e){d.nextTick(a(v,e,1))}:h&&h.now?i=function(e){h.now(a(v,e,1))}:m?(r=(o=new m).port2,o.port1.onmessage=y,i=a(r.postMessage,r,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(i=function(e){u.postMessage(e+"","*")},u.addEventListener("message",y,!1)):i="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),e.exports={set:f,clear:p}},"41a0":function(e,t,n){"use strict";var i=n("2aeb"),o=n("4630"),r=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(a,{next:o(1,n)}),r(e,t+" Iterator")}},"41e9":function(e,t,n){"use strict";n("f900")},4260:function(e,t,n){"use strict";n.d(t,"i",(function(){return o})),n.d(t,"f",(function(){return r})),n.d(t,"g",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"l",(function(){return l})),n.d(t,"k",(function(){return c})),n.d(t,"m",(function(){return u})),n.d(t,"b",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"h",(function(){return p})),n.d(t,"a",(function(){return m})),n.d(t,"j",(function(){return h})),n.d(t,"c",(function(){return g}));var i=n("7618"),o=(n("456d"),n("20d6"),n("ac6a"),n("cadf"),n("4f7f"),n("5df3"),n("1c4c"),n("28a5"),n("6b54"),n("a481"),n("551c"),function(e){return new Promise((function(t,n){var i=document.createElement("script");i.src=e,i.type="text/javascript",document.body.appendChild(i),i.onload=function(){t()}}))}),r=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e[t].columns.length;n++)e[t].columns[n].key=Math.random().toString(36).slice(-8);return e},a=function(e){for(var t=0;t<e.length;t++)e[t].key=Math.random().toString(36).slice(-8);return e},s=function(e){for(var t=0;t<e.length;t++)e[t].key=Math.random().toString(36).slice(-8);return e},l=function(e){if(!e)return[];return e.split(/}\s+./).filter((function(e){return e})).map((function(e){return"."!==(e=e.trim())[0]&&(e="."+e),"}"!==e[e.length-1]&&(e+="}"),e}))},c=function(e){return Array.from(new Set(e.map((function(e){var t=e.indexOf(" "),n=e.indexOf("{"),i=n;return t>0&&t<n&&(i=t),e=e.substring(1,i)}))))},u=function(e,t){var n=document.styleSheets[0];if(n.href){var i=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",i.appendChild(o),n=o.sheet||o.styleSheet}for(var r=0;n.cssRules.length>r;)n.cssRules[r].selectorText&&0===n.cssRules[r].selectorText.indexOf(t)?n.deleteRule(r):r++;for(var a=0;a<e.length;a++)n.insertRule(t+e[a],0)},d=function(e){var t=document.styleSheets[0];if(t.href)return!1;for(var n=0;t.cssRules.length>n;)t.cssRules[n].selectorText&&0===t.cssRules[n].selectorText.indexOf(e)?t.deleteRule(n):n++},f=function(e,t){var n=e.findIndex((function(e){return!e.key}));n>=0&&e.splice(t,0,e.splice(n,1)[0])},p=function(e,t){var n={};return Object.keys(t).forEach((function(o){"object"===Object(i.a)(t[o])&&e[o]?Array.isArray(e[o])?n[o]=e[o].map((function(e){return p(e,t[o])})):n[o]=p(e[o],t[o]):n[o]=e[o]})),n},m=function(e,t){e.classList.add(t)},h=function(e,t){e.classList.remove(t)},g=function(e){Function("\n window.console && console.error('[FormMaking error]: ".concat(e,"');\n "))()}},4388:function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=n("5531"),r=n("09cf"),a=n("6ca6"),s={name:"generate-report",components:{GenerateFormItem:o.default,GenerateInline:r.default,GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"93bd"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"7a6e"))}},props:["element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model}},computed:{currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(a.c)(this.element.options.hidden)||!Object(a.a)(Object(a.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},methods:{},watch:{model:{deep:!0,handler:function(e){this.dataModels=this.model}}}},l=n("2877"),c=Object(l.a)(s,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"fm-report-table__wrapper"},[e.elementDisplay?t("table",{staticClass:"fm-report-table__table",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!(!e.element.options||!e.element.options.customClass)),style:{"border-top-width":e.element.options.borderWidth+"px","border-top-color":e.element.options.borderColor,"border-left-width":e.element.options.borderWidth+"px","border-left-color":e.element.options.borderColor,width:e.element.options.width||"auto"}},[t("tr",[e._l(e.element.headerRow,(function(e,n){return[t("th",{key:n,style:{width:e.options.width,height:0,padding:0}})]}))],2),e._l(e.element.rows,(function(n,o){return t("tr",{key:o},e._l(n.columns,(function(n,r){return n.options.invisible?e._e():t("td",{key:o+"-"+r,staticClass:"fm-report-table__td",class:Object(i.a)({},n.options.customClass,!!n.options.customClass),style:{"border-right-width":e.element.options.borderWidth+"px","border-right-color":e.element.options.borderColor,"border-bottom-width":e.element.options.borderWidth+"px","border-bottom-color":e.element.options.borderColor,width:n.options.width,height:n.options.height||"40px","min-height":"40px","text-align":n.options.textAlign,"vertical-align":n.options.verticalAlign},attrs:{colspan:n.options.colspan,rowspan:n.options.rowspan,valign:"top"}},[e._l(n.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.dataModels,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)})),0)}))],2):e._e()])}),[],!1,null,null,null);t.default=c.exports},"43fc":function(e,t,n){"use strict";var i=n("63b6"),o=n("656e"),r=n("4439");i(i.S,"Promise",{try:function(e){var t=o.f(this),n=r(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},4439:function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},4498:function(e,t,n){},"454f":function(e,t,n){n("46a7");var i=n("584a").Object;e.exports=function(e,t,n){return i.defineProperty(e,t,n)}},"456d":function(e,t,n){var i=n("4bf8"),o=n("0d58");n("5eda")("keys",(function(){return function(e){return o(i(e))}}))},4588:function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},"45f2":function(e,t,n){var i=n("d9f6").f,o=n("07e3"),r=n("5168")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,r)&&i(e,r,{configurable:!0,value:t})}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"467f":function(e,t,n){"use strict";var i=n("2d83");e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(i("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},"46a7":function(e,t,n){var i=n("63b6");i(i.S+i.F*!n("8e60"),"Object",{defineProperty:n("d9f6").f})},"47ee":function(e,t,n){var i=n("c3a1"),o=n("9aa9"),r=n("355d");e.exports=function(e){var t=i(e),n=o.f;if(n)for(var a,s=n(e),l=r.f,c=0;s.length>c;)l.call(e,a=s[c++])&&t.push(a);return t}},"481b":function(e,t){e.exports={}},4917:function(e,t,n){"use strict";var i=n("cb7c"),o=n("9def"),r=n("0390"),a=n("5f1b");n("214f")("match",1,(function(e,t,n,s){return[function(n){var i=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i):new RegExp(n)[t](String(i))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=i(e),c=String(this);if(!l.global)return a(l,c);var u=l.unicode;l.lastIndex=0;for(var d,f=[],p=0;null!==(d=a(l,c));){var m=String(d[0]);f[p]=m,""===m&&(l.lastIndex=r(c,o(l.lastIndex),u)),p++}return 0===p?null:f}]}))},"4a59":function(e,t,n){var i=n("9b43"),o=n("1fa8"),r=n("33a4"),a=n("cb7c"),s=n("9def"),l=n("27ee"),c={},u={};(t=e.exports=function(e,t,n,d,f){var p,m,h,g,b=f?function(){return e}:l(e),v=i(n,d,t?2:1),y=0;if("function"!=typeof b)throw TypeError(e+" is not iterable!");if(r(b)){for(p=s(e.length);p>y;y++)if((g=t?v(a(m=e[y])[0],m[1]):v(e[y]))===c||g===u)return g}else for(h=b.call(e);!(m=h.next()).done;)if((g=o(h,v,m.value,t))===c||g===u)return g}).BREAK=c,t.RETURN=u},"4bf8":function(e,t,n){var i=n("be13");e.exports=function(e){return Object(i(e))}},"4c95":function(e,t,n){"use strict";var i=n("e53d"),o=n("584a"),r=n("d9f6"),a=n("8e60"),s=n("5168")("species");e.exports=function(e){var t="function"==typeof o[e]?o[e]:i[e];a&&t&&!t[s]&&r.f(t,s,{configurable:!0,get:function(){return this}})}},"4d34":function(e,t,n){"use strict";n("213d")},"4e19":function(e,t,n){},"4ee1":function(e,t,n){var i=n("5168")("iterator"),o=!1;try{var r=[7][i]();r.return=function(){o=!0},Array.from(r,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},e(r)}catch(e){}return n}},"4f7f":function(e,t,n){"use strict";var i=n("c26b"),o=n("b39a");e.exports=n("e0b8")("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return i.def(o(this,"Set"),e=0===e?0:e,e)}},i)},"50ed":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},5147:function(e,t,n){var i=n("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[i]=!1,!"/./"[e](t)}catch(e){}}return!0}},5168:function(e,t,n){var i=n("dbdb")("wks"),o=n("62a0"),r=n("e53d").Symbol,a="function"==typeof r;(e.exports=function(e){return i[e]||(i[e]=a&&r[e]||(a?r:o)("Symbol."+e))}).store=i},"520a":function(e,t,n){"use strict";var i,o,r=n("0bfb"),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,c=(i=/a/,o=/b*/g,a.call(i,"a"),a.call(o,"a"),0!==i.lastIndex||0!==o.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(l=function(e){var t,n,i,o,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),c&&(t=l.lastIndex),i=a.call(l,e),c&&i&&(l.lastIndex=l.global?i.index+i[0].length:t),u&&i&&i.length>1&&s.call(i[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(i[o]=void 0)})),i}),e.exports=l},"522c":function(e,t,n){},5270:function(e,t,n){"use strict";var i=n("c532"),o=n("c401"),r=n("2e67"),a=n("2444"),s=n("d925"),l=n("e683");function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!s(e.url)&&(e.url=l(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function(t){return r(t)||(c(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},"52a7":function(e,t){t.f={}.propertyIsEnumerable},"53e2":function(e,t,n){var i=n("07e3"),o=n("241e"),r=n("5559")("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),i(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},5485:function(e,t,n){"use strict";n("6919")},"549b":function(e,t,n){"use strict";var i=n("d864"),o=n("63b6"),r=n("241e"),a=n("b0dc"),s=n("3702"),l=n("b447"),c=n("20fd"),u=n("7cd6");o(o.S+o.F*!n("4ee1")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,o,d,f=r(e),p="function"==typeof this?this:Array,m=arguments.length,h=m>1?arguments[1]:void 0,g=void 0!==h,b=0,v=u(f);if(g&&(h=i(h,m>2?arguments[2]:void 0,2)),null==v||p==Array&&s(v))for(n=new p(t=l(f.length));t>b;b++)c(n,b,g?h(f[b],b):f[b]);else for(d=v.call(f),n=new p;!(o=d.next()).done;b++)c(n,b,g?a(d,h,[o.value,b],!0):o.value);return n.length=b,n}})},"551c":function(e,t,n){"use strict";var i,o,r,a,s=n("2d00"),l=n("7726"),c=n("9b43"),u=n("23c6"),d=n("5ca1"),f=n("d3f4"),p=n("d8e8"),m=n("f605"),h=n("4a59"),g=n("ebd6"),b=n("1991").set,v=n("8079")(),y=n("a5b8"),_=n("9c80"),w=n("a25f"),x=n("bcaa"),k=l.TypeError,O=l.process,C=O&&O.versions,S=C&&C.v8||"",D=l.Promise,P="process"==u(O),E=function(){},j=o=y.f,M=!!function(){try{var e=D.resolve(1),t=(e.constructor={})[n("2b4c")("species")]=function(e){e(E,E)};return(P||"function"==typeof PromiseRejectionEvent)&&e.then(E)instanceof t&&0!==S.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),F=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},T=function(e,t){if(!e._n){e._n=!0;var n=e._c;v((function(){for(var i=e._v,o=1==e._s,r=0,a=function(t){var n,r,a,s=o?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(o||(2==e._h&&R(e),e._h=1),!0===s?n=i:(u&&u.enter(),n=s(i),u&&(u.exit(),a=!0)),n===t.promise?c(k("Promise-chain cycle")):(r=F(n))?r.call(n,l,c):l(n)):c(i)}catch(e){u&&!a&&u.exit(),c(e)}};n.length>r;)a(n[r++]);e._c=[],e._n=!1,t&&!e._h&&I(e)}))}},I=function(e){b.call(l,(function(){var t,n,i,o=e._v,r=$(e);if(r&&(t=_((function(){P?O.emit("unhandledRejection",o,e):(n=l.onunhandledrejection)?n({promise:e,reason:o}):(i=l.console)&&i.error&&i.error("Unhandled promise rejection",o)})),e._h=P||$(e)?2:1),e._a=void 0,r&&t.e)throw t.v}))},$=function(e){return 1!==e._h&&0===(e._a||e._c).length},R=function(e){b.call(l,(function(){var t;P?O.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},A=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),T(t,!0))},L=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw k("Promise can't be resolved itself");(t=F(e))?v((function(){var i={_w:n,_d:!1};try{t.call(e,c(L,i,1),c(A,i,1))}catch(e){A.call(i,e)}})):(n._v=e,n._s=1,T(n,!1))}catch(e){A.call({_w:n,_d:!1},e)}}};M||(D=function(e){m(this,D,"Promise","_h"),p(e),i.call(this);try{e(c(L,this,1),c(A,this,1))}catch(e){A.call(this,e)}},(i=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n("dcbc")(D.prototype,{then:function(e,t){var n=j(g(this,D));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=P?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&T(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),r=function(){var e=new i;this.promise=e,this.resolve=c(L,e,1),this.reject=c(A,e,1)},y.f=j=function(e){return e===D||e===a?new r(e):o(e)}),d(d.G+d.W+d.F*!M,{Promise:D}),n("7f20")(D,"Promise"),n("7a56")("Promise"),a=n("8378").Promise,d(d.S+d.F*!M,"Promise",{reject:function(e){var t=j(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(s||!M),"Promise",{resolve:function(e){return x(s&&this===a?D:this,e)}}),d(d.S+d.F*!(M&&n("5cc5")((function(e){D.all(e).catch(E)}))),"Promise",{all:function(e){var t=this,n=j(t),i=n.resolve,o=n.reject,r=_((function(){var n=[],r=0,a=1;h(e,!1,(function(e){var s=r++,l=!1;n.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--a||i(n))}),o)})),--a||i(n)}));return r.e&&o(r.v),n.promise},race:function(e){var t=this,n=j(t),i=n.reject,o=_((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,i)}))}));return o.e&&i(o.v),n.promise}})},5531:function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=(n("8e6e"),n("7514"),n("7618")),r=(n("551c"),n("28a5"),n("ac6a"),n("cadf"),n("456d"),n("6762"),n("2fdb"),n("75fc"));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=n("c7f0"),c=n("fca1"),u=n("d511"),d=n("095c"),f=n("2ef0"),p=n.n(f),m=n("4260"),h=n("9058");function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={name:"fm-sub-form",components:{GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))},GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"5531"))},GenerateInline:function(){return Promise.resolve().then(n.bind(null,"09cf"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"4388"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"93bd"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"7a6e"))}},props:["showControl","list","value","models","remote","blanks","disableddata","rules","name","remoteOption","preview","platform","dataSourceValue","eventFunction","widget","printRead","paging","pageSize","containerKey","isAdd","isDelete","isDialog","dialogName","group","fieldNode"],data:function(){return{subformData:this.value||[],displayFields:{},changeItem:{},pagingData:[],pagingLength:0,currentPage:1,itemModel:{},subHideFields:[],subDisabledFields:[],itemDisabled:{}}},created:function(){var e=this;this._generateModel(this.list),this.loadPagingData(),this.subHideFields=this.subformData.map((function(t){return Object.fromEntries(Object.keys(e.displayFields).map((function(t){return[t,!e.displayFields[t]]})))})),this.subDisabledFields=this.subformData.map((function(t){return Object.fromEntries(Object.keys(e.itemDisabled).map((function(t){return[t,!e.itemDisabled[t]]})))}))},provide:function(){return{setSubformData:this.setSubformData}},inject:["onFormDisabled","onFormHide","onFormDisplay"],methods:{handleMouseover:function(e){Object(m.a)(this.$refs["formSubformItem_".concat(e)][0],"is-hover")},handleMouseout:function(e){Object(m.j)(this.$refs["formSubformItem_".concat(e)][0],"is-hover")},setSubformData:function(e,t,n){var i=p.a.cloneDeep(this.subformData);i[t][n]=e,this.subformData=i},setData:function(e,t){var n=this;return new Promise("number"!=typeof e?function(i){t=e,n.subformData.forEach((function(e,i){Object.keys(t).forEach((function(e){n.setSubformData(t[e],i,e)}))})),i()}:function(i){n.$nextTick((function(){Object.keys(t).forEach((function(i){n.setSubformData(t[i],e,i)})),i()}))})},handleAddRow:function(){var e=this;if(this.subformData=[].concat(Object(r.a)(this.subformData),[b({},this.itemModel)]),this.subHideFields.push(Object.fromEntries(Object.keys(this.displayFields).map((function(t){return[t,!e.displayFields[t]]})))),this.subDisabledFields.push(Object.fromEntries(Object.keys(this.itemDisabled).map((function(t){return[t,!e.itemDisabled[t]]})))),this.widget&&this.widget.events&&this.widget.events.onRowAdd){var t=this.widget.events.onRowAdd;this.eventFunction[t]({rowIndex:this.subformData.length-1,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}this.paging&&this.$nextTick((function(){e.subformData.length>e.currentPage*e.pageSize&&(e.currentPage=parseInt((e.subformData.length-1)/e.pageSize)+1),e.loadPagingData()}))},handleRemove:function(e){var t=this,n=b({},this.subformData[e]),i=Object(r.a)(this.subformData);if(i.splice(e,1),this.subformData=i,this.subHideFields.splice(e,1),this.subDisabledFields.splice(e,1),this.widget&&this.widget.events&&this.widget.events.onRowRemove){var o=this.widget.events.onRowRemove;this.eventFunction[o]({removeIndex:e,removeData:n,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}this.pagingData=[],this.pagingLength=0,this.paging&&this.$nextTick((function(){t.subformData.length%t.pageSize==0&&t.currentPage>parseInt(t.subformData.length/t.pageSize)&&(t.currentPage=parseInt(t.subformData.length/t.pageSize)),t.loadPagingData()}))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),Object.keys(this.displayFields).forEach((function(n){e.indexOf(n)>=0&&(t.displayFields[n]=!0)})),this.displayFields=b({},this.displayFields),this.subformData.forEach((function(n,i){e.forEach((function(e){t.$set(t.subHideFields[i],e,!1)}))}))},disabled:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){n.onFormDisplay("".concat(n.fieldNode,".").concat(e))}))},hideChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormHide("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},displayChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormDisplay("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},disabledChild:function(e,t,n){var i=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){i.$set(i.subDisabledFields[e],t,n),i.onFormDisabled("".concat(i.fieldNode,".").concat(e,".").concat(t),n)}))},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.list,e,t)},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(h.a)(n.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(h.a)(n.list,e.split("."),t,"remove")}))},handlePageChange:function(e){var t=this;if(this.currentPage=e,this.pagingData=[],this.pagingLength=0,this.$nextTick((function(){t.loadPagingData()})),this.widget&&this.widget.events&&this.widget.events.onPageChange){var n=this.widget.events.onPageChange;this.eventFunction[n]({currentPage:e,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}},loadPagingData:function(){var e=(this.currentPage-1)*this.pageSize,t=e+this.pageSize;this.pagingData=this.subformData.slice(e,t),this.pagingLength=this.pagingData.length},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.displayFields[e[n].model]=!e[n].options.hidden,e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.displayFields[e[n].model]=!e[n].options.hidden):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.displayFields[e[n].model]=!e[n].options.hidden):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.displayFields[e[n].model]=!e[n].options.hidden):("blank"==e[n].type?this.itemModel[e[n].model]="String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]:this.itemModel[e[n].model]=p.a.cloneDeep(e[n].options.defaultValue),this.displayFields[e[n].model]=!e[n].options.hidden,this.itemDisabled[e[n].model]=!e[n].options.disabled)},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(this.$set(e[o].options,"disabled",n),this.$set(this.itemDisabled,e[o].model,!n))},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):("inline"===e[o].type||"card"===e[o].type)&&i._setOptions(e[o].list,t,n),t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)}},watch:{value:function(e){this.subformData=e;for(var t=[],n=[],i=0;i<this.value.length;i++){for(var o=Object.keys(this.displayFields),r={},a=0;a<o.length;a++){var s,l;r[o[a]]=(null===(s=this.subHideFields)||void 0===s||null===(l=s[i])||void 0===l?void 0:l[o[a]])||!this.displayFields[o[a]]}t.push(r);for(var c=Object.keys(this.itemDisabled),u={},d=0;d<c.length;d++){var f,p;u[c[d]]=(null===(f=this.subDisabledFields)||void 0===f||null===(p=f[i])||void 0===p?void 0:p[c[d]])||!this.itemDisabled[c[d]]}n.push(u)}this.subHideFields=t,this.subDisabledFields=n},subformData:{deep:!0,handler:function(e){this.loadPagingData(),this.$emit("input",e)}}}},y=(n("64dc"),n("2877")),_=Object(y.a)(v,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-subform"},[e._l(e.paging?e.pagingLength:e.subformData,(function(n,i){return t("div",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+i,ref:"formSubformItem_".concat((e.paging?e.pageSize*(e.currentPage-1):0)+i),refInFor:!0,staticClass:"form-subform-item",on:{mouseover:function(t){t.stopPropagation(),e.handleMouseover((e.paging?e.pageSize*(e.currentPage-1):0)+i)},mouseout:function(t){e.handleMouseout((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[e.showControl?t("div",{staticClass:"form-subform-index"},[t("el-tag",{attrs:{round:"",size:"small"}},[e._v("#"+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))])],1):e._e(),e.showControl?t("div",{staticClass:"form-subform-remove"},[t("el-popconfirm",{attrs:{teleported:!1,title:e.$t("fm.description.deleteConfirm")},on:{confirm:function(t){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[!e.printRead&&e.isDelete?t("el-button",{attrs:{slot:"reference",disabled:e.disableddata,type:"danger",icon:"el-icon-delete",circle:""},slot:"reference"}):e._e()],1),e.printRead||!e.isDelete?t("el-tag",{attrs:{round:"",size:"small"}},[e._v("#"+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))]):e._e()],1):e._e(),t("div",{staticClass:"form-subform-content"},[e._l(e.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)])})),t("el-row",{staticClass:"form-subform-action"},[t("el-col",{attrs:{span:e.preview&&"mobile"!=e.platform||!e.preview?12:24,xs:24}},[!e.disableddata&&e.isAdd?t("el-button",{attrs:{type:"text"},on:{click:e.handleAddRow}},[t("i",{staticClass:"fm-iconfont icon-plus",staticStyle:{"font-size":"12px",margin:"5px"}}),e._v(e._s(e.$t("fm.actions.add"))+"\n ")]):e._e()],1),t("el-col",{attrs:{span:(!e.preview||"mobile"==e.platform)&&e.preview||e.disableddata?24:12,xs:24}},[e.paging&&e.subformData.length?t("el-pagination",{staticStyle:{float:"right"},attrs:{layout:"total, prev, pager, next","page-size":e.pageSize,"current-page":e.currentPage,total:e.subformData.length,"pager-count":5},on:{"current-change":e.handlePageChange}}):e._e()],1)],1)],2)}),[],!1,null,null,null).exports,w=(n("20d6"),n("5df3"),{name:"fm-group",components:{GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))},GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"5531"))},GenerateInline:function(){return Promise.resolve().then(n.bind(null,"09cf"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"4388"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"93bd"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"7a6e"))}},props:["value","models","rules","element","remote","blanks","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","group","fieldNode"],data:function(){return{displayFields:{},groupModel:this.value||{},groupDisabled:{}}},inject:["generateComponentInstance","deleteComponentInstance","getFormComponent","onFormHide","onFormDisplay"],created:function(){this._generateModel(this.element.list)},mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode,this.$refs["generate-group-".concat(this.element.model)].$parent)},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode)},provide:function(){return{setGroupData:this.setGroupData}},methods:{setGroupData:function(e,t){this.$set(this.groupModel,t,e)},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.$set(this.displayFields,e[n].model,!e[n].options.hidden),e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):("blank"==e[n].type?this.$set(this.groupModel,e[n].model,"String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]):this.$set(this.groupModel,e[n].model,this.value[e[n].model]||p.a.cloneDeep(e[n].options.defaultValue)),this.$set(this.displayFields,e[n].model,!e[n].options.hidden),this.$set(this.groupDisabled,e[n].model,!e[n].options.disabled))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},disabled:function(e,t){"string"==typeof e&&(e=[e]),this._setDisabled(this.element.list,e,t)},validate:function(){var e=this;return new Promise((function(t,n){var i=e._getAllRuleFields();Promise.all(i.map((function(t){return new Promise((function(n){e.getFormComponent().validateField(t,(function(e){n(e)}))}))}))).then((function(e){e.findIndex((function(e){return e}))>=0?n():t()}))}))},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.element.list,e,t)},setData:function(e){var t=this;return new Promise((function(n){t.$nextTick((function(){Object.keys(e).forEach((function(n){t.$set(t.groupModel,n,e[n])})),n()}))}))},getValues:function(){return this.groupModel},getValue:function(e){return this.groupModel[e]},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(h.a)(n.element.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(h.a)(n.element.list,e.split("."),t,"remove")}))},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(e[o].options.disabled=n)},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?i._setOptions(e[o].list,t,n):t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)},_getAllRuleFields:function(){var e=this,t=[];return Object.keys(this.groupModel).forEach((function(n){Array.isArray(e.groupModel[n])?e.groupModel[n].forEach((function(i,o){Object.keys(i).forEach((function(i){t.push("".concat(e.fieldNode,".").concat(n,".").concat(o,".").concat(i))}))})):t.push("".concat(e.fieldNode,".").concat(n))})),t}},watch:{groupModel:{deep:!0,handler:function(e){this.$emit("input",e)}},value:{deep:!0,handler:function(e){this.groupModel=e}}}}),x=Object(y.a)(w,(function(){var e=this,t=e._self._c;return t("div",{ref:"generate-group-".concat(e.element.model),style:{width:e.element.options.width}},[e._l(e.element.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.groupModel,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)}),[],!1,null,null,null).exports,k=n("8bbf"),O=n.n(k),C=n("0f01"),S=n("6ca6");function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var E={name:"generate-element-item",components:{FmUpload:l.a,FmFormTable:c.a,FmFileUpload:u.a,FmEditor:d.a,FmSubForm:_,FmGroup:x},props:["widget","value","models","remote","isTable","blanks","disabled","edit","remoteOption","rules","platform","preview","dataSourceValue","eventFunction","rowIndex","tableName","printRead","isMobile","isSubform","subName","isDialog","dialogName","group","fieldNode","containerKey","isGroup"],data:function(){return{dataModel:this.value,dataModels:this.models,key:(new Date).getTime(),modelName:this.widget.model,remoteOptions:[],dynamicEvents:this.handleOnDynamicEvent(),propsTransfer:{key:"key",label:"label"},generateDisabled:void 0,remoteToken:""}},computed:{elementDisabled:function(){var e=this.widget.options.disabled;return Object(S.c)(this.widget.options.disabled)&&(e=Object(S.a)(Object(S.b)(this.widget.options.disabled),this.currentOptions,this.formContext)),"boolean"==typeof this.generateDisabled?!this.edit||this.generateDisabled:!this.edit||Boolean(e)},currentOptions:function(){return this.isTable||this.isSubform?{value:this.dataModel,fieldNode:this.fieldNode,currentRef:this.$refs["fm-"+this.widget.model],rowIndex:this.rowIndex,row:p.a.cloneDeep(this.models),field:this.widget.model,group:this.group}:{value:this.dataModel,fieldNode:this.fieldNode,currentRef:this.$refs["fm-"+this.widget.model],field:this.widget.model,group:this.group}},extendProps:function(){var e=this,t={};return this.widget.options.extendProps&&Object.keys(this.widget.options.extendProps).forEach((function(n){var i=e.widget.options.extendProps[n];Object(S.c)(i)?t[n]=Object(S.a)(Object(S.b)(i),e.currentOptions,e.formContext):t[n]=i})),t},groupNode:function(){return this.group?this.group+"."+this.widget.model:this.widget.model}},created:function(){var e=this;if(this.widget.options.remote||("steps"==this.widget.type?this.loadOptions(this.widget.options.steps):"transfer"==this.widget.type?this.loadOptions(this.widget.options.data):this.loadOptions(this.widget.options.options)),!this.widget.options.remote||Object.keys(this.widget.options).indexOf("remoteType")>=0&&"func"!=this.widget.options.remoteType||!this.remote[this.widget.options.remoteFunc]||this.remote[this.widget.options.remoteFunc]((function(t){e.loadOptions(t)})),this.widget.options.remote&&"option"==this.widget.options.remoteType&&this.remoteOption[this.widget.options.remoteOption]&&this.loadOptions(this.remoteOption[this.widget.options.remoteOption]),this.widget.options.remote&&"datasource"==this.widget.options.remoteType&&this.dataSourceValue){var t=this.getDataSourceOptions();t&&t.value&&this.loadOptions(t.value)}if(this.widget.options.remote&&"fx"==this.widget.options.remoteType){var n=Object(S.a)(this.widget.options.remoteFx,{},this.formContext);n&&this.loadOptions(n)}if("imgupload"!==this.widget.type&&"fileupload"!==this.widget.type||!this.widget.options.isQiniu||this.loadUploadConfig(),"component"==this.widget.type){var i=this;O.a.component("component-".concat(this.widget.key,"-").concat(this.key),{template:"".concat(this.widget.options.template),props:["value"],data:function(){return{dataModel:e.value,formState:e.formContext}},watch:{dataModel:function(e){"antd"==this.ui?C.a.$emit("on-field-change",this.$attrs.id,e):this.$emit("input",e)},value:function(e){this.dataModel=e}},methods:{triggerEvent:function(e,t){if(i.eventScriptConfig()){var n=i.eventScriptConfig().find((function(t){return t.name==e}));n&&i.eventFunction[n.key](P(P({},i.currentOptions),{},{$eventArgs:t}))}}}})}},inject:["generateComponentInstance","deleteComponentInstance","eventScriptConfig","dynamicValueData","formContext","sendRequest"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode,this.$refs["fm-"+this.widget.model]),this.handleOnMounted()},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode)},methods:{handleTest:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]},handleOnDynamicEvent:function(){var e={};for(var t in this.widget.events){var n=this.widget.events[t];n&&(e[t]=this.callbackDynamicFunc(n))}return e},callbackDynamicFunc:function(e){var t=this;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];t.eventFunction[e](P(P({},t.currentOptions),{},{$eventArgs:i}))}},refreshOptionData:function(e){var t=this;return new Promise((function(n,i){if(t.widget.options.remote&&"fx"===t.widget.options.remoteType&&t.widget.options.remoteFx){var r=Object(S.a)(t.widget.options.remoteFx,t.currentOptions,t.formContext);null!==r&&t.loadOptions(r),n(r)}if(t.widget.options.remote&&"datasource"===t.widget.options.remoteType&&t.widget.options.remoteDataSource){var a="string"==typeof t.widget.options.remoteArgs?{}:P({},t.widget.options.remoteArgs);for(var s in a)Object(S.c)(a[s])&&(a[s]=Object(S.a)(Object(S.b)(a[s]),t.currentOptions,t.formContext));e&&"object"===Object(o.a)(e)&&(a=P(P({},a),e));var l=t.group?t.group+"."+t.widget.model+"."+t.widget.options.remoteDataSource:t.widget.model+"."+t.widget.options.remoteDataSource,c=t.dataSourceValue.find((function(e){return e.key===l&&p.a.isEqual(e.args,a)}));c?(t.loadOptions(c.value),n(c.value)):t.sendRequest(t.widget.options.remoteDataSource,a).then((function(e){t.loadOptions(e),n(e)})).catch((function(e){i(e)}))}}))},loadOptions:function(e){var t=this;Array.isArray(e)&&(this.remoteOptions=e.map((function(e){return t.widget.options.props.children&&t.widget.options.props.children.length&&Object.keys(e).includes(t.widget.options.props.children)?{value:e[t.widget.options.props.value],label:e[t.widget.options.props.label],children:t.processRemoteProps(e[t.widget.options.props.children],t.widget.options.props)}:"steps"==t.widget.type?{title:e[t.widget.options.props.title]+"",description:e[t.widget.options.props.description]}:"transfer"==t.widget.type?{key:e[t.widget.options.props.key],label:e[t.widget.options.props.label]}:{value:e[t.widget.options.props.value],label:e[t.widget.options.props.label]}})))},getOptions:function(){return JSON.parse(JSON.stringify(this.remoteOptions))},processRemoteProps:function(e,t){var n=this;return e&&e.length?e.map((function(e){return n.processRemoteProps(e[t.children],t).length?{value:e[t.value],label:e[t.label],children:n.processRemoteProps(e[t.children],t)}:{value:e[t.value],label:e[t.label]}})):[]},onCascaderChange:function(e){var t=this;e&&this.$nextTick((function(){t.$parent&&t.$parent.clearValidate(),t.$parent&&t.$parent.$parent&&t.$parent.$parent.$refs.generateFormItem&&t.$parent.$parent.$refs.generateFormItem.clearValidate()}))},handleTransferChange:function(e){this.dataModel=e},getCascaderText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e.length>=1){var i=null==t?void 0:t.find((function(t){return t.value==e[0]}));return i&&n.push(i.label),e.splice(0,1),this.getCascaderText(e,null==i?void 0:i.children,n)}if(0==e.length)return n},loadUploadConfig:function(){var e=this;if("func"===this.widget.options.tokenType)!this.widget.options.token&&this.remote[this.widget.options.tokenFunc]((function(t){e.remoteToken=t}));else if("fx"===this.widget.options.tokenType){var t=Object(S.a)(this.widget.options.tokenFx,this.currentOptions,this.formContext);t&&(this.remoteToken=t)}else if(this.dataSourceValue){var n=this.getDataSourceOptions("tokenDataSource");n&&n.value&&(this.remoteToken=n.value)}},handleOnMounted:function(){this.execFunction("onMounted",{})},handleOnClick:function(){this.execFunction("onClick",{})},handleOnFocus:function(){this.execFunction("onFocus",{})},handleOnBlur:function(){this.execFunction("onBlur",{})},handleOnUploadSelect:function(e){return this.execFunction("onSelect",{file:e})},handleOnUploadSuccess:function(e){this.execFunction("onUploadSuccess",{file:e})},handleOnUploadError:function(e){this.execFunction("onUploadError",{file:e})},handleOnUploadProgress:function(e){this.execFunction("onUploadProgress",{file:e})},handleOnUploadRemove:function(e){this.execFunction("onRemove",{file:e})},execFunction:function(e,t){if(this.widget.events&&this.widget.events[e]){var n=this.widget.events[e];return this.eventFunction[n](P(P({},this.currentOptions),t))}},getDataSourceOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"remoteDataSource",t=this.group?this.group+"."+this.widget.model+"."+this.widget.options[e]:this.widget.model+"."+this.widget.options[e];return this.dataSourceValue.find((function(e){return e.key===t}))},disabledElement:function(e){this.generateDisabled=e}},watch:{value:function(e){this.dataModel=e},dataModel:function(e,t){JSON.stringify(e)!=JSON.stringify(t)&&this.$emit("input",e)},remoteOption:{deep:!0,handler:function(e){Object.keys(this.remoteOption).indexOf(this.widget.options.remoteOption)>=0&&this.widget.options.remote&&"option"==this.widget.options.remoteType&&this.loadOptions(this.remoteOption[this.widget.options.remoteOption])}},dataSourceValue:{deep:!0,handler:function(e){if(this.dataSourceValue){var t=this.getDataSourceOptions();t&&t.value&&this.loadOptions(t.value)}"imgupload"!==this.widget.type&&"fileupload"!==this.widget.type||!this.widget.options.isQiniu||this.loadUploadConfig()}}}};function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F={components:{GenerateElementItem:Object(y.a)(E,(function(){var e,t,n,i,a,l,c,u=this,d=u._self._c;return d("span",{class:{"print-read-label":u.printRead}},["blank"==u.widget.type?[d("div",{style:{width:u.isTable?"100%":u.widget.options.width}},[u._t(u.widget.model,null,{model:u.dataModels})],2)]:u._e(),"component"==u.widget.type?[d("div",{style:{width:u.isTable?"100%":u.widget.options.width}},[d("component-".concat(u.widget.key,"-").concat(u.key),{key:u.key,ref:"fm-"+u.widget.model,tag:"component",model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})],1)]:u._e(),"custom"==u.widget.type?[d("div",{style:{width:u.isTable?"100%":u.widget.options.width}},[d(u.widget.el,u._g(u._b({ref:"fm-"+u.widget.model,tag:"component",attrs:{width:u.widget.options.width,height:u.widget.options.height,placeholder:u.$t(u.widget.options.placeholder),readonly:u.widget.options.readonly,disabled:u.elementDisabled,editable:u.widget.options.editable,clearable:u.widget.options.clearable,"print-read":u.printRead},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"component",s(s({},u.widget.options.customProps),u.extendProps),!1),u.dynamicEvents))],1)]:u._e(),"input"==u.widget.type?[u.printRead?[d("span",[u._v(u._s(u.dataModel))])]:[!u.widget.options.dataTypeCheck||"number"!=u.widget.options.dataType&&"integer"!=u.widget.options.dataType&&"float"!=u.widget.options.dataType?d("el-input",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{type:u.widget.options.dataTypeCheck?u.widget.options.dataType:"text",disabled:u.elementDisabled,placeholder:u.$t(u.widget.options.placeholder),"show-password":u.widget.options.showPassword,clearable:u.widget.options.clearable,maxlength:u.widget.options.maxlength,"show-word-limit":u.widget.options.showWordLimit},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-input",s(s({},u.widget.options.customProps),u.extendProps),!1)):d("el-input",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{type:"number",disabled:u.elementDisabled,placeholder:u.$t(u.widget.options.placeholder),"show-password":u.widget.options.showPassword,clearable:u.widget.options.clearable},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=u._n(e)},expression:"dataModel"}},"el-input",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"textarea"==u.widget.type?[u.printRead?[d("pre",[u._v(u._s(u.dataModel))])]:[d("el-input",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{type:"textarea",rows:u.widget.options.rows,disabled:u.elementDisabled,placeholder:u.$t(u.widget.options.placeholder),clearable:u.widget.options.clearable,maxlength:u.widget.options.maxlength,"show-word-limit":u.widget.options.showWordLimit,autosize:u.widget.options.autosize},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-input",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"number"==u.widget.type?[u.printRead?[d("span",[u._v(u._s("number"==typeof u.dataModel?u.dataModel.toFixed(u.widget.options.precision):u.dataModel))])]:[d("el-input-number",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{step:u.widget.options.step,disabled:u.elementDisabled,min:u.widget.options.min,max:u.widget.options.max,"controls-position":u.widget.options.controlsPosition,precision:u.widget.options.precision,controls:u.widget.options.controls},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-input-number",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"radio"==u.widget.type?[u.printRead?[u.widget.options.remote?[u._v("\n "+u._s(u.remoteOptions.find((function(e){return e.value==u.dataModel}))&&u.remoteOptions.find((function(e){return e.value==u.dataModel})).label)+"\n ")]:[u._v("\n "+u._s(u.widget.options.showLabel?u.remoteOptions.find((function(e){return e.value==u.dataModel}))&&u.remoteOptions.find((function(e){return e.value==u.dataModel})).label:u.dataModel)+"\n ")]]:[d("el-radio-group",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-radio-group",s(s({},u.widget.options.customProps),u.extendProps),!1),u._l(u.remoteOptions,(function(e,t){return d("el-radio",{key:t,style:{display:u.widget.options.inline?"inline-block":"block"},attrs:{label:e.value}},[u.widget.options.remote?[u._v(u._s(u.$t(e.label)))]:[u._v(u._s(u.$t(u.widget.options.showLabel?e.label:e.value)))]],2)})),1)]]:u._e(),"checkbox"==u.widget.type?[u.printRead?[u.widget.options.remote?[u._v("\n "+u._s(u.dataModel.map((function(e){return u.remoteOptions.find((function(t){return t.value==e}))&&u.remoteOptions.find((function(t){return t.value==e})).label})).join("、"))+"\n ")]:[u._v("\n "+u._s(u.widget.options.showLabel?u.dataModel.map((function(e){return u.remoteOptions.find((function(t){return t.value==e}))&&u.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):u.dataModel.join("、"))+"\n ")]]:[d("el-checkbox-group",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-checkbox-group",s(s({},u.widget.options.customProps),u.extendProps),!1),u._l(u.remoteOptions,(function(e,t){return d("el-checkbox",{key:t,style:{display:u.widget.options.inline?"inline-block":"block"},attrs:{label:e.value}},[u.widget.options.remote?[u._v(u._s(u.$t(e.label)))]:[u._v(u._s(u.$t(u.widget.options.showLabel?e.label:e.value)))]],2)})),1)]]:u._e(),"time"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-time-picker",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{"is-range":u.widget.options.isRange,placeholder:u.$t(u.widget.options.placeholder),"start-placeholder":u.widget.options.startPlaceholder,"end-placeholder":u.widget.options.endPlaceholder,readonly:u.widget.options.readonly,disabled:u.elementDisabled,editable:u.widget.options.editable,clearable:u.widget.options.clearable,arrowControl:u.widget.options.arrowControl,"value-format":u.widget.options.format},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-time-picker",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"date"==u.widget.type?[u.printRead?[u._v("\n "+u._s("dates"==u.widget.options.type?null===(e=u.dataModel)||void 0===e?void 0:e.join("、"):"object"==Object(o.a)(u.dataModel)?u.dataModel.join(" ~ "):u.dataModel)+"\n ")]:[d("el-date-picker",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{type:u.widget.options.type,placeholder:u.$t(u.widget.options.placeholder),"start-placeholder":u.widget.options.startPlaceholder,"end-placeholder":u.widget.options.endPlaceholder,readonly:u.widget.options.readonly,disabled:u.elementDisabled,editable:u.widget.options.editable,clearable:u.widget.options.clearable,"value-format":u.widget.options.timestamp?"timestamp":u.widget.options.format,format:u.widget.options.format},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-date-picker",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"rate"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-rate",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width,display:"inline-block"},attrs:{max:u.widget.options.max,disabled:u.elementDisabled,"allow-half":u.widget.options.allowHalf,"show-score":u.widget.options.showScore},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-rate",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"color"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-color-picker",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,"show-alpha":u.widget.options.showAlpha},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-color-picker",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"select"==u.widget.type?[u.printRead?[u.widget.options.remote?[u._v("\n "+u._s("object"==Object(o.a)(u.dataModel)?u.dataModel.map((function(e){return u.remoteOptions.find((function(t){return t.value==e}))&&u.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):u.remoteOptions.find((function(e){return e.value==u.dataModel}))&&u.remoteOptions.find((function(e){return e.value==u.dataModel})).label)+"\n ")]:[u._v("\n "+u._s(u.widget.options.showLabel?"object"==Object(o.a)(u.dataModel)?u.dataModel.map((function(e){return u.remoteOptions.find((function(t){return t.value==e}))&&u.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):u.remoteOptions.find((function(e){return e.value==u.dataModel}))&&u.remoteOptions.find((function(e){return e.value==u.dataModel})).label:"object"==Object(o.a)(u.dataModel)?u.dataModel.join("、"):u.dataModel)+"\n ")]]:[d("el-select",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,multiple:u.widget.options.multiple,clearable:u.widget.options.clearable,placeholder:u.$t(u.widget.options.placeholder),filterable:u.widget.options.filterable},on:{focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-select",s(s({},u.widget.options.customProps),u.extendProps),!1),u._l(u.remoteOptions,(function(e){return d("el-option",{key:e.value,attrs:{value:e.value,label:u.$t(u.widget.options.showLabel||u.widget.options.remote?e.label:e.value)}})})),1)]]:u._e(),"switch"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-switch",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-switch",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"slider"==u.widget.type?[u.printRead?[u._v("\n "+u._s(u.dataModel)+"\n ")]:[d("el-slider",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{min:u.widget.options.min,max:u.widget.options.max,disabled:u.elementDisabled,step:u.widget.options.step,"show-input":u.widget.options.showInput,range:u.widget.options.range},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-slider",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"imgupload"==u.widget.type?[d("fm-upload",{ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,readonly:u.widget.options.readonly||u.printRead,width:u.widget.options.size.width,height:u.widget.options.size.height,token:u.remoteToken,domain:u.widget.options.domain,multiple:u.widget.options.multiple,limit:u.widget.options.limit,"is-qiniu":u.widget.options.isQiniu,"is-delete":u.widget.options.isDelete,min:u.widget.options.min,"is-edit":u.widget.options.isEdit,action:u.widget.options.action,headers:u.widget.options.headers||[],withCredentials:u.widget.options.withCredentials,"print-read":u.printRead,"on-select":u.handleOnUploadSelect},on:{"on-upload-success":u.handleOnUploadSuccess,"on-upload-error":u.handleOnUploadError,"on-upload-remove":u.handleOnUploadRemove,"on-upload-progress":u.handleOnUploadProgress},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"editor"==u.widget.type?[u.printRead?[d("div",{staticClass:"ql-editor",domProps:{innerHTML:u._s(u.dataModel)}})]:[d("fm-editor",{ref:"fm-"+u.widget.model,attrs:{sty:{width:u.isTable?"100%":u.widget.options.width,cursor:u.elementDisabled?"no-drop":"",backgroundColor:u.elementDisabled?"#F5F7FA":""},toolbar:u.widget.options.customToolbar,disabled:u.elementDisabled,readonly:!0},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]]:u._e(),"cascader"==u.widget.type?[u.printRead?[(u.widget.options.remote,[u._v("\n "+u._s(u.widget.options.multiple?u.dataModel.map((function(e){return u.getCascaderText(Object(r.a)(e),u.remoteOptions).join(" / ")})).join("、"):u.getCascaderText(Object(r.a)(u.dataModel),u.remoteOptions).join(" / "))+"\n ")])]:[d("el-cascader",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,clearable:u.widget.options.clearable,placeholder:u.$t(u.widget.options.placeholder),options:u.remoteOptions,props:s({multiple:u.widget.options.multiple,checkStrictly:u.widget.options.checkStrictly},null!==(t=u.extendProps.props)&&void 0!==t?t:{}),"collapse-tags":"",filterable:u.widget.options.filterable},on:{change:u.onCascaderChange,focus:u.handleOnFocus,blur:u.handleOnBlur},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}},"el-cascader",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"text"==u.widget.type?[d("span",{ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width||"100%",display:"inline-block"}},[u._v(u._s(u.dataModel))])]:u._e(),"html"==u.widget.type?[d("span",{ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width||"100%",display:"inline-block"},domProps:{innerHTML:u._s(u.dataModel)}})]:u._e(),"table"==u.widget.type?[d("fm-form-table",{ref:"fm-"+u.widget.model,attrs:{columns:u.widget.tableColumns,models:u.dataModels,remote:u.remote,blanks:u.blanks,disableddata:u.elementDisabled||u.printRead,rules:u.rules,name:u.widget.model,"remote-option":u.remoteOption,preview:u.preview,platform:u.platform,"data-source-value":u.dataSourceValue,"event-function":u.eventFunction,widget:u.widget,"print-read":u.printRead,paging:u.widget.options.paging,"page-size":u.widget.options.pageSize,"container-key":u.containerKey,"is-delete":null===(n=u.widget.options.isDelete)||void 0===n||n,"is-add":null===(i=u.widget.options.isAdd)||void 0===i||i,"show-control":null===(a=u.widget.options.showControl)||void 0===a||a,"is-dialog":u.isDialog,"dialog-name":u.dialogName,"is-group":u.isGroup,group:u.group,"field-node":u.fieldNode},scopedSlots:u._u([u._l(u.blanks,(function(e){return{key:e.name,fn:function(t){return[u._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"subform"==u.widget.type?[d("fm-sub-form",{ref:"fm-"+u.widget.model,attrs:{list:u.widget.list,models:u.dataModels,remote:u.remote,blanks:u.blanks,disableddata:u.elementDisabled||u.printRead,rules:u.rules,name:u.widget.model,"remote-option":u.remoteOption,preview:u.preview,platform:u.platform,"data-source-value":u.dataSourceValue,"event-function":u.eventFunction,widget:u.widget,"print-read":u.printRead,paging:u.widget.options.paging,"page-size":u.widget.options.pageSize,"show-control":u.widget.options.showControl,"is-delete":null===(l=u.widget.options.isDelete)||void 0===l||l,"is-add":null===(c=u.widget.options.isAdd)||void 0===c||c,"is-dialog":u.isDialog,"dialog-name":u.dialogName,"is-group":u.isGroup,group:u.group,"field-node":u.fieldNode,"container-key":u.containerKey},scopedSlots:u._u([u._l(u.blanks,(function(e){return{key:e.name,fn:function(t){return[u._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"group"==u.widget.type?[d("fm-group",{ref:"fm-"+u.widget.model,attrs:{rules:u.rules,element:u.widget,remote:u.remote,blanks:u.blanks,edit:!u.elementDisabled,"remote-option":u.remoteOption,platform:u.platform,preview:u.preview,"container-key":u.containerKey,"data-source-value":u.dataSourceValue,"event-function":u.eventFunction,"print-read":u.printRead,"is-group":u.isGroup,group:u.group,"field-node":u.fieldNode},scopedSlots:u._u([u._l(u.blanks,(function(e){return{key:e.name,fn:function(t){return[u._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"fileupload"==u.widget.type?[d("fm-file-upload",{ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{disabled:u.elementDisabled,token:u.remoteToken,domain:u.widget.options.domain,multiple:u.widget.options.multiple,limit:u.widget.options.limit,"is-qiniu":u.widget.options.isQiniu,min:u.widget.options.min,action:u.widget.options.action,headers:u.widget.options.headers||[],withCredentials:u.widget.options.withCredentials,"print-read":u.printRead,accept:u.widget.options.accept,"on-select":u.handleOnUploadSelect},on:{"on-upload-success":u.handleOnUploadSuccess,"on-upload-error":u.handleOnUploadError,"on-upload-remove":u.handleOnUploadRemove,"on-upload-progress":u.handleOnUploadProgress},model:{value:u.dataModel,callback:function(e){u.dataModel=e},expression:"dataModel"}})]:u._e(),"button"==u.widget.type?[d("el-button",u._b({ref:"fm-"+u.widget.model,style:{width:u.widget.options.width,"vertical-align":"top"},attrs:{disabled:u.elementDisabled,type:u.widget.options.buttonType,plain:u.widget.options.buttonPlain,round:u.widget.options.buttonRound,circle:u.widget.options.buttonCircle},on:{click:u.handleOnClick}},"el-button",s(s({},u.widget.options.customProps),u.extendProps),!1),[u._v(u._s(u.$t(u.widget.options.buttonName))+"\n ")])]:u._e(),"link"==u.widget.type?[d("el-link",u._b({ref:"fm-"+u.widget.model,attrs:{disabled:u.elementDisabled,type:u.widget.options.linkType,underline:u.widget.options.underline,href:u.widget.options.href,target:u.widget.options.blank?"_blank":"_self"},on:{click:u.handleOnClick}},"el-link",s(s({},u.widget.options.customProps),u.extendProps),!1),[u._v("\n "+u._s(u.$t(u.widget.options.linkName))+"\n ")])]:u._e(),"steps"==u.widget.type?[d("el-steps",u._b({ref:"fm-"+u.widget.model,style:{"line-height":"normal"},attrs:{active:u.dataModel,space:u.widget.options.space,direction:u.widget.options.direction,"process-status":u.widget.options.processStatus,"finish-status":u.widget.options.finishStatus,"align-center":u.widget.options.alignCenter,simple:u.widget.options.simple}},"el-steps",s(s({},u.widget.options.customProps),u.extendProps),!1),u._l(u.remoteOptions,(function(e,t){return d("el-step",{key:t,attrs:{title:u.$t(e.title),description:u.$t(e.description)}})})),1)]:u._e(),"pagination"==u.widget.type?[u.printRead?[u._v("\n Page "+u._s(u.dataModel)+"\n ")]:[d("el-pagination",u._b({ref:"fm-"+u.widget.model,attrs:{"current-page":u.dataModel,"page-size":u.widget.options.pageSize,"pager-count":u.widget.options.pagerCount,disabled:u.widget.options.disabled,background:u.widget.options.background,layout:"total, prev, pager, next",total:u.widget.options.total},on:{"update:currentPage":function(e){u.dataModel=e},"update:current-page":function(e){u.dataModel=e}}},"el-pagination",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e(),"transfer"==u.widget.type?[u.printRead?[u.widget.options.remote?[u._v("\n "+u._s(u.dataModel.map((function(e){var t;return null===(t=u.widget.options.remoteOptions.find((function(t){return t[u.widget.options.props.key]==e})))||void 0===t?void 0:t[u.widget.options.props.label]})).join("、"))+"\n ")]:[u._v("\n "+u._s(u.dataModel.map((function(e){var t;return null===(t=u.remoteOptions.find((function(t){return t[u.propsTransfer.key]==e})))||void 0===t?void 0:t[u.propsTransfer.label]})).join("、"))+"\n ")]]:[d("el-transfer",u._b({ref:"fm-"+u.widget.model,style:{width:u.isTable?"100%":u.widget.options.width},attrs:{value:u.dataModel,disabled:u.elementDisabled,data:u.remoteOptions,filterable:u.widget.options.filterable,props:u.propsTransfer,titles:u.widget.options.titles},on:{change:u.handleTransferChange}},"el-transfer",s(s({},u.widget.options.customProps),u.extendProps),!1))]]:u._e()],2)}),[],!1,null,null,null).exports},props:["widget","models","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup","isTable","isMobile","tableName"],data:function(){return{dataModel:Object.keys(this.models).includes(this.widget.model)?this.models[this.widget.model]:p.a.cloneDeep(this.widget.options.defaultValue),dataModels:this.models}},computed:{ruleProp:function(){var e=this.widget.model;return this.group&&(e=this.group+"."+e),e},currentOptions:function(){var e,t;return this.isTable||this.isSubform?{value:this.dataModel,fieldNode:this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,currentRef:null===(e=this.$refs.generateElementItem)||void 0===e?void 0:e.$refs["fm-".concat(this.widget.model)],rowIndex:this.rowIndex,row:p.a.cloneDeep(this.models),field:this.widget.model,group:this.group}:{value:this.dataModel,fieldNode:this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,currentRef:null===(t=this.$refs.generateElementItem)||void 0===t?void 0:t.$refs["fm-".concat(this.widget.model)],field:this.widget.model,group:this.group}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,t=this.group?this.group+"."+this.widget.model:this.widget.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.widget.options.hidden?!this.widget.options.hidden:!Object(S.c)(this.widget.options.hidden)||!Object(S.a)(Object(S.b)(this.widget.options.hidden),this.currentOptions,this.formContext)},groupNode:function(){return this.group?this.group+"."+this.widget.model:this.widget.model},elementNode:function(){return this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model}},inject:{setSubformData:{default:function(){}},setDialogData:{default:function(){}},setGroupData:{default:function(){}},setTableData:{default:function(){}},onChange:{default:function(){}},dynamicValueData:{default:[]},formContext:{default:{}},dynamicHideFields:{default:{}},generateFormItemContext:{default:function(){}},deleteFormItemContext:{default:function(){}},sendRequest:{default:function(){}}},created:function(){this.refreshDynamicValue()},mounted:function(){this.generateFormItemContext(this.elementNode,this)},beforeDestroy:function(){this.deleteFormItemContext(this.elementNode)},methods:{getTip:function(e){var t=this;return e.split("\n").map((function(e){return t.$t(e)})).join("<br/>")},refreshDynamicValue:function(e){var t=this;return new Promise((function(n,i){if(t.widget.options.isDynamicValue&&"datasource"==t.widget.options.dynamicValueType&&t.widget.options.dynamicValueDataSource){var r=t.group?t.group+"."+t.widget.model+"."+t.widget.options.dynamicValueDataSource:t.widget.model+"."+t.widget.options.dynamicValueDataSource,a=M({},t.widget.options.dynamicValueArgs);for(var s in a)Object(S.c)(a[s])&&(a[s]=Object(S.a)(Object(S.b)(a[s]),t.currentOptions,t.formContext));e&&"object"===Object(o.a)(e)&&(a=M(M({},a),e));var l=t.dynamicValueData.find((function(e){return e.key===r&&p.a.isEqual(e.args,a)}));if(l)if(t.widget.options.dynamicValueStruct)try{t.dataModel=new Function("data","return data.".concat(t.widget.options.dynamicValueStruct))(l.value),n(t.dataModel)}catch(e){i(e)}else t.dataModel=l.value,n(t.dataModel);else t.sendRequest(t.widget.options.dynamicValueDataSource,a).then((function(e){if(t.widget.options.dynamicValueStruct)try{t.dataModel=new Function("data","return data.".concat(t.widget.options.dynamicValueStruct))(e),n(t.dataModel)}catch(e){i(e)}else t.dataModel=e,n(t.dataModel)}))}if(t.widget.options.isDynamicValue&&"fx"==t.widget.options.dynamicValueType&&t.widget.options.dynamicValueFx){var c=Object(S.a)(t.widget.options.dynamicValueFx,t.currentOptions,t.formContext);null!==c&&t.$nextTick((function(){t.dataModel=c})),n(c)}}))}},watch:{dataModel:{deep:!0,handler:function(e,t){var n=this;if(JSON.stringify(e)==JSON.stringify(t))return!1;this.isTable?this.setTableData(e,this.rowIndex,this.widget.model):this.isSubform?this.setSubformData(e,this.rowIndex,this.widget.model):this.isDialog?this.setDialogData(e,this.widget.model):this.isGroup?this.setGroupData(e,this.widget.model):this.onChange(e,this.widget.model),this.$nextTick((function(){if(n.eventFunction.onFormChange&&n.eventFunction.onFormChange(n.currentOptions),n.widget.events&&n.widget.events.onChange){var e=n.widget.events.onChange;n.eventFunction[e](n.currentOptions)}}))}},models:{deep:!0,handler:function(e){this.dataModels=e,this.dataModel=Object.keys(e).includes(this.widget.model)?e[this.widget.model]:p.a.cloneDeep(this.widget.options.defaultValue)}}}},T=Object(y.a)(F,(function(){var e=this,t=e._self._c;return e.widget.key?t("div",{staticClass:"fm-form-item",attrs:{"data-id":e.widget.model}},["divider"!=e.widget.type&&"alert"!=e.widget.type&&e.elementDisplay?t("el-form-item",{key:e.widget.key,ref:"generateFormItem",class:Object(i.a)(Object(i.a)(Object(i.a)({},e.widget.options&&e.widget.options.customClass,!(!e.widget.options||!e.widget.options.customClass)),"no-label-form-item",e.widget.options.isLabelWidth&&0==e.widget.options.labelWidth),"fm-label-wrap",e.widget.options.labelWrap),attrs:{prop:e.fieldNode?e.fieldNode+"."+e.widget.model:e.widget.model,rules:e.rules[e.ruleProp],label:e.widget.options.hideLabel||e.isTable&&!e.isMobile?"":e.$t(e.widget.name),"label-width":e.widget.options.hideLabel?"0px":e.widget.options.isLabelWidth?e.widget.options.labelWidth+"px":"",required:e.widget.options.required}},[e.widget.options.tip?t("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:e._s(e.getTip(e.widget.options.tip))}}):e._e(),t("generate-element-item",{key:e.widget.key,ref:"generateElementItem",attrs:{blanks:e.blanks,"is-table":e.isTable,"table-name":e.tableName,widget:e.widget,models:e.dataModels,remote:e.remote,edit:e.edit,"remote-option":e.remoteOption,rules:e.rules,platform:e.platform,preview:e.preview,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"container-key":e.containerKey,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode?e.fieldNode+"."+e.widget.model:e.widget.model},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0),model:{value:e.dataModel,callback:function(t){e.dataModel=t},expression:"dataModel"}})],1):e._e(),"divider"==e.widget.type&&e.elementDisplay?t("el-form-item",{attrs:{"label-width":"0"}},[t("el-divider",e._b({ref:"fm-"+e.widget.model,attrs:{"content-position":e.widget.options.contentPosition}},"el-divider",e.widget.options.customProps,!1),[e._v("\n "+e._s(e.$t(e.widget.name))+"\n ")])],1):e._e(),"alert"==e.widget.type&&e.elementDisplay?t("el-form-item",{attrs:{"label-width":"0"}},[t("el-alert",e._b({ref:"fm-"+e.widget.model,style:{width:e.widget.options.width},attrs:{title:e.$t(e.widget.options.title),type:e.widget.options.type,description:e.$t(e.widget.options.description),closable:e.widget.options.closable,center:e.widget.options.center,"show-icon":e.widget.options.showIcon,effect:e.widget.options.effect}},"el-alert",e.widget.options.customProps,!1))],1):e._e()],1):e._e()}),[],!1,null,null,null);t.default=T.exports},5537:function(e,t,n){var i=n("8378"),o=n("7726"),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:i.version,mode:n("2d00")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},5559:function(e,t,n){var i=n("dbdb")("keys"),o=n("62a0");e.exports=function(e){return i[e]||(i[e]=o(e))}},"56b3":function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),i=/MSIE \d/.test(e),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),r=/Edge\/(\d+)/.exec(e),a=i||o||r,s=a&&(i?document.documentMode||6:+(r||o)[1]),l=!r&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!r&&/Chrome\/(\d+)/.exec(e),d=u&&+u[1],f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),g=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),b=/Android/.test(e),v=g||b||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),_=/\bCrOS\b/.test(e),w=/win/i.test(t),x=f&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(f=!1,l=!0);var k=y&&(c||f&&(null==x||x<12.11)),O=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,D=function(e,t){var n=e.className,i=C(t).exec(n);if(i){var o=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(o?i[1]+o:"")}};function P(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return P(e).appendChild(t)}function j(e,t,n,i){var o=document.createElement(e);if(n&&(o.className=n),i&&(o.style.cssText=i),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var r=0;r<t.length;++r)o.appendChild(t[r]);return o}function M(e,t,n,i){var o=j(e,t,n,i);return o.setAttribute("role","presentation"),o}function F(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function T(e){var t,n=e.ownerDocument||e;try{t=e.activeElement}catch(e){t=n.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function I(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function $(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]&&!C(n[i]).test(t)&&(t+=" "+n[i]);return t}S=document.createRange?function(e,t,n,i){var o=document.createRange();return o.setEnd(i||e,n),o.setStart(e,t),o}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(e){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i};var R=function(e){e.select()};function A(e){return e.display.wrapper.ownerDocument}function L(e){return N(e.display.wrapper)}function N(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function W(e){return A(e).defaultView}function V(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,n){for(var i in t||(t={}),e)!e.hasOwnProperty(i)||!1===n&&t.hasOwnProperty(i)||(t[i]=e[i]);return t}function B(e,t,n,i,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var r=i||0,a=o||0;;){var s=e.indexOf("\t",r);if(s<0||s>=t)return a+(t-r);a+=s-r,a+=n-a%n,r=s+1}}g?R=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(R=function(e){try{e.select()}catch(e){}});var K=function(){this.id=null,this.f=null,this.time=0,this.handler=V(this.onTimeout,this)};function U(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}K.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},K.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var H={toString:function(){return"CodeMirror.Pass"}},G={scroll:!1},q={origin:"*mouse"},X={origin:"+move"};function J(e,t,n){for(var i=0,o=0;;){var r=e.indexOf("\t",i);-1==r&&(r=e.length);var a=r-i;if(r==e.length||o+a>=t)return i+Math.min(a,t-o);if(o+=r-i,i=r+1,(o+=n-o%n)>=t)return i}}var Y=[""];function Q(e){for(;Y.length<=e;)Y.push(Z(Y)+" ");return Y[e]}function Z(e){return e[e.length-1]}function ee(e,t){for(var n=[],i=0;i<e.length;i++)n[i]=t(e[i],i);return n}function te(){}function ne(e,t){var n;return Object.create?n=Object.create(e):(te.prototype=e,n=new te),t&&z(t,n),n}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function oe(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||ie.test(e))}function re(e,t){return t?!!(t.source.indexOf("\\w")>-1&&oe(e))||t.test(e):oe(e)}function ae(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var se=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function le(e){return e.charCodeAt(0)>=768&&se.test(e)}function ce(e,t,n){for(;(n<0?t>0:t<e.length)&&le(e.charAt(t));)t+=n;return t}function ue(e,t,n){for(var i=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,r=i<0?Math.ceil(o):Math.floor(o);if(r==t)return e(r)?t:n;e(r)?n=r:t=r+i}}var de=null;function fe(e,t,n){var i;de=null;for(var o=0;o<e.length;++o){var r=e[o];if(r.from<t&&r.to>t)return o;r.to==t&&(r.from!=r.to&&"before"==n?i=o:de=o),r.from==t&&(r.from!=r.to&&"before"!=n?i=o:de=o)}return null!=i?i:de}var pe=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,i=/[Lb1n]/,o=/[1n]/;function r(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c,u=a.length,d=[],f=0;f<u;++f)d.push((c=a.charCodeAt(f))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var p=0,m=l;p<u;++p){var h=d[p];"m"==h?d[p]=m:m=h}for(var g=0,b=l;g<u;++g){var v=d[g];"1"==v&&"r"==b?d[g]="n":n.test(v)&&(b=v,"r"==v&&(d[g]="R"))}for(var y=1,_=d[0];y<u-1;++y){var w=d[y];"+"==w&&"1"==_&&"1"==d[y+1]?d[y]="1":","!=w||_!=d[y+1]||"1"!=_&&"n"!=_||(d[y]=_),_=w}for(var x=0;x<u;++x){var k=d[x];if(","==k)d[x]="N";else if("%"==k){var O=void 0;for(O=x+1;O<u&&"%"==d[O];++O);for(var C=x&&"!"==d[x-1]||O<u&&"1"==d[O]?"1":"N",S=x;S<O;++S)d[S]=C;x=O-1}}for(var D=0,P=l;D<u;++D){var E=d[D];"L"==P&&"1"==E?d[D]="L":n.test(E)&&(P=E)}for(var j=0;j<u;++j)if(t.test(d[j])){var M=void 0;for(M=j+1;M<u&&t.test(d[M]);++M);for(var F="L"==(j?d[j-1]:l),T=F==("L"==(M<u?d[M]:l))?F?"L":"R":l,I=j;I<M;++I)d[I]=T;j=M-1}for(var $,R=[],A=0;A<u;)if(i.test(d[A])){var L=A;for(++A;A<u&&i.test(d[A]);++A);R.push(new r(0,L,A))}else{var N=A,W=R.length,V="rtl"==s?1:0;for(++A;A<u&&"L"!=d[A];++A);for(var z=N;z<A;)if(o.test(d[z])){N<z&&(R.splice(W,0,new r(1,N,z)),W+=V);var B=z;for(++z;z<A&&o.test(d[z]);++z);R.splice(W,0,new r(2,B,z)),W+=V,N=z}else++z;N<A&&R.splice(W,0,new r(1,N,A))}return"ltr"==s&&(1==R[0].level&&($=a.match(/^\s+/))&&(R[0].from=$[0].length,R.unshift(new r(0,0,$[0].length))),1==Z(R).level&&($=a.match(/\s+$/))&&(Z(R).to-=$[0].length,R.push(new r(0,u-$[0].length,u)))),"rtl"==s?R.reverse():R}}();function me(e,t){var n=e.order;return null==n&&(n=e.order=pe(e.text,t)),n}var he=[],ge=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var i=e._handlers||(e._handlers={});i[t]=(i[t]||he).concat(n)}};function be(e,t){return e._handlers&&e._handlers[t]||he}function ve(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var i=e._handlers,o=i&&i[t];if(o){var r=U(o,n);r>-1&&(i[t]=o.slice(0,r).concat(o.slice(r+1)))}}}function ye(e,t){var n=be(e,t);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,i)}function _e(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ye(e,n||t.type,e,t),Se(t)||t.codemirrorIgnore}function we(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)-1==U(n,t[i])&&n.push(t[i])}function xe(e,t){return be(e,t).length>0}function ke(e){e.prototype.on=function(e,t){ge(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function Oe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ce(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function De(e){Oe(e),Ce(e)}function Pe(e){return e.target||e.srcElement}function Ee(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var je,Me,Fe=function(){if(a&&s<9)return!1;var e=j("div");return"draggable"in e||"dragDrop"in e}();function Te(e){if(null==je){var t=j("span","");E(e,j("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(je=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=je?j("span",""):j("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ie(e){if(null!=Me)return Me;var t=E(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),i=S(t,1,2).getBoundingClientRect();return P(e),!(!n||n.left==n.right)&&(Me=i.right-n.right<3)}var $e,Re=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;t<=i;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var r=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=r.indexOf("\r");-1!=a?(n.push(r.slice(0,a)),t+=a+1):(n.push(r),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ae=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Le="oncopy"in($e=j("div"))||($e.setAttribute("oncopy","return;"),"function"==typeof $e.oncopy),Ne=null,We={},Ve={};function ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),We[e]=t}function Be(e){if("string"==typeof e&&Ve.hasOwnProperty(e))e=Ve[e];else if(e&&"string"==typeof e.name&&Ve.hasOwnProperty(e.name)){var t=Ve[e.name];"string"==typeof t&&(t={name:t}),(e=ne(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Be("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Be("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ke(e,t){t=Be(t);var n=We[t.name];if(!n)return Ke(e,"text/plain");var i=n(e,t);if(Ue.hasOwnProperty(t.name)){var o=Ue[t.name];for(var r in o)o.hasOwnProperty(r)&&(i.hasOwnProperty(r)&&(i["_"+r]=i[r]),i[r]=o[r])}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)i[a]=t.modeProps[a];return i}var Ue={};function He(e,t){z(t,Ue.hasOwnProperty(e)?Ue[e]:Ue[e]={})}function Ge(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var o=t[i];o instanceof Array&&(o=o.concat([])),n[i]=o}return n}function qe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Xe(e,t,n){return!e.startState||e.startState(t,n)}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ye(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var o=n.children[i],r=o.chunkSize();if(t<r){n=o;break}t-=r}return n.lines[t]}function Qe(e,t,n){var i=[],o=t.line;return e.iter(t.line,n.line+1,(function(e){var r=e.text;o==n.line&&(r=r.slice(0,n.ch)),o==t.line&&(r=r.slice(t.ch)),i.push(r),++o})),i}function Ze(e,t,n){var i=[];return e.iter(t,n,(function(e){i.push(e.text)})),i}function et(e,t){var n=t-e.height;if(n)for(var i=e;i;i=i.parent)i.height+=n}function tt(e){if(null==e.parent)return null;for(var t=e.parent,n=U(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var o=0;i.children[o]!=t;++o)n+=i.children[o].chunkSize();return n+t.first}function nt(e,t){var n=e.first;e:do{for(var i=0;i<e.children.length;++i){var o=e.children[i],r=o.height;if(t<r){e=o;continue e}t-=r,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function it(e,t){return t>=e.first&&t<e.first+e.size}function ot(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function rt(e,t,n){if(void 0===n&&(n=null),!(this instanceof rt))return new rt(e,t,n);this.line=e,this.ch=t,this.sticky=n}function at(e,t){return e.line-t.line||e.ch-t.ch}function st(e,t){return e.sticky==t.sticky&&0==at(e,t)}function lt(e){return rt(e.line,e.ch)}function ct(e,t){return at(e,t)<0?t:e}function ut(e,t){return at(e,t)<0?e:t}function dt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ft(e,t){if(t.line<e.first)return rt(e.first,0);var n=e.first+e.size-1;return t.line>n?rt(n,Ye(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?rt(e.line,t):n<0?rt(e.line,0):e}(t,Ye(e,t.line).text.length)}function pt(e,t){for(var n=[],i=0;i<t.length;i++)n[i]=ft(e,t[i]);return n}Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=B(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var mt=function(e,t){this.state=e,this.lookAhead=t},ht=function(e,t,n,i){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,n,i){var o=[e.state.modeGen],r={};Ct(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),r,i);for(var a=n.state,s=function(i){n.baseTokens=o;var s=e.state.overlays[i],l=1,c=0;n.state=!0,Ct(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var i=o[l];i>e&&o.splice(l,1,e,o[l+1],i),l+=2,c=Math.min(e,i)}if(t)if(s.opaque)o.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var r=o[n+1];o[n+1]=(r?r+" ":"")+"overlay "+t}}),r),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:o,classes:r.bgClass||r.textClass?r:null}}function bt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=vt(e,tt(t)),o=t.text.length>e.options.maxHighlightLength&&Ge(e.doc.mode,i.state),r=gt(e,t,i);o&&(i.state=o),t.stateAfter=i.save(!o),t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function vt(e,t,n){var i=e.doc,o=e.display;if(!i.mode.startState)return new ht(i,!0,t);var r=function(e,t,n){for(var i,o,r=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=r.first)return r.first;var l=Ye(r,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof mt?c.lookAhead:0)<=r.modeFrontier))return s;var u=B(l.text,null,e.options.tabSize);(null==o||i>u)&&(o=s-1,i=u)}return o}(e,t,n),a=r>i.first&&Ye(i,r-1).stateAfter,s=a?ht.fromSaved(i,a,r):new ht(i,Xe(i.mode),r);return i.iter(r,t,(function(n){yt(e,n.text,s);var i=s.line;n.stateAfter=i==t-1||i%5==0||i>=o.viewFrom&&i<o.viewTo?s.save():null,s.nextLine()})),n&&(i.modeFrontier=s.line),s}function yt(e,t,n,i){var o=e.doc.mode,r=new Je(t,e.options.tabSize,n);for(r.start=r.pos=i||0,""==t&&_t(o,n.state);!r.eol();)wt(o,r,n.state),r.start=r.pos}function _t(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=qe(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function wt(e,t,n,i){for(var o=0;o<10;o++){i&&(i[0]=qe(e,n).mode);var r=e.token(t,n);if(t.pos>t.start)return r}throw new Error("Mode "+e.name+" failed to advance stream.")}ht.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ht.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ht.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ht.fromSaved=function(e,t,n){return t instanceof mt?new ht(e,Ge(e.mode,t.state),n,t.lookAhead):new ht(e,Ge(e.mode,t),n)},ht.prototype.save=function(e){var t=!1!==e?Ge(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mt(t,this.maxLookAhead):t};var xt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function kt(e,t,n,i){var o,r,a=e.doc,s=a.mode,l=Ye(a,(t=ft(a,t)).line),c=vt(e,t.line,n),u=new Je(l.text,e.options.tabSize,c);for(i&&(r=[]);(i||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=wt(s,u,c.state),i&&r.push(new xt(u,o,Ge(a.mode,c.state)));return i?r:new xt(u,o,c.state)}function Ot(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==t[i]?t[i]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[i])||(t[i]+=" "+n[2])}return e}function Ct(e,t,n,i,o,r,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,d=new Je(t,e.options.tabSize,i),f=e.options.addModeClass&&[null];for(""==t&&Ot(_t(n,i.state),r);!d.eol();){if(d.pos>e.options.maxHighlightLength?(s=!1,a&&yt(e,t,i,d.pos),d.pos=t.length,l=null):l=Ot(wt(n,d,i.state,f),r),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;c<d.start;)o(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var m=Math.min(d.pos,c+5e3);o(m,u),c=m}}var St=!1,Dt=!1;function Pt(e,t,n){this.marker=e,this.from=t,this.to=n}function Et(e,t){if(e)for(var n=0;n<e.length;++n){var i=e[n];if(i.marker==t)return i}}function jt(e,t){for(var n,i=0;i<e.length;++i)e[i]!=t&&(n||(n=[])).push(e[i]);return n}function Mt(e,t){if(t.full)return null;var n=it(e,t.from.line)&&Ye(e,t.from.line).markedSpans,i=it(e,t.to.line)&&Ye(e,t.to.line).markedSpans;if(!n&&!i)return null;var o=t.from.ch,r=t.to.ch,a=0==at(t.from,t.to),s=function(e,t,n){var i;if(e)for(var o=0;o<e.length;++o){var r=e[o],a=r.marker;if(null==r.from||(a.inclusiveLeft?r.from<=t:r.from<t)||r.from==t&&"bookmark"==a.type&&(!n||!r.marker.insertLeft)){var s=null==r.to||(a.inclusiveRight?r.to>=t:r.to>t);(i||(i=[])).push(new Pt(a,r.from,s?null:r.to))}}return i}(n,o,a),l=function(e,t,n){var i;if(e)for(var o=0;o<e.length;++o){var r=e[o],a=r.marker;if(null==r.to||(a.inclusiveRight?r.to>=t:r.to>t)||r.from==t&&"bookmark"==a.type&&(!n||r.marker.insertLeft)){var s=null==r.from||(a.inclusiveLeft?r.from<=t:r.from<t);(i||(i=[])).push(new Pt(a,s?null:r.from-t,null==r.to?null:r.to-t))}}return i}(i,r,a),c=1==t.text.length,u=Z(t.text).length+(c?o:0);if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null==f.to){var p=Et(l,f.marker);p?c&&(f.to=null==p.to?null:p.to+u):f.to=o}}if(l)for(var m=0;m<l.length;++m){var h=l[m];null!=h.to&&(h.to+=u),null==h.from?Et(s,h.marker)||(h.from=u,c&&(s||(s=[])).push(h)):(h.from+=u,c&&(s||(s=[])).push(h))}s&&(s=Ft(s)),l&&l!=s&&(l=Ft(l));var g=[s];if(!c){var b,v=t.text.length-2;if(v>0&&s)for(var y=0;y<s.length;++y)null==s[y].to&&(b||(b=[])).push(new Pt(s[y].marker,null,null));for(var _=0;_<v;++_)g.push(b);g.push(l)}return g}function Ft(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Tt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function It(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function $t(e){return e.inclusiveLeft?-1:0}function Rt(e){return e.inclusiveRight?1:0}function At(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var i=e.find(),o=t.find(),r=at(i.from,o.from)||$t(e)-$t(t);if(r)return-r;var a=at(i.to,o.to)||Rt(e)-Rt(t);return a||t.id-e.id}function Lt(e,t){var n,i=Dt&&e.markedSpans;if(i)for(var o=void 0,r=0;r<i.length;++r)(o=i[r]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||At(n,o.marker)<0)&&(n=o.marker);return n}function Nt(e){return Lt(e,!0)}function Wt(e){return Lt(e,!1)}function Vt(e,t){var n,i=Dt&&e.markedSpans;if(i)for(var o=0;o<i.length;++o){var r=i[o];r.marker.collapsed&&(null==r.from||r.from<t)&&(null==r.to||r.to>t)&&(!n||At(n,r.marker)<0)&&(n=r.marker)}return n}function zt(e,t,n,i,o){var r=Ye(e,t),a=Dt&&r.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=at(c.from,n)||$t(l.marker)-$t(o),d=at(c.to,i)||Rt(l.marker)-Rt(o);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?at(c.to,n)>=0:at(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?at(c.from,i)<=0:at(c.from,i)<0)))return!0}}}function Bt(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Kt(e,t){var n=Ye(e,t),i=Bt(n);return n==i?t:tt(i)}function Ut(e,t){if(t>e.lastLine())return t;var n,i=Ye(e,t);if(!Ht(e,i))return t;for(;n=Wt(i);)i=n.find(1,!0).line;return tt(i)+1}function Ht(e,t){var n=Dt&&t.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)if((i=n[o]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&Gt(e,t,i))return!0}}function Gt(e,t,n){if(null==n.to){var i=n.marker.find(1,!0);return Gt(e,i.line,Et(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,r=0;r<t.markedSpans.length;++r)if((o=t.markedSpans[r]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&Gt(e,t,o))return!0}function qt(e){for(var t=0,n=(e=Bt(e)).parent,i=0;i<n.lines.length;++i){var o=n.lines[i];if(o==e)break;t+=o.height}for(var r=n.parent;r;r=(n=r).parent)for(var a=0;a<r.children.length;++a){var s=r.children[a];if(s==n)break;t+=s.height}return t}function Xt(e){if(0==e.height)return 0;for(var t,n=e.text.length,i=e;t=Nt(i);){var o=t.find(0,!0);i=o.from.line,n+=o.from.ch-o.to.ch}for(i=e;t=Wt(i);){var r=t.find(0,!0);n-=i.text.length-r.from.ch,n+=(i=r.to.line).text.length-r.to.ch}return n}function Jt(e){var t=e.display,n=e.doc;t.maxLine=Ye(n,n.first),t.maxLineLength=Xt(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Xt(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Yt=function(e,t,n){this.text=e,It(this,t),this.height=n?n(this):1};function Qt(e){e.parent=null,Tt(e)}Yt.prototype.lineNo=function(){return tt(this)},ke(Yt);var Zt={},en={};function tn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?en:Zt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function nn(e,t){var n=M("span",null,null,l?"padding-right: .1px":null),i={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var r=o?t.rest[o-1]:t.line,a=void 0;i.pos=0,i.addToken=rn,Ie(e.display.measure)&&(a=me(r,e.doc.direction))&&(i.addToken=an(i.addToken,a)),i.map=[],ln(r,i,bt(e,r,t!=e.display.externalMeasured&&tt(r))),r.styleClasses&&(r.styleClasses.bgClass&&(i.bgClass=$(r.styleClasses.bgClass,i.bgClass||"")),r.styleClasses.textClass&&(i.textClass=$(r.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Te(e.display.measure))),0==o?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=i.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return ye(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=$(i.pre.className,i.textClass||"")),i}function on(e){var t=j("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function rn(e,t,n,i,o,r,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,i="",o=0;o<e.length;o++){var r=e.charAt(o);" "!=r||!n||o!=e.length-1&&32!=e.charCodeAt(o+1)||(r=" "),i+=r,n=" "==r}return i}(t,e.trailingSpace):t,d=e.cm.state.specialChars,f=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var m=d.exec(t),h=m?m.index-p:t.length-p;if(h){var g=document.createTextNode(u.slice(p,p+h));a&&s<9?c.appendChild(j("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+h,g),e.col+=h,e.pos+=h}if(!m)break;p+=h+1;var b=void 0;if("\t"==m[0]){var v=e.cm.options.tabSize,y=v-e.col%v;(b=c.appendChild(j("span",Q(y),"cm-tab"))).setAttribute("role","presentation"),b.setAttribute("cm-text","\t"),e.col+=y}else"\r"==m[0]||"\n"==m[0]?((b=c.appendChild(j("span","\r"==m[0]?"␍":"","cm-invalidchar"))).setAttribute("cm-text",m[0]),e.col+=1):((b=e.cm.options.specialCharPlaceholder(m[0])).setAttribute("cm-text",m[0]),a&&s<9?c.appendChild(j("span",[b])):c.appendChild(b),e.col+=1);e.map.push(e.pos,e.pos+1,b),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||i||o||f||r||l){var _=n||"";i&&(_+=i),o&&(_+=o);var w=j("span",[c],_,r);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&w.setAttribute(x,l[x]);return e.content.appendChild(w)}e.content.appendChild(c)}}function an(e,t){return function(n,i,o,r,a,s,l){o=o?o+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+i.length;;){for(var d=void 0,f=0;f<t.length&&!((d=t[f]).to>c&&d.from<=c);f++);if(d.to>=u)return e(n,i,o,r,a,s,l);e(n,i.slice(0,d.to-c),o,r,null,s,l),r=null,i=i.slice(d.to-c),c=d.to}}}function sn(e,t,n,i){var o=!i&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!i&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function ln(e,t,n){var i=e.markedSpans,o=e.text,r=0;if(i)for(var a,s,l,c,u,d,f,p=o.length,m=0,h=1,g="",b=0;;){if(b==m){l=c=u=s="",f=null,d=null,b=1/0;for(var v=[],y=void 0,_=0;_<i.length;++_){var w=i[_],x=w.marker;if("bookmark"==x.type&&w.from==m&&x.widgetNode)v.push(x);else if(w.from<=m&&(null==w.to||w.to>m||x.collapsed&&w.to==m&&w.from==m)){if(null!=w.to&&w.to!=m&&b>w.to&&(b=w.to,c=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==m&&(u+=" "+x.startStyle),x.endStyle&&w.to==b&&(y||(y=[])).push(x.endStyle,w.to),x.title&&((f||(f={})).title=x.title),x.attributes)for(var k in x.attributes)(f||(f={}))[k]=x.attributes[k];x.collapsed&&(!d||At(d.marker,x)<0)&&(d=w)}else w.from>m&&b>w.from&&(b=w.from)}if(y)for(var O=0;O<y.length;O+=2)y[O+1]==b&&(c+=" "+y[O]);if(!d||d.from==m)for(var C=0;C<v.length;++C)sn(t,0,v[C]);if(d&&(d.from||0)==m){if(sn(t,(null==d.to?p+1:d.to)-m,d.marker,null==d.from),null==d.to)return;d.to==m&&(d=!1)}}if(m>=p)break;for(var S=Math.min(p,b);;){if(g){var D=m+g.length;if(!d){var P=D>S?g.slice(0,S-m):g;t.addToken(t,P,a?a+l:l,u,m+P.length==b?c:"",s,f)}if(D>=S){g=g.slice(S-m),m=S;break}m=D,u=""}g=o.slice(r,r=n[h++]),a=tn(n[h++],t.cm.options)}}else for(var E=1;E<n.length;E+=2)t.addToken(t,o.slice(r,r=n[E]),tn(n[E+1],t.cm.options))}function cn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Wt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?tt(Z(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ht(e,t)}function un(e,t,n){for(var i,o=[],r=t;r<n;r=i){var a=new cn(e.doc,Ye(e.doc,r),r);i=r+a.size,o.push(a)}return o}var dn=null,fn=null;function pn(e,t){var n=be(e,t);if(n.length){var i,o=Array.prototype.slice.call(arguments,2);dn?i=dn.delayedCallbacks:fn?i=fn:(i=fn=[],setTimeout(mn,0));for(var r=function(e){i.push((function(){return n[e].apply(null,o)}))},a=0;a<n.length;++a)r(a)}}function mn(){var e=fn;fn=null;for(var t=0;t<e.length;++t)e[t]()}function hn(e,t,n,i){for(var o=0;o<t.changes.length;o++){var r=t.changes[o];"text"==r?vn(e,t):"gutter"==r?_n(e,t,n,i):"class"==r?yn(e,t):"widget"==r&&wn(e,t,i)}t.changes=null}function gn(e){return e.node==e.text&&(e.node=j("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function bn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):nn(e,t)}function vn(e,t){var n=t.text.className,i=bn(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,yn(e,t)):n&&(t.text.className=n)}function yn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var i=gn(t);t.background=i.insertBefore(j("div",null,n),i.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?gn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function _n(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=gn(t);t.gutterBackground=j("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var r=t.line.gutterMarkers;if(e.options.lineNumbers||r){var a=gn(t),s=t.gutter=j("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||r&&r["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(j("div",ot(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),r)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=r.hasOwnProperty(c)&&r[c];u&&s.appendChild(j("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function wn(e,t,n){t.alignable&&(t.alignable=null);for(var i=C("CodeMirror-linewidget"),o=t.node.firstChild,r=void 0;o;o=r)r=o.nextSibling,i.test(o.className)&&t.node.removeChild(o);kn(e,t,n)}function xn(e,t,n,i){var o=bn(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),yn(e,t),_n(e,t,n,i),kn(e,t,i),t.node}function kn(e,t,n){if(On(e,t.line,t,n,!0),t.rest)for(var i=0;i<t.rest.length;i++)On(e,t.rest[i],t,n,!1)}function On(e,t,n,i,o){if(t.widgets)for(var r=gn(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=j("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Cn(l,c,n,i),e.display.input.setUneditable(c),o&&l.above?r.insertBefore(c,n.gutter||n.text):r.appendChild(c),pn(l,"redraw")}}function Cn(e,t,n,i){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(o-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function Sn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!F(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),E(t.display.measure,j("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Dn(e,t){for(var n=Pe(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Pn(e){return e.lineSpace.offsetTop}function En(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function jn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=E(e.measure,j("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function Mn(e){return 50-e.display.nativeBarWidth}function Fn(e){return e.display.scroller.clientWidth-Mn(e)-e.display.barWidth}function Tn(e){return e.display.scroller.clientHeight-Mn(e)-e.display.barHeight}function In(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var o=0;o<e.rest.length;o++)if(tt(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}}function $n(e,t,n,i){return Ln(e,An(e,t),n,i)}function Rn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[hi(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function An(e,t){var n=tt(t),i=Rn(e,n);i&&!i.text?i=null:i&&i.changes&&(hn(e,i,n,ui(e)),e.curOp.forceUpdate=!0),i||(i=function(e,t){var n=tt(t=Bt(t)),i=e.display.externalMeasured=new cn(e.doc,t,n);i.lineN=n;var o=i.built=nn(e,i);return i.text=o.pre,E(e.display.lineMeasure,o.pre),i}(e,t));var o=In(i,t,n);return{line:t,view:i,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Ln(e,t,n,i,o){t.before&&(n=-1);var r,l=n+(i||"");return t.cache.hasOwnProperty(l)?r=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var i=e.options.lineWrapping,o=i&&Fn(e);if(!t.measure.heights||i&&t.measure.width!=o){var r=t.measure.heights=[];if(i){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&r.push((l.bottom+c.top)/2-n.top)}}r.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(r=function(e,t,n,i){var o,r=Vn(t.map,n,i),l=r.node,c=r.start,u=r.end,d=r.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&le(t.line.text.charAt(r.coverStart+c));)--c;for(;r.coverStart+u<r.coverEnd&&le(t.line.text.charAt(r.coverStart+u));)++u;if((o=a&&s<9&&0==c&&u==r.coverEnd-r.coverStart?l.parentNode.getBoundingClientRect():zn(S(l,c,u).getClientRects(),i)).left||o.right||0==c)break;u=c,c-=1,d="right"}a&&s<11&&(o=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Ne)return Ne;var t=E(e,j("span","x")),n=t.getBoundingClientRect(),i=S(t,0,1).getBoundingClientRect();return Ne=Math.abs(n.left-i.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*i,bottom:t.bottom*i}}(e.display.measure,o))}else{var p;c>0&&(d=i="right"),o=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==i?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!o||!o.left&&!o.right)){var m=l.parentNode.getClientRects()[0];o=m?{left:m.left,right:m.left+ci(e.display),top:m.top,bottom:m.bottom}:Wn}for(var h=o.top-t.rect.top,g=o.bottom-t.rect.top,b=(h+g)/2,v=t.view.measure.heights,y=0;y<v.length-1&&!(b<v[y]);y++);var _=y?v[y-1]:0,w=v[y],x={left:("right"==d?o.right:o.left)-t.rect.left,right:("left"==d?o.left:o.right)-t.rect.left,top:_,bottom:w};return o.left||o.right||(x.bogus=!0),e.options.singleCursorHeightPerLine||(x.rtop=h,x.rbottom=g),x}(e,t,n,i)).bogus||(t.cache[l]=r)),{left:r.left,right:r.right,top:o?r.rtop:r.top,bottom:o?r.rbottom:r.bottom}}var Nn,Wn={left:0,right:0,top:0,bottom:0};function Vn(e,t,n){for(var i,o,r,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(o=0,r=1,a="left"):t<l?r=1+(o=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(o=(r=l-s)-1,t>=l&&(a="right")),null!=o){if(i=e[c+2],s==l&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)i=e[2+(c-=3)],a="left";if("right"==n&&o==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)i=e[(c+=3)+2],a="right";break}return{node:i,start:o,end:r,collapse:a,coverStart:s,coverEnd:l}}function zn(e,t){var n=Wn;if("left"==t)for(var i=0;i<e.length&&(n=e[i]).left==n.right;i++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function Bn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Kn(e){e.display.externalMeasure=null,P(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Bn(e.display.view[t])}function Un(e){Kn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Hn(e){return u&&b?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function Gn(e){return u&&b?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function qn(e){var t=Bt(e).widgets,n=0;if(t)for(var i=0;i<t.length;++i)t[i].above&&(n+=Sn(t[i]));return n}function Xn(e,t,n,i,o){if(!o){var r=qn(t);n.top+=r,n.bottom+=r}if("line"==i)return n;i||(i="local");var a=qt(t);if("local"==i?a+=Pn(e.display):a-=e.display.viewOffset,"page"==i||"window"==i){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==i?0:Gn(A(e)));var l=s.left+("window"==i?0:Hn(A(e)));n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function Jn(e,t,n){if("div"==n)return t;var i=t.left,o=t.top;if("page"==n)i-=Hn(A(e)),o-=Gn(A(e));else if("local"==n||!n){var r=e.display.sizer.getBoundingClientRect();i+=r.left,o+=r.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:o-a.top}}function Yn(e,t,n,i,o){return i||(i=Ye(e.doc,t.line)),Xn(e,i,$n(e,i,t.ch,o),n)}function Qn(e,t,n,i,o,r){function a(t,a){var s=Ln(e,o,t,a?"right":"left",r);return a?s.left=s.right:s.right=s.left,Xn(e,i,s,n)}i=i||Ye(e.doc,t.line),o||(o=An(e,i));var s=me(i,e.doc.direction),l=t.ch,c=t.sticky;if(l>=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=fe(s,l,c),f=de,p=u(l,d,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function Zn(e,t){var n=0;t=ft(e.doc,t),e.options.lineWrapping||(n=ci(e.display)*t.ch);var i=Ye(e.doc,t.line),o=qt(i)+Pn(e.display);return{left:n,right:n,top:o,bottom:o+i.height}}function ei(e,t,n,i,o){var r=rt(e,t,n);return r.xRel=o,i&&(r.outside=i),r}function ti(e,t,n){var i=e.doc;if((n+=e.display.viewOffset)<0)return ei(i.first,0,null,-1,-1);var o=nt(i,n),r=i.first+i.size-1;if(o>r)return ei(i.first+i.size-1,Ye(i,r).text.length,null,1,1);t<0&&(t=0);for(var a=Ye(i,o);;){var s=ri(e,a,o,t,n),l=Vt(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==o)return c;a=Ye(i,o=c.line)}}function ni(e,t,n,i){i-=qn(t);var o=t.text.length,r=ue((function(t){return Ln(e,n,t-1).bottom<=i}),o,0);return{begin:r,end:o=ue((function(t){return Ln(e,n,t).top>i}),r,o)}}function ii(e,t,n,i){return n||(n=An(e,t)),ni(e,t,n,Xn(e,t,Ln(e,n,i),"line").top)}function oi(e,t,n,i){return!(e.bottom<=n)&&(e.top>n||(i?e.left:e.right)>t)}function ri(e,t,n,i,o){o-=qt(t);var r=An(e,t),a=qn(t),s=0,l=t.text.length,c=!0,u=me(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?si:ai)(e,t,n,r,u,i,o);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,p,m=null,h=null,g=ue((function(t){var n=Ln(e,r,t);return n.top+=a,n.bottom+=a,!!oi(n,i,o,!1)&&(n.top<=o&&n.left<=i&&(m=t,h=n),!0)}),s,l),b=!1;if(h){var v=i-h.left<h.right-i,y=v==c;g=m+(y?0:1),p=y?"after":"before",f=v?h.left:h.right}else{c||g!=l&&g!=s||g++,p=0==g?"after":g==t.text.length?"before":Ln(e,r,g-(c?1:0)).bottom+a<=o==c?"after":"before";var _=Qn(e,rt(n,g,p),"line",t,r);f=_.left,b=o<_.top?-1:o>=_.bottom?1:0}return ei(n,g=ce(t.text,g,1),p,b,i-f)}function ai(e,t,n,i,o,r,a){var s=ue((function(s){var l=o[s],c=1!=l.level;return oi(Qn(e,rt(n,c?l.to:l.from,c?"before":"after"),"line",t,i),r,a,!0)}),0,o.length-1),l=o[s];if(s>0){var c=1!=l.level,u=Qn(e,rt(n,c?l.from:l.to,c?"after":"before"),"line",t,i);oi(u,r,a,!0)&&u.top>a&&(l=o[s-1])}return l}function si(e,t,n,i,o,r,a){var s=ni(e,t,i,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f<o.length;f++){var p=o[f];if(!(p.from>=c||p.to<=l)){var m=Ln(e,i,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,h=m<r?r-m+1e9:m-r;(!u||d>h)&&(u=p,d=h)}}return u||(u=o[o.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function li(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nn){Nn=j("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(j("br"));Nn.appendChild(document.createTextNode("x"))}E(e.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),P(e.measure),n||1}function ci(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=j("span","xxxxxxxxxx"),n=j("pre",[t],"CodeMirror-line-like");E(e.measure,n);var i=t.getBoundingClientRect(),o=(i.right-i.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ui(e){for(var t=e.display,n={},i={},o=t.gutters.clientLeft,r=t.gutters.firstChild,a=0;r;r=r.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=r.offsetLeft+r.clientLeft+o,i[s]=r.clientWidth}return{fixedPos:di(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function di(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function fi(e){var t=li(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/ci(e.display)-3);return function(o){if(Ht(e.doc,o))return 0;var r=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(r+=o.widgets[a].height);return n?r+(Math.ceil(o.text.length/i)||1)*t:r+t}}function pi(e){var t=e.doc,n=fi(e);t.iter((function(e){var t=n(e);t!=e.height&&et(e,t)}))}function mi(e,t,n,i){var o=e.display;if(!n&&"true"==Pe(t).getAttribute("cm-not-content"))return null;var r,a,s=o.lineSpace.getBoundingClientRect();try{r=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=ti(e,r,a);if(i&&c.xRel>0&&(l=Ye(e.doc,c.line).text).length==c.ch){var u=B(l,l.length,e.options.tabSize)-l.length;c=rt(c.line,Math.max(0,Math.round((r-jn(e.display).left)/ci(e.display))-u))}return c}function hi(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,i=0;i<n.length;i++)if((t-=n[i].size)<0)return i}function gi(e,t,n,i){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),i||(i=0);var o=e.display;if(i&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Dt&&Kt(e.doc,t)<o.viewTo&&vi(e);else if(n<=o.viewFrom)Dt&&Ut(e.doc,n+i)>o.viewFrom?vi(e):(o.viewFrom+=i,o.viewTo+=i);else if(t<=o.viewFrom&&n>=o.viewTo)vi(e);else if(t<=o.viewFrom){var r=yi(e,n,n+i,1);r?(o.view=o.view.slice(r.index),o.viewFrom=r.lineN,o.viewTo+=i):vi(e)}else if(n>=o.viewTo){var a=yi(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):vi(e)}else{var s=yi(e,t,t,-1),l=yi(e,n,n+i,1);s&&l?(o.view=o.view.slice(0,s.index).concat(un(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=i):vi(e)}var c=o.externalMeasured;c&&(n<c.lineN?c.lineN+=i:t<c.lineN+c.size&&(o.externalMeasured=null))}function bi(e,t,n){e.curOp.viewChanged=!0;var i=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(i.externalMeasured=null),!(t<i.viewFrom||t>=i.viewTo)){var r=i.view[hi(e,t)];if(null!=r.node){var a=r.changes||(r.changes=[]);-1==U(a,n)&&a.push(n)}}}function vi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function yi(e,t,n,i){var o,r=hi(e,t),a=e.display.view;if(!Dt||n==e.doc.first+e.doc.size)return{index:r,lineN:n};for(var s=e.display.viewFrom,l=0;l<r;l++)s+=a[l].size;if(s!=t){if(i>0){if(r==a.length-1)return null;o=s+a[r].size-t,r++}else o=s-t;t+=o,n+=o}for(;Kt(e.doc,n)!=n;){if(r==(i<0?0:a.length-1))return null;n+=i*a[r-(i<0?1:0)].size,r+=i}return{index:r,lineN:n}}function _i(e){for(var t=e.display.view,n=0,i=0;i<t.length;i++){var o=t[i];o.hidden||o.node&&!o.changes||++n}return n}function wi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function xi(e,t){void 0===t&&(t=!0);var n=e.doc,i={},o=i.cursors=document.createDocumentFragment(),r=i.selection=document.createDocumentFragment(),a=e.options.$customCursor;a&&(t=!0);for(var s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var l=n.sel.ranges[s];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var c=l.empty();if(a){var u=a(e,l);u&&ki(e,u,o)}else(c||e.options.showCursorWhenSelecting)&&ki(e,l.head,o);c||Ci(e,l,r)}}return i}function ki(e,t,n){var i=Qn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(j("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var r=Yn(e,t,"div",null,null),a=r.right-r.left;o.style.width=(a>0?a:e.defaultCharWidth())+"px"}if(i.other){var s=n.appendChild(j("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=i.other.left+"px",s.style.top=i.other.top+"px",s.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Oi(e,t){return e.top-t.top||e.left-t.left}function Ci(e,t,n){var i=e.display,o=e.doc,r=document.createDocumentFragment(),a=jn(e.display),s=a.left,l=Math.max(i.sizerWidth,Fn(e)-i.sizer.offsetLeft)-a.right,c="ltr"==o.direction;function u(e,t,n,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),r.appendChild(j("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(i-t)+"px"))}function d(t,n,i){var r,a,d=Ye(o,t),f=d.text.length;function p(n,i){return Yn(e,rt(t,n),"div",d,i)}function m(t,n,i){var o=ii(e,d,null,t),r="ltr"==n==("after"==i)?"left":"right";return p("after"==i?o.begin:o.end-(/\s/.test(d.text.charAt(o.end-1))?2:1),r)[r]}var h=me(d,o.direction);return function(e,t,n,i){if(!e)return i(t,n,"ltr",0);for(var o=!1,r=0;r<e.length;++r){var a=e[r];(a.from<n&&a.to>t||t==n&&a.to==t)&&(i(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",r),o=!0)}o||i(t,n,"ltr")}(h,n||0,null==i?f:i,(function(e,t,o,d){var g="ltr"==o,b=p(e,g?"left":"right"),v=p(t-1,g?"right":"left"),y=null==n&&0==e,_=null==i&&t==f,w=0==d,x=!h||d==h.length-1;if(v.top-b.top<=3){var k=(c?_:y)&&x,O=(c?y:_)&&w?s:(g?b:v).left,C=k?l:(g?v:b).right;u(O,b.top,C-O,b.bottom)}else{var S,D,P,E;g?(S=c&&y&&w?s:b.left,D=c?l:m(e,o,"before"),P=c?s:m(t,o,"after"),E=c&&_&&x?l:v.right):(S=c?m(e,o,"before"):s,D=!c&&y&&w?l:b.right,P=!c&&_&&x?s:v.left,E=c?m(t,o,"after"):l),u(S,b.top,D-S,b.bottom),b.bottom<v.top&&u(s,b.bottom,null,v.top),u(P,v.top,E-P,v.bottom)}(!r||Oi(b,r)<0)&&(r=b),Oi(v,r)<0&&(r=v),(!a||Oi(b,a)<0)&&(a=b),Oi(v,a)<0&&(a=v)})),{start:r,end:a}}var f=t.from(),p=t.to();if(f.line==p.line)d(f.line,f.ch,p.ch);else{var m=Ye(o,f.line),h=Ye(o,p.line),g=Bt(m)==Bt(h),b=d(f.line,f.ch,g?m.text.length+1:null).end,v=d(p.line,g?0:null,p.ch).start;g&&(b.top<v.top-2?(u(b.right,b.top,null,b.bottom),u(s,v.top,v.left,v.bottom)):u(b.right,b.top,v.left-b.right,b.bottom)),b.bottom<v.top&&u(s,b.bottom,null,v.top)}n.appendChild(r)}function Si(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||ji(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Di(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ei(e))}function Pi(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&ji(e))}),100)}function Ei(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ye(e,"focus",e,t),e.state.focused=!0,I(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Si(e))}function ji(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ye(e,"blur",e,t),e.state.focused=!1,D(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Mi(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=Math.max(0,t.scroller.getBoundingClientRect().top),o=t.lineDiv.getBoundingClientRect().top,r=0,l=0;l<t.view.length;l++){var c=t.view[l],u=e.options.lineWrapping,d=void 0,f=0;if(!c.hidden){if(o+=c.line.height,a&&s<8){var p=c.node.offsetTop+c.node.offsetHeight;d=p-n,n=p}else{var m=c.node.getBoundingClientRect();d=m.bottom-m.top,!u&&c.text.firstChild&&(f=c.text.firstChild.getBoundingClientRect().right-m.left-1)}var h=c.line.height-d;if((h>.005||h<-.005)&&(o<i&&(r-=h),et(c.line,d),Fi(c.line),c.rest))for(var g=0;g<c.rest.length;g++)Fi(c.rest[g]);if(f>e.display.sizerWidth){var b=Math.ceil(f/ci(e.display));b>e.display.maxLineLength&&(e.display.maxLineLength=b,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(r)>2&&(t.scroller.scrollTop+=r)}function Fi(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function Ti(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-Pn(e));var o=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,r=nt(t,i),a=nt(t,o);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<r?(r=s,a=nt(t,qt(Ye(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(r=nt(t,qt(Ye(t,l))-e.wrapper.clientHeight),a=l)}return{from:r,to:Math.max(a,r+1)}}function Ii(e,t){var n=e.display,i=li(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,r=Tn(e),a={};t.bottom-t.top>r&&(t.bottom=t.top+r);var s=e.doc.height+En(n),l=t.top<i,c=t.bottom>s-i;if(t.top<o)a.scrollTop=l?0:t.top;else if(t.bottom>o+r){var u=Math.min(t.top,(c?s:t.bottom)-r);u!=o&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Fn(e)-n.gutters.offsetWidth,m=t.right-t.left>p;return m&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<f?a.scrollLeft=Math.max(0,t.left+d-(m?0:10)):t.right>p+f-3&&(a.scrollLeft=t.right+(m?0:10)-p),a}function $i(e,t){null!=t&&(Li(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Ri(e){Li(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ai(e,t,n){null==t&&null==n||Li(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Li(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Ni(e,Zn(e,t.from),Zn(e,t.to),t.margin))}function Ni(e,t,n,i){var o=Ii(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-i,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+i});Ai(e,o.scrollLeft,o.scrollTop)}function Wi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||mo(e,{top:t}),Vi(e,t,!0),n&&mo(e),lo(e,100))}function Vi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function zi(e,t,n,i){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!i||(e.doc.scrollLeft=t,bo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Bi(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+En(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Mn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ki=function(e,t,n){this.cm=n;var i=this.vert=j("div",[j("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=j("div",[j("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=o.tabIndex=-1,e(i),e(o),ge(i,"scroll",(function(){i.clientHeight&&t(i.scrollTop,"vertical")})),ge(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ki.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var o=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var r=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+r)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:t?i:0}},Ki.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ki.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ki.prototype.zeroWidthHack=function(){var e=y&&!m?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new K,this.disableVert=new K},Ki.prototype.enableZeroWidthBar=function(e,t,n){e.style.visibility="",t.set(1e3,(function i(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.visibility="hidden":t.set(1e3,i)}))},Ki.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Ui=function(){};function Hi(e,t){t||(t=Bi(e));var n=e.display.barWidth,i=e.display.barHeight;Gi(e,t);for(var o=0;o<4&&n!=e.display.barWidth||i!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Mi(e),Gi(e,Bi(e)),n=e.display.barWidth,i=e.display.barHeight}function Gi(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Ui.prototype.update=function(){return{bottom:0,right:0}},Ui.prototype.setScrollLeft=function(){},Ui.prototype.setScrollTop=function(){},Ui.prototype.clear=function(){};var qi={native:Ki,null:Ui};function Xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&D(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new qi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ge(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?zi(e,t):Wi(e,t)}),e),e.display.scrollbars.addClass&&I(e.display.wrapper,e.display.scrollbars.addClass)}var Ji=0;function Yi(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ji,markArrays:null},t=e.curOp,dn?dn.ops.push(t):t.ownsGroup=dn={ops:[t],delayedCallbacks:[]}}function Qi(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var i=0;i<e.ops.length;i++){var o=e.ops[i];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}(n)}finally{dn=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Zi(t[n]);for(var i=0;i<t.length;i++)eo(t[i]);for(var o=0;o<t.length;o++)to(t[o]);for(var r=0;r<t.length;r++)no(t[r]);for(var a=0;a<t.length;a++)io(t[a])}(e)}))}function Zi(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Mn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Mn(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&Jt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new uo(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function eo(e){e.updatedDisplay=e.mustUpdate&&fo(e.cm,e.update)}function to(e){var t=e.cm,n=t.display;e.updatedDisplay&&Mi(t),e.barMeasure=Bi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=$n(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Mn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Fn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function no(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&zi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==T(L(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Hi(t,e.barMeasure),e.updatedDisplay&&go(t,e.barMeasure),e.selectionChanged&&Si(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Di(e.cm)}function io(e){var t=e.cm,n=t.display,i=t.doc;e.updatedDisplay&&po(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Vi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&zi(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!_e(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),o=null,r=n.wrapper.ownerDocument;if(t.top+i.top<0?o=!0:t.bottom+i.top>(r.defaultView.innerHeight||r.documentElement.clientHeight)&&(o=!1),null!=o&&!h){var a=j("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Pn(e.display))+"px;\n height: "+(t.bottom-t.top+Mn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}(t,function(e,t,n,i){var o;null==i&&(i=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?rt(t.line,t.ch+1,"before"):t,t=t.ch?rt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var r=0;r<5;r++){var a=!1,s=Qn(e,t),l=n&&n!=t?Qn(e,n):s,c=Ii(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-i,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+i}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Wi(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(zi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return o}(t,ft(i,e.scrollToPos.from),ft(i,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,r=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||ye(o[a],"hide");if(r)for(var s=0;s<r.length;++s)r[s].lines.length&&ye(r[s],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ye(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function oo(e,t){if(e.curOp)return t();Yi(e);try{return t()}finally{Qi(e)}}function ro(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Yi(e);try{return t.apply(e,arguments)}finally{Qi(e)}}}function ao(e){return function(){if(this.curOp)return e.apply(this,arguments);Yi(this);try{return e.apply(this,arguments)}finally{Qi(this)}}}function so(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Yi(t);try{return e.apply(this,arguments)}finally{Qi(t)}}}function lo(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,V(co,e))}function co(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,i=vt(e,t.highlightFrontier),o=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(r){if(i.line>=e.display.viewFrom){var a=r.styles,s=r.text.length>e.options.maxHighlightLength?Ge(t.mode,i.state):null,l=gt(e,r,i,!0);s&&(i.state=s),r.styles=l.styles;var c=r.styleClasses,u=l.classes;u?r.styleClasses=u:c&&(r.styleClasses=null);for(var d=!a||a.length!=r.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&f<a.length;++f)d=a[f]!=r.styles[f];d&&o.push(i.line),r.stateAfter=i.save(),i.nextLine()}else r.text.length<=e.options.maxHighlightLength&&yt(e,r.text,i),r.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return lo(e,e.options.workDelay),!0})),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),o.length&&oo(e,(function(){for(var t=0;t<o.length;t++)bi(e,o[t],"text")}))}}var uo=function(e,t,n){var i=e.display;this.viewport=t,this.visible=Ti(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Fn(e),this.force=n,this.dims=ui(e),this.events=[]};function fo(e,t){var n=e.display,i=e.doc;if(t.editorIsHidden)return vi(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==_i(e))return!1;vo(e)&&(vi(e),t.dims=ui(e));var o=i.first+i.size,r=Math.max(t.visible.from-e.options.viewportMargin,i.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFrom<r&&r-n.viewFrom<20&&(r=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Dt&&(r=Kt(e.doc,r),a=Ut(e.doc,a));var s=r!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var i=e.display;0==i.view.length||t>=i.viewTo||n<=i.viewFrom?(i.view=un(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=un(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(hi(e,t))),i.viewFrom=t,i.viewTo<n?i.view=i.view.concat(un(e,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,hi(e,n)))),i.viewTo=n}(e,r,a),n.viewOffset=qt(Ye(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=_i(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=T(L(e));if(!t||!F(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var i=W(e).getSelection();i.anchorNode&&i.extend&&F(e.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var i=e.display,o=e.options.lineNumbers,r=i.lineDiv,a=r.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=i.view,u=i.viewFrom,d=0;d<c.length;d++){var f=c[d];if(f.hidden);else if(f.node&&f.node.parentNode==r){for(;a!=f.node;)a=s(a);var p=o&&null!=t&&t<=u&&f.lineNumber;f.changes&&(U(f.changes,"gutter")>-1&&(p=!1),hn(e,f,u,n)),p&&(P(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ot(e.options,u)))),a=f.node.nextSibling}else{var m=xn(e,f,u,n);r.insertBefore(m,a)}u+=f.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=T(N(e.activeElt))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&F(document.body,e.anchorNode)&&F(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,n=t.defaultView.getSelection(),i=t.createRange();i.setEnd(e.anchorNode,e.anchorOffset),i.collapse(!1),n.removeAllRanges(),n.addRange(i),n.extend(e.focusNode,e.focusOffset)}}(u),P(n.cursorDiv),P(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,lo(e,400)),n.updateLineNumbers=null,!0}function po(e,t){for(var n=t.viewport,i=!0;;i=!1){if(i&&e.options.lineWrapping&&t.oldDisplayWidth!=Fn(e))i&&(t.visible=Ti(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+En(e.display)-Tn(e),n.top)}),t.visible=Ti(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!fo(e,t))break;Mi(e);var o=Bi(e);wi(e),Hi(e,o),go(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function mo(e,t){var n=new uo(e,t);if(fo(e,n)){Mi(e),po(e,n);var i=Bi(e);wi(e),Hi(e,i),go(e,i),n.finish()}}function ho(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",pn(e,"gutterChanged",e)}function go(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Mn(e)+"px"}function bo(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=di(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,r=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=r),n[a].gutterBackground&&(n[a].gutterBackground.style.left=r));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=r}e.options.fixedGutter&&(t.gutters.style.left=i+o+"px")}}function vo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=ot(e.options,t.first+t.size-1),i=e.display;if(n.length!=i.lineNumChars){var o=i.measure.appendChild(j("div",[j("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),r=o.firstChild.offsetWidth,a=o.offsetWidth-r;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(r,i.lineGutter.offsetWidth-a)+1,i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",ho(e.display),!0}return!1}function yo(e,t){for(var n=[],i=!1,o=0;o<e.length;o++){var r=e[o],a=null;if("string"!=typeof r&&(a=r.style,r=r.className),"CodeMirror-linenumbers"==r){if(!t)continue;i=!0}n.push({className:r,style:a})}return t&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function _o(e){var t=e.gutters,n=e.gutterSpecs;P(t),e.lineGutter=null;for(var i=0;i<n.length;++i){var o=n[i],r=o.className,a=o.style,s=t.appendChild(j("div",null,"CodeMirror-gutter "+r));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==r&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ho(e)}function wo(e){_o(e.display),gi(e),bo(e)}function xo(e,t,i,o){var r=this;this.input=i,r.scrollbarFiller=j("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=j("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=M("div",null,"CodeMirror-code"),r.selectionDiv=j("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=j("div",null,"CodeMirror-cursors"),r.measure=j("div",null,"CodeMirror-measure"),r.lineMeasure=j("div",null,"CodeMirror-measure"),r.lineSpace=M("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none");var c=M("div",[r.lineSpace],"CodeMirror-lines");r.mover=j("div",[c],null,"position: relative"),r.sizer=j("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=j("div",null,null,"position: absolute; height: 50px; width: 1px;"),r.gutters=j("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=j("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=j("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),u&&105===d&&(r.wrapper.style.clipPath="inset(0px)"),r.wrapper.setAttribute("translate","no"),a&&s<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),l||n&&v||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,r.gutterSpecs=yo(o.gutters,o.lineNumbers),_o(r),i.init(r)}uo.prototype.signal=function(e,t){xe(e,t)&&this.events.push(arguments)},uo.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ye.apply(null,this.events[e])};var ko=0,Oo=null;function Co(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function So(e){var t=Co(e);return t.x*=Oo,t.y*=Oo,t}function Do(e,t){u&&102==d&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var i=Co(t),o=i.x,r=i.y,a=Oo;0===t.deltaMode&&(o=t.deltaX,r=t.deltaY,a=1);var s=e.display,c=s.scroller,p=c.scrollWidth>c.clientWidth,m=c.scrollHeight>c.clientHeight;if(o&&p||r&&m){if(r&&y&&l)e:for(var h=t.target,g=s.view;h!=c;h=h.parentNode)for(var b=0;b<g.length;b++)if(g[b].node==h){e.display.currentWheelTarget=h;break e}if(o&&!n&&!f&&null!=a)return r&&m&&Wi(e,Math.max(0,c.scrollTop+r*a)),zi(e,Math.max(0,c.scrollLeft+o*a)),(!r||r&&m)&&Oe(t),void(s.wheelStartX=null);if(r&&null!=a){var v=r*a,_=e.doc.scrollTop,w=_+s.wrapper.clientHeight;v<0?_=Math.max(0,_+v-50):w=Math.min(e.doc.height,w+v+50),mo(e,{top:_,bottom:w})}ko<20&&0!==t.deltaMode&&(null==s.wheelStartX?(s.wheelStartX=c.scrollLeft,s.wheelStartY=c.scrollTop,s.wheelDX=o,s.wheelDY=r,setTimeout((function(){if(null!=s.wheelStartX){var e=c.scrollLeft-s.wheelStartX,t=c.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(Oo=(Oo*ko+n)/(ko+1),++ko)}}),200)):(s.wheelDX+=o,s.wheelDY+=r))}}a?Oo=-.53:n?Oo=15:u?Oo=-.7:p&&(Oo=-1/3);var Po=function(e,t){this.ranges=e,this.primIndex=t};Po.prototype.primary=function(){return this.ranges[this.primIndex]},Po.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],i=e.ranges[t];if(!st(n.anchor,i.anchor)||!st(n.head,i.head))return!1}return!0},Po.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Eo(lt(this.ranges[t].anchor),lt(this.ranges[t].head));return new Po(e,this.primIndex)},Po.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Po.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(at(t,i.from())>=0&&at(e,i.to())<=0)return n}return-1};var Eo=function(e,t){this.anchor=e,this.head=t};function jo(e,t,n){var i=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return at(e.from(),t.from())})),n=U(t,o);for(var r=1;r<t.length;r++){var a=t[r],s=t[r-1],l=at(s.to(),a.from());if(i&&!a.empty()?l>0:l>=0){var c=ut(s.from(),a.from()),u=ct(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;r<=n&&--n,t.splice(--r,2,new Eo(d?u:c,d?c:u))}}return new Po(t,n)}function Mo(e,t){return new Po([new Eo(e,t||e)],0)}function Fo(e){return e.text?rt(e.from.line+e.text.length-1,Z(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function To(e,t){if(at(e,t.from)<0)return e;if(at(e,t.to)<=0)return Fo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=Fo(t).ch-t.to.ch),rt(n,i)}function Io(e,t){for(var n=[],i=0;i<e.sel.ranges.length;i++){var o=e.sel.ranges[i];n.push(new Eo(To(o.anchor,t),To(o.head,t)))}return jo(e.cm,n,e.sel.primIndex)}function $o(e,t,n){return e.line==t.line?rt(n.line,e.ch-t.ch+n.ch):rt(n.line+(e.line-t.line),e.ch)}function Ro(e){e.doc.mode=Ke(e.options,e.doc.modeOption),Ao(e)}function Ao(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,lo(e,100),e.state.modeGen++,e.curOp&&gi(e)}function Lo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Z(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function No(e,t,n,i){function o(e){return n?n[e]:null}function r(e,n,o){!function(e,t,n,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Tt(e),It(e,n);var o=i?i(e):1;o!=e.height&&et(e,o)}(e,n,o,i),pn(e,"change",e,t)}function a(e,t){for(var n=[],r=e;r<t;++r)n.push(new Yt(c[r],o(r),i));return n}var s=t.from,l=t.to,c=t.text,u=Ye(e,s.line),d=Ye(e,l.line),f=Z(c),p=o(c.length-1),m=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Lo(e,t)){var h=a(0,c.length-1);r(d,d.text,p),m&&e.remove(s.line,m),h.length&&e.insert(s.line,h)}else if(u==d)if(1==c.length)r(u,u.text.slice(0,s.ch)+f+u.text.slice(l.ch),p);else{var g=a(1,c.length-1);g.push(new Yt(f+u.text.slice(l.ch),p,i)),r(u,u.text.slice(0,s.ch)+c[0],o(0)),e.insert(s.line+1,g)}else if(1==c.length)r(u,u.text.slice(0,s.ch)+c[0]+d.text.slice(l.ch),o(0)),e.remove(s.line+1,m);else{r(u,u.text.slice(0,s.ch)+c[0],o(0)),r(d,f+d.text.slice(l.ch),p);var b=a(1,c.length-1);m>1&&e.remove(s.line+1,m-1),e.insert(s.line+1,b)}pn(e,"change",e,t)}function Wo(e,t,n){!function e(i,o,r){if(i.linked)for(var a=0;a<i.linked.length;++a){var s=i.linked[a];if(s.doc!=o){var l=r&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,i,l))}}}(e,null,!0)}function Vo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,pi(e),Ro(e),zo(e),e.options.direction=t.direction,e.options.lineWrapping||Jt(e),e.options.mode=t.modeOption,gi(e)}function zo(e){("rtl"==e.doc.direction?I:D)(e.display.lineDiv,"CodeMirror-rtl")}function Bo(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Ko(e,t){var n={from:lt(t.from),to:Fo(t),text:Qe(e,t.from,t.to)};return Xo(e,n,t.from.line,t.to.line+1),Wo(e,(function(e){return Xo(e,n,t.from.line,t.to.line+1)}),!0),n}function Uo(e){for(;e.length&&Z(e).ranges;)e.pop()}function Ho(e,t,n,i){var o=e.history;o.undone.length=0;var r,a,s=+new Date;if((o.lastOp==i||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(r=function(e,t){return t?(Uo(e.done),Z(e.done)):e.done.length&&!Z(e.done).ranges?Z(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Z(e.done)):void 0}(o,o.lastOp==i)))a=Z(r.changes),0==at(t.from,t.to)&&0==at(t.from,a.to)?a.to=Fo(t):r.changes.push(Ko(e,t));else{var l=Z(o.done);for(l&&l.ranges||qo(e.sel,o.done),r={changes:[Ko(e,t)],generation:o.generation},o.done.push(r);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=i,o.lastOrigin=o.lastSelOrigin=t.origin,a||ye(e,"historyAdded")}function Go(e,t,n,i){var o=e.history,r=i&&i.origin;n==o.lastSelOp||r&&o.lastSelOrigin==r&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==r||function(e,t,n,i){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,r,Z(o.done),t))?o.done[o.done.length-1]=t:qo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=r,o.lastSelOp=n,i&&!1!==i.clearRedo&&Uo(o.undone)}function qo(e,t){var n=Z(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Xo(e,t,n,i){var o=t["spans_"+e.id],r=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[r]=n.markedSpans),++r}))}function Jo(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Yo(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var i=[],o=0;o<t.text.length;++o)i.push(Jo(n[o]));return i}(e,t),i=Mt(e,t);if(!n)return i;if(!i)return n;for(var o=0;o<n.length;++o){var r=n[o],a=i[o];if(r&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<r.length;++c)if(r[c].marker==l.marker)continue e;r.push(l)}else a&&(n[o]=a)}return n}function Qo(e,t,n){for(var i=[],o=0;o<e.length;++o){var r=e[o];if(r.ranges)i.push(n?Po.prototype.deepCopy.call(r):r);else{var a=r.changes,s=[];i.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&U(t,Number(u[1]))>-1&&(Z(s)[d]=c[d],delete c[d])}}}return i}function Zo(e,t,n,i){if(i){var o=e.anchor;if(n){var r=at(t,o)<0;r!=at(n,o)<0?(o=t,t=n):r!=at(t,n)<0&&(t=n)}return new Eo(o,t)}return new Eo(n||t,t)}function er(e,t,n,i,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),rr(e,new Po([Zo(e.sel.primary(),t,n,o)],0),i)}function tr(e,t,n){for(var i=[],o=e.cm&&(e.cm.display.shift||e.extend),r=0;r<e.sel.ranges.length;r++)i[r]=Zo(e.sel.ranges[r],t[r],null,o);rr(e,jo(e.cm,i,e.sel.primIndex),n)}function nr(e,t,n,i){var o=e.sel.ranges.slice(0);o[t]=n,rr(e,jo(e.cm,o,e.sel.primIndex),i)}function ir(e,t,n,i){rr(e,Mo(t,n),i)}function or(e,t,n){var i=e.history.done,o=Z(i);o&&o.ranges?(i[i.length-1]=t,ar(e,t,n)):rr(e,t,n)}function rr(e,t,n){ar(e,t,n),Go(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ar(e,t,n){(xe(e,"beforeSelectionChange")||e.cm&&xe(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var i={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Eo(ft(e,t[n].anchor),ft(e,t[n].head))},origin:n&&n.origin};return ye(e,"beforeSelectionChange",e,i),e.cm&&ye(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?jo(e.cm,i.ranges,i.ranges.length-1):t}(e,t,n));var i=n&&n.bias||(at(t.primary().head,e.sel.primary().head)<0?-1:1);sr(e,cr(e,t,i,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Ri(e.cm)}function sr(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,we(e.cm)),pn(e,"cursorActivity",e))}function lr(e){sr(e,cr(e,e.sel,null,!1))}function cr(e,t,n,i){for(var o,r=0;r<t.ranges.length;r++){var a=t.ranges[r],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[r],l=dr(e,a.anchor,s&&s.anchor,n,i),c=a.head==a.anchor?l:dr(e,a.head,s&&s.head,n,i);(o||l!=a.anchor||c!=a.head)&&(o||(o=t.ranges.slice(0,r)),o[r]=new Eo(l,c))}return o?jo(e.cm,o,t.primIndex):t}function ur(e,t,n,i,o){var r=Ye(e,t.line);if(r.markedSpans)for(var a=0;a<r.markedSpans.length;++a){var s=r.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(o&&(ye(l,"beforeCursorEnter"),l.explicitlyCleared)){if(r.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(i<0?1:-1),f=void 0;if((i<0?u:c)&&(d=fr(e,d,-i,d&&d.line==t.line?r:null)),d&&d.line==t.line&&(f=at(d,n))&&(i<0?f<0:f>0))return ur(e,d,t,i,o)}var p=l.find(i<0?-1:1);return(i<0?c:u)&&(p=fr(e,p,i,p.line==t.line?r:null)),p?ur(e,p,t,i,o):null}}return t}function dr(e,t,n,i,o){var r=i||1,a=ur(e,t,n,r,o)||!o&&ur(e,t,n,r,!0)||ur(e,t,n,-r,o)||!o&&ur(e,t,n,-r,!0);return a||(e.cantEdit=!0,rt(e.first,0))}function fr(e,t,n,i){return n<0&&0==t.ch?t.line>e.first?ft(e,rt(t.line-1)):null:n>0&&t.ch==(i||Ye(e,t.line)).text.length?t.line<e.first+e.size-1?rt(t.line+1,0):null:new rt(t.line,t.ch+n)}function pr(e){e.setSelection(rt(e.firstLine(),0),rt(e.lastLine()),G)}function mr(e,t,n){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(t,n,o,r){t&&(i.from=ft(e,t)),n&&(i.to=ft(e,n)),o&&(i.text=o),void 0!==r&&(i.origin=r)}),ye(e,"beforeChange",e,i),e.cm&&ye(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function hr(e,t,n){if(e.cm){if(!e.cm.curOp)return ro(e.cm,hr)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"))||(t=mr(e,t,!0))){var i=St&&!n&&function(e,t,n){var i=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||i&&-1!=U(i,n)||(i||(i=[])).push(n)}})),!i)return null;for(var o=[{from:t,to:n}],r=0;r<i.length;++r)for(var a=i[r],s=a.find(0),l=0;l<o.length;++l){var c=o[l];if(!(at(c.to,s.from)<0||at(c.from,s.to)>0)){var u=[l,1],d=at(c.from,s.from),f=at(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(f>0||!a.inclusiveRight&&!f)&&u.push({from:s.to,to:c.to}),o.splice.apply(o,u),l+=u.length-3}}return o}(e,t.from,t.to);if(i)for(var o=i.length-1;o>=0;--o)gr(e,{from:i[o].from,to:i[o].to,text:o?[""]:t.text,origin:t.origin});else gr(e,t)}}function gr(e,t){if(1!=t.text.length||""!=t.text[0]||0!=at(t.from,t.to)){var n=Io(e,t);Ho(e,t,n,e.cm?e.cm.curOp.id:NaN),yr(e,t,n,Mt(e,t));var i=[];Wo(e,(function(e,n){n||-1!=U(i,e.history)||(kr(e.history,t),i.push(e.history)),yr(e,t,null,Mt(e,t))}))}}function br(e,t,n){var i=e.cm&&e.cm.state.suppressEdits;if(!i||n){for(var o,r=e.history,a=e.sel,s="undo"==t?r.done:r.undone,l="undo"==t?r.undone:r.done,c=0;c<s.length&&(o=s[c],n?!o.ranges||o.equals(e.sel):o.ranges);c++);if(c!=s.length){for(r.lastOrigin=r.lastSelOrigin=null;;){if(!(o=s.pop()).ranges){if(i)return void s.push(o);break}if(qo(o,l),n&&!o.equals(e.sel))return void rr(e,o,{clearRedo:!1});a=o}var u=[];qo(a,l),l.push({changes:u,generation:r.generation}),r.generation=o.generation||++r.maxGeneration;for(var d=xe(e,"beforeChange")||e.cm&&xe(e.cm,"beforeChange"),f=function(n){var i=o.changes[n];if(i.origin=t,d&&!mr(e,i,!1))return s.length=0,{};u.push(Ko(e,i));var r=n?Io(e,i):Z(s);yr(e,i,r,Yo(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Fo(i)});var a=[];Wo(e,(function(e,t){t||-1!=U(a,e.history)||(kr(e.history,i),a.push(e.history)),yr(e,i,null,Yo(e,i))}))},p=o.changes.length-1;p>=0;--p){var m=f(p);if(m)return m.v}}}}function vr(e,t){if(0!=t&&(e.first+=t,e.sel=new Po(ee(e.sel.ranges,(function(e){return new Eo(rt(e.anchor.line+t,e.anchor.ch),rt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){gi(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;i<n.viewTo;i++)bi(e.cm,i,"gutter")}}function yr(e,t,n,i){if(e.cm&&!e.cm.curOp)return ro(e.cm,yr)(e,t,n,i);if(t.to.line<e.first)vr(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);vr(e,o),t={from:rt(e.first,0),to:rt(t.to.line+o,t.to.ch),text:[Z(t.text)],origin:t.origin}}var r=e.lastLine();t.to.line>r&&(t={from:t.from,to:rt(r,Ye(e,r).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qe(e,t.from,t.to),n||(n=Io(e,t)),e.cm?function(e,t,n){var i=e.doc,o=e.display,r=t.from,a=t.to,s=!1,l=r.line;e.options.lineWrapping||(l=tt(Bt(Ye(i,r.line))),i.iter(l,a.line+1,(function(e){if(e==o.maxLine)return s=!0,!0}))),i.sel.contains(t.from,t.to)>-1&&we(e),No(i,t,n,fi(e)),e.options.lineWrapping||(i.iter(l,r.line+t.text.length,(function(e){var t=Xt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,i=t-1;i>n;i--){var o=Ye(e,i).stateAfter;if(o&&(!(o instanceof mt)||i+o.lookAhead<t)){n=i+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(i,r.line),lo(e,400);var c=t.text.length-(a.line-r.line)-1;t.full?gi(e):r.line!=a.line||1!=t.text.length||Lo(e.doc,t)?gi(e,r.line,a.line+1,c):bi(e,r.line,"text");var u=xe(e,"changes"),d=xe(e,"change");if(d||u){var f={from:r,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&pn(e,"change",e,f),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,i):No(e,t,i),ar(e,n,G),e.cantEdit&&dr(e,rt(e.firstLine(),0))&&(e.cantEdit=!1)}}function _r(e,t,n,i,o){var r;i||(i=n),at(i,n)<0&&(n=(r=[i,n])[0],i=r[1]),"string"==typeof t&&(t=e.splitLines(t)),hr(e,{from:n,to:i,text:t,origin:o})}function wr(e,t,n,i){n<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function xr(e,t,n,i){for(var o=0;o<e.length;++o){var r=e[o],a=!0;if(r.ranges){r.copied||((r=e[o]=r.deepCopy()).copied=!0);for(var s=0;s<r.ranges.length;s++)wr(r.ranges[s].anchor,t,n,i),wr(r.ranges[s].head,t,n,i)}else{for(var l=0;l<r.changes.length;++l){var c=r.changes[l];if(n<c.from.line)c.from=rt(c.from.line+i,c.from.ch),c.to=rt(c.to.line+i,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function kr(e,t){var n=t.from.line,i=t.to.line,o=t.text.length-(i-n)-1;xr(e.done,n,i,o),xr(e.undone,n,i,o)}function Or(e,t,n,i){var o=t,r=t;return"number"==typeof t?r=Ye(e,dt(e,t)):o=tt(t),null==o?null:(i(r,o)&&e.cm&&bi(e.cm,o,n),r)}function Cr(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function Sr(e){this.children=e;for(var t=0,n=0,i=0;i<e.length;++i){var o=e[i];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}Eo.prototype.from=function(){return ut(this.anchor,this.head)},Eo.prototype.to=function(){return ct(this.anchor,this.head)},Eo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Cr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,i=e+t;n<i;++n){var o=this.lines[n];this.height-=o.height,Qt(o),pn(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,n){for(var i=e+t;e<i;++e)if(n(this.lines[e]))return!0}},Sr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var r=Math.min(t,o-e),a=i.height;if(i.removeInner(e,r),this.height-=a-i.height,o==r&&(this.children.splice(n--,1),i.parent=null),0==(t-=r))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Cr))){var s=[];this.collapse(s),this.children=[new Cr(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var i=0;i<this.children.length;++i){var o=this.children[i],r=o.chunkSize();if(e<=r){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,s=a;s<o.lines.length;){var l=new Cr(o.lines.slice(s,s+=25));o.height-=l.height,this.children.splice(++i,0,l),l.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=r}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new Sr(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=U(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var i=new Sr(e.children);i.parent=e,e.children=[i,t],e=i}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;i<this.children.length;++i){var o=this.children[i],r=o.chunkSize();if(e<r){var a=Math.min(t,r-e);if(o.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=r}}};var Dr=function(e,t,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=e,this.node=t};function Pr(e,t,n){qt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&$i(e,n)}Dr.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,i=tt(n);if(null!=i&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var r=Sn(this);et(n,Math.max(0,n.height-r)),e&&(oo(e,(function(){Pr(e,n,-r),bi(e,i,"widget")})),pn(e,"lineWidgetCleared",e,this,i))}},Dr.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,i=this.line;this.height=null;var o=Sn(this)-t;o&&(Ht(this.doc,i)||et(i,i.height+o),n&&oo(n,(function(){n.curOp.forceUpdate=!0,Pr(n,i,o),pn(n,"lineWidgetChanged",n,e,tt(i))})))},ke(Dr);var Er=0,jr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Er};function Mr(e,t,n,i,o){if(i&&i.shared)return function(e,t,n,i,o){(i=z(i)).shared=!1;var r=[Mr(e,t,n,i,o)],a=r[0],s=i.widgetNode;return Wo(e,(function(e){s&&(i.widgetNode=s.cloneNode(!0)),r.push(Mr(e,ft(e,t),ft(e,n),i,o));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=Z(r)})),new Fr(r,a)}(e,t,n,i,o);if(e.cm&&!e.cm.curOp)return ro(e.cm,Mr)(e,t,n,i,o);var r=new jr(e,o),a=at(t,n);if(i&&z(i,r,!1),a>0||0==a&&!1!==r.clearWhenEmpty)return r;if(r.replacedWith&&(r.collapsed=!0,r.widgetNode=M("span",[r.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||r.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(r.widgetNode.insertLeft=!0)),r.collapsed){if(zt(e,t.line,t,n,r)||t.line!=n.line&&zt(e,n.line,t,n,r))throw new Error("Inserting collapsed marker partially overlapping an existing one");Dt=!0}r.addToHistory&&Ho(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(i){c&&r.collapsed&&!c.options.lineWrapping&&Bt(i)==c.display.maxLine&&(s=!0),r.collapsed&&l!=t.line&&et(i,0),function(e,t,n){var i=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));i&&e.markedSpans&&i.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],i&&i.add(e.markedSpans)),t.marker.attachLine(e)}(i,new Pt(r,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),r.collapsed&&e.iter(t.line,n.line+1,(function(t){Ht(e,t)&&et(t,0)})),r.clearOnEnter&&ge(r,"beforeCursorEnter",(function(){return r.clear()})),r.readOnly&&(St=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),r.collapsed&&(r.id=++Er,r.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),r.collapsed)gi(c,t.line,n.line+1);else if(r.className||r.startStyle||r.endStyle||r.css||r.attributes||r.title)for(var u=t.line;u<=n.line;u++)bi(c,u,"text");r.atomic&&lr(c.doc),pn(c,"markerAdded",c,r)}return r}jr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Yi(e),xe(this,"clear")){var n=this.find();n&&pn(this,"clear",n.from,n.to)}for(var i=null,o=null,r=0;r<this.lines.length;++r){var a=this.lines[r],s=Et(a.markedSpans,this);e&&!this.collapsed?bi(e,tt(a),"text"):e&&(null!=s.to&&(o=tt(a)),null!=s.from&&(i=tt(a))),a.markedSpans=jt(a.markedSpans,s),null==s.from&&this.collapsed&&!Ht(this.doc,a)&&e&&et(a,li(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Bt(this.lines[l]),u=Xt(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&gi(e,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&lr(e.doc)),e&&pn(e,"markerCleared",e,this,i,o),t&&Qi(e),this.parent&&this.parent.clear()}},jr.prototype.find=function(e,t){var n,i;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var r=this.lines[o],a=Et(r.markedSpans,this);if(null!=a.from&&(n=rt(t?r:tt(r),a.from),-1==e))return n;if(null!=a.to&&(i=rt(t?r:tt(r),a.to),1==e))return i}return n&&{from:n,to:i}},jr.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,i=this.doc.cm;t&&i&&oo(i,(function(){var o=t.line,r=tt(t.line),a=Rn(i,r);if(a&&(Bn(a),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!Ht(n.doc,o)&&null!=n.height){var s=n.height;n.height=null;var l=Sn(n)-s;l&&et(o,o.height+l)}pn(i,"markerChanged",i,e)}))},jr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=U(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},jr.prototype.detachLine=function(e){if(this.lines.splice(U(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ke(jr);var Fr=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function Tr(e){return e.findMarks(rt(e.first,0),e.clipPos(rt(e.lastLine())),(function(e){return e.parent}))}function Ir(e){for(var t=function(t){var n=e[t],i=[n.primary.doc];Wo(n.primary.doc,(function(e){return i.push(e)}));for(var o=0;o<n.markers.length;o++){var r=n.markers[o];-1==U(i,r.doc)&&(r.parent=null,n.markers.splice(o--,1))}},n=0;n<e.length;n++)t(n)}Fr.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();pn(this,"clear")}},Fr.prototype.find=function(e,t){return this.primary.find(e,t)},ke(Fr);var $r=0,Rr=function(e,t,n,i,o){if(!(this instanceof Rr))return new Rr(e,t,n,i,o);null==n&&(n=0),Sr.call(this,[new Cr([new Yt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var r=rt(n,0);this.sel=Mo(r),this.history=new Bo(null),this.id=++$r,this.modeOption=t,this.lineSep=i,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),No(this,{from:r,to:r,text:e}),rr(this,Mo(r),G)};Rr.prototype=ne(Sr.prototype,{constructor:Rr,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,i=0;i<t.length;++i)n+=t[i].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ze(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:so((function(e){var t=rt(this.first,0),n=this.first+this.size-1;hr(this,{from:t,to:rt(n,Ye(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ai(this.cm,0,0),rr(this,Mo(t),G)})),replaceRange:function(e,t,n,i){_r(this,e,t=ft(this,t),n=n?ft(this,n):t,i)},getRange:function(e,t,n){var i=Qe(this,ft(this,e),ft(this,t));return!1===n?i:""===n?i.join(""):i.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(it(this,e))return Ye(this,e)},getLineNumber:function(e){return tt(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ye(this,e)),Bt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ft(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:so((function(e,t,n){ir(this,ft(this,"number"==typeof e?rt(e,t||0):e),null,n)})),setSelection:so((function(e,t,n){ir(this,ft(this,e),ft(this,t||e),n)})),extendSelection:so((function(e,t,n){er(this,ft(this,e),t&&ft(this,t),n)})),extendSelections:so((function(e,t){tr(this,pt(this,e),t)})),extendSelectionsBy:so((function(e,t){tr(this,pt(this,ee(this.sel.ranges,e)),t)})),setSelections:so((function(e,t,n){if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new Eo(ft(this,e[o].anchor),ft(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),rr(this,jo(this.cm,i,t),n)}})),addSelection:so((function(e,t,n){var i=this.sel.ranges.slice(0);i.push(new Eo(ft(this,e),ft(this,t||e))),rr(this,jo(this.cm,i,i.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,i=0;i<n.length;i++){var o=Qe(this,n[i].from(),n[i].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=Qe(this,n[i].from(),n[i].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[i]=o}return t},replaceSelection:function(e,t,n){for(var i=[],o=0;o<this.sel.ranges.length;o++)i[o]=e;this.replaceSelections(i,t,n||"+input")},replaceSelections:so((function(e,t,n){for(var i=[],o=this.sel,r=0;r<o.ranges.length;r++){var a=o.ranges[r];i[r]={from:a.from(),to:a.to(),text:this.splitLines(e[r]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var i=[],o=rt(e.first,0),r=o,a=0;a<t.length;a++){var s=t[a],l=$o(s.from,o,r),c=$o(Fo(s),o,r);if(o=s.to,r=c,"around"==n){var u=e.sel.ranges[a],d=at(u.head,u.anchor)<0;i[a]=new Eo(d?c:l,d?l:c)}else i[a]=new Eo(l,l)}return new Po(i,e.sel.primIndex)}(this,i,t),l=i.length-1;l>=0;l--)hr(this,i[l]);s?or(this,s):this.cm&&Ri(this.cm)})),undo:so((function(){br(this,"undo")})),redo:so((function(){br(this,"redo")})),undoSelection:so((function(){br(this,"undo",!0)})),redoSelection:so((function(){br(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Bo(this.history),Wo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Qo(this.history.done),undone:Qo(this.history.undone)}},setHistory:function(e){var t=this.history=new Bo(this.history);t.done=Qo(e.done.slice(0),null,!0),t.undone=Qo(e.undone.slice(0),null,!0)},setGutterMarker:so((function(e,t,n){return Or(this,e,"gutter",(function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=n,!n&&ae(i)&&(e.gutterMarkers=null),!0}))})),clearGutter:so((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&Or(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,ae(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!it(this,e))return null;if(t=e,!(e=Ye(this,e)))return null}else if(null==(t=tt(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:so((function(e,t,n){return Or(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[i]){if(C(n).test(e[i]))return!1;e[i]+=" "+n}else e[i]=n;return!0}))})),removeLineClass:so((function(e,t,n){return Or(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[i];if(!o)return!1;if(null==n)e[i]=null;else{var r=o.match(C(n));if(!r)return!1;var a=r.index+r[0].length;e[i]=o.slice(0,r.index)+(r.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0}))})),addLineWidget:so((function(e,t,n){return function(e,t,n,i){var o=new Dr(e,n,i),r=e.cm;return r&&o.noHScroll&&(r.display.alignWidgets=!0),Or(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length,Math.max(0,o.insertAt)),0,o),o.line=t,r&&!Ht(e,t)){var i=qt(t)<e.scrollTop;et(t,t.height+Sn(o)),i&&$i(r,o.height),r.curOp.forceUpdate=!0}return!0})),r&&pn(r,"lineWidgetAdded",r,o,"number"==typeof t?t:tt(t)),o}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Mr(this,ft(this,e),ft(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Mr(this,e=ft(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ye(this,(e=ft(this,e)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var o=n[i];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=ft(this,e),t=ft(this,t);var i=[],o=e.line;return this.iter(e.line,t.line+1,(function(r){var a=r.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&o==e.line&&e.ch>=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++o})),i},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&e.push(n[i].marker)})),e},posFromIndex:function(e){var t,n=this.first,i=this.lineSeparator().length;return this.iter((function(o){var r=o.text.length+i;if(r>e)return t=e,!0;e-=r,++n})),ft(this,rt(n,t))},indexFromPos:function(e){var t=(e=ft(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Rr(Ze(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var i=new Rr(Ze(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var i=t[n],o=i.find(),r=e.clipPos(o.from),a=e.clipPos(o.to);if(at(r,a)){var s=Mr(e,r,a,i.primary,i.primary.type);i.markers.push(s),s.parent=i}}}(i,Tr(this)),i},unlinkDoc:function(e){if(e instanceof Fa&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ir(Tr(this));break}if(e.history==this.history){var n=[e.id];Wo(e,(function(e){return n.push(e.id)}),!0),e.history=new Bo(null),e.history.done=Qo(this.history.done,n),e.history.undone=Qo(this.history.undone,n)}},iterLinkedDocs:function(e){Wo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Re(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:so((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&oo(t=this.cm,(function(){zo(t),gi(t)})))}))}),Rr.prototype.eachLine=Rr.prototype.iter;var Ar=0;function Lr(e){var t=this;if(Nr(t),!_e(t,e)&&!Dn(t.display,e)){Oe(e),a&&(Ar=+new Date);var n=mi(t,e,!0),i=e.dataTransfer.files;if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var o=i.length,r=Array(o),s=0,l=function(){++s==o&&ro(t,(function(){var e={from:n=ft(t.doc,n),to:n,text:t.doc.splitLines(r.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};hr(t.doc,e),or(t.doc,Mo(ft(t.doc,n),ft(t.doc,Fo(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==U(t.options.allowDropFileTypes,e.type))l();else{var i=new FileReader;i.onerror=function(){return l()},i.onload=function(){var e=i.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(r[n]=e),l()},i.readAsText(e)}},u=0;u<i.length;u++)c(i[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),ar(t.doc,Mo(n,n)),f)for(var p=0;p<f.length;++p)_r(t.doc,"",f[p].anchor,f[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Nr(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Wr(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<t.length;i++){var o=t[i].CodeMirror;o&&n.push(o)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Vr=!1;function zr(){var e;Vr||(ge(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Wr(Br)}),100))})),ge(window,"blur",(function(){return Wr(ji)})),Vr=!0)}function Br(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Kr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ur=0;Ur<10;Ur++)Kr[Ur+48]=Kr[Ur+96]=String(Ur);for(var Hr=65;Hr<=90;Hr++)Kr[Hr]=String.fromCharCode(Hr);for(var Gr=1;Gr<=12;Gr++)Kr[Gr+111]=Kr[Gr+63235]="F"+Gr;var qr={};function Xr(e){var t,n,i,o,r=e.split(/-(?!$)/);e=r[r.length-1];for(var a=0;a<r.length-1;a++){var s=r[a];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Jr(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete e[n];continue}for(var o=ee(n.split(" "),Xr),r=0;r<o.length;r++){var a=void 0,s=void 0;r==o.length-1?(s=o.join(" "),a=i):(s=o.slice(0,r+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Yr(e,t,n,i){var o=(t=ta(t)).call?t.call(e,i):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Yr(e,t.fallthrough,n,i);for(var r=0;r<t.fallthrough.length;r++){var a=Yr(e,t.fallthrough[r],n,i);if(a)return a}}}function Qr(e){var t="string"==typeof e?e:Kr[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Zr(e,t,n){var i=e;return t.altKey&&"Alt"!=i&&(e="Alt-"+e),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=i&&(e="Ctrl-"+e),(k?t.ctrlKey:t.metaKey)&&"Mod"!=i&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=i&&(e="Shift-"+e),e}function ea(e,t){if(f&&34==e.keyCode&&e.char)return!1;var n=Kr[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Zr(n,e,t))}function ta(e){return"string"==typeof e?qr[e]:e}function na(e,t){for(var n=e.doc.sel.ranges,i=[],o=0;o<n.length;o++){for(var r=t(n[o]);i.length&&at(r.from,Z(i).to)<=0;){var a=i.pop();if(at(a.from,r.from)<0){r.from=a.from;break}}i.push(r)}oo(e,(function(){for(var t=i.length-1;t>=0;t--)_r(e.doc,"",i[t].from,i[t].to,"+delete");Ri(e)}))}function ia(e,t,n){var i=ce(e.text,t+n,n);return i<0||i>e.text.length?null:i}function oa(e,t,n){var i=ia(e,t.ch,n);return null==i?null:new rt(t.line,i,n<0?"after":"before")}function ra(e,t,n,i,o){if(e){"rtl"==t.doc.direction&&(o=-o);var r=me(n,t.doc.direction);if(r){var a,s=o<0?Z(r):r[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=An(t,n);a=o<0?n.text.length-1:0;var u=Ln(t,c,a).top;a=ue((function(e){return Ln(t,c,e).top==u}),o<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=ia(n,a,1))}else a=o<0?s.to:s.from;return new rt(i,a,l)}}return new rt(i,o<0?n.text.length:0,o<0?"before":"after")}qr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},qr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},qr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},qr.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},qr.default=y?qr.macDefault:qr.pcDefault;var aa={selectAll:pr,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),G)},killLine:function(e){return na(e,(function(t){if(t.empty()){var n=Ye(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:rt(t.head.line+1,0)}:{from:t.head,to:rt(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return na(e,(function(t){return{from:rt(t.from().line,0),to:ft(e.doc,rt(t.to().line+1,0))}}))},delLineLeft:function(e){return na(e,(function(e){return{from:rt(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return na(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return na(e,(function(t){var n=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:i}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(rt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(rt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return sa(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return la(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ye(e.doc,t),i=function(e){for(var t;t=Wt(e);)e=t.find(1,!0).line;return e}(n);return i!=n&&(t=tt(i)),ra(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),X)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),X)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:n},"div");return i.ch<e.getLine(i.line).search(/\S/)?la(e,t.head):i}),X)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),i=e.options.tabSize,o=0;o<n.length;o++){var r=n[o].from(),a=B(e.getLine(r.line),r.ch,i);t.push(Q(i-a%i))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return oo(e,(function(){for(var t=e.listSelections(),n=[],i=0;i<t.length;i++)if(t[i].empty()){var o=t[i].head,r=Ye(e.doc,o.line).text;if(r)if(o.ch==r.length&&(o=new rt(o.line,o.ch-1)),o.ch>0)o=new rt(o.line,o.ch+1),e.replaceRange(r.charAt(o.ch-1)+r.charAt(o.ch-2),rt(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Ye(e.doc,o.line-1).text;a&&(o=new rt(o.line,1),e.replaceRange(r.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),rt(o.line-1,a.length-1),o,"+transpose"))}n.push(new Eo(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return oo(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var i=0;i<t.length;i++)e.indentLine(t[i].from().line,null,!0);Ri(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function sa(e,t){var n=Ye(e.doc,t),i=Bt(n);return i!=n&&(t=tt(i)),ra(!0,e,i,t,1)}function la(e,t){var n=sa(e,t.line),i=Ye(e.doc,n.line),o=me(i,e.doc.direction);if(!o||0==o[0].level){var r=Math.max(n.ch,i.text.search(/\S/)),a=t.line==n.line&&t.ch<=r&&t.ch;return rt(n.line,a?0:r,n.sticky)}return n}function ca(e,t,n){if("string"==typeof t&&!(t=aa[t]))return!1;e.display.input.ensurePolled();var i=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=H}finally{e.display.shift=i,e.state.suppressEdits=!1}return o}var ua=new K;function da(e,t,n,i){var o=e.state.keySeq;if(o){if(Qr(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ua.set(50,(function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())})),fa(e,o+" "+t,n,i))return!0}return fa(e,t,n,i)}function fa(e,t,n,i){var o=function(e,t,n){for(var i=0;i<e.state.keyMaps.length;i++){var o=Yr(t,e.state.keyMaps[i],n,e);if(o)return o}return e.options.extraKeys&&Yr(t,e.options.extraKeys,n,e)||Yr(t,e.options.keyMap,n,e)}(e,t,i);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&pn(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(Oe(n),Si(e)),!!o}function pa(e,t){var n=ea(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?da(e,"Shift-"+n,t,(function(t){return ca(e,t,!0)}))||da(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ca(e,t)})):da(e,n,t,(function(t){return ca(e,t)})))}var ma=null;function ha(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=T(L(t)),_e(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=16==i||e.shiftKey;var o=pa(t,e);f&&(ma=o?i:null,o||88!=i||Le||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!o&&46==i&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=i||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(D(t,"CodeMirror-crosshair"),ve(document,"keyup",n),ve(document,"mouseover",n))}I(t,"CodeMirror-crosshair"),ge(document,"keyup",n),ge(document,"mouseover",n)}(t)}}function ga(e){16==e.keyCode&&(this.doc.sel.shift=!1),_e(this,e)}function ba(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Dn(t.display,e)||_e(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,i=e.charCode;if(f&&n==ma)return ma=null,void Oe(e);if(!f||e.which&&!(e.which<10)||!pa(t,e)){var o=String.fromCharCode(null==i?n:i);"\b"!=o&&(function(e,t,n){return da(e,"'"+n+"'",t,(function(t){return ca(e,t,!0)}))}(t,e,o)||t.display.input.onKeyPress(e))}}}var va,ya,_a=function(e,t,n){this.time=e,this.pos=t,this.button=n};function wa(e){var t=this,n=t.display;if(!(_e(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Dn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Oa(t,e)){var i=mi(t,e),o=Ee(e),r=i?function(e,t){var n=+new Date;return ya&&ya.compare(n,e,t)?(va=ya=null,"triple"):va&&va.compare(n,e,t)?(ya=new _a(n,e,t),va=null,"double"):(va=new _a(n,e,t),ya=null,"single")}(i,o):"single";W(t).focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),i&&function(e,t,n,i,o){var r="Click";return"double"==i?r="Double"+r:"triple"==i&&(r="Triple"+r),da(e,Zr(r=(1==t?"Left":2==t?"Middle":"Right")+r,o),o,(function(t){if("string"==typeof t&&(t=aa[t]),!t)return!1;var i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i=t(e,n)!=H}finally{e.state.suppressEdits=!1}return i}))}(t,o,i,r,e)||(1==o?i?function(e,t,n,i){a?setTimeout(V(Di,e),0):e.curOp.focus=T(L(e));var o,r=function(e,t,n){var i=e.getOption("configureMouse"),o=i?i(e,t,n):{};if(null==o.unit){var r=_?n.shiftKey&&n.metaKey:n.altKey;o.unit=r?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=y?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(y?n.altKey:n.ctrlKey)),o}(e,n,i),c=e.doc.sel;e.options.dragDrop&&Fe&&!e.isReadOnly()&&"single"==n&&(o=c.contains(t))>-1&&(at((o=c.ranges[o]).from(),t)<0||t.xRel>0)&&(at(o.to(),t)>0||t.xRel<0)?function(e,t,n,i){var o=e.display,r=!1,c=ro(e,(function(t){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Pi(e)),ve(o.wrapper.ownerDocument,"mouseup",c),ve(o.wrapper.ownerDocument,"mousemove",u),ve(o.scroller,"dragstart",d),ve(o.scroller,"drop",c),r||(Oe(t),i.addNew||er(e.doc,n,null,null,i.extend),l&&!p||a&&9==s?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),u=function(e){r=r||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return r=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!i.moveOnDrag,ge(o.wrapper.ownerDocument,"mouseup",c),ge(o.wrapper.ownerDocument,"mousemove",u),ge(o.scroller,"dragstart",d),ge(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,i,t,r):function(e,t,n,i){a&&Pi(e);var o=e.display,r=e.doc;Oe(t);var s,l,c=r.sel,u=c.ranges;if(i.addNew&&!i.extend?(l=r.sel.contains(n),s=l>-1?u[l]:new Eo(n,n)):(s=r.sel.primary(),l=r.sel.primIndex),"rectangle"==i.unit)i.addNew||(s=new Eo(n,n)),n=mi(e,t,!0,!0),l=-1;else{var d=xa(e,n,i.unit);s=i.extend?Zo(s,d.anchor,d.head,i.extend):d}i.addNew?-1==l?(l=u.length,rr(r,jo(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==i.unit&&!i.extend?(rr(r,jo(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=r.sel):nr(r,l,s,q):(l=0,rr(r,new Po([s],0),q),c=r.sel);var f=n;function p(t){if(0!=at(f,t))if(f=t,"rectangle"==i.unit){for(var o=[],a=e.options.tabSize,u=B(Ye(r,n.line).text,n.ch,a),d=B(Ye(r,t.line).text,t.ch,a),p=Math.min(u,d),m=Math.max(u,d),h=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));h<=g;h++){var b=Ye(r,h).text,v=J(b,p,a);p==m?o.push(new Eo(rt(h,v),rt(h,v))):b.length>v&&o.push(new Eo(rt(h,v),rt(h,J(b,m,a))))}o.length||o.push(new Eo(n,n)),rr(r,jo(e,c.ranges.slice(0,l).concat(o),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var y,_=s,w=xa(e,t,i.unit),x=_.anchor;at(w.anchor,x)>0?(y=w.head,x=ut(_.from(),w.anchor)):(y=w.anchor,x=ct(_.to(),w.head));var k=c.ranges.slice(0);k[l]=function(e,t){var n=t.anchor,i=t.head,o=Ye(e.doc,n.line);if(0==at(n,i)&&n.sticky==i.sticky)return t;var r=me(o);if(!r)return t;var a=fe(r,n.ch,n.sticky),s=r[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==r.length)return t;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=fe(r,i.ch,i.sticky),d=u-a||(i.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var f=r[c+(l?-1:0)],p=l==(1==f.level),m=p?f.from:f.to,h=p?"after":"before";return n.ch==m&&n.sticky==h?t:new Eo(new rt(n.line,m,h),i)}(e,new Eo(ft(r,x),y)),rr(r,jo(e,k,l),q)}}var m=o.wrapper.getBoundingClientRect(),h=0;function g(t){e.state.selectingText=!1,h=1/0,t&&(Oe(t),o.input.focus()),ve(o.wrapper.ownerDocument,"mousemove",b),ve(o.wrapper.ownerDocument,"mouseup",v),r.history.lastSelOrigin=null}var b=ro(e,(function(t){0!==t.buttons&&Ee(t)?function t(n){var a=++h,s=mi(e,n,!0,"rectangle"==i.unit);if(s)if(0!=at(s,f)){e.curOp.focus=T(L(e)),p(s);var l=Ti(o,r);(s.line>=l.to||s.line<l.from)&&setTimeout(ro(e,(function(){h==a&&t(n)})),150)}else{var c=n.clientY<m.top?-20:n.clientY>m.bottom?20:0;c&&setTimeout(ro(e,(function(){h==a&&(o.scroller.scrollTop+=c,t(n))})),50)}}(t):g(t)})),v=ro(e,g);e.state.selectingText=v,ge(o.wrapper.ownerDocument,"mousemove",b),ge(o.wrapper.ownerDocument,"mouseup",v)}(e,i,t,r)}(t,i,r,e):Pe(e)==n.scroller&&Oe(e):2==o?(i&&er(t.doc,i),setTimeout((function(){return n.input.focus()}),20)):3==o&&(O?t.display.input.onContextMenu(e):Pi(t)))}}function xa(e,t,n){if("char"==n)return new Eo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Eo(rt(t.line,0),ft(e.doc,rt(t.line+1,0)));var i=n(e,t);return new Eo(i.from,i.to)}function ka(e,t,n,i){var o,r;if(t.touches)o=t.touches[0].clientX,r=t.touches[0].clientY;else try{o=t.clientX,r=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Oe(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(r>s.bottom||!xe(e,n))return Se(t);r-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=o)return ye(e,n,e,nt(e.doc,r),e.display.gutterSpecs[l].className,t),Se(t)}}function Oa(e,t){return ka(e,t,"gutterClick",!0)}function Ca(e,t){Dn(e.display,t)||function(e,t){return!!xe(e,"gutterContextMenu")&&ka(e,t,"gutterContextMenu",!1)}(e,t)||_e(e,t,"contextmenu")||O||e.display.input.onContextMenu(t)}function Sa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Un(e)}_a.prototype.compare=function(e,t,n){return this.time+400>e&&0==at(t,this.pos)&&n==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Pa={},Ea={};function ja(e,t,n){if(!t!=!(n&&n!=Da)){var i=e.display.dragFunctions,o=t?ge:ve;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function Ma(e){e.options.lineWrapping?(I(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(D(e.display.wrapper,"CodeMirror-wrap"),Jt(e)),pi(e),gi(e),Un(e),setTimeout((function(){return Hi(e)}),100)}function Fa(e,t){var n=this;if(!(this instanceof Fa))return new Fa(e,t);this.options=t=t?z(t):{},z(Pa,t,!1);var i=t.value;"string"==typeof i?i=new Rr(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var o=new Fa.inputStyles[t.inputStyle](this),r=this.display=new xo(e,i,o,t);for(var c in r.wrapper.CodeMirror=this,Sa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Xi(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new K,keySeq:null,specialChars:null},t.autofocus&&!v&&r.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;ge(t.scroller,"mousedown",ro(e,wa)),ge(t.scroller,"dblclick",a&&s<11?ro(e,(function(t){if(!_e(e,t)){var n=mi(e,t);if(n&&!Oa(e,t)&&!Dn(e.display,t)){Oe(t);var i=e.findWordAt(n);er(e.doc,i.anchor,i.head)}}})):function(t){return _e(e,t)||Oe(t)}),ge(t.scroller,"contextmenu",(function(t){return Ca(e,t)})),ge(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||Ca(e,n)}));var n,i={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(i=t.activeTouch).end=+new Date)}function r(e,t){if(null==t.left)return!0;var n=t.left-e.left,i=t.top-e.top;return n*n+i*i>400}ge(t.scroller,"touchstart",(function(o){if(!_e(e,o)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(o)&&!Oa(e,o)){t.input.ensurePolled(),clearTimeout(n);var r=+new Date;t.activeTouch={start:r,moved:!1,prev:r-i.end<=300?i:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),ge(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),ge(t.scroller,"touchend",(function(n){var i=t.activeTouch;if(i&&!Dn(t,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!i.prev||r(i,i.prev)?new Eo(s,s):!i.prev.prev||r(i,i.prev.prev)?e.findWordAt(s):new Eo(rt(s.line,0),ft(e.doc,rt(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Oe(n)}o()})),ge(t.scroller,"touchcancel",o),ge(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Wi(e,t.scroller.scrollTop),zi(e,t.scroller.scrollLeft,!0),ye(e,"scroll",e))})),ge(t.scroller,"mousewheel",(function(t){return Do(e,t)})),ge(t.scroller,"DOMMouseScroll",(function(t){return Do(e,t)})),ge(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){_e(e,t)||De(t)},over:function(t){_e(e,t)||(function(e,t){var n=mi(e,t);if(n){var i=document.createDocumentFragment();ki(e,n,i),e.display.dragCursor||(e.display.dragCursor=j("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,i)}}(e,t),De(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Ar<100))De(t);else if(!_e(e,t)&&!Dn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=j("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:ro(e,Lr),leave:function(t){_e(e,t)||Nr(e)}};var l=t.input.getField();ge(l,"keyup",(function(t){return ga.call(e,t)})),ge(l,"keydown",ro(e,ha)),ge(l,"keypress",ro(e,ba)),ge(l,"focus",(function(t){return Ei(e,t)})),ge(l,"blur",(function(t){return ji(e,t)}))}(this),zr(),Yi(this),this.curOp.forceUpdate=!0,Vo(this,i),t.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Ei(n)}),20):ji(this),Ea)Ea.hasOwnProperty(c)&&Ea[c](this,t[c],Da);vo(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ta.length;++u)Ta[u](this);Qi(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(r.lineDiv).textRendering&&(r.lineDiv.style.textRendering="auto")}Fa.defaults=Pa,Fa.optionHandlers=Ea;var Ta=[];function Ia(e,t,n,i){var o,r=e.doc;null==n&&(n="add"),"smart"==n&&(r.mode.indent?o=vt(e,t).state:n="prev");var a=e.options.tabSize,s=Ye(r,t),l=B(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(i||/\S/.test(s.text)){if("smart"==n&&((c=r.mode.indent(o,s.text.slice(u.length),s.text))==H||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>r.first?B(Ye(r,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(f<c&&(d+=Q(c-f)),d!=u)return _r(r,d,rt(t,0),rt(t,u.length),"+input"),s.stateAfter=null,!0;for(var m=0;m<r.sel.ranges.length;m++){var h=r.sel.ranges[m];if(h.head.line==t&&h.head.ch<u.length){var g=rt(t,u.length);nr(r,m,new Eo(g,g));break}}}Fa.defineInitHook=function(e){return Ta.push(e)};var $a=null;function Ra(e){$a=e}function Aa(e,t,n,i,o){var r=e.doc;e.display.shift=!1,i||(i=r.sel);var a=+new Date-200,s="paste"==o||e.state.pasteIncoming>a,l=Re(t),c=null;if(s&&i.ranges.length>1)if($a&&$a.text.join("\n")==t){if(i.ranges.length%$a.text.length==0){c=[];for(var u=0;u<$a.text.length;u++)c.push(r.splitLines($a.text[u]))}}else l.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(c=ee(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,f=i.ranges.length-1;f>=0;f--){var p=i.ranges[f],m=p.from(),h=p.to();p.empty()&&(n&&n>0?m=rt(m.line,m.ch-n):e.state.overwrite&&!s?h=rt(h.line,Math.min(Ye(r,h.line).text.length,h.ch+Z(l).length)):s&&$a&&$a.lineWise&&$a.text.join("\n")==l.join("\n")&&(m=h=rt(m.line,0)));var g={from:m,to:h,text:c?c[f%c.length]:l,origin:o||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};hr(e.doc,g),pn(e,"inputRead",e,g)}t&&!s&&Na(e,t),Ri(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function La(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||oo(t,(function(){return Aa(t,n,0,null,"paste")})),!0}function Na(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var o=n.ranges[i];if(!(o.head.ch>100||i&&n.ranges[i-1].head.line==o.head.line)){var r=e.getModeAt(o.head),a=!1;if(r.electricChars){for(var s=0;s<r.electricChars.length;s++)if(t.indexOf(r.electricChars.charAt(s))>-1){a=Ia(e,o.head.line,"smart");break}}else r.electricInput&&r.electricInput.test(Ye(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Ia(e,o.head.line,"smart"));a&&pn(e,"electricInput",e,o.head.line)}}}function Wa(e){for(var t=[],n=[],i=0;i<e.doc.sel.ranges.length;i++){var o=e.doc.sel.ranges[i].head.line,r={anchor:rt(o,0),head:rt(o+1,0)};n.push(r),t.push(e.getRange(r.anchor,r.head))}return{text:t,ranges:n}}function Va(e,t,n,i){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",i?"on":"off"),e.setAttribute("spellcheck",!!t)}function za(){var e=j("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=j("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),t}function Ba(e,t,n,i,o){var r=t,a=n,s=Ye(e,t.line),l=o&&"rtl"==e.direction?-n:n;function c(r){var a,c;if("codepoint"==i){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var d=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new rt(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(d?2:1))),-n)}}else a=o?function(e,t,n,i){var o=me(t,e.doc.direction);if(!o)return oa(t,n,i);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var r=fe(o,n.ch,n.sticky),a=o[r];if("ltr"==e.doc.direction&&a.level%2==0&&(i>0?a.to>n.ch:a.from<n.ch))return oa(t,n,i);var s,l=function(e,n){return ia(t,e instanceof rt?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||An(e,t),ii(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==i<0,f=l(n,d?1:-1);if(null!=f&&(d?f<=a.to&&f<=u.end:f>=a.from&&f>=u.begin)){var p=d?"before":"after";return new rt(n.line,f,p)}}var m=function(e,t,i){for(var r=function(e,t){return t?new rt(n.line,l(e,1),"before"):new rt(n.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],s=t>0==(1!=a.level),c=s?i.begin:l(i.end,-1);if(a.from<=c&&c<a.to)return r(c,s);if(c=s?a.from:l(a.to,-1),i.begin<=c&&c<i.end)return r(c,s)}},h=m(r+i,i,u);if(h)return h;var g=i>0?u.end:l(u.begin,-1);return null==g||i>0&&g==t.text.length||!(h=m(i>0?0:o.length-1,i,c(g)))?null:h}(e.cm,s,t,n):oa(s,t,n);if(null==a){if(r||(c=t.line+l)<e.first||c>=e.first+e.size||(t=new rt(c,t.ch,t.sticky),!(s=Ye(e,c))))return!1;t=ra(o,e.cm,s,t.line,l)}else t=a;return!0}if("char"==i||"codepoint"==i)c();else if("column"==i)c(!0);else if("word"==i||"group"==i)for(var u=null,d="group"==i,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||c(!p);p=!1){var m=s.text.charAt(t.ch)||"\n",h=re(m,f)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||p||h||(h="s"),u&&u!=h){n<0&&(n=1,c(),t.sticky="after");break}if(h&&(u=h),n>0&&!c(!p))break}var g=dr(e,t,r,a,!0);return st(r,g)&&(g.hitSide=!0),g}function Ka(e,t,n,i){var o,r,a=e.doc,s=t.left;if("page"==i){var l=Math.min(e.display.wrapper.clientHeight,W(e).innerHeight||a(e).documentElement.clientHeight),c=Math.max(l-.5*li(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else"line"==i&&(o=n>0?t.bottom+3:t.top-3);for(;(r=ti(e,s,o)).outside;){if(n<0?o<=0:o>=a.height){r.hitSide=!0;break}o+=5*n}return r}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new K,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(e,t){var n=Rn(e,t.line);if(!n||n.hidden)return null;var i=Ye(e.doc,t.line),o=In(n,i,t.line),r=me(i,e.doc.direction),a="left";r&&(a=fe(r,t.ch)%2?"right":"left");var s=Vn(o.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ga(e,t){return t&&(e.bad=!0),e}function qa(e,t,n){var i;if(t==e.display.lineDiv){if(!(i=e.display.lineDiv.childNodes[n]))return Ga(e.clipPos(rt(e.display.viewTo-1)),!0);t=null,n=0}else for(i=t;;i=i.parentNode){if(!i||i==e.display.lineDiv)return null;if(i.parentNode&&i.parentNode==e.display.lineDiv)break}for(var o=0;o<e.display.view.length;o++){var r=e.display.view[o];if(r.node==i)return Xa(r,t,n)}}function Xa(e,t,n){var i=e.text.firstChild,o=!1;if(!t||!F(i,t))return Ga(rt(tt(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var r=e.rest?Z(e.rest):e.line;return Ga(rt(tt(r),r.text.length),o)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,i){for(var o=-1;o<(c?c.length:0);o++)for(var r=o<0?l.map:c[o],a=0;a<r.length;a+=3){var s=r[a+2];if(s==t||s==n){var u=tt(o<0?e.line:e.rest[o]),d=r[a]+i;return(i<0||s!=t)&&(d=r[a+(i?1:0)]),rt(u,d)}}}var d=u(a,s,n);if(d)return Ga(d,o);for(var f=s.nextSibling,p=a?a.nodeValue.length-n:0;f;f=f.nextSibling){if(d=u(f,f.firstChild,0))return Ga(rt(d.line,d.ch-p),o);p+=f.textContent.length}for(var m=s.previousSibling,h=n;m;m=m.previousSibling){if(d=u(m,m.firstChild,-1))return Ga(rt(d.line,d.ch+h),o);h+=m.textContent.length}}Ua.prototype.init=function(e){var t=this,n=this,i=n.cm,o=n.div=e.lineDiv;function r(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(r(e)&&!_e(i,e)){if(i.somethingSelected())Ra({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Wa(i);Ra({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation((function(){i.setSelections(t.ranges,0,G),i.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=$a.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=za(),l=s.firstChild;Va(l),i.display.lineSpace.insertBefore(s,i.display.lineSpace.firstChild),l.value=$a.text.join("\n");var c=T(N(o));R(l),setTimeout((function(){i.display.lineSpace.removeChild(s),c.focus(),c==o&&n.showPrimarySelection()}),50)}}o.contentEditable=!0,Va(o,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),ge(o,"paste",(function(e){!r(e)||_e(i,e)||La(e,i)||s<=11&&setTimeout(ro(i,(function(){return t.updateFromDOM()})),20)})),ge(o,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),ge(o,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),ge(o,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),ge(o,"touchstart",(function(){return n.forceCompositionEnd()})),ge(o,"input",(function(){t.composing||t.readFromDOMSoon()})),ge(o,"copy",a),ge(o,"cut",a)},Ua.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ua.prototype.prepareSelection=function(){var e=xi(this.cm,!1);return e.focus=T(N(this.div))==this.div,e},Ua.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ua.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ua.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),o=i.from(),r=i.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||r.line<t.display.viewFrom)e.removeAllRanges();else{var a=qa(t,e.anchorNode,e.anchorOffset),s=qa(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=at(ut(a,s),o)||0!=at(ct(a,s),r)){var l=t.display.view,c=o.line>=t.display.viewFrom&&Ha(t,o)||{node:l[0].measure.map[2],offset:0},u=r.line<t.display.viewTo&&Ha(t,r);if(!u){var d=l[l.length-1].measure,f=d.maps?d.maps[d.maps.length-1]:d.map;u={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(c&&u){var p,m=e.rangeCount&&e.getRangeAt(0);try{p=S(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),m&&null==e.anchorNode?e.addRange(m):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ua.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Ua.prototype.showMultipleSelections=function(e){E(this.cm.display.cursorDiv,e.cursors),E(this.cm.display.selectionDiv,e.selection)},Ua.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ua.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return F(this.div,t)},Ua.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&T(N(this.div))==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ua.prototype.blur=function(){this.div.blur()},Ua.prototype.getField=function(){return this.div},Ua.prototype.supportsTouch=function(){return!0},Ua.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):oo(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},Ua.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ua.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(b&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=qa(t,e.anchorNode,e.anchorOffset),i=qa(t,e.focusNode,e.focusOffset);n&&i&&oo(t,(function(){rr(t.doc,Mo(n,i),G),(n.bad||i.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ua.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,i=this.cm,o=i.display,r=i.doc.sel.primary(),a=r.from(),s=r.to();if(0==a.ch&&a.line>i.firstLine()&&(a=rt(a.line-1,Ye(i.doc,a.line-1).length)),s.ch==Ye(i.doc,s.line).text.length&&s.line<i.lastLine()&&(s=rt(s.line+1,0)),a.line<o.viewFrom||s.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(e=hi(i,a.line))?(t=tt(o.view[0].line),n=o.view[0].node):(t=tt(o.view[e].line),n=o.view[e-1].node.nextSibling);var l,c,u=hi(i,s.line);if(u==o.view.length-1?(l=o.viewTo-1,c=o.lineDiv.lastChild):(l=tt(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!n)return!1;for(var d=i.doc.splitLines(function(e,t,n,i,o){var r="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(r+=s,l&&(r+=s),a=l=!1)}function u(e){e&&(c(),r+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var r,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(rt(i,0),rt(o+1,0),(g=+f,function(e){return e.id==g}));return void(p.length&&(r=p[0].find(0))&&u(Qe(e.doc,r.from,r.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&c();for(var h=0;h<t.childNodes.length;h++)d(t.childNodes[h]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),m&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;d(t),t!=n;)t=t.nextSibling,l=!1;return r}(i,n,c,t,l)),f=Qe(i.doc,rt(t,0),rt(l,Ye(i.doc,l).text.length));d.length>1&&f.length>1;)if(Z(d)==Z(f))d.pop(),f.pop(),l--;else{if(d[0]!=f[0])break;d.shift(),f.shift(),t++}for(var p=0,m=0,h=d[0],g=f[0],b=Math.min(h.length,g.length);p<b&&h.charCodeAt(p)==g.charCodeAt(p);)++p;for(var v=Z(d),y=Z(f),_=Math.min(v.length-(1==d.length?p:0),y.length-(1==f.length?p:0));m<_&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)++m;if(1==d.length&&1==f.length&&t==a.line)for(;p&&p>a.ch&&v.charCodeAt(v.length-m-1)==y.charCodeAt(y.length-m-1);)p--,m++;d[d.length-1]=v.slice(0,v.length-m).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=rt(t,p),x=rt(l,f.length?Z(f).length-m:0);return d.length>1||d[0]||at(w,x)?(_r(i.doc,d,w,x,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||oo(this.cm,(function(){return gi(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ro(this.cm,Aa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Ja=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new K,this.hasSelection=!1,this.composing=null,this.resetting=!1};Ja.prototype.init=function(e){var t=this,n=this,i=this.cm;this.createField(e);var o=this.textarea;function r(e){if(!_e(i,e)){if(i.somethingSelected())Ra({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Wa(i);Ra({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,G):(n.prevInput="",o.value=t.text.join("\n"),R(o))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(o.style.width="0px"),ge(o,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),ge(o,"paste",(function(e){_e(i,e)||La(e,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),ge(o,"cut",r),ge(o,"copy",r),ge(e.scroller,"paste",(function(t){if(!Dn(e,t)&&!_e(i,t)){if(!o.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var r=new Event("paste");r.clipboardData=t.clipboardData,o.dispatchEvent(r)}})),ge(e.lineSpace,"selectstart",(function(t){Dn(e,t)||Oe(t)})),ge(o,"compositionstart",(function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}})),ge(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ja.prototype.createField=function(e){this.wrapper=za(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;Va(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},Ja.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ja.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,i=xi(e);if(e.options.moveInputWithCursor){var o=Qn(e,n.sel.primary().head,"div"),r=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-r.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-r.left))}return i},Ja.prototype.showSelection=function(e){var t=this.cm.display;E(t.cursorDiv,e.cursors),E(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ja.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&R(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null));this.resetting=!1}},Ja.prototype.getField=function(){return this.textarea},Ja.prototype.supportsTouch=function(){return!1},Ja.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||T(N(this.textarea))!=this.textarea))try{this.textarea.focus()}catch(e){}},Ja.prototype.blur=function(){this.textarea.blur()},Ja.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ja.prototype.receivedFocus=function(){this.slowPoll()},Ja.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ja.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ja.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Ae(n)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==i&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||y&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var r=o.charCodeAt(0);if(8203!=r||i||(i=""),8666==r)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,o.length);l<c&&i.charCodeAt(l)==o.charCodeAt(l);)++l;return oo(t,(function(){Aa(t,o.slice(l),i.length-l,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ja.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ja.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ja.prototype.onContextMenu=function(e){var t=this,n=t.cm,i=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var r=mi(n,e),c=i.scroller.scrollTop;if(r&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(r)&&ro(n,rr)(n.doc,Mo(r),G);var u,d=o.style.cssText,p=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=o.ownerDocument.defaultView.scrollY),i.input.focus(),l&&o.ownerDocument.defaultView.scrollTo(null,u),i.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=b,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),a&&s>=9&&g(),O){De(e);var h=function(){ve(window,"mouseup",h),setTimeout(b,20)};ge(window,"mouseup",h)}else setTimeout(b,50)}function g(){if(null!=o.selectionStart){var e=n.somethingSelected(),r=""+(e?o.value:"");o.value="⇚",o.value=r,t.prevInput=e?"":"",o.selectionStart=1,o.selectionEnd=r.length,i.selForContextMenu=n.doc.sel}}function b(){if(t.contextMenuPending==b&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=d,a&&s<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&s<9)&&g();var e=0,r=function(){i.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&""==t.prevInput?ro(n,pr)(n):e++<10?i.detectingSelectAll=setTimeout(r,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(r,200)}}},Ja.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ja.prototype.setUneditable=function(){},Ja.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,i,o,r){e.defaults[n]=i,o&&(t[n]=r?function(e,t,n){n!=Da&&o(e,t,n)}:o)}e.defineOption=n,e.Init=Da,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ro(e)}),!0),n("indentUnit",2,Ro,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Ao(e),Un(e),gi(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],i=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var r=e.text.indexOf(t,o);if(-1==r)break;o=r+t.length,n.push(rt(i,r))}i++}));for(var o=n.length-1;o>=0;o--)_r(e.doc,t,n[o],rt(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Da&&e.refresh()})),n("specialCharPlaceholder",on,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Sa(e),wo(e)}),!0),n("keyMap","default",(function(e,t,n){var i=ta(t),o=n!=Da&&ta(n);o&&o.detach&&o.detach(e,i),i.attach&&i.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ma,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=yo(t,e.options.lineNumbers),wo(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?di(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Hi(e)}),!0),n("scrollbarStyle","native",(function(e){Xi(e),Hi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=yo(e.options.gutters,t),wo(e)}),!0),n("firstLineNumber",1,wo,!0),n("lineNumberFormatter",(function(e){return e}),wo,!0),n("showCursorWhenSelecting",!1,wi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(ji(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,ja),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,wi,!0),n("singleCursorHeightPerLine",!0,wi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ao,!0),n("addModeClass",!1,Ao,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Ao,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Fa),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){W(this).focus(),this.display.input.focus()},setOption:function(e,n){var i=this.options,o=i[e];i[e]==n&&"mode"!=e||(i[e]=n,t.hasOwnProperty(e)&&ro(this,t[e])(this,n,o),ye(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](ta(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ao((function(t,n){var i=t.token?t:e.getMode(this.options,t);if(i.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var i=0,o=n(t);i<e.length&&n(e[i])<=o;)i++;e.splice(i,0,t)}(this.state.overlays,{mode:i,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,gi(this)})),removeOverlay:ao((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var i=t[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return t.splice(n,1),this.state.modeGen++,void gi(this)}})),indentLine:ao((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),it(this.doc,e)&&Ia(this,e,t,n)})),indentSelection:ao((function(e){for(var t=this.doc.sel.ranges,n=-1,i=0;i<t.length;i++){var o=t[i];if(o.empty())o.head.line>n&&(Ia(this,o.head.line,e,!0),n=o.head.line,i==this.doc.sel.primIndex&&Ri(this));else{var r=o.from(),a=o.to(),s=Math.max(n,r.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Ia(this,l,e);var c=this.doc.sel.ranges;0==r.ch&&t.length==c.length&&c[i].from().ch>0&&nr(this.doc,i,new Eo(r,c[i].to()),G)}}})),getTokenAt:function(e,t){return kt(this,e,t)},getLineTokens:function(e,t){return kt(this,rt(e),t,!0)},getTokenTypeAt:function(e){e=ft(this.doc,e);var t,n=bt(this,Ye(this.doc,e.line)),i=0,o=(n.length-1)/2,r=e.ch;if(0==r)t=n[2];else for(;;){var a=i+o>>1;if((a?n[2*a-1]:0)>=r)o=a;else{if(!(n[2*a+1]<r)){t=n[2*a+2];break}i=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var i=[];if(!n.hasOwnProperty(t))return i;var o=n[t],r=this.getModeAt(e);if("string"==typeof r[t])o[r[t]]&&i.push(o[r[t]]);else if(r[t])for(var a=0;a<r[t].length;a++){var s=o[r[t][a]];s&&i.push(s)}else r.helperType&&o[r.helperType]?i.push(o[r.helperType]):o[r.name]&&i.push(o[r.name]);for(var l=0;l<o._global.length;l++){var c=o._global[l];c.pred(r,this)&&-1==U(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(e,t){var n=this.doc;return vt(this,(e=dt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Qn(this,null==e?n.head:"object"==typeof e?ft(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Yn(this,ft(this.doc,e),t||"page")},coordsChar:function(e,t){return ti(this,(e=Jn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Jn(this,{top:e,left:0},t||"page").top,nt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var i,o=!1;if("number"==typeof e){var r=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>r&&(e=r,o=!0),i=Ye(this.doc,e)}else i=e;return Xn(this,i,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-qt(i):0)},defaultTextHeight:function(){return li(this.display)},defaultCharWidth:function(){return ci(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,o){var r,a,s,l=this.display,c=(e=Qn(this,ft(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==i)c=e.top;else if("above"==i||"near"==i){var d=Math.max(l.wrapper.clientHeight,this.doc.height),f=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==o?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(r=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Ii(r,a)).scrollTop&&Wi(r,s.scrollTop),null!=s.scrollLeft&&zi(r,s.scrollLeft))},triggerOnKeyDown:ao(ha),triggerOnKeyPress:ao(ba),triggerOnKeyUp:ga,triggerOnMouseDown:ao(wa),execCommand:function(e){if(aa.hasOwnProperty(e))return aa[e].call(null,this)},triggerElectric:ao((function(e){Na(this,e)})),findPosH:function(e,t,n,i){var o=1;t<0&&(o=-1,t=-t);for(var r=ft(this.doc,e),a=0;a<t&&!(r=Ba(this.doc,r,o,n,i)).hitSide;++a);return r},moveH:ao((function(e,t){var n=this;this.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?Ba(n.doc,i.head,e,t,n.options.rtlMoveVisually):e<0?i.from():i.to()}),X)})),deleteH:ao((function(e,t){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):na(this,(function(n){var o=Ba(i,n.head,e,t,!1);return e<0?{from:o,to:n.head}:{from:n.head,to:o}}))})),findPosV:function(e,t,n,i){var o=1,r=i;t<0&&(o=-1,t=-t);for(var a=ft(this.doc,e),s=0;s<t;++s){var l=Qn(this,a,"div");if(null==r?r=l.left:l.left=r,(a=Ka(this,l,o,n)).hitSide)break}return a},moveV:ao((function(e,t){var n=this,i=this.doc,o=[],r=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(a){if(r)return e<0?a.from():a.to();var s=Qn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),o.push(s.left);var l=Ka(n,s,e,t);return"page"==t&&a==i.sel.primary()&&$i(n,Yn(n,l,"div").top-s.top),l}),X),o.length)for(var a=0;a<i.sel.ranges.length;a++)i.sel.ranges[a].goalColumn=o[a]})),findWordAt:function(e){var t=Ye(this.doc,e.line).text,n=e.ch,i=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=t.length||!n?++i:--n;for(var r=t.charAt(n),a=re(r,o)?function(e){return re(e,o)}:/\s/.test(r)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!re(e)};n>0&&a(t.charAt(n-1));)--n;for(;i<t.length&&a(t.charAt(i));)++i}return new Eo(rt(e.line,n),rt(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?I(this.display.cursorDiv,"CodeMirror-overwrite"):D(this.display.cursorDiv,"CodeMirror-overwrite"),ye(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==T(L(this))},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ao((function(e,t){Ai(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Mn(this)-this.display.barHeight,width:e.scrollWidth-Mn(this)-this.display.barWidth,clientHeight:Tn(this),clientWidth:Fn(this)}},scrollIntoView:ao((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:rt(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Li(e),e.curOp.scrollToPos=t}(this,e):Ni(this,e.from,e.to,e.margin)})),setSize:ao((function(e,t){var n=this,i=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=i(e)),null!=t&&(this.display.wrapper.style.height=i(t)),this.options.lineWrapping&&Kn(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){bi(n,o,"widget");break}++o})),this.curOp.forceUpdate=!0,ye(this,"refresh",this)})),operation:function(e){return oo(this,e)},startOperation:function(){return Yi(this)},endOperation:function(){return Qi(this)},refresh:ao((function(){var e=this.display.cachedTextHeight;gi(this),this.curOp.forceUpdate=!0,Un(this),Ai(this,this.doc.scrollLeft,this.doc.scrollTop),ho(this.display),(null==e||Math.abs(e-li(this.display))>.5||this.options.lineWrapping)&&pi(this),ye(this,"refresh",this)})),swapDoc:ao((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Vo(this,e),Un(this),this.display.input.reset(),Ai(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,pn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ke(e),e.registerHelper=function(t,i,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][i]=o},e.registerGlobalHelper=function(t,i,o,r){e.registerHelper(t,i,r),n[t]._global.push({pred:o,val:r})}}(Fa);var Ya="iter insert remove copy getEditor constructor".split(" ");for(var Qa in Rr.prototype)Rr.prototype.hasOwnProperty(Qa)&&U(Ya,Qa)<0&&(Fa.prototype[Qa]=function(e){return function(){return e.apply(this.doc,arguments)}}(Rr.prototype[Qa]));return ke(Rr),Fa.inputStyles={textarea:Ja,contenteditable:Ua},Fa.defineMode=function(e){Fa.defaults.mode||"null"==e||(Fa.defaults.mode=e),ze.apply(this,arguments)},Fa.defineMIME=function(e,t){Ve[e]=t},Fa.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Fa.defineMIME("text/plain","null"),Fa.defineExtension=function(e,t){Fa.prototype[e]=t},Fa.defineDocExtension=function(e,t){Rr.prototype[e]=t},Fa.fromTextArea=function(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=T(N(e));t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function i(){e.value=s.getValue()}var o;if(e.form&&(ge(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var r=e.form;o=r.submit;try{var a=r.submit=function(){i(),r.submit=o,r.submit(),r.submit=a}}catch(e){}}t.finishInit=function(n){n.save=i,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,i(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",i),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var s=Fa((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=ve,e.on=ge,e.wheelEventPixels=So,e.Doc=Rr,e.splitLines=Re,e.countColumn=B,e.findColumn=J,e.isWordChar=oe,e.Pass=H,e.signal=ye,e.Line=Yt,e.changeEnd=Fo,e.scrollbarModel=qi,e.Pos=rt,e.cmpPos=at,e.modes=We,e.mimeModes=Ve,e.resolveMode=Be,e.getMode=Ke,e.modeExtensions=Ue,e.extendMode=He,e.copyState=Ge,e.startState=Xe,e.innerMode=qe,e.commands=aa,e.keyMap=qr,e.keyName=ea,e.isModifierKey=Qr,e.lookupKey=Yr,e.normalizeKeyMap=Jr,e.StringStream=Je,e.SharedTextMarker=Fr,e.TextMarker=jr,e.LineWidget=Dr,e.e_preventDefault=Oe,e.e_stopPropagation=Ce,e.e_stop=De,e.addClass=I,e.contains=F,e.rmClass=D,e.keyNames=Kr}(Fa),Fa.version="5.65.20",Fa}()},"584a":function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},"5b4e":function(e,t,n){var i=n("36c3"),o=n("b447"),r=n("0fc9");e.exports=function(e){return function(t,n,a){var s,l=i(t),c=o(l.length),u=r(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},"5c95":function(e,t,n){var i=n("35e8");e.exports=function(e,t,n){for(var o in t)n&&e[o]?e[o]=t[o]:i(e,o,t[o]);return e}},"5ca1":function(e,t,n){var i=n("7726"),o=n("8378"),r=n("32e9"),a=n("2aba"),s=n("9b43"),l=function(e,t,n){var c,u,d,f,p=e&l.F,m=e&l.G,h=e&l.S,g=e&l.P,b=e&l.B,v=m?i:h?i[t]||(i[t]={}):(i[t]||{}).prototype,y=m?o:o[t]||(o[t]={}),_=y.prototype||(y.prototype={});for(c in m&&(n=t),n)d=((u=!p&&v&&void 0!==v[c])?v:n)[c],f=b&&u?s(d,i):g&&"function"==typeof d?s(Function.call,d):d,v&&a(v,c,d,e&l.U),y[c]!=d&&r(y,c,f),g&&_[c]!=d&&(_[c]=d)};i.core=o,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},"5cc5":function(e,t,n){var i=n("2b4c")("iterator"),o=!1;try{var r=[7][i]();r.return=function(){o=!0},Array.from(r,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},e(r)}catch(e){}return n}},"5dbc":function(e,t,n){var i=n("d3f4"),o=n("8b97").set;e.exports=function(e,t,n){var r,a=t.constructor;return a!==n&&"function"==typeof a&&(r=a.prototype)!==n.prototype&&i(r)&&o&&o(e,r),e}},"5df0":function(e,t,n){"use strict";n("85a4")},"5df3":function(e,t,n){"use strict";var i=n("02f4")(!0);n("01f9")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=i(t,n),this._i+=e.length,{value:e,done:!1})}))},"5e15":function(e,t,n){"use strict";var i=n("aa47"),o=n("23ca");function r(e,t){this.$nextTick(()=>this.$emit(e.toLowerCase(),t))}function a(e){return t=>{null!==this.realList&&this["onDrag"+e](t),r.call(this,e,t)}}function s(e){return["transition-group","TransitionGroup"].includes(e)}function l(e,t,n){return e[n]||(t[n]?t[n]():void 0)}const c=["Start","Add","Remove","Update","End"],u=["Choose","Unchoose","Sort","Filter","Clone"],d=["Move",...c,...u].map(e=>"on"+e);var f=null;const p={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1}),render(e){const t=this.$slots.default;this.transitionMode=function(e){if(!e||1!==e.length)return!1;const[{componentOptions:t}]=e;return!!t&&s(t.tag)}(t);const{children:n,headerOffset:i,footerOffset:o}=function(e,t,n){let i=0,o=0;const r=l(t,n,"header");r&&(i=r.length,e=e?[...r,...e]:[...r]);const a=l(t,n,"footer");return a&&(o=a.length,e=e?[...e,...a]:[...a]),{children:e,headerOffset:i,footerOffset:o}}(t,this.$slots,this.$scopedSlots);this.headerOffset=i,this.footerOffset=o;const r=function(e,t){let n=null;const i=(e,t)=>{n=function(e,t,n){return void 0===n||((e=e||{})[t]=n),e}(n,e,t)};if(i("attrs",Object.keys(e).filter(e=>"id"===e||e.startsWith("data-")).reduce((t,n)=>(t[n]=e[n],t),{})),!t)return n;const{on:o,props:r,attrs:a}=t;return i("on",o),i("props",r),Object.assign(n.attrs,a),n}(this.$attrs,this.componentData);return e(this.getTag(),r,n)},created(){null!==this.list&&null!==this.value&&o.b.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&o.b.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&o.b.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted(){if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error("Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: "+this.getTag());const e={};c.forEach(t=>{e["on"+t]=a.call(this,t)}),u.forEach(t=>{e["on"+t]=r.bind(this,t)});const t=Object.keys(this.$attrs).reduce((e,t)=>(e[Object(o.a)(t)]=this.$attrs[t],e),{}),n=Object.assign({},this.options,t,e,{onMove:(e,t)=>this.onDragMove(e,t)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new i.default(this.rootContainer,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer(){return this.transitionMode?this.$el.children[0]:this.$el},realList(){return this.list?this.list:this.value}},watch:{options:{handler(e){this.updateOptions(e)},deep:!0},$attrs:{handler(e){this.updateOptions(e)},deep:!0},realList(){this.computeIndexes()}},methods:{getIsFunctional(){const{fnOptions:e}=this._vnode;return e&&e.functional},getTag(){return this.tag||this.element},updateOptions(e){for(var t in e){const n=Object(o.a)(t);-1===d.indexOf(n)&&this._sortable.option(n,e[t])}},getChildrenNodes(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;const e=this.$slots.default;return this.transitionMode?e[0].child.$slots.default:e},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=function(e,t,n,i){if(!e)return[];const o=e.map(e=>e.elm),r=t.length-i,a=[...t].map((e,t)=>t>=r?o.length:o.indexOf(e));return n?a.filter(e=>-1!==e):a}(this.getChildrenNodes(),this.rootContainer.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(e){const t=function(e,t){return e.map(e=>e.elm).indexOf(t)}(this.getChildrenNodes()||[],e);if(-1===t)return null;return{index:t,element:this.realList[t]}},getUnderlyingPotencialDraggableComponent:({__vue__:e})=>e&&e.$options&&s(e.$options._componentTag)?e.$parent:!("realList"in e)&&1===e.$children.length&&"realList"in e.$children[0]?e.$children[0]:e,emitChanges(e){this.$nextTick(()=>{this.$emit("change",e)})},alterList(e){if(this.list)return void e(this.list);const t=[...this.value];e(t),this.$emit("input",t)},spliceList(){this.alterList(e=>e.splice(...arguments))},updatePosition(e,t){this.alterList(n=>n.splice(t,0,n.splice(e,1)[0]))},getRelatedContextFromMoveEvent({to:e,related:t}){const n=this.getUnderlyingPotencialDraggableComponent(e);if(!n)return{component:n};const i=n.realList,o={list:i,component:n};if(e!==t&&i&&n.getUnderlyingVm){const e=n.getUnderlyingVm(t);if(e)return Object.assign(e,o)}return o},getVmIndex(e){const t=this.visibleIndexes,n=t.length;return e>n-1?n:t[e]},getComponent(){return this.$slots.default[0].componentInstance},resetTransitionData(e){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[e].data=null;const t=this.getComponent();t.children=[],t.kept=void 0},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),f=e.item},onDragAdd(e){const t=e.item._underlying_vm_;if(void 0===t)return;Object(o.d)(e.item);const n=this.getVmIndex(e.newIndex);this.spliceList(n,0,t),this.computeIndexes();const i={element:t,newIndex:n};this.emitChanges({added:i})},onDragRemove(e){if(Object(o.c)(this.rootContainer,e.item,e.oldIndex),"clone"===e.pullMode)return void Object(o.d)(e.clone);const t=this.context.index;this.spliceList(t,1);const n={element:this.context.element,oldIndex:t};this.resetTransitionData(t),this.emitChanges({removed:n})},onDragUpdate(e){Object(o.d)(e.item),Object(o.c)(e.from,e.item,e.oldIndex);const t=this.context.index,n=this.getVmIndex(e.newIndex);this.updatePosition(t,n);const i={element:this.context.element,oldIndex:t,newIndex:n};this.emitChanges({moved:i})},updateProperty(e,t){e.hasOwnProperty(t)&&(e[t]+=this.headerOffset)},computeFutureIndex(e,t){if(!e.element)return 0;const n=[...t.to.children].filter(e=>"none"!==e.style.display),i=n.indexOf(t.related),o=e.component.getVmIndex(i);return-1!==n.indexOf(f)||!t.willInsertAfter?o:o+1},onDragMove(e,t){const n=this.move;if(!n||!this.realList)return!0;const i=this.getRelatedContextFromMoveEvent(e),o=this.context,r=this.computeFutureIndex(i,e);Object.assign(o,{futureIndex:r});return n(Object.assign({},e,{relatedContext:i,draggedContext:o}),t)},onDragEnd(){this.computeIndexes(),f=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",p),t.a=p},"5e3d":function(e,t,n){"use strict";n("a512")},"5eda":function(e,t,n){var i=n("5ca1"),o=n("8378"),r=n("79e5");e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),i(i.S+i.F*r((function(){n(1)})),"Object",a)}},"5f1b":function(e,t,n){"use strict";var i=n("23c6"),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==i(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},"5f53":function(e,t,n){"use strict";n("d00c")},"5f72":function(e,t){e.exports=require("element-ui")},"613b":function(e,t,n){var i=n("5537")("keys"),o=n("ca5a");e.exports=function(e){return i[e]||(i[e]=o(e))}},"626a":function(e,t,n){var i=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},"62a0":function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},"62e4":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"63b6":function(e,t,n){var i=n("e53d"),o=n("584a"),r=n("d864"),a=n("35e8"),s=n("07e3"),l=function(e,t,n){var c,u,d,f=e&l.F,p=e&l.G,m=e&l.S,h=e&l.P,g=e&l.B,b=e&l.W,v=p?o:o[t]||(o[t]={}),y=v.prototype,_=p?i:m?i[t]:(i[t]||{}).prototype;for(c in p&&(n=t),n)(u=!f&&_&&void 0!==_[c])&&s(v,c)||(d=u?_[c]:n[c],v[c]=p&&"function"!=typeof _[c]?n[c]:g&&u?r(d,i):b&&_[c]==d?function(e){var t=function(t,n,i){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,i)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):h&&"function"==typeof d?r(Function.call,d):d,h&&((v.virtual||(v.virtual={}))[c]=d,e&l.R&&y&&!y[c]&&a(y,c,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},"64dc":function(e,t,n){"use strict";n("e19c")},"656e":function(e,t,n){"use strict";var i=n("79aa");function o(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)}e.exports.f=function(e){return new o(e)}},6718:function(e,t,n){var i=n("e53d"),o=n("584a"),r=n("b8e3"),a=n("ccb9"),s=n("d9f6").f;e.exports=function(e){var t=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},6762:function(e,t,n){"use strict";var i=n("5ca1"),o=n("c366")(!0);i(i.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},"67ab":function(e,t,n){var i=n("ca5a")("meta"),o=n("d3f4"),r=n("69a8"),a=n("86cc").f,s=0,l=Object.isExtensible||function(){return!0},c=!n("79e5")((function(){return l(Object.preventExtensions({}))})),u=function(e){a(e,i,{value:{i:"O"+ ++s,w:{}}})},d=e.exports={KEY:i,NEED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!r(e,i)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[i].i},getWeak:function(e,t){if(!r(e,i)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[i].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!r(e,i)&&u(e),e}}},"67c8":function(e,t,n){"use strict";n.r(t);n("a481"),n("7f7f");var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("75fc")),r=(n("6b54"),n("28a5"),n("b76a")),a=n.n(r),s=n("6b69"),l=n("2ef0"),c=n.n(l),u=n("0f01"),d=n("4260");function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m={components:{WidgetElementItem:s.a},props:["element","select","index","data","platform","formKey"],data:function(){return{selectWidget:this.select||{}}},methods:{handleMouseover:function(e){Object(d.a)(this.$refs.widgetTableItem,"is-hover")},handleMouseout:function(e){Object(d.j)(this.$refs.widgetTableItem,"is-hover")},handleSelectWidget:function(e){this.selectWidget=this.data[e]},handleWidgetDelete:function(e){var t=this;1==this.data.length?this.$emit("select-change",-1):this.data.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((function(){t.data.splice(e,1),setTimeout((function(){u.a.$emit("on-history-add-"+t.formKey)}),20)}))},handleWidgetClone:function(e){var t=this,n=Math.random().toString(36).slice(-8),i=p(p({},c.a.cloneDeep(this.data[e])),{},{key:n,model:this.data[e].type+"_"+n});this.data.splice(e+1,0,i),this.$nextTick((function(){t.selectWidget=t.data[e+1],t.$nextTick((function(){u.a.$emit("on-history-add-"+t.formKey)}))}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!1}}},h=n("2877"),g=Object(h.a)(m,(function(){var e,t=this,n=t._self._c;return t.element&&t.element.key?n("div",{ref:"widgetTableItem",staticClass:"widget-table-view",class:{active:t.selectWidget.key==t.element.key,is_req:t.element.options.required,is_hidden:t.element.options.hidden,mobile:"mobile"==t.platform},style:{width:"mobile"!=t.platform?t.element.options.width?t.element.options.width:"200px":""},on:{click:function(e){return e.stopPropagation(),t.handleSelectWidget(t.index)},mouseover:function(e){return e.stopPropagation(),t.handleMouseover.apply(null,arguments)},mouseout:t.handleMouseout}},["mobile"!=t.platform?n("el-table",{attrs:{"row-class-name":"widget-table-row",data:[{}]}},[n("el-table-column",{attrs:{label:t.element.options.hideLabel?"":t.element.name,"class-name":null===(e=t.element.options)||void 0===e?void 0:e.customClass,"label-class-name":t.element.options.required?"required":""}},[n("widget-element-item",{attrs:{element:t.element,"is-table":!0}})],1)],1):t._e(),"mobile"==t.platform?n("el-form-item",{class:Object(i.a)(Object(i.a)({},t.element.options&&t.element.options.customClass,!!t.element.options.customClass),"fm-label-wrap",t.element.options.labelWrap),attrs:{label:t.element.options.hideLabel?"":t.element.name,"label-width":t.element.options.hideLabel?"0px":t.element.options.isLabelWidth?t.element.options.labelWidth+"px":""}},[n("widget-element-item",{attrs:{element:t.element,"is-table":!0}})],1):t._e(),t.selectWidget.key==t.element.key?n("div",{staticClass:"widget-view-action"},[n("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:t.$t("fm.tooltip.clone")},on:{click:function(e){return e.stopPropagation(),t.handleWidgetClone(t.index)}}}),n("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:t.$t("fm.tooltip.trash")},on:{click:function(e){return e.stopPropagation(),t.handleWidgetDelete(t.index)}}})]):t._e(),t.selectWidget.key==t.element.key?n("div",{staticClass:"widget-view-drag"},[n("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):t._e(),n("div",{staticClass:"widget-view-model",style:{color:t.element.options.dataBind?"":"#666"}},[n("span",[t._v(t._s(t.element.model))])]),n("div",{staticClass:"widget-view-type"},[n("span",[t._v(t._s(t.element.type?this.$t("fm.components.fields."+t.element.type):""))])])],1):t._e()}),[],!1,null,null,null).exports,b=n("ca17");function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _={components:{Draggable:a.a,WidgetTableItem:g},props:["element","select","index","data","platform","formKey"],inject:["setDragging","getDragging"],data:function(){return{selectWidget:this.select||{},columnsWidthStyle:"200px"}},computed:{widgetTableLeftWidth:function(){var e=1;return this.element.options.showControl&&(e+=50),this.element.options.selection&&(e+=50),e+"px"}},mounted:function(){this.calcTableColumnsWidth()},methods:{handleMouseover:function(e){!this.getDragging()&&Object(d.a)(this.$refs.widgetTable,"is-hover")},handleMouseout:function(e){Object(d.j)(this.$refs.widgetTable,"is-hover")},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){u.a.$emit("on-history-add-"+t.formKey)}),20)},handleTableClone:function(e){var t=this,n=c.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(b.a)(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){u.a.$emit("on-history-add-"+t.formKey)}))}))},handleWidgetTableUpdate:function(e){var t=this;this.$nextTick((function(){u.a.$emit("on-history-add-"+t.formKey)}))},calcTableColumnsWidth:function(){this.columnsWidthStyle="calc(200px)";for(var e=[],t=0;t<this.element.tableColumns.length;t++)this.element.tableColumns[t].options.width?e.push(this.element.tableColumns[t].options.width):e.push("200px");e.length&&(this.columnsWidthStyle="calc(200px + ".concat(e.join(" + "),")"))},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-col")>=0||n.className.split(" ").indexOf("widget-table")>=0||n.className.split(" ").indexOf("widget-tab")>=0||n.className.split(" ").indexOf("widget-report")>=0||n.className.split(" ").indexOf("widget-inline")>=0||n.className.split(" ").indexOf("widget-subform")>=0||n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("widget-card")>=0||n.className.split(" ").indexOf("widget-group")>=0||n.className.split(" ").indexOf("no-put")>=0||n.children[0].className.split(" ").indexOf("no-put")>=0)},handleWidgetTableAdd:function(e,t){var n=this,i=e.newIndex,r=Math.random().toString(36).slice(-8);this.$set(t.tableColumns,i,c.a.cloneDeep(t.tableColumns[i])),this.$set(t.tableColumns,i,y(y({},t.tableColumns[i]),{},{options:y(y({},t.tableColumns[i].options),{},{remoteFunc:t.tableColumns[i].options.remoteFunc||"func_"+r,remoteOption:t.tableColumns[i].options.remoteOption||"option_"+r,tableColumn:!0,subform:!!this.subform}),novalid:y({},t.tableColumns[i].novalid),key:t.tableColumns[i].key?t.tableColumns[i].key:r,model:t.tableColumns[i].model?t.tableColumns[i].model:t.tableColumns[i].type+"_"+r,rules:t.tableColumns[i].rules?Object(o.a)(t.tableColumns[i].rules):[]})),this.selectWidget=t.tableColumns[i],this.$nextTick((function(){u.a.$emit("on-history-add-"+n.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?n.element.tableColumns[e]:n.data.list[n.index]}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!1,handler:function(e){this.$emit("update:select",e)}},element:{deep:!0,handler:function(e){this.calcTableColumnsWidth()}}}},w=Object(h.a)(_,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetTable",staticClass:"widget-table widget-view",class:{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden,mobile:"mobile"==e.platform},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-form-item",{class:Object(i.a)(Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),"fm-label-wrap",e.element.options.labelWrap),attrs:{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":""}},[e.element.options.tip?t("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:e._s(e.element.options.tip.replace(/\n/g,"<br/>"))}}):e._e(),t("div",{staticClass:"widget-table-wrapper",class:{mobile:"mobile"==e.platform}},["mobile"!=e.platform?t("el-table",{staticClass:"widget-table-left",style:{width:e.widgetTableLeftWidth},attrs:{data:[{}],"row-class-name":"widget-table-row"}},[e.element.options.selection?t("el-table-column",{attrs:{fixed:"",type:"selection",width:"50"}}):e._e(),e.element.options.showControl?t("el-table-column",{attrs:{label:"#",width:"50",fixed:""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.$index+1))]}}],null,!1,811300409)}):e._e()],1):e._e(),"mobile"==e.platform?t("div",{staticClass:"widget-table-top"},[e.element.options.selection?t("el-checkbox",{staticStyle:{"margin-right":"10px"}}):e._e(),e._v("\n # 1\n ")],1):e._e(),t("div",{staticClass:"widget-table-content",class:{mobile:"mobile"==e.platform}},[0==e.element.tableColumns.length?t("div",{staticClass:"table-empty"},[e._v(e._s(e.$t("fm.description.tableEmpty")))]):e._e(),t("draggable",e._b({attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetTableAdd(t,e.element)},update:e.handleWidgetTableUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:e.element.tableColumns,callback:function(t){e.$set(e.element,"tableColumns",t)},expression:"element.tableColumns"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[t("transition-group",{staticClass:"widget-table-col",style:{width:"mobile"!=e.platform?e.columnsWidthStyle:"100%"},attrs:{name:"fade",tag:"div"}},e._l(e.element.tableColumns,(function(n,i){return n.key?t("widget-table-item",{key:n.key,attrs:{element:n,tableElement:e.element,select:e.selectWidget,index:i,data:e.element.tableColumns,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):e._e()})),1)],1)],1)],1)]),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleTableClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-col-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])],1)}),[],!1,null,null,null);t.default=w.exports},6821:function(e,t,n){var i=n("626a"),o=n("be13");e.exports=function(e){return i(o(e))}},6919:function(e,t,n){},"696e":function(e,t,n){n("c207"),n("1654"),n("6c1c"),n("24c5"),n("3c11"),n("43fc"),e.exports=n("584a").Promise},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"69d3":function(e,t,n){n("6718")("asyncIterator")},"6a99":function(e,t,n){var i=n("d3f4");e.exports=function(e,t){if(!i(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!i(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!i(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},"6abf":function(e,t,n){var i=n("e6f3"),o=n("1691").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},"6b4c":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"6b54":function(e,t,n){"use strict";n("3846");var i=n("cb7c"),o=n("0bfb"),r=n("9e1e"),a=/./.toString,s=function(e){n("2aba")(RegExp.prototype,"toString",e,!0)};n("79e5")((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var e=i(this);return"/".concat(e.source,"/","flags"in e?e.flags:!r&&e instanceof RegExp?o.call(e):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},"6b69":function(e,t,n){"use strict";n("8e6e"),n("ac6a"),n("cadf"),n("456d");var i=n("bd86");function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n("6b54");var a=n("c7f0"),s=n("8bbf"),l=n.n(s),c=n("6ca6"),u={components:{FmUpload:a.a},props:["element","isTable"],data:function(){return{key:Math.random().toString(36).slice(-8),elementKey:Math.random().toString(36).slice(-8)}},computed:{elementDisabled:function(){return!!Object(c.c)(this.element.options.disabled)||this.element.options.disabled},extendProps:function(){var e=this,t={};return this.element.options.extendProps&&Object.keys(this.element.options.extendProps).forEach((function(n){var i=e.element.options.extendProps[n];Object(c.c)(i)?t[n]=Object(c.a)(Object(c.b)(i),e.currentOptions,e.formContext):t[n]=i})),t}},created:function(){"component"==this.element.type&&l.a.component("component-".concat(this.element.key),{template:"<span>".concat(this.element.options.template,"</span>"),props:["dataModel","formState"]})},watch:{"element.options.template":function(e){l.a.component("component-".concat(this.element.key),{template:"<span>".concat(e,"</span>"),props:["dataModel","formState"]}),this.key=Math.random().toString(36).slice(-8)},"element.options.defaultValue":function(e){this.elementKey=Math.random().toString(36).slice(-8)}}},d=n("2877"),f=Object(d.a)(u,(function(){var e=this,t=e._self._c;return t("span",["input"==e.element.type?[t("el-input",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{placeholder:e.$t(e.element.options.placeholder),disabled:e.elementDisabled,"show-password":e.element.options.showPassword,maxlength:e.element.options.maxlength,"show-word-limit":e.element.options.showWordLimit},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-input",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"textarea"==e.element.type?[t("el-input",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{type:"textarea",rows:e.element.options.rows,disabled:e.elementDisabled,placeholder:e.$t(e.element.options.placeholder),maxlength:e.element.options.maxlength,"show-word-limit":e.element.options.showWordLimit,autosize:e.element.options.autosize},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-input",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"number"==e.element.type?[t("el-input-number",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled,"controls-position":e.element.options.controlsPosition,precision:e.element.options.precision,controls:e.element.options.controls},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-input-number",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"radio"==e.element.type?[t("el-radio-group",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-radio-group",r(r({},e.element.options.customProps),e.extendProps),!1),e._l(e.element.options.options,(function(n,i){return t("el-radio",{key:n.value+i,style:{display:e.element.options.inline?"inline-block":"block"},attrs:{label:n.value}},[e._v("\n "+e._s(e.element.options.showLabel?e.$t(n.label):e.$t(n.value))+"\n ")])})),1)]:e._e(),"checkbox"==e.element.type?[t("el-checkbox-group",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-checkbox-group",r(r({},e.element.options.customProps),e.extendProps),!1),e._l(e.element.options.options,(function(n,i){return t("el-checkbox",{key:n.value+i,style:{display:e.element.options.inline?"inline-block":"block"},attrs:{label:n.value}},[e._v("\n "+e._s(e.element.options.showLabel?e.$t(n.label):e.$t(n.value))+"\n ")])})),1)]:e._e(),"time"==e.element.type?[t("el-time-picker",e._b({key:e.elementKey,style:{width:e.isTable?"100%":e.element.options.width},attrs:{"default-value":e.element.options.defaultValue,"is-range":e.element.options.isRange,placeholder:e.$t(e.element.options.placeholder),"start-placeholder":e.element.options.startPlaceholder,"end-placeholder":e.element.options.endPlaceholder,readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable,"value-format":e.element.options.format},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-time-picker",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"date"==e.element.type?[t("el-date-picker",e._b({key:e.elementKey,style:{width:e.isTable?"100%":e.element.options.width},attrs:{type:e.element.options.type,"is-range":e.element.options.isRange,placeholder:e.$t(e.element.options.placeholder),"start-placeholder":e.element.options.startPlaceholder,"end-placeholder":e.element.options.endPlaceholder,readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable,"value-format":e.element.options.timestamp?"timestamp":e.element.options.format,format:e.element.options.format},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-date-picker",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"rate"==e.element.type?[t("el-rate",e._b({style:{width:e.isTable?"100%":e.element.options.width,display:"inline-block"},attrs:{max:e.element.options.max,disabled:e.elementDisabled,"allow-half":e.element.options.allowHalf,"show-score":e.element.options.showScore},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-rate",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"color"==e.element.type?[t("el-color-picker",e._b({attrs:{disabled:e.elementDisabled,"show-alpha":e.element.options.showAlpha},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-color-picker",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"select"==e.element.type?[t("el-select",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled,multiple:e.element.options.multiple,clearable:e.element.options.clearable,placeholder:e.$t(e.element.options.placeholder)},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-select",r(r({},e.element.options.customProps),e.extendProps),!1),e._l(e.element.options.options,(function(n){return t("el-option",{key:n.value,attrs:{value:n.value,label:e.element.options.showLabel?e.$t(n.label):e.$t(n.value)}})})),1)]:e._e(),"switch"==e.element.type?[t("el-switch",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-switch",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"slider"==e.element.type?[t("el-slider",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{min:e.element.options.min,max:e.element.options.max,disabled:e.elementDisabled,step:e.element.options.step,"show-input":e.element.options.showInput,range:e.element.options.range},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-slider",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"imgupload"==e.element.type?[t("fm-upload",{style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled,width:e.element.options.size.width,height:e.element.options.size.height,token:"xxx",domain:"xxx"},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}})]:e._e(),"cascader"==e.element.type?[t("el-cascader",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{disabled:e.elementDisabled,clearable:e.element.options.clearable,placeholder:e.$t(e.element.options.placeholder),options:e.element.options.remote?[]:e.element.options.options,props:{multiple:e.element.options.multiple,checkStrictly:e.element.options.checkStrictly}},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"el-cascader",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"editor"==e.element.type?[t("vue-editor",{staticClass:"fm-editor",style:{width:e.isTable?"100%":e.element.options.width,cursor:e.elementDisabled?"no-drop":"",backgroundColor:e.elementDisabled?"#F5F7FA":""},attrs:{"editor-toolbar":e.element.options.customToolbar,disabled:e.elementDisabled},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}})]:e._e(),"blank"==e.element.type?[t("div",{staticStyle:{height:"50px",color:"#999",background:"#eee","line-height":"50px","text-align":"center"}},[e._v(e._s(e.element.model))])]:e._e(),"component"==e.element.type?[t("component-".concat(e.element.key),{key:e.key,tag:"component",style:{width:e.isTable?"100%":e.element.options.width},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}})]:e._e(),"custom"==e.element.type?[t(e.element.el,e._b({tag:"component",attrs:{width:e.element.options.width,height:e.element.options.height,placeholder:e.$t(e.element.options.placeholder),readonly:e.element.options.readonly,disabled:e.elementDisabled,editable:e.element.options.editable,clearable:e.element.options.clearable},model:{value:e.element.options.defaultValue,callback:function(t){e.$set(e.element.options,"defaultValue",t)},expression:"element.options.defaultValue"}},"component",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"text"==e.element.type?[t("span",{style:{width:e.isTable?"100%":e.element.options.width||"100%",display:"inline-block"}},[e._v(e._s(e.element.options.defaultValue))])]:e._e(),"html"==e.element.type?[t("span",{style:{width:e.isTable?"100%":e.element.options.width||"100%",display:"inline-block"},domProps:{innerHTML:e._s(e.element.options.defaultValue)}})]:e._e(),"fileupload"==e.element.type?[t("el-upload",{style:{width:e.isTable?"100%":e.element.options.width},attrs:{action:"https://jsonplaceholder.typicode.com/posts/",disabled:e.elementDisabled,limit:e.element.options.limit}},[t("el-button",{attrs:{size:"small",type:"primary"}},[e._v(e._s(e.$t("fm.actions.upload")))])],1)]:e._e(),"button"==e.element.type?[t("el-button",e._b({style:{width:e.element.options.width},attrs:{disabled:e.elementDisabled,type:e.element.options.buttonType,plain:e.element.options.buttonPlain,round:e.element.options.buttonRound,circle:e.element.options.buttonCircle}},"el-button",r(r({},e.element.options.customProps),e.extendProps),!1),[e._v("\n "+e._s(e.$t(e.element.options.buttonName))+"\n ")])]:e._e(),"link"==e.element.type?[t("el-link",e._b({attrs:{disabled:e.elementDisabled,type:e.element.options.linkType,underline:e.element.options.underline}},"el-link",r(r({},e.element.options.customProps),e.extendProps),!1),[e._v("\n "+e._s(e.$t(e.element.options.linkName))+"\n ")])]:e._e(),"steps"==e.element.type?[t("el-steps",e._b({style:{"line-height":"normal"},attrs:{active:e.element.options.defaultValue,space:e.element.options.space,direction:e.element.options.direction,"process-status":e.element.options.processStatus,"finish-status":e.element.options.finishStatus,"align-center":e.element.options.alignCenter,simple:e.element.options.simple}},"el-steps",r(r({},e.element.options.customProps),e.extendProps),!1),e._l(e.element.options.steps,(function(n,i){return t("el-step",{key:i,attrs:{title:e.$t(n.title),description:e.$t(n.description)}})})),1)]:e._e(),"pagination"==e.element.type?[t("el-pagination",e._b({attrs:{"current-page":e.element.options.defaultValue,"page-size":e.element.options.pageSize,"pager-count":e.element.options.pagerCount,disabled:e.elementDisabled,background:e.element.options.background,layout:"total, prev, pager, next",total:e.element.options.total},on:{"update:currentPage":function(t){return e.$set(e.element.options,"defaultValue",t)},"update:current-page":function(t){return e.$set(e.element.options,"defaultValue",t)}}},"el-pagination",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e(),"transfer"==e.element.type?[t("el-transfer",e._b({style:{width:e.isTable?"100%":e.element.options.width},attrs:{value:e.element.options.defaultValue,data:e.element.options.data,filterable:e.element.options.filterable,titles:e.$t(e.element.options.titles)}},"el-transfer",r(r({},e.element.options.customProps),e.extendProps),!1))]:e._e()],2)}),[],!1,null,null,null);t.a=f.exports},"6c1c":function(e,t,n){n("c367");for(var i=n("e53d"),o=n("35e8"),r=n("481b"),a=n("5168")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l<s.length;l++){var c=s[l],u=i[c],d=u&&u.prototype;d&&!d[a]&&o(d,a,c),r[c]=r.Array}},"6c59":function(e,t,n){"use strict";n("acc5")},"6c7b":function(e,t,n){var i=n("5ca1");i(i.P,"Array",{fill:n("36bd")}),n("9c6c")("fill")},"6c7c":function(e,t,n){"use strict";n("36eb")},"6ca6":function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return r}));var i=function(e){return/^\s*{{[\s\S]*?}}\s*$/.test(e)},o=function(e){var t=/^\s*{{([\s\S]*?)}}\s*$/.exec(e);return t?t[1]:""},r=function(e,t,n){try{return n?Function("args","return ".concat(e)).bind(n)(t):Function("args","return ".concat(e))(t)}catch(e){return null}}},"6d6a":function(e,t,n){"use strict";n("7f7f"),n("8e6e");var i=n("bd86"),o=(n("28a5"),n("456d"),n("20d6"),n("cadf"),n("5df3"),n("551c"),n("ac6a"),n("87b7")),r=n("908f"),a=n("bec1"),s=n("e66c"),l=n("9195"),c=n("d6ee"),u=n("093a"),d=n("9058"),f=n("2ef0"),p=n.n(f);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g={components:{GenerateColItem:r.default,GenerateFormItem:o.default,GenerateInline:l.default,GenerateReport:s.default,GenerateTabItem:a.default,GenerateCollapse:c.default,GenerateCard:u.default},props:["config","models","rules","element","remote","blanks","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","group","fieldNode","componentInstance"],data:function(){return{visible:this.element.options.visible,displayFields:{},dialogModel:this.models[this.element.model]||{},dialogDisabled:{},activeElement:""}},inject:["generateComponentInstance","deleteComponentInstance","getFormComponent","onFormHide","onFormDisplay"],created:function(){this._generateModel(this.element.list)},mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.element.model,this.$refs["generate-dialog-".concat(this.element.model)].$parent)},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.element.model)},provide:function(){return{setDialogData:this.setDialogData}},methods:{setDialogData:function(e,t){this.$set(this.dialogModel,t,e)},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.displayFields[e[n].model]=!e[n].options.hidden,e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.displayFields[e[n].model]=!e[n].options.hidden):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.displayFields[e[n].model]=!e[n].options.hidden):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.displayFields[e[n].model]=!e[n].options.hidden):("blank"==e[n].type?this.$set(this.dialogModel,e[n].model,"String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]):this.$set(this.dialogModel,e[n].model,this.models[this.element.model][e[n].model]||p.a.cloneDeep(e[n].options.defaultValue)),this.displayFields[e[n].model]=!e[n].options.hidden,this.dialogDisabled[e[n].model]=!e[n].options.disabled)},open:function(){var e=this;if(this.activeElement=document.activeElement,document.activeElement&&document.activeElement.blur(),this.visible=!0,this.element&&this.element.events&&this.element.events.onOpen){var t=this.element.events.onOpen;this.$nextTick((function(){e.eventFunction[t]({field:e.element.model,currentRef:e})}))}},close:function(){if(this.activeElement&&(this.activeElement.focus(),this.activeElement=""),this.visible=!1,this.element&&this.element.events&&this.element.events.onClose){var e=this.element.events.onClose;this.eventFunction[e]({field:this.element.model,currentRef:this})}},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},disabled:function(e,t){"string"==typeof e&&(e=[e]),this._setDisabled(this.element.list,e,t)},validate:function(){var e=this;return new Promise((function(t,n){var i=e._getAllRuleFields();Promise.all(i.map((function(t){return new Promise((function(n){e.getFormComponent().validateField(t,(function(e,t){n(t)}))}))}))).then((function(e){e.findIndex((function(e){return e}))>=0?n():t()}))}))},clearValidate:function(){var e=this._getAllRuleFields();this.getFormComponent().clearValidate(e)},handleCancel:function(){if(this.element&&this.element.events&&this.element.events.onCancel){var e=this.element.events.onCancel;this.eventFunction[e]({field:this.element.model,currentRef:this})}},handleConfirm:function(){if(this.element&&this.element.events&&this.element.events.onConfirm){var e=this.element.events.onConfirm;this.eventFunction[e]({field:this.element.model,currentRef:this})}},confirmLoading:function(e){this.element.options.confirmLoading=e},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.element.list,e,t)},setData:function(e){var t=this;return new Promise((function(n){t.$nextTick((function(){Object.keys(e).forEach((function(n){t.$set(t.dialogModel,n,e[n])})),n()}))}))},getValues:function(){return this.dialogModel},getValue:function(e){return this.dialogModel[e]},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.element.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.element.list,e.split("."),t,"remove")}))},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(e[o].options.disabled=n)},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):("inline"===e[o].type||"card"===e[o].type)&&i._setOptions(e[o].list,t,n),t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)},_getAllRuleFields:function(){var e=this,t=[];return Object.keys(this.dialogModel).forEach((function(n){Array.isArray(e.dialogModel[n])?e.dialogModel[n].forEach((function(i,o){Object.keys(i).forEach((function(i){e.componentInstance["".concat(e.element.model,".").concat(n,".").concat(o,".").concat(i)]&&t.push("".concat(e.element.model,".").concat(n,".").concat(o,".").concat(i))}))})):e.componentInstance["".concat(e.element.model,".").concat(n)]&&t.push("".concat(e.element.model,".").concat(n))})),t}},watch:{dialogModel:{deep:!0,handler:function(e){this.$emit("update:models",h(h({},this.models),{},Object(i.a)({},this.element.model,e)))}},models:{deep:!0,handler:function(e){this.dialogModel=this.models[this.element.model]}}}},b=(n("3459"),n("2877")),v=Object(b.a)(g,(function(){var e,t,n=this,i=n._self._c;return i("a-modal",{ref:"generate-dialog-".concat(n.element.model),style:{top:n.element.options.top||"15vh"},attrs:{title:n.element.options.title,width:n.element.options.width||"50%","mask-closable":!1,closable:n.element.options.showClose,"destroy-on-close":"","z-index":3e3,"wrap-class-name":"fm-generate-ant-dialog fm-form "+(n.element.options.showCancel||n.element.options.showOk?"":"no-footer ")+(n.element.options.center?"center ":"")+(null!==(e=n.element.options)&&void 0!==e&&e.customClass?null===(t=n.element.options)||void 0===t?void 0:t.customClass:"")},on:{cancel:n.close},scopedSlots:n._u([{key:"footer",fn:function(){return[i("div",[n.element.options.showCancel?i("a-button",{key:"back",on:{click:n.handleCancel}},[n._v(n._s(n.element.options.cancelText))]):n._e(),n.element.options.showOk?i("a-button",{key:"submit",attrs:{type:"primary",loading:n.element.options.confirmLoading},on:{click:n.handleConfirm}},[n._v(n._s(n.element.options.okText))]):n._e()],1)]},proxy:!0}]),model:{value:n.visible,callback:function(e){n.visible=e},expression:"visible"}},[i("div",[n._l(n.element.list,(function(e){return["grid"==e.type?i("generate-col-item",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"tabs"==e.type?i("generate-tab-item",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"collapse"==e.type?i("generate-collapse",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"report"==e.type?i("generate-report",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"card"==e.type?i("generate-card",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"inline"==e.type?i("generate-inline",{key:e.key,attrs:{model:n.dialogModel,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):i("generate-form-item",{key:e.key,attrs:{models:n.dialogModel,rules:n.rules,widget:e,remote:n.remote,blanks:n.blanks,display:n.displayFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-dialog":!0,"dialog-name":n.element.model,config:n.config,group:n.element.model,"field-node":n.element.model},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)})]}))],2)])}),[],!1,null,null,null);t.a=v.exports},"6ecf":function(e,t,n){},"6ee3":function(e,t,n){"use strict";n("15d7")},"70fb":function(e,t,n){"use strict";n("7f7f");var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("6b54"),n("28a5"),n("6b69")),r=n("2ef0"),a=n.n(r),s=n("0f01"),l=n("4260");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d={props:["element","select","index","data","formKey"],components:{WidgetElementItem:o.a},inject:["getDragging"],data:function(){return{selectWidget:this.select||{}}},mounted:function(){},methods:{getTip:function(e){var t=this;return e.split("\n").map((function(e){return t.$t(e)})).join("<br/>")},handleMouseover:function(e){!this.getDragging()&&Object(l.a)(this.$refs.widgetFormItem,"is-hover")},handleMouseout:function(e){Object(l.j)(this.$refs.widgetFormItem,"is-hover")},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.$nextTick((function(){t.data.list.splice(e,1),setTimeout((function(){s.a.$emit("on-history-add-"+t.formKey)}),20)}))},handleWidgetClone:function(e){var t=this,n=Math.random().toString(36).slice(-8),i=u(u({},a.a.cloneDeep(this.data.list[e])),{},{key:n,model:this.data.list[e].type+"_"+n});this.data.list.splice(e+1,0,i),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){s.a.$emit("on-history-add-"+t.formKey)}))}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{handler:function(e){this.$emit("update:select",e)},deep:!1}}},f=n("2877"),p=Object(f.a)(d,(function(){var e=this,t=e._self._c;return t("div",[e.element&&e.element.key&&"divider"!=e.element.type&&"alert"!=e.element.type?t("div",{ref:"widgetFormItem",staticClass:"widget-view",class:{active:e.selectWidget.key==e.element.key,is_req:e.element.options.required,is_hidden:e.element.options.hidden},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-form-item",{class:Object(i.a)(Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),"fm-label-wrap",e.element.options.labelWrap),attrs:{label:e.element.options.hideLabel?"":e.$t(e.element.name),"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":""}},[e.element.options.tip?t("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:e._s(e.getTip(e.element.options.tip))}}):e._e(),t("widget-element-item",{key:e.element.key,attrs:{element:e.element,"is-table":!1}})],1),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])],1):e._e(),e.element&&e.element.key&&("divider"==e.element.type||"alert"==e.element.type)?t("div",{ref:"widgetFormItem",staticClass:"widget-view no-put",class:{active:e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden},staticStyle:{"padding-bottom":"0"},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-form-item",{attrs:{"label-width":"0"}},["divider"==e.element.type?t("el-divider",e._b({attrs:{"content-position":e.element.options.contentPosition}},"el-divider",e.element.options.customProps,!1),[e._v("\n "+e._s(e.$t(e.element.name))+"\n ")]):e._e(),"alert"==e.element.type?t("el-alert",e._b({style:{width:e.element.options.width,whiteSpace:"pre-line"},attrs:{title:e.$t(e.element.options.title),type:e.element.options.type,description:e.$t(e.element.options.description),closable:e.element.options.closable,center:e.element.options.center,"show-icon":e.element.options.showIcon,effect:e.element.options.effect}},"el-alert",e.element.options.customProps,!1)):e._e()],1),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])],1):e._e()])}),[],!1,null,null,null);t.a=p.exports},"71c1":function(e,t,n){var i=n("3a38"),o=n("25eb");e.exports=function(e){return function(t,n){var r,a,s=String(o(t)),l=i(n),c=s.length;return l<0||l>=c?e?"":void 0:(r=s.charCodeAt(l))<55296||r>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):r:e?s.slice(l,l+2):a-56320+(r-55296<<10)+65536}}},7514:function(e,t,n){"use strict";var i=n("5ca1"),o=n("0a49")(5),r=!0;"find"in[]&&Array(1).find((function(){r=!1})),i(i.P+i.F*r,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("find")},"75fc":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("f410"),o=n.n(i);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var a=n("f921"),s=n.n(a),l=n("d8d6"),c=n.n(l),u=n("d2d5"),d=n.n(u);function f(e){return function(e){if(o()(e))return r(e)}(e)||function(e){if(void 0!==s.a&&null!=e[c.a]||null!=e["@@iterator"])return d()(e)}(e)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?d()(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},7618:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("f921"),o=n.n(i),r=n("d8d6"),a=n.n(r);function s(e){return(s="function"==typeof o.a&&"symbol"==typeof a.a?function(e){return typeof e}:function(e){return e&&"function"==typeof o.a&&e.constructor===o.a&&e!==o.a.prototype?"symbol":typeof e})(e)}},"765d":function(e,t,n){n("6718")("observable")},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(e,t,n){var i=n("4588"),o=Math.max,r=Math.min;e.exports=function(e,t){return(e=i(e))<0?o(e+t,0):r(e,t)}},"784d":function(e,t,n){},"794b":function(e,t,n){e.exports=!n("8e60")&&!n("294c")((function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a}))},"79aa":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"7a56":function(e,t,n){"use strict";var i=n("7726"),o=n("86cc"),r=n("9e1e"),a=n("2b4c")("species");e.exports=function(e){var t=i[e];r&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},"7a6e":function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=n("5531"),r=n("09cf"),a=n("6ca6"),s={name:"generate-card",components:{GenerateFormItem:o.default,GenerateInline:r.default,GenerateReport:function(){return Promise.resolve().then(n.bind(null,"4388"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"93bd"))},GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))}},props:["element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},computed:{padding:function(){return this.element.options.padding||"20px"},currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(a.c)(this.element.options.hidden)||!Object(a.a)(Object(a.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},methods:{},watch:{model:{deep:!0,handler:function(e){this.dataModels=e}}}},l=(n("c4f8"),n("2877")),c=Object(l.a)(s,(function(){var e,t,n=this,o=n._self._c;return n.elementDisplay?o("el-card",{class:Object(i.a)({},null===(e=n.element.options)||void 0===e?void 0:e.customClass,!(null===(t=n.element.options)||void 0===t||!t.customClass)),style:{width:n.element.options.width,"border-width":n.element.options.bordered?"1px":"0px","--padding":n.padding},attrs:{shadow:n.element.options.shadow,"body-style":{padding:n.element.options.padding}},scopedSlots:n._u([n.element.options.showHeader?{key:"header",fn:function(){return[o("div",[o("span",[n._v(n._s(n.$t(n.element.options.title)))])])]},proxy:!0}:null],null,!0)},[o("div",[n._l(n.element.list,(function(e){return["grid"==e.type?o("generate-col-item",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"tabs"==e.type?o("generate-tab-item",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"collapse"==e.type?o("generate-collapse",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"report"==e.type?o("generate-report",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"inline"==e.type?o("generate-inline",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):"card"==e.type?o("generate-card",{key:e.key,attrs:{model:n.dataModels,rules:n.rules,element:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)}):o("generate-form-item",{key:e.key,attrs:{models:n.dataModels,rules:n.rules,widget:e,remote:n.remote,blanks:n.blanks,display:n.display,"sub-hide-fields":n.subHideFields,"sub-disabled-fields":n.subDisabledFields,edit:n.edit,"remote-option":n.remoteOption,platform:n.platform,preview:n.preview,"container-key":n.containerKey,"data-source-value":n.dataSourceValue,"event-function":n.eventFunction,"print-read":n.printRead,"is-subform":n.isSubform,"row-index":n.rowIndex,"sub-name":n.subName,"is-dialog":n.isDialog,"dialog-name":n.dialogName,"is-group":n.isGroup,group:n.group,"field-node":n.fieldNode},scopedSlots:n._u([n._l(n.blanks,(function(e){return{key:e.name,fn:function(t){return[n._t(e.name,null,{model:t.model})]}}}))],null,!0)})]}))],2)]):n._e()}),[],!1,null,null,null);t.default=c.exports},"7a77":function(e,t,n){"use strict";function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},"7aac":function(e,t,n){"use strict";var i=n("c532");e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,o,r,a){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(o)&&s.push("path="+o),i.isString(r)&&s.push("domain="+r),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"7bbc":function(e,t,n){var i=n("6821"),o=n("9093").f,r={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==r.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(i(e))}},"7cd6":function(e,t,n){var i=n("40c3"),o=n("5168")("iterator"),r=n("481b");e.exports=n("584a").getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||r[i(e)]}},"7e90":function(e,t,n){var i=n("d9f6"),o=n("e4ae"),r=n("c3a1");e.exports=n("8e60")?Object.defineProperties:function(e,t){o(e);for(var n,a=r(t),s=a.length,l=0;s>l;)i.f(e,n=a[l++],t[n]);return e}},"7f20":function(e,t,n){var i=n("86cc").f,o=n("69a8"),r=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,r)&&i(e,r,{configurable:!0,value:t})}},"7f7f":function(e,t,n){var i=n("86cc").f,o=Function.prototype,r=/^\s*function ([^ (]*)/;"name"in o||n("9e1e")&&i(o,"name",{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(e){return""}}})},8079:function(e,t,n){var i=n("7726"),o=n("1991").set,r=i.MutationObserver||i.WebKitMutationObserver,a=i.process,s=i.Promise,l="process"==n("2d95")(a);e.exports=function(){var e,t,n,c=function(){var i,o;for(l&&(i=a.domain)&&i.exit();e;){o=e.fn,e=e.next;try{o()}catch(i){throw e?n():t=void 0,i}}t=void 0,i&&i.enter()};if(l)n=function(){a.nextTick(c)};else if(!r||i.navigator&&i.navigator.standalone)if(s&&s.resolve){var u=s.resolve(void 0);n=function(){u.then(c)}}else n=function(){o.call(i,c)};else{var d=!0,f=document.createTextNode("");new r(c).observe(f,{characterData:!0}),n=function(){f.data=d=!d}}return function(i){var o={fn:i,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},"811c":function(e,t,n){"use strict";n("17a4")},8125:function(e,t,n){"use strict";n("b6d8")},"81a6":function(e,t,n){},8378:function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},8436:function(e,t){e.exports=function(){}},"84f2":function(e,t){e.exports={}},"85a4":function(e,t,n){},"86a9":function(e,t,n){},"86cc":function(e,t,n){var i=n("cb7c"),o=n("c69a"),r=n("6a99"),a=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(i(e),t=r(t,!0),i(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},8791:function(e,t,n){"use strict";n.r(t);var i=n("bd86"),o=(n("8e6e"),n("cadf"),n("456d"),n("20d6"),n("ac6a"),n("5df3"),n("1c4c"),n("75fc")),r=(n("28a5"),n("6b54"),n("70fb")),a=n("67c8"),s=n("a141"),l=n("b76a"),c=n.n(l),u=n("2ef0"),d=n.n(u),f=n("ca17"),p=n("0f01"),m=n("4260");function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b={name:"widget-report",components:{Draggable:c.a,WidgetFormItem:r.a,WidgetTable:a.default,WidgetInline:s.a,WidgetColItem:function(){return Promise.resolve().then(n.bind(null,"956f"))},WidgetTabItem:function(){return Promise.resolve().then(n.bind(null,"1d67"))},WidgetSubForm:function(){return Promise.resolve().then(n.bind(null,"fa24"))},WidgetCollapse:function(){return Promise.resolve().then(n.bind(null,"ca11"))},WidgetCard:function(){return Promise.resolve().then(n.bind(null,"af3f"))},WidgetGroup:function(){return Promise.resolve().then(n.bind(null,"a071"))}},props:["element","select","index","data","platform","formKey","subform"],inject:["getDragging","setDragging"],data:function(){return{selectWidget:this.select||{},selectR:-1,selectC:-1,selectIndex:-1}},created:function(){this.element.headerRow||(this.element.headerRow=this.element.rows[0].columns.map((function(e){return{type:"th",options:{width:e.options.width},key:Math.random().toString(36).slice(-8)}})))},computed:{showRight:function(){if(this.selectR>=0&&this.selectC>=0){var e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan;if(this.selectC+t<this.element.rows[this.selectR].columns.length){var n=this.element.rows[this.selectR].columns[t+this.selectC];if(!n.options.invisible&&e==n.options.rowspan)return!0}}return!1},showBottom:function(){if(this.selectR>=0&&this.selectC>=0){var e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan;if(e+this.selectR<this.element.rows.length){var n=this.element.rows[e+this.selectR].columns[this.selectC];if(!n.options.invisible&&t==n.options.colspan)return!0}}return!1},showRemoveRow:function(){if(this.element.rows.length>1&&this.selectR>=0&&this.selectC>=0){var e=this.element.rows[this.selectR].columns[this.selectC].options.rowspan;if(1==e)return!0;for(var t=0;t<this.element.rows[this.selectR].columns.length;t++)if(e!=this.element.rows[this.selectR].columns[t].options.rowspan||this.element.rows[this.selectR].columns[t].options.invisible)return!1;if(this.element.rows[this.selectR].columns.length==t)return!0}return!1},showRemoveColumn:function(){if(this.selectR>=0&&this.selectC>=0&&this.element.rows[this.selectR].columns.length>1){var e=this.element.rows[this.selectR].columns[this.selectC].options.colspan;if(1==e)return!0;for(var t=0;t<this.element.rows.length;t++)if(e!=this.element.rows[t].columns[this.selectC].options.colspan||this.element.rows[t].columns[this.selectC].options.invisible)return!1;if(this.element.rows.length==t)return!0}return!1},showSplitColumn:function(){return this.selectR>=0&&this.selectC>=0&&this.element.rows[this.selectR].columns[this.selectC].options.colspan>1},showSplitRow:function(){return this.selectR>=0&&this.selectC>=0&&this.element.rows[this.selectR].columns[this.selectC].options.rowspan>1}},methods:{handleMouseover:function(e){!this.getDragging()&&Object(m.a)(this.$refs.widgetReport,"is-hover")},handleMouseout:function(e){Object(m.j)(this.$refs.widgetReport,"is-hover")},handleMouseoverTD:function(e,t){!this.getDragging()&&Object(m.a)(this.$refs["widgetTD_".concat(e,"_").concat(t)][0],"is-hover")},handleMouseoutTD:function(e,t){Object(m.j)(this.$refs["widgetTD_".concat(e,"_").concat(t)][0],"is-hover")},handleMouseoverTH:function(e){!this.getDragging()&&Object(m.a)(this.$refs["widgetTH_".concat(e)][0],"is-hover")},handleMouseoutTH:function(e){Object(m.j)(this.$refs["widgetTH_".concat(e)][0],"is-hover")},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("dialog-put")>=0||n.children[0].className.split(" ").indexOf("dialog-put")>=0)},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleSelectItemWidget:function(e,t){this.selectWidget=this.data.list[this.index].rows[e].columns[t],this.selectR=e,this.selectC=t},handleSelectHeaderWidget:function(e){this.selectWidget=this.data.list[this.index].headerRow[e]},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){p.a.$emit("on-history-add-"+t.formKey)}),20)},handleWidgetItemAdd:function(e,t,n,i){var r=e.newIndex;Object(m.d)(t.rows[n].columns[i].list,r);var a=Math.random().toString(36).slice(-8);this.$set(t.rows[n].columns[i].list,r,d.a.cloneDeep(t.rows[n].columns[i].list[r])),this.$set(t.rows[n].columns[i].list,r,g(g({},t.rows[n].columns[i].list[r]),{},{options:g(g({},t.rows[n].columns[i].list[r].options),{},{remoteFunc:t.rows[n].columns[i].list[r].options.remoteFunc||"func_"+a,remoteOption:t.rows[n].columns[i].list[r].options.remoteOption||"option_"+a,tableColumn:!1,hideLabel:!0,subform:!!this.subform}),key:t.rows[n].columns[i].list[r].key?t.rows[n].columns[i].list[r].key:a,model:t.rows[n].columns[i].list[r].model?t.rows[n].columns[i].list[r].model:t.rows[n].columns[i].list[r].type+"_"+a,rules:t.rows[n].columns[i].list[r].rules?Object(o.a)(t.rows[n].columns[i].list[r].rules):[]})),"report"==t.rows[n].columns[i].list[r].type&&(t.rows[n].columns[i].list[r].rows=Object(m.f)(t.rows[n].columns[i].list[r].rows),t.rows[n].columns[i].list[r].headerRow=Object(m.g)(t.rows[n].columns[i].list[r].headerRow)),"grid"==t.rows[n].columns[i].list[r].type&&(t.rows[n].columns[i].list[r].columns=Object(m.e)(t.rows[n].columns[i].list[r].columns)),this.selectWidget=t.rows[n].columns[i].list[r],p.a.$emit("on-history-add-"+this.formKey)},handleWidgetItemUpdate:function(){p.a.$emit("on-history-add-"+this.formKey)},handleReportClone:function(e){var t=this,n=d.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(f.a)(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))}))},handleAddRow:function(e){var t=this,n=this.data.list[e].rows[this.data.list[e].rows.length-1].columns.length;this.data.list[e].rows.push({columns:Array.from({length:n},(function(e){return{type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)}}))}),this.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))},handleAddColumns:function(e){var t=this;this.data.list[e].headerRow.push({type:"th",options:{width:""},key:Math.random().toString(36).slice(-8)}),this.data.list[e].rows.forEach((function(e){e.columns.push({type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)})})),this.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))},insertColumns:function(e){this.element.headerRow.splice(e,0,{type:"th",options:{width:""},key:Math.random().toString(36).slice(-8)});for(var t=0;t<this.element.rows.length;t++){var n=this.findPrevColIndex(t,e);if(n!=e&&this.element.rows[t].columns[e].options.invisible){this.element.rows[t].columns.splice(e,0,{type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:"",invisible:!0},key:Math.random().toString(36).slice(-8)});var i=this.element.rows[t].columns[n].options.colspan;this.element.rows[t].columns[n].options.colspan=i+1;for(var o=0;o<i+1;o++)this.element.rows[t].columns[n+o].options.markCol=o}else this.element.rows[t].columns.splice(e,0,{type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)})}},insertRow:function(e){for(var t=this,n=[],i=0;i<this.element.rows[0].columns.length;i++){var o=this.findPrevRowIndex(e,i);o!=e&&this.element.rows[e].columns[i].options.invisible?(n.push({type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:"",invisible:!0},key:Math.random().toString(36).slice(-8)}),this.element.rows[o].columns[i].options.rowspan=this.element.rows[o].columns[i].options.rowspan+1):n.push({type:"td",list:[],options:{customClass:"",colspan:1,rowspan:1,align:"left",valign:"top",width:"",height:""},key:Math.random().toString(36).slice(-8)})}this.element.rows.splice(e,0,{columns:n}),this.$nextTick((function(){for(var n=0;n<t.element.rows[e].columns.length;n++)if(t.element.rows[e].columns[n].options.invisible){var i=t.findPrevRowIndex(e-1,n);t.element.rows[i].columns[n].options.invisible||t.markTableItem(i,n)}}))},handleInsertLeft:function(){var e=this,t=this.selectC;this.insertColumns(t),this.selectC=this.selectC++,this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleInsertRight:function(){var e=this,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan>1?this.findNextColIndex(this.selectR,this.selectC+1):this.selectC+1;this.insertColumns(t),this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleInserBefore:function(){var e=this,t=this.selectR;this.insertRow(t),this.selectR=this.selectR++,this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleInserAfter:function(){var e=this,t=this.element.rows[this.selectR].columns[this.selectC].options.rowspan>1?this.findNextRowIndex(this.selectR+1,this.selectC):this.selectR+1;this.insertRow(t),this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},markTableItem:function(e,t){for(var n=this.element.rows[e].columns[t].options.colspan,i=this.element.rows[e].columns[t].options.rowspan,o=0;o<i;o++)for(var r=0;r<n;r++)this.element.rows[e+o].columns[t+r].options.markCol=r,this.element.rows[e+o].columns[t+r].options.markRow=o},handleRight:function(e){var t=this,n=e.options.colspan,i=this.selectC+n,r=this.element.rows[this.selectR].columns[i].options.colspan;this.$set(e.options,"colspan",n+r),this.element.rows[this.selectR].columns[i].options.invisible=!0;var a=Object(o.a)(this.element.rows[this.selectR].columns[i].list);this.element.rows[this.selectR].columns[i].list=[],e.list=e.list.concat(a),this.markTableItem(this.selectR,this.selectC),this.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))},handleBottom:function(e){var t=this,n=e.options.rowspan,i=this.selectR+n,r=this.element.rows[i].columns[this.selectC].options.rowspan;this.$set(e.options,"rowspan",n+r),this.element.rows[i].columns[this.selectC].options.invisible=!0;var a=Object(o.a)(this.element.rows[i].columns[this.selectC].list);this.element.rows[i].columns[this.selectC].list=[],e.list=e.list.concat(a),this.markTableItem(this.selectR,this.selectC),this.$nextTick((function(){p.a.$emit("on-history-add-"+t.formKey)}))},handleSplitColumn:function(){for(var e=this,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan,n=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,i=0;i<t;i++)this.element.rows[this.selectR].columns[this.selectC+i].options.invisible=!1,this.element.rows[this.selectR].columns[this.selectC+i].options.colspan=1,this.element.rows[this.selectR].columns[this.selectC+i].options.rowspan=n,this.markTableItem(this.selectR,this.selectC+i);this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleSplitRow:function(){for(var e=this,t=this.element.rows[this.selectR].columns[this.selectC].options.colspan,n=this.element.rows[this.selectR].columns[this.selectC].options.rowspan,i=0;i<n;i++)this.element.rows[this.selectR+i].columns[this.selectC].options.invisible=!1,this.element.rows[this.selectR+i].columns[this.selectC].options.rowspan=1,this.element.rows[this.selectR+i].columns[this.selectC].options.colspan=t,this.markTableItem(this.selectR+i,this.selectC);this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},findPrevRowIndex:function(e,t){return e>=this.element.rows.length||!this.element.rows[e].columns[t].options.markRow?e:this.findPrevRowIndex(e-1,t)},findPrevColIndex:function(e,t){return t>=this.element.rows[e].columns.length||!this.element.rows[e].columns[t].options.markCol?t:this.findPrevColIndex(e,t-1)},findNextColIndex:function(e,t){return t>=this.element.rows[e].columns.length||!this.element.rows[e].columns[t].options.markCol?t:this.findNextColIndex(e,t+1)},findNextRowIndex:function(e,t){return e>=this.element.rows.length||!this.element.rows[e].columns[t].options.markRow?e:this.findNextRowIndex(e+1,t)},handleRemoveRow:function(){for(var e=this,t=0;t<this.element.rows[this.selectR].columns.length;t++){var n=this.element.rows[this.selectR].columns[t].options.rowspan,i=this.element.rows[this.selectR].columns[t].options.colspan;if(this.element.rows[this.selectR].columns[t].options.invisible){var r=this.findPrevRowIndex(this.selectR,t);r!=this.selectR&&this.element.rows[r].columns[t].options.rowspan>1&&(this.element.rows[r].columns[t].options.rowspan=this.element.rows[r].columns[t].options.rowspan-1)}else n>1&&(this.element.rows[this.selectR+1].columns[t].list=Object(o.a)(this.element.rows[this.selectR].columns[t].list),this.element.rows[this.selectR+1].columns[t].options.invisible=!1,this.element.rows[this.selectR+1].columns[t].options.rowspan=n-1,this.element.rows[this.selectR+1].columns[t].options.colspan=i,this.markTableItem(this.selectR+1,t))}this.element.rows.splice(this.selectR,1),this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleRemoveColumn:function(){for(var e=this,t=0;t<this.element.rows.length;t++){var n=this.element.rows[t].columns[this.selectC].options.colspan,i=this.element.rows[t].columns[this.selectC].options.rowspan;if(this.element.rows[t].columns[this.selectC].options.invisible){var r=this.findPrevColIndex(t,this.selectC);r!=this.selectC&&this.element.rows[t].columns[r].options.colspan>1&&(this.element.rows[t].columns[r].options.colspan=this.element.rows[t].columns[r].options.colspan-1)}else n>1&&(this.element.rows[t].columns[this.selectC+1].list=Object(o.a)(this.element.rows[t].columns[this.selectC].list),this.element.rows[t].columns[this.selectC+1].options.invisible=!1,this.element.rows[t].columns[this.selectC+1].options.colspan=n-1,this.element.rows[t].columns[this.selectC+1].options.rowspan=i,this.markTableItem(t,this.selectC+1));this.element.rows[t].columns.splice(this.selectC,1)}this.element.headerRow.splice(this.selectC,1),this.$nextTick((function(){p.a.$emit("on-history-add-"+e.formKey)}))},handleSetColumnWidth:function(){this.selectWidget=this.data.list[this.index].headerRow[this.selectC]},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.list[e]:n.data.list[n.index]}))}},watch:{select:function(e){this.selectWidget=e,this.element.headerRow&&(this.selectIndex=this.element.headerRow.findIndex((function(t){return t.key===e.key})))},selectWidget:{deep:!1,handler:function(e){this.$emit("update:select",e),this.element.headerRow&&(this.selectIndex=this.element.headerRow.findIndex((function(t){return t.key===e.key})))}}}},v=n("2877"),y=Object(v.a)(b,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetReport",staticClass:"widget-report widget-view fm-report-table",class:{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("div",[t("table",{staticClass:"fm-report-table__table",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),style:{border:0,width:e.element.options.width||"auto"}},[t("tr",[e._l(e.element.headerRow,(function(n,i){return[t("th",{key:i,ref:"widgetTH_".concat(i),refInFor:!0,staticClass:"widget-report-item widget-report-header",class:{active:e.select.key&&e.select.key==n.key},style:{"border-style":"solid","border-width":e.element.options.borderWidth+"px","border-color":e.element.options.borderColor,width:n.options.width},attrs:{valign:"top"},on:{click:function(t){return t.stopPropagation(),e.handleSelectHeaderWidget(i)},mouseover:function(t){return t.stopPropagation(),e.handleMouseoverTH(i)},mouseout:function(t){return e.handleMouseoutTH(i)}}},[t("div",{staticStyle:{"text-align":"center",height:"10px","line-height":"10px","font-size":"12px"}},[e._v(e._s(n.options.width))])])]}))],2),e._l(e.element.rows,(function(n,o){return t("tr",{key:o},e._l(n.columns,(function(n,r){return n.options.invisible?e._e():t("td",{key:o+"-"+r,ref:"widgetTD_".concat(o,"_").concat(r),refInFor:!0,staticClass:"widget-report-item fm-report-table__td",class:Object(i.a)(Object(i.a)({active:e.selectWidget.key&&e.selectWidget.key==n.key},n.options.customClass,!!n.options.customClass),"selected",e.selectIndex==r&&1==n.options.colspan),style:{"border-style":"solid","border-width":e.element.options.borderWidth+"px","border-color":e.element.options.borderColor,width:n.options.width,height:n.options.height,"text-align":n.options.textAlign,"vertical-align":n.options.verticalAlign},attrs:{colspan:n.options.colspan,rowspan:n.options.rowspan,valign:"top"},on:{click:function(t){return t.stopPropagation(),e.handleSelectItemWidget(o,r)},mouseover:function(t){return t.stopPropagation(),e.handleMouseoverTD(o,r)},mouseout:function(t){return e.handleMouseoutTD(o,r)}}},[t("draggable",e._b({staticClass:"widget-col-list",style:{"text-align":n.options.textAlign,"vertical-align":n.options.verticalAlign},attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetItemAdd(t,e.element,o,r)},update:e.handleWidgetItemUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:n.list,callback:function(t){e.$set(n,"list",t)},expression:"column.list"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[e._l(n.list,(function(i,o){return i&&i.key?["tabs"===i.type?t("widget-tab-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"collapse"===i.type?t("widget-collapse",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"table"===i.type?t("widget-table",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"subform"===i.type?t("widget-sub-form",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"card"===i.type?t("widget-card",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"group"===i.type?t("widget-group",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"inline"===i.type?t("widget-inline",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"report"===i.type?t("widget-report",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"grid"!==i.type?t("widget-form-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):t("widget-col-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}})]:e._e()}))],2),e.selectWidget.key==n.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("el-dropdown",{attrs:{size:"small",trigger:"click"}},[t("span",{staticClass:"el-dropdown-link"},[t("i",{staticClass:"fm-iconfont icon-biaogeshezhi",attrs:{title:e.$t("fm.tooltip.cellsetting")}})]),t("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[t("el-dropdown-item",{attrs:{command:"insertleft"},nativeOn:{click:function(t){return t.stopPropagation(),e.handleInsertLeft.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.insertcolumnleft")))]),t("el-dropdown-item",{attrs:{command:"insertright"},nativeOn:{click:function(t){return t.stopPropagation(),e.handleInsertRight.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.insertcolumnright")))]),t("el-dropdown-item",{attrs:{command:"insertbefore"},nativeOn:{click:function(t){return t.stopPropagation(),e.handleInserBefore.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.insertrowbefore")))]),t("el-dropdown-item",{attrs:{command:"insertafter"},nativeOn:{click:function(t){return t.stopPropagation(),e.handleInserAfter.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.insertrowafter")))]),t("el-dropdown-item",{attrs:{command:"right",disabled:!e.showRight,divided:""},nativeOn:{click:function(t){return t.stopPropagation(),e.handleRight(n)}}},[e._v(e._s(e.$t("fm.tooltip.mergeright")))]),t("el-dropdown-item",{attrs:{command:"bottom",disabled:!e.showBottom},nativeOn:{click:function(t){return t.stopPropagation(),e.handleBottom(n)}}},[e._v(e._s(e.$t("fm.tooltip.mergedown")))]),t("el-dropdown-item",{attrs:{command:"splitcolumns",divided:"",disabled:!e.showSplitColumn},nativeOn:{click:function(t){return t.stopPropagation(),e.handleSplitColumn.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.splitcolumns")))]),t("el-dropdown-item",{attrs:{command:"splitrows",disabled:!e.showSplitRow},nativeOn:{click:function(t){return t.stopPropagation(),e.handleSplitRow.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.splitrows")))]),t("el-dropdown-item",{attrs:{command:"removecolumn",disabled:!e.showRemoveColumn,divided:""},nativeOn:{click:function(t){return t.stopPropagation(),e.handleRemoveColumn.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.deletecolumn")))]),t("el-dropdown-item",{attrs:{command:"removerow",disabled:!e.showRemoveRow},nativeOn:{click:function(t){return t.stopPropagation(),e.handleRemoveRow.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.deleterow")))]),t("el-dropdown-item",{attrs:{command:"setcolwidth",disabled:1!==n.options.colspan,divided:""},nativeOn:{click:function(t){return t.stopPropagation(),e.handleSetColumnWidth.apply(null,arguments)}}},[e._v(e._s(e.$t("fm.tooltip.setcolwidth")))])],1)],1)],1):e._e(),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(n.type?e.$t("fm.components.fields."+n.type):""))])])],1)})),0)}))],2)]),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("i",{staticClass:"fm-iconfont icon--charuhang",attrs:{title:e.$t("fm.tooltip.addrow")},on:{click:function(t){return t.stopPropagation(),e.handleAddRow(e.index)}}}),t("i",{staticClass:"fm-iconfont icon--charulie",attrs:{title:e.$t("fm.tooltip.addcolumn")},on:{click:function(t){return t.stopPropagation(),e.handleAddColumns(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleReportClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-col-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?e.$t("fm.components.fields."+e.element.type):""))])])])}),[],!1,null,null,null);t.default=y.exports},"87b7":function(e,t,n){"use strict";n.r(t);n("a481");var i=n("bd86"),o=(n("7f7f"),n("8e6e"),n("7514"),n("7618")),r=(n("551c"),n("ac6a"),n("cadf"),n("456d"),n("6762"),n("2fdb"),n("99a1")),a=n("2ef0"),s=n.n(a),l=n("6ca6");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({components:{GenerateElementItem:r.default},props:["config","widget","models","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup","isTable","isMobile","tableName"],data:function(){return{dataModel:Object.keys(this.models).includes(this.widget.model)?this.models[this.widget.model]:s.a.cloneDeep(this.widget.options.defaultValue),dataModels:this.models,formItemComponent:null}},mounted:function(){this.formItemComponent=this.$refs.generateFormItem},computed:{labelWidth:function(){return this.widget.options.hideLabel?"0px":this.widget.options.isLabelWidth?this.widget.options.labelWidth+"px":this.config.labelWidth+"px"},ruleProp:function(){var e=this.widget.model;return this.group&&(e=this.group+"."+e),e},currentOptions:function(){var e,t;return this.isTable||this.isSubform?{value:this.dataModel,fieldNode:this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,currentRef:null===(e=this.$refs.generateElementItem)||void 0===e?void 0:e.$refs["fm-".concat(this.widget.model)],rowIndex:this.rowIndex,row:s.a.cloneDeep(this.models),field:this.widget.model,group:this.group}:{value:this.dataModel,fieldNode:this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,currentRef:null===(t=this.$refs.generateElementItem)||void 0===t?void 0:t.$refs["fm-".concat(this.widget.model)],field:this.widget.model,group:this.group}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model,t=this.group?this.group+"."+this.widget.model:this.widget.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.widget.options.hidden?!this.widget.options.hidden:!Object(l.c)(this.widget.options.hidden)||!Object(l.a)(Object(l.b)(this.widget.options.hidden),this.currentOptions,this.formContext)},groupNode:function(){return this.group?this.group+"."+this.widget.model:this.widget.model},elementNode:function(){return this.fieldNode?this.fieldNode+"."+this.widget.model:this.widget.model}},inject:{setSubformData:{default:function(){}},setDialogData:{default:function(){}},setGroupData:{default:function(){}},setTableData:{default:function(){}},getFormComponent:{default:function(){return null}},onChange:{default:function(){}},dynamicHideFields:{default:{}},dynamicValueData:{default:[]},formContext:{default:{}},generateFormItemContext:{default:function(){}},deleteFormItemContext:{default:function(){}},sendRequest:{default:function(){}}},created:function(){this.refreshDynamicValue()}},"mounted",(function(){this.generateFormItemContext(this.elementNode,this)})),"beforeDestroy",(function(){this.deleteFormItemContext(this.elementNode)})),"methods",{refreshDynamicValue:function(e){var t=this;return new Promise((function(n,i){if(t.widget.options.isDynamicValue&&"datasource"==t.widget.options.dynamicValueType&&t.widget.options.dynamicValueDataSource){var r=t.group?t.group+"."+t.widget.model+"."+t.widget.options.dynamicValueDataSource:t.widget.model+"."+t.widget.options.dynamicValueDataSource,a=u({},t.widget.options.dynamicValueArgs);for(var c in a)Object(l.c)(a[c])&&(a[c]=Object(l.a)(Object(l.b)(a[c]),t.currentOptions,t.formContext));e&&"object"===Object(o.a)(e)&&(a=u(u({},a),e));var d=t.dynamicValueData.find((function(e){return e.key===r&&s.a.isEqual(e.args,a)}));if(d)if(t.widget.options.dynamicValueStruct)try{t.dataModel=new Function("data","return data.".concat(t.widget.options.dynamicValueStruct))(d.value),n(t.dataModel)}catch(e){i(e)}else t.dataModel=d.value,n(t.dataModel);else t.sendRequest(t.widget.options.dynamicValueDataSource,a).then((function(e){if(t.widget.options.dynamicValueStruct)try{t.dataModel=new Function("data","return data.".concat(t.widget.options.dynamicValueStruct))(e),n(t.dataModel)}catch(e){i(e)}else t.dataModel=e,n(t.dataModel)}))}if(t.widget.options.isDynamicValue&&"fx"==t.widget.options.dynamicValueType&&t.widget.options.dynamicValueFx){var f=Object(l.a)(t.widget.options.dynamicValueFx,t.currentOptions,t.formContext);null!==f&&t.$nextTick((function(){t.dataModel=f})),n(f)}}))}}),"watch",{dataModel:{deep:!0,handler:function(e,t){var n=this;if(JSON.stringify(e)==JSON.stringify(t))return!1;this.isTable?this.setTableData(e,this.rowIndex,this.widget.model):this.isSubform?this.setSubformData(e,this.rowIndex,this.widget.model):this.isDialog?this.setDialogData(e,this.widget.model):this.isGroup?this.setGroupData(e,this.widget.model):this.onChange(e,this.widget.model),this.$nextTick((function(){if(n.eventFunction.onFormChange&&n.eventFunction.onFormChange(n.currentOptions),n.widget.events&&n.widget.events.onChange){var e=n.widget.events.onChange;n.eventFunction[e](n.currentOptions)}}))}},models:{deep:!0,handler:function(e){this.dataModels=e,this.dataModel=Object.keys(e).includes(this.widget.model)?e[this.widget.model]:s.a.cloneDeep(this.widget.options.defaultValue)}}}),f=(n("5f53"),n("2877")),p=Object(f.a)(d,(function(){var e,t=this,n=t._self._c;return t.widget.key?n("div",{staticClass:"fm-form-item",style:{"--labelWidth":t.labelWidth},attrs:{"data-id":t.widget.model}},["divider"!=t.widget.type&&"alert"!=t.widget.type&&t.elementDisplay?n("a-form-model-item",{key:t.widget.key,ref:"generateFormItem",class:Object(i.a)(Object(i.a)(Object(i.a)(Object(i.a)({},t.widget.options&&t.widget.options.customClass,!(!t.widget.options||!t.widget.options.customClass)),"no-label-form-item",t.widget.options.isLabelWidth&&0==t.widget.options.labelWidth),"no-label-left",""===t.widget.name),"fm-label-wrap",t.widget.options.labelWrap),attrs:{prop:t.fieldNode?"".concat(t.fieldNode,".").concat(t.widget.model):t.widget.model,rules:t.rules[t.ruleProp],label:t.widget.options.hideLabel||t.isTable&&!t.isMobile?"":t.widget.name,required:t.widget.options.required,colon:!(null===(e=t.config)||void 0===e||!e.labelSuffix),validateFirst:""}},[t.widget.options.tip?n("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:t._s(t.widget.options.tip.replace(/\n/g,"<br/>"))}}):t._e(),n("generate-element-item",{key:t.widget.key,ref:"generateElementItem",attrs:{blanks:t.blanks,"is-table":t.isTable,"table-name":t.tableName,widget:t.widget,models:t.dataModels,remote:t.remote,edit:t.edit,"remote-option":t.remoteOption,rules:t.rules,platform:t.platform,preview:t.preview,"data-source-value":t.dataSourceValue,"event-function":t.eventFunction,"container-key":t.containerKey,"print-read":t.printRead,config:t.config,"is-subform":t.isSubform,"row-index":t.rowIndex,"sub-name":t.subName,"is-dialog":t.isDialog,"dialog-name":t.dialogName,"is-group":t.isGroup,group:t.group,"field-node":t.fieldNode?t.fieldNode+"."+t.widget.model:t.widget.model,"form-item-component":t.formItemComponent},scopedSlots:t._u([t._l(t.blanks,(function(e){return{key:e.name,fn:function(n){return[t._t(e.name,null,{model:n.model})]}}}))],null,!0),model:{value:t.dataModel,callback:function(e){t.dataModel=e},expression:"dataModel"}})],1):t._e(),"divider"==t.widget.type&&t.elementDisplay?n("a-form-model-item",{staticClass:"fill-form-item",attrs:{wrapperCol:{offset:0}}},[n("a-divider",t._b({ref:"fm-"+t.widget.model,attrs:{orientation:t.widget.options.contentPosition}},"a-divider",t.widget.options.customProps,!1),[t._v("\n "+t._s(t.widget.name)+"\n ")])],1):t._e(),"alert"==t.widget.type&&t.elementDisplay?n("a-form-model-item",{staticClass:"fill-form-item",attrs:{wrapperCol:{offset:0}}},[n("a-alert",t._b({ref:"fm-"+t.widget.model,style:{width:t.widget.options.width},attrs:{message:t.widget.options.title,type:t.widget.options.type,description:t.widget.options.description,closable:t.widget.options.closable,center:t.widget.options.center,"show-icon":t.widget.options.showIcon,effect:t.widget.options.effect}},"a-alert",t.widget.options.customProps,!1))],1):t._e()],1):t._e()}),[],!1,null,null,null);t.default=p.exports},"8a81":function(e,t,n){"use strict";var i=n("7726"),o=n("69a8"),r=n("9e1e"),a=n("5ca1"),s=n("2aba"),l=n("67ab").KEY,c=n("79e5"),u=n("5537"),d=n("7f20"),f=n("ca5a"),p=n("2b4c"),m=n("37c8"),h=n("3a72"),g=n("d4c0"),b=n("1169"),v=n("cb7c"),y=n("d3f4"),_=n("4bf8"),w=n("6821"),x=n("6a99"),k=n("4630"),O=n("2aeb"),C=n("7bbc"),S=n("11e9"),D=n("2621"),P=n("86cc"),E=n("0d58"),j=S.f,M=P.f,F=C.f,T=i.Symbol,I=i.JSON,$=I&&I.stringify,R=p("_hidden"),A=p("toPrimitive"),L={}.propertyIsEnumerable,N=u("symbol-registry"),W=u("symbols"),V=u("op-symbols"),z=Object.prototype,B="function"==typeof T&&!!D.f,K=i.QObject,U=!K||!K.prototype||!K.prototype.findChild,H=r&&c((function(){return 7!=O(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a}))?function(e,t,n){var i=j(z,t);i&&delete z[t],M(e,t,n),i&&e!==z&&M(z,t,i)}:M,G=function(e){var t=W[e]=O(T.prototype);return t._k=e,t},q=B&&"symbol"==typeof T.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof T},X=function(e,t,n){return e===z&&X(V,t,n),v(e),t=x(t,!0),v(n),o(W,t)?(n.enumerable?(o(e,R)&&e[R][t]&&(e[R][t]=!1),n=O(n,{enumerable:k(0,!1)})):(o(e,R)||M(e,R,k(1,{})),e[R][t]=!0),H(e,t,n)):M(e,t,n)},J=function(e,t){v(e);for(var n,i=g(t=w(t)),o=0,r=i.length;r>o;)X(e,n=i[o++],t[n]);return e},Y=function(e){var t=L.call(this,e=x(e,!0));return!(this===z&&o(W,e)&&!o(V,e))&&(!(t||!o(this,e)||!o(W,e)||o(this,R)&&this[R][e])||t)},Q=function(e,t){if(e=w(e),t=x(t,!0),e!==z||!o(W,t)||o(V,t)){var n=j(e,t);return!n||!o(W,t)||o(e,R)&&e[R][t]||(n.enumerable=!0),n}},Z=function(e){for(var t,n=F(w(e)),i=[],r=0;n.length>r;)o(W,t=n[r++])||t==R||t==l||i.push(t);return i},ee=function(e){for(var t,n=e===z,i=F(n?V:w(e)),r=[],a=0;i.length>a;)!o(W,t=i[a++])||n&&!o(z,t)||r.push(W[t]);return r};B||(s((T=function(){if(this instanceof T)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===z&&t.call(V,n),o(this,R)&&o(this[R],e)&&(this[R][e]=!1),H(this,e,k(1,n))};return r&&U&&H(z,e,{configurable:!0,set:t}),G(e)}).prototype,"toString",(function(){return this._k})),S.f=Q,P.f=X,n("9093").f=C.f=Z,n("52a7").f=Y,D.f=ee,r&&!n("2d00")&&s(z,"propertyIsEnumerable",Y,!0),m.f=function(e){return G(p(e))}),a(a.G+a.W+a.F*!B,{Symbol:T});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)p(te[ne++]);for(var ie=E(p.store),oe=0;ie.length>oe;)h(ie[oe++]);a(a.S+a.F*!B,"Symbol",{for:function(e){return o(N,e+="")?N[e]:N[e]=T(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in N)if(N[t]===e)return t},useSetter:function(){U=!0},useSimple:function(){U=!1}}),a(a.S+a.F*!B,"Object",{create:function(e,t){return void 0===t?O(e):J(O(e),t)},defineProperty:X,defineProperties:J,getOwnPropertyDescriptor:Q,getOwnPropertyNames:Z,getOwnPropertySymbols:ee});var re=c((function(){D.f(1)}));a(a.S+a.F*re,"Object",{getOwnPropertySymbols:function(e){return D.f(_(e))}}),I&&a(a.S+a.F*(!B||c((function(){var e=T();return"[null]"!=$([e])||"{}"!=$({a:e})||"{}"!=$(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(n=t=i[1],(y(t)||void 0!==e)&&!q(e))return b(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),i[1]=t,$.apply(I,i)}}),T.prototype[A]||n("32e9")(T.prototype,A,T.prototype.valueOf),d(T,"Symbol"),d(Math,"Math",!0),d(i.JSON,"JSON",!0)},"8b97":function(e,t,n){var i=n("d3f4"),o=n("cb7c"),r=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{(i=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return r(e,n),t?e.__proto__=n:i(e,n),e}}({},!1):void 0),check:r}},"8bbf":function(e,t){e.exports=require("vue")},"8df4":function(e,t,n){"use strict";var i=n("7a77");function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},"8e56":function(e,t,n){"use strict";n("1b92")},"8e60":function(e,t,n){e.exports=!n("294c")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"8e6e":function(e,t,n){var i=n("5ca1"),o=n("990b"),r=n("6821"),a=n("11e9"),s=n("f1ae");i(i.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,i=r(e),l=a.f,c=o(i),u={},d=0;c.length>d;)void 0!==(n=l(i,t=c[d++]))&&s(u,t,n);return u}})},"8f40":function(e,t,n){},"8f60":function(e,t,n){"use strict";var i=n("a159"),o=n("aebd"),r=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=i(a,{next:o(1,n)}),r(e,t+" Iterator")}},9003:function(e,t,n){var i=n("6b4c");e.exports=Array.isArray||function(e){return"Array"==i(e)}},9058:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("20d6");var i=n("75fc"),o=(n("28a5"),n("6762"),n("2fdb"),n("ac6a"),function(e,t,n,r){for(var a=0;a<e.length;a++)if("grid"===e[a].type)e[a].columns.forEach((function(e){o(e.list,t,n,r)}));else if("tabs"===e[a].type)e[a].tabs.forEach((function(e){o(e.list,t,n,r)}));else if("collapse"===e[a].type)e[a].tabs.forEach((function(e){o(e.list,t,n,r)}));else if("report"===e[a].type)e[a].rows.forEach((function(e){e.columns.forEach((function(e){o(e.list,t,n,r)}))}));else if("inline"===e[a].type)o(e[a].list,t,n,r);else if("card"===e[a].type)o(e[a].list,t,n,r);else if(1===t.length){if(e[a].model===t[0]&&("add"!=r||e[a].options.customClass.split(" ").includes(n)||(e[a].options.customClass=[].concat(Object(i.a)(e[a].options.customClass.split(" ")),[n]).join(" ")),"remove"==r&&e[a].options.customClass.split(" ").includes(n))){var s=e[a].options.customClass.split(" ");s.splice(s.findIndex((function(e){return e==n})),1),e[a].options.customClass=s.join(" ")}}else if(e[a].model===t[0]){var l=Object(i.a)(t);l.splice(0,1),"table"===e[a].type&&o(e[a].tableColumns,l,n,r),"subform"===e[a].type&&o(e[a].list,l,n,r),"group"===e[a].type&&o(e[a].list,l,n,r),"dialog"===e[a].type&&o(e[a].list,l,n,r)}})},"908f":function(e,t,n){"use strict";n.r(t);n("7f7f"),n("6762"),n("2fdb");var i=n("bd86"),o=n("87b7"),r=n("9195"),a=n("6ca6"),s={name:"generate-col-item",components:{GenerateFormItem:o.default,GenerateInline:r.default,GenerateReport:function(){return Promise.resolve().then(n.bind(null,"e66c"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"d6ee"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bec1"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"093a"))}},props:["config","element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model,hideCols:[]}},computed:{currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(a.c)(this.element.options.hidden)||!Object(a.a)(Object(a.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},methods:{getColXS:function(e){return this.preview?"pc"==this.platform?e.md:"pad"==this.platform?e.sm:"mobile"==this.platform?e.xs:void 0:e.xs},getColSM:function(e){return this.preview?"pc"==this.platform?e.md:"pad"==this.platform?e.sm:"mobile"==this.platform?e.xs:void 0:e.sm},getColMD:function(e){return this.preview?"pc"==this.platform?e.md:"pad"==this.platform?e.sm:"mobile"==this.platform?e.xs:void 0:e.md},hideCol:function(e){!this.hideCols.includes(e)&&this.hideCols.push(e)},displayCol:function(e){this.hideCols.includes(e)&&this.hideCols.splice(this.hideCols.indexOf(e),1)}},watch:{model:{deep:!0,handler:function(e){this.dataModels=e}}}},l=n("2877"),c=Object(l.a)(s,(function(){var e=this,t=e._self._c;return e.elementDisplay?t("a-row",{class:Object(i.a)({},e.element.options&&e.element.options.customClass,!(!e.element.options||!e.element.options.customClass)),attrs:{type:e.element.options.flex?"flex":void 0,gutter:e.element.options.gutter||0,justify:e.element.options.justify,align:e.element.options.align}},e._l(e.element.columns,(function(n,o){return e.hideCols.includes(o)?e._e():t("a-col",{key:o,class:Object(i.a)({},n.options&&n.options.customClass,!(!n.options||!n.options.customClass)),attrs:{xs:n.options?e.getColXS(n.options):n.span,sm:n.options?e.getColXS(n.options):n.span,md:n.options?e.getColSM(n.options):n.span,lg:n.options?e.getColMD(n.options):n.span,offset:n.options?n.options.offset:0,push:n.options?n.options.push:0,pull:n.options?n.options.pull:0}},[e._l(n.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.dataModels,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)})),1):e._e()}),[],!1,null,null,null);t.default=c.exports},9093:function(e,t,n){var i=n("ce10"),o=n("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},9138:function(e,t,n){e.exports=n("35e8")},9195:function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=n("87b7"),r=n("6ca6"),a={name:"generate-inline",components:{GenerateFormItem:o.default},props:["config","element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model}},computed:{currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(r.c)(this.element.options.hidden)||!Object(r.a)(Object(r.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},methods:{},watch:{model:{deep:!0,handler:function(e){this.dataModels=this.model}}}},s=(n("1a6b"),n("2877")),l=Object(s.a)(a,(function(){var e=this,t=e._self._c;return e.elementDisplay?t("div",{staticClass:"fm-inline-container",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!(!e.element.options||!e.element.options.customClass)),style:{display:e.element.options.flex?"flex":"block","flex-direction":"row","flex-wrap":"wrap","justify-content":e.element.options.flexJustify||"normal","align-items":e.element.options.flexAlign||"normal"}},[e._l(e.element.list,(function(n){return[t("generate-form-item",{key:n.key,style:{"margin-right":e.element.options.spaceSize+"px"},attrs:{models:e.dataModels,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,config:e.config,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2):e._e()}),[],!1,null,null,null);t.default=l.exports},"932c":function(e,t,n){},"93bd":function(e,t,n){"use strict";n.r(t);n("7f7f");var i=n("bd86"),o=n("7618"),r=(n("7514"),n("5531")),a=n("09cf"),s=n("6ca6"),l={name:"generate-collapse",components:{GenerateFormItem:r.default,GenerateInline:a.default,GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"104d"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"4388"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bf0b"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"7a6e"))}},props:["element","model","rules","remote","blanks","display","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","isSubform","rowIndex","subName","subHideFields","subDisabledFields","isDialog","dialogName","group","fieldNode","isGroup"],data:function(){return{dataModels:this.model,tabActive:this.element.tabs.length?[this.element.tabs[0].name]:""}},computed:{currentOptions:function(){return this.isSubform?{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,rowIndex:this.rowIndex,row:this.model}:{fieldNode:this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model}},elementDisplay:function(){var e=this.fieldNode?this.fieldNode+"."+this.element.model:this.element.model,t=this.group?this.group+"."+this.element.model:this.element.model;return null!=this.dynamicHideFields[e]?!this.dynamicHideFields[e]:null!=this.dynamicHideFields[t]?!this.dynamicHideFields[t]:"boolean"==typeof this.element.options.hidden?!this.element.options.hidden:!Object(s.c)(this.element.options.hidden)||!Object(s.a)(Object(s.b)(this.element.options.hidden),this.currentOptions,this.formContext)}},inject:["generateComponentInstance","deleteComponentInstance","dynamicHideFields","formContext"],mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model,this)},beforeUnmount:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode?"".concat(this.fieldNode,".").concat(this.element.model):this.element.model)},methods:{activateCollapse:function(e){var t=this;if("string"==typeof e){var n=this.element.tabs.find((function(t){return t.title==e}));n&&(this.tabActive=n.name)}if("object"===Object(o.a)(e)&&Array.isArray(e)){var i=e.map((function(e){var n=t.element.tabs.find((function(t){return t.title==e}));return n?n.name:""}));this.tabActive=i}}},watch:{model:{deep:!0,handler:function(e){this.dataModels=this.model}}}},c=n("2877"),u=Object(c.a)(l,(function(){var e=this,t=e._self._c;return e.elementDisplay?t("el-collapse",{class:Object(i.a)({},e.element.options.customClass,!!e.element.options.customClass),staticStyle:{"margin-bottom":"18px"},attrs:{accordion:e.element.options.accordion},model:{value:e.tabActive,callback:function(t){e.tabActive=t},expression:"tabActive"}},e._l(e.element.tabs,(function(n){return t("el-collapse-item",{key:n.name,attrs:{title:e.$t(n.title),name:n.name}},[e._l(n.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.dataModels,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.dataModels,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.display,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":e.isSubform,"row-index":e.rowIndex,"sub-name":e.subName,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":e.isGroup,group:e.group,"field-node":e.fieldNode},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)})),1):e._e()}),[],!1,null,null,null);t.default=u.exports},"956f":function(e,t,n){"use strict";n.r(t);var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("75fc")),r=(n("6b54"),n("28a5"),n("70fb")),a=n("67c8"),s=n("1d67"),l=n("a141"),c=n("b76a"),u=n.n(c),d=n("2ef0"),f=n.n(d),p=n("ca17"),m=n("0f01"),h=n("4260");function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={name:"widget-col-item",components:{Draggable:u.a,WidgetFormItem:r.a,WidgetTable:a.default,WidgetTabItem:s.default,WidgetInline:l.a,WidgetReport:function(){return Promise.resolve().then(n.bind(null,"8791"))},WidgetCollapse:function(){return Promise.resolve().then(n.bind(null,"ca11"))},WidgetSubForm:function(){return Promise.resolve().then(n.bind(null,"fa24"))},WidgetCard:function(){return Promise.resolve().then(n.bind(null,"af3f"))},WidgetGroup:function(){return Promise.resolve().then(n.bind(null,"a071"))}},props:["element","select","index","data","platform","formKey","subform"],inject:["getDragging","setDragging"],data:function(){return{selectWidget:this.select||{},selectIndex:-1}},methods:{handleMouseover:function(e){!this.getDragging()&&Object(h.a)(this.$refs.widgetCol,"is-hover")},handleMouseout:function(e){Object(h.j)(this.$refs.widgetCol,"is-hover")},handleMouseoverCol:function(e){Object(h.a)(this.$refs.widgetColItem[e].$el,"is-hover")},handleMouseoutCol:function(e){!this.getDragging()&&Object(h.j)(this.$refs.widgetColItem[e].$el,"is-hover")},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("dialog-put")>=0||n.children[0].className.split(" ").indexOf("dialog-put")>=0)},getColSpan:function(e){return"pc"==this.platform?e&&e.md:"pad"==this.platform?e&&e.sm:"mobile"==this.platform?e&&e.xs:void 0},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handleSelectItemWidget:function(e){this.selectWidget=this.data.list[this.index].columns[e],this.selectIndex=e},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){m.a.$emit("on-history-add-"+t.formKey)}),20)},handleColItemDelete:function(e,t){var n=this;this.data.list[e].columns.splice(t,1),this.selectWidget=0==t?this.data.list[e].columns[0]:this.data.list[e].columns[t-1],setTimeout((function(){m.a.$emit("on-history-add-"+n.formKey)}),20)},handleAddCol:function(e){var t=this;this.data.list[e].columns.push({type:"col",options:{span:24,offset:0,push:0,pull:0,xs:24,sm:24,md:24,lg:24,xl:24,customClass:""},list:[],key:Math.random().toString(36).slice(-8)}),this.$nextTick((function(){m.a.$emit("on-history-add-"+t.formKey)}))},handleColClone:function(e){var t=this,n=f.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(p.a)(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){m.a.$emit("on-history-add-"+t.formKey)}))}))},handleColItemClone:function(e,t){var n=this,i=f.a.cloneDeep(this.data.list[e].columns[t]);this.data.list[e].columns.splice(t+1,0,Object(p.a)(i)),this.$nextTick((function(){n.selectWidget=n.data.list[e].columns[t+1],n.$nextTick((function(){m.a.$emit("on-history-add-"+n.formKey)}))}))},handleWidgetColUpdate:function(e){var t=this;this.$nextTick((function(){m.a.$emit("on-history-add-"+t.formKey)}))},handleWidgetColAdd:function(e,t,n){var i=this,r=e.newIndex;Object(h.d)(t.columns[n].list,r),this.$set(t.columns[n].list,r,f.a.cloneDeep(t.columns[n].list[r]));var a=Math.random().toString(36).slice(-8);this.$set(t.columns[n].list,r,b(b({},t.columns[n].list[r]),{},{options:b(b({},t.columns[n].list[r].options),{},{remoteFunc:t.columns[n].list[r].options.remoteFunc||"func_"+a,remoteOption:t.columns[n].list[r].options.remoteOption||"option_"+a,tableColumn:!1,subform:!!this.subform}),novalid:b({},t.columns[n].list[r].novalid),key:t.columns[n].list[r].key?t.columns[n].list[r].key:a,model:t.columns[n].list[r].model?t.columns[n].list[r].model:t.columns[n].list[r].type+"_"+a,rules:t.columns[n].list[r].rules?Object(o.a)(t.columns[n].list[r].rules):[]})),"report"==t.columns[n].list[r].type&&(t.columns[n].list[r].rows=Object(h.f)(t.columns[n].list[r].rows),t.columns[n].list[r].headerRow=Object(h.g)(t.columns[n].list[r].headerRow)),"grid"==t.columns[n].list[r].type&&(t.columns[n].list[r].columns=Object(h.e)(t.columns[n].list[r].columns)),this.selectWidget=t.columns[n].list[r],this.$nextTick((function(){m.a.$emit("on-history-add-"+i.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.list[e]:{}}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!1,handler:function(e){this.$emit("update:select",e)}}}},y=n("2877"),_=Object(y.a)(v,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetCol",staticClass:"widget-col widget-view",class:{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-row",{class:Object(i.a)({},e.element.options&&e.element.options.customClass,!(!e.element.options||!e.element.options.customClass)),attrs:{type:e.element.options.flex?"flex":"",gutter:e.element.options.gutter||0,justify:e.element.options.justify,align:e.element.options.align}},e._l(e.element.columns,(function(n,o){return t("el-col",{key:n.key,ref:"widgetColItem",refInFor:!0,staticClass:"widget-col-item",class:Object(i.a)({active:e.selectWidget.key&&e.selectWidget.key==n.key},n.options&&n.options.customClass,!(!n.options||!n.options.customClass)),attrs:{span:e.getColSpan(n.options),offset:n.options?n.options.offset:0,push:n.options?n.options.push:0,pull:n.options?n.options.pull:0},nativeOn:{click:function(t){return t.stopPropagation(),e.handleSelectItemWidget(o)},mouseover:function(t){return t.stopPropagation(),e.handleMouseoverCol(o)},mouseout:function(t){return e.handleMouseoutCol(o)}}},[t("draggable",e._b({staticClass:"widget-col-list",attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetColAdd(t,e.element,o)},update:e.handleWidgetColUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:n.list,callback:function(t){e.$set(n,"list",t)},expression:"item.list"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[e._l(n.list,(function(i,o){return i&&i.key?["grid"===i.type?t("widget-col-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"tabs"===i.type?t("widget-tab-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"collapse"===i.type?t("widget-collapse",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"report"===i.type?t("widget-report",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey,subform:e.subform},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"table"===i.type?t("widget-table",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"subform"===i.type?t("widget-sub-form",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"card"===i.type?t("widget-card",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"group"===i.type?t("widget-group",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"inline"===i.type?t("widget-inline",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):t("widget-form-item",{key:i.key,attrs:{element:i,select:e.selectWidget,index:o,data:n,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}})]:e._e()}))],2),e.selectWidget.key==n.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleColItemClone(e.index,o)}}}),e.element.columns.length>1?t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleColItemDelete(e.index,o)}}}):e._e()]):e._e(),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(n.type?e.$t("fm.components.fields."+n.type):""))])])],1)})),1),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action widget-col-action"},[t("i",{staticClass:"fm-iconfont icon-tianjiazengjiajia",attrs:{title:e.$t("fm.actions.addColumn")},on:{click:function(t){return t.stopPropagation(),e.handleAddCol(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleColClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-col-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?e.$t("fm.components.fields."+e.element.type):""))])])],1)}),[],!1,null,null,null);t.default=_.exports},"96cf":function(e,t){!function(t){"use strict";var n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag",l="object"==typeof e,c=t.regeneratorRuntime;if(c)l&&(e.exports=c);else{(c=t.regeneratorRuntime=l?e.exports:{}).wrap=h;var u={},d={};d[r]=function(){return this};var f=Object.getPrototypeOf,p=f&&f(f(S([])));p&&p!==n&&i.call(p,r)&&(d=p);var m=y.prototype=b.prototype=Object.create(d);v.prototype=m.constructor=y,y.constructor=v,y[s]=v.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s in e||(e[s]="GeneratorFunction")),e.prototype=Object.create(m),e},c.awrap=function(e){return{__await:e}},_(w.prototype),w.prototype[a]=function(){return this},c.AsyncIterator=w,c.async=function(e,t,n,i){var o=new w(h(e,t,n,i));return c.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},_(m),m[s]="Generator",m[r]=function(){return this},m.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var i=t.pop();if(i in e)return n.value=i,n.done=!1,n}return n.done=!0,n}},c.values=S,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return a.type="throw",a.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(s&&l){if(this.prev<r.catchLoc)return n(r.catchLoc,!0);if(this.prev<r.finallyLoc)return n(r.finallyLoc)}else if(s){if(this.prev<r.catchLoc)return n(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return n(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=e,a.arg=t,r?(this.method="next",this.next=r.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function h(e,t,n,i){var o=t&&t.prototype instanceof b?t:b,r=Object.create(o.prototype),a=new C(i||[]);return r._invoke=function(e,t,n){var i="suspendedStart";return function(o,r){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===o)throw r;return D()}for(n.method=o,n.arg=r;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var l=g(e,t,n);if("normal"===l.type){if(i=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(i="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),r}function g(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function b(){}function v(){}function y(){}function _(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function w(e){var t;this._invoke=function(n,o){function r(){return new Promise((function(t,r){!function t(n,o,r,a){var s=g(e[n],e,o);if("throw"!==s.type){var l=s.arg,c=l.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,r,a)}),(function(e){t("throw",e,r,a)})):Promise.resolve(c).then((function(e){l.value=e,r(l)}),a)}a(s.arg)}(n,o,t,r)}))}return t=t?t.then(r,r):r()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var i=g(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,u;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function S(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(i.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:D}}function D(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},9803:function(e,t,n){},"990b":function(e,t,n){var i=n("9093"),o=n("2621"),r=n("cb7c"),a=n("7726").Reflect;e.exports=a&&a.ownKeys||function(e){var t=i.f(r(e)),n=o.f;return n?t.concat(n(e)):t}},"99a1":function(e,t,n){"use strict";n.r(t);n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("7f7f");var i=n("75fc"),o=n("7618"),r=(n("7514"),n("c5f6"),n("bd86"));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n("6762"),n("2fdb"),n("551c");var l=n("c7f0"),c=(n("6c7b"),n("28a5"),n("2ef0")),u=n.n(c),d=n("9058"),f=n("6ca6");function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h={components:{GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"87b7"))},GenerateElementItem:function(){return Promise.resolve().then(n.bind(null,"99a1"))}},props:["config","columns","value","models","remote","blanks","disableddata","rules","name","remoteOption","preview","platform","dataSourceValue","eventFunction","widget","containerKey","printRead","paging","pageSize","isAdd","isDelete","showControl","isDialog","dialogName","group","fieldNode"],data:function(){return{tableData:this.value||[],displayFields:{},disabledFields:{},changeItem:{},pagingData:[],pagingLength:0,currentPage:1,tableHideFields:[],tableDisabledFields:[],mobileScreen:window.innerWidth<768}},created:function(){for(var e=this,t=0;t<this.columns.length;t++)this.displayFields[this.columns[t].model]=!this.columns[t].options.hidden,this.disabledFields[this.columns[t].model]=this.columns[t].options.disabled;this.tableHideFields=this.value?this.value.map((function(t){return Object.fromEntries(Object.keys(e.displayFields).map((function(t){return[t,!e.displayFields[t]]})))})):[],this.tableDisabledFields=this.value?this.value.map((function(t){return Object.fromEntries(Object.keys(e.disabledFields).map((function(t){return[t,e.disabledFields[t]]})))})):[],window.addEventListener("resize",this.getMobileScreen),this.loadPagingData()},computed:{tableSize:function(){if(!this.config||!this.config.size)return"middle";switch(this.config.size){case"large":return"default";case"default":return"middle";case"small":return"small"}}},provide:function(){return{setTableData:this.setTableData}},inject:["onFormDisabled","dynamicHideFields","onFormHide","onFormDisplay","formContext"],methods:{columnDisplay:function(e,t){var n=this.group?"".concat(this.group,".").concat(this.widget.model,".").concat(e):"".concat(this.widget.model,".").concat(e);return null!=this.dynamicHideFields[n]?!this.dynamicHideFields[n]:"boolean"==typeof t.options.hidden?!t.options.hidden:!Object(f.c)(t.options.hidden)||!Object(f.a)(Object(f.b)(t.options.hidden),{},this.formContext)},getMobileScreen:function(){this.mobileScreen=window.innerWidth<768},setData:function(e,t){var n=this;return new Promise("number"!=typeof e?function(i){t=e,n.tableData.forEach((function(e,i){Object.keys(t).forEach((function(e){n.setTableData(t[e],i,e)}))})),i()}:function(i){n.$nextTick((function(){Object.keys(t).forEach((function(i){n.setTableData(t[i],e,i)})),i()}))})},setTableData:function(e,t,n){var i=u.a.cloneDeep(this.tableData);i[t][n]=e,this.tableData=i},handleAddRow:function(){for(var e=this,t={},n={},o={},r=0;r<this.columns.length;r++)"blank"===this.columns[r].type?t[this.columns[r].model]="String"==this.columns[r].options.defaultType?"":"Object"==this.columns[r].options.defaultType?{}:[]:"component"===this.columns[r].type||"link"===this.columns[r].type||"button"===this.columns[r].type?t[this.columns[r].model]=void 0:t[this.columns[r].model]=u.a.cloneDeep(this.columns[r].options.defaultValue),n[this.columns[r].model]=!this.displayFields[this.columns[r].model],o[this.columns[r].model]=this.disabledFields[this.columns[r].model];this.tableData=[].concat(Object(i.a)(this.tableData),[m({},t)]),this.tableHideFields.push(n),this.tableDisabledFields.push(o),this.changeItem={},this.$nextTick((function(){if(e.widget.events&&e.widget.events.onRowAdd){var t=e.widget.events.onRowAdd;e.eventFunction[t]({rowIndex:e.tableData.length-1,field:e.widget.model,currentRef:e,group:e.group,fieldNode:e.fieldNode})}e.paging&&(e.tableData.length>e.currentPage*e.pageSize&&(e.currentPage=parseInt((e.tableData.length-1)/e.pageSize)+1),e.loadPagingData())}))},handleRemove:function(e){var t=this,n=m({},this.tableData[e]),o=Object(i.a)(this.tableData);if(o.splice(e,1),this.tableData=o,this.widget.events&&this.widget.events.onRowRemove){var r=this.widget.events.onRowRemove;this.eventFunction[r]({removeIndex:e,removeData:n,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}this.changeItem={},this.pagingData=[],this.pagingLength=0,this.paging&&this.$nextTick((function(){t.tableData.length%t.pageSize==0&&t.currentPage>parseInt(t.tableData.length/t.pageSize)&&(t.currentPage=parseInt(t.tableData.length/t.pageSize)),t.loadPagingData()}))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},hideChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormHide("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},displayChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormDisplay("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},disabled:function(e,t){var n=this;"string"==typeof e&&(e=[e]);for(var i=0;i<this.columns.length;i++)e.indexOf(this.columns[i].model)>=0&&(this.$set(this.columns[i].options,"disabled",t),this.$set(this.disabledFields,this.columns[i].model,t));this.tableData.forEach((function(i,o){e.forEach((function(e){n.$set(n.tableDisabledFields[o],e,t)}))}))},disabledChild:function(e,t,n){var i=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){i.$set(i.tableDisabledFields[e],t,n),i.onFormDisabled("".concat(i.fieldNode,".").concat(e,".").concat(t),n)}))},setOptions:function(e,t){var n=this;"string"==typeof e&&(e=[e]);for(var i=function(i){e.indexOf(n.columns[i].model)>=0&&Object.keys(t).forEach((function(e){n.columns[i].options[e]=t[e]}))},o=0;o<this.columns.length;o++)i(o)},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.columns,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.columns,e.split("."),t,"remove")}))},handleTableChange:function(e){this.changeItem=e},handlePageChange:function(e){var t=this;if(this.currentPage=e,this.pagingData=[],this.pagingLength=0,this.$nextTick((function(){t.loadPagingData()})),this.widget&&this.widget.events&&this.widget.events.onPageChange){var n=this.widget.events.onPageChange;this.eventFunction[n]({currentPage:e,field:this.widget.model,currentRef:this,group:this.group,fieldNode:this.fieldNode})}},loadPagingData:function(){var e,t=(this.currentPage-1)*this.pageSize,n=t+this.pageSize;this.pagingData=null===(e=this.tableData)||void 0===e?void 0:e.slice(t,n),this.pagingLength=this.pagingData.length}},beforeDestroy:function(){window.removeEventListener("resize",this.getMobileScreen)},watch:{value:function(e){this.tableData=e;for(var t=[],n=[],i=0;i<(null===(o=this.value)||void 0===o?void 0:o.length);i++){for(var o,r=this.value[i],a=Object.keys(r),s={},l={},c=0;c<a.length;c++){var u,d,f,p;s[a[c]]=(null===(u=this.tableHideFields)||void 0===u||null===(d=u[i])||void 0===d?void 0:d[a[c]])||!1,l[a[c]]=(null===(f=this.tableDisabledFields)||void 0===f||null===(p=f[i])||void 0===p?void 0:p[a[c]])||!1}t.push(s),n.push(l)}this.tableHideFields=t,this.tableDisabledFields=n},tableData:{deep:!0,handler:function(e){this.loadPagingData(),this.$emit("input",e)}}}},g=(n("ca14"),n("2877")),b=Object(g.a)(h,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"antd-form-table",class:{"is-disabled":e.disableddata}},[e.preview&&"mobile"!=e.platform||!e.preview&&!e.mobileScreen?t("a-table",{class:{"antd-form-table-pc":!e.preview},attrs:{dataSource:e.paging?Array(e.pagingLength).fill({}):e.tableData,pagination:!1,bordered:"","table-layout":"auto",size:e.tableSize}},[e.showControl?t("a-table-column",{key:"#",attrs:{scopedSlots:{customRender:"#"},title:"#","data-index":"#",fixed:"left",width:80},scopedSlots:e._u([{key:"default",fn:function(n,i,o){return[t("div",{staticClass:"scope-index"},[t("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+o+1))])]),t("div",{staticClass:"scope-action"},[t("a-popconfirm",{attrs:{disabled:e.disableddata,title:e.$t("fm.description.deleteConfirm")},on:{confirm:function(t){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+o)}}},[!e.printRead&&e.isDelete?t("a-button",{attrs:{disabled:e.disableddata,type:"danger",shape:"circle",icon:"minus",size:"small"}}):e._e()],1),e.printRead||!e.isDelete?t("span",[e._v(e._s((e.paging?e.pageSize*(e.currentPage-1):0)+o+1))]):e._e()],1)]}}],null,!1,2663213834)}):e._e(),0==e.columns.length?t("a-table-column"):e._l(e.columns,(function(n){return e.columnDisplay(n.model,n)?t("a-table-column",{key:n.key,class:n.options.required?"required":"",attrs:{"data-index":n.key,title:n.options.hideLabel?"":n.name,width:n.options.width,scopedSlots:{customRender:n.key},fixed:!!n.options.fixedColumn&&(n.options.fixedColumnPosition||"left")},scopedSlots:e._u([{key:"default",fn:function(i,o,r){return[t("generate-form-item",{key:"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+r,".").concat(n.key),attrs:{models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+r],rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.tableHideFields,"sub-disabled-fields":e.tableDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-table":!0,"is-mobile":!1,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+r,"table-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+r)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}}],null,!0)}):e._e()}))],2):e._e(),e.preview&&"mobile"===e.platform||!e.preview&&e.mobileScreen?t("div",{staticClass:"antd-form-table-mobile",style:{display:e.preview?"block":""}},e._l(e.paging?e.pagingLength:e.tableData,(function(n,i){return t("div",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+i,staticClass:"antd-form-table-mobile-item"},[e.showControl?t("div",{staticClass:"antd-form-table-mobile-item__top"},[t("span",[e._v("# "+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))]),t("a-popconfirm",{attrs:{disabled:e.disableddata,title:e.$t("fm.description.deleteConfirm")},on:{confirm:function(t){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[!e.printRead&&e.isDelete?t("a-button",{attrs:{disabled:e.disableddata,type:"danger",shape:"circle",icon:"minus",size:"small"}}):e._e()],1)],1):e._e(),t("div",{staticClass:"antd-form-table-mobile-item__content"},e._l(e.columns,(function(n){return e.displayFields[n.model]?t("generate-form-item",{key:n.key,attrs:{models:e.tableData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.tableHideFields,"sub-disabled-fields":e.tableDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-table":!0,"is-mobile":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"table-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):e._e()})),1)])})),0):e._e(),t("a-row",[t("a-col",{attrs:{md:e.preview&&"mobile"!=e.platform||!e.preview?12:24,xs:24,sm:24}},[!e.disableddata&&e.isAdd?t("a-button",{attrs:{type:"link"},on:{click:e.handleAddRow}},[t("i",{staticClass:"fm-iconfont icon-plus",staticStyle:{"font-size":"12px",margin:"5px"}}),e._v(e._s(e.$t("fm.actions.add"))+"\n ")]):e._e()],1),t("a-col",{attrs:{md:(!e.preview||"mobile"==e.platform)&&e.preview||e.disableddata?24:12,xs:24,sm:24}},[e.paging&&e.tableData.length?t("a-pagination",{staticStyle:{float:"right","padding-top":"5px","white-space":"nowrap"},attrs:{layout:"total, prev, pager, next","page-size":e.pageSize,total:e.tableData.length,"pager-count":5,"show-less-items":""},on:{change:e.handlePageChange},model:{value:e.currentPage,callback:function(t){e.currentPage=t},expression:"currentPage"}}):e._e()],1)],1)],1)}),[],!1,null,null,null).exports,v=n("d511"),y=n("095c"),_=n("4260");function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k={name:"fm-sub-form",components:{GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"908f"))},GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"87b7"))},GenerateInline:function(){return Promise.resolve().then(n.bind(null,"9195"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"e66c"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bec1"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"d6ee"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"093a"))}},props:["showControl","config","list","value","models","remote","blanks","disableddata","rules","name","remoteOption","preview","platform","dataSourceValue","eventFunction","widget","printRead","paging","pageSize","containerKey","isAdd","isDelete","isDialog","dialogName","group","fieldNode"],data:function(){return{subformData:this.value||[],displayFields:{},changeItem:{},pagingData:[],pagingLength:0,currentPage:1,itemModel:{},subHideFields:[],subDisabledFields:[],itemDisabled:{}}},created:function(){var e=this;this._generateModel(this.list),this.loadPagingData(),this.subHideFields=this.value.map((function(t){return Object.fromEntries(Object.keys(e.displayFields).map((function(t){return[t,!e.displayFields[t]]})))})),this.subDisabledFields=this.value.map((function(t){return Object.fromEntries(Object.keys(e.itemDisabled).map((function(t){return[t,!e.itemDisabled[t]]})))}))},provide:function(){return{setSubformData:this.setSubformData}},inject:["onFormDisabled","onFormHide","onFormDisplay"],methods:{handleMouseover:function(e){Object(_.a)(this.$refs["formSubformItem_".concat(e)][0],"is-hover")},handleMouseout:function(e){Object(_.j)(this.$refs["formSubformItem_".concat(e)][0],"is-hover")},setSubformData:function(e,t,n){var i=u.a.cloneDeep(this.subformData);i[t][n]=e,this.subformData=i},setData:function(e,t){var n=this;return new Promise("number"!=typeof e?function(i){t=e,n.subformData.forEach((function(e,i){Object.keys(t).forEach((function(e){n.setSubformData(t[e],i,e)}))})),i()}:function(i){n.$nextTick((function(){Object.keys(t).forEach((function(i){n.setSubformData(t[i],e,i)})),i()}))})},handleAddRow:function(){var e=this;if(this.subformData=[].concat(Object(i.a)(this.subformData),[x({},this.itemModel)]),this.subHideFields.push(Object.fromEntries(Object.keys(this.displayFields).map((function(t){return[t,!e.displayFields[t]]})))),this.subDisabledFields.push(Object.fromEntries(Object.keys(this.itemDisabled).map((function(t){return[t,!e.itemDisabled[t]]})))),this.widget&&this.widget.events&&this.widget.events.onRowAdd){var t=this.widget.events.onRowAdd;this.eventFunction[t]({rowIndex:this.subformData.length-1,field:this.widget.model,currentRef:this})}this.paging&&this.$nextTick((function(){e.subformData.length>e.currentPage*e.pageSize&&(e.currentPage=parseInt((e.subformData.length-1)/e.pageSize)+1),e.loadPagingData()}))},handleRemove:function(e){var t=this,n=x({},this.subformData[e]),o=Object(i.a)(this.subformData);if(o.splice(e,1),this.subformData=o,this.subHideFields.splice(e,1),this.subDisabledFields.splice(e,1),this.widget&&this.widget.events&&this.widget.events.onRowRemove){var r=this.widget.events.onRowRemove;this.eventFunction[r]({removeIndex:e,removeData:n,field:this.widget.model,currentRef:this})}this.pagingData=[],this.pagingLength=0,this.paging&&this.$nextTick((function(){t.subformData.length%t.pageSize==0&&t.currentPage>parseInt(t.subformData.length/t.pageSize)&&(t.currentPage=parseInt(t.subformData.length/t.pageSize)),t.loadPagingData()}))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},disabled:function(e,t){var n=this;"string"==typeof e&&(e=[e]),this.subformData.forEach((function(i,o){e.forEach((function(e){n.$set(n.subDisabledFields[o],e,t)}))})),this._setDisabled(this.list,e,t)},hideChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormHide("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},displayChild:function(e,t){var n=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){n.onFormDisplay("".concat(n.fieldNode,".").concat(e,".").concat(t))}))},disabledChild:function(e,t,n){var i=this;"string"==typeof t&&(t=[t]),t.forEach((function(t){i.$set(i.subDisabledFields[e],t,n),i.onFormDisabled("".concat(i.fieldNode,".").concat(e,".").concat(t),n)}))},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.list,e,t)},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.list,e.split("."),t,"remove")}))},handlePageChange:function(e){var t=this;if(this.currentPage=e,this.pagingData=[],this.pagingLength,this.$nextTick((function(){t.loadPagingData()})),this.widget&&this.widget.events&&this.widget.events.onPageChange){var n=this.widget.events.onPageChange;this.eventFunction[n]({currentPage:e,field:this.widget.model,currentRef:this})}},loadPagingData:function(){var e=(this.currentPage-1)*this.pageSize,t=e+this.pageSize;this.pagingData=this.subformData.slice(e,t),this.pagingLength=this.pagingData.length},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.displayFields[e[n].model]=!e[n].options.hidden,e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.displayFields[e[n].model]=!e[n].options.hidden):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.displayFields[e[n].model]=!e[n].options.hidden):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.displayFields[e[n].model]=!e[n].options.hidden):("blank"==e[n].type?this.itemModel[e[n].model]="String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]:this.itemModel[e[n].model]=u.a.cloneDeep(e[n].options.defaultValue),this.displayFields[e[n].model]=!e[n].options.hidden,this.itemDisabled[e[n].model]=!e[n].options.disabled)},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(this.$set(e[o].options,"disabled",n),this.$set(this.itemDisabled,e[o].model,!n))},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):("inline"===e[o].type||"card"===e[o].type)&&i._setOptions(e[o].list,t,n),t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)}},watch:{value:function(e){this.subformData=e;for(var t=[],n=[],i=0;i<this.value.length;i++){for(var o=Object.keys(this.displayFields),r={},a=0;a<o.length;a++){var s,l;r[o[a]]=(null===(s=this.subHideFields)||void 0===s||null===(l=s[i])||void 0===l?void 0:l[o[a]])||!this.displayFields[o[a]]}t.push(r);for(var c=Object.keys(this.itemDisabled),u={},d=0;d<c.length;d++){var f,p;u[c[d]]=(null===(f=this.subDisabledFields)||void 0===f||null===(p=f[i])||void 0===p?void 0:p[c[d]])||!this.itemDisabled[c[d]]}n.push(u)}this.subHideFields=t,this.subDisabledFields=n},subformData:{deep:!0,handler:function(e){this.loadPagingData(),this.$emit("input",e)}}}},O=(n("a8ba"),Object(g.a)(k,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-subform"},[e._l(e.paging?e.pagingLength:e.subformData,(function(n,i){return t("div",{key:(e.paging?e.pageSize*(e.currentPage-1):0)+i,ref:"formSubformItem_".concat((e.paging?e.pageSize*(e.currentPage-1):0)+i),refInFor:!0,staticClass:"form-subform-item",on:{mouseover:function(t){t.stopPropagation(),e.handleMouseover((e.paging?e.pageSize*(e.currentPage-1):0)+i)},mouseout:function(t){e.handleMouseout((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[e.showControl?t("div",{staticClass:"form-subform-index"},[t("a-tag",{attrs:{color:"blue"}},[e._v("#"+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))])],1):e._e(),e.showControl?t("div",{staticClass:"form-subform-remove"},[t("a-popconfirm",{attrs:{disabled:e.disableddata,title:e.$t("fm.description.deleteConfirm")},on:{confirm:function(t){e.handleRemove((e.paging?e.pageSize*(e.currentPage-1):0)+i)}}},[!e.printRead&&e.isDelete?t("a-button",{attrs:{disabled:e.disableddata,type:"danger",shape:"circle",icon:"minus",size:"small"}}):e._e()],1),e.printRead||!e.isDelete?t("a-tag",{attrs:{color:"blue"}},[e._v("#"+e._s((e.paging?e.pageSize*(e.currentPage-1):0)+i+1))]):e._e()],1):e._e(),t("div",{staticClass:"form-subform-content"},[e._l(e.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.subformData[(e.paging?e.pageSize*(e.currentPage-1):0)+i],rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,"sub-hide-fields":e.subHideFields,"sub-disabled-fields":e.subDisabledFields,edit:!e.disableddata,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-subform":!0,"row-index":(e.paging?e.pageSize*(e.currentPage-1):0)+i,"sub-name":e.name,config:e.config,"is-dialog":e.isDialog,"dialog-name":e.dialogName,"is-group":!1,group:e.group?"".concat(e.group,".").concat(e.name):e.name,"field-node":"".concat(e.fieldNode,".").concat((e.paging?e.pageSize*(e.currentPage-1):0)+i)},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)])})),t("a-row",{staticClass:"form-subform-action"},[t("a-col",{attrs:{md:e.preview&&"mobile"!=e.platform||!e.preview?12:24,sm:24}},[!e.disableddata&&e.isAdd?t("a-button",{attrs:{type:"link"},on:{click:e.handleAddRow}},[t("i",{staticClass:"fm-iconfont icon-plus",staticStyle:{"font-size":"12px",margin:"5px"}}),e._v(e._s(e.$t("fm.actions.add"))+"\n ")]):e._e()],1),t("a-col",{attrs:{md:(!e.preview||"mobile"==e.platform)&&e.preview||e.disableddata?24:12,xs:24,sm:24}},[e.paging&&e.subformData.length?t("a-pagination",{staticStyle:{float:"right","padding-top":"5px","white-space":"nowrap"},attrs:{layout:"total, prev, pager, next","page-size":e.pageSize,total:e.subformData.length,"pager-count":5,"show-less-items":""},on:{change:e.handlePageChange},model:{value:e.currentPage,callback:function(t){e.currentPage=t},expression:"currentPage"}}):e._e()],1)],1)],2)}),[],!1,null,null,null).exports),C=n("8bbf"),S=n.n(C),D=n("0f01"),P=(n("20d6"),n("5df3"),{name:"fm-group",components:{GenerateColItem:function(){return Promise.resolve().then(n.bind(null,"908f"))},GenerateFormItem:function(){return Promise.resolve().then(n.bind(null,"87b7"))},GenerateInline:function(){return Promise.resolve().then(n.bind(null,"9195"))},GenerateReport:function(){return Promise.resolve().then(n.bind(null,"e66c"))},GenerateTabItem:function(){return Promise.resolve().then(n.bind(null,"bec1"))},GenerateCollapse:function(){return Promise.resolve().then(n.bind(null,"d6ee"))},GenerateCard:function(){return Promise.resolve().then(n.bind(null,"093a"))}},props:["config","value","models","rules","element","remote","blanks","edit","remoteOption","platform","preview","containerKey","dataSourceValue","eventFunction","printRead","group","fieldNode"],data:function(){return{displayFields:{},groupModel:this.value||{},groupDisabled:{}}},inject:["generateComponentInstance","deleteComponentInstance","getFormComponent","onFormHide","onFormDisplay"],created:function(){this._generateModel(this.element.list)},mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode,this.$refs["generate-group-".concat(this.element.model)].$parent)},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode)},provide:function(){return{setGroupData:this.setGroupData}},methods:{setGroupData:function(e,t){this.$set(this.groupModel,t,e)},_generateModel:function(e){for(var t=this,n=0;n<e.length;n++)"grid"==e[n].type?(this.$set(this.displayFields,e[n].model,!e[n].options.hidden),e[n].columns.forEach((function(e){t._generateModel(e.list)}))):"tabs"===e[n].type||"collapse"===e[n].type?(e[n].tabs.forEach((function(e){t._generateModel(e.list)})),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):"report"===e[n].type?(e[n].rows.forEach((function(e){e.columns.forEach((function(e){t._generateModel(e.list)}))})),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):"inline"===e[n].type||"card"===e[n].type?(this._generateModel(e[n].list),this.$set(this.displayFields,e[n].model,!e[n].options.hidden)):("blank"==e[n].type?this.$set(this.groupModel,e[n].model,"String"===e[n].options.defaultType?"":"Object"===e[n].options.defaultType?{}:[]):this.$set(this.groupModel,e[n].model,this.value[e[n].model]||u.a.cloneDeep(e[n].options.defaultValue)),this.$set(this.displayFields,e[n].model,!e[n].options.hidden),this.$set(this.groupDisabled,e[n].model,!e[n].options.disabled))},hide:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormHide("".concat(t.fieldNode,".").concat(e))}))},display:function(e){var t=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){t.onFormDisplay("".concat(t.fieldNode,".").concat(e))}))},disabled:function(e,t){"string"==typeof e&&(e=[e]),this._setDisabled(this.element.list,e,t)},validate:function(){var e=this;return new Promise((function(t,n){var i=e._getAllRuleFields();Promise.all(i.map((function(t){return new Promise((function(n){e.getFormComponent().validateField(t,(function(e,t){n(t)}))}))}))).then((function(e){e.findIndex((function(e){return e}))>=0?n():t()}))}))},clearValidate:function(){var e=this._getAllRuleFields();this.getFormComponent().clearValidate(e)},setOptions:function(e,t){"string"==typeof e&&(e=[e]),this._setOptions(this.element.list,e,t)},setData:function(e){var t=this;return new Promise((function(n){t.$nextTick((function(){Object.keys(e).forEach((function(n){t.$set(t.groupModel,n,e[n])})),n()}))}))},getValues:function(){return this.groupModel},getValue:function(e){return this.groupModel[e]},addClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.element.list,e.split("."),t,"add")}))},removeClassName:function(e,t){var n=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){Object(d.a)(n.element.list,e.split("."),t,"remove")}))},_setDisabled:function(e,t,n){for(var i=this,o=0;o<e.length;o++)"grid"===e[o].type?e[o].columns.forEach((function(e){i._setDisabled(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setDisabled(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setDisabled(e.list,t,n)}))})):"inline"===e[o].type||"card"===e[o].type?this._setDisabled(e[o].list,t,n):t.indexOf(e[o].model)>=0&&(e[o].options.disabled=n)},_setOptions:function(e,t,n){for(var i=this,o=function(o){"grid"===e[o].type?e[o].columns.forEach((function(e){i._setOptions(e.list,t,n)})):"tabs"===e[o].type||"collapse"===e[o].type?e[o].tabs.forEach((function(e){i._setOptions(e.list,t,n)})):"report"===e[o].type?e[o].rows.forEach((function(e){e.columns.forEach((function(e){i._setOptions(e.list,t,n)}))})):("inline"===e[o].type||"card"===e[o].type)&&i._setOptions(e[o].list,t,n),t.indexOf(e[o].model)>=0&&Object.keys(n).forEach((function(t){e[o].options[t]=n[t]}))},r=0;r<e.length;r++)o(r)},_getAllRuleFields:function(){var e=this,t=[];return Object.keys(this.groupModel).forEach((function(n){Array.isArray(e.groupModel[n])?e.groupModel[n].forEach((function(i,o){Object.keys(i).forEach((function(i){t.push("".concat(e.fieldNode,".").concat(n,".").concat(o,".").concat(i))}))})):t.push("".concat(e.fieldNode,".").concat(n))})),t}},watch:{groupModel:{deep:!0,handler:function(e){this.$emit("input",e)}},value:{deep:!0,handler:function(e){this.groupModel=e}}}}),E=Object(g.a)(P,(function(){var e=this,t=e._self._c;return t("div",{ref:"generate-group-".concat(e.element.model),style:{width:e.element.options.width}},[e._l(e.element.list,(function(n){return["grid"==n.type?t("generate-col-item",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"tabs"==n.type?t("generate-tab-item",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"collapse"==n.type?t("generate-collapse",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"report"==n.type?t("generate-report",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"card"==n.type?t("generate-card",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):"inline"==n.type?t("generate-inline",{key:n.key,attrs:{model:e.groupModel,rules:e.rules,element:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)}):t("generate-form-item",{key:n.key,attrs:{models:e.groupModel,rules:e.rules,widget:n,remote:e.remote,blanks:e.blanks,display:e.displayFields,edit:e.edit,"remote-option":e.remoteOption,platform:e.platform,preview:e.preview,"container-key":e.containerKey,"data-source-value":e.dataSourceValue,"event-function":e.eventFunction,"print-read":e.printRead,"is-group":!0,"is-subform":!1,group:e.group?e.group+"."+e.element.model:e.element.model,"field-node":e.fieldNode,config:e.config},scopedSlots:e._u([e._l(e.blanks,(function(t){return{key:t.name,fn:function(n){return[e._t(t.name,null,{model:n.model})]}}}))],null,!0)})]}))],2)}),[],!1,null,null,null).exports;function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F={name:"generate-element-item",components:{FmUpload:l.a,FmFormTable:b,FmFileUpload:v.a,FmEditor:y.a,FmSubForm:O,FmGroup:E},props:["config","widget","value","models","remote","isTable","blanks","disabled","edit","remoteOption","rules","platform","preview","dataSourceValue","eventFunction","rowIndex","tableName","containerKey","printRead","isMobile","isSubform","subName","isDialog","dialogName","group","fieldNode","isGroup","formItemComponent"],data:function(){var e,t;return{dataModel:this.value,dataModels:this.models,key:(new Date).getTime(),modelName:this.widget.model,remoteOptions:[],dynamicEvents:this.handleOnDynamicEvent(),dataOnly:null===(e=this.widget.options)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.map((function(e){return M(M({},e),{},{title:e.label})})),generateDisabled:void 0,remoteToken:""}},computed:{elementDisabled:function(){var e=this.widget.options.disabled;return Object(f.c)(this.widget.options.disabled)&&(e=Object(f.a)(Object(f.b)(this.widget.options.disabled),this.currentOptions,this.formContext)),"boolean"==typeof this.generateDisabled?!this.edit||this.generateDisabled:!this.edit||Boolean(e)},currentOptions:function(){return this.isTable||this.isSubform?{value:this.dataModel,fieldNode:this.fieldNode,currentRef:this.$refs["fm-"+this.widget.model],rowIndex:this.rowIndex,row:u.a.cloneDeep(this.models),field:this.widget.model,group:this.group}:{value:this.dataModel,fieldNode:this.fieldNode,currentRef:this.$refs["fm-"+this.widget.model],field:this.widget.model,group:this.group}},extendProps:function(){var e=this,t={};return this.widget.options.extendProps&&Object.keys(this.widget.options.extendProps).forEach((function(n){var i=e.widget.options.extendProps[n];Object(f.c)(i)?t[n]=Object(f.a)(Object(f.b)(i),e.currentOptions,e.formContext):t[n]=i})),t},groupNode:function(){return this.group?this.group+"."+this.widget.model:this.widget.model}},inject:["generateComponentInstance","deleteComponentInstance","eventScriptConfig","dynamicValueData","formContext","sendRequest"],created:function(){var e=this;if(this.widget.options.remote||("steps"==this.widget.type?this.loadOptions(this.widget.options.steps):"transfer"==this.widget.type?this.loadOptions(this.widget.options.data):this.loadOptions(this.widget.options.options)),!this.widget.options.remote||Object.keys(this.widget.options).indexOf("remoteType")>=0&&"func"!=this.widget.options.remoteType||!this.remote[this.widget.options.remoteFunc]||this.remote[this.widget.options.remoteFunc]((function(t){e.loadOptions(t)})),this.widget.options.remote&&"option"==this.widget.options.remoteType&&this.remoteOption[this.widget.options.remoteOption]&&this.loadOptions(this.remoteOption[this.widget.options.remoteOption]),this.widget.options.remote&&"datasource"==this.widget.options.remoteType&&this.dataSourceValue){var t=this.getDataSourceOptions();t&&t.value&&this.loadOptions(t.value)}if("imgupload"!==this.widget.type&&"fileupload"!==this.widget.type||!this.widget.options.isQiniu||this.loadUploadConfig(),this.widget.options.remote&&"fx"==this.widget.options.remoteType){var n=Object(f.a)(this.widget.options.remoteFx,{},this.formContext);n&&this.loadOptions(n)}if("component"==this.widget.type){var i=this;S.a.component("component-".concat(this.widget.key,"-").concat(this.key),{template:"".concat(this.widget.options.template),props:["value"],data:function(){return{dataModel:e.value,formState:e.formContext}},watch:{dataModel:function(e){"antd"==this.ui?D.a.$emit("on-field-change",this.$attrs.id,e):this.$emit("input",e)},value:function(e){this.dataModel=e}},methods:{triggerEvent:function(e,t){if(i.eventScriptConfig()){var n=i.eventScriptConfig().find((function(t){return t.name==e}));n&&i.eventFunction[n.key](M(M({},i.currentOptions),{},{$eventArgs:t}))}}}})}},mounted:function(){this.generateComponentInstance&&this.generateComponentInstance(this.fieldNode,this.$refs["fm-"+this.widget.model]),this.handleOnMounted()},beforeDestroy:function(){this.deleteComponentInstance&&this.deleteComponentInstance(this.fieldNode)},methods:{handleOnDynamicEvent:function(){var e={};for(var t in this.widget.events){var n=this.widget.events[t];n&&(e[t]=this.callbackDynamicFunc(n))}return e},callbackDynamicFunc:function(e){var t=this;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];t.eventFunction[e](M(M({},t.currentOptions),{},{$eventArgs:i}))}},refreshOptionData:function(e){var t=this;return new Promise((function(n,i){if(t.widget.options.remote&&"fx"===t.widget.options.remoteType&&t.widget.options.remoteFx){var r=Object(f.a)(t.widget.options.remoteFx,t.currentOptions,t.formContext);null!==r&&t.loadOptions(r),n(r)}if(t.widget.options.remote&&"datasource"===t.widget.options.remoteType&&t.widget.options.remoteDataSource){var a="string"==typeof t.widget.options.remoteArgs?{}:M({},t.widget.options.remoteArgs);for(var s in a)Object(f.c)(a[s])&&(a[s]=Object(f.a)(Object(f.b)(a[s]),t.currentOptions,t.formContext));e&&"object"===Object(o.a)(e)&&(a=M(M({},a),e));var l=t.group?t.group+"."+t.widget.model+"."+t.widget.options.remoteDataSource:t.widget.model+"."+t.widget.options.remoteDataSource,c=t.dataSourceValue.find((function(e){return e.key===l&&u.a.isEqual(e.args,a)}));c?(t.loadOptions(c.value),n(c.value)):t.sendRequest(t.widget.options.remoteDataSource,a).then((function(e){t.loadOptions(e),n(e)})).catch((function(e){i(e)}))}}))},loadOptions:function(e){var t=this;Array.isArray(e)&&(this.remoteOptions=e.map((function(e){return t.widget.options.props.children&&t.widget.options.props.children.length&&Object.keys(e).includes(t.widget.options.props.children)?{value:e[t.widget.options.props.value],label:e[t.widget.options.props.label],children:t.processRemoteProps(e[t.widget.options.props.children],t.widget.options.props)}:"steps"==t.widget.type?{title:e[t.widget.options.props.title],description:e[t.widget.options.props.description]}:"transfer"==t.widget.type?{key:e[t.widget.options.props.key]+"",title:e[t.widget.options.props.label],disabled:e[t.widget.options.props.disabled]}:{value:e[t.widget.options.props.value],label:e[t.widget.options.props.label]}})))},getOptions:function(){return JSON.parse(JSON.stringify(this.remoteOptions))},processRemoteProps:function(e,t){var n=this;return e&&e.length?e.map((function(e){return n.processRemoteProps(e[t.children],t).length?{value:e[t.value],label:e[t.label],children:n.processRemoteProps(e[t.children],t)}:{value:e[t.value],label:e[t.label]}})):[]},loadUploadConfig:function(){var e=this;if("func"===this.widget.options.tokenType)!this.widget.options.token&&this.remote[this.widget.options.tokenFunc]((function(t){e.remoteToken=t}));else if("fx"===this.widget.options.tokenType){var t=Object(f.a)(this.widget.options.tokenFx,this.currentOptions,this.formContext);t&&(this.remoteToken=t)}else if(this.dataSourceValue){var n=this.getDataSourceOptions("tokenDataSource");n&&n.value&&(this.remoteToken=n.value)}},handleOnMounted:function(){this.execFunction("onMounted",{})},handleOnClick:function(){this.execFunction("onClick",{})},handleOnFocus:function(){this.execFunction("onFocus",{})},handleOnBlur:function(){D.a.$emit("on-validate-"+this.containerKey,this.fieldNode,this.containerKey),this.execFunction("onBlur",{})},handleOnUploadSelect:function(e){return this.execFunction("onSelect",{file:e})},handleOnUploadSuccess:function(e){this.execFunction("onUploadSuccess",{file:e})},handleOnUploadError:function(e){this.execFunction("onUploadError",{file:e})},handleOnUploadProgress:function(e){this.execFunction("onUploadProgress",{file:e})},handleOnUploadRemove:function(e){this.execFunction("onRemove",{file:e})},execFunction:function(e,t){if(this.widget.events&&this.widget.events[e]){var n=this.widget.events[e];return this.eventFunction[n](M(M({},this.currentOptions),t))}},getCascaderText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e.length>=1){var i=null==t?void 0:t.find((function(t){return t.value==e[0]}));return i&&n.push(i.label),e.splice(0,1),this.getCascaderText(e,null==i?void 0:i.children,n)}if(0==e.length)return n},getDataSourceOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"remoteDataSource",t=this.group?this.group+"."+this.widget.model+"."+this.widget.options[e]:this.widget.model+"."+this.widget.options[e];return this.dataSourceValue.find((function(e){return e.key===t}))},handleTransferChange:function(e){this.dataModel=e},disabledElement:function(e){this.generateDisabled=e}},watch:{value:function(e){this.dataModel=e},dataModel:function(e,t){var n=this;JSON.stringify(e)!=JSON.stringify(t)&&(this.$emit("input",e),setTimeout((function(){n.formItemComponent&&n.formItemComponent.onFieldChange()})))},remoteOption:{deep:!0,handler:function(e){Object.keys(this.remoteOption).indexOf(this.widget.options.remoteOption)>=0&&this.widget.options.remote&&"option"==this.widget.options.remoteType&&this.loadOptions(this.remoteOption[this.widget.options.remoteOption])}},dataSourceValue:{deep:!0,handler:function(e){if(this.dataSourceValue){var t=this.getDataSourceOptions();t&&t.value&&this.loadOptions(t.value)}"imgupload"!==this.widget.type&&"fileupload"!==this.widget.type||!this.widget.options.isQiniu||this.loadUploadConfig()}}}},T=Object(g.a)(F,(function(){var e,t,n,r,a,l=this,c=l._self._c;return c("span",{class:{"print-read-label":l.printRead}},["blank"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width}},[l._t(l.widget.model,null,{model:l.dataModels})],2)]:l._e(),"component"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width}},[c("component-".concat(l.widget.key,"-").concat(l.key),{key:l.key,ref:"fm-"+l.widget.model,tag:"component",model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})],1)]:l._e(),"custom"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width}},[c(l.widget.el,l._g(l._b({ref:"fm-"+l.widget.model,tag:"component",attrs:{width:l.widget.options.width,height:l.widget.options.height,size:l.config.size,placeholder:l.widget.options.placeholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,editable:l.widget.options.editable,clearable:l.widget.options.clearable,"print-read":l.printRead},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"component",s(s({},l.widget.options.customProps),l.extendProps),!1),l.dynamicEvents))],1)]:l._e(),"input"==l.widget.type?[l.printRead?[c("span",[l._v(l._s(l.dataModel))])]:[l.widget.options.showPassword?[c("a-input-password",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.dataTypeCheck?l.widget.options.dataType:"text",disabled:l.elementDisabled,placeholder:l.widget.options.placeholder,size:l.config.size,"allow-clear":l.widget.options.clearable,autocomplete:"off"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-input-password",s(s({},l.widget.options.customProps),l.extendProps),!1))]:[c("a-input",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.dataTypeCheck?l.widget.options.dataType:"text",disabled:l.elementDisabled,placeholder:l.widget.options.placeholder,"show-password":l.widget.options.showPassword,size:l.config.size,"allow-clear":l.widget.options.clearable,maxLength:l.widget.options.maxlength?Number(l.widget.options.maxlength):null,"show-count":l.widget.options.showWordLimit},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-input",s(s({},l.widget.options.customProps),l.extendProps),!1))]]]:l._e(),"textarea"==l.widget.type?[l.printRead?[c("pre",[l._v(l._s(l.dataModel))])]:[c("a-input",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:"textarea",rows:l.widget.options.rows,disabled:l.elementDisabled,placeholder:l.widget.options.placeholder,"allow-clear":l.widget.options.clearable,size:l.config.size,maxLength:l.widget.options.maxlength?Number(l.widget.options.maxlength):null,"show-count":l.widget.options.showWordLimit,autoSize:l.widget.options.autosize},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-input",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"number"==l.widget.type?[l.printRead?[c("span",[l._v(l._s(l.dataModel.toFixed(l.widget.options.precision)))])]:[c("a-input-number",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{step:l.widget.options.step,disabled:l.elementDisabled,min:l.widget.options.min,max:l.widget.options.max,"controls-position":l.widget.options.controlsPosition,precision:l.widget.options.precision,controls:l.widget.options.controls,size:l.config.size},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-input-number",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"radio"==l.widget.type?[l.printRead?[l.widget.options.remote?[l._v("\n "+l._s(l.remoteOptions.find((function(e){return e.value==l.dataModel}))&&l.remoteOptions.find((function(e){return e.value==l.dataModel})).label)+"\n ")]:[l._v("\n "+l._s(l.widget.options.showLabel?l.remoteOptions.find((function(e){return e.value==l.dataModel}))&&l.remoteOptions.find((function(e){return e.value==l.dataModel})).label:l.dataModel)+"\n ")]]:[c("a-radio-group",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-radio-group",s(s({},l.widget.options.customProps),l.extendProps),!1),l._l(l.remoteOptions,(function(e,t){return c("a-radio",{key:t,staticStyle:{"line-height":"30px"},style:{display:l.widget.options.inline?"inline-block":"block"},attrs:{value:e.value}},[l.widget.options.remote?[l._v(l._s(e.label))]:[l._v(l._s(l.widget.options.showLabel?e.label:e.value))]],2)})),1)]]:l._e(),"checkbox"==l.widget.type?[l.printRead?[l.widget.options.remote?[l._v("\n "+l._s(l.dataModel.map((function(e){return l.remoteOptions.find((function(t){return t.value==e}))&&l.remoteOptions.find((function(t){return t.value==e})).label})).join("、"))+"\n ")]:[l._v("\n "+l._s(l.widget.options.showLabel?l.dataModel.map((function(e){return l.remoteOptions.find((function(t){return t.value==e}))&&l.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):l.dataModel.join("、"))+"\n ")]]:[c("a-checkbox-group",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-checkbox-group",s(s({},l.widget.options.customProps),l.extendProps),!1),l._l(l.remoteOptions,(function(e,t){return c("a-checkbox",{key:t,style:{display:l.widget.options.inline?"inline-block":"block"},attrs:{value:e.value}},[l.widget.options.remote?[l._v(l._s(e.label))]:[l._v(l._s(l.widget.options.showLabel?e.label:e.value))]],2)})),1)]]:l._e(),"time"==l.widget.type?[l.printRead?[l._v("\n "+l._s(l.dataModel)+"\n ")]:[c("a-time-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{"is-range":l.widget.options.isRange,placeholder:l.widget.options.placeholder,"start-placeholder":l.widget.options.startPlaceholder,"end-placeholder":l.widget.options.endPlaceholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,arrowControl:l.widget.options.arrowControl,"value-format":l.widget.options.format,format:l.widget.options.format,size:l.config.size,popupClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-time-picker",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"date"==l.widget.type?[l.printRead?[l._v("\n "+l._s("dates"==l.widget.options.type?l.dataModel.join("、"):"object"==Object(o.a)(l.dataModel)?l.dataModel.join(" ~ "):l.dataModel)+"\n ")]:["date"==l.widget.options.type||"datetime"==l.widget.options.type?c("a-date-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.type,placeholder:l.widget.options.placeholder,"start-placeholder":l.widget.options.startPlaceholder,"end-placeholder":l.widget.options.endPlaceholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,"value-format":l.widget.options.timestamp?"timestamp":l.widget.options.format,format:l.widget.options.format,size:l.config.size,"show-time":"datetime"==l.widget.options.type&&{format:l.widget.options.format},dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-date-picker",s(s({},l.widget.options.customProps),l.extendProps),!1)):l._e(),"month"==l.widget.options.type?c("a-month-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.type,mode:l.widget.options.type,placeholder:l.widget.options.placeholder,"start-placeholder":l.widget.options.startPlaceholder,"end-placeholder":l.widget.options.endPlaceholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,"value-format":l.widget.options.timestamp?"timestamp":l.widget.options.format,format:l.widget.options.format,size:l.config.size,dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-month-picker",s(s({},l.widget.options.customProps),l.extendProps),!1)):l._e(),"week"==l.widget.options.type?c("a-week-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{type:l.widget.options.type,mode:l.widget.options.type,placeholder:l.widget.options.placeholder,"start-placeholder":l.widget.options.startPlaceholder,"end-placeholder":l.widget.options.endPlaceholder,readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,"value-format":l.widget.options.timestamp?"timestamp":l.widget.options.format,format:l.widget.options.format,size:l.config.size,dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-week-picker",s(s({},l.widget.options.customProps),l.extendProps),!1)):l._e(),"daterange"==l.widget.options.type||"datetimerange"==l.widget.options.type?c("a-range-picker",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{placeholder:[l.widget.options.startPlaceholder,l.widget.options.endPlaceholder],readonly:l.widget.options.readonly,disabled:l.elementDisabled,inputReadOnly:!l.widget.options.editable,clearable:l.widget.options.clearable,"value-format":l.widget.options.timestamp?"timestamp":l.widget.options.format,format:l.widget.options.format,size:l.config.size,"show-time":"datetimerange"==l.widget.options.type&&{format:l.widget.options.format},dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-range-picker",s(s({},l.widget.options.customProps),l.extendProps),!1)):l._e()]]:l._e(),"rate"==l.widget.type?[l.printRead?[l._v("\n "+l._s(l.dataModel)+"\n ")]:[c("a-rate",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{max:l.widget.options.max,count:l.widget.options.max,disabled:l.elementDisabled,"allow-half":l.widget.options.allowHalf,"show-score":l.widget.options.showScore,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-rate",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"color"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width,color:"#999"}},[l._v("\n Not currently supported.\n ")])]:l._e(),"select"==l.widget.type?[l.printRead?[l.widget.options.remote?[l._v("\n "+l._s("object"==Object(o.a)(l.dataModel)?l.dataModel.map((function(e){return l.remoteOptions.find((function(t){return t.value==e}))&&l.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):l.remoteOptions.find((function(e){return e.value==l.dataModel}))&&l.remoteOptions.find((function(e){return e.value==l.dataModel})).label)+"\n ")]:[l._v("\n "+l._s(l.widget.options.showLabel?"object"==Object(o.a)(l.dataModel)?l.dataModel.map((function(e){return l.remoteOptions.find((function(t){return t.value==e}))&&l.remoteOptions.find((function(t){return t.value==e})).label})).join("、"):l.remoteOptions.find((function(e){return e.value==l.dataModel}))&&l.remoteOptions.find((function(e){return e.value==l.dataModel})).label:"object"==Object(o.a)(l.dataModel)?l.dataModel.join("、"):l.dataModel)+"\n ")]]:[c("a-select",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,mode:l.widget.options.multiple?"multiple":"default","allow-clear":l.widget.options.clearable,placeholder:l.widget.options.placeholder,"show-search":l.widget.options.filterable,"option-filter-prop":"children",size:l.config.size,dropdownClassName:"fm-select-dropdown"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-select",s(s({},l.widget.options.customProps),l.extendProps),!1),l._l(l.remoteOptions,(function(e){return c("a-select-option",{key:e.value,attrs:{value:e.value}},[l._v("\n "+l._s(l.widget.options.showLabel||l.widget.options.remote?e.label:e.value)+"\n ")])})),1)]]:l._e(),"switch"==l.widget.type?[l.printRead?[l._v("\n "+l._s(l.dataModel)+"\n ")]:[c("a-switch",l._b({ref:"fm-"+l.widget.model,attrs:{"default-checked":l.dataModel,disabled:l.elementDisabled,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-switch",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"slider"==l.widget.type?[l.printRead?[l._v("\n "+l._s(l.dataModel)+"\n ")]:[c("a-slider",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{min:l.widget.options.min,max:l.widget.options.max,disabled:l.elementDisabled,step:l.widget.options.step,"show-input":l.widget.options.showInput,range:l.widget.options.range,size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-slider",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"imgupload"==l.widget.type?[c("fm-upload",{ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,readonly:l.widget.options.readonly||l.printRead,width:l.widget.options.size.width,height:l.widget.options.size.height,token:l.remoteToken,domain:l.widget.options.domain,multiple:l.widget.options.multiple,limit:l.widget.options.limit,"is-qiniu":l.widget.options.isQiniu,"is-delete":l.widget.options.isDelete,min:l.widget.options.min,"is-edit":l.widget.options.isEdit,action:l.widget.options.action,ui:"antd",headers:l.widget.options.headers||[],withCredentials:l.widget.options.withCredentials,"print-read":l.printRead,"on-select":l.handleOnUploadSelect,size:l.config.size},on:{"on-upload-success":l.handleOnUploadSuccess,"on-upload-error":l.handleOnUploadError,"on-upload-remove":l.handleOnUploadRemove,"on-upload-progress":l.handleOnUploadProgress},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"editor"==l.widget.type?[l.printRead?[c("div",{staticClass:"ql-editor",domProps:{innerHTML:l._s(l.dataModel)}})]:[c("fm-editor",{ref:"fm-"+l.widget.model,attrs:{sty:{width:l.isTable?"100%":l.widget.options.width,cursor:l.elementDisabled?"no-drop":"",backgroundColor:l.elementDisabled?"#F5F7FA":""},toolbar:l.widget.options.customToolbar,disabled:l.elementDisabled,ui:"antd",size:l.config.size},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]]:l._e(),"cascader"==l.widget.type?[l.printRead?[(l.widget.options.remote,[l._v("\n "+l._s(l.getCascaderText(Object(i.a)(l.dataModel),l.remoteOptions).join(" / "))+"\n ")])]:[c("a-cascader",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,"allow-clear":l.widget.options.clearable,placeholder:l.widget.options.placeholder,options:l.remoteOptions,showSearch:l.widget.options.filterable,"change-on-select":l.widget.options.checkStrictly,size:l.config.size,dropdownClassName:"fm-popup-index"},on:{focus:l.handleOnFocus,blur:l.handleOnBlur},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-cascader",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"text"==l.widget.type?[c("span",{ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width||"100%",display:"inline-block"}},[l._v(l._s(l.dataModel))])]:l._e(),"html"==l.widget.type?[c("span",{ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width||"100%",display:"inline-block"},domProps:{innerHTML:l._s(l.dataModel)}})]:l._e(),"table"==l.widget.type?[c("fm-form-table",{ref:"fm-"+l.widget.model,attrs:{columns:l.widget.tableColumns,models:l.dataModels,remote:l.remote,blanks:l.blanks,disableddata:l.elementDisabled||l.printRead,rules:l.rules,name:l.widget.model,"remote-option":l.remoteOption,preview:l.preview,platform:l.platform,"data-source-value":l.dataSourceValue,"event-function":l.eventFunction,widget:l.widget,"container-key":l.containerKey,"print-read":l.printRead,paging:l.widget.options.paging,"page-size":l.widget.options.pageSize,config:l.config,"is-add":null===(e=l.widget.options.isAdd)||void 0===e||e,"is-delete":null===(t=l.widget.options.isDelete)||void 0===t||t,"show-control":null===(n=l.widget.options.showControl)||void 0===n||n,"is-dialog":l.isDialog,"dialog-name":l.dialogName,"is-group":l.isGroup,group:l.group,"field-node":l.fieldNode},scopedSlots:l._u([l._l(l.blanks,(function(e){return{key:e.name,fn:function(t){return[l._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"subform"==l.widget.type?[c("fm-sub-form",{ref:"fm-"+l.widget.model,attrs:{list:l.widget.list,models:l.dataModels,remote:l.remote,blanks:l.blanks,disableddata:l.elementDisabled||l.printRead,rules:l.rules,name:l.widget.model,"remote-option":l.remoteOption,preview:l.preview,platform:l.platform,"data-source-value":l.dataSourceValue,"event-function":l.eventFunction,widget:l.widget,"print-read":l.printRead,paging:l.widget.options.paging,"page-size":l.widget.options.pageSize,config:l.config,"container-key":l.containerKey,"show-control":l.widget.options.showControl,"is-delete":null===(r=l.widget.options.isDelete)||void 0===r||r,"is-add":null===(a=l.widget.options.isAdd)||void 0===a||a,"is-dialog":l.isDialog,"dialog-name":l.dialogName,"is-group":l.isGroup,group:l.group,"field-node":l.fieldNode},scopedSlots:l._u([l._l(l.blanks,(function(e){return{key:e.name,fn:function(t){return[l._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"group"==l.widget.type?[c("fm-group",{ref:"fm-"+l.widget.model,attrs:{rules:l.rules,element:l.widget,remote:l.remote,blanks:l.blanks,edit:!l.elementDisabled,"remote-option":l.remoteOption,platform:l.platform,preview:l.preview,"container-key":l.containerKey,"data-source-value":l.dataSourceValue,"event-function":l.eventFunction,"print-read":l.printRead,"is-group":l.isGroup,group:l.group,"field-node":l.fieldNode,config:l.config},scopedSlots:l._u([l._l(l.blanks,(function(e){return{key:e.name,fn:function(t){return[l._t(e.name,null,{model:t.model})]}}}))],null,!0),model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"fileupload"==l.widget.type?[c("fm-file-upload",{ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{disabled:l.elementDisabled,token:l.remoteToken,domain:l.widget.options.domain,multiple:l.widget.options.multiple,limit:l.widget.options.limit,"is-qiniu":l.widget.options.isQiniu,min:l.widget.options.min,action:l.widget.options.action,ui:"antd",headers:l.widget.options.headers||[],withCredentials:l.widget.options.withCredentials,"print-read":l.printRead,"on-select":l.handleOnUploadSelect,size:l.config.size,accept:l.widget.options.accept},on:{"on-upload-success":l.handleOnUploadSuccess,"on-upload-error":l.handleOnUploadError,"on-upload-remove":l.handleOnUploadRemove,"on-upload-progress":l.handleOnUploadProgress},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}})]:l._e(),"button"==l.widget.type?[c("a-button",l._b({ref:"fm-"+l.widget.model,style:{width:l.widget.options.width},attrs:{disabled:l.elementDisabled,size:l.config.size,type:"text"==l.widget.options.buttonType?"link":l.widget.options.buttonType,shape:l.widget.options.buttonCircle?"circle":l.widget.options.buttonRound?"round":null,ghost:l.widget.options.buttonPlain},on:{click:l.handleOnClick}},"a-button",s(s({},l.widget.options.customProps),l.extendProps),!1),[l._v(l._s(l.widget.options.buttonName)+"\n ")])]:l._e(),"link"==l.widget.type?[c("div",{style:{width:l.isTable?"100%":l.widget.options.width,color:"#999"}},[l._v("\n Not currently supported.\n ")])]:l._e(),"steps"==l.widget.type?[c("a-steps",l._b({ref:"fm-"+l.widget.model,style:{"line-height":"normal"},attrs:{current:l.dataModel,space:l.widget.options.space,direction:l.widget.options.direction,status:l.widget.options.processStatus}},"a-steps",s(s({},l.widget.options.customProps),l.extendProps),!1),l._l(l.remoteOptions,(function(e,t){return c("a-step",{key:t,attrs:{title:e.title,description:e.description}})})),1)]:l._e(),"pagination"==l.widget.type?[l.printRead?[l._v("\n Page "+l._s(l.dataModel)+"\n ")]:[c("a-pagination",l._b({ref:"fm-"+l.widget.model,attrs:{"page-size":l.widget.options.pageSize,"pager-count":l.widget.options.pagerCount,disabled:l.widget.options.disabled,background:l.widget.options.background,total:l.widget.options.total,"show-total":function(e){return"".concat(l.$t("fm.config.widget.total")," ").concat(e)},"show-less-items":"","show-size-changer":!1,size:l.widget.options.background?"":"small"},model:{value:l.dataModel,callback:function(e){l.dataModel=e},expression:"dataModel"}},"a-pagination",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e(),"transfer"==l.widget.type?[l.printRead?[l.widget.options.remote?[l._v("\n "+l._s(l.dataModel.map((function(e){var t;return null===(t=l.widget.options.remoteOptions.find((function(t){return t.key==e})))||void 0===t?void 0:t.title})).join("、"))+"\n ")]:[l._v("\n "+l._s(l.dataModel.map((function(e){var t;return null===(t=l.remoteOptions.find((function(t){return t.key==e})))||void 0===t?void 0:t.label})).join("、"))+"\n ")]]:[c("a-transfer",l._b({ref:"fm-"+l.widget.model,style:{width:l.isTable?"100%":l.widget.options.width},attrs:{targetKeys:l.dataModel,disabled:l.elementDisabled,dataSource:l.widget.options.remote?l.remoteOptions:l.dataOnly,render:function(e){return"".concat(e.title)},showSearch:l.widget.options.filterable,titles:l.widget.options.titles},on:{change:l.handleTransferChange}},"a-transfer",s(s({},l.widget.options.customProps),l.extendProps),!1))]]:l._e()],2)}),[],!1,null,null,null);t.default=T.exports},"9aa9":function(e,t){t.f=Object.getOwnPropertySymbols},"9b43":function(e,t,n){var i=n("d8e8");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}},"9b52":function(e,t,n){},"9c6c":function(e,t,n){var i=n("2b4c")("unscopables"),o=Array.prototype;null==o[i]&&n("32e9")(o,i,{}),e.exports=function(e){o[i][e]=!0}},"9c80":function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},"9def":function(e,t,n){var i=n("4588"),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a071:function(e,t,n){"use strict";n.r(t);n("a481"),n("7f7f");var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("75fc")),r=(n("6b54"),n("28a5"),n("5e15")),a=n("70fb"),s=n("a141"),l=n("2ef0"),c=n.n(l),u=n("ca17"),d=n("0f01"),f=n("4260");function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h={name:"widget-group",components:{Draggable:r.a,WidgetFormItem:a.a,WidgetInline:s.a,WidgetColItem:function(){return Promise.resolve().then(n.bind(null,"956f"))},WidgetTabItem:function(){return Promise.resolve().then(n.bind(null,"1d67"))},WidgetReport:function(){return Promise.resolve().then(n.bind(null,"8791"))},WidgetCollapse:function(){return Promise.resolve().then(n.bind(null,"ca11"))},WidgetTable:function(){return Promise.resolve().then(n.bind(null,"67c8"))},WidgetSubForm:function(){return Promise.resolve().then(n.bind(null,"fa24"))},WidgetCard:function(){return Promise.resolve().then(n.bind(null,"af3f"))}},props:["element","select","index","data","platform","formKey","subform"],inject:["getDragging","setDragging"],data:function(){return{selectWidget:this.select||{}}},methods:{handleMouseover:function(e){!this.getDragging()&&Object(f.a)(this.$refs.widgetGroup,"is-hover")},handleMouseout:function(e){Object(f.j)(this.$refs.widgetGroup,"is-hover")},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("dialog-put")>=0||n.children[0].className.split(" ").indexOf("dialog-put")>=0)},handleSelectWidget:function(e){this.$emit("update:select",this.data.list[e])},handleSelectChange:function(e,t){var n=this;setTimeout((function(){e>=0?n.$emit("update:select",n.element.list[e]):n.$emit("update:select",n.data.list[n.index])}))},handleWidgetClone:function(e){var t=this,n=c.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(u.a)(n)),this.$nextTick((function(){t.$emit("update:select",t.data.list[e+1]),t.$nextTick((function(){d.a.$emit("on-history-add-"+t.formKey)}))}))},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){d.a.$emit("on-history-add-"+t.formKey)}),20)},handleWidgetGroupAdd:function(e,t){var n=this,i=e.newIndex,r=Math.random().toString(36).slice(-8);Object(f.d)(t.list,i),t.list[i]=c.a.cloneDeep(t.list[i]),t.list[i]=m(m({},t.list[i]),{},{options:m(m({},t.list[i].options),{},{remoteFunc:t.list[i].options.remoteFunc||"func_"+r,remoteOption:t.list[i].options.remoteOption||"option_"+r,tableColumn:!1,subform:!1}),key:t.list[i].key?t.list[i].key:r,model:t.list[i].model?t.list[i].model:t.list[i].type+"_"+r,rules:t.list[i].rules?Object(o.a)(t.list[i].rules):[]}),"report"==t.list[i].type&&(t.list[i].rows=Object(f.f)(t.list[i].rows),t.list[i].headerRow=Object(f.g)(t.list[i].headerRow)),"grid"==t.list[i].type&&(t.list[i].columns=Object(f.e)(t.list[i].columns)),this.selectWidget=t.list[i],this.$nextTick((function(){d.a.$emit("on-history-add-"+n.formKey)}))},handleWidgetGroupUpdate:function(){d.a.$emit("on-history-add-"+this.formKey)}},watch:{select:function(e){this.selectWidget=e},selectWidget:function(e){this.$emit("update:select",e)}}},g=n("2877"),b=Object(g.a)(h,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetGroup",staticClass:"widget-group widget-view",class:{active:e.select.key&&e.select.key==e.element.key,is_hidden:e.element.options.hidden},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("el-form-item",{class:Object(i.a)(Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),"fm-label-wrap",e.element.options.labelWrap),attrs:{label:e.element.options.hideLabel?"":e.element.name,"label-width":e.element.options.hideLabel?"0px":e.element.options.isLabelWidth?e.element.options.labelWidth+"px":""}},[e.element.options.tip?t("div",{staticClass:"fm-item-tooltip",domProps:{innerHTML:e._s(e.element.options.tip.replace(/\n/g,"<br/>"))}}):e._e(),t("div",{style:{width:e.element.options.width}},[t("draggable",e._b({staticClass:"widget-col-list",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetGroupAdd(t,e.element)},update:e.handleWidgetGroupUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:e.element.list,callback:function(t){e.$set(e.element,"list",t)},expression:"element.list"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[e._l(e.element.list,(function(n,i){return n&&n.key?["tabs"===n.type?t("widget-tab-item",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"collapse"===n.type?t("widget-collapse",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"table"===n.type?t("widget-table",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"subform"===n.type?t("widget-sub-form",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"card"===n.type?t("widget-card",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"inline"===n.type?t("widget-inline",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"report"===n.type?t("widget-report",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"group"===n.type?t("widget-group",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):"grid"!==n.type?t("widget-form-item",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}}):t("widget-col-item",{key:n.key,attrs:{element:n,select:e.selectWidget,index:i,data:e.element,platform:e.platform,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,n)}}})]:e._e()}))],2)],1)]),e.select.key==e.element.key?t("div",{staticClass:"widget-view-action widget-subform-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.select.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-subform-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])],1)}),[],!1,null,null,null);t.default=b.exports},a141:function(e,t,n){"use strict";var i=n("bd86"),o=(n("8e6e"),n("ac6a"),n("cadf"),n("456d"),n("75fc")),r=(n("6b54"),n("28a5"),n("70fb")),a=n("b76a"),s=n.n(a),l=n("2ef0"),c=n.n(l),u=n("ca17"),d=n("0f01"),f=n("4260");function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){Object(i.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h={name:"widget-inline",components:{Draggable:s.a,WidgetFormItem:r.a},props:["element","select","index","data","platform","formKey","subform"],inject:["setDragging","getDragging"],data:function(){return{selectWidget:this.select||{}}},methods:{handleMouseover:function(e){!this.getDragging()&&Object(f.a)(this.$refs.widgetInline,"is-hover")},handleMouseout:function(e){Object(f.j)(this.$refs.widgetInline,"is-hover")},handleSelectWidget:function(e){this.selectWidget=this.data.list[e]},handlePut:function(e,t,n){return!(n.className.split(" ").indexOf("widget-col")>=0||n.className.split(" ").indexOf("widget-table")>=0||n.className.split(" ").indexOf("widget-tab")>=0||n.className.split(" ").indexOf("widget-inline")>=0||n.className.split(" ").indexOf("widget-report")>=0||n.className.split(" ").indexOf("widget-dialog")>=0||n.className.split(" ").indexOf("widget-card")>=0||n.className.split(" ").indexOf("no-put")>=0||n.children[0].className.split(" ").indexOf("no-put")>=0)},handleWidgetInlineAdd:function(e,t){var n=this,i=e.newIndex,r=Math.random().toString(36).slice(-8);this.$set(t.list,i,c.a.cloneDeep(t.list[i])),this.$set(t.list,i,m(m({},t.list[i]),{},{options:m(m({},t.list[i].options),{},{remoteFunc:t.list[i].options.remoteFunc||"func_"+r,remoteOption:t.list[i].options.remoteOption||"option_"+r,subform:!!this.subform,tableColumn:!1}),key:t.list[i].key?t.list[i].key:r,model:t.list[i].model?t.list[i].model:t.list[i].type+"_"+r,rules:t.list[i].rules?Object(o.a)(t.list[i].rules):[]})),this.selectWidget=t.list[i],this.$nextTick((function(){d.a.$emit("on-history-add-"+n.formKey)}))},handleInlineClone:function(e){var t=this,n=c.a.cloneDeep(this.data.list[e]);this.data.list.splice(e+1,0,Object(u.a)(n)),this.$nextTick((function(){t.selectWidget=t.data.list[e+1],t.$nextTick((function(){d.a.$emit("on-history-add-"+t.formKey)}))}))},handleWidgetDelete:function(e){var t=this;1==this.data.list.length?this.$emit("select-change",-1):this.data.list.length-1==e?this.$emit("select-change",e-1):this.$emit("select-change",e),this.data.list.splice(e,1),setTimeout((function(){d.a.$emit("on-history-add-"+t.formKey)}),20)},handleWidgetInlineUpdate:function(){var e=this;this.$nextTick((function(){d.a.$emit("on-history-add-"+e.formKey)}))},handleSelectChange:function(e,t){var n=this;setTimeout((function(){n.selectWidget=e>=0?t.list[e]:n.data.list[n.index]}))}},watch:{select:function(e){this.selectWidget=e},selectWidget:{deep:!1,handler:function(e){this.$emit("update:select",e)}}}},g=n("2877"),b=Object(g.a)(h,(function(){var e=this,t=e._self._c;return t("div",{ref:"widgetInline",staticClass:"widget-inline widget-view",class:{active:e.selectWidget.key&&e.selectWidget.key==e.element.key,is_hidden:e.element.options.hidden},attrs:{size:e.element.options.size},on:{click:function(t){return t.stopPropagation(),e.handleSelectWidget(e.index)},mouseover:function(t){return t.stopPropagation(),e.handleMouseover.apply(null,arguments)},mouseout:e.handleMouseout}},[t("div",{staticClass:"widget-inline-content"},[t("draggable",e._b({staticClass:"widget-inline-list",class:Object(i.a)({},e.element.options&&e.element.options.customClass,!!e.element.options.customClass),style:{display:e.element.options.flex?"flex":"block","flex-direction":"row","flex-wrap":"wrap","justify-content":e.element.options.flexJustify||"normal","align-items":e.element.options.flexAlign||"normal"},attrs:{"no-transition-on-drag":!0},on:{add:function(t){return e.handleWidgetInlineAdd(t,e.element)},update:e.handleWidgetInlineUpdate,start:function(t){return e.setDragging(!0)},end:function(t){return e.setDragging(!1)}},model:{value:e.element.list,callback:function(t){e.$set(e.element,"list",t)},expression:"element.list"}},"draggable",{group:{name:"people",put:e.handlePut},ghostClass:"ghost",animation:200,handle:".drag-widget"},!1),[e._l(e.element.list,(function(n,i){return n&&n.key?[t("widget-form-item",{key:n.key,style:{"margin-right":e.element.options.spaceSize+"px"},attrs:{element:n,select:e.selectWidget,index:i,data:e.element,"form-key":e.formKey},on:{"update:select":function(t){e.selectWidget=t},"select-change":function(t){return e.handleSelectChange(t,e.element)}}})]:e._e()}))],2)],1),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-action widget-inline-action"},[t("i",{staticClass:"fm-iconfont icon-icon_clone",attrs:{title:e.$t("fm.tooltip.clone")},on:{click:function(t){return t.stopPropagation(),e.handleInlineClone(e.index)}}}),t("i",{staticClass:"fm-iconfont icon-trash",attrs:{title:e.$t("fm.tooltip.trash")},on:{click:function(t){return t.stopPropagation(),e.handleWidgetDelete(e.index)}}})]):e._e(),e.selectWidget.key==e.element.key?t("div",{staticClass:"widget-view-drag widget-inline-drag"},[t("i",{staticClass:"fm-iconfont icon-drag drag-widget"})]):e._e(),t("div",{staticClass:"widget-view-model",style:{color:e.element.options.dataBind?"":"#666"}},[t("span",[e._v(e._s(e.element.model))])]),t("div",{staticClass:"widget-view-type"},[t("span",[e._v(e._s(e.element.type?this.$t("fm.components.fields."+e.element.type):""))])])])}),[],!1,null,null,null);t.a=b.exports},a159:function(e,t,n){var i=n("e4ae"),o=n("7e90"),r=n("1691"),a=n("5559")("IE_PROTO"),s=function(){},l=function(){var e,t=n("1ec9")("iframe"),i=r.length;for(t.style.display="none",n("32fc").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;i--;)delete l.prototype[r[i]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=i(e),n=new s,s.prototype=null,n[a]=e):n=l(),void 0===t?n:o(n,t)}},a22a:function(e,t,n){var i=n("d864"),o=n("b0dc"),r=n("3702"),a=n("e4ae"),s=n("b447"),l=n("7cd6"),c={},u={};(t=e.exports=function(e,t,n,d,f){var p,m,h,g,b=f?function(){return e}:l(e),v=i(n,d,t?2:1),y=0;if("function"!=typeof b)throw TypeError(e+" is not iterable!");if(r(b)){for(p=s(e.length);p>y;y++)if((g=t?v(a(m=e[y])[0],m[1]):v(e[y]))===c||g===u)return g}else for(h=b.call(e);!(m=h.next()).done;)if((g=o(h,v,m.value,t))===c||g===u)return g}).BREAK=c,t.RETURN=u},a231:function(e,t,n){"use strict";n("38c4")},a25f:function(e,t,n){var i=n("7726").navigator;e.exports=i&&i.userAgent||""},a281:function(e,t,n){"use strict";n("af8a")},a481:function(e,t,n){"use strict";var i=n("cb7c"),o=n("4bf8"),r=n("9def"),a=n("4588"),s=n("0390"),l=n("5f1b"),c=Math.max,u=Math.min,d=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n("214f")("replace",2,(function(e,t,n,m){return[function(i,o){var r=e(this),a=null==i?void 0:i[t];return void 0!==a?a.call(i,r,o):n.call(String(r),i,o)},function(e,t){var o=m(n,e,this,t);if(o.done)return o.value;var d=i(e),f=String(this),p="function"==typeof t;p||(t=String(t));var g=d.global;if(g){var b=d.unicode;d.lastIndex=0}for(var v=[];;){var y=l(d,f);if(null===y)break;if(v.push(y),!g)break;""===String(y[0])&&(d.lastIndex=s(f,r(d.lastIndex),b))}for(var _,w="",x=0,k=0;k<v.length;k++){y=v[k];for(var O=String(y[0]),C=c(u(a(y.index),f.length),0),S=[],D=1;D<y.length;D++)S.push(void 0===(_=y[D])?_:String(_));var P=y.groups;if(p){var E=[O].concat(S,C,f);void 0!==P&&E.push(P);var j=String(t.apply(void 0,E))}else j=h(O,f,C,S,P,t);C>=x&&(w+=f.slice(x,C)+j,x=C+O.length)}return w+f.slice(x)}];function h(e,t,i,r,a,s){var l=i+e.length,c=r.length,u=p;return void 0!==a&&(a=o(a),u=f),n.call(s,u,(function(n,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,i);case"'":return t.slice(l);case"<":s=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return n;if(u>c){var f=d(u/10);return 0===f?n:f<=c?void 0===r[f-1]?o.charAt(1):r[f-1]+o.charAt(1):n}s=r[u-1]}return void 0===s?"":s}))}}))},a512:function(e,t,n){},a5b8:function(e,t,n){"use strict";var i=n("d8e8");function o(e){var t,n;this.promise=new e((function(e,i){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=i})),this.resolve=i(t),this.reject=i(n)}e.exports.f=function(e){return new o(e)}},a7be:function(e,t,n){},a8ba:function(e,t,n){"use strict";n("81a6")},aa47:function(e,t,n){"use strict";
|
|
17
17
|
/**!
|
|
18
18
|
* Sortable 1.10.2
|
|
19
19
|
* @author RubaXa <trash@rubaxa.org>
|