@zipify/wysiwyg 4.0.4 → 4.0.5

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.
package/dist/cli.js CHANGED
@@ -7,4 +7,4 @@
7
7
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
8
8
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
9
9
  */
10
- Ih={get exports(){return Dh},set exports(t){Dh=t}},Rh=Dh,function(){var t,e="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",o=16,i=32,a=64,l=128,c=256,u=1/0,h=9007199254740991,p=NaN,f=4294967295,d=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",i],["partialRight",a],["rearg",c]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",k="[object Map]",x="[object Number]",S="[object Object]",E="[object Promise]",C="[object RegExp]",O="[object Set]",A="[object String]",M="[object Symbol]",T="[object WeakMap]",N="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",D="[object Float64Array]",L="[object Int8Array]",$="[object Int16Array]",P="[object Int32Array]",z="[object Uint8Array]",F="[object Uint8ClampedArray]",j="[object Uint16Array]",H="[object Uint32Array]",B=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,K=RegExp(q.source),J=RegExp(U.source),G=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ut=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,_t=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",kt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",Ct="\\ufe0e\\ufe0f",Ot="\\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",At="['’]",Mt="["+wt+"]",Tt="["+Ot+"]",Nt="["+kt+"]",It="\\d+",Rt="["+xt+"]",Dt="["+St+"]",Lt="[^"+wt+Ot+It+xt+St+Et+"]",$t="\\ud83c[\\udffb-\\udfff]",Pt="[^"+wt+"]",zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",jt="["+Et+"]",Ht="\\u200d",Bt="(?:"+Dt+"|"+Lt+")",Vt="(?:"+jt+"|"+Lt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Nt+"|"+$t+")?",Kt="["+Ct+"]?",Jt=Kt+Ut+"(?:"+Ht+"(?:"+[Pt,zt,Ft].join("|")+")"+Kt+Ut+")*",Gt="(?:"+[Rt,zt,Ft].join("|")+")"+Jt,Yt="(?:"+[Pt+Nt+"?",Nt,zt,Ft,Mt].join("|")+")",Xt=RegExp(At,"g"),Qt=RegExp(Nt,"g"),Zt=RegExp($t+"(?="+$t+")|"+Yt+Jt,"g"),te=RegExp([jt+"?"+Dt+"+"+Wt+"(?="+[Tt,jt,"$"].join("|")+")",Vt+"+"+qt+"(?="+[Tt,jt+Bt,"$"].join("|")+")",jt+"?"+Bt+"+"+Wt,jt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It,Gt].join("|"),"g"),ee=RegExp("["+Ht+wt+kt+Ct+"]"),ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["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"],oe=-1,ie={};ie[R]=ie[D]=ie[L]=ie[$]=ie[P]=ie[z]=ie[F]=ie[j]=ie[H]=!0,ie[m]=ie[g]=ie[N]=ie[y]=ie[I]=ie[v]=ie[b]=ie[_]=ie[k]=ie[x]=ie[S]=ie[C]=ie[O]=ie[A]=ie[T]=!1;var se={};se[m]=se[g]=se[N]=se[I]=se[y]=se[v]=se[R]=se[D]=se[L]=se[$]=se[P]=se[k]=se[x]=se[S]=se[C]=se[O]=se[A]=se[M]=se[z]=se[F]=se[j]=se[H]=!0,se[b]=se[_]=se[T]=!1;var ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,ce=parseInt,ue="object"==typeof s&&s&&s.Object===Object&&s,he="object"==typeof self&&self&&self.Object===Object&&self,pe=ue||he||Function("return this")(),fe=Rh&&!Rh.nodeType&&Rh,de=fe&&Ih&&!Ih.nodeType&&Ih,me=de&&de.exports===fe,ge=me&&ue.process,ye=function(){try{var t=de&&de.require&&de.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ve=ye&&ye.isArrayBuffer,be=ye&&ye.isDate,_e=ye&&ye.isMap,we=ye&&ye.isRegExp,ke=ye&&ye.isSet,xe=ye&&ye.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function Ce(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Oe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Me(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function Te(t,e){return!(null==t||!t.length)&&je(t,e,0)>-1}function Ne(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Ie(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Re(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function De(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function Le(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function $e(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Pe=We("length");function ze(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Fe(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function je(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Fe(t,Be,n)}function He(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Be(t){return t!=t}function Ve(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:p}function We(e){return function(n){return null==n?t:n[e]}}function qe(e){return function(n){return null==e?t:e[n]}}function Ue(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function Ke(e,n){for(var r,o=-1,i=e.length;++o<i;){var s=n(e[o]);s!==t&&(r=r===t?s:r+s)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ge(t){return t?t.slice(0,dn(t)+1).replace(rt,""):t}function Ye(t){return function(e){return t(e)}}function Xe(t,e){return Ie(e,(function(e){return t[e]}))}function Qe(t,e){return t.has(e)}function Ze(t,e){for(var n=-1,r=t.length;++n<r&&je(e,t[n],0)>-1;);return n}function tn(t,e){for(var n=t.length;n--&&je(e,t[n],0)>-1;);return n}function en(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var nn=qe({"À":"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"}),rn=qe({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function on(t){return"\\"+ae[t]}function sn(t){return ee.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ln(t,e){return function(n){return t(e(n))}}function cn(t,e){for(var n=-1,o=t.length,i=0,s=[];++n<o;){var a=t[n];a!==e&&a!==r||(t[n]=r,s[i++]=n)}return s}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function hn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function pn(t){return sn(t)?function(t){for(var e=Zt.lastIndex=0;Zt.test(t);)++e;return e}(t):Pe(t)}function fn(t){return sn(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.split("")}(t)}function dn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var mn=qe({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function s(ot){var wt,kt=(ot=null==ot?pe:gn.defaults(pe.Object(),ot,gn.pick(pe,re))).Array,xt=ot.Date,St=ot.Error,Et=ot.Function,Ct=ot.Math,Ot=ot.Object,At=ot.RegExp,Mt=ot.String,Tt=ot.TypeError,Nt=kt.prototype,It=Et.prototype,Rt=Ot.prototype,Dt=ot["__core-js_shared__"],Lt=It.toString,$t=Rt.hasOwnProperty,Pt=0,zt=(wt=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+wt:"",Ft=Rt.toString,jt=Lt.call(Ot),Ht=pe._,Bt=At("^"+Lt.call($t).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=me?ot.Buffer:t,Wt=ot.Symbol,qt=ot.Uint8Array,Ut=Vt?Vt.allocUnsafe:t,Kt=ln(Ot.getPrototypeOf,Ot),Jt=Ot.create,Gt=Rt.propertyIsEnumerable,Yt=Nt.splice,Zt=Wt?Wt.isConcatSpreadable:t,ee=Wt?Wt.iterator:t,ae=Wt?Wt.toStringTag:t,ue=function(){try{var t=di(Ot,"defineProperty");return t({},"",{}),t}catch(t){}}(),he=ot.clearTimeout!==pe.clearTimeout&&ot.clearTimeout,fe=xt&&xt.now!==pe.Date.now&&xt.now,de=ot.setTimeout!==pe.setTimeout&&ot.setTimeout,ge=Ct.ceil,ye=Ct.floor,Pe=Ot.getOwnPropertySymbols,qe=Vt?Vt.isBuffer:t,yn=ot.isFinite,vn=Nt.join,bn=ln(Ot.keys,Ot),_n=Ct.max,wn=Ct.min,kn=xt.now,xn=ot.parseInt,Sn=Ct.random,En=Nt.reverse,Cn=di(ot,"DataView"),On=di(ot,"Map"),An=di(ot,"Promise"),Mn=di(ot,"Set"),Tn=di(ot,"WeakMap"),Nn=di(Ot,"create"),In=Tn&&new Tn,Rn={},Dn=Hi(Cn),Ln=Hi(On),$n=Hi(An),Pn=Hi(Mn),zn=Hi(Tn),Fn=Wt?Wt.prototype:t,jn=Fn?Fn.valueOf:t,Hn=Fn?Fn.toString:t;function Bn(t){if(oa(t)&&!Ks(t)&&!(t instanceof Un)){if(t instanceof qn)return t;if($t.call(t,"__wrapped__"))return Bi(t)}return new qn(t)}var Vn=function(){function e(){}return function(n){if(!ra(n))return{};if(Jt)return Jt(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Wn(){}function qn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Gn;++e<n;)this.add(t[e])}function Xn(t){var e=this.__data__=new Jn(t);this.size=e.size}function Qn(t,e){var n=Ks(t),r=!n&&Us(t),o=!n&&!r&&Xs(t),i=!n&&!r&&!o&&pa(t),s=n||r||o||i,a=s?Je(t.length,Mt):[],l=a.length;for(var c in t)!e&&!$t.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wi(c,l))||a.push(c);return a}function Zn(e){var n=e.length;return n?e[Yr(0,n-1)]:t}function tr(t,e){return zi(Io(t),cr(e,0,t.length))}function er(t){return zi(Io(t))}function nr(e,n,r){(r!==t&&!Vs(e[n],r)||r===t&&!(n in e))&&ar(e,n,r)}function rr(e,n,r){var o=e[n];$t.call(e,n)&&Vs(o,r)&&(r!==t||n in e)||ar(e,n,r)}function or(t,e){for(var n=t.length;n--;)if(Vs(t[n][0],e))return n;return-1}function ir(t,e,n,r){return dr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function sr(t,e){return t&&Ro(e,Da(e),t)}function ar(t,e,n){"__proto__"==e&&ue?ue(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function lr(e,n){for(var r=-1,o=n.length,i=kt(o),s=null==e;++r<o;)i[r]=s?t:Ma(e,n[r]);return i}function cr(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function ur(e,n,r,o,i,s){var a,l=1&n,c=2&n,u=4&n;if(r&&(a=i?r(e,o,i,s):r(e)),a!==t)return a;if(!ra(e))return e;var h=Ks(e);if(h){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&$t.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!l)return Io(e,a)}else{var p=yi(e),f=p==_||p==w;if(Xs(e))return Co(e,l);if(p==S||p==m||f&&!i){if(a=c||f?{}:bi(e),!l)return c?function(t,e){return Ro(t,gi(t),e)}(e,function(t,e){return t&&Ro(e,La(e),t)}(a,e)):function(t,e){return Ro(t,mi(t),e)}(e,sr(a,e))}else{if(!se[p])return i?e:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case N:return Oo(t);case y:case v:return new o(+t);case I:return function(t,e){var n=e?Oo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case D:case L:case $:case P:case z:case F:case j:case H:return Ao(t,n);case k:return new o;case x:case A:return new o(t);case C:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case O:return new o;case M:return r=t,jn?Ot(jn.call(r)):{}}}(e,p,l)}}s||(s=new Xn);var d=s.get(e);if(d)return d;s.set(e,a),ca(e)?e.forEach((function(t){a.add(ur(t,n,r,t,e,s))})):ia(e)&&e.forEach((function(t,o){a.set(o,ur(t,n,r,o,e,s))}));var g=h?t:(u?c?ai:si:c?La:Da)(e);return Ce(g||e,(function(t,o){g&&(t=e[o=t]),rr(a,o,ur(t,n,r,o,e,s))})),a}function hr(e,n,r){var o=r.length;if(null==e)return!o;for(e=Ot(e);o--;){var i=r[o],s=n[i],a=e[i];if(a===t&&!(i in e)||!s(a))return!1}return!0}function pr(n,r,o){if("function"!=typeof n)throw new Tt(e);return Di((function(){n.apply(t,o)}),r)}function fr(t,e,n,r){var o=-1,i=Te,s=!0,a=t.length,l=[],c=e.length;if(!a)return l;n&&(e=Ie(e,Ye(n))),r?(i=Ne,s=!1):e.length>=200&&(i=Qe,s=!1,e=new Yn(e));t:for(;++o<a;){var u=t[o],h=null==n?u:n(u);if(u=r||0!==u?u:0,s&&h==h){for(var p=c;p--;)if(e[p]===h)continue t;l.push(u)}else i(e,h,r)||l.push(u)}return l}Bn.templateSettings={escape:G,evaluate:Y,interpolate:X,variable:"",imports:{_:Bn}},Bn.prototype=Wn.prototype,Bn.prototype.constructor=Bn,qn.prototype=Vn(Wn.prototype),qn.prototype.constructor=qn,Un.prototype=Vn(Wn.prototype),Un.prototype.constructor=Un,Kn.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},Kn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kn.prototype.get=function(e){var r=this.__data__;if(Nn){var o=r[e];return o===n?t:o}return $t.call(r,e)?r[e]:t},Kn.prototype.has=function(e){var n=this.__data__;return Nn?n[e]!==t:$t.call(n,e)},Kn.prototype.set=function(e,r){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Nn&&r===t?n:r,this},Jn.prototype.clear=function(){this.__data__=[],this.size=0},Jn.prototype.delete=function(t){var e=this.__data__,n=or(e,t);return!(n<0||(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,0))},Jn.prototype.get=function(e){var n=this.__data__,r=or(n,e);return r<0?t:n[r][1]},Jn.prototype.has=function(t){return or(this.__data__,t)>-1},Jn.prototype.set=function(t,e){var n=this.__data__,r=or(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(On||Jn),string:new Kn}},Gn.prototype.delete=function(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e},Gn.prototype.get=function(t){return pi(this,t).get(t)},Gn.prototype.has=function(t){return pi(this,t).has(t)},Gn.prototype.set=function(t,e){var n=pi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(t){return this.__data__.set(t,n),this},Yn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.clear=function(){this.__data__=new Jn,this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xn.prototype.get=function(t){return this.__data__.get(t)},Xn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Jn){var r=n.__data__;if(!On||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(t,e),this.size=n.size,this};var dr=$o(kr),mr=$o(xr,!0);function gr(t,e){var n=!0;return dr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function yr(e,n,r){for(var o=-1,i=e.length;++o<i;){var s=e[o],a=n(s);if(null!=a&&(l===t?a==a&&!ha(a):r(a,l)))var l=a,c=s}return c}function vr(t,e){var n=[];return dr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function br(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=_i),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?br(a,e-1,n,r,o):Re(o,a):r||(o[o.length]=a)}return o}var _r=Po(),wr=Po(!0);function kr(t,e){return t&&_r(t,e,Da)}function xr(t,e){return t&&wr(t,e,Da)}function Sr(t,e){return Me(e,(function(e){return ta(t[e])}))}function Er(e,n){for(var r=0,o=(n=ko(n,e)).length;null!=e&&r<o;)e=e[ji(n[r++])];return r&&r==o?e:t}function Cr(t,e,n){var r=e(t);return Ks(t)?r:Re(r,n(t))}function Or(e){return null==e?e===t?"[object Undefined]":"[object Null]":ae&&ae in Ot(e)?function(e){var n=$t.call(e,ae),r=e[ae];try{e[ae]=t;var o=!0}catch(t){}var i=Ft.call(e);return o&&(n?e[ae]=r:delete e[ae]),i}(e):function(t){return Ft.call(t)}(e)}function Ar(t,e){return t>e}function Mr(t,e){return null!=t&&$t.call(t,e)}function Tr(t,e){return null!=t&&e in Ot(t)}function Nr(e,n,r){for(var o=r?Ne:Te,i=e[0].length,s=e.length,a=s,l=kt(s),c=1/0,u=[];a--;){var h=e[a];a&&n&&(h=Ie(h,Ye(n))),c=wn(h.length,c),l[a]=!r&&(n||i>=120&&h.length>=120)?new Yn(a&&h):t}h=e[0];var p=-1,f=l[0];t:for(;++p<i&&u.length<c;){var d=h[p],m=n?n(d):d;if(d=r||0!==d?d:0,!(f?Qe(f,m):o(u,m,r))){for(a=s;--a;){var g=l[a];if(!(g?Qe(g,m):o(e[a],m,r)))continue t}f&&f.push(m),u.push(d)}}return u}function Ir(e,n,r){var o=null==(e=Ti(e,n=ko(n,e)))?e:e[ji(Zi(n))];return null==o?t:Se(o,e,r)}function Rr(t){return oa(t)&&Or(t)==m}function Dr(e,n,r,o,i){return e===n||(null==e||null==n||!oa(e)&&!oa(n)?e!=e&&n!=n:function(e,n,r,o,i,s){var a=Ks(e),l=Ks(n),c=a?g:yi(e),u=l?g:yi(n),h=(c=c==m?S:c)==S,p=(u=u==m?S:u)==S,f=c==u;if(f&&Xs(e)){if(!Xs(n))return!1;a=!0,h=!1}if(f&&!h)return s||(s=new Xn),a||pa(e)?oi(e,n,r,o,i,s):function(t,e,n,r,o,i,s){switch(n){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case N:return!(t.byteLength!=e.byteLength||!i(new qt(t),new qt(e)));case y:case v:case x:return Vs(+t,+e);case b:return t.name==e.name&&t.message==e.message;case C:case A:return t==e+"";case k:var a=an;case O:var l=1&r;if(a||(a=un),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var u=oi(a(t),a(e),r,o,i,s);return s.delete(t),u;case M:if(jn)return jn.call(t)==jn.call(e)}return!1}(e,n,c,r,o,i,s);if(!(1&r)){var d=h&&$t.call(e,"__wrapped__"),_=p&&$t.call(n,"__wrapped__");if(d||_){var w=d?e.value():e,E=_?n.value():n;return s||(s=new Xn),i(w,E,r,o,s)}}return!!f&&(s||(s=new Xn),function(e,n,r,o,i,s){var a=1&r,l=si(e),c=l.length,u=si(n),h=u.length;if(c!=h&&!a)return!1;for(var p=c;p--;){var f=l[p];if(!(a?f in n:$t.call(n,f)))return!1}var d=s.get(e),m=s.get(n);if(d&&m)return d==n&&m==e;var g=!0;s.set(e,n),s.set(n,e);for(var y=a;++p<c;){var v=e[f=l[p]],b=n[f];if(o)var _=a?o(b,v,f,n,e,s):o(v,b,f,e,n,s);if(!(_===t?v===b||i(v,b,r,o,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var w=e.constructor,k=n.constructor;w==k||!("constructor"in e)||!("constructor"in n)||"function"==typeof w&&w instanceof w&&"function"==typeof k&&k instanceof k||(g=!1)}return s.delete(e),s.delete(n),g}(e,n,r,o,i,s))}(e,n,r,o,Dr,i))}function Lr(e,n,r,o){var i=r.length,s=i,a=!o;if(null==e)return!s;for(e=Ot(e);i--;){var l=r[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var c=(l=r[i])[0],u=e[c],h=l[1];if(a&&l[2]){if(u===t&&!(c in e))return!1}else{var p=new Xn;if(o)var f=o(u,h,c,e,n,p);if(!(f===t?Dr(h,u,3,o,p):f))return!1}}return!0}function $r(t){return!(!ra(t)||(e=t,zt&&zt in e))&&(ta(t)?Bt:mt).test(Hi(t));var e}function Pr(t){return"function"==typeof t?t:null==t?sl:"object"==typeof t?Ks(t)?Vr(t[0],t[1]):Br(t):ml(t)}function zr(t){if(!Ci(t))return bn(t);var e=[];for(var n in Ot(t))$t.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Fr(t){if(!ra(t))return function(t){var e=[];if(null!=t)for(var n in Ot(t))e.push(n);return e}(t);var e=Ci(t),n=[];for(var r in t)("constructor"!=r||!e&&$t.call(t,r))&&n.push(r);return n}function jr(t,e){return t<e}function Hr(t,e){var n=-1,r=Gs(t)?kt(t.length):[];return dr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function Br(t){var e=fi(t);return 1==e.length&&e[0][2]?Ai(e[0][0],e[0][1]):function(n){return n===t||Lr(n,t,e)}}function Vr(e,n){return xi(e)&&Oi(n)?Ai(ji(e),n):function(r){var o=Ma(r,e);return o===t&&o===n?Ta(r,e):Dr(n,o,3)}}function Wr(e,n,r,o,i){e!==n&&_r(n,(function(s,a){if(i||(i=new Xn),ra(s))!function(e,n,r,o,i,s,a){var l=Ii(e,r),c=Ii(n,r),u=a.get(c);if(u)nr(e,r,u);else{var h=s?s(l,c,r+"",e,n,a):t,p=h===t;if(p){var f=Ks(c),d=!f&&Xs(c),m=!f&&!d&&pa(c);h=c,f||d||m?Ks(l)?h=l:Ys(l)?h=Io(l):d?(p=!1,h=Co(c,!0)):m?(p=!1,h=Ao(c,!0)):h=[]:aa(c)||Us(c)?(h=l,Us(l)?h=_a(l):ra(l)&&!ta(l)||(h=bi(c))):p=!1}p&&(a.set(c,h),i(h,c,o,s,a),a.delete(c)),nr(e,r,h)}}(e,n,a,r,Wr,o,i);else{var l=o?o(Ii(e,a),s,a+"",e,n,i):t;l===t&&(l=s),nr(e,a,l)}}),La)}function qr(e,n){var r=e.length;if(r)return wi(n+=n<0?r:0,r)?e[n]:t}function Ur(t,e,n){e=e.length?Ie(e,(function(t){return Ks(t)?function(e){return Er(e,1===t.length?t[0]:t)}:t})):[sl];var r=-1;e=Ie(e,Ye(hi()));var o=Hr(t,(function(t,n,o){var i=Ie(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(o,(function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,s=o.length,a=n.length;++r<s;){var l=Mo(o[r],i[r]);if(l)return r>=a?l:l*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Kr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var s=e[r],a=Er(t,s);n(a,s)&&eo(i,ko(s,t),a)}return i}function Jr(t,e,n,r){var o=r?He:je,i=-1,s=e.length,a=t;for(t===e&&(e=Io(e)),n&&(a=Ie(t,Ye(n)));++i<s;)for(var l=0,c=e[i],u=n?n(c):c;(l=o(a,u,l,r))>-1;)a!==t&&Yt.call(a,l,1),Yt.call(t,l,1);return t}function Gr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;wi(o)?Yt.call(t,o,1):fo(t,o)}}return t}function Yr(t,e){return t+ye(Sn()*(e-t+1))}function Xr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ye(e/2))&&(t+=t)}while(e);return n}function Qr(t,e){return Li(Mi(t,e,sl),t+"")}function Zr(t){return Zn(Va(t))}function to(t,e){var n=Va(t);return zi(n,cr(e,0,n.length))}function eo(e,n,r,o){if(!ra(e))return e;for(var i=-1,s=(n=ko(n,e)).length,a=s-1,l=e;null!=l&&++i<s;){var c=ji(n[i]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var h=l[c];(u=o?o(h,c,l):t)===t&&(u=ra(h)?h:wi(n[i+1])?[]:{})}rr(l,c,u),l=l[c]}return e}var no=In?function(t,e){return In.set(t,e),t}:sl,ro=ue?function(t,e){return ue(t,"toString",{configurable:!0,enumerable:!1,value:rl(e),writable:!0})}:sl;function oo(t){return zi(Va(t))}function io(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=kt(o);++r<o;)i[r]=t[r+e];return i}function so(t,e){var n;return dr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function ao(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!ha(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return lo(t,e,sl,n)}function lo(e,n,r,o){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(n=r(n))!=n,l=null===n,c=ha(n),u=n===t;i<s;){var h=ye((i+s)/2),p=r(e[h]),f=p!==t,d=null===p,m=p==p,g=ha(p);if(a)var y=o||m;else y=u?m&&(o||f):l?m&&f&&(o||!d):c?m&&f&&!d&&(o||!g):!d&&!g&&(o?p<=n:p<n);y?i=h+1:s=h}return wn(s,4294967294)}function co(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!Vs(a,l)){var l=a;i[o++]=0===s?0:s}}return i}function uo(t){return"number"==typeof t?t:ha(t)?p:+t}function ho(t){if("string"==typeof t)return t;if(Ks(t))return Ie(t,ho)+"";if(ha(t))return Hn?Hn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function po(t,e,n){var r=-1,o=Te,i=t.length,s=!0,a=[],l=a;if(n)s=!1,o=Ne;else if(i>=200){var c=e?null:Qo(t);if(c)return un(c);s=!1,o=Qe,l=new Yn}else l=e?[]:a;t:for(;++r<i;){var u=t[r],h=e?e(u):u;if(u=n||0!==u?u:0,s&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue t;e&&l.push(h),a.push(u)}else o(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}function fo(t,e){return null==(t=Ti(t,e=ko(e,t)))||delete t[ji(Zi(e))]}function mo(t,e,n,r){return eo(t,e,n(Er(t,e)),r)}function go(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?io(t,r?0:i,r?i+1:o):io(t,r?i+1:0,r?o:i)}function yo(t,e){var n=t;return n instanceof Un&&(n=n.value()),De(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),n)}function vo(t,e,n){var r=t.length;if(r<2)return r?po(t[0]):[];for(var o=-1,i=kt(r);++o<r;)for(var s=t[o],a=-1;++a<r;)a!=o&&(i[o]=fr(i[o]||s,t[a],e,n));return po(br(i,1),e,n)}function bo(e,n,r){for(var o=-1,i=e.length,s=n.length,a={};++o<i;){var l=o<s?n[o]:t;r(a,e[o],l)}return a}function _o(t){return Ys(t)?t:[]}function wo(t){return"function"==typeof t?t:sl}function ko(t,e){return Ks(t)?t:xi(t,e)?[t]:Fi(wa(t))}var xo=Qr;function So(e,n,r){var o=e.length;return r=r===t?o:r,!n&&r>=o?e:io(e,n,r)}var Eo=he||function(t){return pe.clearTimeout(t)};function Co(t,e){if(e)return t.slice();var n=t.length,r=Ut?Ut(n):new t.constructor(n);return t.copy(r),r}function Oo(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Ao(t,e){var n=e?Oo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Mo(e,n){if(e!==n){var r=e!==t,o=null===e,i=e==e,s=ha(e),a=n!==t,l=null===n,c=n==n,u=ha(n);if(!l&&!u&&!s&&e>n||s&&a&&c&&!l&&!u||o&&a&&c||!r&&c||!i)return 1;if(!o&&!s&&!u&&e<n||u&&r&&i&&!o&&!s||l&&r&&i||!a&&i||!c)return-1}return 0}function To(t,e,n,r){for(var o=-1,i=t.length,s=n.length,a=-1,l=e.length,c=_n(i-s,0),u=kt(l+c),h=!r;++a<l;)u[a]=e[a];for(;++o<s;)(h||o<i)&&(u[n[o]]=t[o]);for(;c--;)u[a++]=t[o++];return u}function No(t,e,n,r){for(var o=-1,i=t.length,s=-1,a=n.length,l=-1,c=e.length,u=_n(i-a,0),h=kt(u+c),p=!r;++o<u;)h[o]=t[o];for(var f=o;++l<c;)h[f+l]=e[l];for(;++s<a;)(p||o<i)&&(h[f+n[s]]=t[o++]);return h}function Io(t,e){var n=-1,r=t.length;for(e||(e=kt(r));++n<r;)e[n]=t[n];return e}function Ro(e,n,r,o){var i=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var l=n[s],c=o?o(r[l],e[l],l,r,e):t;c===t&&(c=e[l]),i?ar(r,l,c):rr(r,l,c)}return r}function Do(t,e){return function(n,r){var o=Ks(n)?Ee:ir,i=e?e():{};return o(n,t,hi(r,2),i)}}function Lo(e){return Qr((function(n,r){var o=-1,i=r.length,s=i>1?r[i-1]:t,a=i>2?r[2]:t;for(s=e.length>3&&"function"==typeof s?(i--,s):t,a&&ki(r[0],r[1],a)&&(s=i<3?t:s,i=1),n=Ot(n);++o<i;){var l=r[o];l&&e(n,l,o,s)}return n}))}function $o(t,e){return function(n,r){if(null==n)return n;if(!Gs(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Ot(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Po(t){return function(e,n,r){for(var o=-1,i=Ot(e),s=r(e),a=s.length;a--;){var l=s[t?a:++o];if(!1===n(i[l],l,i))break}return e}}function zo(e){return function(n){var r=sn(n=wa(n))?fn(n):t,o=r?r[0]:n.charAt(0),i=r?So(r,1).join(""):n.slice(1);return o[e]()+i}}function Fo(t){return function(e){return De(tl(Ua(e).replace(Xt,"")),t,"")}}function jo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return ra(r)?r:n}}function Ho(e){return function(n,r,o){var i=Ot(n);if(!Gs(n)){var s=hi(r,3);n=Da(n),r=function(t){return s(i[t],t,i)}}var a=e(n,r,o);return a>-1?i[s?n[a]:a]:t}}function Bo(n){return ii((function(r){var o=r.length,i=o,s=qn.prototype.thru;for(n&&r.reverse();i--;){var a=r[i];if("function"!=typeof a)throw new Tt(e);if(s&&!l&&"wrapper"==ci(a))var l=new qn([],!0)}for(i=l?i:o;++i<o;){var c=ci(a=r[i]),u="wrapper"==c?li(a):t;l=u&&Si(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[ci(u[0])].apply(l,u[3]):1==a.length&&Si(a)?l[c]():l.thru(a)}return function(){var t=arguments,e=t[0];if(l&&1==t.length&&Ks(e))return l.plant(e).value();for(var n=0,i=o?r[n].apply(this,t):e;++n<o;)i=r[n].call(this,i);return i}}))}function Vo(e,n,r,o,i,s,a,c,u,h){var p=n&l,f=1&n,d=2&n,m=24&n,g=512&n,y=d?t:jo(e);return function t(){for(var l=arguments.length,v=kt(l),b=l;b--;)v[b]=arguments[b];if(m)var _=ui(t),w=en(v,_);if(o&&(v=To(v,o,i,m)),s&&(v=No(v,s,a,m)),l-=w,m&&l<h){var k=cn(v,_);return Yo(e,n,Vo,t.placeholder,r,v,k,c,u,h-l)}var x=f?r:this,S=d?x[e]:e;return l=v.length,c?v=Ni(v,c):g&&l>1&&v.reverse(),p&&u<l&&(v.length=u),this&&this!==pe&&this instanceof t&&(S=y||jo(S)),S.apply(x,v)}}function Wo(t,e){return function(n,r){return function(t,e,n,r){return kr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function qo(e,n){return function(r,o){var i;if(r===t&&o===t)return n;if(r!==t&&(i=r),o!==t){if(i===t)return o;"string"==typeof r||"string"==typeof o?(r=ho(r),o=ho(o)):(r=uo(r),o=uo(o)),i=e(r,o)}return i}}function Uo(t){return ii((function(e){return e=Ie(e,Ye(hi())),Qr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Ko(e,n){var r=(n=n===t?" ":ho(n)).length;if(r<2)return r?Xr(n,e):n;var o=Xr(n,ge(e/pn(n)));return sn(n)?So(fn(o),0,e).join(""):o.slice(0,e)}function Jo(e){return function(n,r,o){return o&&"number"!=typeof o&&ki(n,r,o)&&(r=o=t),n=ga(n),r===t?(r=n,n=0):r=ga(r),function(t,e,n,r){for(var o=-1,i=_n(ge((e-t)/(n||1)),0),s=kt(i);i--;)s[r?i:++o]=t,t+=n;return s}(n,r,o=o===t?n<r?1:-1:ga(o),e)}}function Go(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ba(e),n=ba(n)),t(e,n)}}function Yo(e,n,r,o,s,l,c,u,h,p){var f=8&n;n|=f?i:a,4&(n&=~(f?a:i))||(n&=-4);var d=[e,n,s,f?l:t,f?c:t,f?t:l,f?t:c,u,h,p],m=r.apply(t,d);return Si(e)&&Ri(m,d),m.placeholder=o,$i(m,e,n)}function Xo(t){var e=Ct[t];return function(t,n){if(t=ba(t),(n=null==n?0:wn(ya(n),292))&&yn(t)){var r=(wa(t)+"e").split("e");return+((r=(wa(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Qo=Mn&&1/un(new Mn([,-0]))[1]==u?function(t){return new Mn(t)}:hl;function Zo(t){return function(e){var n=yi(e);return n==k?an(e):n==O?hn(e):function(t,e){return Ie(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function ti(n,s,u,h,p,f,d,m){var g=2&s;if(!g&&"function"!=typeof n)throw new Tt(e);var y=h?h.length:0;if(y||(s&=-97,h=p=t),d=d===t?d:_n(ya(d),0),m=m===t?m:ya(m),y-=p?p.length:0,s&a){var v=h,b=p;h=p=t}var _=g?t:li(n),w=[n,s,u,h,p,v,b,f,d,m];if(_&&function(t,e){var n=t[1],o=e[1],i=n|o,s=i<131,a=o==l&&8==n||o==l&&n==c&&t[7].length<=e[8]||384==o&&e[7].length<=e[8]&&8==n;if(!s&&!a)return t;1&o&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var h=t[3];t[3]=h?To(h,u,e[4]):u,t[4]=h?cn(t[3],r):e[4]}(u=e[5])&&(h=t[5],t[5]=h?No(h,u,e[6]):u,t[6]=h?cn(t[5],r):e[6]),(u=e[7])&&(t[7]=u),o&l&&(t[8]=null==t[8]?e[8]:wn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(w,_),n=w[0],s=w[1],u=w[2],h=w[3],p=w[4],!(m=w[9]=w[9]===t?g?0:n.length:_n(w[9]-y,0))&&24&s&&(s&=-25),s&&1!=s)k=8==s||s==o?function(e,n,r){var o=jo(e);return function i(){for(var s=arguments.length,a=kt(s),l=s,c=ui(i);l--;)a[l]=arguments[l];var u=s<3&&a[0]!==c&&a[s-1]!==c?[]:cn(a,c);return(s-=u.length)<r?Yo(e,n,Vo,i.placeholder,t,a,u,t,t,r-s):Se(this&&this!==pe&&this instanceof i?o:e,this,a)}}(n,s,m):s!=i&&33!=s||p.length?Vo.apply(t,w):function(t,e,n,r){var o=1&e,i=jo(t);return function e(){for(var s=-1,a=arguments.length,l=-1,c=r.length,u=kt(c+a),h=this&&this!==pe&&this instanceof e?i:t;++l<c;)u[l]=r[l];for(;a--;)u[l++]=arguments[++s];return Se(h,o?n:this,u)}}(n,s,u,h);else var k=function(t,e,n){var r=1&e,o=jo(t);return function e(){return(this&&this!==pe&&this instanceof e?o:t).apply(r?n:this,arguments)}}(n,s,u);return $i((_?no:Ri)(k,w),n,s)}function ei(e,n,r,o){return e===t||Vs(e,Rt[r])&&!$t.call(o,r)?n:e}function ni(e,n,r,o,i,s){return ra(e)&&ra(n)&&(s.set(n,e),Wr(e,n,t,ni,s),s.delete(n)),e}function ri(e){return aa(e)?t:e}function oi(e,n,r,o,i,s){var a=1&r,l=e.length,c=n.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),h=s.get(n);if(u&&h)return u==n&&h==e;var p=-1,f=!0,d=2&r?new Yn:t;for(s.set(e,n),s.set(n,e);++p<l;){var m=e[p],g=n[p];if(o)var y=a?o(g,m,p,n,e,s):o(m,g,p,e,n,s);if(y!==t){if(y)continue;f=!1;break}if(d){if(!$e(n,(function(t,e){if(!Qe(d,e)&&(m===t||i(m,t,r,o,s)))return d.push(e)}))){f=!1;break}}else if(m!==g&&!i(m,g,r,o,s)){f=!1;break}}return s.delete(e),s.delete(n),f}function ii(e){return Li(Mi(e,t,Ji),e+"")}function si(t){return Cr(t,Da,mi)}function ai(t){return Cr(t,La,gi)}var li=In?function(t){return In.get(t)}:hl;function ci(t){for(var e=t.name+"",n=Rn[e],r=$t.call(Rn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ui(t){return($t.call(Bn,"placeholder")?Bn:t).placeholder}function hi(){var t=Bn.iteratee||al;return t=t===al?Pr:t,arguments.length?t(arguments[0],arguments[1]):t}function pi(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function fi(t){for(var e=Da(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Oi(o)]}return e}function di(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return $r(r)?r:t}var mi=Pe?function(t){return null==t?[]:(t=Ot(t),Me(Pe(t),(function(e){return Gt.call(t,e)})))}:vl,gi=Pe?function(t){for(var e=[];t;)Re(e,mi(t)),t=Kt(t);return e}:vl,yi=Or;function vi(t,e,n){for(var r=-1,o=(e=ko(e,t)).length,i=!1;++r<o;){var s=ji(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&na(o)&&wi(s,o)&&(Ks(t)||Us(t))}function bi(t){return"function"!=typeof t.constructor||Ci(t)?{}:Vn(Kt(t))}function _i(t){return Ks(t)||Us(t)||!!(Zt&&t&&t[Zt])}function wi(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function ki(t,e,n){if(!ra(n))return!1;var r=typeof e;return!!("number"==r?Gs(n)&&wi(e,n.length):"string"==r&&e in n)&&Vs(n[e],t)}function xi(t,e){if(Ks(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!ha(t))||Z.test(t)||!Q.test(t)||null!=e&&t in Ot(e)}function Si(t){var e=ci(t),n=Bn[e];if("function"!=typeof n||!(e in Un.prototype))return!1;if(t===n)return!0;var r=li(n);return!!r&&t===r[0]}(Cn&&yi(new Cn(new ArrayBuffer(1)))!=I||On&&yi(new On)!=k||An&&yi(An.resolve())!=E||Mn&&yi(new Mn)!=O||Tn&&yi(new Tn)!=T)&&(yi=function(e){var n=Or(e),r=n==S?e.constructor:t,o=r?Hi(r):"";if(o)switch(o){case Dn:return I;case Ln:return k;case $n:return E;case Pn:return O;case zn:return T}return n});var Ei=Dt?ta:bl;function Ci(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Rt)}function Oi(t){return t==t&&!ra(t)}function Ai(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Ot(r))}}function Mi(e,n,r){return n=_n(n===t?e.length-1:n,0),function(){for(var t=arguments,o=-1,i=_n(t.length-n,0),s=kt(i);++o<i;)s[o]=t[n+o];o=-1;for(var a=kt(n+1);++o<n;)a[o]=t[o];return a[n]=r(s),Se(e,this,a)}}function Ti(t,e){return e.length<2?t:Er(t,io(e,0,-1))}function Ni(e,n){for(var r=e.length,o=wn(n.length,r),i=Io(e);o--;){var s=n[o];e[o]=wi(s,r)?i[s]:t}return e}function Ii(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ri=Pi(no),Di=de||function(t,e){return pe.setTimeout(t,e)},Li=Pi(ro);function $i(t,e,n){var r=e+"";return Li(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ce(d,(function(n){var r="_."+n[0];e&n[1]&&!Te(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function Pi(e){var n=0,r=0;return function(){var o=kn(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function zi(e,n){var r=-1,o=e.length,i=o-1;for(n=n===t?o:n;++r<n;){var s=Yr(r,i),a=e[s];e[s]=e[r],e[r]=a}return e.length=n,e}var Fi=function(t){var e=Ps(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,o){e.push(r?o.replace(ut,"$1"):n||t)})),e}));function ji(t){if("string"==typeof t||ha(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Hi(t){if(null!=t){try{return Lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Bi(t){if(t instanceof Un)return t.clone();var e=new qn(t.__wrapped__,t.__chain__);return e.__actions__=Io(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Vi=Qr((function(t,e){return Ys(t)?fr(t,br(e,1,Ys,!0)):[]})),Wi=Qr((function(e,n){var r=Zi(n);return Ys(r)&&(r=t),Ys(e)?fr(e,br(n,1,Ys,!0),hi(r,2)):[]})),qi=Qr((function(e,n){var r=Zi(n);return Ys(r)&&(r=t),Ys(e)?fr(e,br(n,1,Ys,!0),t,r):[]}));function Ui(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ya(n);return o<0&&(o=_n(r+o,0)),Fe(t,hi(e,3),o)}function Ki(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==t&&(i=ya(r),i=r<0?_n(o+i,0):wn(i,o-1)),Fe(e,hi(n,3),i,!0)}function Ji(t){return null!=t&&t.length?br(t,1):[]}function Gi(e){return e&&e.length?e[0]:t}var Yi=Qr((function(t){var e=Ie(t,_o);return e.length&&e[0]===t[0]?Nr(e):[]})),Xi=Qr((function(e){var n=Zi(e),r=Ie(e,_o);return n===Zi(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Nr(r,hi(n,2)):[]})),Qi=Qr((function(e){var n=Zi(e),r=Ie(e,_o);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Nr(r,t,n):[]}));function Zi(e){var n=null==e?0:e.length;return n?e[n-1]:t}var ts=Qr(es);function es(t,e){return t&&t.length&&e&&e.length?Jr(t,e):t}var ns=ii((function(t,e){var n=null==t?0:t.length,r=lr(t,e);return Gr(t,Ie(e,(function(t){return wi(t,n)?+t:t})).sort(Mo)),r}));function rs(t){return null==t?t:En.call(t)}var os=Qr((function(t){return po(br(t,1,Ys,!0))})),is=Qr((function(e){var n=Zi(e);return Ys(n)&&(n=t),po(br(e,1,Ys,!0),hi(n,2))})),ss=Qr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,po(br(e,1,Ys,!0),t,n)}));function as(t){if(!t||!t.length)return[];var e=0;return t=Me(t,(function(t){if(Ys(t))return e=_n(t.length,e),!0})),Je(e,(function(e){return Ie(t,We(e))}))}function ls(e,n){if(!e||!e.length)return[];var r=as(e);return null==n?r:Ie(r,(function(e){return Se(n,t,e)}))}var cs=Qr((function(t,e){return Ys(t)?fr(t,e):[]})),us=Qr((function(t){return vo(Me(t,Ys))})),hs=Qr((function(e){var n=Zi(e);return Ys(n)&&(n=t),vo(Me(e,Ys),hi(n,2))})),ps=Qr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,vo(Me(e,Ys),t,n)})),fs=Qr(as),ds=Qr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,ls(e,r)}));function ms(t){var e=Bn(t);return e.__chain__=!0,e}function gs(t,e){return e(t)}var ys=ii((function(e){var n=e.length,r=n?e[0]:0,o=this.__wrapped__,i=function(t){return lr(t,e)};return!(n>1||this.__actions__.length)&&o instanceof Un&&wi(r)?((o=o.slice(r,+r+(n?1:0))).__actions__.push({func:gs,args:[i],thisArg:t}),new qn(o,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(i)})),vs=Do((function(t,e,n){$t.call(t,n)?++t[n]:ar(t,n,1)})),bs=Ho(Ui),_s=Ho(Ki);function ws(t,e){return(Ks(t)?Ce:dr)(t,hi(e,3))}function ks(t,e){return(Ks(t)?Oe:mr)(t,hi(e,3))}var xs=Do((function(t,e,n){$t.call(t,n)?t[n].push(e):ar(t,n,[e])})),Ss=Qr((function(t,e,n){var r=-1,o="function"==typeof e,i=Gs(t)?kt(t.length):[];return dr(t,(function(t){i[++r]=o?Se(e,t,n):Ir(t,e,n)})),i})),Es=Do((function(t,e,n){ar(t,n,e)}));function Cs(t,e){return(Ks(t)?Ie:Hr)(t,hi(e,3))}var Os=Do((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),As=Qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ki(t,e[0],e[1])?e=[]:n>2&&ki(e[0],e[1],e[2])&&(e=[e[0]]),Ur(t,br(e,1),[])})),Ms=fe||function(){return pe.Date.now()};function Ts(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,ti(e,l,t,t,t,t,n)}function Ns(n,r){var o;if("function"!=typeof r)throw new Tt(e);return n=ya(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=t),o}}var Is=Qr((function(t,e,n){var r=1;if(n.length){var o=cn(n,ui(Is));r|=i}return ti(t,r,e,n,o)})),Rs=Qr((function(t,e,n){var r=3;if(n.length){var o=cn(n,ui(Rs));r|=i}return ti(e,r,t,n,o)}));function Ds(n,r,o){var i,s,a,l,c,u,h=0,p=!1,f=!1,d=!0;if("function"!=typeof n)throw new Tt(e);function m(e){var r=i,o=s;return i=s=t,h=e,l=n.apply(o,r)}function g(t){return h=t,c=Di(v,r),p?m(t):l}function y(e){var n=e-u;return u===t||n>=r||n<0||f&&e-h>=a}function v(){var t=Ms();if(y(t))return b(t);c=Di(v,function(t){var e=r-(t-u);return f?wn(e,a-(t-h)):e}(t))}function b(e){return c=t,d&&i?m(e):(i=s=t,l)}function _(){var e=Ms(),n=y(e);if(i=arguments,s=this,u=e,n){if(c===t)return g(u);if(f)return Eo(c),c=Di(v,r),m(u)}return c===t&&(c=Di(v,r)),l}return r=ba(r)||0,ra(o)&&(p=!!o.leading,a=(f="maxWait"in o)?_n(ba(o.maxWait)||0,r):a,d="trailing"in o?!!o.trailing:d),_.cancel=function(){c!==t&&Eo(c),h=0,i=u=s=c=t},_.flush=function(){return c===t?l:b(Ms())},_}var Ls=Qr((function(t,e){return pr(t,1,e)})),$s=Qr((function(t,e,n){return pr(t,ba(e)||0,n)}));function Ps(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Tt(e);var r=function(){var e=arguments,o=n?n.apply(this,e):e[0],i=r.cache;if(i.has(o))return i.get(o);var s=t.apply(this,e);return r.cache=i.set(o,s)||i,s};return r.cache=new(Ps.Cache||Gn),r}function zs(t){if("function"!=typeof t)throw new Tt(e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ps.Cache=Gn;var Fs=xo((function(t,e){var n=(e=1==e.length&&Ks(e[0])?Ie(e[0],Ye(hi())):Ie(br(e,1),Ye(hi()))).length;return Qr((function(r){for(var o=-1,i=wn(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return Se(t,this,r)}))})),js=Qr((function(e,n){var r=cn(n,ui(js));return ti(e,i,t,n,r)})),Hs=Qr((function(e,n){var r=cn(n,ui(Hs));return ti(e,a,t,n,r)})),Bs=ii((function(e,n){return ti(e,c,t,t,t,n)}));function Vs(t,e){return t===e||t!=t&&e!=e}var Ws=Go(Ar),qs=Go((function(t,e){return t>=e})),Us=Rr(function(){return arguments}())?Rr:function(t){return oa(t)&&$t.call(t,"callee")&&!Gt.call(t,"callee")},Ks=kt.isArray,Js=ve?Ye(ve):function(t){return oa(t)&&Or(t)==N};function Gs(t){return null!=t&&na(t.length)&&!ta(t)}function Ys(t){return oa(t)&&Gs(t)}var Xs=qe||bl,Qs=be?Ye(be):function(t){return oa(t)&&Or(t)==v};function Zs(t){if(!oa(t))return!1;var e=Or(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!aa(t)}function ta(t){if(!ra(t))return!1;var e=Or(t);return e==_||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ea(t){return"number"==typeof t&&t==ya(t)}function na(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function ra(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function oa(t){return null!=t&&"object"==typeof t}var ia=_e?Ye(_e):function(t){return oa(t)&&yi(t)==k};function sa(t){return"number"==typeof t||oa(t)&&Or(t)==x}function aa(t){if(!oa(t)||Or(t)!=S)return!1;var e=Kt(t);if(null===e)return!0;var n=$t.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==jt}var la=we?Ye(we):function(t){return oa(t)&&Or(t)==C},ca=ke?Ye(ke):function(t){return oa(t)&&yi(t)==O};function ua(t){return"string"==typeof t||!Ks(t)&&oa(t)&&Or(t)==A}function ha(t){return"symbol"==typeof t||oa(t)&&Or(t)==M}var pa=xe?Ye(xe):function(t){return oa(t)&&na(t.length)&&!!ie[Or(t)]},fa=Go(jr),da=Go((function(t,e){return t<=e}));function ma(t){if(!t)return[];if(Gs(t))return ua(t)?fn(t):Io(t);if(ee&&t[ee])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ee]());var e=yi(t);return(e==k?an:e==O?un:Va)(t)}function ga(t){return t?(t=ba(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ya(t){var e=ga(t),n=e%1;return e==e?n?e-n:e:0}function va(t){return t?cr(ya(t),0,f):0}function ba(t){if("number"==typeof t)return t;if(ha(t))return p;if(ra(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ra(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=dt.test(t);return n||gt.test(t)?ce(t.slice(2),n?2:8):ft.test(t)?p:+t}function _a(t){return Ro(t,La(t))}function wa(t){return null==t?"":ho(t)}var ka=Lo((function(t,e){if(Ci(e)||Gs(e))Ro(e,Da(e),t);else for(var n in e)$t.call(e,n)&&rr(t,n,e[n])})),xa=Lo((function(t,e){Ro(e,La(e),t)})),Sa=Lo((function(t,e,n,r){Ro(e,La(e),t,r)})),Ea=Lo((function(t,e,n,r){Ro(e,Da(e),t,r)})),Ca=ii(lr),Oa=Qr((function(e,n){e=Ot(e);var r=-1,o=n.length,i=o>2?n[2]:t;for(i&&ki(n[0],n[1],i)&&(o=1);++r<o;)for(var s=n[r],a=La(s),l=-1,c=a.length;++l<c;){var u=a[l],h=e[u];(h===t||Vs(h,Rt[u])&&!$t.call(e,u))&&(e[u]=s[u])}return e})),Aa=Qr((function(e){return e.push(t,ni),Se(Pa,t,e)}));function Ma(e,n,r){var o=null==e?t:Er(e,n);return o===t?r:o}function Ta(t,e){return null!=t&&vi(t,e,Tr)}var Na=Wo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),t[e]=n}),rl(sl)),Ia=Wo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),$t.call(t,e)?t[e].push(n):t[e]=[n]}),hi),Ra=Qr(Ir);function Da(t){return Gs(t)?Qn(t):zr(t)}function La(t){return Gs(t)?Qn(t,!0):Fr(t)}var $a=Lo((function(t,e,n){Wr(t,e,n)})),Pa=Lo((function(t,e,n,r){Wr(t,e,n,r)})),za=ii((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ie(e,(function(e){return e=ko(e,t),r||(r=e.length>1),e})),Ro(t,ai(t),n),r&&(n=ur(n,7,ri));for(var o=e.length;o--;)fo(n,e[o]);return n})),Fa=ii((function(t,e){return null==t?{}:function(t,e){return Kr(t,e,(function(e,n){return Ta(t,n)}))}(t,e)}));function ja(t,e){if(null==t)return{};var n=Ie(ai(t),(function(t){return[t]}));return e=hi(e),Kr(t,n,(function(t,n){return e(t,n[0])}))}var Ha=Zo(Da),Ba=Zo(La);function Va(t){return null==t?[]:Xe(t,Da(t))}var Wa=Fo((function(t,e,n){return e=e.toLowerCase(),t+(n?qa(e):e)}));function qa(t){return Za(wa(t).toLowerCase())}function Ua(t){return(t=wa(t))&&t.replace(vt,nn).replace(Qt,"")}var Ka=Fo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ja=Fo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ga=zo("toLowerCase"),Ya=Fo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Xa=Fo((function(t,e,n){return t+(n?" ":"")+Za(e)})),Qa=Fo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Za=zo("toUpperCase");function tl(e,n,r){return e=wa(e),(n=r?t:n)===t?function(t){return ne.test(t)}(e)?function(t){return t.match(te)||[]}(e):function(t){return t.match(lt)||[]}(e):e.match(n)||[]}var el=Qr((function(e,n){try{return Se(e,t,n)}catch(t){return Zs(t)?t:new St(t)}})),nl=ii((function(t,e){return Ce(e,(function(e){e=ji(e),ar(t,e,Is(t[e],t))})),t}));function rl(t){return function(){return t}}var ol=Bo(),il=Bo(!0);function sl(t){return t}function al(t){return Pr("function"==typeof t?t:ur(t,1))}var ll=Qr((function(t,e){return function(n){return Ir(n,t,e)}})),cl=Qr((function(t,e){return function(n){return Ir(t,n,e)}}));function ul(t,e,n){var r=Da(e),o=Sr(e,r);null!=n||ra(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=Sr(e,Da(e)));var i=!(ra(n)&&"chain"in n&&!n.chain),s=ta(t);return Ce(o,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=Io(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})})),t}function hl(){}var pl=Uo(Ie),fl=Uo(Ae),dl=Uo($e);function ml(t){return xi(t)?We(ji(t)):function(t){return function(e){return Er(e,t)}}(t)}var gl=Jo(),yl=Jo(!0);function vl(){return[]}function bl(){return!1}var _l,wl=qo((function(t,e){return t+e}),0),kl=Xo("ceil"),xl=qo((function(t,e){return t/e}),1),Sl=Xo("floor"),El=qo((function(t,e){return t*e}),1),Cl=Xo("round"),Ol=qo((function(t,e){return t-e}),0);return Bn.after=function(t,n){if("function"!=typeof n)throw new Tt(e);return t=ya(t),function(){if(--t<1)return n.apply(this,arguments)}},Bn.ary=Ts,Bn.assign=ka,Bn.assignIn=xa,Bn.assignInWith=Sa,Bn.assignWith=Ea,Bn.at=Ca,Bn.before=Ns,Bn.bind=Is,Bn.bindAll=nl,Bn.bindKey=Rs,Bn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ks(t)?t:[t]},Bn.chain=ms,Bn.chunk=function(e,n,r){n=(r?ki(e,n,r):n===t)?1:_n(ya(n),0);var o=null==e?0:e.length;if(!o||n<1)return[];for(var i=0,s=0,a=kt(ge(o/n));i<o;)a[s++]=io(e,i,i+=n);return a},Bn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Bn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=kt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Re(Ks(n)?Io(n):[n],br(e,1))},Bn.cond=function(t){var n=null==t?0:t.length,r=hi();return t=n?Ie(t,(function(t){if("function"!=typeof t[1])throw new Tt(e);return[r(t[0]),t[1]]})):[],Qr((function(e){for(var r=-1;++r<n;){var o=t[r];if(Se(o[0],this,e))return Se(o[1],this,e)}}))},Bn.conforms=function(t){return function(t){var e=Da(t);return function(n){return hr(n,t,e)}}(ur(t,1))},Bn.constant=rl,Bn.countBy=vs,Bn.create=function(t,e){var n=Vn(t);return null==e?n:sr(n,e)},Bn.curry=function e(n,r,o){var i=ti(n,8,t,t,t,t,t,r=o?t:r);return i.placeholder=e.placeholder,i},Bn.curryRight=function e(n,r,i){var s=ti(n,o,t,t,t,t,t,r=i?t:r);return s.placeholder=e.placeholder,s},Bn.debounce=Ds,Bn.defaults=Oa,Bn.defaultsDeep=Aa,Bn.defer=Ls,Bn.delay=$s,Bn.difference=Vi,Bn.differenceBy=Wi,Bn.differenceWith=qi,Bn.drop=function(e,n,r){var o=null==e?0:e.length;return o?io(e,(n=r||n===t?1:ya(n))<0?0:n,o):[]},Bn.dropRight=function(e,n,r){var o=null==e?0:e.length;return o?io(e,0,(n=o-(n=r||n===t?1:ya(n)))<0?0:n):[]},Bn.dropRightWhile=function(t,e){return t&&t.length?go(t,hi(e,3),!0,!0):[]},Bn.dropWhile=function(t,e){return t&&t.length?go(t,hi(e,3),!0):[]},Bn.fill=function(e,n,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&ki(e,n,r)&&(r=0,o=i),function(e,n,r,o){var i=e.length;for((r=ya(r))<0&&(r=-r>i?0:i+r),(o=o===t||o>i?i:ya(o))<0&&(o+=i),o=r>o?0:va(o);r<o;)e[r++]=n;return e}(e,n,r,o)):[]},Bn.filter=function(t,e){return(Ks(t)?Me:vr)(t,hi(e,3))},Bn.flatMap=function(t,e){return br(Cs(t,e),1)},Bn.flatMapDeep=function(t,e){return br(Cs(t,e),u)},Bn.flatMapDepth=function(e,n,r){return r=r===t?1:ya(r),br(Cs(e,n),r)},Bn.flatten=Ji,Bn.flattenDeep=function(t){return null!=t&&t.length?br(t,u):[]},Bn.flattenDepth=function(e,n){return null!=e&&e.length?br(e,n=n===t?1:ya(n)):[]},Bn.flip=function(t){return ti(t,512)},Bn.flow=ol,Bn.flowRight=il,Bn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},Bn.functions=function(t){return null==t?[]:Sr(t,Da(t))},Bn.functionsIn=function(t){return null==t?[]:Sr(t,La(t))},Bn.groupBy=xs,Bn.initial=function(t){return null!=t&&t.length?io(t,0,-1):[]},Bn.intersection=Yi,Bn.intersectionBy=Xi,Bn.intersectionWith=Qi,Bn.invert=Na,Bn.invertBy=Ia,Bn.invokeMap=Ss,Bn.iteratee=al,Bn.keyBy=Es,Bn.keys=Da,Bn.keysIn=La,Bn.map=Cs,Bn.mapKeys=function(t,e){var n={};return e=hi(e,3),kr(t,(function(t,r,o){ar(n,e(t,r,o),t)})),n},Bn.mapValues=function(t,e){var n={};return e=hi(e,3),kr(t,(function(t,r,o){ar(n,r,e(t,r,o))})),n},Bn.matches=function(t){return Br(ur(t,1))},Bn.matchesProperty=function(t,e){return Vr(t,ur(e,1))},Bn.memoize=Ps,Bn.merge=$a,Bn.mergeWith=Pa,Bn.method=ll,Bn.methodOf=cl,Bn.mixin=ul,Bn.negate=zs,Bn.nthArg=function(t){return t=ya(t),Qr((function(e){return qr(e,t)}))},Bn.omit=za,Bn.omitBy=function(t,e){return ja(t,zs(hi(e)))},Bn.once=function(t){return Ns(2,t)},Bn.orderBy=function(e,n,r,o){return null==e?[]:(Ks(n)||(n=null==n?[]:[n]),Ks(r=o?t:r)||(r=null==r?[]:[r]),Ur(e,n,r))},Bn.over=pl,Bn.overArgs=Fs,Bn.overEvery=fl,Bn.overSome=dl,Bn.partial=js,Bn.partialRight=Hs,Bn.partition=Os,Bn.pick=Fa,Bn.pickBy=ja,Bn.property=ml,Bn.propertyOf=function(e){return function(n){return null==e?t:Er(e,n)}},Bn.pull=ts,Bn.pullAll=es,Bn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Jr(t,e,hi(n,2)):t},Bn.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?Jr(e,n,t,r):e},Bn.pullAt=ns,Bn.range=gl,Bn.rangeRight=yl,Bn.rearg=Bs,Bn.reject=function(t,e){return(Ks(t)?Me:vr)(t,zs(hi(e,3)))},Bn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=hi(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Gr(t,o),n},Bn.rest=function(n,r){if("function"!=typeof n)throw new Tt(e);return Qr(n,r=r===t?r:ya(r))},Bn.reverse=rs,Bn.sampleSize=function(e,n,r){return n=(r?ki(e,n,r):n===t)?1:ya(n),(Ks(e)?tr:to)(e,n)},Bn.set=function(t,e,n){return null==t?t:eo(t,e,n)},Bn.setWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:eo(e,n,r,o)},Bn.shuffle=function(t){return(Ks(t)?er:oo)(t)},Bn.slice=function(e,n,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&ki(e,n,r)?(n=0,r=o):(n=null==n?0:ya(n),r=r===t?o:ya(r)),io(e,n,r)):[]},Bn.sortBy=As,Bn.sortedUniq=function(t){return t&&t.length?co(t):[]},Bn.sortedUniqBy=function(t,e){return t&&t.length?co(t,hi(e,2)):[]},Bn.split=function(e,n,r){return r&&"number"!=typeof r&&ki(e,n,r)&&(n=r=t),(r=r===t?f:r>>>0)?(e=wa(e))&&("string"==typeof n||null!=n&&!la(n))&&!(n=ho(n))&&sn(e)?So(fn(e),0,r):e.split(n,r):[]},Bn.spread=function(t,n){if("function"!=typeof t)throw new Tt(e);return n=null==n?0:_n(ya(n),0),Qr((function(e){var r=e[n],o=So(e,0,n);return r&&Re(o,r),Se(t,this,o)}))},Bn.tail=function(t){var e=null==t?0:t.length;return e?io(t,1,e):[]},Bn.take=function(e,n,r){return e&&e.length?io(e,0,(n=r||n===t?1:ya(n))<0?0:n):[]},Bn.takeRight=function(e,n,r){var o=null==e?0:e.length;return o?io(e,(n=o-(n=r||n===t?1:ya(n)))<0?0:n,o):[]},Bn.takeRightWhile=function(t,e){return t&&t.length?go(t,hi(e,3),!1,!0):[]},Bn.takeWhile=function(t,e){return t&&t.length?go(t,hi(e,3)):[]},Bn.tap=function(t,e){return e(t),t},Bn.throttle=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new Tt(e);return ra(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),Ds(t,n,{leading:o,maxWait:n,trailing:i})},Bn.thru=gs,Bn.toArray=ma,Bn.toPairs=Ha,Bn.toPairsIn=Ba,Bn.toPath=function(t){return Ks(t)?Ie(t,ji):ha(t)?[t]:Io(Fi(wa(t)))},Bn.toPlainObject=_a,Bn.transform=function(t,e,n){var r=Ks(t),o=r||Xs(t)||pa(t);if(e=hi(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:ra(t)&&ta(i)?Vn(Kt(t)):{}}return(o?Ce:kr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Bn.unary=function(t){return Ts(t,1)},Bn.union=os,Bn.unionBy=is,Bn.unionWith=ss,Bn.uniq=function(t){return t&&t.length?po(t):[]},Bn.uniqBy=function(t,e){return t&&t.length?po(t,hi(e,2)):[]},Bn.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?po(e,t,n):[]},Bn.unset=function(t,e){return null==t||fo(t,e)},Bn.unzip=as,Bn.unzipWith=ls,Bn.update=function(t,e,n){return null==t?t:mo(t,e,wo(n))},Bn.updateWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:mo(e,n,wo(r),o)},Bn.values=Va,Bn.valuesIn=function(t){return null==t?[]:Xe(t,La(t))},Bn.without=cs,Bn.words=tl,Bn.wrap=function(t,e){return js(wo(e),t)},Bn.xor=us,Bn.xorBy=hs,Bn.xorWith=ps,Bn.zip=fs,Bn.zipObject=function(t,e){return bo(t||[],e||[],rr)},Bn.zipObjectDeep=function(t,e){return bo(t||[],e||[],eo)},Bn.zipWith=ds,Bn.entries=Ha,Bn.entriesIn=Ba,Bn.extend=xa,Bn.extendWith=Sa,ul(Bn,Bn),Bn.add=wl,Bn.attempt=el,Bn.camelCase=Wa,Bn.capitalize=qa,Bn.ceil=kl,Bn.clamp=function(e,n,r){return r===t&&(r=n,n=t),r!==t&&(r=(r=ba(r))==r?r:0),n!==t&&(n=(n=ba(n))==n?n:0),cr(ba(e),n,r)},Bn.clone=function(t){return ur(t,4)},Bn.cloneDeep=function(t){return ur(t,5)},Bn.cloneDeepWith=function(e,n){return ur(e,5,n="function"==typeof n?n:t)},Bn.cloneWith=function(e,n){return ur(e,4,n="function"==typeof n?n:t)},Bn.conformsTo=function(t,e){return null==e||hr(t,e,Da(e))},Bn.deburr=Ua,Bn.defaultTo=function(t,e){return null==t||t!=t?e:t},Bn.divide=xl,Bn.endsWith=function(e,n,r){e=wa(e),n=ho(n);var o=e.length,i=r=r===t?o:cr(ya(r),0,o);return(r-=n.length)>=0&&e.slice(r,i)==n},Bn.eq=Vs,Bn.escape=function(t){return(t=wa(t))&&J.test(t)?t.replace(U,rn):t},Bn.escapeRegExp=function(t){return(t=wa(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Bn.every=function(e,n,r){var o=Ks(e)?Ae:gr;return r&&ki(e,n,r)&&(n=t),o(e,hi(n,3))},Bn.find=bs,Bn.findIndex=Ui,Bn.findKey=function(t,e){return ze(t,hi(e,3),kr)},Bn.findLast=_s,Bn.findLastIndex=Ki,Bn.findLastKey=function(t,e){return ze(t,hi(e,3),xr)},Bn.floor=Sl,Bn.forEach=ws,Bn.forEachRight=ks,Bn.forIn=function(t,e){return null==t?t:_r(t,hi(e,3),La)},Bn.forInRight=function(t,e){return null==t?t:wr(t,hi(e,3),La)},Bn.forOwn=function(t,e){return t&&kr(t,hi(e,3))},Bn.forOwnRight=function(t,e){return t&&xr(t,hi(e,3))},Bn.get=Ma,Bn.gt=Ws,Bn.gte=qs,Bn.has=function(t,e){return null!=t&&vi(t,e,Mr)},Bn.hasIn=Ta,Bn.head=Gi,Bn.identity=sl,Bn.includes=function(t,e,n,r){t=Gs(t)?t:Va(t),n=n&&!r?ya(n):0;var o=t.length;return n<0&&(n=_n(o+n,0)),ua(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&je(t,e,n)>-1},Bn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ya(n);return o<0&&(o=_n(r+o,0)),je(t,e,o)},Bn.inRange=function(e,n,r){return n=ga(n),r===t?(r=n,n=0):r=ga(r),function(t,e,n){return t>=wn(e,n)&&t<_n(e,n)}(e=ba(e),n,r)},Bn.invoke=Ra,Bn.isArguments=Us,Bn.isArray=Ks,Bn.isArrayBuffer=Js,Bn.isArrayLike=Gs,Bn.isArrayLikeObject=Ys,Bn.isBoolean=function(t){return!0===t||!1===t||oa(t)&&Or(t)==y},Bn.isBuffer=Xs,Bn.isDate=Qs,Bn.isElement=function(t){return oa(t)&&1===t.nodeType&&!aa(t)},Bn.isEmpty=function(t){if(null==t)return!0;if(Gs(t)&&(Ks(t)||"string"==typeof t||"function"==typeof t.splice||Xs(t)||pa(t)||Us(t)))return!t.length;var e=yi(t);if(e==k||e==O)return!t.size;if(Ci(t))return!zr(t).length;for(var n in t)if($t.call(t,n))return!1;return!0},Bn.isEqual=function(t,e){return Dr(t,e)},Bn.isEqualWith=function(e,n,r){var o=(r="function"==typeof r?r:t)?r(e,n):t;return o===t?Dr(e,n,t,r):!!o},Bn.isError=Zs,Bn.isFinite=function(t){return"number"==typeof t&&yn(t)},Bn.isFunction=ta,Bn.isInteger=ea,Bn.isLength=na,Bn.isMap=ia,Bn.isMatch=function(t,e){return t===e||Lr(t,e,fi(e))},Bn.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Lr(e,n,fi(n),r)},Bn.isNaN=function(t){return sa(t)&&t!=+t},Bn.isNative=function(t){if(Ei(t))throw new St("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return $r(t)},Bn.isNil=function(t){return null==t},Bn.isNull=function(t){return null===t},Bn.isNumber=sa,Bn.isObject=ra,Bn.isObjectLike=oa,Bn.isPlainObject=aa,Bn.isRegExp=la,Bn.isSafeInteger=function(t){return ea(t)&&t>=-9007199254740991&&t<=h},Bn.isSet=ca,Bn.isString=ua,Bn.isSymbol=ha,Bn.isTypedArray=pa,Bn.isUndefined=function(e){return e===t},Bn.isWeakMap=function(t){return oa(t)&&yi(t)==T},Bn.isWeakSet=function(t){return oa(t)&&"[object WeakSet]"==Or(t)},Bn.join=function(t,e){return null==t?"":vn.call(t,e)},Bn.kebabCase=Ka,Bn.last=Zi,Bn.lastIndexOf=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==t&&(i=(i=ya(r))<0?_n(o+i,0):wn(i,o-1)),n==n?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(e,n,i):Fe(e,Be,i,!0)},Bn.lowerCase=Ja,Bn.lowerFirst=Ga,Bn.lt=fa,Bn.lte=da,Bn.max=function(e){return e&&e.length?yr(e,sl,Ar):t},Bn.maxBy=function(e,n){return e&&e.length?yr(e,hi(n,2),Ar):t},Bn.mean=function(t){return Ve(t,sl)},Bn.meanBy=function(t,e){return Ve(t,hi(e,2))},Bn.min=function(e){return e&&e.length?yr(e,sl,jr):t},Bn.minBy=function(e,n){return e&&e.length?yr(e,hi(n,2),jr):t},Bn.stubArray=vl,Bn.stubFalse=bl,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=El,Bn.nth=function(e,n){return e&&e.length?qr(e,ya(n)):t},Bn.noConflict=function(){return pe._===this&&(pe._=Ht),this},Bn.noop=hl,Bn.now=Ms,Bn.pad=function(t,e,n){t=wa(t);var r=(e=ya(e))?pn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Ko(ye(o),n)+t+Ko(ge(o),n)},Bn.padEnd=function(t,e,n){t=wa(t);var r=(e=ya(e))?pn(t):0;return e&&r<e?t+Ko(e-r,n):t},Bn.padStart=function(t,e,n){t=wa(t);var r=(e=ya(e))?pn(t):0;return e&&r<e?Ko(e-r,n)+t:t},Bn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),xn(wa(t).replace(rt,""),e||0)},Bn.random=function(e,n,r){if(r&&"boolean"!=typeof r&&ki(e,n,r)&&(n=r=t),r===t&&("boolean"==typeof n?(r=n,n=t):"boolean"==typeof e&&(r=e,e=t)),e===t&&n===t?(e=0,n=1):(e=ga(e),n===t?(n=e,e=0):n=ga(n)),e>n){var o=e;e=n,n=o}if(r||e%1||n%1){var i=Sn();return wn(e+i*(n-e+le("1e-"+((i+"").length-1))),n)}return Yr(e,n)},Bn.reduce=function(t,e,n){var r=Ks(t)?De:Ue,o=arguments.length<3;return r(t,hi(e,4),n,o,dr)},Bn.reduceRight=function(t,e,n){var r=Ks(t)?Le:Ue,o=arguments.length<3;return r(t,hi(e,4),n,o,mr)},Bn.repeat=function(e,n,r){return n=(r?ki(e,n,r):n===t)?1:ya(n),Xr(wa(e),n)},Bn.replace=function(){var t=arguments,e=wa(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Bn.result=function(e,n,r){var o=-1,i=(n=ko(n,e)).length;for(i||(i=1,e=t);++o<i;){var s=null==e?t:e[ji(n[o])];s===t&&(o=i,s=r),e=ta(s)?s.call(e):s}return e},Bn.round=Cl,Bn.runInContext=s,Bn.sample=function(t){return(Ks(t)?Zn:Zr)(t)},Bn.size=function(t){if(null==t)return 0;if(Gs(t))return ua(t)?pn(t):t.length;var e=yi(t);return e==k||e==O?t.size:zr(t).length},Bn.snakeCase=Ya,Bn.some=function(e,n,r){var o=Ks(e)?$e:so;return r&&ki(e,n,r)&&(n=t),o(e,hi(n,3))},Bn.sortedIndex=function(t,e){return ao(t,e)},Bn.sortedIndexBy=function(t,e,n){return lo(t,e,hi(n,2))},Bn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ao(t,e);if(r<n&&Vs(t[r],e))return r}return-1},Bn.sortedLastIndex=function(t,e){return ao(t,e,!0)},Bn.sortedLastIndexBy=function(t,e,n){return lo(t,e,hi(n,2),!0)},Bn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ao(t,e,!0)-1;if(Vs(t[n],e))return n}return-1},Bn.startCase=Xa,Bn.startsWith=function(t,e,n){return t=wa(t),n=null==n?0:cr(ya(n),0,t.length),e=ho(e),t.slice(n,n+e.length)==e},Bn.subtract=Ol,Bn.sum=function(t){return t&&t.length?Ke(t,sl):0},Bn.sumBy=function(t,e){return t&&t.length?Ke(t,hi(e,2)):0},Bn.template=function(e,n,r){var o=Bn.templateSettings;r&&ki(e,n,r)&&(n=t),e=wa(e),n=Sa({},n,o,ei);var i,s,a=Sa({},n.imports,o.imports,ei),l=Da(a),c=Xe(a,l),u=0,h=n.interpolate||bt,p="__p += '",f=At((n.escape||bt).source+"|"+h.source+"|"+(h===X?ht:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),d="//# sourceURL="+($t.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(f,(function(t,n,r,o,a,l){return r||(r=o),p+=e.slice(u,l).replace(_t,on),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),p+="';\n";var m=$t.call(n,"variable")&&n.variable;if(m){if(ct.test(m))throw new St("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(B,""):p).replace(V,"$1").replace(W,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=el((function(){return Et(l,d+"return "+p).apply(t,c)}));if(g.source=p,Zs(g))throw g;return g},Bn.times=function(t,e){if((t=ya(t))<1||t>h)return[];var n=f,r=wn(t,f);e=hi(e),t-=f;for(var o=Je(r,e);++n<t;)e(n);return o},Bn.toFinite=ga,Bn.toInteger=ya,Bn.toLength=va,Bn.toLower=function(t){return wa(t).toLowerCase()},Bn.toNumber=ba,Bn.toSafeInteger=function(t){return t?cr(ya(t),-9007199254740991,h):0===t?t:0},Bn.toString=wa,Bn.toUpper=function(t){return wa(t).toUpperCase()},Bn.trim=function(e,n,r){if((e=wa(e))&&(r||n===t))return Ge(e);if(!e||!(n=ho(n)))return e;var o=fn(e),i=fn(n);return So(o,Ze(o,i),tn(o,i)+1).join("")},Bn.trimEnd=function(e,n,r){if((e=wa(e))&&(r||n===t))return e.slice(0,dn(e)+1);if(!e||!(n=ho(n)))return e;var o=fn(e);return So(o,0,tn(o,fn(n))+1).join("")},Bn.trimStart=function(e,n,r){if((e=wa(e))&&(r||n===t))return e.replace(rt,"");if(!e||!(n=ho(n)))return e;var o=fn(e);return So(o,Ze(o,fn(n))).join("")},Bn.truncate=function(e,n){var r=30,o="...";if(ra(n)){var i="separator"in n?n.separator:i;r="length"in n?ya(n.length):r,o="omission"in n?ho(n.omission):o}var s=(e=wa(e)).length;if(sn(e)){var a=fn(e);s=a.length}if(r>=s)return e;var l=r-pn(o);if(l<1)return o;var c=a?So(a,0,l).join(""):e.slice(0,l);if(i===t)return c+o;if(a&&(l+=c.length-l),la(i)){if(e.slice(l).search(i)){var u,h=c;for(i.global||(i=At(i.source,wa(pt.exec(i))+"g")),i.lastIndex=0;u=i.exec(h);)var p=u.index;c=c.slice(0,p===t?l:p)}}else if(e.indexOf(ho(i),l)!=l){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+o},Bn.unescape=function(t){return(t=wa(t))&&K.test(t)?t.replace(q,mn):t},Bn.uniqueId=function(t){var e=++Pt;return wa(t)+e},Bn.upperCase=Qa,Bn.upperFirst=Za,Bn.each=ws,Bn.eachRight=ks,Bn.first=Gi,ul(Bn,(_l={},kr(Bn,(function(t,e){$t.call(Bn.prototype,e)||(_l[e]=t)})),_l),{chain:!1}),Bn.VERSION="4.17.21",Ce(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Bn[t].placeholder=Bn})),Ce(["drop","take"],(function(e,n){Un.prototype[e]=function(r){r=r===t?1:_n(ya(r),0);var o=this.__filtered__&&!n?new Un(this):this.clone();return o.__filtered__?o.__takeCount__=wn(r,o.__takeCount__):o.__views__.push({size:wn(r,f),type:e+(o.__dir__<0?"Right":"")}),o},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ce(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Un.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:hi(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ce(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Ce(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(sl)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Qr((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Ir(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter(zs(hi(t)))},Un.prototype.slice=function(e,n){e=ya(e);var r=this;return r.__filtered__&&(e>0||n<0)?new Un(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=ya(n))<0?r.dropRight(-n):r.take(n-e)),r)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(f)},kr(Un.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=Bn[o?"take"+("last"==n?"Right":""):n],s=o||/^find/.test(n);i&&(Bn.prototype[n]=function(){var n=this.__wrapped__,a=o?[1]:arguments,l=n instanceof Un,c=a[0],u=l||Ks(n),h=function(t){var e=i.apply(Bn,Re([t],a));return o&&p?e[0]:e};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,f=!!this.__actions__.length,d=s&&!p,m=l&&!f;if(!s&&u){n=m?n:new Un(this);var g=e.apply(n,a);return g.__actions__.push({func:gs,args:[h],thisArg:t}),new qn(g,p)}return d&&m?e.apply(this,a):(g=this.thru(h),d?o?g.value()[0]:g.value():g)})})),Ce(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Nt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Bn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Ks(o)?o:[],t)}return this[n]((function(n){return e.apply(Ks(n)?n:[],t)}))}})),kr(Un.prototype,(function(t,e){var n=Bn[e];if(n){var r=n.name+"";$t.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:e,func:n})}})),Rn[Vo(t,2).name]=[{name:"wrapper",func:t}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Io(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Io(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Io(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ks(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=wn(e,t+s);break;case"takeRight":t=_n(t,e-s)}}return{start:t,end:e}}(0,o,this.__views__),s=i.start,a=i.end,l=a-s,c=r?a:s-1,u=this.__iteratees__,h=u.length,p=0,f=wn(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return yo(t,this.__actions__);var d=[];t:for(;l--&&p<f;){for(var m=-1,g=t[c+=e];++m<h;){var y=u[m],v=y.iteratee,b=y.type,_=v(g);if(2==b)g=_;else if(!_){if(1==b)continue t;break t}}d[p++]=g}return d},Bn.prototype.at=ys,Bn.prototype.chain=function(){return ms(this)},Bn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===t&&(this.__values__=ma(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var n,r=this;r instanceof Wn;){var o=Bi(r);o.__index__=0,o.__values__=t,n?i.__wrapped__=o:n=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,n},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var n=e;return this.__actions__.length&&(n=new Un(this)),(n=n.reverse()).__actions__.push({func:gs,args:[rs],thisArg:t}),new qn(n,this.__chain__)}return this.thru(rs)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,ee&&(Bn.prototype[ee]=function(){return this}),Bn}();de?((de.exports=gn)._=gn,fe._=gn):pe._=gn}.call(s);const $h=dl.create({name:"node_processor",addCommands:()=>({setBlockAttributes:nh((({commands:t,state:e},n,r,o={})=>{const i=Ue(t.getBlockAttributes(n))??{},{doc:s,tr:a}=e,{from:l,to:c}=a.selection;s.nodesBetween(l,c,((t,e)=>{fc.blocks.includes(t.type.name)&&a.setNodeAttribute(e,n,{...o,...i,...r})}))})),getBlockAttributes:nh((({editor:t},e,n)=>vr((()=>{let r=Object.assign({},n||{});for(const n of fc.blocks)Object.assign(r,t.getAttributes(n)?.[e]||{});return Object.keys(r).length?r:null})))),removeBlockAttributes:nh((({commands:t},e)=>{for(const n of fc.blocks)t.resetAttributes(n,e)})),applyMark:nh((({state:t,commands:e},n,r,o={})=>{const{tr:i,doc:s,schema:a}=t,{$from:l,$to:c}=i.selection,u=bl(mc.LINK,a),h=bl(n,a);if(!(h.spec.group||"").includes(gc.SETTINGS))return e.setMark(n,r);if(l.pos===c.pos)return;s.nodesBetween(l.pos,c.pos,((t,s)=>{if(t.type.name===fc.LIST)return;const a=function(t,e){const n="string"==typeof e?e:e.name;return t.find((t=>t.type.name===n))}(t.marks,n),p=h.create({...a?.attrs||{},...r}),f=Mh(l,c,t,s),d=!u.isInSet(t.marks)&&function(t,e,n,r=Nh){const o=t.resolve(e).path.reverse();for(const t of o)if("number"!=typeof t)for(const e of t.marks)if(r(e,n))return!0;return!1}(i.doc,s,p,o.isAppliedToParent);if(d)return(t=>{if(!o.onAppliedToParent||!1===o.onAppliedToParent(t)){const{tr:n,node:r,position:o,mark:i}=t;e._removeNodeMark({tr:n,node:r,position:o,mark:i.type})}})({tr:i,node:t,position:s,mark:p});t.isText?i.addMark(f.from,f.to,p):function(t,e,n,r){const o=Th(t,r),i=e.from-o<=r,s=e.to+o>=n.nodeSize+r;return i&&s}(i.doc,i.selection,t,s)&&i.addNodeMark(s,p)}))})),getMarks:nh((({editor:t},e)=>{const n=Ye(t,"state");return vr((()=>{const{selection:t,doc:r}=Ue(n),{from:o,to:i}=Ue(t),s=[];return r.nodesBetween(o,i,(t=>{for(const n of t.marks)n.type.name===e&&s.unshift(n.attrs)})),s}))})),getMark:nh((({commands:t},e)=>{const n=t.getMarks(e);return vr((()=>Ue(n)[0]??null))})),hasMark:nh((({commands:t},e)=>{const n=t.getMark(e);return vr((()=>!!Ue(n)))})),getCommonSettingMark:nh((({commands:t},e,n)=>{const r=t.getMark(e);return vr((()=>Ue(r)?.value??Ue(n)))})),getDeviceSettingMark:nh((({commands:t},e,n)=>{const r=t.getMarks(e),o=t.getDevice();return vr((()=>{for(const t of Ue(r)){const e=t[Ue(o)];if(e)return e}return Ue(n)}))})),removeAllMarks:nh((({state:t,commands:e})=>{const{tr:n,doc:r}=t,{from:o,to:i}=n.selection;r.nodesBetween(o,i,((t,r)=>{for(const o of t.marks)e._removeNodeMark({tr:n,node:t,position:r,mark:o})}))})),removeMarks:nh((({state:t,commands:e},n)=>{const{tr:r,doc:o}=t,{from:i,to:s}=r.selection;o.nodesBetween(i,s,((t,o)=>{const i=t.marks.filter((t=>n.includes(t.type.name)));for(const n of i)e._removeNodeMark({tr:r,node:t,position:o,mark:n})}))})),_removeNodeMark:nh(((t,{tr:e,node:n,position:r,mark:o})=>n.isText?e.removeMark(r,r+n.nodeSize,o):e.removeNodeMark(r,o)))})}),Ph=dl.create({name:"text_processor",addCommands:()=>({getSelectedText:nh((({state:t})=>{const{from:e,to:n}=t.selection;return t.doc.textBetween(e,n," ")})),transformText:nh((({state:t},e)=>{const{$from:n,$to:r}=t.tr.selection;n.pos!==r.pos&&t.doc.nodesBetween(n.pos,r.pos,((o,i)=>{if(!o.isText)return;const s=Mh(n,r,o,i),a=Math.max(0,n.pos-i),l=Math.max(0,r.pos-i),c=e({text:o.textContent.substring(a,l)}),u=t.schema.text(c,o.marks);t.tr.replaceWith(s.from,s.to,u)}))}))})}),zh=dl.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:nh((({state:t})=>{this.storage.selection=t.selection})),restoreSelection:nh((({commands:t})=>{this.storage.selection&&t.setTextSelection(this.storage.selection)})),expandSelection:nh((({tr:t,commands:e},n)=>{let r=t.selection.from,o=t.selection.to;t.doc.nodesBetween(r,o,((e,i,s)=>{if(n({node:e,parent:s})){const n=e.isText?0:Th(t.doc,i);r=Math.min(r,i+n),o=Math.max(o,i+e.nodeSize-n)}})),e.setTextSelection({from:r,to:o})})),expandSelectionToBlock:nh((({commands:t})=>{t.expandSelection((({parent:t})=>t.type.name===fc.DOCUMENT))}))}}}),Fh=Hl.create({name:"doc",topNode:!0,content:"block+"});class jh extends Ro{constructor(t,e,n,r="SetDocAttr"){super(),this.key=t,this.value=e,this.schema=n,this.stepType=r}apply(t){this.prevValue=t.attrs.meta[this.key];const e=Kr.fromJSON(this.schema,t.toJSON());return e.attrs.meta[this.key]=this.value,Do.ok(e)}invert(){return new jh(this.key,this.prevValue,this.schema,"revertSetDocAttr")}map(){return null}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}static fromJSON(t){return new jh(t.key,t.value,t.stepType)}}Ro.jsonID("setDocAttr",jh);const Hh=Fh.extend({marks:gc.SETTINGS,addAttributes:()=>({meta:{default:{}}}),onCreate(){this.editor.view.dom.addEventListener("click",(t=>{t.target.closest("a")&&t.preventDefault()}))},addCommands:()=>({setDocMetaAttributes:nh((({state:t},e,n)=>{t.tr.step(new jh(e,n,t.schema))}))})}),Bh=Hl.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",Ya(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Vh=Bh.extend({marks:gc.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),Wh=Hl.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ya(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>{return e={find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}},new il({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=Qa(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}});var e}))}}),qh=Wh.extend({marks:gc.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),Uh=dl.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[_c.create(this.editor),wc.create(this.editor)]}}),Kh=jl.create({name:mc.FONT_FAMILY,group:gc.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:nh((({commands:t},e)=>{t.applyMark(this.name,{value:e});const n=t.findFontByName(e);let r=Ue(t.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),t.applyFontWeight(r));const o=t.isSettingCustomized(mc.FONT_STYLE).value;!n.isItalicSupported(r)&&o&&t.removeItalic()})),getFont:nh((({commands:t})=>{const e=Ue(this.options.defaultPreset),n=t.findFontByName(e.common.font_family),r=t.getFontFamily();return vr((()=>t.findFontByName(Ue(r))||n))})),findFontByName:nh(((t,e)=>Ue(this.options.fonts).find((t=>t.name===e)))),getFontFamily:nh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontFamily()))),getDefaultFontFamily:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>Ue(e).common.font_family))}))}},parseHTML(){const t=t=>({value:t.replace(/["']/g,"")});return[{style:"--zw-font-family",getAttrs:t},{style:"font-family",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>oh({font_family:t.value?`"${t.value}"`:null})}),Jh=dl.create({name:mc.STYLE_PRESET,addGlobalAttributes(){return[{types:[fc.PARAGRAPH,fc.HEADING],attributes:{preset:{isRequired:!1,default:{id:Ue(this.options.defaultId)},parseHTML:t=>{const e=Ue(this.options.presets);if("LI"===t.parentElement.tagName)return null;for(const{id:n,node:r,fallbackClass:o}of e){if(o&&t.classList.contains(o))return{id:n};const e=Ue(this.options.styleRenderer).makePresetCssClass({id:n});if(t.matches(e))return{id:n};if(t.tagName===`H${r?.level}`)return{id:n}}return"P"===t.tagName?{id:Ue(this.options.defaultId)}:null},renderHTML:t=>t.preset?{class:Ue(this.options.styleRenderer).makePresetHtmlClass(t.preset)}:null}}}]},addCommands(){function t(t,e){return t.find((t=>e===t.id))}function e(t,e){const n={};for(const r of Object.keys(t)){const o=t[r],i=e[r],s=!i||"inherit"===i.toLowerCase();n[r]=s?o:i}return n}return{getPresetList:nh((()=>vr((()=>Ue(this.options.presets).filter((t=>!t.hidden)))))),getPreset:nh((({commands:n})=>{const r=n.getBlockAttributes("preset",{id:Ue(this.options.defaultId)}),o=n.getPresetList(),i=n.isLink(),s=n.getLinkPreset();return vr((()=>{const n=t(Ue(o),Ue(r).id);if(!Ue(i))return n;const a=Ue(s);return{id:n.id,common:e(n.common,a.common),mobile:e(n.mobile,a.mobile),tablet:e(n.tablet,a.tablet),desktop:e(n.desktop,a.desktop)}}))})),applyPreset:nh((({commands:e,chain:n},r)=>{const o=t(Ue(e.getPresetList()),r),i=o.node?.type??fc.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const t of mc.attributes)s[t]=Ue(e.getBlockAttributes(t));n().removeList().setNode(i,s).run()})),applyDefaultPreset:nh((({commands:t})=>{t.applyPreset(Ue(this.options.defaultId))})),removePreset:nh((({commands:t})=>{t.setNode(fc.PARAGRAPH,{preset:null})})),getPresetCustomization:nh((({editor:t,commands:e})=>{const n=Ye(t,"state");return vr((()=>{const{selection:t,doc:r}=Ue(n),{from:o,to:i}=t;return e._getSettingCustomization(r,o,i)}))})),isSettingCustomized:nh((({commands:t},e)=>{const n=t.getPresetCustomization(),r=mc.presetAttributes.includes(e)?"attributes":"marks";return vr((()=>Ue(n)[r]?.includes(e)??!1))})),getContentCustomization:nh((({editor:t,commands:e})=>{const n=Ye(t,"state");return vr((()=>{const{doc:t}=Ue(n);return e._getSettingCustomization(t,0,t.content.size)}))})),_getSettingCustomization:nh(((t,e,n,r)=>{const o=new Set,i=new Set;return e.nodesBetween(n,r,(t=>{for(const[e,n]of Object.entries(t.attrs)){mc.presetAttributes.includes(e)&&n&&i.add(e)}for(const{type:e}of t.marks)mc.marks.includes(e.name)&&o.add(e.name)})),{attributes:Array.from(i),marks:Array.from(o)}})),removePresetCustomization:nh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(mc.marks).resetAttributes(fc.PARAGRAPH,mc.presetAttributes).resetAttributes(fc.HEADING,mc.presetAttributes).restoreSelection().run()})),removeFormat:nh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){this.options.styleRenderer.inject(_p.head,Ue(this.options.presets))}}),Gh=jl.create({name:mc.FONT_WEIGHT,group:gc.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:nh((({commands:t},e)=>{t.applyMark(this.name,{value:e});Ue(t.getFont()).isItalicSupported(e)||t.removeItalic()})),toggleBold:nh((({commands:t})=>{const e=Ue(t.getFontWeight()),n=Ue(t.getFont()),r=Number(e)>=600?"400":"700",o=n.findClosestWeight(r);t.applyFontWeight(o)})),getFontWeight:nh((({commands:t})=>{const e=t.getCommonSettingMark(this.name,t.getDefaultFontWeight()),n=t.getFont();return vr((()=>{const t=Ue(e),r=Ue(n);return r.isWeightSupported(t)?t:r.findClosestWeight(t)}))})),getDefaultFontWeight:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>Ue(e).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":ih("toggleBold"),"Mod-B":ih("toggleBold")}),parseHTML(){const t=t=>"bold"===t?{value:"700"}:!!Number(t)&&{value:t};return[{style:"--zw-font-weight",getAttrs:t},{style:"font-weight",getAttrs:t},{tag:"b",attrs:{value:"700"}},{tag:"strong",attrs:{value:"700"}}]},renderHTML:({HTMLAttributes:t})=>oh({font_weight:t.value})}),Yh=jl.create({name:mc.FONT_SIZE,group:gc.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:nh((({commands:t})=>t.getDeviceSettingMark(this.name,t.getDefaultFontSize()))),getDefaultFontSize:nh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return vr((()=>Ue(n)[Ue(e)].font_size.replace("px","")))})),applyFontSize:nh((({commands:t},e)=>{const n=Ue(t.getDevice());t.applyMark(this.name,{[n]:e},{isAppliedToParent:(t,e)=>t.type.name===e.type.name&&t.attrs[n]===e.attrs[n],onAppliedToParent:({tr:t,node:e,position:r,mark:o})=>{const i={...o.attrs,[n]:null},s=!Object.values(i).some((t=>!!t));if(s)return!1;const a=o.type.create(i);e.isText?t.addMark(r,r+e.nodeSize,a):t.addNodeMark(r,a)}})})),increaseFontSize:nh((({commands:t})=>{const e=Number(Ue(t.getFontSize())),n=Math.min(e+1,Ue(this.options.maxSize));t.applyFontSize(String(n))})),decreaseFontSize:nh((({commands:t})=>{const e=Number(Ue(t.getFontSize())),n=Math.max(e-1,Ue(this.options.minSize));t.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":ih("increaseFontSize"),"Mod-Shift--":ih("decreaseFontSize")}),parseHTML(){const t=t=>{if(!t)return null;const e=Ch(t,Ue(this.options.wrapperRef));return String(e)};return[{tag:'[style*="--zw-font-size"]',getAttrs:({style:e})=>({mobile:t(e.getPropertyValue("--zw-font-size-mobile")),tablet:t(e.getPropertyValue("--zw-font-size-tablet")),desktop:t(e.getPropertyValue("--zw-font-size-desktop"))})},{style:"font-size",getAttrs:e=>{const n=t(e);return{desktop:n,tablet:n,mobile:null}}}]},renderHTML({HTMLAttributes:t}){const e=t=>t?`${t}px`:null;return oh({font_size_mobile:e(t.mobile),font_size_tablet:e(t.tablet),font_size_desktop:e(t.desktop)})}}),Xh=jl.create({name:mc.FONT_COLOR,group:gc.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:nh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontColor()))),getDefaultFontColor:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>Ue(e).common.color))})),applyFontColor:nh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Eh(t)});return[{style:"--zw-font-color",getAttrs:t},{style:"color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>oh({font_color:t.value})}),Qh=jl.create({name:mc.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:nh((({commands:t})=>t.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)"))),applyBackgroundColor:nh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Eh(t)});return[{style:"--zw-background-color",getAttrs:t},{style:"background-color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>oh({background_color:t.value})}),Zh=dl.create({name:"device_manager",addCommands(){return{getDevice:nh((()=>Ye(this.options,"device")))}}}),tp=jl.create({name:mc.FONT_STYLE,group:gc.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:nh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultFontStyle();return vr((()=>Ue(e)?.italic??Ue(n).italic))})),isItalicAvailable:nh((({commands:t})=>{const e=t.getFont(),n=t.getFontWeight();return vr((()=>{const t=Ue(e),r=Ue(n);return t.isItalicSupported(r)&&!t.isWeightItalicOnly(r)}))})),getDefaultFontStyle:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>({italic:"italic"===Ue(e).common.font_style})))})),toggleItalic:nh((({commands:t})=>{Ue(t.isItalicAvailable())&&(Ue(t.isItalic())?t.removeItalic():t.applyItalic())})),applyItalic:nh((({commands:t})=>{t.applyMark(this.name,{italic:!0})})),removeItalic:nh((({commands:t})=>{t.applyMark(this.name,{italic:!1})}))}},addKeyboardShortcuts:()=>({"Mod-i":ih("toggleItalic"),"Mod-I":ih("toggleItalic")}),parseHTML(){const t=t=>({italic:t.includes("italic")});return[{tag:"i",attrs:{italic:!0}},{style:"--zw-font-style",getAttrs:t},{style:"font-style",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>oh({font_style:t.italic?"italic":"normal"})}),ep=jl.create({name:mc.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:nh((({commands:t})=>{const e=t.getTextDecoration();return vr((()=>Ue(e).underline))})),isStrikeThrough:nh((({commands:t})=>{const e=t.getTextDecoration();return vr((()=>Ue(e).strike_through))})),getTextDecoration:nh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultTextDecoration();return vr((()=>{const t=Ue(e)??{},r=Ue(n);return{underline:t.underline||r.underline,strike_through:t.strike_through||r.strike_through}}))})),isUnderlineCustomized:nh((({commands:t})=>{const e=t.isUnderline(),n=t.getDefaultTextDecoration();return vr((()=>Ue(e)!==Ue(n).underline))})),getDefaultTextDecoration:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>{const{text_decoration:t}=Ue(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}}))})),toggleUnderline:nh((({commands:t})=>{t.toggleTextDecoration("underline")})),toggleStrikeThrough:nh((({commands:t})=>{t.toggleTextDecoration("strike_through")})),toggleTextDecoration:nh((({commands:t},e,n=null)=>{const r=Ue(t.getTextDecoration()),o=n??!r[e];t.applyMark(this.name,{[e]:o})})),applyTextDecoration:nh((({commands:t},e)=>{t.toggleTextDecoration(e,!0)})),removeTextDecoration:nh((({commands:t},e)=>{t.toggleTextDecoration(e,!1)}))}},addKeyboardShortcuts:()=>({"Mod-u":ih("toggleUnderline"),"Mod-U":ih("toggleUnderline")}),parseHTML(){const t=t=>{const e=t.includes("underline"),n=t.includes("line-through");return!(!e&&!n)&&{underline:e,strike_through:n}};return[{style:"--zw-text-decoration",getAttrs:t},{style:"text-decoration-line",getAttrs:t},{style:"text-decoration",getAttrs:t},{tag:"s",attrs:{underline:!1,strike_through:!0}},{tag:"u",attrs:{underline:!0,strike_through:!1}}]},renderHTML({HTMLAttributes:t}){const e=[];return t.underline&&e.push("underline"),t.strike_through&&e.push("line-through"),e.length||e.push("none"),oh({text_decoration:e.join(" ")})}}),np=dl.create({name:"case_style",addCommands:()=>({applyCaseStyle:nh((({commands:t},e)=>{switch(e){case hc.CAPITALIZE:return t.applyCapitalize();case hc.LOWERCASE:return t.applyLowerCase();case hc.UPPERCASE:return t.applyUpperCase()}})),applyCapitalize:nh((({commands:t})=>{t.transformText((({text:t})=>function(t){return t.toLowerCase().replace(/(?:^|\s)\S/g,(t=>t.toUpperCase()))}(t)))})),applyLowerCase:nh((({commands:t})=>{t.transformText((({text:t})=>t.toLowerCase()))})),applyUpperCase:nh((({commands:t})=>{t.transformText((({text:t})=>t.toUpperCase()))}))})}),rp={mobile:null,tablet:null,desktop:null},op=dl.create({name:mc.ALIGNMENT,addGlobalAttributes:()=>[{types:[fc.PARAGRAPH,fc.HEADING],attributes:{[mc.ALIGNMENT]:{isRequired:!1,parseHTML({style:t}){const e=function(t){const e=Ah[t]||t;return pc.values.includes(e)?e:null}(t.textAlign);if(e)return{desktop:e,tablet:e,mobile:e};const n=t.getPropertyValue("--zw-alignment-mobile")||null,r=t.getPropertyValue("--zw-alignment-tablet")||null,o=t.getPropertyValue("--zw-alignment-desktop")||null;return n||r||o?{desktop:o,tablet:r,mobile:n}:null},renderHTML:t=>t.alignment?rh({alignment_mobile:t.alignment.mobile,alignment_tablet:t.alignment.tablet,alignment_desktop:t.alignment.desktop}):null}}}],addCommands(){return{applyAlignment:nh((({commands:t},e)=>{const n=Ue(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},rp)})),removeAlignment:nh((({commands:t})=>t.removeBlockAttributes(this.name))),getAlignment:nh((({commands:t})=>{const e=t.getBlockAttributes(this.name,rp),n=t.getDevice(),r=t.getDefaultAlignment();return vr((()=>Ue(e)?.[Ue(n)]??Ue(r)))})),getDefaultAlignment:nh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return vr((()=>Ue(n)[Ue(e)].alignment??pc.LEFT))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":ih("applyAlignment",pc.LEFT),"Mod-Shift-e":ih("applyAlignment",pc.CENTER),"Mod-Shift-r":ih("applyAlignment",pc.RIGHT),"Mod-Shift-j":ih("applyAlignment",pc.JUSTIFY)})}),ip={mobile:null,tablet:null,desktop:null},sp=dl.create({name:mc.LINE_HEIGHT,addGlobalAttributes(){return[{types:[fc.PARAGRAPH,fc.HEADING],attributes:{[mc.LINE_HEIGHT]:{isRequired:!1,parseHTML:t=>{if(t.matches('[style*="--zw-line-height"]')){return{mobile:null,tablet:t.style.getPropertyValue("--zw-line-height-tablet")||null,desktop:t.style.getPropertyValue("--zw-line-height-desktop")||null}}const e=t.style.lineHeight;if(!e)return null;const n=Oh(e,t,Ue(this.options.wrapperRef));return n?{desktop:n,tablet:n,mobile:null}:null},renderHTML:t=>t.line_height?rh({line_height_mobile:t.line_height.mobile,line_height_tablet:t.line_height.tablet,line_height_desktop:t.line_height.desktop}):null}}}]},addCommands(){return{getLineHeight:nh((({commands:t})=>{const e=t.getBlockAttributes(this.name,ip),n=t.getDevice(),r=t.getDefaultLineHeight();return vr((()=>Ue(e)?.[Ue(n)]??Ue(r)))})),getDefaultLineHeight:nh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return vr((()=>Ue(n)[Ue(e)].line_height))})),applyLineHeight:nh((({commands:t},e)=>{const n=Ue(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},ip)}))}}}),ap=Hl.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",Ya(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}).extend({name:fc.LIST_ITEM,marks:gc.SETTINGS,addCommands(){const t=({selection:t})=>t.$cursor.before(t.$cursor.depth-1);return{listItemNewline:nh((({commands:e,tr:n})=>{const r=n.doc.nodeAt(t(n));if(!n.selection.$cursor.node().textContent)return!1;e.splitListItem(this.name);const o=t(n);for(const t of r.marks)n.addNodeMark(o,Lh(t));return!0}))}},addOptions:()=>({HTMLAttributes:{class:"zw-style"}}),addKeyboardShortcuts:()=>({Enter:t=>{const{state:e,commands:n}=t.editor,r=e.selection.$cursor?.path.some((t=>t.type?.name===fc.LIST));if(r)return n.listItemNewline()}})}),lp=Hl.create({name:fc.LIST,content:`${fc.LIST_ITEM}+`,group:"block list",marks:gc.SETTINGS,addExtensions:()=>[ap],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:dc.DISC}}}),parseHTML(){const t={a:dc.ROMAN,i:dc.LATIN,1:dc.DECIMAL},e=e=>{for(const n of dc.values){const r=`.${Ue(this.options.baseClass)}${n}`;if(e.matches(r))return n;if(t[e.type.toLowerCase()]===n)return n}};return[{tag:"ol",getAttrs:t=>({bullet:{type:e(t)||dc.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||dc.DISC}})}]},renderHTML({HTMLAttributes:t}){const e=[Ue(this.options.baseClass)+t.bullet.type,Ue(this.options.presetClass)];return[dc.ordered.includes(t.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands:()=>({getListType:nh((({commands:t})=>{const e=t.getBlockAttributes("bullet",{type:null});return vr((()=>Ue(e).type??null))})),applyList:nh((({commands:t,chain:e},n)=>{if(Ue(t.getListType())!==n)return e().applyDefaultPreset().toggleList(fc.LIST,fc.LIST_ITEM).setBlockAttributes("bullet",{type:n}).command((({commands:t,tr:e})=>t._bubbleListItemMarks(e))).run();t.removeList()})),_bubbleListItemMarks:nh(((t,e)=>{const{doc:n,selection:r}=e,o=r.$from.start(),i=r.$to.end();function s(t,e){if(mc.inlineMarks.includes(e.type))return!1;if(e.type.isInSet(t.marks))return!1;for(const n of t.content.content)if(n.childCount){if(!n.marks)return!1;if(!e.isInSet(n.marks))return!1}return!0}n.nodesBetween(o,i,((t,n)=>{if(t.type.name===fc.LIST)return;if(t.type.name!==fc.LIST_ITEM)return!1;const r=[];return t.forEach((o=>{for(const i of o.marks)i.isInSet(r)?e.removeNodeMark(n+1,i):s(t,i)&&(e.removeNodeMark(n+1,i),e.addNodeMark(n,Lh(i)),r.push(i))})),!1}))})),removeList:nh((({commands:t,state:e})=>{const{tr:n,doc:r,selection:o}=e,i=o.$from.start(),s=o.$to.end();r.nodesBetween(i,s,((t,e,r)=>{if([fc.LIST,fc.LIST_ITEM].includes(t.type.name))return;if(r.type.name!==fc.LIST_ITEM)return!1;const o=r.marks.filter((function(e){return!e.type.isInSet(t.marks)}));for(const t of o)n.addNodeMark(e,Lh(t));return!1})),t.liftListItem(fc.LIST_ITEM)}))}),addInputRules(){const t=(t,e)=>{return n={find:e,type:this.type,getAttributes:{bullet:{type:t}},joinPredicate:(e,{attrs:n})=>n.bullet.type===t},new il({find:n.find,handler:({state:t,range:e,match:r,chain:o})=>{const i=Qa(n.getAttributes,void 0,r)||{},s=t.tr.delete(e.from,e.to),a=s.doc.resolve(e.from).blockRange(),l=a&&qo(a,n.type,i);if(!l)return null;if(s.wrap(a,l),n.keepMarks&&n.editor){const{selection:e,storedMarks:r}=t,{splittableMarks:o}=n.editor.extensionManager,i=r||e.$to.parentOffset&&e.$from.marks();if(i){const t=i.filter((t=>o.includes(t.type.name)));s.ensureMarks(t)}}if(n.keepAttributes){const t="bulletList"===n.type.name||"orderedList"===n.type.name?"listItem":"taskList";o().updateAttributes(t,i).run()}const c=s.doc.resolve(e.from-1).nodeBefore;c&&c.type===n.type&&Jo(s.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(r,c))&&s.join(e.from-1)}});var n};return[t(dc.DISC,/^\s*([-+*])\s$/),t(dc.DECIMAL,/^(\d+)\.\s$/),t(dc.LATIN,/^([ivx]{1,3})\.\s$/i),t(dc.ROMAN,/^([a-z])\.\s$/i)]}});function cp(t){return new Oi({key:new Ti("autolink"),appendTransaction:(e,n,r)=>{const o=e.some((t=>t.docChanged))&&!n.doc.eq(r.doc),i=e.some((t=>t.getMeta("preventAutolink")));if(!o||i)return;const{tr:s}=r,a=function(t,e){const n=new ui(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}(n.doc,[...e]),{mapping:l}=a,c=function(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,o)=>{const i=[];if(t.ranges.length)t.forEach(((t,e)=>{i.push({from:t,to:e})}));else{const{from:t,to:e}=n[o];if(void 0===t||void 0===e)return;i.push({from:t,to:e})}i.forEach((({from:t,to:n})=>{const i=e.slice(o).map(t,-1),s=e.slice(o).map(n),a=e.invert().map(i,-1),l=e.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,to:s}})}))})),Il(r)}(a);return c.forEach((({oldRange:e,newRange:o})=>{Rl(e.from,e.to,n.doc).filter((e=>e.mark.type===t.type)).forEach((e=>{const o=Rl(l.map(e.from),l.map(e.to),r.doc).filter((e=>e.mark.type===t.type));if(!o.length)return;const i=o[0],a=n.doc.textBetween(e.from,e.to,void 0," "),c=r.doc.textBetween(i.from,i.to,void 0," "),u=th(a),h=th(c);u&&!h&&s.removeMark(i.from,i.to,t.type)}));const i=function(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}(r.doc,o,(t=>t.isTextblock));let a,c;if(i.length>1?(a=i[0],c=r.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):i.length&&r.doc.textBetween(o.from,o.to," "," ").endsWith(" ")&&(a=i[0],c=r.doc.textBetween(a.pos,o.to,void 0," ")),a&&c){const e=c.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],r=a.pos+c.lastIndexOf(n);if(!n)return!1;Zu(n).filter((t=>t.isLink)).filter((e=>!t.validate||t.validate(e.value))).map((t=>({...t,from:r+t.start+1,to:r+t.end+1}))).forEach((e=>{s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),s.steps.length?s:void 0}})}const up=jl.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((t=>{"string"!=typeof t?Yu(t.scheme,t.optionalSlashes):Yu(t)}))},onDestroy(){Rc.groups={},Gu.scanner=null,Gu.parser=null,Gu.tokenQueue=[],Gu.pluginQueue=[],Gu.customSchemes=[],Gu.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){return["a",Ya(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(t={find:t=>Zu(t).filter((t=>!this.options.validate||this.options.validate(t.value))).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}},new ll({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Qa(t.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:i}=e,s=r[r.length-1],a=r[0];let l=n.to;if(s){const r=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(Rl(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>c)).length)return null;u<n.to&&i.delete(u,n.to),c>n.from&&i.delete(n.from+r,c),l=n.from+r+s.length,i.addMark(n.from+r,l,t.type.create(o||{})),i.removeStoredMark(t.type)}}}))];var t},addProseMirrorPlugins(){const t=[];var e;return this.options.autolink&&t.push(cp({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new Oi({key:new Ti("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i,s;if(1!==r.button)return!1;const a=Nl(t.state,e.type.name),l=null===(o=r.target)||void 0===o?void 0:o.closest("a"),c=null!==(i=null==l?void 0:l.href)&&void 0!==i?i:a.href,u=null!==(s=null==l?void 0:l.target)&&void 0!==s?s:a.target;return!(!l||!c||(window.open(c,u),0))}}}))),this.options.linkOnPaste&&t.push(function(t){return new Oi({key:new Ti("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach((t=>{a+=t.textContent}));const l=Zu(a).find((t=>t.isLink&&t.value===a));return!(!a||!l||(t.editor.commands.setMark(t.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),t}}),hp=up.extend({name:mc.LINK,addOptions(){return{...this.parent?.(),openOnClick:!1,linkOnPaste:!1}},addAttributes(){return{href:{default:null,parseHTML:t=>{const e=t.getAttribute("href");return e.startsWith("#")?parseFloat(t.getAttribute("href").replace("#","")):e}},target:{default:yc.SELF,parseHTML:t=>t.getAttribute("target")||yc.SELF},destination:{default:vc.URL,parseHTML:t=>{const e=t.getAttribute("href");if(!e.startsWith("#"))return vc.URL;const n=e.replace("#","");return Ue(this.options.pageBlocks).find((t=>t.id===parseInt(n)))?vc.BLOCK:vc.URL}}}},addCommands(){const{unsetLink:t}=this.parent();return{removeLink:t,applyLink:nh((({commands:t,chain:e},n)=>(t.setMeta("preventAutolink",!0),t.getSelectedText()?e().applyMark(this.name,n).expandSelectionToLink().command((({tr:t})=>(n.text&&t.insertText(n.text,t.selection.from,t.selection.to),!0))).run():t.insertContent(kp.text(n.text,[kp.mark(mc.LINK,n)]))))),expandSelectionToLink:nh((({commands:t})=>{t.expandSelection((({node:t})=>this.type.isInSet(t.marks)))})),isLink:nh((({commands:t})=>t.hasMark(this.name))),getLinkPreset:nh((()=>vr((()=>Ue(this.options.preset)))))}},addProseMirrorPlugins(){return[...this.parent(),eh.create(this.editor)]},renderHTML({HTMLAttributes:t}){const e=t.destination===vc.BLOCK?`#${t.href}`:t.href,n=Ue(this.options.basePresetClass)+Ue(this.options.preset).id;return["a",{href:e,target:t.target,class:`${n} zw-style`},0]}}),pp=jl.create({name:mc.SUPERSCRIPT,addCommands(){return{applySuperscript:nh((({commands:t})=>{t.setMark(this.name)})),removeSuperscript:nh((({commands:t})=>{t.unsetMark(this.name)})),toggleSuperscript:nh((({commands:t})=>{Ue(t.isSuperscript())?t.removeSuperscript():t.applySuperscript()})),isSuperscript:nh((({commands:t})=>{const e=t.getMark(this.name);return vr((()=>!!Ue(e)))}))}},parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML:()=>["sup",{class:"zw-superscript"},0]}),fp=dl.create({name:mc.MARGIN,addGlobalAttributes:()=>[{types:[fc.PARAGRAPH,fc.HEADING],attributes:{[mc.MARGIN]:{isRequired:!1,parseHTML(t){const{margin:e,marginTop:n,marginRight:r,marginBottom:o,marginLeft:i}=t.style;if(![e,n,r,o,i].some((t=>!!t)))return null;if(e)return{value:e};return{value:[n||0,r||0,o||0,i||0].join(" ")}},renderHTML:t=>t.margin?rh({margin:t.margin.value}):null}}}]});function dp(t){const e=e=>t.presetsRef.value.find((t=>t.id===e)),n=Me({default:null,link:null});return function(t,e,n){"production"===process.env.NODE_ENV||ot(e)||tn("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),In(t,e,n)}(t.presetsRef,(()=>{n.default=e(t.defaultPresetId),n.link=e(t.linkPresetId)}),{immediate:!0,deep:!0}),[Hh,Vh,qh,Bl,cc,$h,Ph,zh,Uh].concat([Jh.configure({presets:t.presetsRef,defaultId:t.defaultPresetId,styleRenderer:new xp({baseClass:t.basePresetClass,makeVariable:t.makePresetVariable,linkPresetId:t.linkPresetId})}),lp.configure({baseClass:t.baseListClass,presetClass:t.basePresetClass+t.defaultPresetId}),Zh.configure({device:t.deviceRef}),Yh.configure({minSize:t.minFontSize,maxSize:t.maxFontSize,wrapperRef:t.wrapperRef}),Kh.configure({fonts:t.fonts,defaultPreset:Ye(n,"default")}),Gh,Xh,Qh,tp,ep,np,pp,op,sp.configure({wrapperRef:t.wrapperRef}),hp.configure({preset:Ye(n,"link"),basePresetClass:t.basePresetClass,pageBlocks:t.pageBlocksRef}),fp])}class mp{_domParser=new DOMParser;types=window;parse(t){return this._domParser.parseFromString(t,"text/html")}}class gp{content;constructor({content:t}){this.content=t}normalize(){throw new Error("Implement abstract method")}}class yp extends gp{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=yp.BLOCK_NODE_NAMES.concat("UL","OL");static BLOCK_STYLES=["text-align","line-height","margin","margin-top","margin-bottom","margin-left","margin-right"];_parser;constructor({content:t,parser:e}){super({content:t}),this._parser=e,this.dom=null}normalize(){return this.normalizeHTML(),this.normalizedHTML}normalizeHTML(){this.dom=this._parser.parse(this.content.replace(/(\r)?\n/g,"")),this._removeComments(),this._normalizeRootTags(),this._iterateNodes(this._normalizeBreakLines,(t=>"BR"===t.tagName)),this._iterateNodes(this._removeEmptyNodes,this._isBlockNode),this._iterateNodes(this._normalizeListItems,(t=>"LI"===t.tagName)),this._normalizeBlockTextDecoration(),this._normalizeBlockBackgroundColor()}get normalizedHTML(){return this.dom.body.innerHTML}get _NodeFilter(){return this._parser.types.NodeFilter}get _Node(){return this._parser.types.Node}_removeComments(){const t=this._createNodeIterator(this._NodeFilter.SHOW_COMMENT);this._runIterator(t,(t=>t.remove()))}_normalizeRootTags(){const t=Array.from(this.dom.body.childNodes),e=this.dom.createDocumentFragment();let n;for(const r of t)this._isRootNode(r)?(e.append(r),n=null):(n||(n=this.dom.createElement("p"),e.append(n)),n.append(r));this.dom.body.innerHTML="",this.dom.body.append(e)}_createNodeIterator(t,e){return this.dom.createNodeIterator(this.dom.body,t,e)}_iterateNodes(t,e=(()=>!0)){const n=t=>"BODY"!==t.tagName&&e.call(this,t),r=this._createNodeIterator(this._NodeFilter.SHOW_ELEMENT,{acceptNode:t=>n(t)?this._NodeFilter.FILTER_ACCEPT:this._NodeFilter.FILTER_REJECT});this._runIterator(r,t)}_runIterator(t,e){let n=t.nextNode();for(;n;)e.call(this,n),n=t.nextNode()}_removeEmptyNodes(t){t.innerHTML.trim()||t.remove()}_normalizeListItems(t){const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes);let r,o;const i=n=>{this._assignElementProperties(n,t,yp.BLOCK_STYLES),e.append(n)};this._assignElementProperties(t,t.parentElement,yp.BLOCK_STYLES);for(const t of n)if(this._isBlockNode(t))i(t),r=null,o=t;else if("BR"===t.tagName&&o&&"BR"!==o?.tagName)t.remove(),o=t;else if("BR"!==t.tagName)r||(r=this.dom.createElement("p"),i(r)),r.append(t),o=t;else{const e=this.dom.createElement("p");e.append(t),i(e),r=null,o=t}t.append(e),this._removeStyleProperties(t,yp.BLOCK_STYLES),this._removeStyleProperties(t.parentElement,yp.BLOCK_STYLES),this._assignElementProperties(t,t.parentElement),t.parentElement.lastElementChild===t&&this._removeStyleProperties(t.parentElement)}_isBlockNode(t){return yp.BLOCK_NODE_NAMES.includes(t.tagName)}_isRootNode(t){return yp.ROOT_NODE_NAMES.includes(t.tagName)}_assignElementProperties(t,e,n=Array.from(e.style)){for(const r of n){const n=e.style.getPropertyValue(r);n&&!t.style.getPropertyValue(r)&&t.style.setProperty(r,n)}}_removeStyleProperties(t,e=Array.from(t.style)){for(const n of e)t.style.removeProperty(n);0===t.style.length&&t.removeAttribute("style")}_normalizeBreakLines({parentElement:t}){if(!this._isBlockNode(t))return;if(!t.textContent)return;const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes),r=t.cloneNode(!0);r.innerHTML="";let o=r.cloneNode();const i=n=>{this._assignElementProperties(n,t,yp.BLOCK_STYLES),e.append(n)};for(const t of n)"BR"!==t.tagName?o.append(t):(i(o),o=r.cloneNode());e.append(o),t.replaceWith(e)}_normalizeBlockTextDecoration(){const t=this.dom.querySelectorAll('[style*="text-decoration"]:where(p, h1, h2, h3, h4, li)');for(const e of t)this._moveTextDecorationToChildren(e)}_moveTextDecorationToChildren(t){const e=this._parseTextDecoration(t);if(t.style.removeProperty("text-decoration-line"),t.style.removeProperty("text-decoration"),t.style.cssText||t.removeAttribute("style"),!e.none)for(const n of t.childNodes){const r=this._wrapTextNode(t,n),o=this._parseTextDecoration(r),i={underline:o.underline||e.underline,line_through:o.line_through||e.line_through};r.style.removeProperty("text-decoration-line"),r.style.removeProperty("text-decoration"),r.style.textDecoration=Object.entries(i).filter((([,t])=>t)).map((([t])=>t.replace("_","-"))).join(" ")}}_parseTextDecoration(t){const{textDecoration:e,textDecorationLine:n}=t.style,r=e||n||"";return{none:r.includes("none"),underline:r.includes("underline"),line_through:r.includes("line-through")}}_normalizeBlockBackgroundColor(){const t=this.dom.querySelectorAll('[style*="background-color"]:where(p, h1, h2, h3, h4, li)');for(const e of t)this._moveBackgroundColorToChildren(e)}_moveBackgroundColorToChildren(t){const e=t.style.backgroundColor;t.style.removeProperty("background-color"),t.style.cssText||t.removeAttribute("style");for(const n of t.childNodes){const r=this._wrapTextNode(t,n),o=r.style.backgroundColor||e;r.style.backgroundColor=o}}_wrapTextNode(t,e){if(e.nodeType!==this._Node.TEXT_NODE)return e;const n=this.dom.createElement("span");return n.append(e.cloneNode()),t.replaceChild(n,e),n}}class vp extends gp{normalize(){return this._iterateNodes(this._bubbleMarks),this.content}_iterateNodes(t){this._iterateChildNodes(this.content,t)}_iterateChildNodes(t,e){for(const n of t.content)n.content&&this._iterateChildNodes(n,e),e.call(this,n)}_bubbleMarks(t){if(t.content&&t.type!==fc.LIST)for(const e of t.content)if(!this._isLink(e)&&e.marks)for(const n of e.marks.slice())this._includesMark(t,n)?this._removeMark(e,n):this._canBubbleMark(t,n)&&(this._removeMark(e,n),this._addMark(t,n))}_canBubbleMark(t,e){if(mc.inlineMarks.includes(e.type))return!1;if(this._includesMarkType(t,e.type))return!1;for(const n of t.content)if(n.content||t.type!==fc.LIST_ITEM){if(!n.marks)return!1;if(!this._includesMark(n,e))return!1}return!0}_includesMark(t,e){return t.marks?.some((t=>Dh.isEqual(t,e)))??!1}_includesMarkType(t,e){return t.marks?.some((t=>t.type===e))??!1}_isLink(t){return t.type===fc.TEXT&&this._includesMarkType(t,mc.LINK)}_removeMark(t,e){if(!t.marks)return;const n=this._findMarkIndexByType(t,e.type);n>=0&&t.marks.splice(n,1),t.marks.length||delete t.marks}_addMark(t,e){this._removeMark(t,e),t.marks??=[],t.marks.push(e)}_findMarkIndexByType(t,e){return t.marks?.findIndex((t=>t.type===e))??null}}class bp{static build(t,e={}){return"string"==typeof t?this._buildHtml(t,e):this._buildJson(t)}static _buildHtml(t,e){return new yp({content:t,parser:e.parser||new mp})}static _buildJson(t){return new vp({content:t})}static normalize(t,e={}){return bp.build(t,e).normalize()}}class _p{static window=globalThis.window;static use(t){this.window=t}static get document(){return this.window.document}static get body(){return this.document.body}static get head(){return this.document.head}static getComputedStyle(t){return this.window.getComputedStyle(t)}}class wp{static build({config:t,nodeDomParser:e}){const n=function(t,e){return el(hl.resolve(t),e)}(dp({fonts:t.fonts,minFontSize:0,maxFontSize:0,presetsRef:We(t.presets),defaultPresetId:t.defaultPresetId,linkPresetId:t.linkPresetId,makePresetVariable:()=>"",basePresetClass:t.basePresetClass,baseListClass:t.baseListClass,deviceRef:We(uc.DESKTOP),pageBlocksRef:We([]),wrapperRef:_p.document.createElement("p")}));return new wp({schema:n,domParser:fo.fromSchema(n),nodeDomParser:e})}_schema;_domParser;_nodeDomParser;constructor({schema:t,domParser:e,nodeDomParser:n}){this._schema=t,this._domParser=e,this._nodeDomParser=n}toJSON(t){const e=bp.build(t,{parser:this._nodeDomParser});return e.normalizeHTML(),this._domParser.parse(e.dom.body).toJSON()}}class kp{static doc(t){return{type:fc.DOCUMENT,content:t}}static list(t,e){return{type:fc.LIST,attrs:{bullet:{type:t}},content:e.map((t=>t.type===fc.LIST_ITEM?t:this.listItem([].concat(t))))}}static listItem(...t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{type:fc.LIST_ITEM,...e?{attrs:e}:{},...r?{marks:r}:{},content:[].concat(n).map((t=>"string"==typeof t?this.paragraph(t):t))}}static heading(t,...e){const n=this._textBlock(e,this.text);return n.attrs??={},n.attrs.level=t,{type:fc.HEADING,...n}}static paragraph(...t){return{type:fc.PARAGRAPH,...this._textBlock(t,this.text)}}static _textBlock(t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{content:"string"==typeof n?[this.text(n)]:n,...e?{attrs:e}:{},...r?{marks:r}:{}}}static _normalizeTextBlockArgs(t){return 1===t.length?{attrs:null,marks:null,content:t[0]}:2===t.length?{attrs:t[0],marks:null,content:t[1]}:{attrs:t[0],marks:t[1],content:t[2]}}static text(t,e){return{type:fc.TEXT,...e?{marks:e}:{},text:t}}static link(t,e,n=[]){return this.text(t,[this.mark(mc.LINK,e),...n])}static mark(t,e){return{type:t,attrs:e}}static populateAllDevices(t){return{mobile:t,tablet:t,desktop:t}}}class xp{_baseClass;_makeVariable;_linkPresetId;constructor({baseClass:t,makeVariable:e,linkPresetId:n}){this._baseClass=t,this._makeVariable=e,this._linkPresetId=n}inject(t,e){let n=t.querySelector("[data-zw-styles]");n||(n=_p.document.createElement("style"),n.dataset.zwStyles="",n.innerHTML=this.render(e),t.append(n))}render(t){let e="";for(const n of t){const t=n.id===this._linkPresetId;e+=` ${this.makePresetCssClass(n)} {`;for(const r of uc.values)for(const o of Object.keys(n[r])){const i=this._makeVariable({device:r,preset:n,property:o}),s=this._makeInternalVariableName(o,r);if(e+=`${s}: var(${i}, inherit);`,t&&!mc.attributes.includes(o)){e+=`${s.replace("preset-","")}: var(${s});`}}e+="}"}return e}_makeInternalVariableName(t,e){return`--zw-preset-${"color"===t?"font-color":t.replace(/_/i,"-")}${e===uc.COMMON?"":`-${e}`}`}makePresetHtmlClass(t){return this._baseClass+t.id}makePresetCssClass(t){return this.makePresetHtmlClass(t).split(" ").map((t=>`.${t}`)).join("")}}class Sp{static _instance;static get instance(){return this._instance??=new Sp,this._instance}static query(t,e){return this.instance.query(t,e)}query(t,e){let n=null;return t.descendants((t=>!n&&(this.matchNode(t,e)?(n=t,!1):void 0))),n?e.getMark?this.getMark(n,e.getMark):n:null}matchNode(t,e){return(!e.typeName||e.typeName===t.type.name)&&!(e.mark&&!this.getMark(t,e.mark))}getMark(t,e){return t.marks.find((t=>this.matchMark(t,e)))||null}matchMark(t,e){return t.type.name===e.typeName}}class Ep{static createWindow(){return(new i.JSDOM).window}types;parse(t){const{window:e}=new i.JSDOM(t);return this.types=e,e.document}}class Cp{name;description;argument;options=[];doCommand(){throw new Error('Command "doCommand" is required')}install(t){if(!this.name)throw new Error('Command "name" is required');let e=t.command(this.name);if(this.description&&(e=e.description(this.description)),this.argument&&(e=e.argument(this.argument)),this.options.length)for(const t of this.options)e=e.option(t.flags,t.description,t.default);e.action(this.doCommand.bind(this))}output(t){console.log(t)}}const Op=new W,Ap=[class extends Cp{name="to-json";description="migrate html to json";argument="<html...>";options=[{flags:"-c, --config <path>",description:"Generator config",default:n.resolve(__dirname,"../bin/zp.config.json")},{flags:"-f, --format <type>",description:"Set output format",default:"rb"}];doCommand(t,{config:e,format:r}){_p.use(Ep.createWindow());const o=n.resolve(process.cwd(),e),i=wp.build({config:require(o).editor,nodeDomParser:new Ep}),s=t.map((t=>i.toJSON(this._formatInputHtml(t)))),a=1===s.length?s[0]:s,l=this._stringifyContent(a);this.output("rb"===r?this._formatOutputRb(l):l)}_formatInputHtml(t){return t.replace(/\\(["'])/g,"$1").replace(/rgba\(\d{1,3}, ?\d{1,3}, ?\d{1,3}, (\d{1,2}%)\)/g,((t,e)=>t.replace(e,parseFloat(e)/100)))}_stringifyContent(t){return JSON.stringify(t,((t,e)=>null===e?void 0:e),2)}_formatOutputRb(t){return t.replace(/\\"/g,'"').replace(/font-family: ?'(.+)'/g,'font-family: "$1"').replace(/'/g,"\\'").replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm,(t=>t.replace(/"/g,""))).replace(/: "(.+)"([,\n])/g,": '$1'$2")}},class extends Cp{name="version";description="display cli version";doCommand(){this.output("4.0.4")}}];for(const t of Ap)(new t).install(Op);Op.parse();
10
+ Ih={get exports(){return Dh},set exports(t){Dh=t}},Rh=Dh,function(){var t,e="Expected a function",n="__lodash_hash_undefined__",r="__lodash_placeholder__",o=16,i=32,a=64,l=128,c=256,u=1/0,h=9007199254740991,p=NaN,f=4294967295,d=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",i],["partialRight",a],["rearg",c]],m="[object Arguments]",g="[object Array]",y="[object Boolean]",v="[object Date]",b="[object Error]",_="[object Function]",w="[object GeneratorFunction]",k="[object Map]",x="[object Number]",S="[object Object]",E="[object Promise]",C="[object RegExp]",O="[object Set]",A="[object String]",M="[object Symbol]",T="[object WeakMap]",N="[object ArrayBuffer]",I="[object DataView]",R="[object Float32Array]",D="[object Float64Array]",L="[object Int8Array]",$="[object Int16Array]",P="[object Int32Array]",z="[object Uint8Array]",F="[object Uint8ClampedArray]",j="[object Uint16Array]",H="[object Uint32Array]",B=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,K=RegExp(q.source),J=RegExp(U.source),G=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ut=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,ft=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,gt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,_t=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",kt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",Ct="\\ufe0e\\ufe0f",Ot="\\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",At="['’]",Mt="["+wt+"]",Tt="["+Ot+"]",Nt="["+kt+"]",It="\\d+",Rt="["+xt+"]",Dt="["+St+"]",Lt="[^"+wt+Ot+It+xt+St+Et+"]",$t="\\ud83c[\\udffb-\\udfff]",Pt="[^"+wt+"]",zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ft="[\\ud800-\\udbff][\\udc00-\\udfff]",jt="["+Et+"]",Ht="\\u200d",Bt="(?:"+Dt+"|"+Lt+")",Vt="(?:"+jt+"|"+Lt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",qt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Nt+"|"+$t+")?",Kt="["+Ct+"]?",Jt=Kt+Ut+"(?:"+Ht+"(?:"+[Pt,zt,Ft].join("|")+")"+Kt+Ut+")*",Gt="(?:"+[Rt,zt,Ft].join("|")+")"+Jt,Yt="(?:"+[Pt+Nt+"?",Nt,zt,Ft,Mt].join("|")+")",Xt=RegExp(At,"g"),Qt=RegExp(Nt,"g"),Zt=RegExp($t+"(?="+$t+")|"+Yt+Jt,"g"),te=RegExp([jt+"?"+Dt+"+"+Wt+"(?="+[Tt,jt,"$"].join("|")+")",Vt+"+"+qt+"(?="+[Tt,jt+Bt,"$"].join("|")+")",jt+"?"+Bt+"+"+Wt,jt+"+"+qt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",It,Gt].join("|"),"g"),ee=RegExp("["+Ht+wt+kt+Ct+"]"),ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["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"],oe=-1,ie={};ie[R]=ie[D]=ie[L]=ie[$]=ie[P]=ie[z]=ie[F]=ie[j]=ie[H]=!0,ie[m]=ie[g]=ie[N]=ie[y]=ie[I]=ie[v]=ie[b]=ie[_]=ie[k]=ie[x]=ie[S]=ie[C]=ie[O]=ie[A]=ie[T]=!1;var se={};se[m]=se[g]=se[N]=se[I]=se[y]=se[v]=se[R]=se[D]=se[L]=se[$]=se[P]=se[k]=se[x]=se[S]=se[C]=se[O]=se[A]=se[M]=se[z]=se[F]=se[j]=se[H]=!0,se[b]=se[_]=se[T]=!1;var ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,ce=parseInt,ue="object"==typeof s&&s&&s.Object===Object&&s,he="object"==typeof self&&self&&self.Object===Object&&self,pe=ue||he||Function("return this")(),fe=Rh&&!Rh.nodeType&&Rh,de=fe&&Ih&&!Ih.nodeType&&Ih,me=de&&de.exports===fe,ge=me&&ue.process,ye=function(){try{var t=de&&de.require&&de.require("util").types;return t||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ve=ye&&ye.isArrayBuffer,be=ye&&ye.isDate,_e=ye&&ye.isMap,we=ye&&ye.isRegExp,ke=ye&&ye.isSet,xe=ye&&ye.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var s=t[o];e(r,s,n(s),t)}return r}function Ce(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Oe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Me(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[o++]=s)}return i}function Te(t,e){return!(null==t||!t.length)&&je(t,e,0)>-1}function Ne(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Ie(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Re(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function De(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function Le(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function $e(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Pe=We("length");function ze(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Fe(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function je(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Fe(t,Be,n)}function He(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Be(t){return t!=t}function Ve(t,e){var n=null==t?0:t.length;return n?Ke(t,e)/n:p}function We(e){return function(n){return null==n?t:n[e]}}function qe(e){return function(n){return null==e?t:e[n]}}function Ue(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function Ke(e,n){for(var r,o=-1,i=e.length;++o<i;){var s=n(e[o]);s!==t&&(r=r===t?s:r+s)}return r}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ge(t){return t?t.slice(0,dn(t)+1).replace(rt,""):t}function Ye(t){return function(e){return t(e)}}function Xe(t,e){return Ie(e,(function(e){return t[e]}))}function Qe(t,e){return t.has(e)}function Ze(t,e){for(var n=-1,r=t.length;++n<r&&je(e,t[n],0)>-1;);return n}function tn(t,e){for(var n=t.length;n--&&je(e,t[n],0)>-1;);return n}function en(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var nn=qe({"À":"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"}),rn=qe({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function on(t){return"\\"+ae[t]}function sn(t){return ee.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function ln(t,e){return function(n){return t(e(n))}}function cn(t,e){for(var n=-1,o=t.length,i=0,s=[];++n<o;){var a=t[n];a!==e&&a!==r||(t[n]=r,s[i++]=n)}return s}function un(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function hn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function pn(t){return sn(t)?function(t){for(var e=Zt.lastIndex=0;Zt.test(t);)++e;return e}(t):Pe(t)}function fn(t){return sn(t)?function(t){return t.match(Zt)||[]}(t):function(t){return t.split("")}(t)}function dn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var mn=qe({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),gn=function s(ot){var wt,kt=(ot=null==ot?pe:gn.defaults(pe.Object(),ot,gn.pick(pe,re))).Array,xt=ot.Date,St=ot.Error,Et=ot.Function,Ct=ot.Math,Ot=ot.Object,At=ot.RegExp,Mt=ot.String,Tt=ot.TypeError,Nt=kt.prototype,It=Et.prototype,Rt=Ot.prototype,Dt=ot["__core-js_shared__"],Lt=It.toString,$t=Rt.hasOwnProperty,Pt=0,zt=(wt=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+wt:"",Ft=Rt.toString,jt=Lt.call(Ot),Ht=pe._,Bt=At("^"+Lt.call($t).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=me?ot.Buffer:t,Wt=ot.Symbol,qt=ot.Uint8Array,Ut=Vt?Vt.allocUnsafe:t,Kt=ln(Ot.getPrototypeOf,Ot),Jt=Ot.create,Gt=Rt.propertyIsEnumerable,Yt=Nt.splice,Zt=Wt?Wt.isConcatSpreadable:t,ee=Wt?Wt.iterator:t,ae=Wt?Wt.toStringTag:t,ue=function(){try{var t=di(Ot,"defineProperty");return t({},"",{}),t}catch(t){}}(),he=ot.clearTimeout!==pe.clearTimeout&&ot.clearTimeout,fe=xt&&xt.now!==pe.Date.now&&xt.now,de=ot.setTimeout!==pe.setTimeout&&ot.setTimeout,ge=Ct.ceil,ye=Ct.floor,Pe=Ot.getOwnPropertySymbols,qe=Vt?Vt.isBuffer:t,yn=ot.isFinite,vn=Nt.join,bn=ln(Ot.keys,Ot),_n=Ct.max,wn=Ct.min,kn=xt.now,xn=ot.parseInt,Sn=Ct.random,En=Nt.reverse,Cn=di(ot,"DataView"),On=di(ot,"Map"),An=di(ot,"Promise"),Mn=di(ot,"Set"),Tn=di(ot,"WeakMap"),Nn=di(Ot,"create"),In=Tn&&new Tn,Rn={},Dn=Hi(Cn),Ln=Hi(On),$n=Hi(An),Pn=Hi(Mn),zn=Hi(Tn),Fn=Wt?Wt.prototype:t,jn=Fn?Fn.valueOf:t,Hn=Fn?Fn.toString:t;function Bn(t){if(oa(t)&&!Ks(t)&&!(t instanceof Un)){if(t instanceof qn)return t;if($t.call(t,"__wrapped__"))return Bi(t)}return new qn(t)}var Vn=function(){function e(){}return function(n){if(!ra(n))return{};if(Jt)return Jt(n);e.prototype=n;var r=new e;return e.prototype=t,r}}();function Wn(){}function qn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=t}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Gn;++e<n;)this.add(t[e])}function Xn(t){var e=this.__data__=new Jn(t);this.size=e.size}function Qn(t,e){var n=Ks(t),r=!n&&Us(t),o=!n&&!r&&Xs(t),i=!n&&!r&&!o&&pa(t),s=n||r||o||i,a=s?Je(t.length,Mt):[],l=a.length;for(var c in t)!e&&!$t.call(t,c)||s&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wi(c,l))||a.push(c);return a}function Zn(e){var n=e.length;return n?e[Yr(0,n-1)]:t}function tr(t,e){return zi(Io(t),cr(e,0,t.length))}function er(t){return zi(Io(t))}function nr(e,n,r){(r!==t&&!Vs(e[n],r)||r===t&&!(n in e))&&ar(e,n,r)}function rr(e,n,r){var o=e[n];$t.call(e,n)&&Vs(o,r)&&(r!==t||n in e)||ar(e,n,r)}function or(t,e){for(var n=t.length;n--;)if(Vs(t[n][0],e))return n;return-1}function ir(t,e,n,r){return dr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function sr(t,e){return t&&Ro(e,Da(e),t)}function ar(t,e,n){"__proto__"==e&&ue?ue(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function lr(e,n){for(var r=-1,o=n.length,i=kt(o),s=null==e;++r<o;)i[r]=s?t:Ma(e,n[r]);return i}function cr(e,n,r){return e==e&&(r!==t&&(e=e<=r?e:r),n!==t&&(e=e>=n?e:n)),e}function ur(e,n,r,o,i,s){var a,l=1&n,c=2&n,u=4&n;if(r&&(a=i?r(e,o,i,s):r(e)),a!==t)return a;if(!ra(e))return e;var h=Ks(e);if(h){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&$t.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(e),!l)return Io(e,a)}else{var p=yi(e),f=p==_||p==w;if(Xs(e))return Co(e,l);if(p==S||p==m||f&&!i){if(a=c||f?{}:bi(e),!l)return c?function(t,e){return Ro(t,gi(t),e)}(e,function(t,e){return t&&Ro(e,La(e),t)}(a,e)):function(t,e){return Ro(t,mi(t),e)}(e,sr(a,e))}else{if(!se[p])return i?e:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case N:return Oo(t);case y:case v:return new o(+t);case I:return function(t,e){var n=e?Oo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case D:case L:case $:case P:case z:case F:case j:case H:return Ao(t,n);case k:return new o;case x:case A:return new o(t);case C:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case O:return new o;case M:return r=t,jn?Ot(jn.call(r)):{}}}(e,p,l)}}s||(s=new Xn);var d=s.get(e);if(d)return d;s.set(e,a),ca(e)?e.forEach((function(t){a.add(ur(t,n,r,t,e,s))})):ia(e)&&e.forEach((function(t,o){a.set(o,ur(t,n,r,o,e,s))}));var g=h?t:(u?c?ai:si:c?La:Da)(e);return Ce(g||e,(function(t,o){g&&(t=e[o=t]),rr(a,o,ur(t,n,r,o,e,s))})),a}function hr(e,n,r){var o=r.length;if(null==e)return!o;for(e=Ot(e);o--;){var i=r[o],s=n[i],a=e[i];if(a===t&&!(i in e)||!s(a))return!1}return!0}function pr(n,r,o){if("function"!=typeof n)throw new Tt(e);return Di((function(){n.apply(t,o)}),r)}function fr(t,e,n,r){var o=-1,i=Te,s=!0,a=t.length,l=[],c=e.length;if(!a)return l;n&&(e=Ie(e,Ye(n))),r?(i=Ne,s=!1):e.length>=200&&(i=Qe,s=!1,e=new Yn(e));t:for(;++o<a;){var u=t[o],h=null==n?u:n(u);if(u=r||0!==u?u:0,s&&h==h){for(var p=c;p--;)if(e[p]===h)continue t;l.push(u)}else i(e,h,r)||l.push(u)}return l}Bn.templateSettings={escape:G,evaluate:Y,interpolate:X,variable:"",imports:{_:Bn}},Bn.prototype=Wn.prototype,Bn.prototype.constructor=Bn,qn.prototype=Vn(Wn.prototype),qn.prototype.constructor=qn,Un.prototype=Vn(Wn.prototype),Un.prototype.constructor=Un,Kn.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},Kn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kn.prototype.get=function(e){var r=this.__data__;if(Nn){var o=r[e];return o===n?t:o}return $t.call(r,e)?r[e]:t},Kn.prototype.has=function(e){var n=this.__data__;return Nn?n[e]!==t:$t.call(n,e)},Kn.prototype.set=function(e,r){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Nn&&r===t?n:r,this},Jn.prototype.clear=function(){this.__data__=[],this.size=0},Jn.prototype.delete=function(t){var e=this.__data__,n=or(e,t);return!(n<0||(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,0))},Jn.prototype.get=function(e){var n=this.__data__,r=or(n,e);return r<0?t:n[r][1]},Jn.prototype.has=function(t){return or(this.__data__,t)>-1},Jn.prototype.set=function(t,e){var n=this.__data__,r=or(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(On||Jn),string:new Kn}},Gn.prototype.delete=function(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e},Gn.prototype.get=function(t){return pi(this,t).get(t)},Gn.prototype.has=function(t){return pi(this,t).has(t)},Gn.prototype.set=function(t,e){var n=pi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(t){return this.__data__.set(t,n),this},Yn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.clear=function(){this.__data__=new Jn,this.size=0},Xn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Xn.prototype.get=function(t){return this.__data__.get(t)},Xn.prototype.has=function(t){return this.__data__.has(t)},Xn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Jn){var r=n.__data__;if(!On||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(t,e),this.size=n.size,this};var dr=$o(kr),mr=$o(xr,!0);function gr(t,e){var n=!0;return dr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function yr(e,n,r){for(var o=-1,i=e.length;++o<i;){var s=e[o],a=n(s);if(null!=a&&(l===t?a==a&&!ha(a):r(a,l)))var l=a,c=s}return c}function vr(t,e){var n=[];return dr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function br(t,e,n,r,o){var i=-1,s=t.length;for(n||(n=_i),o||(o=[]);++i<s;){var a=t[i];e>0&&n(a)?e>1?br(a,e-1,n,r,o):Re(o,a):r||(o[o.length]=a)}return o}var _r=Po(),wr=Po(!0);function kr(t,e){return t&&_r(t,e,Da)}function xr(t,e){return t&&wr(t,e,Da)}function Sr(t,e){return Me(e,(function(e){return ta(t[e])}))}function Er(e,n){for(var r=0,o=(n=ko(n,e)).length;null!=e&&r<o;)e=e[ji(n[r++])];return r&&r==o?e:t}function Cr(t,e,n){var r=e(t);return Ks(t)?r:Re(r,n(t))}function Or(e){return null==e?e===t?"[object Undefined]":"[object Null]":ae&&ae in Ot(e)?function(e){var n=$t.call(e,ae),r=e[ae];try{e[ae]=t;var o=!0}catch(t){}var i=Ft.call(e);return o&&(n?e[ae]=r:delete e[ae]),i}(e):function(t){return Ft.call(t)}(e)}function Ar(t,e){return t>e}function Mr(t,e){return null!=t&&$t.call(t,e)}function Tr(t,e){return null!=t&&e in Ot(t)}function Nr(e,n,r){for(var o=r?Ne:Te,i=e[0].length,s=e.length,a=s,l=kt(s),c=1/0,u=[];a--;){var h=e[a];a&&n&&(h=Ie(h,Ye(n))),c=wn(h.length,c),l[a]=!r&&(n||i>=120&&h.length>=120)?new Yn(a&&h):t}h=e[0];var p=-1,f=l[0];t:for(;++p<i&&u.length<c;){var d=h[p],m=n?n(d):d;if(d=r||0!==d?d:0,!(f?Qe(f,m):o(u,m,r))){for(a=s;--a;){var g=l[a];if(!(g?Qe(g,m):o(e[a],m,r)))continue t}f&&f.push(m),u.push(d)}}return u}function Ir(e,n,r){var o=null==(e=Ti(e,n=ko(n,e)))?e:e[ji(Zi(n))];return null==o?t:Se(o,e,r)}function Rr(t){return oa(t)&&Or(t)==m}function Dr(e,n,r,o,i){return e===n||(null==e||null==n||!oa(e)&&!oa(n)?e!=e&&n!=n:function(e,n,r,o,i,s){var a=Ks(e),l=Ks(n),c=a?g:yi(e),u=l?g:yi(n),h=(c=c==m?S:c)==S,p=(u=u==m?S:u)==S,f=c==u;if(f&&Xs(e)){if(!Xs(n))return!1;a=!0,h=!1}if(f&&!h)return s||(s=new Xn),a||pa(e)?oi(e,n,r,o,i,s):function(t,e,n,r,o,i,s){switch(n){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case N:return!(t.byteLength!=e.byteLength||!i(new qt(t),new qt(e)));case y:case v:case x:return Vs(+t,+e);case b:return t.name==e.name&&t.message==e.message;case C:case A:return t==e+"";case k:var a=an;case O:var l=1&r;if(a||(a=un),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;r|=2,s.set(t,e);var u=oi(a(t),a(e),r,o,i,s);return s.delete(t),u;case M:if(jn)return jn.call(t)==jn.call(e)}return!1}(e,n,c,r,o,i,s);if(!(1&r)){var d=h&&$t.call(e,"__wrapped__"),_=p&&$t.call(n,"__wrapped__");if(d||_){var w=d?e.value():e,E=_?n.value():n;return s||(s=new Xn),i(w,E,r,o,s)}}return!!f&&(s||(s=new Xn),function(e,n,r,o,i,s){var a=1&r,l=si(e),c=l.length,u=si(n),h=u.length;if(c!=h&&!a)return!1;for(var p=c;p--;){var f=l[p];if(!(a?f in n:$t.call(n,f)))return!1}var d=s.get(e),m=s.get(n);if(d&&m)return d==n&&m==e;var g=!0;s.set(e,n),s.set(n,e);for(var y=a;++p<c;){var v=e[f=l[p]],b=n[f];if(o)var _=a?o(b,v,f,n,e,s):o(v,b,f,e,n,s);if(!(_===t?v===b||i(v,b,r,o,s):_)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var w=e.constructor,k=n.constructor;w==k||!("constructor"in e)||!("constructor"in n)||"function"==typeof w&&w instanceof w&&"function"==typeof k&&k instanceof k||(g=!1)}return s.delete(e),s.delete(n),g}(e,n,r,o,i,s))}(e,n,r,o,Dr,i))}function Lr(e,n,r,o){var i=r.length,s=i,a=!o;if(null==e)return!s;for(e=Ot(e);i--;){var l=r[i];if(a&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<s;){var c=(l=r[i])[0],u=e[c],h=l[1];if(a&&l[2]){if(u===t&&!(c in e))return!1}else{var p=new Xn;if(o)var f=o(u,h,c,e,n,p);if(!(f===t?Dr(h,u,3,o,p):f))return!1}}return!0}function $r(t){return!(!ra(t)||(e=t,zt&&zt in e))&&(ta(t)?Bt:mt).test(Hi(t));var e}function Pr(t){return"function"==typeof t?t:null==t?sl:"object"==typeof t?Ks(t)?Vr(t[0],t[1]):Br(t):ml(t)}function zr(t){if(!Ci(t))return bn(t);var e=[];for(var n in Ot(t))$t.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Fr(t){if(!ra(t))return function(t){var e=[];if(null!=t)for(var n in Ot(t))e.push(n);return e}(t);var e=Ci(t),n=[];for(var r in t)("constructor"!=r||!e&&$t.call(t,r))&&n.push(r);return n}function jr(t,e){return t<e}function Hr(t,e){var n=-1,r=Gs(t)?kt(t.length):[];return dr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function Br(t){var e=fi(t);return 1==e.length&&e[0][2]?Ai(e[0][0],e[0][1]):function(n){return n===t||Lr(n,t,e)}}function Vr(e,n){return xi(e)&&Oi(n)?Ai(ji(e),n):function(r){var o=Ma(r,e);return o===t&&o===n?Ta(r,e):Dr(n,o,3)}}function Wr(e,n,r,o,i){e!==n&&_r(n,(function(s,a){if(i||(i=new Xn),ra(s))!function(e,n,r,o,i,s,a){var l=Ii(e,r),c=Ii(n,r),u=a.get(c);if(u)nr(e,r,u);else{var h=s?s(l,c,r+"",e,n,a):t,p=h===t;if(p){var f=Ks(c),d=!f&&Xs(c),m=!f&&!d&&pa(c);h=c,f||d||m?Ks(l)?h=l:Ys(l)?h=Io(l):d?(p=!1,h=Co(c,!0)):m?(p=!1,h=Ao(c,!0)):h=[]:aa(c)||Us(c)?(h=l,Us(l)?h=_a(l):ra(l)&&!ta(l)||(h=bi(c))):p=!1}p&&(a.set(c,h),i(h,c,o,s,a),a.delete(c)),nr(e,r,h)}}(e,n,a,r,Wr,o,i);else{var l=o?o(Ii(e,a),s,a+"",e,n,i):t;l===t&&(l=s),nr(e,a,l)}}),La)}function qr(e,n){var r=e.length;if(r)return wi(n+=n<0?r:0,r)?e[n]:t}function Ur(t,e,n){e=e.length?Ie(e,(function(t){return Ks(t)?function(e){return Er(e,1===t.length?t[0]:t)}:t})):[sl];var r=-1;e=Ie(e,Ye(hi()));var o=Hr(t,(function(t,n,o){var i=Ie(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(o,(function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,s=o.length,a=n.length;++r<s;){var l=Mo(o[r],i[r]);if(l)return r>=a?l:l*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Kr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var s=e[r],a=Er(t,s);n(a,s)&&eo(i,ko(s,t),a)}return i}function Jr(t,e,n,r){var o=r?He:je,i=-1,s=e.length,a=t;for(t===e&&(e=Io(e)),n&&(a=Ie(t,Ye(n)));++i<s;)for(var l=0,c=e[i],u=n?n(c):c;(l=o(a,u,l,r))>-1;)a!==t&&Yt.call(a,l,1),Yt.call(t,l,1);return t}function Gr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;wi(o)?Yt.call(t,o,1):fo(t,o)}}return t}function Yr(t,e){return t+ye(Sn()*(e-t+1))}function Xr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ye(e/2))&&(t+=t)}while(e);return n}function Qr(t,e){return Li(Mi(t,e,sl),t+"")}function Zr(t){return Zn(Va(t))}function to(t,e){var n=Va(t);return zi(n,cr(e,0,n.length))}function eo(e,n,r,o){if(!ra(e))return e;for(var i=-1,s=(n=ko(n,e)).length,a=s-1,l=e;null!=l&&++i<s;){var c=ji(n[i]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=a){var h=l[c];(u=o?o(h,c,l):t)===t&&(u=ra(h)?h:wi(n[i+1])?[]:{})}rr(l,c,u),l=l[c]}return e}var no=In?function(t,e){return In.set(t,e),t}:sl,ro=ue?function(t,e){return ue(t,"toString",{configurable:!0,enumerable:!1,value:rl(e),writable:!0})}:sl;function oo(t){return zi(Va(t))}function io(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=kt(o);++r<o;)i[r]=t[r+e];return i}function so(t,e){var n;return dr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function ao(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,s=t[i];null!==s&&!ha(s)&&(n?s<=e:s<e)?r=i+1:o=i}return o}return lo(t,e,sl,n)}function lo(e,n,r,o){var i=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(n=r(n))!=n,l=null===n,c=ha(n),u=n===t;i<s;){var h=ye((i+s)/2),p=r(e[h]),f=p!==t,d=null===p,m=p==p,g=ha(p);if(a)var y=o||m;else y=u?m&&(o||f):l?m&&f&&(o||!d):c?m&&f&&!d&&(o||!g):!d&&!g&&(o?p<=n:p<n);y?i=h+1:s=h}return wn(s,4294967294)}function co(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!Vs(a,l)){var l=a;i[o++]=0===s?0:s}}return i}function uo(t){return"number"==typeof t?t:ha(t)?p:+t}function ho(t){if("string"==typeof t)return t;if(Ks(t))return Ie(t,ho)+"";if(ha(t))return Hn?Hn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function po(t,e,n){var r=-1,o=Te,i=t.length,s=!0,a=[],l=a;if(n)s=!1,o=Ne;else if(i>=200){var c=e?null:Qo(t);if(c)return un(c);s=!1,o=Qe,l=new Yn}else l=e?[]:a;t:for(;++r<i;){var u=t[r],h=e?e(u):u;if(u=n||0!==u?u:0,s&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue t;e&&l.push(h),a.push(u)}else o(l,h,n)||(l!==a&&l.push(h),a.push(u))}return a}function fo(t,e){return null==(t=Ti(t,e=ko(e,t)))||delete t[ji(Zi(e))]}function mo(t,e,n,r){return eo(t,e,n(Er(t,e)),r)}function go(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?io(t,r?0:i,r?i+1:o):io(t,r?i+1:0,r?o:i)}function yo(t,e){var n=t;return n instanceof Un&&(n=n.value()),De(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),n)}function vo(t,e,n){var r=t.length;if(r<2)return r?po(t[0]):[];for(var o=-1,i=kt(r);++o<r;)for(var s=t[o],a=-1;++a<r;)a!=o&&(i[o]=fr(i[o]||s,t[a],e,n));return po(br(i,1),e,n)}function bo(e,n,r){for(var o=-1,i=e.length,s=n.length,a={};++o<i;){var l=o<s?n[o]:t;r(a,e[o],l)}return a}function _o(t){return Ys(t)?t:[]}function wo(t){return"function"==typeof t?t:sl}function ko(t,e){return Ks(t)?t:xi(t,e)?[t]:Fi(wa(t))}var xo=Qr;function So(e,n,r){var o=e.length;return r=r===t?o:r,!n&&r>=o?e:io(e,n,r)}var Eo=he||function(t){return pe.clearTimeout(t)};function Co(t,e){if(e)return t.slice();var n=t.length,r=Ut?Ut(n):new t.constructor(n);return t.copy(r),r}function Oo(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Ao(t,e){var n=e?Oo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Mo(e,n){if(e!==n){var r=e!==t,o=null===e,i=e==e,s=ha(e),a=n!==t,l=null===n,c=n==n,u=ha(n);if(!l&&!u&&!s&&e>n||s&&a&&c&&!l&&!u||o&&a&&c||!r&&c||!i)return 1;if(!o&&!s&&!u&&e<n||u&&r&&i&&!o&&!s||l&&r&&i||!a&&i||!c)return-1}return 0}function To(t,e,n,r){for(var o=-1,i=t.length,s=n.length,a=-1,l=e.length,c=_n(i-s,0),u=kt(l+c),h=!r;++a<l;)u[a]=e[a];for(;++o<s;)(h||o<i)&&(u[n[o]]=t[o]);for(;c--;)u[a++]=t[o++];return u}function No(t,e,n,r){for(var o=-1,i=t.length,s=-1,a=n.length,l=-1,c=e.length,u=_n(i-a,0),h=kt(u+c),p=!r;++o<u;)h[o]=t[o];for(var f=o;++l<c;)h[f+l]=e[l];for(;++s<a;)(p||o<i)&&(h[f+n[s]]=t[o++]);return h}function Io(t,e){var n=-1,r=t.length;for(e||(e=kt(r));++n<r;)e[n]=t[n];return e}function Ro(e,n,r,o){var i=!r;r||(r={});for(var s=-1,a=n.length;++s<a;){var l=n[s],c=o?o(r[l],e[l],l,r,e):t;c===t&&(c=e[l]),i?ar(r,l,c):rr(r,l,c)}return r}function Do(t,e){return function(n,r){var o=Ks(n)?Ee:ir,i=e?e():{};return o(n,t,hi(r,2),i)}}function Lo(e){return Qr((function(n,r){var o=-1,i=r.length,s=i>1?r[i-1]:t,a=i>2?r[2]:t;for(s=e.length>3&&"function"==typeof s?(i--,s):t,a&&ki(r[0],r[1],a)&&(s=i<3?t:s,i=1),n=Ot(n);++o<i;){var l=r[o];l&&e(n,l,o,s)}return n}))}function $o(t,e){return function(n,r){if(null==n)return n;if(!Gs(n))return t(n,r);for(var o=n.length,i=e?o:-1,s=Ot(n);(e?i--:++i<o)&&!1!==r(s[i],i,s););return n}}function Po(t){return function(e,n,r){for(var o=-1,i=Ot(e),s=r(e),a=s.length;a--;){var l=s[t?a:++o];if(!1===n(i[l],l,i))break}return e}}function zo(e){return function(n){var r=sn(n=wa(n))?fn(n):t,o=r?r[0]:n.charAt(0),i=r?So(r,1).join(""):n.slice(1);return o[e]()+i}}function Fo(t){return function(e){return De(tl(Ua(e).replace(Xt,"")),t,"")}}function jo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return ra(r)?r:n}}function Ho(e){return function(n,r,o){var i=Ot(n);if(!Gs(n)){var s=hi(r,3);n=Da(n),r=function(t){return s(i[t],t,i)}}var a=e(n,r,o);return a>-1?i[s?n[a]:a]:t}}function Bo(n){return ii((function(r){var o=r.length,i=o,s=qn.prototype.thru;for(n&&r.reverse();i--;){var a=r[i];if("function"!=typeof a)throw new Tt(e);if(s&&!l&&"wrapper"==ci(a))var l=new qn([],!0)}for(i=l?i:o;++i<o;){var c=ci(a=r[i]),u="wrapper"==c?li(a):t;l=u&&Si(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[ci(u[0])].apply(l,u[3]):1==a.length&&Si(a)?l[c]():l.thru(a)}return function(){var t=arguments,e=t[0];if(l&&1==t.length&&Ks(e))return l.plant(e).value();for(var n=0,i=o?r[n].apply(this,t):e;++n<o;)i=r[n].call(this,i);return i}}))}function Vo(e,n,r,o,i,s,a,c,u,h){var p=n&l,f=1&n,d=2&n,m=24&n,g=512&n,y=d?t:jo(e);return function t(){for(var l=arguments.length,v=kt(l),b=l;b--;)v[b]=arguments[b];if(m)var _=ui(t),w=en(v,_);if(o&&(v=To(v,o,i,m)),s&&(v=No(v,s,a,m)),l-=w,m&&l<h){var k=cn(v,_);return Yo(e,n,Vo,t.placeholder,r,v,k,c,u,h-l)}var x=f?r:this,S=d?x[e]:e;return l=v.length,c?v=Ni(v,c):g&&l>1&&v.reverse(),p&&u<l&&(v.length=u),this&&this!==pe&&this instanceof t&&(S=y||jo(S)),S.apply(x,v)}}function Wo(t,e){return function(n,r){return function(t,e,n,r){return kr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function qo(e,n){return function(r,o){var i;if(r===t&&o===t)return n;if(r!==t&&(i=r),o!==t){if(i===t)return o;"string"==typeof r||"string"==typeof o?(r=ho(r),o=ho(o)):(r=uo(r),o=uo(o)),i=e(r,o)}return i}}function Uo(t){return ii((function(e){return e=Ie(e,Ye(hi())),Qr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Ko(e,n){var r=(n=n===t?" ":ho(n)).length;if(r<2)return r?Xr(n,e):n;var o=Xr(n,ge(e/pn(n)));return sn(n)?So(fn(o),0,e).join(""):o.slice(0,e)}function Jo(e){return function(n,r,o){return o&&"number"!=typeof o&&ki(n,r,o)&&(r=o=t),n=ga(n),r===t?(r=n,n=0):r=ga(r),function(t,e,n,r){for(var o=-1,i=_n(ge((e-t)/(n||1)),0),s=kt(i);i--;)s[r?i:++o]=t,t+=n;return s}(n,r,o=o===t?n<r?1:-1:ga(o),e)}}function Go(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ba(e),n=ba(n)),t(e,n)}}function Yo(e,n,r,o,s,l,c,u,h,p){var f=8&n;n|=f?i:a,4&(n&=~(f?a:i))||(n&=-4);var d=[e,n,s,f?l:t,f?c:t,f?t:l,f?t:c,u,h,p],m=r.apply(t,d);return Si(e)&&Ri(m,d),m.placeholder=o,$i(m,e,n)}function Xo(t){var e=Ct[t];return function(t,n){if(t=ba(t),(n=null==n?0:wn(ya(n),292))&&yn(t)){var r=(wa(t)+"e").split("e");return+((r=(wa(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Qo=Mn&&1/un(new Mn([,-0]))[1]==u?function(t){return new Mn(t)}:hl;function Zo(t){return function(e){var n=yi(e);return n==k?an(e):n==O?hn(e):function(t,e){return Ie(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function ti(n,s,u,h,p,f,d,m){var g=2&s;if(!g&&"function"!=typeof n)throw new Tt(e);var y=h?h.length:0;if(y||(s&=-97,h=p=t),d=d===t?d:_n(ya(d),0),m=m===t?m:ya(m),y-=p?p.length:0,s&a){var v=h,b=p;h=p=t}var _=g?t:li(n),w=[n,s,u,h,p,v,b,f,d,m];if(_&&function(t,e){var n=t[1],o=e[1],i=n|o,s=i<131,a=o==l&&8==n||o==l&&n==c&&t[7].length<=e[8]||384==o&&e[7].length<=e[8]&&8==n;if(!s&&!a)return t;1&o&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var h=t[3];t[3]=h?To(h,u,e[4]):u,t[4]=h?cn(t[3],r):e[4]}(u=e[5])&&(h=t[5],t[5]=h?No(h,u,e[6]):u,t[6]=h?cn(t[5],r):e[6]),(u=e[7])&&(t[7]=u),o&l&&(t[8]=null==t[8]?e[8]:wn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(w,_),n=w[0],s=w[1],u=w[2],h=w[3],p=w[4],!(m=w[9]=w[9]===t?g?0:n.length:_n(w[9]-y,0))&&24&s&&(s&=-25),s&&1!=s)k=8==s||s==o?function(e,n,r){var o=jo(e);return function i(){for(var s=arguments.length,a=kt(s),l=s,c=ui(i);l--;)a[l]=arguments[l];var u=s<3&&a[0]!==c&&a[s-1]!==c?[]:cn(a,c);return(s-=u.length)<r?Yo(e,n,Vo,i.placeholder,t,a,u,t,t,r-s):Se(this&&this!==pe&&this instanceof i?o:e,this,a)}}(n,s,m):s!=i&&33!=s||p.length?Vo.apply(t,w):function(t,e,n,r){var o=1&e,i=jo(t);return function e(){for(var s=-1,a=arguments.length,l=-1,c=r.length,u=kt(c+a),h=this&&this!==pe&&this instanceof e?i:t;++l<c;)u[l]=r[l];for(;a--;)u[l++]=arguments[++s];return Se(h,o?n:this,u)}}(n,s,u,h);else var k=function(t,e,n){var r=1&e,o=jo(t);return function e(){return(this&&this!==pe&&this instanceof e?o:t).apply(r?n:this,arguments)}}(n,s,u);return $i((_?no:Ri)(k,w),n,s)}function ei(e,n,r,o){return e===t||Vs(e,Rt[r])&&!$t.call(o,r)?n:e}function ni(e,n,r,o,i,s){return ra(e)&&ra(n)&&(s.set(n,e),Wr(e,n,t,ni,s),s.delete(n)),e}function ri(e){return aa(e)?t:e}function oi(e,n,r,o,i,s){var a=1&r,l=e.length,c=n.length;if(l!=c&&!(a&&c>l))return!1;var u=s.get(e),h=s.get(n);if(u&&h)return u==n&&h==e;var p=-1,f=!0,d=2&r?new Yn:t;for(s.set(e,n),s.set(n,e);++p<l;){var m=e[p],g=n[p];if(o)var y=a?o(g,m,p,n,e,s):o(m,g,p,e,n,s);if(y!==t){if(y)continue;f=!1;break}if(d){if(!$e(n,(function(t,e){if(!Qe(d,e)&&(m===t||i(m,t,r,o,s)))return d.push(e)}))){f=!1;break}}else if(m!==g&&!i(m,g,r,o,s)){f=!1;break}}return s.delete(e),s.delete(n),f}function ii(e){return Li(Mi(e,t,Ji),e+"")}function si(t){return Cr(t,Da,mi)}function ai(t){return Cr(t,La,gi)}var li=In?function(t){return In.get(t)}:hl;function ci(t){for(var e=t.name+"",n=Rn[e],r=$t.call(Rn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ui(t){return($t.call(Bn,"placeholder")?Bn:t).placeholder}function hi(){var t=Bn.iteratee||al;return t=t===al?Pr:t,arguments.length?t(arguments[0],arguments[1]):t}function pi(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function fi(t){for(var e=Da(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Oi(o)]}return e}function di(e,n){var r=function(e,n){return null==e?t:e[n]}(e,n);return $r(r)?r:t}var mi=Pe?function(t){return null==t?[]:(t=Ot(t),Me(Pe(t),(function(e){return Gt.call(t,e)})))}:vl,gi=Pe?function(t){for(var e=[];t;)Re(e,mi(t)),t=Kt(t);return e}:vl,yi=Or;function vi(t,e,n){for(var r=-1,o=(e=ko(e,t)).length,i=!1;++r<o;){var s=ji(e[r]);if(!(i=null!=t&&n(t,s)))break;t=t[s]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&na(o)&&wi(s,o)&&(Ks(t)||Us(t))}function bi(t){return"function"!=typeof t.constructor||Ci(t)?{}:Vn(Kt(t))}function _i(t){return Ks(t)||Us(t)||!!(Zt&&t&&t[Zt])}function wi(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function ki(t,e,n){if(!ra(n))return!1;var r=typeof e;return!!("number"==r?Gs(n)&&wi(e,n.length):"string"==r&&e in n)&&Vs(n[e],t)}function xi(t,e){if(Ks(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!ha(t))||Z.test(t)||!Q.test(t)||null!=e&&t in Ot(e)}function Si(t){var e=ci(t),n=Bn[e];if("function"!=typeof n||!(e in Un.prototype))return!1;if(t===n)return!0;var r=li(n);return!!r&&t===r[0]}(Cn&&yi(new Cn(new ArrayBuffer(1)))!=I||On&&yi(new On)!=k||An&&yi(An.resolve())!=E||Mn&&yi(new Mn)!=O||Tn&&yi(new Tn)!=T)&&(yi=function(e){var n=Or(e),r=n==S?e.constructor:t,o=r?Hi(r):"";if(o)switch(o){case Dn:return I;case Ln:return k;case $n:return E;case Pn:return O;case zn:return T}return n});var Ei=Dt?ta:bl;function Ci(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Rt)}function Oi(t){return t==t&&!ra(t)}function Ai(e,n){return function(r){return null!=r&&r[e]===n&&(n!==t||e in Ot(r))}}function Mi(e,n,r){return n=_n(n===t?e.length-1:n,0),function(){for(var t=arguments,o=-1,i=_n(t.length-n,0),s=kt(i);++o<i;)s[o]=t[n+o];o=-1;for(var a=kt(n+1);++o<n;)a[o]=t[o];return a[n]=r(s),Se(e,this,a)}}function Ti(t,e){return e.length<2?t:Er(t,io(e,0,-1))}function Ni(e,n){for(var r=e.length,o=wn(n.length,r),i=Io(e);o--;){var s=n[o];e[o]=wi(s,r)?i[s]:t}return e}function Ii(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ri=Pi(no),Di=de||function(t,e){return pe.setTimeout(t,e)},Li=Pi(ro);function $i(t,e,n){var r=e+"";return Li(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ce(d,(function(n){var r="_."+n[0];e&n[1]&&!Te(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function Pi(e){var n=0,r=0;return function(){var o=kn(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(t,arguments)}}function zi(e,n){var r=-1,o=e.length,i=o-1;for(n=n===t?o:n;++r<n;){var s=Yr(r,i),a=e[s];e[s]=e[r],e[r]=a}return e.length=n,e}var Fi=function(t){var e=Ps(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,n,r,o){e.push(r?o.replace(ut,"$1"):n||t)})),e}));function ji(t){if("string"==typeof t||ha(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Hi(t){if(null!=t){try{return Lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Bi(t){if(t instanceof Un)return t.clone();var e=new qn(t.__wrapped__,t.__chain__);return e.__actions__=Io(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Vi=Qr((function(t,e){return Ys(t)?fr(t,br(e,1,Ys,!0)):[]})),Wi=Qr((function(e,n){var r=Zi(n);return Ys(r)&&(r=t),Ys(e)?fr(e,br(n,1,Ys,!0),hi(r,2)):[]})),qi=Qr((function(e,n){var r=Zi(n);return Ys(r)&&(r=t),Ys(e)?fr(e,br(n,1,Ys,!0),t,r):[]}));function Ui(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ya(n);return o<0&&(o=_n(r+o,0)),Fe(t,hi(e,3),o)}function Ki(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==t&&(i=ya(r),i=r<0?_n(o+i,0):wn(i,o-1)),Fe(e,hi(n,3),i,!0)}function Ji(t){return null!=t&&t.length?br(t,1):[]}function Gi(e){return e&&e.length?e[0]:t}var Yi=Qr((function(t){var e=Ie(t,_o);return e.length&&e[0]===t[0]?Nr(e):[]})),Xi=Qr((function(e){var n=Zi(e),r=Ie(e,_o);return n===Zi(r)?n=t:r.pop(),r.length&&r[0]===e[0]?Nr(r,hi(n,2)):[]})),Qi=Qr((function(e){var n=Zi(e),r=Ie(e,_o);return(n="function"==typeof n?n:t)&&r.pop(),r.length&&r[0]===e[0]?Nr(r,t,n):[]}));function Zi(e){var n=null==e?0:e.length;return n?e[n-1]:t}var ts=Qr(es);function es(t,e){return t&&t.length&&e&&e.length?Jr(t,e):t}var ns=ii((function(t,e){var n=null==t?0:t.length,r=lr(t,e);return Gr(t,Ie(e,(function(t){return wi(t,n)?+t:t})).sort(Mo)),r}));function rs(t){return null==t?t:En.call(t)}var os=Qr((function(t){return po(br(t,1,Ys,!0))})),is=Qr((function(e){var n=Zi(e);return Ys(n)&&(n=t),po(br(e,1,Ys,!0),hi(n,2))})),ss=Qr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,po(br(e,1,Ys,!0),t,n)}));function as(t){if(!t||!t.length)return[];var e=0;return t=Me(t,(function(t){if(Ys(t))return e=_n(t.length,e),!0})),Je(e,(function(e){return Ie(t,We(e))}))}function ls(e,n){if(!e||!e.length)return[];var r=as(e);return null==n?r:Ie(r,(function(e){return Se(n,t,e)}))}var cs=Qr((function(t,e){return Ys(t)?fr(t,e):[]})),us=Qr((function(t){return vo(Me(t,Ys))})),hs=Qr((function(e){var n=Zi(e);return Ys(n)&&(n=t),vo(Me(e,Ys),hi(n,2))})),ps=Qr((function(e){var n=Zi(e);return n="function"==typeof n?n:t,vo(Me(e,Ys),t,n)})),fs=Qr(as),ds=Qr((function(e){var n=e.length,r=n>1?e[n-1]:t;return r="function"==typeof r?(e.pop(),r):t,ls(e,r)}));function ms(t){var e=Bn(t);return e.__chain__=!0,e}function gs(t,e){return e(t)}var ys=ii((function(e){var n=e.length,r=n?e[0]:0,o=this.__wrapped__,i=function(t){return lr(t,e)};return!(n>1||this.__actions__.length)&&o instanceof Un&&wi(r)?((o=o.slice(r,+r+(n?1:0))).__actions__.push({func:gs,args:[i],thisArg:t}),new qn(o,this.__chain__).thru((function(e){return n&&!e.length&&e.push(t),e}))):this.thru(i)})),vs=Do((function(t,e,n){$t.call(t,n)?++t[n]:ar(t,n,1)})),bs=Ho(Ui),_s=Ho(Ki);function ws(t,e){return(Ks(t)?Ce:dr)(t,hi(e,3))}function ks(t,e){return(Ks(t)?Oe:mr)(t,hi(e,3))}var xs=Do((function(t,e,n){$t.call(t,n)?t[n].push(e):ar(t,n,[e])})),Ss=Qr((function(t,e,n){var r=-1,o="function"==typeof e,i=Gs(t)?kt(t.length):[];return dr(t,(function(t){i[++r]=o?Se(e,t,n):Ir(t,e,n)})),i})),Es=Do((function(t,e,n){ar(t,n,e)}));function Cs(t,e){return(Ks(t)?Ie:Hr)(t,hi(e,3))}var Os=Do((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),As=Qr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ki(t,e[0],e[1])?e=[]:n>2&&ki(e[0],e[1],e[2])&&(e=[e[0]]),Ur(t,br(e,1),[])})),Ms=fe||function(){return pe.Date.now()};function Ts(e,n,r){return n=r?t:n,n=e&&null==n?e.length:n,ti(e,l,t,t,t,t,n)}function Ns(n,r){var o;if("function"!=typeof r)throw new Tt(e);return n=ya(n),function(){return--n>0&&(o=r.apply(this,arguments)),n<=1&&(r=t),o}}var Is=Qr((function(t,e,n){var r=1;if(n.length){var o=cn(n,ui(Is));r|=i}return ti(t,r,e,n,o)})),Rs=Qr((function(t,e,n){var r=3;if(n.length){var o=cn(n,ui(Rs));r|=i}return ti(e,r,t,n,o)}));function Ds(n,r,o){var i,s,a,l,c,u,h=0,p=!1,f=!1,d=!0;if("function"!=typeof n)throw new Tt(e);function m(e){var r=i,o=s;return i=s=t,h=e,l=n.apply(o,r)}function g(t){return h=t,c=Di(v,r),p?m(t):l}function y(e){var n=e-u;return u===t||n>=r||n<0||f&&e-h>=a}function v(){var t=Ms();if(y(t))return b(t);c=Di(v,function(t){var e=r-(t-u);return f?wn(e,a-(t-h)):e}(t))}function b(e){return c=t,d&&i?m(e):(i=s=t,l)}function _(){var e=Ms(),n=y(e);if(i=arguments,s=this,u=e,n){if(c===t)return g(u);if(f)return Eo(c),c=Di(v,r),m(u)}return c===t&&(c=Di(v,r)),l}return r=ba(r)||0,ra(o)&&(p=!!o.leading,a=(f="maxWait"in o)?_n(ba(o.maxWait)||0,r):a,d="trailing"in o?!!o.trailing:d),_.cancel=function(){c!==t&&Eo(c),h=0,i=u=s=c=t},_.flush=function(){return c===t?l:b(Ms())},_}var Ls=Qr((function(t,e){return pr(t,1,e)})),$s=Qr((function(t,e,n){return pr(t,ba(e)||0,n)}));function Ps(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Tt(e);var r=function(){var e=arguments,o=n?n.apply(this,e):e[0],i=r.cache;if(i.has(o))return i.get(o);var s=t.apply(this,e);return r.cache=i.set(o,s)||i,s};return r.cache=new(Ps.Cache||Gn),r}function zs(t){if("function"!=typeof t)throw new Tt(e);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ps.Cache=Gn;var Fs=xo((function(t,e){var n=(e=1==e.length&&Ks(e[0])?Ie(e[0],Ye(hi())):Ie(br(e,1),Ye(hi()))).length;return Qr((function(r){for(var o=-1,i=wn(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return Se(t,this,r)}))})),js=Qr((function(e,n){var r=cn(n,ui(js));return ti(e,i,t,n,r)})),Hs=Qr((function(e,n){var r=cn(n,ui(Hs));return ti(e,a,t,n,r)})),Bs=ii((function(e,n){return ti(e,c,t,t,t,n)}));function Vs(t,e){return t===e||t!=t&&e!=e}var Ws=Go(Ar),qs=Go((function(t,e){return t>=e})),Us=Rr(function(){return arguments}())?Rr:function(t){return oa(t)&&$t.call(t,"callee")&&!Gt.call(t,"callee")},Ks=kt.isArray,Js=ve?Ye(ve):function(t){return oa(t)&&Or(t)==N};function Gs(t){return null!=t&&na(t.length)&&!ta(t)}function Ys(t){return oa(t)&&Gs(t)}var Xs=qe||bl,Qs=be?Ye(be):function(t){return oa(t)&&Or(t)==v};function Zs(t){if(!oa(t))return!1;var e=Or(t);return e==b||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!aa(t)}function ta(t){if(!ra(t))return!1;var e=Or(t);return e==_||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ea(t){return"number"==typeof t&&t==ya(t)}function na(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function ra(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function oa(t){return null!=t&&"object"==typeof t}var ia=_e?Ye(_e):function(t){return oa(t)&&yi(t)==k};function sa(t){return"number"==typeof t||oa(t)&&Or(t)==x}function aa(t){if(!oa(t)||Or(t)!=S)return!1;var e=Kt(t);if(null===e)return!0;var n=$t.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==jt}var la=we?Ye(we):function(t){return oa(t)&&Or(t)==C},ca=ke?Ye(ke):function(t){return oa(t)&&yi(t)==O};function ua(t){return"string"==typeof t||!Ks(t)&&oa(t)&&Or(t)==A}function ha(t){return"symbol"==typeof t||oa(t)&&Or(t)==M}var pa=xe?Ye(xe):function(t){return oa(t)&&na(t.length)&&!!ie[Or(t)]},fa=Go(jr),da=Go((function(t,e){return t<=e}));function ma(t){if(!t)return[];if(Gs(t))return ua(t)?fn(t):Io(t);if(ee&&t[ee])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ee]());var e=yi(t);return(e==k?an:e==O?un:Va)(t)}function ga(t){return t?(t=ba(t))===u||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ya(t){var e=ga(t),n=e%1;return e==e?n?e-n:e:0}function va(t){return t?cr(ya(t),0,f):0}function ba(t){if("number"==typeof t)return t;if(ha(t))return p;if(ra(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ra(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ge(t);var n=dt.test(t);return n||gt.test(t)?ce(t.slice(2),n?2:8):ft.test(t)?p:+t}function _a(t){return Ro(t,La(t))}function wa(t){return null==t?"":ho(t)}var ka=Lo((function(t,e){if(Ci(e)||Gs(e))Ro(e,Da(e),t);else for(var n in e)$t.call(e,n)&&rr(t,n,e[n])})),xa=Lo((function(t,e){Ro(e,La(e),t)})),Sa=Lo((function(t,e,n,r){Ro(e,La(e),t,r)})),Ea=Lo((function(t,e,n,r){Ro(e,Da(e),t,r)})),Ca=ii(lr),Oa=Qr((function(e,n){e=Ot(e);var r=-1,o=n.length,i=o>2?n[2]:t;for(i&&ki(n[0],n[1],i)&&(o=1);++r<o;)for(var s=n[r],a=La(s),l=-1,c=a.length;++l<c;){var u=a[l],h=e[u];(h===t||Vs(h,Rt[u])&&!$t.call(e,u))&&(e[u]=s[u])}return e})),Aa=Qr((function(e){return e.push(t,ni),Se(Pa,t,e)}));function Ma(e,n,r){var o=null==e?t:Er(e,n);return o===t?r:o}function Ta(t,e){return null!=t&&vi(t,e,Tr)}var Na=Wo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),t[e]=n}),rl(sl)),Ia=Wo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ft.call(e)),$t.call(t,e)?t[e].push(n):t[e]=[n]}),hi),Ra=Qr(Ir);function Da(t){return Gs(t)?Qn(t):zr(t)}function La(t){return Gs(t)?Qn(t,!0):Fr(t)}var $a=Lo((function(t,e,n){Wr(t,e,n)})),Pa=Lo((function(t,e,n,r){Wr(t,e,n,r)})),za=ii((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ie(e,(function(e){return e=ko(e,t),r||(r=e.length>1),e})),Ro(t,ai(t),n),r&&(n=ur(n,7,ri));for(var o=e.length;o--;)fo(n,e[o]);return n})),Fa=ii((function(t,e){return null==t?{}:function(t,e){return Kr(t,e,(function(e,n){return Ta(t,n)}))}(t,e)}));function ja(t,e){if(null==t)return{};var n=Ie(ai(t),(function(t){return[t]}));return e=hi(e),Kr(t,n,(function(t,n){return e(t,n[0])}))}var Ha=Zo(Da),Ba=Zo(La);function Va(t){return null==t?[]:Xe(t,Da(t))}var Wa=Fo((function(t,e,n){return e=e.toLowerCase(),t+(n?qa(e):e)}));function qa(t){return Za(wa(t).toLowerCase())}function Ua(t){return(t=wa(t))&&t.replace(vt,nn).replace(Qt,"")}var Ka=Fo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ja=Fo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ga=zo("toLowerCase"),Ya=Fo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Xa=Fo((function(t,e,n){return t+(n?" ":"")+Za(e)})),Qa=Fo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Za=zo("toUpperCase");function tl(e,n,r){return e=wa(e),(n=r?t:n)===t?function(t){return ne.test(t)}(e)?function(t){return t.match(te)||[]}(e):function(t){return t.match(lt)||[]}(e):e.match(n)||[]}var el=Qr((function(e,n){try{return Se(e,t,n)}catch(t){return Zs(t)?t:new St(t)}})),nl=ii((function(t,e){return Ce(e,(function(e){e=ji(e),ar(t,e,Is(t[e],t))})),t}));function rl(t){return function(){return t}}var ol=Bo(),il=Bo(!0);function sl(t){return t}function al(t){return Pr("function"==typeof t?t:ur(t,1))}var ll=Qr((function(t,e){return function(n){return Ir(n,t,e)}})),cl=Qr((function(t,e){return function(n){return Ir(t,n,e)}}));function ul(t,e,n){var r=Da(e),o=Sr(e,r);null!=n||ra(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=Sr(e,Da(e)));var i=!(ra(n)&&"chain"in n&&!n.chain),s=ta(t);return Ce(o,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=Io(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})})),t}function hl(){}var pl=Uo(Ie),fl=Uo(Ae),dl=Uo($e);function ml(t){return xi(t)?We(ji(t)):function(t){return function(e){return Er(e,t)}}(t)}var gl=Jo(),yl=Jo(!0);function vl(){return[]}function bl(){return!1}var _l,wl=qo((function(t,e){return t+e}),0),kl=Xo("ceil"),xl=qo((function(t,e){return t/e}),1),Sl=Xo("floor"),El=qo((function(t,e){return t*e}),1),Cl=Xo("round"),Ol=qo((function(t,e){return t-e}),0);return Bn.after=function(t,n){if("function"!=typeof n)throw new Tt(e);return t=ya(t),function(){if(--t<1)return n.apply(this,arguments)}},Bn.ary=Ts,Bn.assign=ka,Bn.assignIn=xa,Bn.assignInWith=Sa,Bn.assignWith=Ea,Bn.at=Ca,Bn.before=Ns,Bn.bind=Is,Bn.bindAll=nl,Bn.bindKey=Rs,Bn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ks(t)?t:[t]},Bn.chain=ms,Bn.chunk=function(e,n,r){n=(r?ki(e,n,r):n===t)?1:_n(ya(n),0);var o=null==e?0:e.length;if(!o||n<1)return[];for(var i=0,s=0,a=kt(ge(o/n));i<o;)a[s++]=io(e,i,i+=n);return a},Bn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Bn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=kt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Re(Ks(n)?Io(n):[n],br(e,1))},Bn.cond=function(t){var n=null==t?0:t.length,r=hi();return t=n?Ie(t,(function(t){if("function"!=typeof t[1])throw new Tt(e);return[r(t[0]),t[1]]})):[],Qr((function(e){for(var r=-1;++r<n;){var o=t[r];if(Se(o[0],this,e))return Se(o[1],this,e)}}))},Bn.conforms=function(t){return function(t){var e=Da(t);return function(n){return hr(n,t,e)}}(ur(t,1))},Bn.constant=rl,Bn.countBy=vs,Bn.create=function(t,e){var n=Vn(t);return null==e?n:sr(n,e)},Bn.curry=function e(n,r,o){var i=ti(n,8,t,t,t,t,t,r=o?t:r);return i.placeholder=e.placeholder,i},Bn.curryRight=function e(n,r,i){var s=ti(n,o,t,t,t,t,t,r=i?t:r);return s.placeholder=e.placeholder,s},Bn.debounce=Ds,Bn.defaults=Oa,Bn.defaultsDeep=Aa,Bn.defer=Ls,Bn.delay=$s,Bn.difference=Vi,Bn.differenceBy=Wi,Bn.differenceWith=qi,Bn.drop=function(e,n,r){var o=null==e?0:e.length;return o?io(e,(n=r||n===t?1:ya(n))<0?0:n,o):[]},Bn.dropRight=function(e,n,r){var o=null==e?0:e.length;return o?io(e,0,(n=o-(n=r||n===t?1:ya(n)))<0?0:n):[]},Bn.dropRightWhile=function(t,e){return t&&t.length?go(t,hi(e,3),!0,!0):[]},Bn.dropWhile=function(t,e){return t&&t.length?go(t,hi(e,3),!0):[]},Bn.fill=function(e,n,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&ki(e,n,r)&&(r=0,o=i),function(e,n,r,o){var i=e.length;for((r=ya(r))<0&&(r=-r>i?0:i+r),(o=o===t||o>i?i:ya(o))<0&&(o+=i),o=r>o?0:va(o);r<o;)e[r++]=n;return e}(e,n,r,o)):[]},Bn.filter=function(t,e){return(Ks(t)?Me:vr)(t,hi(e,3))},Bn.flatMap=function(t,e){return br(Cs(t,e),1)},Bn.flatMapDeep=function(t,e){return br(Cs(t,e),u)},Bn.flatMapDepth=function(e,n,r){return r=r===t?1:ya(r),br(Cs(e,n),r)},Bn.flatten=Ji,Bn.flattenDeep=function(t){return null!=t&&t.length?br(t,u):[]},Bn.flattenDepth=function(e,n){return null!=e&&e.length?br(e,n=n===t?1:ya(n)):[]},Bn.flip=function(t){return ti(t,512)},Bn.flow=ol,Bn.flowRight=il,Bn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},Bn.functions=function(t){return null==t?[]:Sr(t,Da(t))},Bn.functionsIn=function(t){return null==t?[]:Sr(t,La(t))},Bn.groupBy=xs,Bn.initial=function(t){return null!=t&&t.length?io(t,0,-1):[]},Bn.intersection=Yi,Bn.intersectionBy=Xi,Bn.intersectionWith=Qi,Bn.invert=Na,Bn.invertBy=Ia,Bn.invokeMap=Ss,Bn.iteratee=al,Bn.keyBy=Es,Bn.keys=Da,Bn.keysIn=La,Bn.map=Cs,Bn.mapKeys=function(t,e){var n={};return e=hi(e,3),kr(t,(function(t,r,o){ar(n,e(t,r,o),t)})),n},Bn.mapValues=function(t,e){var n={};return e=hi(e,3),kr(t,(function(t,r,o){ar(n,r,e(t,r,o))})),n},Bn.matches=function(t){return Br(ur(t,1))},Bn.matchesProperty=function(t,e){return Vr(t,ur(e,1))},Bn.memoize=Ps,Bn.merge=$a,Bn.mergeWith=Pa,Bn.method=ll,Bn.methodOf=cl,Bn.mixin=ul,Bn.negate=zs,Bn.nthArg=function(t){return t=ya(t),Qr((function(e){return qr(e,t)}))},Bn.omit=za,Bn.omitBy=function(t,e){return ja(t,zs(hi(e)))},Bn.once=function(t){return Ns(2,t)},Bn.orderBy=function(e,n,r,o){return null==e?[]:(Ks(n)||(n=null==n?[]:[n]),Ks(r=o?t:r)||(r=null==r?[]:[r]),Ur(e,n,r))},Bn.over=pl,Bn.overArgs=Fs,Bn.overEvery=fl,Bn.overSome=dl,Bn.partial=js,Bn.partialRight=Hs,Bn.partition=Os,Bn.pick=Fa,Bn.pickBy=ja,Bn.property=ml,Bn.propertyOf=function(e){return function(n){return null==e?t:Er(e,n)}},Bn.pull=ts,Bn.pullAll=es,Bn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Jr(t,e,hi(n,2)):t},Bn.pullAllWith=function(e,n,r){return e&&e.length&&n&&n.length?Jr(e,n,t,r):e},Bn.pullAt=ns,Bn.range=gl,Bn.rangeRight=yl,Bn.rearg=Bs,Bn.reject=function(t,e){return(Ks(t)?Me:vr)(t,zs(hi(e,3)))},Bn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=hi(e,3);++r<i;){var s=t[r];e(s,r,t)&&(n.push(s),o.push(r))}return Gr(t,o),n},Bn.rest=function(n,r){if("function"!=typeof n)throw new Tt(e);return Qr(n,r=r===t?r:ya(r))},Bn.reverse=rs,Bn.sampleSize=function(e,n,r){return n=(r?ki(e,n,r):n===t)?1:ya(n),(Ks(e)?tr:to)(e,n)},Bn.set=function(t,e,n){return null==t?t:eo(t,e,n)},Bn.setWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:eo(e,n,r,o)},Bn.shuffle=function(t){return(Ks(t)?er:oo)(t)},Bn.slice=function(e,n,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&ki(e,n,r)?(n=0,r=o):(n=null==n?0:ya(n),r=r===t?o:ya(r)),io(e,n,r)):[]},Bn.sortBy=As,Bn.sortedUniq=function(t){return t&&t.length?co(t):[]},Bn.sortedUniqBy=function(t,e){return t&&t.length?co(t,hi(e,2)):[]},Bn.split=function(e,n,r){return r&&"number"!=typeof r&&ki(e,n,r)&&(n=r=t),(r=r===t?f:r>>>0)?(e=wa(e))&&("string"==typeof n||null!=n&&!la(n))&&!(n=ho(n))&&sn(e)?So(fn(e),0,r):e.split(n,r):[]},Bn.spread=function(t,n){if("function"!=typeof t)throw new Tt(e);return n=null==n?0:_n(ya(n),0),Qr((function(e){var r=e[n],o=So(e,0,n);return r&&Re(o,r),Se(t,this,o)}))},Bn.tail=function(t){var e=null==t?0:t.length;return e?io(t,1,e):[]},Bn.take=function(e,n,r){return e&&e.length?io(e,0,(n=r||n===t?1:ya(n))<0?0:n):[]},Bn.takeRight=function(e,n,r){var o=null==e?0:e.length;return o?io(e,(n=o-(n=r||n===t?1:ya(n)))<0?0:n,o):[]},Bn.takeRightWhile=function(t,e){return t&&t.length?go(t,hi(e,3),!1,!0):[]},Bn.takeWhile=function(t,e){return t&&t.length?go(t,hi(e,3)):[]},Bn.tap=function(t,e){return e(t),t},Bn.throttle=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new Tt(e);return ra(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),Ds(t,n,{leading:o,maxWait:n,trailing:i})},Bn.thru=gs,Bn.toArray=ma,Bn.toPairs=Ha,Bn.toPairsIn=Ba,Bn.toPath=function(t){return Ks(t)?Ie(t,ji):ha(t)?[t]:Io(Fi(wa(t)))},Bn.toPlainObject=_a,Bn.transform=function(t,e,n){var r=Ks(t),o=r||Xs(t)||pa(t);if(e=hi(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:ra(t)&&ta(i)?Vn(Kt(t)):{}}return(o?Ce:kr)(t,(function(t,r,o){return e(n,t,r,o)})),n},Bn.unary=function(t){return Ts(t,1)},Bn.union=os,Bn.unionBy=is,Bn.unionWith=ss,Bn.uniq=function(t){return t&&t.length?po(t):[]},Bn.uniqBy=function(t,e){return t&&t.length?po(t,hi(e,2)):[]},Bn.uniqWith=function(e,n){return n="function"==typeof n?n:t,e&&e.length?po(e,t,n):[]},Bn.unset=function(t,e){return null==t||fo(t,e)},Bn.unzip=as,Bn.unzipWith=ls,Bn.update=function(t,e,n){return null==t?t:mo(t,e,wo(n))},Bn.updateWith=function(e,n,r,o){return o="function"==typeof o?o:t,null==e?e:mo(e,n,wo(r),o)},Bn.values=Va,Bn.valuesIn=function(t){return null==t?[]:Xe(t,La(t))},Bn.without=cs,Bn.words=tl,Bn.wrap=function(t,e){return js(wo(e),t)},Bn.xor=us,Bn.xorBy=hs,Bn.xorWith=ps,Bn.zip=fs,Bn.zipObject=function(t,e){return bo(t||[],e||[],rr)},Bn.zipObjectDeep=function(t,e){return bo(t||[],e||[],eo)},Bn.zipWith=ds,Bn.entries=Ha,Bn.entriesIn=Ba,Bn.extend=xa,Bn.extendWith=Sa,ul(Bn,Bn),Bn.add=wl,Bn.attempt=el,Bn.camelCase=Wa,Bn.capitalize=qa,Bn.ceil=kl,Bn.clamp=function(e,n,r){return r===t&&(r=n,n=t),r!==t&&(r=(r=ba(r))==r?r:0),n!==t&&(n=(n=ba(n))==n?n:0),cr(ba(e),n,r)},Bn.clone=function(t){return ur(t,4)},Bn.cloneDeep=function(t){return ur(t,5)},Bn.cloneDeepWith=function(e,n){return ur(e,5,n="function"==typeof n?n:t)},Bn.cloneWith=function(e,n){return ur(e,4,n="function"==typeof n?n:t)},Bn.conformsTo=function(t,e){return null==e||hr(t,e,Da(e))},Bn.deburr=Ua,Bn.defaultTo=function(t,e){return null==t||t!=t?e:t},Bn.divide=xl,Bn.endsWith=function(e,n,r){e=wa(e),n=ho(n);var o=e.length,i=r=r===t?o:cr(ya(r),0,o);return(r-=n.length)>=0&&e.slice(r,i)==n},Bn.eq=Vs,Bn.escape=function(t){return(t=wa(t))&&J.test(t)?t.replace(U,rn):t},Bn.escapeRegExp=function(t){return(t=wa(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Bn.every=function(e,n,r){var o=Ks(e)?Ae:gr;return r&&ki(e,n,r)&&(n=t),o(e,hi(n,3))},Bn.find=bs,Bn.findIndex=Ui,Bn.findKey=function(t,e){return ze(t,hi(e,3),kr)},Bn.findLast=_s,Bn.findLastIndex=Ki,Bn.findLastKey=function(t,e){return ze(t,hi(e,3),xr)},Bn.floor=Sl,Bn.forEach=ws,Bn.forEachRight=ks,Bn.forIn=function(t,e){return null==t?t:_r(t,hi(e,3),La)},Bn.forInRight=function(t,e){return null==t?t:wr(t,hi(e,3),La)},Bn.forOwn=function(t,e){return t&&kr(t,hi(e,3))},Bn.forOwnRight=function(t,e){return t&&xr(t,hi(e,3))},Bn.get=Ma,Bn.gt=Ws,Bn.gte=qs,Bn.has=function(t,e){return null!=t&&vi(t,e,Mr)},Bn.hasIn=Ta,Bn.head=Gi,Bn.identity=sl,Bn.includes=function(t,e,n,r){t=Gs(t)?t:Va(t),n=n&&!r?ya(n):0;var o=t.length;return n<0&&(n=_n(o+n,0)),ua(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&je(t,e,n)>-1},Bn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ya(n);return o<0&&(o=_n(r+o,0)),je(t,e,o)},Bn.inRange=function(e,n,r){return n=ga(n),r===t?(r=n,n=0):r=ga(r),function(t,e,n){return t>=wn(e,n)&&t<_n(e,n)}(e=ba(e),n,r)},Bn.invoke=Ra,Bn.isArguments=Us,Bn.isArray=Ks,Bn.isArrayBuffer=Js,Bn.isArrayLike=Gs,Bn.isArrayLikeObject=Ys,Bn.isBoolean=function(t){return!0===t||!1===t||oa(t)&&Or(t)==y},Bn.isBuffer=Xs,Bn.isDate=Qs,Bn.isElement=function(t){return oa(t)&&1===t.nodeType&&!aa(t)},Bn.isEmpty=function(t){if(null==t)return!0;if(Gs(t)&&(Ks(t)||"string"==typeof t||"function"==typeof t.splice||Xs(t)||pa(t)||Us(t)))return!t.length;var e=yi(t);if(e==k||e==O)return!t.size;if(Ci(t))return!zr(t).length;for(var n in t)if($t.call(t,n))return!1;return!0},Bn.isEqual=function(t,e){return Dr(t,e)},Bn.isEqualWith=function(e,n,r){var o=(r="function"==typeof r?r:t)?r(e,n):t;return o===t?Dr(e,n,t,r):!!o},Bn.isError=Zs,Bn.isFinite=function(t){return"number"==typeof t&&yn(t)},Bn.isFunction=ta,Bn.isInteger=ea,Bn.isLength=na,Bn.isMap=ia,Bn.isMatch=function(t,e){return t===e||Lr(t,e,fi(e))},Bn.isMatchWith=function(e,n,r){return r="function"==typeof r?r:t,Lr(e,n,fi(n),r)},Bn.isNaN=function(t){return sa(t)&&t!=+t},Bn.isNative=function(t){if(Ei(t))throw new St("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return $r(t)},Bn.isNil=function(t){return null==t},Bn.isNull=function(t){return null===t},Bn.isNumber=sa,Bn.isObject=ra,Bn.isObjectLike=oa,Bn.isPlainObject=aa,Bn.isRegExp=la,Bn.isSafeInteger=function(t){return ea(t)&&t>=-9007199254740991&&t<=h},Bn.isSet=ca,Bn.isString=ua,Bn.isSymbol=ha,Bn.isTypedArray=pa,Bn.isUndefined=function(e){return e===t},Bn.isWeakMap=function(t){return oa(t)&&yi(t)==T},Bn.isWeakSet=function(t){return oa(t)&&"[object WeakSet]"==Or(t)},Bn.join=function(t,e){return null==t?"":vn.call(t,e)},Bn.kebabCase=Ka,Bn.last=Zi,Bn.lastIndexOf=function(e,n,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==t&&(i=(i=ya(r))<0?_n(o+i,0):wn(i,o-1)),n==n?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(e,n,i):Fe(e,Be,i,!0)},Bn.lowerCase=Ja,Bn.lowerFirst=Ga,Bn.lt=fa,Bn.lte=da,Bn.max=function(e){return e&&e.length?yr(e,sl,Ar):t},Bn.maxBy=function(e,n){return e&&e.length?yr(e,hi(n,2),Ar):t},Bn.mean=function(t){return Ve(t,sl)},Bn.meanBy=function(t,e){return Ve(t,hi(e,2))},Bn.min=function(e){return e&&e.length?yr(e,sl,jr):t},Bn.minBy=function(e,n){return e&&e.length?yr(e,hi(n,2),jr):t},Bn.stubArray=vl,Bn.stubFalse=bl,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=El,Bn.nth=function(e,n){return e&&e.length?qr(e,ya(n)):t},Bn.noConflict=function(){return pe._===this&&(pe._=Ht),this},Bn.noop=hl,Bn.now=Ms,Bn.pad=function(t,e,n){t=wa(t);var r=(e=ya(e))?pn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return Ko(ye(o),n)+t+Ko(ge(o),n)},Bn.padEnd=function(t,e,n){t=wa(t);var r=(e=ya(e))?pn(t):0;return e&&r<e?t+Ko(e-r,n):t},Bn.padStart=function(t,e,n){t=wa(t);var r=(e=ya(e))?pn(t):0;return e&&r<e?Ko(e-r,n)+t:t},Bn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),xn(wa(t).replace(rt,""),e||0)},Bn.random=function(e,n,r){if(r&&"boolean"!=typeof r&&ki(e,n,r)&&(n=r=t),r===t&&("boolean"==typeof n?(r=n,n=t):"boolean"==typeof e&&(r=e,e=t)),e===t&&n===t?(e=0,n=1):(e=ga(e),n===t?(n=e,e=0):n=ga(n)),e>n){var o=e;e=n,n=o}if(r||e%1||n%1){var i=Sn();return wn(e+i*(n-e+le("1e-"+((i+"").length-1))),n)}return Yr(e,n)},Bn.reduce=function(t,e,n){var r=Ks(t)?De:Ue,o=arguments.length<3;return r(t,hi(e,4),n,o,dr)},Bn.reduceRight=function(t,e,n){var r=Ks(t)?Le:Ue,o=arguments.length<3;return r(t,hi(e,4),n,o,mr)},Bn.repeat=function(e,n,r){return n=(r?ki(e,n,r):n===t)?1:ya(n),Xr(wa(e),n)},Bn.replace=function(){var t=arguments,e=wa(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Bn.result=function(e,n,r){var o=-1,i=(n=ko(n,e)).length;for(i||(i=1,e=t);++o<i;){var s=null==e?t:e[ji(n[o])];s===t&&(o=i,s=r),e=ta(s)?s.call(e):s}return e},Bn.round=Cl,Bn.runInContext=s,Bn.sample=function(t){return(Ks(t)?Zn:Zr)(t)},Bn.size=function(t){if(null==t)return 0;if(Gs(t))return ua(t)?pn(t):t.length;var e=yi(t);return e==k||e==O?t.size:zr(t).length},Bn.snakeCase=Ya,Bn.some=function(e,n,r){var o=Ks(e)?$e:so;return r&&ki(e,n,r)&&(n=t),o(e,hi(n,3))},Bn.sortedIndex=function(t,e){return ao(t,e)},Bn.sortedIndexBy=function(t,e,n){return lo(t,e,hi(n,2))},Bn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ao(t,e);if(r<n&&Vs(t[r],e))return r}return-1},Bn.sortedLastIndex=function(t,e){return ao(t,e,!0)},Bn.sortedLastIndexBy=function(t,e,n){return lo(t,e,hi(n,2),!0)},Bn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=ao(t,e,!0)-1;if(Vs(t[n],e))return n}return-1},Bn.startCase=Xa,Bn.startsWith=function(t,e,n){return t=wa(t),n=null==n?0:cr(ya(n),0,t.length),e=ho(e),t.slice(n,n+e.length)==e},Bn.subtract=Ol,Bn.sum=function(t){return t&&t.length?Ke(t,sl):0},Bn.sumBy=function(t,e){return t&&t.length?Ke(t,hi(e,2)):0},Bn.template=function(e,n,r){var o=Bn.templateSettings;r&&ki(e,n,r)&&(n=t),e=wa(e),n=Sa({},n,o,ei);var i,s,a=Sa({},n.imports,o.imports,ei),l=Da(a),c=Xe(a,l),u=0,h=n.interpolate||bt,p="__p += '",f=At((n.escape||bt).source+"|"+h.source+"|"+(h===X?ht:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),d="//# sourceURL="+($t.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";e.replace(f,(function(t,n,r,o,a,l){return r||(r=o),p+=e.slice(u,l).replace(_t,on),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),p+="';\n";var m=$t.call(n,"variable")&&n.variable;if(m){if(ct.test(m))throw new St("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(B,""):p).replace(V,"$1").replace(W,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=el((function(){return Et(l,d+"return "+p).apply(t,c)}));if(g.source=p,Zs(g))throw g;return g},Bn.times=function(t,e){if((t=ya(t))<1||t>h)return[];var n=f,r=wn(t,f);e=hi(e),t-=f;for(var o=Je(r,e);++n<t;)e(n);return o},Bn.toFinite=ga,Bn.toInteger=ya,Bn.toLength=va,Bn.toLower=function(t){return wa(t).toLowerCase()},Bn.toNumber=ba,Bn.toSafeInteger=function(t){return t?cr(ya(t),-9007199254740991,h):0===t?t:0},Bn.toString=wa,Bn.toUpper=function(t){return wa(t).toUpperCase()},Bn.trim=function(e,n,r){if((e=wa(e))&&(r||n===t))return Ge(e);if(!e||!(n=ho(n)))return e;var o=fn(e),i=fn(n);return So(o,Ze(o,i),tn(o,i)+1).join("")},Bn.trimEnd=function(e,n,r){if((e=wa(e))&&(r||n===t))return e.slice(0,dn(e)+1);if(!e||!(n=ho(n)))return e;var o=fn(e);return So(o,0,tn(o,fn(n))+1).join("")},Bn.trimStart=function(e,n,r){if((e=wa(e))&&(r||n===t))return e.replace(rt,"");if(!e||!(n=ho(n)))return e;var o=fn(e);return So(o,Ze(o,fn(n))).join("")},Bn.truncate=function(e,n){var r=30,o="...";if(ra(n)){var i="separator"in n?n.separator:i;r="length"in n?ya(n.length):r,o="omission"in n?ho(n.omission):o}var s=(e=wa(e)).length;if(sn(e)){var a=fn(e);s=a.length}if(r>=s)return e;var l=r-pn(o);if(l<1)return o;var c=a?So(a,0,l).join(""):e.slice(0,l);if(i===t)return c+o;if(a&&(l+=c.length-l),la(i)){if(e.slice(l).search(i)){var u,h=c;for(i.global||(i=At(i.source,wa(pt.exec(i))+"g")),i.lastIndex=0;u=i.exec(h);)var p=u.index;c=c.slice(0,p===t?l:p)}}else if(e.indexOf(ho(i),l)!=l){var f=c.lastIndexOf(i);f>-1&&(c=c.slice(0,f))}return c+o},Bn.unescape=function(t){return(t=wa(t))&&K.test(t)?t.replace(q,mn):t},Bn.uniqueId=function(t){var e=++Pt;return wa(t)+e},Bn.upperCase=Qa,Bn.upperFirst=Za,Bn.each=ws,Bn.eachRight=ks,Bn.first=Gi,ul(Bn,(_l={},kr(Bn,(function(t,e){$t.call(Bn.prototype,e)||(_l[e]=t)})),_l),{chain:!1}),Bn.VERSION="4.17.21",Ce(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Bn[t].placeholder=Bn})),Ce(["drop","take"],(function(e,n){Un.prototype[e]=function(r){r=r===t?1:_n(ya(r),0);var o=this.__filtered__&&!n?new Un(this):this.clone();return o.__filtered__?o.__takeCount__=wn(r,o.__takeCount__):o.__views__.push({size:wn(r,f),type:e+(o.__dir__<0?"Right":"")}),o},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Ce(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Un.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:hi(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ce(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Ce(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(sl)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Qr((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Ir(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter(zs(hi(t)))},Un.prototype.slice=function(e,n){e=ya(e);var r=this;return r.__filtered__&&(e>0||n<0)?new Un(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),n!==t&&(r=(n=ya(n))<0?r.dropRight(-n):r.take(n-e)),r)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(f)},kr(Un.prototype,(function(e,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),i=Bn[o?"take"+("last"==n?"Right":""):n],s=o||/^find/.test(n);i&&(Bn.prototype[n]=function(){var n=this.__wrapped__,a=o?[1]:arguments,l=n instanceof Un,c=a[0],u=l||Ks(n),h=function(t){var e=i.apply(Bn,Re([t],a));return o&&p?e[0]:e};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var p=this.__chain__,f=!!this.__actions__.length,d=s&&!p,m=l&&!f;if(!s&&u){n=m?n:new Un(this);var g=e.apply(n,a);return g.__actions__.push({func:gs,args:[h],thisArg:t}),new qn(g,p)}return d&&m?e.apply(this,a):(g=this.thru(h),d?o?g.value()[0]:g.value():g)})})),Ce(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Nt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Bn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Ks(o)?o:[],t)}return this[n]((function(n){return e.apply(Ks(n)?n:[],t)}))}})),kr(Un.prototype,(function(t,e){var n=Bn[e];if(n){var r=n.name+"";$t.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:e,func:n})}})),Rn[Vo(t,2).name]=[{name:"wrapper",func:t}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Io(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Io(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Io(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ks(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],s=i.size;switch(i.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=wn(e,t+s);break;case"takeRight":t=_n(t,e-s)}}return{start:t,end:e}}(0,o,this.__views__),s=i.start,a=i.end,l=a-s,c=r?a:s-1,u=this.__iteratees__,h=u.length,p=0,f=wn(l,this.__takeCount__);if(!n||!r&&o==l&&f==l)return yo(t,this.__actions__);var d=[];t:for(;l--&&p<f;){for(var m=-1,g=t[c+=e];++m<h;){var y=u[m],v=y.iteratee,b=y.type,_=v(g);if(2==b)g=_;else if(!_){if(1==b)continue t;break t}}d[p++]=g}return d},Bn.prototype.at=ys,Bn.prototype.chain=function(){return ms(this)},Bn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===t&&(this.__values__=ma(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?t:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var n,r=this;r instanceof Wn;){var o=Bi(r);o.__index__=0,o.__values__=t,n?i.__wrapped__=o:n=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,n},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var n=e;return this.__actions__.length&&(n=new Un(this)),(n=n.reverse()).__actions__.push({func:gs,args:[rs],thisArg:t}),new qn(n,this.__chain__)}return this.thru(rs)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,ee&&(Bn.prototype[ee]=function(){return this}),Bn}();de?((de.exports=gn)._=gn,fe._=gn):pe._=gn}.call(s);const $h=dl.create({name:"node_processor",addCommands:()=>({setBlockAttributes:nh((({commands:t,state:e},n,r,o={})=>{const i=Ue(t.getBlockAttributes(n))??{},{doc:s,tr:a}=e,{from:l,to:c}=a.selection;s.nodesBetween(l,c,((t,e)=>{fc.blocks.includes(t.type.name)&&a.setNodeAttribute(e,n,{...o,...i,...r})}))})),getBlockAttributes:nh((({editor:t},e,n)=>vr((()=>{let r=Object.assign({},n||{});for(const n of fc.blocks)Object.assign(r,t.getAttributes(n)?.[e]||{});return Object.keys(r).length?r:null})))),removeBlockAttributes:nh((({commands:t},e)=>{for(const n of fc.blocks)t.resetAttributes(n,e)})),applyMark:nh((({state:t,commands:e},n,r,o={})=>{const{tr:i,doc:s,schema:a}=t,{$from:l,$to:c}=i.selection,u=bl(mc.LINK,a),h=bl(n,a);if(!(h.spec.group||"").includes(gc.SETTINGS))return e.setMark(n,r);if(l.pos===c.pos)return;s.nodesBetween(l.pos,c.pos,((t,s)=>{if(t.type.name===fc.LIST)return;const a=function(t,e){const n="string"==typeof e?e:e.name;return t.find((t=>t.type.name===n))}(t.marks,n),p=h.create({...a?.attrs||{},...r}),f=Mh(l,c,t,s),d=!u.isInSet(t.marks)&&function(t,e,n,r=Nh){const o=t.resolve(e).path.reverse();for(const t of o)if("number"!=typeof t)for(const e of t.marks)if(r(e,n))return!0;return!1}(i.doc,s,p,o.isAppliedToParent);if(d)return(t=>{if(!o.onAppliedToParent||!1===o.onAppliedToParent(t)){const{tr:n,node:r,position:o,mark:i}=t;e._removeNodeMark({tr:n,node:r,position:o,mark:i.type})}})({tr:i,node:t,position:s,mark:p});t.isText?i.addMark(f.from,f.to,p):function(t,e,n,r){const o=Th(t,r),i=e.from-o<=r,s=e.to+o>=n.nodeSize+r;return i&&s}(i.doc,i.selection,t,s)&&i.addNodeMark(s,p)}))})),getMarks:nh((({editor:t},e)=>{const n=Ye(t,"state");return vr((()=>{const{selection:t,doc:r}=Ue(n),{from:o,to:i}=Ue(t),s=[];return r.nodesBetween(o,i,(t=>{for(const n of t.marks)n.type.name===e&&s.unshift(n.attrs)})),s}))})),getMark:nh((({commands:t},e)=>{const n=t.getMarks(e);return vr((()=>Ue(n)[0]??null))})),hasMark:nh((({commands:t},e)=>{const n=t.getMark(e);return vr((()=>!!Ue(n)))})),getCommonSettingMark:nh((({commands:t},e,n)=>{const r=t.getMark(e);return vr((()=>Ue(r)?.value??Ue(n)))})),getDeviceSettingMark:nh((({commands:t},e,n)=>{const r=t.getMarks(e),o=t.getDevice();return vr((()=>{for(const t of Ue(r)){const e=t[Ue(o)];if(e)return e}return Ue(n)}))})),removeAllMarks:nh((({state:t,commands:e})=>{const{tr:n,doc:r}=t,{from:o,to:i}=n.selection;r.nodesBetween(o,i,((t,r)=>{for(const o of t.marks)e._removeNodeMark({tr:n,node:t,position:r,mark:o})}))})),removeMarks:nh((({state:t,commands:e},n)=>{const{tr:r,doc:o}=t,{from:i,to:s}=r.selection;o.nodesBetween(i,s,((t,o)=>{const i=t.marks.filter((t=>n.includes(t.type.name)));for(const n of i)e._removeNodeMark({tr:r,node:t,position:o,mark:n})}))})),_removeNodeMark:nh(((t,{tr:e,node:n,position:r,mark:o})=>n.isText?e.removeMark(r,r+n.nodeSize,o):e.removeNodeMark(r,o)))})}),Ph=dl.create({name:"text_processor",addCommands:()=>({getSelectedText:nh((({state:t})=>{const{from:e,to:n}=t.selection;return t.doc.textBetween(e,n," ")})),transformText:nh((({state:t},e)=>{const{$from:n,$to:r}=t.tr.selection;n.pos!==r.pos&&t.doc.nodesBetween(n.pos,r.pos,((o,i)=>{if(!o.isText)return;const s=Mh(n,r,o,i),a=Math.max(0,n.pos-i),l=Math.max(0,r.pos-i),c=e({text:o.textContent.substring(a,l)}),u=t.schema.text(c,o.marks);t.tr.replaceWith(s.from,s.to,u)}))}))})}),zh=dl.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:nh((({state:t})=>{this.storage.selection=t.selection})),restoreSelection:nh((({commands:t})=>{this.storage.selection&&t.setTextSelection(this.storage.selection)})),expandSelection:nh((({tr:t,commands:e},n)=>{let r=t.selection.from,o=t.selection.to;t.doc.nodesBetween(r,o,((e,i,s)=>{if(n({node:e,parent:s})){const n=e.isText?0:Th(t.doc,i);r=Math.min(r,i+n),o=Math.max(o,i+e.nodeSize-n)}})),e.setTextSelection({from:r,to:o})})),expandSelectionToBlock:nh((({commands:t})=>{t.expandSelection((({parent:t})=>t.type.name===fc.DOCUMENT))}))}}}),Fh=Hl.create({name:"doc",topNode:!0,content:"block+"});class jh extends Ro{constructor(t,e,n,r="SetDocAttr"){super(),this.key=t,this.value=e,this.schema=n,this.stepType=r}apply(t){this.prevValue=t.attrs.meta[this.key];const e=Kr.fromJSON(this.schema,t.toJSON());return e.attrs.meta[this.key]=this.value,Do.ok(e)}invert(){return new jh(this.key,this.prevValue,this.schema,"revertSetDocAttr")}map(){return null}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}static fromJSON(t){return new jh(t.key,t.value,t.stepType)}}Ro.jsonID("setDocAttr",jh);const Hh=Fh.extend({marks:gc.SETTINGS,addAttributes:()=>({meta:{default:{}}}),onCreate(){this.editor.view.dom.addEventListener("click",(t=>{t.target.closest("a")&&t.preventDefault()}))},addCommands:()=>({setDocMetaAttributes:nh((({state:t},e,n)=>{t.tr.step(new jh(e,n,t.schema))}))})}),Bh=Hl.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:t}){return["p",Ya(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Vh=Bh.extend({marks:gc.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),Wh=Hl.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((t=>({tag:`h${t}`,attrs:{level:t}})))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Ya(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.setNode(this.name,t),toggleHeading:t=>({commands:e})=>!!this.options.levels.includes(t.level)&&e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return this.options.levels.reduce(((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})})),{})},addInputRules(){return this.options.levels.map((t=>{return e={find:new RegExp(`^(#{1,${t}})\\s$`),type:this.type,getAttributes:{level:t}},new il({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=Qa(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}});var e}))}}),qh=Wh.extend({marks:gc.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),Uh=dl.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[_c.create(this.editor),wc.create(this.editor)]}}),Kh=jl.create({name:mc.FONT_FAMILY,group:gc.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:nh((({commands:t},e)=>{t.applyMark(this.name,{value:e});const n=t.findFontByName(e);let r=Ue(t.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),t.applyFontWeight(r));const o=t.isSettingCustomized(mc.FONT_STYLE).value;!n.isItalicSupported(r)&&o&&t.removeItalic()})),getFont:nh((({commands:t})=>{const e=Ue(this.options.defaultPreset),n=t.findFontByName(e.common.font_family),r=t.getFontFamily();return vr((()=>t.findFontByName(Ue(r))||n))})),findFontByName:nh(((t,e)=>Ue(this.options.fonts).find((t=>t.name===e)))),getFontFamily:nh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontFamily()))),getDefaultFontFamily:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>Ue(e).common.font_family))}))}},parseHTML(){const t=t=>({value:t.replace(/["']/g,"")});return[{style:"--zw-font-family",getAttrs:t},{style:"font-family",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>oh({font_family:t.value?`"${t.value}"`:null})}),Jh=dl.create({name:mc.STYLE_PRESET,addGlobalAttributes(){return[{types:[fc.PARAGRAPH,fc.HEADING],attributes:{preset:{isRequired:!1,default:{id:Ue(this.options.defaultId)},parseHTML:t=>{const e=Ue(this.options.presets);if("LI"===t.parentElement.tagName)return null;for(const{id:n,node:r,fallbackClass:o}of e){if(o&&t.classList.contains(o))return{id:n};const e=Ue(this.options.styleRenderer).makePresetCssClass({id:n});if(t.matches(e))return{id:n};if(t.tagName===`H${r?.level}`)return{id:n}}return"P"===t.tagName?{id:Ue(this.options.defaultId)}:null},renderHTML:t=>t.preset?{class:Ue(this.options.styleRenderer).makePresetHtmlClass(t.preset)}:null}}}]},addCommands(){function t(t,e){return t.find((t=>e===t.id))}function e(t,e){const n={};for(const r of Object.keys(t)){const o=t[r],i=e[r],s=!i||"inherit"===i.toLowerCase();n[r]=s?o:i}return n}return{getPresetList:nh((()=>vr((()=>Ue(this.options.presets).filter((t=>!t.hidden)))))),getPreset:nh((({commands:n})=>{const r=n.getBlockAttributes("preset",{id:Ue(this.options.defaultId)}),o=n.getPresetList(),i=n.isLink(),s=n.getLinkPreset();return vr((()=>{const n=t(Ue(o),Ue(r).id);if(!Ue(i))return n;const a=Ue(s);return{id:n.id,common:e(n.common,a.common),mobile:e(n.mobile,a.mobile),tablet:e(n.tablet,a.tablet),desktop:e(n.desktop,a.desktop)}}))})),applyPreset:nh((({commands:e,chain:n},r)=>{const o=t(Ue(e.getPresetList()),r),i=o.node?.type??fc.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const t of mc.attributes)s[t]=Ue(e.getBlockAttributes(t));n().removeList().setNode(i,s).run()})),applyDefaultPreset:nh((({commands:t})=>{t.applyPreset(Ue(this.options.defaultId))})),removePreset:nh((({commands:t})=>{t.setNode(fc.PARAGRAPH,{preset:null})})),getPresetCustomization:nh((({editor:t,commands:e})=>{const n=Ye(t,"state");return vr((()=>{const{selection:t,doc:r}=Ue(n),{from:o,to:i}=t;return e._getSettingCustomization(r,o,i)}))})),isSettingCustomized:nh((({commands:t},e)=>{const n=t.getPresetCustomization(),r=mc.presetAttributes.includes(e)?"attributes":"marks";return vr((()=>Ue(n)[r]?.includes(e)??!1))})),getContentCustomization:nh((({editor:t,commands:e})=>{const n=Ye(t,"state");return vr((()=>{const{doc:t}=Ue(n);return e._getSettingCustomization(t,0,t.content.size)}))})),_getSettingCustomization:nh(((t,e,n,r)=>{const o=new Set,i=new Set;return e.nodesBetween(n,r,(t=>{for(const[e,n]of Object.entries(t.attrs)){mc.presetAttributes.includes(e)&&n&&i.add(e)}for(const{type:e}of t.marks)mc.marks.includes(e.name)&&o.add(e.name)})),{attributes:Array.from(i),marks:Array.from(o)}})),removePresetCustomization:nh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(mc.marks).resetAttributes(fc.PARAGRAPH,mc.presetAttributes).resetAttributes(fc.HEADING,mc.presetAttributes).restoreSelection().run()})),removeFormat:nh((({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){this.options.styleRenderer.inject(_p.head,Ue(this.options.presets))}}),Gh=jl.create({name:mc.FONT_WEIGHT,group:gc.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:nh((({commands:t},e)=>{t.applyMark(this.name,{value:e});Ue(t.getFont()).isItalicSupported(e)||t.removeItalic()})),toggleBold:nh((({commands:t})=>{const e=Ue(t.getFontWeight()),n=Ue(t.getFont()),r=Number(e)>=600?"400":"700",o=n.findClosestWeight(r);t.applyFontWeight(o)})),getFontWeight:nh((({commands:t})=>{const e=t.getCommonSettingMark(this.name,t.getDefaultFontWeight()),n=t.getFont();return vr((()=>{const t=Ue(e),r=Ue(n);return r.isWeightSupported(t)?t:r.findClosestWeight(t)}))})),getDefaultFontWeight:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>Ue(e).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":ih("toggleBold"),"Mod-B":ih("toggleBold")}),parseHTML(){const t=t=>"bold"===t?{value:"700"}:!!Number(t)&&{value:t};return[{style:"--zw-font-weight",getAttrs:t},{style:"font-weight",getAttrs:t},{tag:"b",attrs:{value:"700"}},{tag:"strong",attrs:{value:"700"}}]},renderHTML:({HTMLAttributes:t})=>oh({font_weight:t.value})}),Yh=jl.create({name:mc.FONT_SIZE,group:gc.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:nh((({commands:t})=>t.getDeviceSettingMark(this.name,t.getDefaultFontSize()))),getDefaultFontSize:nh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return vr((()=>Ue(n)[Ue(e)].font_size.replace("px","")))})),applyFontSize:nh((({commands:t},e)=>{const n=Ue(t.getDevice());t.applyMark(this.name,{[n]:e},{isAppliedToParent:(t,e)=>t.type.name===e.type.name&&t.attrs[n]===e.attrs[n],onAppliedToParent:({tr:t,node:e,position:r,mark:o})=>{const i={...o.attrs,[n]:null},s=!Object.values(i).some((t=>!!t));if(s)return!1;const a=o.type.create(i);e.isText?t.addMark(r,r+e.nodeSize,a):t.addNodeMark(r,a)}})})),increaseFontSize:nh((({commands:t})=>{const e=Number(Ue(t.getFontSize())),n=Math.min(e+1,Ue(this.options.maxSize));t.applyFontSize(String(n))})),decreaseFontSize:nh((({commands:t})=>{const e=Number(Ue(t.getFontSize())),n=Math.max(e-1,Ue(this.options.minSize));t.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":ih("increaseFontSize"),"Mod-Shift--":ih("decreaseFontSize")}),parseHTML(){const t=t=>{if(!t)return null;const e=Ch(t,Ue(this.options.wrapperRef));return String(e)};return[{tag:'[style*="--zw-font-size"]',getAttrs:({style:e})=>({mobile:t(e.getPropertyValue("--zw-font-size-mobile")),tablet:t(e.getPropertyValue("--zw-font-size-tablet")),desktop:t(e.getPropertyValue("--zw-font-size-desktop"))})},{style:"font-size",getAttrs:e=>{const n=t(e);return{desktop:n,tablet:n,mobile:null}}}]},renderHTML({HTMLAttributes:t}){const e=t=>t?`${t}px`:null;return oh({font_size_mobile:e(t.mobile),font_size_tablet:e(t.tablet),font_size_desktop:e(t.desktop)})}}),Xh=jl.create({name:mc.FONT_COLOR,group:gc.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:nh((({commands:t})=>t.getCommonSettingMark(this.name,t.getDefaultFontColor()))),getDefaultFontColor:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>Ue(e).common.color))})),applyFontColor:nh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Eh(t)});return[{style:"--zw-font-color",getAttrs:t},{style:"color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>oh({font_color:t.value})}),Qh=jl.create({name:mc.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:nh((({commands:t})=>t.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)"))),applyBackgroundColor:nh((({commands:t},e)=>{t.applyMark(this.name,{value:e})}))}},parseHTML(){const t=t=>({value:Eh(t)});return[{style:"--zw-background-color",getAttrs:t},{style:"background-color",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>oh({background_color:t.value})}),Zh=dl.create({name:"device_manager",addCommands(){return{getDevice:nh((()=>Ye(this.options,"device")))}}}),tp=jl.create({name:mc.FONT_STYLE,group:gc.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:nh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultFontStyle();return vr((()=>Ue(e)?.italic??Ue(n).italic))})),isItalicAvailable:nh((({commands:t})=>{const e=t.getFont(),n=t.getFontWeight();return vr((()=>{const t=Ue(e),r=Ue(n);return t.isItalicSupported(r)&&!t.isWeightItalicOnly(r)}))})),getDefaultFontStyle:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>({italic:"italic"===Ue(e).common.font_style})))})),toggleItalic:nh((({commands:t})=>{Ue(t.isItalicAvailable())&&(Ue(t.isItalic())?t.removeItalic():t.applyItalic())})),applyItalic:nh((({commands:t})=>{t.applyMark(this.name,{italic:!0})})),removeItalic:nh((({commands:t})=>{t.applyMark(this.name,{italic:!1})}))}},addKeyboardShortcuts:()=>({"Mod-i":ih("toggleItalic"),"Mod-I":ih("toggleItalic")}),parseHTML(){const t=t=>({italic:t.includes("italic")});return[{tag:"i",attrs:{italic:!0}},{style:"--zw-font-style",getAttrs:t},{style:"font-style",getAttrs:t}]},renderHTML:({HTMLAttributes:t})=>oh({font_style:t.italic?"italic":"normal"})}),ep=jl.create({name:mc.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:nh((({commands:t})=>{const e=t.getTextDecoration();return vr((()=>Ue(e).underline))})),isStrikeThrough:nh((({commands:t})=>{const e=t.getTextDecoration();return vr((()=>Ue(e).strike_through))})),getTextDecoration:nh((({commands:t})=>{const e=t.getMark(this.name),n=t.getDefaultTextDecoration();return vr((()=>{const t=Ue(e)??{},r=Ue(n);return{underline:t.underline||r.underline,strike_through:t.strike_through||r.strike_through}}))})),isUnderlineCustomized:nh((({commands:t})=>{const e=t.isUnderline(),n=t.getDefaultTextDecoration();return vr((()=>Ue(e)!==Ue(n).underline))})),getDefaultTextDecoration:nh((({commands:t})=>{const e=t.getPreset();return vr((()=>{const{text_decoration:t}=Ue(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}}))})),toggleUnderline:nh((({commands:t})=>{t.toggleTextDecoration("underline")})),toggleStrikeThrough:nh((({commands:t})=>{t.toggleTextDecoration("strike_through")})),toggleTextDecoration:nh((({commands:t},e,n=null)=>{const r=Ue(t.getTextDecoration()),o=n??!r[e];t.applyMark(this.name,{[e]:o})})),applyTextDecoration:nh((({commands:t},e)=>{t.toggleTextDecoration(e,!0)})),removeTextDecoration:nh((({commands:t},e)=>{t.toggleTextDecoration(e,!1)}))}},addKeyboardShortcuts:()=>({"Mod-u":ih("toggleUnderline"),"Mod-U":ih("toggleUnderline")}),parseHTML(){const t=t=>{const e=t.includes("underline"),n=t.includes("line-through");return!(!e&&!n)&&{underline:e,strike_through:n}};return[{style:"--zw-text-decoration",getAttrs:t},{style:"text-decoration-line",getAttrs:t},{style:"text-decoration",getAttrs:t},{tag:"s",attrs:{underline:!1,strike_through:!0}},{tag:"u",attrs:{underline:!0,strike_through:!1}}]},renderHTML({HTMLAttributes:t}){const e=[];return t.underline&&e.push("underline"),t.strike_through&&e.push("line-through"),e.length||e.push("none"),oh({text_decoration:e.join(" ")})}}),np=dl.create({name:"case_style",addCommands:()=>({applyCaseStyle:nh((({commands:t},e)=>{switch(e){case hc.CAPITALIZE:return t.applyCapitalize();case hc.LOWERCASE:return t.applyLowerCase();case hc.UPPERCASE:return t.applyUpperCase()}})),applyCapitalize:nh((({commands:t})=>{t.transformText((({text:t})=>function(t){return t.toLowerCase().replace(/(?:^|\s)\S/g,(t=>t.toUpperCase()))}(t)))})),applyLowerCase:nh((({commands:t})=>{t.transformText((({text:t})=>t.toLowerCase()))})),applyUpperCase:nh((({commands:t})=>{t.transformText((({text:t})=>t.toUpperCase()))}))})}),rp={mobile:null,tablet:null,desktop:null},op=dl.create({name:mc.ALIGNMENT,addGlobalAttributes:()=>[{types:[fc.PARAGRAPH,fc.HEADING],attributes:{[mc.ALIGNMENT]:{isRequired:!1,parseHTML({style:t}){const e=function(t){const e=Ah[t]||t;return pc.values.includes(e)?e:null}(t.textAlign);if(e)return{desktop:e,tablet:e,mobile:e};const n=t.getPropertyValue("--zw-alignment-mobile")||null,r=t.getPropertyValue("--zw-alignment-tablet")||null,o=t.getPropertyValue("--zw-alignment-desktop")||null;return n||r||o?{desktop:o,tablet:r,mobile:n}:null},renderHTML:t=>t.alignment?rh({alignment_mobile:t.alignment.mobile,alignment_tablet:t.alignment.tablet,alignment_desktop:t.alignment.desktop}):null}}}],addCommands(){return{applyAlignment:nh((({commands:t},e)=>{const n=Ue(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},rp)})),removeAlignment:nh((({commands:t})=>t.removeBlockAttributes(this.name))),getAlignment:nh((({commands:t})=>{const e=t.getBlockAttributes(this.name,rp),n=t.getDevice(),r=t.getDefaultAlignment();return vr((()=>Ue(e)?.[Ue(n)]??Ue(r)))})),getDefaultAlignment:nh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return vr((()=>Ue(n)[Ue(e)].alignment??pc.LEFT))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":ih("applyAlignment",pc.LEFT),"Mod-Shift-e":ih("applyAlignment",pc.CENTER),"Mod-Shift-r":ih("applyAlignment",pc.RIGHT),"Mod-Shift-j":ih("applyAlignment",pc.JUSTIFY)})}),ip={mobile:null,tablet:null,desktop:null},sp=dl.create({name:mc.LINE_HEIGHT,addGlobalAttributes(){return[{types:[fc.PARAGRAPH,fc.HEADING],attributes:{[mc.LINE_HEIGHT]:{isRequired:!1,parseHTML:t=>{if(t.matches('[style*="--zw-line-height"]')){return{mobile:null,tablet:t.style.getPropertyValue("--zw-line-height-tablet")||null,desktop:t.style.getPropertyValue("--zw-line-height-desktop")||null}}const e=t.style.lineHeight;if(!e)return null;const n=Oh(e,t,Ue(this.options.wrapperRef));return n?{desktop:n,tablet:n,mobile:null}:null},renderHTML:t=>t.line_height?rh({line_height_mobile:t.line_height.mobile,line_height_tablet:t.line_height.tablet,line_height_desktop:t.line_height.desktop}):null}}}]},addCommands(){return{getLineHeight:nh((({commands:t})=>{const e=t.getBlockAttributes(this.name,ip),n=t.getDevice(),r=t.getDefaultLineHeight();return vr((()=>Ue(e)?.[Ue(n)]??Ue(r)))})),getDefaultLineHeight:nh((({commands:t})=>{const e=t.getDevice(),n=t.getPreset();return vr((()=>Ue(n)[Ue(e)].line_height))})),applyLineHeight:nh((({commands:t},e)=>{const n=Ue(t.getDevice());t.setBlockAttributes(this.name,{[n]:e},ip)}))}}}),ap=Hl.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:t}){return["li",Ya(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}).extend({name:fc.LIST_ITEM,marks:gc.SETTINGS,addCommands(){const t=({selection:t})=>t.$cursor.before(t.$cursor.depth-1);return{listItemNewline:nh((({commands:e,tr:n})=>{const r=n.doc.nodeAt(t(n));if(!n.selection.$cursor.node().textContent)return!1;e.splitListItem(this.name);const o=t(n);for(const t of r.marks)n.addNodeMark(o,Lh(t));return!0}))}},addOptions:()=>({HTMLAttributes:{class:"zw-style"}}),addKeyboardShortcuts:()=>({Enter:t=>{const{state:e,commands:n}=t.editor,r=e.selection.$cursor?.path.some((t=>t.type?.name===fc.LIST));if(r)return n.listItemNewline()}})}),lp=Hl.create({name:fc.LIST,content:`${fc.LIST_ITEM}+`,group:"block list",marks:gc.SETTINGS,addExtensions:()=>[ap],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:dc.DISC}}}),parseHTML(){const t={a:dc.ROMAN,i:dc.LATIN,1:dc.DECIMAL},e=e=>{for(const n of dc.values){const r=`.${Ue(this.options.baseClass)}${n}`;if(e.matches(r))return n;if(t[e.type.toLowerCase()]===n)return n}};return[{tag:"ol",getAttrs:t=>({bullet:{type:e(t)||dc.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||dc.DISC}})}]},renderHTML({HTMLAttributes:t}){const e=[Ue(this.options.baseClass)+t.bullet.type,Ue(this.options.presetClass)];return[dc.ordered.includes(t.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands:()=>({getListType:nh((({commands:t})=>{const e=t.getBlockAttributes("bullet",{type:null});return vr((()=>Ue(e).type??null))})),applyList:nh((({commands:t,chain:e},n)=>{if(Ue(t.getListType())!==n)return e().applyDefaultPreset().toggleList(fc.LIST,fc.LIST_ITEM).setBlockAttributes("bullet",{type:n}).command((({commands:t,tr:e})=>t._bubbleListItemMarks(e))).run();t.removeList()})),_bubbleListItemMarks:nh(((t,e)=>{const{doc:n,selection:r}=e,o=r.$from.start(),i=r.$to.end();function s(t,e){if(mc.inlineMarks.includes(e.type))return!1;if(e.type.isInSet(t.marks))return!1;for(const n of t.content.content)if(n.childCount){if(!n.marks)return!1;if(!e.isInSet(n.marks))return!1}return!0}n.nodesBetween(o,i,((t,n)=>{if(t.type.name===fc.LIST)return;if(t.type.name!==fc.LIST_ITEM)return!1;const r=[];return t.forEach((o=>{for(const i of o.marks)i.isInSet(r)?e.removeNodeMark(n+1,i):s(t,i)&&(e.removeNodeMark(n+1,i),e.addNodeMark(n,Lh(i)),r.push(i))})),!1}))})),removeList:nh((({commands:t,state:e})=>{const{tr:n,doc:r,selection:o}=e,i=o.$from.start(),s=o.$to.end();r.nodesBetween(i,s,((t,e,r)=>{if([fc.LIST,fc.LIST_ITEM].includes(t.type.name))return;if(r.type.name!==fc.LIST_ITEM)return!1;const o=r.marks.filter((function(e){return!e.type.isInSet(t.marks)}));for(const t of o)n.addNodeMark(e,Lh(t));return!1})),t.liftListItem(fc.LIST_ITEM)}))}),addInputRules(){const t=(t,e)=>{return n={find:e,type:this.type,getAttributes:{bullet:{type:t}},joinPredicate:(e,{attrs:n})=>n.bullet.type===t},new il({find:n.find,handler:({state:t,range:e,match:r,chain:o})=>{const i=Qa(n.getAttributes,void 0,r)||{},s=t.tr.delete(e.from,e.to),a=s.doc.resolve(e.from).blockRange(),l=a&&qo(a,n.type,i);if(!l)return null;if(s.wrap(a,l),n.keepMarks&&n.editor){const{selection:e,storedMarks:r}=t,{splittableMarks:o}=n.editor.extensionManager,i=r||e.$to.parentOffset&&e.$from.marks();if(i){const t=i.filter((t=>o.includes(t.type.name)));s.ensureMarks(t)}}if(n.keepAttributes){const t="bulletList"===n.type.name||"orderedList"===n.type.name?"listItem":"taskList";o().updateAttributes(t,i).run()}const c=s.doc.resolve(e.from-1).nodeBefore;c&&c.type===n.type&&Jo(s.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(r,c))&&s.join(e.from-1)}});var n};return[t(dc.DISC,/^\s*([-+*])\s$/),t(dc.DECIMAL,/^(\d+)\.\s$/),t(dc.LATIN,/^([ivx]{1,3})\.\s$/i),t(dc.ROMAN,/^([a-z])\.\s$/i)]}});function cp(t){return new Oi({key:new Ti("autolink"),appendTransaction:(e,n,r)=>{const o=e.some((t=>t.docChanged))&&!n.doc.eq(r.doc),i=e.some((t=>t.getMeta("preventAutolink")));if(!o||i)return;const{tr:s}=r,a=function(t,e){const n=new ui(t);return e.forEach((t=>{t.steps.forEach((t=>{n.step(t)}))})),n}(n.doc,[...e]),{mapping:l}=a,c=function(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach(((t,o)=>{const i=[];if(t.ranges.length)t.forEach(((t,e)=>{i.push({from:t,to:e})}));else{const{from:t,to:e}=n[o];if(void 0===t||void 0===e)return;i.push({from:t,to:e})}i.forEach((({from:t,to:n})=>{const i=e.slice(o).map(t,-1),s=e.slice(o).map(n),a=e.invert().map(i,-1),l=e.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,to:s}})}))})),Il(r)}(a);return c.forEach((({oldRange:e,newRange:o})=>{Rl(e.from,e.to,n.doc).filter((e=>e.mark.type===t.type)).forEach((e=>{const o=Rl(l.map(e.from),l.map(e.to),r.doc).filter((e=>e.mark.type===t.type));if(!o.length)return;const i=o[0],a=n.doc.textBetween(e.from,e.to,void 0," "),c=r.doc.textBetween(i.from,i.to,void 0," "),u=th(a),h=th(c);u&&!h&&s.removeMark(i.from,i.to,t.type)}));const i=function(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,((t,e)=>{n(t)&&r.push({node:t,pos:e})})),r}(r.doc,o,(t=>t.isTextblock));let a,c;if(i.length>1?(a=i[0],c=r.doc.textBetween(a.pos,a.pos+a.node.nodeSize,void 0," ")):i.length&&r.doc.textBetween(o.from,o.to," "," ").endsWith(" ")&&(a=i[0],c=r.doc.textBetween(a.pos,o.to,void 0," ")),a&&c){const e=c.split(" ").filter((t=>""!==t));if(e.length<=0)return!1;const n=e[e.length-1],r=a.pos+c.lastIndexOf(n);if(!n)return!1;Zu(n).filter((t=>t.isLink)).filter((e=>!t.validate||t.validate(e.value))).map((t=>({...t,from:r+t.start+1,to:r+t.end+1}))).forEach((e=>{s.addMark(e.from,e.to,t.type.create({href:e.href}))}))}})),s.steps.length?s:void 0}})}const up=jl.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach((t=>{"string"!=typeof t?Yu(t.scheme,t.optionalSlashes):Yu(t)}))},onDestroy(){Rc.groups={},Gu.scanner=null,Gu.parser=null,Gu.tokenQueue=[],Gu.pluginQueue=[],Gu.customSchemes=[],Gu.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:t}){return["a",Ya(this.options.HTMLAttributes,t),0]},addCommands(){return{setLink:t=>({chain:e})=>e().setMark(this.name,t).setMeta("preventAutolink",!0).run(),toggleLink:t=>({chain:e})=>e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(t={find:t=>Zu(t).filter((t=>!this.options.validate||this.options.validate(t.value))).filter((t=>t.isLink)).map((t=>({text:t.value,index:t.start,data:t}))),type:this.type,getAttributes:t=>{var e;return{href:null===(e=t.data)||void 0===e?void 0:e.href}}},new ll({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Qa(t.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:i}=e,s=r[r.length-1],a=r[0];let l=n.to;if(s){const r=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(Rl(n.from,n.to,e.doc).filter((e=>e.mark.type.excluded.find((n=>n===t.type&&n!==e.mark.type)))).filter((t=>t.to>c)).length)return null;u<n.to&&i.delete(u,n.to),c>n.from&&i.delete(n.from+r,c),l=n.from+r+s.length,i.addMark(n.from+r,l,t.type.create(o||{})),i.removeStoredMark(t.type)}}}))];var t},addProseMirrorPlugins(){const t=[];var e;return this.options.autolink&&t.push(cp({type:this.type,validate:this.options.validate})),this.options.openOnClick&&t.push((e={type:this.type},new Oi({key:new Ti("handleClickLink"),props:{handleClick:(t,n,r)=>{var o,i,s;if(1!==r.button)return!1;const a=Nl(t.state,e.type.name),l=null===(o=r.target)||void 0===o?void 0:o.closest("a"),c=null!==(i=null==l?void 0:l.href)&&void 0!==i?i:a.href,u=null!==(s=null==l?void 0:l.target)&&void 0!==s?s:a.target;return!(!l||!c||(window.open(c,u),0))}}}))),this.options.linkOnPaste&&t.push(function(t){return new Oi({key:new Ti("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:o}=e,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach((t=>{a+=t.textContent}));const l=Zu(a).find((t=>t.isLink&&t.value===a));return!(!a||!l||(t.editor.commands.setMark(t.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),t}}),hp=up.extend({name:mc.LINK,addOptions(){return{...this.parent?.(),openOnClick:!1,linkOnPaste:!1}},addAttributes(){return{href:{default:null,parseHTML:t=>{const e=t.getAttribute("href");return e.startsWith("#")?parseFloat(t.getAttribute("href").replace("#","")):e}},target:{default:yc.SELF,parseHTML:t=>t.getAttribute("target")||yc.SELF},destination:{default:vc.URL,parseHTML:t=>{const e=t.getAttribute("href");if(!e.startsWith("#"))return vc.URL;const n=e.replace("#","");return Ue(this.options.pageBlocks).find((t=>t.id===parseInt(n)))?vc.BLOCK:vc.URL}}}},addCommands(){const{unsetLink:t}=this.parent();return{removeLink:t,applyLink:nh((({commands:t,chain:e},n)=>(t.setMeta("preventAutolink",!0),t.getSelectedText()?e().applyMark(this.name,n).expandSelectionToLink().command((({tr:t})=>(n.text&&t.insertText(n.text,t.selection.from,t.selection.to),!0))).run():t.insertContent(kp.text(n.text,[kp.mark(mc.LINK,n)]))))),expandSelectionToLink:nh((({commands:t})=>{t.expandSelection((({node:t})=>this.type.isInSet(t.marks)))})),isLink:nh((({commands:t})=>t.hasMark(this.name))),getLinkPreset:nh((()=>vr((()=>Ue(this.options.preset)))))}},addProseMirrorPlugins(){return[...this.parent(),eh.create(this.editor)]},renderHTML({HTMLAttributes:t}){const e=t.destination===vc.BLOCK?`#${t.href}`:t.href,n=Ue(this.options.basePresetClass)+Ue(this.options.preset).id;return["a",{href:e,target:t.target,class:`${n} zw-style`},0]}}),pp=jl.create({name:mc.SUPERSCRIPT,addCommands(){return{applySuperscript:nh((({commands:t})=>{t.setMark(this.name)})),removeSuperscript:nh((({commands:t})=>{t.unsetMark(this.name)})),toggleSuperscript:nh((({commands:t})=>{Ue(t.isSuperscript())?t.removeSuperscript():t.applySuperscript()})),isSuperscript:nh((({commands:t})=>{const e=t.getMark(this.name);return vr((()=>!!Ue(e)))}))}},parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:t=>"super"===t&&null}],renderHTML:()=>["sup",{class:"zw-superscript"},0]}),fp=dl.create({name:mc.MARGIN,addGlobalAttributes:()=>[{types:[fc.PARAGRAPH,fc.HEADING],attributes:{[mc.MARGIN]:{isRequired:!1,parseHTML(t){const{margin:e,marginTop:n,marginRight:r,marginBottom:o,marginLeft:i}=t.style;if(![e,n,r,o,i].some((t=>!!t)))return null;if(e)return{value:e};return{value:[n||0,r||0,o||0,i||0].join(" ")}},renderHTML:t=>t.margin?rh({margin:t.margin.value}):null}}}]});function dp(t){const e=e=>t.presetsRef.value.find((t=>t.id===e)),n=Me({default:null,link:null});return function(t,e,n){"production"===process.env.NODE_ENV||ot(e)||tn("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),In(t,e,n)}(t.presetsRef,(()=>{n.default=e(t.defaultPresetId),n.link=e(t.linkPresetId)}),{immediate:!0,deep:!0}),[Hh,Vh,qh,Bl,cc,$h,Ph,zh,Uh].concat([Jh.configure({presets:t.presetsRef,defaultId:t.defaultPresetId,styleRenderer:new xp({baseClass:t.basePresetClass,makeVariable:t.makePresetVariable,linkPresetId:t.linkPresetId})}),lp.configure({baseClass:t.baseListClass,presetClass:t.basePresetClass+t.defaultPresetId}),Zh.configure({device:t.deviceRef}),Yh.configure({minSize:t.minFontSize,maxSize:t.maxFontSize,wrapperRef:t.wrapperRef}),Kh.configure({fonts:t.fonts,defaultPreset:Ye(n,"default")}),Gh,Xh,Qh,tp,ep,np,pp,op,sp.configure({wrapperRef:t.wrapperRef}),hp.configure({preset:Ye(n,"link"),basePresetClass:t.basePresetClass,pageBlocks:t.pageBlocksRef}),fp])}class mp{_domParser=new DOMParser;types=window;parse(t){return this._domParser.parseFromString(t,"text/html")}}class gp{content;constructor({content:t}){this.content=t}normalize(){throw new Error("Implement abstract method")}}class yp extends gp{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=yp.BLOCK_NODE_NAMES.concat("UL","OL");static BLOCK_STYLES=["text-align","line-height","margin","margin-top","margin-bottom","margin-left","margin-right"];_parser;constructor({content:t,parser:e}){super({content:t}),this._parser=e,this.dom=null}normalize(){return this.normalizeHTML(),this.normalizedHTML}normalizeHTML(){this.dom=this._parser.parse(this.content.replace(/(\r)?\n/g,"")),this._removeComments(),this._normalizeRootTags(),this._iterateNodes(this._normalizeBreakLines,(t=>"BR"===t.tagName)),this._iterateNodes(this._removeEmptyNodes,this._isBlockNode),this._iterateNodes(this._normalizeListItems,(t=>"LI"===t.tagName)),this._normalizeBlockTextDecoration(),this._normalizeBlockBackgroundColor()}get normalizedHTML(){return this.dom.body.innerHTML}get _NodeFilter(){return this._parser.types.NodeFilter}get _Node(){return this._parser.types.Node}_removeComments(){const t=this._createNodeIterator(this._NodeFilter.SHOW_COMMENT);this._runIterator(t,(t=>t.remove()))}_normalizeRootTags(){const t=Array.from(this.dom.body.childNodes),e=this.dom.createDocumentFragment();let n;for(const r of t)this._isRootNode(r)?(e.append(r),n=null):(n||(n=this.dom.createElement("p"),e.append(n)),n.append(r));this.dom.body.innerHTML="",this.dom.body.append(e)}_createNodeIterator(t,e){return this.dom.createNodeIterator(this.dom.body,t,e)}_iterateNodes(t,e=(()=>!0)){const n=t=>"BODY"!==t.tagName&&e.call(this,t),r=this._createNodeIterator(this._NodeFilter.SHOW_ELEMENT,{acceptNode:t=>n(t)?this._NodeFilter.FILTER_ACCEPT:this._NodeFilter.FILTER_REJECT});this._runIterator(r,t)}_runIterator(t,e){let n=t.nextNode();for(;n;)e.call(this,n),n=t.nextNode()}_removeEmptyNodes(t){t.innerHTML.trim()||t.remove()}_normalizeListItems(t){const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes);let r,o;const i=n=>{this._assignElementProperties(n,t,yp.BLOCK_STYLES),e.append(n)};this._assignElementProperties(t,t.parentElement,yp.BLOCK_STYLES);for(const t of n)if(this._isBlockNode(t))i(t),r=null,o=t;else if("BR"===t.tagName&&o&&"BR"!==o?.tagName)t.remove(),o=t;else if("BR"!==t.tagName)r||(r=this.dom.createElement("p"),i(r)),r.append(t),o=t;else{const e=this.dom.createElement("p");e.append(t),i(e),r=null,o=t}t.append(e),this._removeStyleProperties(t,yp.BLOCK_STYLES),this._removeStyleProperties(t.parentElement,yp.BLOCK_STYLES),this._assignElementProperties(t,t.parentElement),t.parentElement.lastElementChild===t&&this._removeStyleProperties(t.parentElement)}_isBlockNode(t){return yp.BLOCK_NODE_NAMES.includes(t.tagName)}_isRootNode(t){return yp.ROOT_NODE_NAMES.includes(t.tagName)}_assignElementProperties(t,e,n=Array.from(e.style)){for(const r of n){const n=e.style.getPropertyValue(r);n&&!t.style.getPropertyValue(r)&&t.style.setProperty(r,n)}}_removeStyleProperties(t,e=Array.from(t.style)){for(const n of e)t.style.removeProperty(n);0===t.style.length&&t.removeAttribute("style")}_normalizeBreakLines({parentElement:t}){if(!this._isBlockNode(t))return;if(!t.textContent)return;const e=this.dom.createDocumentFragment(),n=Array.from(t.childNodes),r=t.cloneNode(!0);r.innerHTML="";let o=r.cloneNode();const i=n=>{this._assignElementProperties(n,t,yp.BLOCK_STYLES),e.append(n)};for(const t of n)"BR"!==t.tagName?o.append(t):(i(o),o=r.cloneNode());e.append(o),t.replaceWith(e)}_normalizeBlockTextDecoration(){const t=this.dom.querySelectorAll('[style*="text-decoration"]:where(p, h1, h2, h3, h4, li)');for(const e of t)this._moveTextDecorationToChildren(e)}_moveTextDecorationToChildren(t){const e=this._parseTextDecoration(t);if(t.style.removeProperty("text-decoration-line"),t.style.removeProperty("text-decoration"),t.style.cssText||t.removeAttribute("style"),!e.none)for(const n of t.childNodes){const r=this._wrapTextNode(t,n),o=this._parseTextDecoration(r),i={underline:o.underline||e.underline,line_through:o.line_through||e.line_through};r.style.removeProperty("text-decoration-line"),r.style.removeProperty("text-decoration"),r.style.textDecoration=Object.entries(i).filter((([,t])=>t)).map((([t])=>t.replace("_","-"))).join(" ")}}_parseTextDecoration(t){const{textDecoration:e,textDecorationLine:n}=t.style,r=e||n||"";return{none:r.includes("none"),underline:r.includes("underline"),line_through:r.includes("line-through")}}_normalizeBlockBackgroundColor(){const t=this.dom.querySelectorAll('[style*="background-color"]:where(p, h1, h2, h3, h4, li)');for(const e of t)this._moveBackgroundColorToChildren(e)}_moveBackgroundColorToChildren(t){const e=t.style.backgroundColor;t.style.removeProperty("background-color"),t.style.cssText||t.removeAttribute("style");for(const n of t.childNodes){const r=this._wrapTextNode(t,n),o=r.style.backgroundColor||e;r.style.backgroundColor=o}}_wrapTextNode(t,e){if(e.nodeType!==this._Node.TEXT_NODE)return e;const n=this.dom.createElement("span");return n.append(e.cloneNode()),t.replaceChild(n,e),n}}class vp extends gp{normalize(){return this._iterateNodes(this._bubbleMarks),this.content}_iterateNodes(t){this._iterateChildNodes(this.content,t)}_iterateChildNodes(t,e){for(const n of t.content)n.content&&this._iterateChildNodes(n,e),e.call(this,n)}_bubbleMarks(t){if(t.content&&t.type!==fc.LIST)for(const e of t.content)if(!this._isLink(e)&&e.marks)for(const n of e.marks.slice())this._includesMark(t,n)?this._removeMark(e,n):this._canBubbleMark(t,n)&&(this._removeMark(e,n),this._addMark(t,n))}_canBubbleMark(t,e){if(mc.inlineMarks.includes(e.type))return!1;if(this._includesMarkType(t,e.type))return!1;for(const n of t.content)if(n.content||t.type!==fc.LIST_ITEM){if(!n.marks)return!1;if(!this._includesMark(n,e))return!1}return!0}_includesMark(t,e){return t.marks?.some((t=>Dh.isEqual(t,e)))??!1}_includesMarkType(t,e){return t.marks?.some((t=>t.type===e))??!1}_isLink(t){return t.type===fc.TEXT&&this._includesMarkType(t,mc.LINK)}_removeMark(t,e){if(!t.marks)return;const n=this._findMarkIndexByType(t,e.type);n>=0&&t.marks.splice(n,1),t.marks.length||delete t.marks}_addMark(t,e){this._removeMark(t,e),t.marks??=[],t.marks.push(e)}_findMarkIndexByType(t,e){return t.marks?.findIndex((t=>t.type===e))??null}}class bp{static build(t,e={}){return"string"==typeof t?this._buildHtml(t,e):this._buildJson(t)}static _buildHtml(t,e){return new yp({content:t,parser:e.parser||new mp})}static _buildJson(t){return new vp({content:t})}static normalize(t,e={}){return bp.build(t,e).normalize()}}class _p{static window=globalThis.window;static use(t){this.window=t}static get document(){return this.window.document}static get body(){return this.document.body}static get head(){return this.document.head}static getComputedStyle(t){return this.window.getComputedStyle(t)}}class wp{static build({config:t,nodeDomParser:e}){const n=function(t,e){return el(hl.resolve(t),e)}(dp({fonts:t.fonts,minFontSize:0,maxFontSize:0,presetsRef:We(t.presets),defaultPresetId:t.defaultPresetId,linkPresetId:t.linkPresetId,makePresetVariable:()=>"",basePresetClass:t.basePresetClass,baseListClass:t.baseListClass,deviceRef:We(uc.DESKTOP),pageBlocksRef:We([]),wrapperRef:_p.document.createElement("p")}));return new wp({schema:n,domParser:fo.fromSchema(n),nodeDomParser:e})}_schema;_domParser;_nodeDomParser;constructor({schema:t,domParser:e,nodeDomParser:n}){this._schema=t,this._domParser=e,this._nodeDomParser=n}toJSON(t){const e=bp.build(t,{parser:this._nodeDomParser});return e.normalizeHTML(),this._domParser.parse(e.dom.body).toJSON()}}class kp{static doc(t){return{type:fc.DOCUMENT,content:t}}static list(t,e){return{type:fc.LIST,attrs:{bullet:{type:t}},content:e.map((t=>t.type===fc.LIST_ITEM?t:this.listItem([].concat(t))))}}static listItem(...t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{type:fc.LIST_ITEM,...e?{attrs:e}:{},...r?{marks:r}:{},content:[].concat(n).map((t=>"string"==typeof t?this.paragraph(t):t))}}static heading(t,...e){const n=this._textBlock(e,this.text);return n.attrs??={},n.attrs.level=t,{type:fc.HEADING,...n}}static paragraph(...t){return{type:fc.PARAGRAPH,...this._textBlock(t,this.text)}}static _textBlock(t){const{attrs:e,content:n,marks:r}=this._normalizeTextBlockArgs(t);return{content:"string"==typeof n?[this.text(n)]:n,...e?{attrs:e}:{},...r?{marks:r}:{}}}static _normalizeTextBlockArgs(t){return 1===t.length?{attrs:null,marks:null,content:t[0]}:2===t.length?{attrs:t[0],marks:null,content:t[1]}:{attrs:t[0],marks:t[1],content:t[2]}}static text(t,e){return{type:fc.TEXT,...e?{marks:e}:{},text:t}}static link(t,e,n=[]){return this.text(t,[this.mark(mc.LINK,e),...n])}static mark(t,e){return{type:t,attrs:e}}static populateAllDevices(t){return{mobile:t,tablet:t,desktop:t}}}class xp{_baseClass;_makeVariable;_linkPresetId;constructor({baseClass:t,makeVariable:e,linkPresetId:n}){this._baseClass=t,this._makeVariable=e,this._linkPresetId=n}inject(t,e){let n=t.querySelector("[data-zw-styles]");n||(n=_p.document.createElement("style"),n.dataset.zwStyles="",n.innerHTML=this.render(e),t.append(n))}render(t){let e="";for(const n of t){const t=n.id===this._linkPresetId;e+=` ${this.makePresetCssClass(n)} {`;for(const r of uc.values)for(const o of Object.keys(n[r])){const i=this._makeVariable({device:r,preset:n,property:o}),s=this._makeInternalVariableName(o,r);if(e+=`${s}: var(${i}, inherit);`,t&&!mc.attributes.includes(o)){e+=`${s.replace("preset-","")}: var(${s});`}}e+="}"}return e}_makeInternalVariableName(t,e){return`--zw-preset-${"color"===t?"font-color":t.replace(/_/i,"-")}${e===uc.COMMON?"":`-${e}`}`}makePresetHtmlClass(t){return this._baseClass+t.id}makePresetCssClass(t){return this.makePresetHtmlClass(t).split(" ").map((t=>`.${t}`)).join("")}}class Sp{static _instance;static get instance(){return this._instance??=new Sp,this._instance}static query(t,e){return this.instance.query(t,e)}query(t,e){let n=null;return t.descendants((t=>!n&&(this.matchNode(t,e)?(n=t,!1):void 0))),n?e.getMark?this.getMark(n,e.getMark):n:null}matchNode(t,e){return(!e.typeName||e.typeName===t.type.name)&&!(e.mark&&!this.getMark(t,e.mark))}getMark(t,e){return t.marks.find((t=>this.matchMark(t,e)))||null}matchMark(t,e){return t.type.name===e.typeName}}class Ep{static createWindow(){return(new i.JSDOM).window}types;parse(t){const{window:e}=new i.JSDOM(t);return this.types=e,e.document}}class Cp{name;description;argument;options=[];doCommand(){throw new Error('Command "doCommand" is required')}install(t){if(!this.name)throw new Error('Command "name" is required');let e=t.command(this.name);if(this.description&&(e=e.description(this.description)),this.argument&&(e=e.argument(this.argument)),this.options.length)for(const t of this.options)e=e.option(t.flags,t.description,t.default);e.action(this.doCommand.bind(this))}output(t){console.log(t)}}const Op=new W,Ap=[class extends Cp{name="to-json";description="migrate html to json";argument="<html...>";options=[{flags:"-c, --config <path>",description:"Generator config",default:n.resolve(__dirname,"../bin/zp.config.json")},{flags:"-f, --format <type>",description:"Set output format",default:"rb"}];doCommand(t,{config:e,format:r}){_p.use(Ep.createWindow());const o=n.resolve(process.cwd(),e),i=wp.build({config:require(o).editor,nodeDomParser:new Ep}),s=t.map((t=>i.toJSON(this._formatInputHtml(t)))),a=1===s.length?s[0]:s,l=this._stringifyContent(a);this.output("rb"===r?this._formatOutputRb(l):l)}_formatInputHtml(t){return t.replace(/\\(["'])/g,"$1").replace(/rgba\(\d{1,3}, ?\d{1,3}, ?\d{1,3}, (\d{1,2}%)\)/g,((t,e)=>t.replace(e,parseFloat(e)/100)))}_stringifyContent(t){return JSON.stringify(t,((t,e)=>null===e?void 0:e),2)}_formatOutputRb(t){return t.replace(/\\"/g,'"').replace(/font-family: ?'(.+)'/g,'font-family: "$1"').replace(/'/g,"\\'").replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm,(t=>t.replace(/"/g,""))).replace(/: "(.+)"([,\n])/g,": '$1'$2")}},class extends Cp{name="version";description="display cli version";doCommand(){this.output("4.0.5")}}];for(const t of Ap)(new t).install(Op);Op.parse();
package/dist/wysiwyg.mjs CHANGED
@@ -27660,7 +27660,7 @@ function useEditor({ content, onChange, extensions: extensions2, isReadonlyRef }
27660
27660
  editor.commands.setContent(content2, false);
27661
27661
  }
27662
27662
  });
27663
- watch(isReadonlyRef, (isReadonly) => editor.setEditable(!isReadonly));
27663
+ watch(isReadonlyRef, (isReadonly) => editor.setEditable(!isReadonly, false));
27664
27664
  return { editor, getContent };
27665
27665
  }
27666
27666
  function useToolbar({ wrapperRef, offsets, isActiveRef, placementRef }) {
@@ -1,4 +1,4 @@
1
- import { h, ref, toRef } from 'vue';
1
+ import { h, toRef } from 'vue';
2
2
  import { EditorContent } from '@tiptap/vue-3';
3
3
  import { shallowMount } from '@vue/test-utils';
4
4
  import { buildTestExtensions } from '../../__tests__/utils';
@@ -14,11 +14,11 @@ const TestComponent = {
14
14
  });
15
15
  },
16
16
 
17
- props: ['value'],
17
+ props: ['value', 'readonly'],
18
18
 
19
19
  setup(props, { emit }) {
20
20
  const { editor } = useEditor({
21
- isReadonlyRef: ref(false),
21
+ isReadonlyRef: toRef(props, 'readonly'),
22
22
  content: toRef(props, 'value'),
23
23
  extensions: buildTestExtensions(),
24
24
  onChange: (content) => emit('input', content),
@@ -33,9 +33,12 @@ const createContent = (text = 'test') => NodeFactory.doc([
33
33
  NodeFactory.paragraph(text)
34
34
  ]);
35
35
 
36
- function createComponent({ content } = {}) {
36
+ function createComponent({ content, isReadonly } = {}) {
37
37
  const wrapper = shallowMount(TestComponent, {
38
- props: { value: content || createContent('test') }
38
+ props: {
39
+ value: content || createContent('test'),
40
+ readonly: isReadonly ?? false
41
+ }
39
42
  });
40
43
 
41
44
  return {
@@ -75,3 +78,21 @@ describe('life cycle', () => {
75
78
  expect(editor.getHTML()).toBe('<p class="zw-style">new</p>');
76
79
  });
77
80
  });
81
+
82
+ describe('readonly', () => {
83
+ test('should change readonly', async () => {
84
+ const { wrapper, editor } = createComponent({ isReadonly: false });
85
+
86
+ await wrapper.setProps({ readonly: true });
87
+
88
+ expect(editor.isEditable).toBe(false);
89
+ });
90
+
91
+ test('should not emit change on readonly update', async () => {
92
+ const { wrapper, editor } = createComponent({ isReadonly: false });
93
+
94
+ await wrapper.setProps({ readonly: true });
95
+
96
+ expect(wrapper.emitted('input')).toBeFalsy();
97
+ });
98
+ });
@@ -26,7 +26,7 @@ export function useEditor({ content, onChange, extensions, isReadonlyRef }) {
26
26
  }
27
27
  });
28
28
 
29
- watch(isReadonlyRef, (isReadonly) => editor.setEditable(!isReadonly));
29
+ watch(isReadonlyRef, (isReadonly) => editor.setEditable(!isReadonly, false));
30
30
 
31
31
  return { editor, getContent };
32
32
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipify/wysiwyg",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "description": "Zipify modification of TipTap text editor",
5
5
  "main": "dist/wysiwyg.mjs",
6
6
  "bin": {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "scripts": {
20
20
  "lib:build": "vite build --config config/build/lib.config.js",
21
- "lib:release": "export $(cat ./.env | xargs) && release-it",
21
+ "lib:release": "[ -f .env ] && export $(cat .env | xargs) && release-it",
22
22
  "cli:build": "NODE_ENV=production rollup --config config/build/cli.config.js --bundleConfigAsCjs",
23
23
  "cli:dev": "NODE_ENV=development rollup --config config/build/cli.config.js --bundleConfigAsCjs --watch",
24
24
  "example:start": "NODE_ENV=development vite serve --config config/build/example.config.js",