diff --git a/themes/grav/app/forms/form.js b/themes/grav/app/forms/form.js index caf9a1f1..15c3a5d9 100644 --- a/themes/grav/app/forms/form.js +++ b/themes/grav/app/forms/form.js @@ -55,7 +55,7 @@ export default class Form { let parent = toggle.closest('.form-field'); let label = parent.find('label.toggleable'); let fields = parent.find('.form-data'); - let inputs = fields.find('input, select, textarea'); + let inputs = fields.find('input, select, textarea, button'); label.add(fields).css('opacity', enabled ? '' : 0.7); inputs.map((index, input) => { diff --git a/themes/grav/js/admin.min.js b/themes/grav/js/admin.min.js index c3d3f60f..b5bc0363 100644 --- a/themes/grav/js/admin.min.js +++ b/themes/grav/js/admin.min.js @@ -8,7 +8,7 @@ var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."), }function p(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function m(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&"),r=e.match(new RegExp(".*?\\)"+n+'"'));return r?t.tokenize=null:e.skipToEnd(),"string"}function v(t,n){function r(e){if(e)for(var t in e)e.hasOwnProperty(t)&&i.push(t)}"string"==typeof t&&(t=[t]);var i=[];r(n.keywords),r(n.types),r(n.builtin),r(n.atoms),i.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],i));for(var o=0;o!?|\/]/,z=c.endStatement||/^[;:,]$/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-m,0,"top",!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var s=t.context;if(e.sol()&&(null==s.align&&(s.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;h=p=null;var u=(t.tokenize||l)(e,t);if("comment"==u||"meta"==u)return u;if(null==s.align&&(s.align=!0),z.test(h))for(;n(t.context.type);)i(t);else if("{"==h)r(t,e.column(),"}");else if("["==h)r(t,e.column(),"]");else if("("==h)r(t,e.column(),")");else if("}"==h){for(;n(s.type);)s=i(t);for("}"==s.type&&(s=i(t));n(s.type);)s=i(t)}else if(h==s.type)i(t);else if(E&&(("}"==s.type||"top"==s.type)&&";"!=h||n(s.type)&&"newstatement"==h)){var f="statement";"newstatement"==h&&M&&"switch"==e.current()?f="switchstatement":"keyword"==u&&"namespace"==e.current()&&(f="namespace"),r(t,e.column(),f)}if("variable"==u&&("def"==t.prevToken||c.typeFirstDefinitions&&o(e,t)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(u="def"),S.token){var d=S.token(e,t,u);void 0!==d&&(u=d)}return"def"==u&&c.styleDefs===!1&&(u="variable"),t.startOfLine=!1,t.prevToken=p?"def":u||h,u},indent:function(t,r){if(t.tokenize!=l&&null!=t.tokenize)return e.Pass;var i=t.context,o=r&&r.charAt(0);if(n(i.type)&&"}"==o&&(i=i.prev),S.indent){var a=S.indent(t,i,r);if("number"==typeof a)return a}var s=o==i.type,u=i.prev&&"switchstatement"==i.prev.type;if(c.allmanIndentation&&/[{(]/.test(o)){for(;"top"!=i.type&&"}"!=i.type;)i=i.prev;return i.indented}return n(i.type)?i.indented+("{"==o?0:v):!i.align||g&&")"==i.type?")"!=i.type||s?i.indented+(s?0:m)+(s||!u||/^(?:case|default)\b/.test(r)?0:m):i.indented+v:i.column+(s?0:1)},electricInput:M?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var b="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",k="int long char short double float unsigned signed void size_t ptrdiff_t";v(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:s(b),types:s(k+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:s("case do else for if switch while struct"),defKeywords:s("struct"),typeFirstDefinitions:!0,atoms:s("null true false"),hooks:{"#":c,"*":l},modeProps:{fold:["brace","include"]}}),v(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:s(b+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:s(k+" bool wchar_t"),blockKeywords:s("catch class do else finally for if struct switch try while"),defKeywords:s("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:s("true false null"),hooks:{"#":c,"*":l,u:d,U:d,L:d,R:d,0:f,1:f,2:f,3:f,4:f,5:f,6:f,7:f,8:f,9:f,token:function(e,t,n){return"variable"!=n||"("!=e.peek()||";"!=t.prevToken&&null!=t.prevToken&&"}"!=t.prevToken||!h(e.current())?void 0:"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),v("text/x-java",{name:"clike",keywords:s("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while"),types:s("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:s("catch class do else finally for if switch try while"),defKeywords:s("class interface package enum"),typeFirstDefinitions:!0,atoms:s("true false null"),endStatement:/^[;:]$/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"}},modeProps:{fold:["brace","import"]}}),v("text/x-csharp",{name:"clike",keywords:s("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:s("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:s("catch class do else finally for foreach if struct switch try while"),defKeywords:s("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:s("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=p,p(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),v("text/x-scala",{name:"clike",keywords:s("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ : = => <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble :: #:: "),types:s("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:s("catch class do else finally for forSome if match switch try while"),defKeywords:s("class def object package trait type val var"),atoms:s("true false null"),indentStatements:!1,indentSwitch:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return e.match('""')?(t.tokenize=g,t.tokenize(e,t)):!1},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return"}"==r.type&&r.align&&e.eat(">")?(n.context=new t(r.indented,r.column,r.type,null,r.prev),"operator"):!1}},modeProps:{closeBrackets:{triples:'"'}}}),v("text/x-kotlin",{name:"clike",keywords:s("package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix"),types:s("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,blockKeywords:s("catch class do else finally for if where try while enum"),defKeywords:s("class val var object package interface fun"),atoms:s("true false null this"),hooks:{'"':function(e,t){return t.tokenize=_(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),v(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:s("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:s("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:s("for while do if else struct"),builtin:s("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:s("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":c},modeProps:{fold:["brace","include"]}}),v("text/x-nesc",{name:"clike",keywords:s(b+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:s(k),blockKeywords:s("case do else for if switch while struct"),atoms:s("null true false"),hooks:{"#":c},modeProps:{fold:["brace","include"]}}),v("text/x-objectivec",{name:"clike",keywords:s(b+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:s(k),atoms:s("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":c,indent:function(e,t,n){return"statement"==t.type&&/^@\w/.test(n)?t.indented:void 0}},modeProps:{fold:"brace"}}),v("text/x-squirrel",{name:"clike",keywords:s("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:s(k),blockKeywords:s("case catch class else for foreach if switch try while"),defKeywords:s("function local class"),typeFirstDefinitions:!0,atoms:s("true false null"),hooks:{"#":c},modeProps:{fold:["brace","include"]}});var x=null;v("text/x-ceylon",{name:"clike",keywords:s("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:s("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:s("class dynamic function interface module object package value"),builtin:s("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:s("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=y(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return x&&e.match("`")?(t.tokenize=x,x=null,t.tokenize(e,t)):!1},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){return"variable"!=n&&"variable-3"!=n||"."!=t.prevToken?void 0:"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})},function(e,t,n){!function(e){e(n(333))}(function(e){"use strict";e.defineMode("sass",function(e){function t(e){return new RegExp("^"+e.join("|"))}function n(e,t){var n=e.peek();return")"===n?(e.next(),t.tokenizer=u,"operator"):"("===n?(e.next(),e.eatSpace(),"operator"):"'"===n||'"'===n?(t.tokenizer=i(e.next()),"string"):(t.tokenizer=i(")",!1),"string")}function r(e,t){return function(n,r){return n.sol()&&n.indentation()<=e?(r.tokenizer=u,u(n,r)):(t&&n.skipTo("*/")?(n.next(),n.next(),r.tokenizer=u):n.skipToEnd(),"comment")}}function i(e,t){function n(r,i){var a=r.next(),s=r.peek(),c=r.string.charAt(r.pos-2),l="\\"!==a&&s===e||a===e&&"\\"!==c;return l?(a!==e&&t&&r.next(),i.tokenizer=u,"string"):"#"===a&&"{"===s?(i.tokenizer=o(n),r.next(),"operator"):"string"}return null==t&&(t=!0),n}function o(e){return function(t,n){return"}"===t.peek()?(t.next(),n.tokenizer=e,"operator"):u(t,n)}}function a(t){if(0==t.indentCount){t.indentCount++;var n=t.scopes[0].offset,r=n+e.indentUnit;t.scopes.unshift({offset:r})}}function s(e){1!=e.scopes.length&&e.scopes.shift()}function u(e,t){var c=e.peek();if(e.match("/*"))return t.tokenizer=r(e.indentation(),!0),t.tokenizer(e,t);if(e.match("//"))return t.tokenizer=r(e.indentation(),!1),t.tokenizer(e,t);if(e.match("#{"))return t.tokenizer=o(u),"operator";if('"'===c||"'"===c)return e.next(),t.tokenizer=i(c),"string";if(t.cursorHalf){if("#"===c&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return e.peek()||(t.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return e.peek()||(t.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return e.peek()||(t.cursorHalf=0),"unit";if(e.match(f))return e.peek()||(t.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=n,e.peek()||(t.cursorHalf=0),"atom";if("$"===c)return e.next(),e.eatWhile(/[\w-]/),e.peek()||(t.cursorHalf=0),"variable-3";if("!"===c)return e.next(),e.peek()||(t.cursorHalf=0),e.match(/^[\w]+/)?"keyword":"operator";if(e.match(h))return e.peek()||(t.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return e.peek()||(t.cursorHalf=0),"attribute";if(!e.peek())return t.cursorHalf=0,null}else{if("."===c){if(e.next(),e.match(/^[\w-]+/))return a(t),"atom";if("#"===e.peek())return a(t),"atom"}if("#"===c){if(e.next(),e.match(/^[\w-]+/))return a(t),"atom";if("#"===e.peek())return a(t),"atom"}if("$"===c)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(f))return"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=n,"atom";if("="===c&&e.match(/^=[\w-]+/))return a(t),"meta";if("+"===c&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===c&&e.match(/@extend/)&&(e.match(/\s*[\w]/)||s(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return a(t),"meta";if("@"===c)return e.next(),e.eatWhile(/[\w-]/),"meta";if(e.eatWhile(/[\w-]/))return e.match(/ *: *[\w-\+\$#!\("']/,!1)?"property":e.match(/ *:/,!1)?(a(t),t.cursorHalf=1,"atom"):e.match(/ *,/,!1)?"atom":(a(t),"atom");if(":"===c)return e.match(p)?"keyword":(e.next(),t.cursorHalf=1,"operator")}return e.match(h)?"operator":(e.next(),null)}function c(t,n){t.sol()&&(n.indentCount=0);var r=n.tokenizer(t,n),i=t.current();if("@return"!==i&&"}"!==i||s(n),null!==r){for(var o=t.pos-i.length,a=o+e.indentUnit*n.indentCount,u=[],c=0;c","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],h=t(d),p=/^::?[a-zA-Z_][\w\-]*/;return{startState:function(){return{tokenizer:u,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var n=c(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e){return e.scopes[0].offset}}}),e.defineMIME("text/x-sass","sass")})},function(e,t,n){!function(e){e(n(333),n(382))}(function(e){"use strict";e.defineMode("twig:inner",function(){function e(e,a){var s=e.peek();if(a.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,e.match(i))return"atom";if(e.match(o))return"number"}if(a.sign){if(a.sign=!1,e.match(i))return"atom";if(e.match(o))return"number"}if(a.instring)return s==a.instring&&(a.instring=!1),e.next(),"string";if("'"==s||'"'==s)return a.instring=s,e.next(),"string";if(e.match(a.intag+"}")||e.eat("-")&&e.match(a.intag+"}"))return a.intag=!1,"tag";if(e.match(n))return a.operator=!0,"operator";if(e.match(r))a.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(t))return"keyword";if(e.match(i))return"atom";if(e.match(o))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(s=e.eat("#"))return a.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),a.incomment=!1):e.skipToEnd(),"comment";if(s=e.eat(/\{|%/))return a.intag=s,"{"==s&&(a.intag="}"),e.eat("-"),"tag"}e.next()}var t=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],n=/^[+\-*&%=<>!?|~^]/,r=/^[:\[\(\{]/,i=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],o=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return t=new RegExp("(("+t.join(")|(")+"))\\b"),i=new RegExp("(("+i.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(t,n){return e(t,n)}}}),e.defineMode("twig",function(t,n){var r=e.getMode(t,"twig:inner");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:r,parseDelimiters:!0}):r}),e.defineMIME("text/x-twig","twig")})},function(e,t,n){!function(e){e(n(333))}(function(e){"use strict";e.multiplexingMode=function(t){function n(e,t,n,r){if("string"==typeof t){var i=e.indexOf(t,n);return r&&i>-1?i+t.length:i}var o=t.exec(n?e.slice(n):e);return o?o.index+n+(r?o[0].length:0):-1}var r=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(i,o){if(o.innerActive){var a=o.innerActive,s=i.string;if(!a.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);var u=a.close?n(s,a.close,i.pos,a.parseDelimiters):-1;if(u==i.pos&&!a.parseDelimiters)return i.match(a.close),o.innerActive=o.inner=null,a.delimStyle&&a.delimStyle+" "+a.delimStyle+"-close";u>-1&&(i.string=s.slice(0,u));var c=a.mode.token(i,o.inner);return u>-1&&(i.string=s),u==i.pos&&a.parseDelimiters&&(o.innerActive=o.inner=null),a.innerStyle&&(c=c?c+" "+a.innerStyle:a.innerStyle),c}for(var l=1/0,s=i.string,f=0;fu&&(l=u)}l!=1/0&&(i.string=s.slice(0,l));var h=t.token(i,o.outer);return l!=1/0&&(i.string=s),h},indent:function(n,r){var i=n.innerActive?n.innerActive.mode:t;return i.indent?i.indent(n.innerActive?n.inner:n.outer,r):e.Pass},blankLine:function(n){var i=n.innerActive?n.innerActive.mode:t;if(i.blankLine&&i.blankLine(n.innerActive?n.inner:n.outer),n.innerActive)"\n"===n.innerActive.close&&(n.innerActive=n.inner=null);else for(var o=0;on.keyCol)return e.skipToEnd(),"string";if(n.literal&&(n.literal=!1),e.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return e.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,e.next(),"meta";if(n.pairStart){if(e.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(t))return"keyword"}return!n.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=e.indentation(),"atom"):n.pair&&e.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,e.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),e.defineMIME("text/x-yaml","yaml")})},function(e,t,n){!function(e){e(n(333))}(function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(i){if(i.getOption("disableInput"))return e.Pass;for(var o=i.listSelections(),a=[],s=0;s")>=0?h[2]:parseInt(h[3],10)+1+h[4];a[s]="\n"+p+v+m}}i.replaceSelections(a)}})},function(e,t,n){!function(e){e(n(333))}(function(e){"use strict";function t(e){for(var t=0;t1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function m(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){h(e)},t.options.delay||500))}function v(e,t){for(var n=t.target||t.srcElement,r=document.createDocumentFragment(),o=0;o=0&&y.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function c(e,t){var n,r,i;if(t.singleton){var o=_++;n=g||(g=s(t)),r=l.bind(null,n,o,!1),i=l.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=d.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function l(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var h={},p=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=p(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,_=0,y=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],a=0;a0){var l=o.character;u.forEach(function(e){l>e&&(l-=1)}),o.character=l}}var f=o.character-1,d=f+1;o.evidence&&(s=o.evidence.substring(f).search(/.\b/),s>-1&&(d+=s)),o.description=o.reason,o.start=o.character,o.end=d,o=n(o),o&&r.push({message:o.description,severity:o.severity,from:e.Pos(o.line-1,f),to:e.Pos(o.line-1,d)})}}}var a=["Dangerous comment"],s=[["Expected '{'","Statement body should be inside '{ }' braces."]],u=["Missing semicolon","Extra comma","Missing property name","Unmatched "," and instead saw"," is not defined","Unclosed string","Stopping, unable to continue"];e.registerHelper("lint","javascript",t)})},function(e,t,n){!function(e){e(n(333))}(function(e){"use strict";e.registerHelper("lint","json",function(t){var n=[];jsonlint.parseError=function(t,r){var i=r.loc;n.push({from:e.Pos(i.first_line-1,i.first_column),to:e.Pos(i.last_line-1,i.last_column),message:t})};try{jsonlint.parse(t)}catch(r){}return n})})},function(e,t,n){!function(e){e(n(333))}(function(e){"use strict";e.registerHelper("lint","yaml",function(t){var n=[];try{jsyaml.load(t)}catch(r){var i=r.mark;n.push({from:e.Pos(i.line,i.column),to:e.Pos(i.line,i.column),message:r.message})}return n})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=n(1),o=r(i);(0,o["default"])('[name="task"][value="saveas"], [name="task"][value="switchlanguage"]').on("mousedown touchstart",function(e){var t=["lang","redirect"],n=(0,o["default"])(e.currentTarget),r=(0,o["default"])("#"+n.attr("form"));return r.length?(t.forEach(function(e){var t=n.attr(e);if(t){var i=r.find('[name="data['+e+']"]');i.length||(i=(0,o["default"])(''),r.append(i)),i.val(t)}}),!0):void 0})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(397),o=r(i),a=n(403),s=r(a),u=n(404),c=r(u);t["default"]={Form:{Form:s["default"],Instance:a.Instance},Fields:c["default"],FormState:{FormState:o["default"],Instance:i.Instance}}},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.DOMBehaviors=t.Instance=void 0;var o=function(){function e(e,t){for(var n=0;ni;i++)r[i]=e[i+t];return r}function p(e){return void 0===e.size&&(e.size=e.__iterate(v)),e.size}function m(e,t){if("number"!=typeof t){var n=t>>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return 0>t?p(e)+t:t}function v(){return!0}function g(e,t,n){return(0===e||void 0!==n&&-n>=e)&&(void 0===t||void 0!==n&&t>=n)}function _(e,t){return b(e,t,0)}function y(e,t){return b(e,t,t)}function b(e,t,n){return void 0===e?n:0>e?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function k(e){this.next=e}function x(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function w(){return{value:void 0,done:!0}}function S(e){return!!M(e)}function A(e){return e&&"function"==typeof e.next}function E(e){var t=M(e);return t&&t.call(e)}function M(e){var t=e&&(wn&&e[wn]||e[Sn]);return"function"==typeof t?t:void 0}function I(e){return e&&"number"==typeof e.length}function O(e){return null===e||void 0===e?N():o(e)?e.toSeq():U(e)}function C(e){return null===e||void 0===e?N().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():F(e)}function P(e){return null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():R(e)}function j(e){return(null===e||void 0===e?N():o(e)?a(e)?e.entrySeq():e:R(e)).toSetSeq()}function z(e){this._array=e,this.size=e.length}function T(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function D(e){this._iterable=e,this.size=e.length||e.size}function L(e){this._iterator=e,this._iteratorCache=[]}function q(e){return!(!e||!e[En])}function N(){return Mn||(Mn=new z([]))}function F(e){var t=Array.isArray(e)?new z(e).fromEntrySeq():A(e)?new L(e).fromEntrySeq():S(e)?new D(e).fromEntrySeq():"object"==typeof e?new T(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function R(e){var t=B(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function U(e){var t=B(e)||"object"==typeof e&&new T(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function B(e){return I(e)?new z(e):A(e)?new L(e):S(e)?new D(e):void 0}function V(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;o>=a;a++){var s=i[n?o-a:a];if(t(s[1],r?s[0]:a,e)===!1)return a+1}return a}return e.__iterateUncached(t,n)}function H(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new k(function(){var e=i[n?o-a:a];return a++>o?w():x(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function W(e,t){return t?K(t,e,"",{"":e}):G(e)}function K(e,t,n,r){return Array.isArray(t)?e.call(r,n,P(t).map(function(n,r){return K(e,n,r,t)})):$(t)?e.call(r,n,C(t).map(function(n,r){return K(e,n,r,t)})):t}function G(e){return Array.isArray(e)?P(e).map(G).toList():$(e)?C(e).map(G).toMap():e}function $(e){return e&&(e.constructor===Object||void 0===e.constructor)}function J(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Y(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(c(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&J(i[1],e)&&(n||J(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var l=e;e=t,t=l}var f=!0,d=t.__iterate(function(t,r){return(n?e.has(t):i?J(t,e.get(r,gn)):J(e.get(r,gn),t))?void 0:(f=!1,!1)});return f&&e.size===d}function X(e,t){if(!(this instanceof X))return new X(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(In)return In;In=this}}function Q(e,t){if(!e)throw new Error(t)}function Z(e,t,n){if(!(this instanceof Z))return new Z(e,t,n);if(Q(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),e>t&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(On)return On;On=this}}function ee(){throw TypeError("Abstract")}function te(){}function ne(){}function re(){}function ie(e){return e>>>1&1073741824|3221225471&e}function oe(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return ie(n)}if("string"===t)return e.length>qn?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=Rn[e];return void 0===t&&(t=se(e),Fn===Nn&&(Fn=0,Rn={}),Fn++,Rn[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function le(e){Q(e!==1/0,"Cannot perform this action with an infinite size.")}function fe(e){return null===e||void 0===e?xe():de(e)&&!c(e)?e:xe().withMutations(function(t){var r=n(e);le(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function de(e){return!(!e||!e[Un])}function he(e,t){this.ownerID=e,this.entries=t}function pe(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ge(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function _e(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&be(e._root)}function ye(e,t){return x(e,t[0],t[1])}function be(e,t){return{node:e,index:0,__prev:t}}function ke(e,t,n,r){var i=Object.create(Bn);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function xe(){return Vn||(Vn=ke(0))}function we(e,t,n){var r,i;if(e._root){var o=l(_n),a=l(yn);if(r=Se(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===gn?-1:1:0)}else{if(n===gn)return e;i=1,r=new he(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?ke(i,r):xe()}function Se(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===gn?e:(f(s),f(a),new ge(t,r,[i,o]))}function Ae(e){return e.constructor===ge||e.constructor===ve}function Ee(e,t,n,r,i){if(e.keyHash===r)return new ve(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&vn,s=(0===n?r:r>>>n)&vn,u=a===s?[Ee(e,t,n+pn,r,i)]:(o=new ge(t,r,i),s>a?[e,o]:[o,e]);return new pe(t,1<s;s++,u<<=1){var l=t[s];void 0!==l&&s!==r&&(i|=u,a[o++]=l)}return new pe(e,i,a)}function Oe(e,t,n,r,i){for(var o=0,a=new Array(mn),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new me(e,o+1,a)}function Ce(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function Le(e,t,n,r){var i=r?e:h(e);return i[t]=n,i}function qe(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;i>s;s++)s===t?(o[s]=n,a=-1):o[s]=e[s+a];return o}function Ne(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;r>a;a++)a===t&&(o=1),i[a]=e[a+o];return i}function Fe(e){var t=He();if(null===e||void 0===e)return t;if(Re(e))return e;var n=r(e),i=n.size;return 0===i?t:(le(i),i>0&&mn>i?Ve(0,i,pn,null,new Ue(n.toArray())):t.withMutations(function(e){e.setSize(i),n.forEach(function(t,n){return e.set(n,t)})}))}function Re(e){return!(!e||!e[Gn])}function Ue(e,t){this.array=e,this.ownerID=t}function Be(e,t){function n(e,t,n){return 0===t?r(e,n):i(e,t,n)}function r(e,n){var r=n===s?u&&u.array:e&&e.array,i=n>o?0:o-n,c=a-n;return c>mn&&(c=mn),function(){if(i===c)return Yn;var e=t?--c:i++;return r&&r[e]}}function i(e,r,i){var s,u=e&&e.array,c=i>o?0:o-i>>r,l=(a-i>>r)+1;return l>mn&&(l=mn),function(){for(;;){if(s){var e=s();if(e!==Yn)return e;s=null}if(c===l)return Yn;var o=t?--l:c++;s=n(u&&u[o],r-pn,i+(o<=e.size||0>t)return e.withMutations(function(e){0>t?Je(e,t).set(0,n):Je(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=l(yn);return t>=Xe(e._capacity)?r=Ke(r,e.__ownerID,0,t,n,o):i=Ke(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Ve(e._origin,e._capacity,e._level,i,r):e}function Ke(e,t,n,r,i,o){var a=r>>>n&vn,s=e&&a0){var c=e&&e.array[a],l=Ke(c,t,n-pn,r,i,o);return l===c?e:(u=Ge(e,t),u.array[a]=l,u)}return s&&e.array[a]===i?e:(f(o),u=Ge(e,t),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Ge(e,t){return t&&e&&t===e.ownerID?e:new Ue(e?e.array.slice():[],t)}function $e(e,t){if(t>=Xe(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&vn],r-=pn;return n}}function Je(e,t,n){void 0!==t&&(t=0|t),void 0!==n&&(n=0|n);var r=e.__ownerID||new d,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:0>n?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,l=0;0>a+l;)c=new Ue(c&&c.array.length?[void 0,c]:[],r),u+=pn,l+=1<=1<h?$e(e,s-1):h>f?new Ue([],r):p;if(p&&h>f&&o>a&&p.array.length){c=Ge(c,r);for(var v=c,g=u;g>pn;g-=pn){var _=f>>>g&vn;v=v.array[_]=Ge(v.array[_],r)}v.array[f>>>pn&vn]=p}if(o>s&&(m=m&&m.removeAfter(r,0,s)),a>=h)a-=h,s-=h,u=pn,c=null,m=m&&m.removeBefore(r,0,a);else if(a>i||f>h){for(l=0;c;){var y=a>>>u&vn;if(y!==h>>>u&vn)break;y&&(l+=(1<i&&(c=c.removeBefore(r,u,a-l)),c&&f>h&&(c=c.removeAfter(r,u,h-l)),l&&(a-=l,s-=l)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=u,e._root=c,e._tail=m,e.__hash=void 0,e.__altered=!0,e):Ve(a,s,u,c,m)}function Ye(e,t,n){for(var i=[],a=0,s=0;sa&&(a=c.size),o(u)||(c=c.map(function(e){return W(e)})),i.push(c)}return a>e.size&&(e=e.setSize(a)),ze(e,t,i)}function Xe(e){return mn>e?0:e-1>>>pn<=mn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):et(r,i)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){var t=It(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ot,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===xn){var r=e.__iterator(t,n);return new k(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===kn?bn:kn,n)},t}function ut(e,t,n){var r=It(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,gn);return o===gn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return r(t.call(n,e,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(xn,i);return new k(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return x(r,s,t.call(n,a[1],s,e),i)})},r}function ct(e,t){var n=It(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Ot,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function lt(e,t,n,r){var i=It(e);return r&&(i.has=function(r){var i=e.get(r,gn);return i!==gn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,gn);return o!==gn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,u){return t.call(n,e,o,u)?(s++,i(e,r?o:s-1,a)):void 0},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(xn,o),s=0;return new k(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return x(i,r?c:s++,l,o)}})},i}function ft(e,t,n){var r=fe().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function dt(e,t,n){var r=a(e),i=(c(e)?Qe():fe()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=Mt(e);return i.map(function(t){return St(e,o(t))})}function ht(e,t,n,r){var i=e.size;if(void 0!==t&&(t=0|t),void 0!==n&&(n=n===1/0?i:0|n),g(t,n,i))return e;var o=_(t,i),a=y(n,i);if(o!==o||a!==a)return ht(e.toSeq().cacheResult(),t,n,r);var s,u=a-o;u===u&&(s=0>u?0:u);var c=It(e);return c.size=0===s?s:e.size&&s||void 0,!r&&q(e)&&s>=0&&(c.get=function(t,n){return t=m(this,t),t>=0&&s>t?e.get(t+o,n):n}),c.__iterateUncached=function(t,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,u=!0,c=0;return e.__iterate(function(e,n){return u&&(u=a++s)return w();var e=i.next();return r||t===kn?e:t===bn?x(t,u-1,void 0,e):x(t,u-1,e.value[1],e)})},c}function pt(e,t,n){var r=It(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(xn,i),s=!0;return new k(function(){if(!s)return w();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?r===xn?e:x(r,u,c,e):(s=!1,w())})},r}function mt(e,t,n,r){var i=It(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate(function(e,o,c){return s&&(s=t.call(n,e,o,c))?void 0:(u++,i(e,r?o:u-1,a))}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(xn,o),u=!0,c=0;return new k(function(){var e,o,l;do{if(e=s.next(),e.done)return r||i===kn?e:i===bn?x(i,c++,void 0,e):x(i,c++,e.value[1],e);var f=e.value;o=f[0],l=f[1],u&&(u=t.call(n,l,o,a))}while(u);return i===xn?e:x(i,o,l,e)})},i}function vt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?F(e):R(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var u=i[0];if(u===e||r&&a(u)||s(e)&&s(u))return u}var c=new z(i);return r?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function gt(e,t,n){var r=It(e);return r.__iterateUncached=function(r,i){function a(e,c){var l=this;e.__iterate(function(e,i){return(!t||t>c)&&o(e)?a(e,c+1):r(e,n?i:s++,l)===!1&&(u=!0),!u},i)}var s=0,u=!1;return a(e,0),s},r.__iteratorUncached=function(r,i){var a=e.__iterator(r,i),s=[],u=0;return new k(function(){for(;a;){var e=a.next();if(e.done===!1){var c=e.value;if(r===xn&&(c=c[1]),t&&!(s.length0}function wt(e,n,r){var i=It(e);return i.size=new z(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(kn,t),i=0;!(n=r.next()).done&&e(n.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=t(e),E(i?e.reverse():e)}),a=0,s=!1;return new k(function(){var t;return s||(t=o.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?w():x(e,a++,n.apply(null,t.map(function(e){return e.value})))})},i}function St(e,t){return q(e)?t:e.constructor(t)}function At(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Et(e){return le(e.size),p(e)}function Mt(e){return a(e)?n:s(e)?r:i}function It(e){return Object.create((a(e)?C:s(e)?P:j).prototype)}function Ot(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Ct(e,t){return e>t?1:t>e?-1:0}function Pt(e){var n=E(e);if(!n){if(!I(e))throw new TypeError("Expected iterable or array-like: "+e);n=E(t(e))}return n}function jt(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);Dt(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=fe(o)},i=r.prototype=Object.create(Qn);return i.constructor=r,r}function zt(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function Tt(e){return e._name||e.constructor.name||"Record"}function Dt(e,t){try{t.forEach(Lt.bind(void 0,e))}catch(n){}}function Lt(e,t){Object.defineProperty(e,t,{ get:function(){return this.get(t)},set:function(e){Q(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function qt(e){return null===e||void 0===e?Ut():Nt(e)&&!c(e)?e:Ut().withMutations(function(t){var n=i(e);le(n.size),n.forEach(function(e){return t.add(e)})})}function Nt(e){return!(!e||!e[Zn])}function Ft(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Rt(e,t){var n=Object.create(er);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Ut(){return tr||(tr=Rt(xe()))}function Bt(e){return null===e||void 0===e?Wt():Vt(e)?e:Wt().withMutations(function(t){var n=i(e);le(n.size),n.forEach(function(e){return t.add(e)})})}function Vt(e){return Nt(e)&&c(e)}function Ht(e,t){var n=Object.create(nr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Wt(){return rr||(rr=Ht(tt()))}function Kt(e){return null===e||void 0===e?Jt():Gt(e)?e:Jt().unshiftAll(e)}function Gt(e){return!(!e||!e[ir])}function $t(e,t,n,r){var i=Object.create(or);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Jt(){return ar||(ar=$t(0))}function Yt(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Xt(e,t){return t}function Qt(e,t){return[t,e]}function Zt(e){return function(){return!e.apply(this,arguments)}}function en(e){return function(){return-e.apply(this,arguments)}}function tn(e){return"string"==typeof e?JSON.stringify(e):String(e)}function nn(){return h(arguments)}function rn(e,t){return t>e?1:e>t?-1:0}function on(e){if(e.size===1/0)return 0;var t=c(e),n=a(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+sn(oe(e),oe(t))|0}:function(e,t){r=r+sn(oe(e),oe(t))|0}:t?function(e){r=31*r+oe(e)|0}:function(e){r=r+oe(e)|0});return an(i,r)}function an(e,t){return t=Pn(t,3432918353),t=Pn(t<<15|t>>>-15,461845907),t=Pn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Pn(t^t>>>16,2246822507),t=Pn(t^t>>>13,3266489909),t=ie(t^t>>>16)}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var un=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=u,t.isOrdered=c,t.Keyed=n,t.Indexed=r,t.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",fn="@@__IMMUTABLE_INDEXED__@@",dn="@@__IMMUTABLE_ORDERED__@@",hn="delete",pn=5,mn=1<=i;i++)if(e(n[t?r-i:i],i,this)===!1)return i+1;return i},z.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new k(function(){return i>r?w():x(e,i,n[t?r-i++:i++])})},e(T,C),T.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},T.prototype.has=function(e){return this._object.hasOwnProperty(e)},T.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var a=r[t?i-o:o];if(e(n[a],a,this)===!1)return o+1}return o},T.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new k(function(){var a=r[t?i-o:o];return o++>i?w():x(e,a,n[a])})},T.prototype[dn]=!0,e(D,P),D.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=E(n),i=0;if(A(r))for(var o;!(o=r.next()).done&&e(o.value,i++,this)!==!1;);return i},D.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=E(n);if(!A(r))return new k(w);var i=0;return new k(function(){var t=r.next();return t.done?t:x(e,i++,t.value)})},e(L,P),L.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return x(e,i,r[i++])})};var Mn;e(X,P),X.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},X.prototype.get=function(e,t){return this.has(e)?this._value:t},X.prototype.includes=function(e){return J(this._value,e)},X.prototype.slice=function(e,t){var n=this.size;return g(e,t,n)?this:new X(this._value,y(t,n)-_(e,n))},X.prototype.reverse=function(){return this},X.prototype.indexOf=function(e){return J(this._value,e)?0:-1},X.prototype.lastIndexOf=function(e){return J(this._value,e)?this.size:-1},X.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=t?new Z(0,0):new Z(this.get(e,this._end),this.get(t,this._end),this._step))},Z.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n=o;o++){if(e(i,o,this)===!1)return o+1;i+=t?-r:r}return o},Z.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new k(function(){var a=i;return i+=t?-r:r,o>n?w():x(e,o++,a)})},Z.prototype.equals=function(e){return e instanceof Z?this._start===e._start&&this._end===e._end&&this._step===e._step:Y(this,e)};var On;e(ee,t),e(te,ee),e(ne,ee),e(re,ee),ee.Keyed=te,ee.Indexed=ne,ee.Set=re;var Cn,Pn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){e=0|e,t=0|t;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},jn=Object.isExtensible,zn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Tn="function"==typeof WeakMap;Tn&&(Cn=new WeakMap);var Dn=0,Ln="__immutablehash__";"function"==typeof Symbol&&(Ln=Symbol(Ln));var qn=16,Nn=255,Fn=0,Rn={};e(fe,te),fe.of=function(){var e=un.call(arguments,0);return xe().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},fe.prototype.toString=function(){return this.__toString("Map {","}")},fe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},fe.prototype.set=function(e,t){return we(this,e,t)},fe.prototype.setIn=function(e,t){return this.updateIn(e,gn,function(){return t})},fe.prototype.remove=function(e){return we(this,e,gn)},fe.prototype.deleteIn=function(e){return this.updateIn(e,function(){return gn})},fe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},fe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=Te(this,Pt(e),t,n);return r===gn?void 0:r},fe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):xe()},fe.prototype.merge=function(){return Ce(this,void 0,arguments)},fe.prototype.mergeWith=function(e){var t=un.call(arguments,1);return Ce(this,e,t)},fe.prototype.mergeIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,xe(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},fe.prototype.mergeDeep=function(){return Ce(this,Pe,arguments)},fe.prototype.mergeDeepWith=function(e){var t=un.call(arguments,1);return Ce(this,je(e),t)},fe.prototype.mergeDeepIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,xe(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},fe.prototype.sort=function(e){return Qe(bt(this,e))},fe.prototype.sortBy=function(e,t){return Qe(bt(this,t,e))},fe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},fe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new d)},fe.prototype.asImmutable=function(){return this.__ensureOwner()},fe.prototype.wasAltered=function(){return this.__altered},fe.prototype.__iterator=function(e,t){return new _e(this,e,t)},fe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},fe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?ke(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},fe.isMap=de;var Un="@@__IMMUTABLE_MAP__@@",Bn=fe.prototype;Bn[Un]=!0,Bn[hn]=Bn.remove,Bn.removeIn=Bn.deleteIn,he.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(J(n,i[o][0]))return i[o][1];return r},he.prototype.update=function(e,t,n,r,i,o,a){for(var s=i===gn,u=this.entries,c=0,l=u.length;l>c&&!J(r,u[c][0]);c++);var d=l>c;if(d?u[c][1]===i:s)return this;if(f(a),(s||!d)&&f(o),!s||1!==u.length){if(!d&&!s&&u.length>=Hn)return Me(e,u,r,i);var p=e&&e===this.ownerID,m=p?u:h(u);return d?s?c===l-1?m.pop():m[c]=m.pop():m[c]=[r,i]:m.push([r,i]),p?(this.entries=m,this):new he(e,m)}},pe.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=1<<((0===e?t:t>>>e)&vn),o=this.bitmap;return 0===(o&i)?r:this.nodes[De(o&i-1)].get(e+pn,t,n,r)},pe.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&vn,u=1<=Wn)return Oe(e,d,c,s,p);if(l&&!p&&2===d.length&&Ae(d[1^f]))return d[1^f];if(l&&p&&1===d.length&&Ae(p))return p;var m=e&&e===this.ownerID,v=l?p?c:c^u:c|u,g=l?p?Le(d,f,p,m):Ne(d,f,m):qe(d,f,p,m);return m?(this.bitmap=v,this.nodes=g,this):new pe(e,v,g)},me.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=(0===e?t:t>>>e)&vn,o=this.nodes[i];return o?o.get(e+pn,t,n,r):r},me.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&vn,u=i===gn,c=this.nodes,l=c[s];if(u&&!l)return this;var f=Se(l,e,t+pn,n,r,i,o,a);if(f===l)return this;var d=this.count;if(l){if(!f&&(d--,Kn>d))return Ie(e,c,d,s)}else d++;var h=e&&e===this.ownerID,p=Le(c,s,f,h);return h?(this.count=d,this.nodes=p,this):new me(e,d,p)},ve.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(J(n,i[o][0]))return i[o][1];return r},ve.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=i===gn;if(n!==this.keyHash)return s?this:(f(a),f(o),Ee(this,e,t,n,[r,i]));for(var u=this.entries,c=0,l=u.length;l>c&&!J(r,u[c][0]);c++);var d=l>c;if(d?u[c][1]===i:s)return this;if(f(a),(s||!d)&&f(o),s&&2===l)return new ge(e,this.keyHash,u[1^c]);var p=e&&e===this.ownerID,m=p?u:h(u);return d?s?c===l-1?m.pop():m[c]=m.pop():m[c]=[r,i]:m.push([r,i]),p?(this.entries=m,this):new ve(e,this.keyHash,m)},ge.prototype.get=function(e,t,n,r){return J(n,this.entry[0])?this.entry[1]:r},ge.prototype.update=function(e,t,n,r,i,o,a){var s=i===gn,u=J(r,this.entry[0]);return(u?i===this.entry[1]:s)?this:(f(a),s?void f(o):u?e&&e===this.ownerID?(this.entry[1]=i,this):new ge(e,this.keyHash,[r,i]):(f(o),Ee(this,e,t,oe(r),[r,i])))},he.prototype.iterate=ve.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(e(n[t?i-r:r])===!1)return!1},pe.prototype.iterate=me.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[t?i-r:r];if(o&&o.iterate(e,t)===!1)return!1}},ge.prototype.iterate=function(e,t){return e(this.entry)},e(_e,k),_e.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return ye(e,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return ye(e,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return ye(e,o.entry);t=this._stack=be(o,t)}continue}t=this._stack=this._stack.__prev}return w()};var Vn,Hn=mn/4,Wn=mn/2,Kn=mn/4;e(Fe,ne),Fe.of=function(){return this(arguments)},Fe.prototype.toString=function(){return this.__toString("List [","]")},Fe.prototype.get=function(e,t){if(e=m(this,e),e>=0&&e>>t&vn;if(r>=this.array.length)return new Ue([],e);var i,o=0===r;if(t>0){var a=this.array[r];if(i=a&&a.removeBefore(e,t-pn,n),i===a&&o)return this}if(o&&!i)return this;var s=Ge(this,e);if(!o)for(var u=0;r>u;u++)s.array[u]=void 0;return i&&(s.array[r]=i),s},Ue.prototype.removeAfter=function(e,t,n){if(n===(t?1<>>t&vn;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if(i=o&&o.removeAfter(e,t-pn,n),i===o&&r===this.array.length-1)return this}var a=Ge(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Jn,Yn={};e(Qe,fe),Qe.of=function(){return this(arguments)},Qe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Qe.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Qe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tt()},Qe.prototype.set=function(e,t){return nt(this,e,t)},Qe.prototype.remove=function(e){return nt(this,e,gn)},Qe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Qe.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Qe.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Qe.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?et(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Qe.isOrderedMap=Ze,Qe.prototype[dn]=!0,Qe.prototype[hn]=Qe.prototype.remove;var Xn;e(rt,C),rt.prototype.get=function(e,t){return this._iter.get(e,t)},rt.prototype.has=function(e){return this._iter.has(e)},rt.prototype.valueSeq=function(){return this._iter.valueSeq()},rt.prototype.reverse=function(){var e=this,t=ct(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},rt.prototype.map=function(e,t){var n=this,r=ut(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},rt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Et(this):0,function(i){return e(i,t?--n:n++,r)}),t)},rt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(kn,t),r=t?Et(this):0;return new k(function(){var i=n.next();return i.done?i:x(e,t?--r:r++,i.value,i)})},rt.prototype[dn]=!0,e(it,P),it.prototype.includes=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},it.prototype.__iterator=function(e,t){var n=this._iter.__iterator(kn,t),r=0;return new k(function(){var t=n.next();return t.done?t:x(e,r++,t.value,t)})},e(ot,j),ot.prototype.has=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(kn,t);return new k(function(){var t=n.next();return t.done?t:x(e,t.value,t.value,t)})},e(at,C),at.prototype.entrySeq=function(){return this._iter.toSeq()},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){At(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(kn,t);return new k(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){At(r);var i=o(r);return x(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},it.prototype.cacheResult=rt.prototype.cacheResult=ot.prototype.cacheResult=at.prototype.cacheResult=Ot,e(jt,te),jt.prototype.toString=function(){return this.__toString(Tt(this)+" {","}")},jt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},jt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},jt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=zt(this,xe()))},jt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+Tt(this));if(this._map&&!this._map.has(e)){var n=this._defaultValues[e];if(t===n)return this}var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:zt(this,r)},jt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:zt(this,t)},jt.prototype.wasAltered=function(){return this._map.wasAltered()},jt.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},jt.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},jt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?zt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Qn=jt.prototype;Qn[hn]=Qn.remove,Qn.deleteIn=Qn.removeIn=Bn.removeIn,Qn.merge=Bn.merge,Qn.mergeWith=Bn.mergeWith,Qn.mergeIn=Bn.mergeIn,Qn.mergeDeep=Bn.mergeDeep,Qn.mergeDeepWith=Bn.mergeDeepWith,Qn.mergeDeepIn=Bn.mergeDeepIn,Qn.setIn=Bn.setIn,Qn.update=Bn.update,Qn.updateIn=Bn.updateIn,Qn.withMutations=Bn.withMutations,Qn.asMutable=Bn.asMutable,Qn.asImmutable=Bn.asImmutable,e(qt,re),qt.of=function(){return this(arguments)},qt.fromKeys=function(e){return this(n(e).keySeq())},qt.prototype.toString=function(){return this.__toString("Set {","}")},qt.prototype.has=function(e){return this._map.has(e)},qt.prototype.add=function(e){return Ft(this,this._map.set(e,!0))},qt.prototype.remove=function(e){return Ft(this,this._map.remove(e))},qt.prototype.clear=function(){return Ft(this,this._map.clear())},qt.prototype.union=function(){var e=un.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):$t(e,t)},Kt.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;le(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):$t(t,n)},Kt.prototype.pop=function(){return this.slice(1)},Kt.prototype.unshift=function(){return this.push.apply(this,arguments)},Kt.prototype.unshiftAll=function(e){return this.pushAll(e)},Kt.prototype.shift=function(){return this.pop.apply(this,arguments)},Kt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Jt()},Kt.prototype.slice=function(e,t){if(g(e,t,this.size))return this;var n=_(e,this.size),r=y(t,this.size);if(r!==this.size)return ne.prototype.slice.call(this,e,t);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):$t(i,o)},Kt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?$t(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Kt.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},Kt.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new k(function(){if(r){var t=r.value;return r=r.next,x(e,n++,t)}return w()})},Kt.isStack=Gt;var ir="@@__IMMUTABLE_STACK__@@",or=Kt.prototype;or[ir]=!0,or.withMutations=Bn.withMutations,or.asMutable=Bn.asMutable,or.asImmutable=Bn.asImmutable,or.wasAltered=Bn.wasAltered;var ar;t.Iterator=k,Yt(t,{toArray:function(){le(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return fe(this.toKeyedSeq())},toObject:function(){le(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Qe(this.toKeyedSeq())},toOrderedSet:function(){return Bt(a(this)?this.valueSeq():this)},toSet:function(){return qt(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ot(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Kt(a(this)?this.valueSeq():this)},toList:function(){return Fe(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=un.call(arguments,0);return St(this,vt(this,e))},includes:function(e){return this.some(function(t){return J(t,e)})},entries:function(){return this.__iterator(xn)},every:function(e,t){le(this.size);var n=!0;return this.__iterate(function(r,i,o){return e.call(t,r,i,o)?void 0:(n=!1,!1)}),n},filter:function(e,t){return St(this,lt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return le(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){le(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return St(this,ut(this,e,t))},reduce:function(e,t,n){le(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return St(this,ct(this,!0))},slice:function(e,t){return St(this,ht(this,e,t,!0))},some:function(e,t){return!this.every(Zt(e),t)},sort:function(e){return St(this,bt(this,e))},values:function(){return this.__iterator(kn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return p(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return ft(this,e,t)},equals:function(e){return Y(this,e)},entrySeq:function(){var e=this;if(e._cache)return new z(e._cache);var t=e.toSeq().map(Qt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Zt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){return e.call(t,n,i,o)?(r=[i,n],!1):void 0}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(v)},flatMap:function(e,t){return St(this,_t(this,e,t))},flatten:function(e){return St(this,gt(this,e,!0))},fromEntrySeq:function(){return new at(this)},get:function(e,t){return this.find(function(t,n){return J(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=Pt(e);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,gn):gn,r===gn)return t}return r},groupBy:function(e,t){return dt(this,e,t)},has:function(e){return this.get(e,gn)!==gn},hasIn:function(e){return this.getIn(e,gn)!==gn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return J(t,e)})},keySeq:function(){return this.toSeq().map(Xt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return kt(this,e)},maxBy:function(e,t){return kt(this,t,e)},min:function(e){return kt(this,e?en(e):rn)},minBy:function(e,t){return kt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return St(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return St(this,mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Zt(e),t)},sortBy:function(e,t){return St(this,bt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return St(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return St(this,pt(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Zt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=t.prototype;sr[cn]=!0,sr[An]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=tn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Yt(n,{flip:function(){return St(this,st(this))}, -mapEntries:function(e,t){var n=this,r=0;return St(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return St(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var ur=n.prototype;ur[ln]=!0,ur[An]=sr.entries,ur.__toJS=sr.toObject,ur.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Yt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return St(this,lt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return St(this,ct(this,!1))},slice:function(e,t){return St(this,ht(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=_(e,0>e?this.count():this.size);var r=this.slice(0,e);return St(this,1===n?r:r.concat(h(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return St(this,gt(this,e,!1))},get:function(e,t){return e=m(this,e),0>e||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=m(this,e),e>=0&&(void 0!==this.size?this.size===1/0||e100)return d(e,t,n);var u=o.diff(e,t),f=0;return u.forEach(function(e){if("="===e.op)f++;else if("!="===e.op){if(l(e.val)&&l(e.newVal)){var t=d(e.val,e.newVal,s(a,f));i=i.concat(t)}else i.push(c("replace",s(a,f),e.newVal));f++}else"+"===e.op?(i.push(c("add",s(a,f),e.val)),f++):"-"===e.op&&i.push(c("remove",s(a,f)))}),i},p=function(e,t,n){var r=n||"";return e===t?[]:[c("replace",s(r,""),t)]},m=function(e,t,n){return e==t||null!=e&&null!=t?f(e)&&f(t)?r.fromJS(h(e,t)):l(e)&&l(t)?r.fromJS(d(e,t)):r.fromJS(p(e,t,n)):r.fromJS([c("replace","/",t)])};e.exports=m},function(e,t,n){"use strict";var r=n(398),i=function(e){return r.Iterable.isKeyed(e)},o=function(e){return r.Iterable.isIndexed(e)},a=function(e,t,n){return"remove"===e?{op:e,path:t}:{op:e,path:t,value:n}};e.exports={isMap:i,isIndexed:o,op:a}},function(e,t,n){"use strict";function r(e,t){for(var n=e.size||0,r=t.size||0,a=o(n+1,r+1,0),s=0;n>s;s++)for(var u=0;r>u;u++)i.is(e.get(s),t.get(u))?a[s+1][u+1]=a[s][u]+1:a[s+1][u+1]=Math.max(a[s+1][u],a[s][u+1]);return a}var i=n(398),o=function(e,t,n){for(var r=[],i=0;e>i;i++)if(r[i]=new Array(t),null!=n)for(var o=0;t>o;o++)r[i][o]=n;return r},a=function(e,t){var n=r(e,t);return f(e,t,n)},s=i.Record({op:"=",val:null}),u=i.Record({op:"!=",val:null,newVal:null}),c=function(e,t){var n=r(e,t);return l(n,e,t,e.size||0,t.size||0)},l=function(e,t,n,r,o){return 0===r&&0===o?[]:r>0&&o>0&&i.is(t.get(r-1),n.get(o-1))?l(e,t,n,r-1,o-1).concat(new s({op:"=",val:t.get(r-1)})):r>0&&o>0&&r===o&&!i.is(t.get(r-1),n.get(o-1))?l(e,t,n,r-1,o-1).concat(new u({val:t.get(r-1),newVal:n.get(r-1)})):o>0&&(0===r||e[r][o-1]>=e[r-1][o])?l(e,t,n,r,o-1).concat(new s({op:"+",val:n.get(o-1)})):r>0&&(0===o||e[r][o-1]\n \n ':'\n
\n \n \n ',e+='\n \n \n
'}}]),e}(),l=function(){function e(){var t=this;i(this,e),u.on("input",'[data-grav-array-type="key"], [data-grav-array-type="value"]',function(e){return t.actionInput(e)}),u.on("click touch","[data-grav-array-action]",function(e){return t.actionEvent(e)})}return o(e,[{key:"actionInput",value:function(e){var t=(0,s["default"])(e.target),n=t.data("grav-array-type");this._setTemplate(t);var r=t.data("array-template"),i="key"===n?t:t.siblings('[data-grav-array-type="key"]:first'),o="value"===n?t:t.siblings('[data-grav-array-type="value"]:first'),a=r.getName()+"["+(r.isValueOnly()?this.getIndexFor(t):i.val())+"]";o.attr("name",o.val()?a:r.getName()),this.refreshNames(r)}},{key:"actionEvent",value:function(e){e&&e.preventDefault();var t=(0,s["default"])(e.target),n=t.data("grav-array-action");this._setTemplate(t),this[n+"Action"](t)}},{key:"addAction",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]');n.after(t.getNewRow())}},{key:"remAction",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]'),r=!n.siblings().length;if(r){var i=(0,s["default"])(t.getNewRow());n.after(i),i.find('[data-grav-array-type="value"]:last').attr("name",t.getName())}n.remove(),this.refreshNames(t)}},{key:"refreshNames",value:function(e){if(e.isValueOnly()){var t=e.container.find('> div > [data-grav-array-type="row"]'),n=t.find('[name]:not([name=""])');n.each(function(e,t){t=(0,s["default"])(t);var n=t.attr("name");n=n.replace(/\[\d+\]$/,"["+e+"]"),t.attr("name",n)}),n.length||t.find('[data-grav-array-type="value"]').attr("name",e.getName())}}},{key:"getIndexFor",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]');return t.container.find((t.isValueOnly()?"> div ":"")+' > [data-grav-array-type="row"]').index(n)}},{key:"_setTemplate",value:function(e){e.data("array-template")||e.data("array-template",new c(e.closest("[data-grav-array-name]")))}}]),e}();t["default"]=l;t.Instance=new l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var o=function(){function e(e,t){for(var n=0;n .collection-actions [data-action="add"]',function(e){return t.addItem(e)}),e.on("click",'> ul > li > .item-actions [data-action="delete"]',function(e){return t.removeItem(e)}),e.find("[data-collection-holder]").each(function(e,n){n=(0,s["default"])(n),n.data("collection-sort")||n[0].hasAttribute("data-collection-nosort")||n.data("collection-sort",new c["default"](n.get(0),{forceFallback:!1,animation:150,filter:".CodeMirror, .grav-editor-resizer",onUpdate:function(){return t.reindex(n)}}))})}},{key:"addItem",value:function(e){var t=(0,s["default"])(e.currentTarget),n=t.closest('[data-type="collection"]'),r=(0,s["default"])(n.find('> [data-collection-template="new"]').data("collection-template-html"));n.find("> [data-collection-holder]").append(r),this.reindex(n),(0,s["default"])('[data-grav-field="toggleable"] input[type="checkbox"]').trigger("change")}},{key:"removeItem",value:function(e){var t=(0,s["default"])(e.currentTarget),n=t.closest("[data-collection-item]"),r=t.closest('[data-type="collection"]');n.remove(),this.reindex(r)}},{key:"reindex",value:function(e){e=(0,s["default"])(e).closest('[data-type="collection"]');var t=e.find("> ul > [data-collection-item]");t.each(function(e,t){t=(0,s["default"])(t),t.attr("data-collection-key",e),["name","data-grav-field-name","for","id"].forEach(function(e){t.find("["+e+"]").each(function(){var t=(0,s["default"])(this),n=[];t.parents("[data-collection-key]").map(function(e,t){return n.push((0,s["default"])(t).attr("data-collection-key"))}),n.reverse();var r=t.attr(e).replace(/\[(\d+|\*)\]/g,function(){return"["+n.shift()+"]"});r=r.replace(/\.(\d+|\*)\./g,function(){return"."+n.shift()+"."}),t.attr(e,r)})})})}},{key:"_onAddedNodes",value:function(e,t){var n=this,r=(0,s["default"])(t).find('[data-type="collection"]');r.length&&r.each(function(e,t){t=(0,s["default"])(t),~n.lists.index(t)||n.addList(t)})}}]),e}();t["default"]=l;t.Instance=new l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var o=function(){function e(e,t){for(var n=0;n-1,p=(0,s["default"])("body"),m="mousedown touchstart MSPointerDown pointerdown",v="mousemove touchmove MSPointerMove pointermove",g="mouseup touchend MSPointerUp pointerup",_=h?"focus":"focusin",y=function(){function e(t){var n=this;i(this,e),this.selector=t,this.field=(0,s["default"])(this.selector),this.options=Object.assign({},this.field.data("grav-colorpicker")),this.built=!1,this.attach(),this.options.update&&this.field.on("change._grav_colorpicker",function(e,t,r,i){var o=r,a=(0,d.hex2rgb)(r);1>i&&(o="rgba("+a.r+", "+a.g+", "+a.b+", "+i+")");var s=t.closest(n.options.update);s.length||(s=t.siblings(n.options.update)),s.length||(s=t.parent(".g-colorpicker").find(n.options.update)),s.css({backgroundColor:o})})}return o(e,[{key:"attach",value:function(){var e=this;p.on(_,this.selector,function(t){return e.show(t,t.currentTarget)}),p.on(m,".g-colorpicker, .g-colorpicker i",this.bound("iconClick")),p.on("keydown",this.selector,function(t){switch(t.keyCode){case 9:e.hide();break;case 13:case 27:e.hide(),t.currentTarget.blur()}return!0}),p.on("keyup",this.selector,function(t){return e.updateFromInput(!0,t.currentTarget),!0}),p.on("paste",this.selector,function(t){setTimeout(function(){return e.updateFromInput(!0,t.currentTarget)},1)})}},{key:"show",value:function(e,t){t=(0,s["default"])(t),this.built||this.build(),this.element=t,this.reposition(),this.wrapper.addClass("cp-visible"),this.updateFromInput();var n=(0,s["default"])("#admin-main .content-wrapper").data("scrollbar").getViewElement();this.wrapper.on(m,".cp-grid, .cp-slider, .cp-opacity-slider",this.bound("bodyDown")),p.on(v,this.bound("bodyMove")),p.on(m,this.bound("bodyClick")),p.on(g,this.bound("targetReset")),(0,s["default"])(n).on("scroll",this.bound("reposition"))}},{key:"hide",value:function(){if(this.built){this.wrapper.removeClass("cp-visible");var e=(0,s["default"])("#admin-main .content-wrapper").data("scrollbar").getViewElement();this.wrapper.undelegate(m,".cp-grid, .cp-slider, .cp-opacity-slider",this.bound("bodyDown")),p.off(v,this.bound("bodyMove")),p.off(m,this.bound("bodyClick")),p.off(g,this.bound("targetReset")),(0,s["default"])(e).off("scroll",this.bound("reposition"))}}},{key:"build",value:function(){var e=this;this.wrapper=(0,s["default"])('
'),this.slider=(0,s["default"])('
').appendTo(this.wrapper).append((0,s["default"])('
')),this.opacitySlider=(0,s["default"])('
').appendTo(this.wrapper).append((0,s["default"])('
')),this.grid=(0,s["default"])('
').appendTo(this.wrapper).append((0,s["default"])('
')).append((0,s["default"])('
')),(0,s["default"])("
").appendTo(this.grid.find(".cp-picker"));var t=(0,s["default"])('
').appendTo(this.wrapper);this.tabs={hue:(0,s["default"])('
').text("HUE").appendTo(t),brightness:(0,s["default"])('
').text("BRI").appendTo(t),saturation:(0,s["default"])('
').text("SAT").appendTo(t),wheel:(0,s["default"])('
').text("WHEEL").appendTo(t),transparent:(0,s["default"])('
').text("TRANSPARENT").appendTo(t)},t.on(m,"> div",function(n){var r=(0,s["default"])(n.currentTarget);if(r.is(e.tabs.transparent)){var i=e.opacitySlider.height();return e.opacity=0,e.opacitySlider.find(".cp-picker").css({top:(0,c["default"])(i-i*e.opacity,0,i)}),void e.move(e.opacitySlider,{manualOpacity:!0})}var o=t.find(".active"),a=o.attr("class").replace(/\s|active|cp-tab-/g,""),u=r.attr("class").replace(/\s|active|cp-tab-/g,"");e.wrapper.removeClass("cp-mode-"+a).addClass("cp-mode-"+u),o.removeClass("active"),r.addClass("active"),e.mode=u,e.updateFromInput()}),this.wrapper.appendTo(".content-wrapper"),this.built=!0,this.mode="hue"}},{key:"reposition",value:function(){var e=(0,s["default"])(".content-wrapper")[0],t=this.element[0].getBoundingClientRect(),n=e.getBoundingClientRect(),r={x:0,y:0};this.options.offset&&(r.x=this.options.offset.x||0,r.y=this.options.offset.y||0),this.wrapper.css({top:t.top+t.height+e.scrollTop-n.top+r.y,left:t.left+e.scrollLeft-n.left+r.x})}},{key:"iconClick",value:function(e){if(this.wrapper&&this.wrapper.hasClass("cp-visible"))return!0;e&&e.preventDefault();var t=(0,s["default"])(e.currentTarget).find("input");setTimeout(function(){return t.focus()},50)}},{key:"bodyMove",value:function(e){e&&e.preventDefault(),this.target&&this.move(this.target,e)}},{key:"bodyClick",value:function(e){var t=(0,s["default"])(e.target);t.closest(".cp-wrapper").length||t.is(this.selector)||this.hide()}},{key:"bodyDown",value:function(e){e&&e.preventDefault(),this.target=(0,s["default"])(e.currentTarget),this.move(this.target,e,!0)}},{key:"targetReset",value:function(e){e&&e.preventDefault(),this.target=null}},{key:"move",value:function(e,t){var n=this.element,r=e.find(".cp-picker"),i=e[0].getBoundingClientRect(),o=i.left+window.scrollX,a=i.top+window.scrollY,s=Math.round((t?t.pageX:0)-o),u=Math.round((t?t.pageY:0)-a),c=void 0,l=void 0,f=void 0,d=void 0,h=t.changedTouches||t.originalEvent&&t.originalEvent.changedTouches;t&&h&&(s=(h?h[0].pageX:0)-o,u=(h?h[0].pageY:0)-a),t&&t.manualOpacity&&(u=i.height),0>s&&(s=0),0>u&&(u=0),s>i.width&&(s=i.width),u>i.height&&(u=i.height),e.parent(".cp-mode-wheel").length&&r.parent(".cp-grid").length&&(c=75-s,l=75-u,f=Math.sqrt(c*c+l*l),d=Math.atan2(l,c),0>d&&(d+=2*Math.PI),f>75&&(s=75-75*Math.cos(d),u=75-75*Math.sin(d)),s=Math.round(s),u=Math.round(u)),e.hasClass("cp-grid")?(r.css({top:u,left:s}),this.updateFromPicker(n,e)):(r.css({top:u}),this.updateFromPicker(n,e))}},{key:"updateFromInput",value:function(e,t){t=t?(0,s["default"])(t):this.element;var n=t.val(),r=n.replace(/\s/g,"").match(/^rgba?\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},(.+)\)/),i=void 0,o=void 0;if(n=(0,d.rgbstr2hex)(n)||n,r=r?(0,c["default"])(r[1],0,1):1,(i=(0,d.parseHex)(n))||(i="#ffffff"),o=(0,d.hex2hsb)(i),this.built){this.opacity=r;var a=this.opacitySlider.height();this.opacitySlider.find(".cp-picker").css({top:(0,c["default"])(a-a*this.opacity,0,a)});var u=this.grid.height(),l=this.grid.width(),f=void 0,h=void 0,p=void 0,m=void 0;switch(a=this.slider.height(),this.mode){case"wheel":f=(0,c["default"])(Math.ceil(.75*o.s),0,u/2),h=o.h*Math.PI/180,p=(0,c["default"])(75-Math.cos(h)*f,0,l),m=(0,c["default"])(75-Math.sin(h)*f,0,u),this.grid.css({backgroundColor:"transparent"}).find(".cp-picker").css({top:m,left:p}),m=150-o.b/(100/u),""===i&&(m=0),this.slider.find(".cp-picker").css({top:m}),this.slider.css({backgroundColor:(0,d.hsb2hex)({h:o.h,s:o.s,b:100})});break;case"saturation":p=(0,c["default"])(5*o.h/12,0,150),m=(0,c["default"])(u-Math.ceil(o.b/(100/u)),0,u),this.grid.find(".cp-picker").css({top:m,left:p}),m=(0,c["default"])(a-o.s*(a/100),0,a),this.slider.find(".cp-picker").css({top:m}),this.slider.css({backgroundColor:(0,d.hsb2hex)({h:o.h,s:100,b:o.b})}),this.grid.find(".cp-grid-inner").css({opacity:o.s/100});break;case"brightness":p=(0,c["default"])(5*o.h/12,0,150),m=(0,c["default"])(u-Math.ceil(o.s/(100/u)),0,u),this.grid.find(".cp-picker").css({top:m,left:p}),m=(0,c["default"])(a-o.b*(a/100),0,a),this.slider.find(".cp-picker").css({top:m}),this.slider.css({backgroundColor:(0,d.hsb2hex)({h:o.h,s:o.s,b:100})}),this.grid.find(".cp-grid-inner").css({opacity:1-o.b/100});break;case"hue":default:p=(0,c["default"])(Math.ceil(o.s/(100/l)),0,l),m=(0,c["default"])(u-Math.ceil(o.b/(100/u)),0,u),this.grid.find(".cp-picker").css({top:m,left:p}),m=(0,c["default"])(a-o.h/(360/a),0,a),this.slider.find(".cp-picker").css({top:m}),this.grid.css({backgroundColor:(0,d.hsb2hex)({h:o.h,s:100,b:100})})}}e||t.val(this.getValue(i)),(this.element||t).trigger("change._grav_colorpicker",[t,i,r])}},{key:"updateFromPicker",value:function(e,t){var n=function(e,t){var n,r;return e.length&&t?(n=e[0].getBoundingClientRect().left,r=e[0].getBoundingClientRect().top,{x:n-t[0].getBoundingClientRect().left+e[0].offsetWidth/2,y:r-t[0].getBoundingClientRect().top+e[0].offsetHeight/2}):null},r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,u=void 0,l=void 0,f=void 0,h=this.wrapper.find(".cp-grid"),p=this.wrapper.find(".cp-slider"),m=this.wrapper.find(".cp-opacity-slider"),v=h.find(".cp-picker"),g=p.find(".cp-picker"),_=m.find(".cp-picker"),y=n(v,h),b=n(g,p),k=n(_,m),x=h[0].getBoundingClientRect().width,w=h[0].getBoundingClientRect().height,S=p[0].getBoundingClientRect().height,A=m[0].getBoundingClientRect().height,E=this.element.val();if(E=(0,d.rgbstr2hex)(E)||E,(r=(0,d.parseHex)(E))||(r="#ffffff"),t.hasClass("cp-grid")||t.hasClass("cp-slider"))switch(this.mode){case"wheel":s=x/2-y.x,u=w/2-y.y,l=Math.sqrt(s*s+u*u),f=Math.atan2(u,s),0>f&&(f+=2*Math.PI),l>75&&(l=75,y.x=69-75*Math.cos(f),y.y=69-75*Math.sin(f)),o=(0,c["default"])(l/.75,0,100),i=(0,c["default"])(180*f/Math.PI,0,360),a=(0,c["default"])(100-Math.floor(b.y*(100/S)),0,100),r=(0,d.hsb2hex)({h:i,s:o,b:a}),p.css({backgroundColor:(0,d.hsb2hex)({h:i,s:o,b:100})});break;case"saturation":i=(0,c["default"])(parseInt(y.x*(360/x),10),0,360),o=(0,c["default"])(100-Math.floor(b.y*(100/S)),0,100),a=(0,c["default"])(100-Math.floor(y.y*(100/w)),0,100),r=(0,d.hsb2hex)({h:i,s:o,b:a}),p.css({backgroundColor:(0,d.hsb2hex)({h:i,s:100,b:a})}),h.find(".cp-grid-inner").css({opacity:o/100});break;case"brightness":i=(0,c["default"])(parseInt(y.x*(360/x),10),0,360),o=(0,c["default"])(100-Math.floor(y.y*(100/w)),0,100),a=(0,c["default"])(100-Math.floor(b.y*(100/S)),0,100),r=(0,d.hsb2hex)({h:i,s:o,b:a}),p.css({backgroundColor:(0,d.hsb2hex)({h:i,s:o,b:100})}),h.find(".cp-grid-inner").css({opacity:1-a/100});break;default:i=(0,c["default"])(360-parseInt(b.y*(360/S),10),0,360),o=(0,c["default"])(Math.floor(y.x*(100/x)),0,100),a=(0,c["default"])(100-Math.floor(y.y*(100/w)),0,100),r=(0,d.hsb2hex)({h:i,s:o,b:a}),h.css({backgroundColor:(0,d.hsb2hex)({h:i,s:100,b:100})})}t.hasClass("cp-opacity-slider")&&(this.opacity=parseFloat(1-k.y/A).toFixed(2)),e.val(this.getValue(r)),this.element.trigger("change._grav_colorpicker",[this.element,r,this.opacity])}},{key:"getValue",value:function(e){if(1===this.opacity)return e;var t=(0,d.hex2rgb)(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+this.opacity+")"}},{key:"bound",value:function t(e){var t=this._bound||(this._bound={});return t[e]||(t[e]=(0,f["default"])(this[e],this))}}]),e}();t["default"]=y;t.Instance=new y("[data-grav-colorpicker]")},function(e,t){function n(e,t,n){return t>e?t:e>n?n:e}e.exports=n},function(e,t,n){function r(e,t,n){var r=i(arguments,2);return function(){return e.apply(t,r.concat(i(arguments)))}}var i=n(493);e.exports=r},function(e,t){function n(e,t,n){var r=e.length;t=null==t?0:0>t?Math.max(r+t,0):Math.min(t,r),n=null==n?r:0>n?Math.max(r+n,0):Math.min(n,r);for(var i=[];n>t;)i.push(e[t++]);return i}e.exports=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(t.parseHex=function(e){return e=e.replace(/[^A-F0-9]/gi,""),3!==e.length&&6!==e.length?"":(3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),"#"+e.toLowerCase())},t.hsb2rgb=function(e){var t={},n=Math.round(e.h),r=Math.round(255*e.s/100),i=Math.round(255*e.b/100);if(0===r)t.r=t.g=t.b=i;else{var o=i,a=(255-r)*i/255,s=(o-a)*(n%60)/60;360===n&&(n=0),60>n?(t.r=o,t.b=a,t.g=a+s):120>n?(t.g=o,t.b=a,t.r=o-s):180>n?(t.g=o,t.r=a,t.b=a+s):240>n?(t.b=o,t.r=a,t.g=o-s):300>n?(t.b=o,t.g=a,t.r=a+s):360>n?(t.r=o,t.g=a,t.b=o-s):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}),r=t.rgb2hex=function(e){var t=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];return t.forEach(function(e,n){1===e.length&&(t[n]="0"+e)}),"#"+t.join("")},i=(t.rgbstr2hex=function(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""},t.hsb2hex=function(e){return r(n(e))},t.hex2hsb=function(e){ +mapEntries:function(e,t){var n=this,r=0;return St(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return St(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var ur=n.prototype;ur[ln]=!0,ur[An]=sr.entries,ur.__toJS=sr.toObject,ur.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Yt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return St(this,lt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return St(this,ct(this,!1))},slice:function(e,t){return St(this,ht(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=_(e,0>e?this.count():this.size);var r=this.slice(0,e);return St(this,1===n?r:r.concat(h(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return St(this,gt(this,e,!1))},get:function(e,t){return e=m(this,e),0>e||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=m(this,e),e>=0&&(void 0!==this.size?this.size===1/0||e100)return d(e,t,n);var u=o.diff(e,t),f=0;return u.forEach(function(e){if("="===e.op)f++;else if("!="===e.op){if(l(e.val)&&l(e.newVal)){var t=d(e.val,e.newVal,s(a,f));i=i.concat(t)}else i.push(c("replace",s(a,f),e.newVal));f++}else"+"===e.op?(i.push(c("add",s(a,f),e.val)),f++):"-"===e.op&&i.push(c("remove",s(a,f)))}),i},p=function(e,t,n){var r=n||"";return e===t?[]:[c("replace",s(r,""),t)]},m=function(e,t,n){return e==t||null!=e&&null!=t?f(e)&&f(t)?r.fromJS(h(e,t)):l(e)&&l(t)?r.fromJS(d(e,t)):r.fromJS(p(e,t,n)):r.fromJS([c("replace","/",t)])};e.exports=m},function(e,t,n){"use strict";var r=n(398),i=function(e){return r.Iterable.isKeyed(e)},o=function(e){return r.Iterable.isIndexed(e)},a=function(e,t,n){return"remove"===e?{op:e,path:t}:{op:e,path:t,value:n}};e.exports={isMap:i,isIndexed:o,op:a}},function(e,t,n){"use strict";function r(e,t){for(var n=e.size||0,r=t.size||0,a=o(n+1,r+1,0),s=0;n>s;s++)for(var u=0;r>u;u++)i.is(e.get(s),t.get(u))?a[s+1][u+1]=a[s][u]+1:a[s+1][u+1]=Math.max(a[s+1][u],a[s][u+1]);return a}var i=n(398),o=function(e,t,n){for(var r=[],i=0;e>i;i++)if(r[i]=new Array(t),null!=n)for(var o=0;t>o;o++)r[i][o]=n;return r},a=function(e,t){var n=r(e,t);return f(e,t,n)},s=i.Record({op:"=",val:null}),u=i.Record({op:"!=",val:null,newVal:null}),c=function(e,t){var n=r(e,t);return l(n,e,t,e.size||0,t.size||0)},l=function(e,t,n,r,o){return 0===r&&0===o?[]:r>0&&o>0&&i.is(t.get(r-1),n.get(o-1))?l(e,t,n,r-1,o-1).concat(new s({op:"=",val:t.get(r-1)})):r>0&&o>0&&r===o&&!i.is(t.get(r-1),n.get(o-1))?l(e,t,n,r-1,o-1).concat(new u({val:t.get(r-1),newVal:n.get(r-1)})):o>0&&(0===r||e[r][o-1]>=e[r-1][o])?l(e,t,n,r,o-1).concat(new s({op:"+",val:n.get(o-1)})):r>0&&(0===o||e[r][o-1]\n \n ':'\n
\n \n \n ',e+='\n \n \n
'}}]),e}(),l=function(){function e(){var t=this;i(this,e),u.on("input",'[data-grav-array-type="key"], [data-grav-array-type="value"]',function(e){return t.actionInput(e)}),u.on("click touch","[data-grav-array-action]",function(e){return t.actionEvent(e)})}return o(e,[{key:"actionInput",value:function(e){var t=(0,s["default"])(e.target),n=t.data("grav-array-type");this._setTemplate(t);var r=t.data("array-template"),i="key"===n?t:t.siblings('[data-grav-array-type="key"]:first'),o="value"===n?t:t.siblings('[data-grav-array-type="value"]:first'),a=r.getName()+"["+(r.isValueOnly()?this.getIndexFor(t):i.val())+"]";o.attr("name",o.val()?a:r.getName()),this.refreshNames(r)}},{key:"actionEvent",value:function(e){e&&e.preventDefault();var t=(0,s["default"])(e.target),n=t.data("grav-array-action");this._setTemplate(t),this[n+"Action"](t)}},{key:"addAction",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]');n.after(t.getNewRow())}},{key:"remAction",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]'),r=!n.siblings().length;if(r){var i=(0,s["default"])(t.getNewRow());n.after(i),i.find('[data-grav-array-type="value"]:last').attr("name",t.getName())}n.remove(),this.refreshNames(t)}},{key:"refreshNames",value:function(e){if(e.isValueOnly()){var t=e.container.find('> div > [data-grav-array-type="row"]'),n=t.find('[name]:not([name=""])');n.each(function(e,t){t=(0,s["default"])(t);var n=t.attr("name");n=n.replace(/\[\d+\]$/,"["+e+"]"),t.attr("name",n)}),n.length||t.find('[data-grav-array-type="value"]').attr("name",e.getName())}}},{key:"getIndexFor",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]');return t.container.find((t.isValueOnly()?"> div ":"")+' > [data-grav-array-type="row"]').index(n)}},{key:"_setTemplate",value:function(e){e.data("array-template")||e.data("array-template",new c(e.closest("[data-grav-array-name]")))}}]),e}();t["default"]=l;t.Instance=new l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var o=function(){function e(e,t){for(var n=0;n .collection-actions [data-action="add"]',function(e){return t.addItem(e)}),e.on("click",'> ul > li > .item-actions [data-action="delete"]',function(e){return t.removeItem(e)}),e.find("[data-collection-holder]").each(function(e,n){n=(0,s["default"])(n),n.data("collection-sort")||n[0].hasAttribute("data-collection-nosort")||n.data("collection-sort",new c["default"](n.get(0),{forceFallback:!1,animation:150,filter:".CodeMirror, .grav-editor-resizer",onUpdate:function(){return t.reindex(n)}}))})}},{key:"addItem",value:function(e){var t=(0,s["default"])(e.currentTarget),n=t.closest('[data-type="collection"]'),r=(0,s["default"])(n.find('> [data-collection-template="new"]').data("collection-template-html"));n.find("> [data-collection-holder]").append(r),this.reindex(n),(0,s["default"])('[data-grav-field="toggleable"] input[type="checkbox"]').trigger("change")}},{key:"removeItem",value:function(e){var t=(0,s["default"])(e.currentTarget),n=t.closest("[data-collection-item]"),r=t.closest('[data-type="collection"]');n.remove(),this.reindex(r)}},{key:"reindex",value:function(e){e=(0,s["default"])(e).closest('[data-type="collection"]');var t=e.find("> ul > [data-collection-item]");t.each(function(e,t){t=(0,s["default"])(t),t.attr("data-collection-key",e),["name","data-grav-field-name","for","id"].forEach(function(e){t.find("["+e+"]").each(function(){var t=(0,s["default"])(this),n=[];t.parents("[data-collection-key]").map(function(e,t){return n.push((0,s["default"])(t).attr("data-collection-key"))}),n.reverse();var r=t.attr(e).replace(/\[(\d+|\*)\]/g,function(){return"["+n.shift()+"]"});r=r.replace(/\.(\d+|\*)\./g,function(){return"."+n.shift()+"."}),t.attr(e,r)})})})}},{key:"_onAddedNodes",value:function(e,t){var n=this,r=(0,s["default"])(t).find('[data-type="collection"]');r.length&&r.each(function(e,t){t=(0,s["default"])(t),~n.lists.index(t)||n.addList(t)})}}]),e}();t["default"]=l;t.Instance=new l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var o=function(){function e(e,t){for(var n=0;n-1,p=(0,s["default"])("body"),m="mousedown touchstart MSPointerDown pointerdown",v="mousemove touchmove MSPointerMove pointermove",g="mouseup touchend MSPointerUp pointerup",_=h?"focus":"focusin",y=function(){function e(t){var n=this;i(this,e),this.selector=t,this.field=(0,s["default"])(this.selector),this.options=Object.assign({},this.field.data("grav-colorpicker")),this.built=!1,this.attach(),this.options.update&&this.field.on("change._grav_colorpicker",function(e,t,r,i){var o=r,a=(0,d.hex2rgb)(r);1>i&&(o="rgba("+a.r+", "+a.g+", "+a.b+", "+i+")");var s=t.closest(n.options.update);s.length||(s=t.siblings(n.options.update)),s.length||(s=t.parent(".g-colorpicker").find(n.options.update)),s.css({backgroundColor:o})})}return o(e,[{key:"attach",value:function(){var e=this;p.on(_,this.selector,function(t){return e.show(t,t.currentTarget)}),p.on(m,".g-colorpicker, .g-colorpicker i",this.bound("iconClick")),p.on("keydown",this.selector,function(t){switch(t.keyCode){case 9:e.hide();break;case 13:case 27:e.hide(),t.currentTarget.blur()}return!0}),p.on("keyup",this.selector,function(t){return e.updateFromInput(!0,t.currentTarget),!0}),p.on("paste",this.selector,function(t){setTimeout(function(){return e.updateFromInput(!0,t.currentTarget)},1)})}},{key:"show",value:function(e,t){t=(0,s["default"])(t),this.built||this.build(),this.element=t,this.reposition(),this.wrapper.addClass("cp-visible"),this.updateFromInput();var n=(0,s["default"])("#admin-main .content-wrapper").data("scrollbar").getViewElement();this.wrapper.on(m,".cp-grid, .cp-slider, .cp-opacity-slider",this.bound("bodyDown")),p.on(v,this.bound("bodyMove")),p.on(m,this.bound("bodyClick")),p.on(g,this.bound("targetReset")),(0,s["default"])(n).on("scroll",this.bound("reposition"))}},{key:"hide",value:function(){if(this.built){this.wrapper.removeClass("cp-visible");var e=(0,s["default"])("#admin-main .content-wrapper").data("scrollbar").getViewElement();this.wrapper.undelegate(m,".cp-grid, .cp-slider, .cp-opacity-slider",this.bound("bodyDown")),p.off(v,this.bound("bodyMove")),p.off(m,this.bound("bodyClick")),p.off(g,this.bound("targetReset")),(0,s["default"])(e).off("scroll",this.bound("reposition"))}}},{key:"build",value:function(){var e=this;this.wrapper=(0,s["default"])('
'),this.slider=(0,s["default"])('
').appendTo(this.wrapper).append((0,s["default"])('
')),this.opacitySlider=(0,s["default"])('
').appendTo(this.wrapper).append((0,s["default"])('
')),this.grid=(0,s["default"])('
').appendTo(this.wrapper).append((0,s["default"])('
')).append((0,s["default"])('
')),(0,s["default"])("
").appendTo(this.grid.find(".cp-picker"));var t=(0,s["default"])('
').appendTo(this.wrapper);this.tabs={hue:(0,s["default"])('
').text("HUE").appendTo(t),brightness:(0,s["default"])('
').text("BRI").appendTo(t),saturation:(0,s["default"])('
').text("SAT").appendTo(t),wheel:(0,s["default"])('
').text("WHEEL").appendTo(t),transparent:(0,s["default"])('
').text("TRANSPARENT").appendTo(t)},t.on(m,"> div",function(n){var r=(0,s["default"])(n.currentTarget);if(r.is(e.tabs.transparent)){var i=e.opacitySlider.height();return e.opacity=0,e.opacitySlider.find(".cp-picker").css({top:(0,c["default"])(i-i*e.opacity,0,i)}),void e.move(e.opacitySlider,{manualOpacity:!0})}var o=t.find(".active"),a=o.attr("class").replace(/\s|active|cp-tab-/g,""),u=r.attr("class").replace(/\s|active|cp-tab-/g,"");e.wrapper.removeClass("cp-mode-"+a).addClass("cp-mode-"+u),o.removeClass("active"),r.addClass("active"),e.mode=u,e.updateFromInput()}),this.wrapper.appendTo(".content-wrapper"),this.built=!0,this.mode="hue"}},{key:"reposition",value:function(){var e=(0,s["default"])(".content-wrapper")[0],t=this.element[0].getBoundingClientRect(),n=e.getBoundingClientRect(),r={x:0,y:0};this.options.offset&&(r.x=this.options.offset.x||0,r.y=this.options.offset.y||0),this.wrapper.css({top:t.top+t.height+e.scrollTop-n.top+r.y,left:t.left+e.scrollLeft-n.left+r.x})}},{key:"iconClick",value:function(e){if(this.wrapper&&this.wrapper.hasClass("cp-visible"))return!0;e&&e.preventDefault();var t=(0,s["default"])(e.currentTarget).find("input");setTimeout(function(){return t.focus()},50)}},{key:"bodyMove",value:function(e){e&&e.preventDefault(),this.target&&this.move(this.target,e)}},{key:"bodyClick",value:function(e){var t=(0,s["default"])(e.target);t.closest(".cp-wrapper").length||t.is(this.selector)||this.hide()}},{key:"bodyDown",value:function(e){e&&e.preventDefault(),this.target=(0,s["default"])(e.currentTarget),this.move(this.target,e,!0)}},{key:"targetReset",value:function(e){e&&e.preventDefault(),this.target=null}},{key:"move",value:function(e,t){var n=this.element,r=e.find(".cp-picker"),i=e[0].getBoundingClientRect(),o=i.left+window.scrollX,a=i.top+window.scrollY,s=Math.round((t?t.pageX:0)-o),u=Math.round((t?t.pageY:0)-a),c=void 0,l=void 0,f=void 0,d=void 0,h=t.changedTouches||t.originalEvent&&t.originalEvent.changedTouches;t&&h&&(s=(h?h[0].pageX:0)-o,u=(h?h[0].pageY:0)-a),t&&t.manualOpacity&&(u=i.height),0>s&&(s=0),0>u&&(u=0),s>i.width&&(s=i.width),u>i.height&&(u=i.height),e.parent(".cp-mode-wheel").length&&r.parent(".cp-grid").length&&(c=75-s,l=75-u,f=Math.sqrt(c*c+l*l),d=Math.atan2(l,c),0>d&&(d+=2*Math.PI),f>75&&(s=75-75*Math.cos(d),u=75-75*Math.sin(d)),s=Math.round(s),u=Math.round(u)),e.hasClass("cp-grid")?(r.css({top:u,left:s}),this.updateFromPicker(n,e)):(r.css({top:u}),this.updateFromPicker(n,e))}},{key:"updateFromInput",value:function(e,t){t=t?(0,s["default"])(t):this.element;var n=t.val(),r=n.replace(/\s/g,"").match(/^rgba?\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},(.+)\)/),i=void 0,o=void 0;if(n=(0,d.rgbstr2hex)(n)||n,r=r?(0,c["default"])(r[1],0,1):1,(i=(0,d.parseHex)(n))||(i="#ffffff"),o=(0,d.hex2hsb)(i),this.built){this.opacity=r;var a=this.opacitySlider.height();this.opacitySlider.find(".cp-picker").css({top:(0,c["default"])(a-a*this.opacity,0,a)});var u=this.grid.height(),l=this.grid.width(),f=void 0,h=void 0,p=void 0,m=void 0;switch(a=this.slider.height(),this.mode){case"wheel":f=(0,c["default"])(Math.ceil(.75*o.s),0,u/2),h=o.h*Math.PI/180,p=(0,c["default"])(75-Math.cos(h)*f,0,l),m=(0,c["default"])(75-Math.sin(h)*f,0,u),this.grid.css({backgroundColor:"transparent"}).find(".cp-picker").css({top:m,left:p}),m=150-o.b/(100/u),""===i&&(m=0),this.slider.find(".cp-picker").css({top:m}),this.slider.css({backgroundColor:(0,d.hsb2hex)({h:o.h,s:o.s,b:100})});break;case"saturation":p=(0,c["default"])(5*o.h/12,0,150),m=(0,c["default"])(u-Math.ceil(o.b/(100/u)),0,u),this.grid.find(".cp-picker").css({top:m,left:p}),m=(0,c["default"])(a-o.s*(a/100),0,a),this.slider.find(".cp-picker").css({top:m}),this.slider.css({backgroundColor:(0,d.hsb2hex)({h:o.h,s:100,b:o.b})}),this.grid.find(".cp-grid-inner").css({opacity:o.s/100});break;case"brightness":p=(0,c["default"])(5*o.h/12,0,150),m=(0,c["default"])(u-Math.ceil(o.s/(100/u)),0,u),this.grid.find(".cp-picker").css({top:m,left:p}),m=(0,c["default"])(a-o.b*(a/100),0,a),this.slider.find(".cp-picker").css({top:m}),this.slider.css({backgroundColor:(0,d.hsb2hex)({h:o.h,s:o.s,b:100})}),this.grid.find(".cp-grid-inner").css({opacity:1-o.b/100});break;case"hue":default:p=(0,c["default"])(Math.ceil(o.s/(100/l)),0,l),m=(0,c["default"])(u-Math.ceil(o.b/(100/u)),0,u),this.grid.find(".cp-picker").css({top:m,left:p}),m=(0,c["default"])(a-o.h/(360/a),0,a),this.slider.find(".cp-picker").css({top:m}),this.grid.css({backgroundColor:(0,d.hsb2hex)({h:o.h,s:100,b:100})})}}e||t.val(this.getValue(i)),(this.element||t).trigger("change._grav_colorpicker",[t,i,r])}},{key:"updateFromPicker",value:function(e,t){var n=function(e,t){var n,r;return e.length&&t?(n=e[0].getBoundingClientRect().left,r=e[0].getBoundingClientRect().top,{x:n-t[0].getBoundingClientRect().left+e[0].offsetWidth/2,y:r-t[0].getBoundingClientRect().top+e[0].offsetHeight/2}):null},r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,u=void 0,l=void 0,f=void 0,h=this.wrapper.find(".cp-grid"),p=this.wrapper.find(".cp-slider"),m=this.wrapper.find(".cp-opacity-slider"),v=h.find(".cp-picker"),g=p.find(".cp-picker"),_=m.find(".cp-picker"),y=n(v,h),b=n(g,p),k=n(_,m),x=h[0].getBoundingClientRect().width,w=h[0].getBoundingClientRect().height,S=p[0].getBoundingClientRect().height,A=m[0].getBoundingClientRect().height,E=this.element.val();if(E=(0,d.rgbstr2hex)(E)||E,(r=(0,d.parseHex)(E))||(r="#ffffff"),t.hasClass("cp-grid")||t.hasClass("cp-slider"))switch(this.mode){case"wheel":s=x/2-y.x,u=w/2-y.y,l=Math.sqrt(s*s+u*u),f=Math.atan2(u,s),0>f&&(f+=2*Math.PI),l>75&&(l=75,y.x=69-75*Math.cos(f),y.y=69-75*Math.sin(f)),o=(0,c["default"])(l/.75,0,100),i=(0,c["default"])(180*f/Math.PI,0,360),a=(0,c["default"])(100-Math.floor(b.y*(100/S)),0,100),r=(0,d.hsb2hex)({h:i,s:o,b:a}),p.css({backgroundColor:(0,d.hsb2hex)({h:i,s:o,b:100})});break;case"saturation":i=(0,c["default"])(parseInt(y.x*(360/x),10),0,360),o=(0,c["default"])(100-Math.floor(b.y*(100/S)),0,100),a=(0,c["default"])(100-Math.floor(y.y*(100/w)),0,100),r=(0,d.hsb2hex)({h:i,s:o,b:a}),p.css({backgroundColor:(0,d.hsb2hex)({h:i,s:100,b:a})}),h.find(".cp-grid-inner").css({opacity:o/100});break;case"brightness":i=(0,c["default"])(parseInt(y.x*(360/x),10),0,360),o=(0,c["default"])(100-Math.floor(y.y*(100/w)),0,100),a=(0,c["default"])(100-Math.floor(b.y*(100/S)),0,100),r=(0,d.hsb2hex)({h:i,s:o,b:a}),p.css({backgroundColor:(0,d.hsb2hex)({h:i,s:o,b:100})}),h.find(".cp-grid-inner").css({opacity:1-a/100});break;default:i=(0,c["default"])(360-parseInt(b.y*(360/S),10),0,360),o=(0,c["default"])(Math.floor(y.x*(100/x)),0,100),a=(0,c["default"])(100-Math.floor(y.y*(100/w)),0,100),r=(0,d.hsb2hex)({h:i,s:o,b:a}),h.css({backgroundColor:(0,d.hsb2hex)({h:i,s:100,b:100})})}t.hasClass("cp-opacity-slider")&&(this.opacity=parseFloat(1-k.y/A).toFixed(2)),e.val(this.getValue(r)),this.element.trigger("change._grav_colorpicker",[this.element,r,this.opacity])}},{key:"getValue",value:function(e){if(1===this.opacity)return e;var t=(0,d.hex2rgb)(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+this.opacity+")"}},{key:"bound",value:function t(e){var t=this._bound||(this._bound={});return t[e]||(t[e]=(0,f["default"])(this[e],this))}}]),e}();t["default"]=y;t.Instance=new y("[data-grav-colorpicker]")},function(e,t){function n(e,t,n){return t>e?t:e>n?n:e}e.exports=n},function(e,t,n){function r(e,t,n){var r=i(arguments,2);return function(){return e.apply(t,r.concat(i(arguments)))}}var i=n(493);e.exports=r},function(e,t){function n(e,t,n){var r=e.length;t=null==t?0:0>t?Math.max(r+t,0):Math.min(t,r),n=null==n?r:0>n?Math.max(r+n,0):Math.min(n,r);for(var i=[];n>t;)i.push(e[t++]);return i}e.exports=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(t.parseHex=function(e){return e=e.replace(/[^A-F0-9]/gi,""),3!==e.length&&6!==e.length?"":(3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),"#"+e.toLowerCase())},t.hsb2rgb=function(e){var t={},n=Math.round(e.h),r=Math.round(255*e.s/100),i=Math.round(255*e.b/100);if(0===r)t.r=t.g=t.b=i;else{var o=i,a=(255-r)*i/255,s=(o-a)*(n%60)/60;360===n&&(n=0),60>n?(t.r=o,t.b=a,t.g=a+s):120>n?(t.g=o,t.b=a,t.r=o-s):180>n?(t.g=o,t.r=a,t.b=a+s):240>n?(t.b=o,t.r=a,t.g=o-s):300>n?(t.b=o,t.g=a,t.r=a+s):360>n?(t.r=o,t.g=a,t.b=o-s):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}),r=t.rgb2hex=function(e){var t=[e.r.toString(16),e.g.toString(16),e.b.toString(16)];return t.forEach(function(e,n){1===e.length&&(t[n]="0"+e)}),"#"+t.join("")},i=(t.rgbstr2hex=function(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""},t.hsb2hex=function(e){return r(n(e))},t.hex2hsb=function(e){ var t=i(o(e));return 0===t.s&&(t.h=360),t},t.rgb2hsb=function(e){var t={h:0,s:0,b:0},n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),i=r-n;return t.b=r,t.s=0!==r?255*i/r:0,0!==t.s?e.r===r?t.h=(e.g-e.b)/i:e.g===r?t.h=2+(e.b-e.r)/i:t.h=4+(e.r-e.g)/i:t.h=-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}),o=t.hex2rgb=function(e){return e=parseInt(e.indexOf("#")>-1?e.substring(1):e,16),{r:e>>16,g:(65280&e)>>8,b:255&e}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var o=function(){function e(e,t){for(var n=0;n -
-