diff --git a/themes/grav/app/forms/fields/collections.js b/themes/grav/app/forms/fields/collections.js index e4348e21..c759fe26 100644 --- a/themes/grav/app/forms/fields/collections.js +++ b/themes/grav/app/forms/fields/collections.js @@ -83,7 +83,7 @@ export default class CollectionsField { new RegExp('\\.(\\d+|\\*|' + currentKey + ')\\.', 'g') ]; - if (!observedValue) { + if (hasCustomKey && !observedValue) { element.attr(`_${prop}`, element.attr(prop)); element.attr(prop, null); return; diff --git a/themes/grav/js/admin.min.js b/themes/grav/js/admin.min.js index 743f5096..58855e80 100644 --- a/themes/grav/js/admin.min.js +++ b/themes/grav/js/admin.min.js @@ -8,7 +8,7 @@ for(var n=0;n!?|\/]/,T=u.endStatement||/^[;:,]$/;return{startState:function(t){return{tokenize:null,context:new e((t||0)-m,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(t,e){var a=e.context;if(t.sol()&&(null==a.align&&(a.align=!1),e.indented=t.indentation(),e.startOfLine=!0),t.eatSpace())return d(t,e),null;h=p=null;var s=(e.tokenize||c)(t,e);if("comment"==s||"meta"==s)return s;if(null==a.align&&(a.align=!0),T.test(h))for(;"statement"==e.context.type;)r(e);else if("{"==h)n(e,t.column(),"}");else if("["==h)n(e,t.column(),"]");else if("("==h)n(e,t.column(),")");else if("}"==h){for(;"statement"==a.type;)a=r(e);for("}"==a.type&&(a=r(e));"statement"==a.type;)a=r(e)}else h==a.type?r(e):A&&(("}"==a.type||"top"==a.type)&&";"!=h||"statement"==a.type&&"newstatement"==h)&&n(e,t.column(),"statement",t.current());if("variable"==s&&("def"==e.prevToken||u.typeFirstDefinitions&&i(t,e,t.start)&&o(e.context)&&t.match(/^\s*\(/,!1))&&(s="def"),S.token){var l=S.token(t,e,s);void 0!==l&&(s=l)}return"def"==s&&u.styleDefs===!1&&(s="variable"),e.startOfLine=!1,e.prevToken=p?"def":s||h,d(t,e),s},indent:function(e,n){if(e.tokenize!=c&&null!=e.tokenize||e.typeAtEndOfLine)return t.Pass;var r=e.context,i=n&&n.charAt(0);if("statement"==r.type&&"}"==i&&(r=r.prev),u.dontIndentStatements)for(;"statement"==r.type&&u.dontIndentStatements.test(r.info);)r=r.prev;if(S.indent){var o=S.indent(e,r,n);if("number"==typeof o)return o}var a=i==r.type,s=r.prev&&"switch"==r.prev.info;if(u.allmanIndentation&&/[{(]/.test(i)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==i?0:v):!r.align||g&&")"==r.type?")"!=r.type||a?r.indented+(a?0:m)+(a||!s||/^(?:case|default)\b/.test(n)?0:m):r.indented+v:r.column+(a?0:1)},electricInput:M?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var y="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",b="int long char short double float unsigned signed void size_t ptrdiff_t";m(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:a(y),types:a(b+" 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:a("case do else for if switch while struct"),defKeywords:a("struct"),typeFirstDefinitions:!0,atoms:a("null true false"),hooks:{"#":u,"*":c},modeProps:{fold:["brace","include"]}}),m(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:a(y+" 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:a(b+" bool wchar_t"),blockKeywords:a("catch class do else finally for if struct switch try while"),defKeywords:a("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:a("true false null"),dontIndentStatements:/^template$/,hooks:{"#":u,"*":c,u:f,U:f,L:f,R:f,0:l,1:l,2:l,3:l,4:l,5:l,6:l,7:l,8:l,9:l,token:function(t,e,n){return"variable"!=n||"("!=t.peek()||";"!=e.prevToken&&null!=e.prevToken&&"}"!=e.prevToken||!d(t.current())?void 0:"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),m("text/x-java",{name:"clike",keywords:a("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:a("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:a("catch class do else finally for if switch try while"),defKeywords:a("class interface package enum"),typeFirstDefinitions:!0,atoms:a("true false null"),endStatement:/^[;:]$/,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(t){return t.eatWhile(/[\w\$_]/),"meta"}},modeProps:{fold:["brace","import"]}}),m("text/x-csharp",{name:"clike",keywords:a("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:a("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:a("catch class do else finally for foreach if struct switch try while"),defKeywords:a("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"@":function(t,e){return t.eat('"')?(e.tokenize=h,h(t,e)):(t.eatWhile(/[\w\$_]/),"meta")}}}),m("text/x-scala",{name:"clike",keywords:a("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:a("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:a("catch class do else finally for forSome if match switch try while"),defKeywords:a("class def object package trait type val var"),atoms:a("true false null"),indentStatements:!1,indentSwitch:!1,hooks:{"@":function(t){return t.eatWhile(/[\w\$_]/),"meta"},'"':function(t,e){return t.match('""')?(e.tokenize=v,e.tokenize(t,e)):!1},"'":function(t){return t.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(t,n){var r=n.context;return"}"==r.type&&r.align&&t.eat(">")?(n.context=new e(r.indented,r.column,r.type,r.info,null,r.prev),"operator"):!1}},modeProps:{closeBrackets:{triples:'"'}}}),m("text/x-kotlin",{name:"clike",keywords:a("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:a("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:a("catch class do else finally for if where try while enum"),defKeywords:a("class val var object package interface fun"),atoms:a("true false null this"),hooks:{'"':function(t,e){return e.tokenize=g(t.match('""')),e.tokenize(t,e)}},modeProps:{closeBrackets:{triples:'"'}}}),m(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:a("for while do if else struct"),builtin:a("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:a("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:{"#":u},modeProps:{fold:["brace","include"]}}),m("text/x-nesc",{name:"clike",keywords:a(y+"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:a(b),blockKeywords:a("case do else for if switch while struct"),atoms:a("null true false"),hooks:{"#":u},modeProps:{fold:["brace","include"]}}),m("text/x-objectivec",{name:"clike",keywords:a(y+"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:a(b),atoms:a("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(t){return t.eatWhile(/[\w\$]/),"keyword"},"#":u,indent:function(t,e,n){return"statement"==e.type&&/^@\w/.test(n)?e.indented:void 0}},modeProps:{fold:"brace"}}),m("text/x-squirrel",{name:"clike",keywords:a("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:a(b),blockKeywords:a("case catch class else for foreach if switch try while"),defKeywords:a("function local class"),typeFirstDefinitions:!0,atoms:a("true false null"),hooks:{"#":u},modeProps:{fold:["brace","include"]}});var k=null;m("text/x-ceylon",{name:"clike",keywords:a("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(t){var e=t.charAt(0);return e===e.toUpperCase()&&e!==e.toLowerCase()},blockKeywords:a("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:a("class dynamic function interface module object package value"),builtin:a("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:a("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(t){return t.eatWhile(/[\w\$_]/),"meta"},'"':function(t,e){return e.tokenize=_(t.match('""')?"triple":"single"),e.tokenize(t,e)},"`":function(t,e){return k&&t.match("`")?(e.tokenize=k,k=null,e.tokenize(t,e)):!1},"'":function(t){return t.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(t,e,n){return"variable"!=n&&"variable-3"!=n||"."!=e.prevToken?void 0:"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})},function(t,e,n){!function(t){t(n(354))}(function(t){"use strict";t.defineMode("sass",function(t){function e(t){return new RegExp("^"+t.join("|"))}function n(t,e){var n=t.peek();return")"===n?(t.next(),e.tokenizer=u,"operator"):"("===n?(t.next(),t.eatSpace(),"operator"):"'"===n||'"'===n?(e.tokenizer=i(t.next()),"string"):(e.tokenizer=i(")",!1),"string")}function r(t,e){return function(n,r){return n.sol()&&n.indentation()<=t?(r.tokenizer=u,u(n,r)):(e&&n.skipTo("*/")?(n.next(),n.next(),r.tokenizer=u):n.skipToEnd(),"comment")}}function i(t,e){function n(r,i){var a=r.next(),s=r.peek(),c=r.string.charAt(r.pos-2),l="\\"!==a&&s===t||a===t&&"\\"!==c;return l?(a!==t&&e&&r.next(),i.tokenizer=u,"string"):"#"===a&&"{"===s?(i.tokenizer=o(n),r.next(),"operator"):"string"}return null==e&&(e=!0),n}function o(t){return function(e,n){return"}"===e.peek()?(e.next(),n.tokenizer=t,"operator"):u(e,n)}}function a(e){if(0==e.indentCount){e.indentCount++;var n=e.scopes[0].offset,r=n+t.indentUnit;e.scopes.unshift({offset:r})}}function s(t){1!=t.scopes.length&&t.scopes.shift()}function u(t,e){var c=t.peek();if(t.match("/*"))return e.tokenizer=r(t.indentation(),!0),e.tokenizer(t,e);if(t.match("//"))return e.tokenizer=r(t.indentation(),!1),e.tokenizer(t,e);if(t.match("#{"))return e.tokenizer=o(u),"operator";if('"'===c||"'"===c)return t.next(),e.tokenizer=i(c),"string";if(e.cursorHalf){if("#"===c&&(t.next(),t.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return t.peek()||(e.cursorHalf=0),"number";if(t.match(/^-?[0-9\.]+/))return t.peek()||(e.cursorHalf=0),"number";if(t.match(/^(px|em|in)\b/))return t.peek()||(e.cursorHalf=0),"unit";if(t.match(f))return t.peek()||(e.cursorHalf=0),"keyword";if(t.match(/^url/)&&"("===t.peek())return e.tokenizer=n,t.peek()||(e.cursorHalf=0),"atom";if("$"===c)return t.next(),t.eatWhile(/[\w-]/),t.peek()||(e.cursorHalf=0),"variable-3";if("!"===c)return t.next(),t.peek()||(e.cursorHalf=0),t.match(/^[\w]+/)?"keyword":"operator";if(t.match(h))return t.peek()||(e.cursorHalf=0),"operator";if(t.eatWhile(/[\w-]/))return t.peek()||(e.cursorHalf=0),"attribute";if(!t.peek())return e.cursorHalf=0,null}else{if("."===c){if(t.next(),t.match(/^[\w-]+/))return a(e),"atom";if("#"===t.peek())return a(e),"atom"}if("#"===c){if(t.next(),t.match(/^[\w-]+/))return a(e),"atom";if("#"===t.peek())return a(e),"atom"}if("$"===c)return t.next(),t.eatWhile(/[\w-]/),"variable-2";if(t.match(/^-?[0-9\.]+/))return"number";if(t.match(/^(px|em|in)\b/))return"unit";if(t.match(f))return"keyword";if(t.match(/^url/)&&"("===t.peek())return e.tokenizer=n,"atom";if("="===c&&t.match(/^=[\w-]+/))return a(e),"meta";if("+"===c&&t.match(/^\+[\w-]+/))return"variable-3";if("@"===c&&t.match(/@extend/)&&(t.match(/\s*[\w]/)||s(e)),t.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return a(e),"meta";if("@"===c)return t.next(),t.eatWhile(/[\w-]/),"meta";if(t.eatWhile(/[\w-]/))return t.match(/ *: *[\w-\+\$#!\("']/,!1)?"property":t.match(/ *:/,!1)?(a(e),e.cursorHalf=1,"atom"):t.match(/ *,/,!1)?"atom":(a(e),"atom");if(":"===c)return t.match(p)?"keyword":(t.next(),e.cursorHalf=1,"operator")}return t.match(h)?"operator":(t.next(),null)}function c(e,n){e.sol()&&(n.indentCount=0);var r=n.tokenizer(e,n),i=e.current();if("@return"!==i&&"}"!==i||s(n),null!==r){for(var o=e.pos-i.length,a=o+t.indentUnit*n.indentCount,u=[],c=0;c","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],h=e(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(t,e){var n=c(t,e);return e.lastToken={style:n,content:t.current()},n},indent:function(t){return t.scopes[0].offset}}}),t.defineMIME("text/x-sass","sass")})},function(t,e,n){!function(t){t(n(354),n(403))}(function(t){"use strict";t.defineMode("twig:inner",function(){function t(t,a){var s=t.peek();if(a.incomment)return t.skipTo("#}")?(t.eatWhile(/\#|}/),a.incomment=!1):t.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,t.match(i))return"atom";if(t.match(o))return"number"}if(a.sign){if(a.sign=!1,t.match(i))return"atom";if(t.match(o))return"number"}if(a.instring)return s==a.instring&&(a.instring=!1),t.next(),"string";if("'"==s||'"'==s)return a.instring=s,t.next(),"string";if(t.match(a.intag+"}")||t.eat("-")&&t.match(a.intag+"}"))return a.intag=!1,"tag";if(t.match(n))return a.operator=!0,"operator";if(t.match(r))a.sign=!0;else if(t.eat(" ")||t.sol()){if(t.match(e))return"keyword";if(t.match(i))return"atom";if(t.match(o))return"number";t.sol()&&t.next()}else t.next();return"variable"}if(t.eat("{")){if(s=t.eat("#"))return a.incomment=!0,t.skipTo("#}")?(t.eatWhile(/\#|}/),a.incomment=!1):t.skipToEnd(),"comment";if(s=t.eat(/\{|%/))return a.intag=s,"{"==s&&(a.intag="}"),t.eat("-"),"tag"}t.next()}var e=["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 e=new RegExp("(("+e.join(")|(")+"))\\b"),i=new RegExp("(("+i.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(e,n){return t(e,n)}}}),t.defineMode("twig",function(e,n){var r=t.getMode(e,"twig:inner");return n&&n.base?t.multiplexingMode(t.getMode(e,n.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:r,parseDelimiters:!0}):r}),t.defineMIME("text/x-twig","twig")})},function(t,e,n){!function(t){t(n(354))}(function(t){"use strict";t.multiplexingMode=function(e){function n(t,e,n,r){if("string"==typeof e){var i=t.indexOf(e,n);return r&&i>-1?i+e.length:i}var o=e.exec(n?t.slice(n):t);return o?o.index+n+(r?o[0].length:0):-1}var r=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:t.startState(e),innerActive:null,inner:null}},copyState:function(n){return{outer:t.copyState(e,n.outer),innerActive:n.innerActive,inner:n.innerActive&&t.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=e.token(i,o.outer);return l!=1/0&&(i.string=s),h},indent:function(n,r){var i=n.innerActive?n.innerActive.mode:e;return i.indent?i.indent(n.innerActive?n.inner:n.outer,r):t.Pass},blankLine:function(n){var i=n.innerActive?n.innerActive.mode:e;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 t.skipToEnd(),"string";if(n.literal&&(n.literal=!1),t.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,t.match(/---/))return"def";if(t.match(/\.\.\./))return"def";if(t.match(/\s*-\s+/))return"meta"}if(t.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return t.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,t.next(),"meta";if(n.pairStart){if(t.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&t.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(t.match(e))return"keyword"}return!n.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=t.indentation(),"atom"):n.pair&&t.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,t.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),t.defineMIME("text/x-yaml","yaml")})},function(t,e,n){!function(t){t(n(354))}(function(t){"use strict";var e=/^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;t.commands.newlineAndIndentContinueMarkdownList=function(i){if(i.getOption("disableInput"))return t.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(t,e,n){!function(t){t(n(354))}(function(t){"use strict";function e(t){for(var e=0;e1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(e,i,t)}function m(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){h(t)},e.options.delay||500))}function v(t,e){for(var n=e.target||e.srcElement,r=document.createDocumentFragment(),o=0;o=0&&y.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",o(t,e),e}function u(t){var e=document.createElement("link");return e.rel="stylesheet",o(t,e),e}function c(t,e){var n,r,i;if(e.singleton){var o=_++;n=g||(g=s(e)),r=l.bind(null,n,o,!1),i=l.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(e),r=d.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),r=f.bind(null,n),i=function(){a(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function l(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function f(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function d(t,e){var n=e.css,r=e.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=t.href;t.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var h={},p=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},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=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=m()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=i(t);return r(n,e),function(t){for(var o=[],a=0;a0){var l=o.character;u.forEach(function(t){l>t&&(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:t.Pos(o.line-1,f),to:t.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"];t.registerHelper("lint","javascript",e)})},function(t,e,n){!function(t){t(n(354))}(function(t){"use strict";t.registerHelper("lint","json",function(e){var n=[];jsonlint.parseError=function(e,r){var i=r.loc;n.push({from:t.Pos(i.first_line-1,i.first_column),to:t.Pos(i.last_line-1,i.last_column),message:e})};try{jsonlint.parse(e)}catch(r){}return n})})},function(t,e,n){!function(t){t(n(354))}(function(t){"use strict";t.registerHelper("lint","yaml",function(e){var n=[];try{jsyaml.load(e)}catch(r){var i=r.mark;n.push({from:t.Pos(i.line,i.column),to:t.Pos(i.line,i.column),message:r.message})}return n})})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(1),o=r(i);(0,o["default"])('[name="task"][value="saveas"], [name="task"][value="switchlanguage"]').on("mousedown touchstart",function(t){var e=["lang","redirect"],n=(0,o["default"])(t.currentTarget),r=(0,o["default"])("#"+n.attr("form"));return r.length?(e.forEach(function(t){var e=n.attr(t);if(e){var i=r.find('[name="data['+t+']"]');i.length||(i=(0,o["default"])(''),r.append(i)),i.val(e)}}),!0):void 0})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(418),o=r(i),a=n(424),s=r(a),u=n(425),c=r(u);e["default"]={Form:{Form:s["default"],Instance:a.Instance},Fields:c["default"],FormState:{FormState:o["default"],Instance:i.Instance}}},function(t,e,n){(function(t){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.DOMBehaviors=e.Instance=void 0;var o=function(){function t(t,e){for(var n=0;ni;i++)r[i]=t[i+e];return r}function p(t){return void 0===t.size&&(t.size=t.__iterate(v)),t.size}function m(t,e){if("number"!=typeof e){var n=e>>>0;if(""+n!==e||4294967295===n)return NaN;e=n}return 0>e?p(t)+e:e}function v(){return!0}function g(t,e,n){return(0===t||void 0!==n&&-n>=t)&&(void 0===e||void 0!==n&&e>=n)}function _(t,e){return b(t,e,0)}function y(t,e){return b(t,e,e)}function b(t,e,n){return void 0===t?n:0>t?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}function k(t){this.next=t}function x(t,e,n,r){var i=0===t?e:1===t?n:[e,n];return r?r.value=i:r={value:i,done:!1},r}function w(){return{value:void 0,done:!0}}function S(t){return!!M(t)}function E(t){return t&&"function"==typeof t.next}function A(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(wn&&t[wn]||t[Sn]);return"function"==typeof e?e:void 0}function I(t){return t&&"number"==typeof t.length}function O(t){return null===t||void 0===t?q():o(t)?t.toSeq():U(t)}function P(t){return null===t||void 0===t?q().toKeyedSeq():o(t)?a(t)?t.toSeq():t.fromEntrySeq():F(t)}function C(t){return null===t||void 0===t?q():o(t)?a(t)?t.entrySeq():t.toIndexedSeq():R(t)}function j(t){return(null===t||void 0===t?q():o(t)?a(t)?t.entrySeq():t:R(t)).toSetSeq()}function T(t){this._array=t,this.size=t.length}function z(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function D(t){this._iterable=t,this.size=t.length||t.size}function L(t){this._iterator=t,this._iteratorCache=[]}function N(t){return!(!t||!t[An])}function q(){return Mn||(Mn=new T([]))}function F(t){var e=Array.isArray(t)?new T(t).fromEntrySeq():E(t)?new L(t).fromEntrySeq():S(t)?new D(t).fromEntrySeq():"object"==typeof t?new z(t):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+t);return e}function R(t){var e=B(t);if(!e)throw new TypeError("Expected Array or iterable object of values: "+t);return e}function U(t){var e=B(t)||"object"==typeof t&&new z(t);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+t);return e}function B(t){return I(t)?new T(t):E(t)?new L(t):S(t)?new D(t):void 0}function V(t,e,n,r){var i=t._cache;if(i){for(var o=i.length-1,a=0;o>=a;a++){var s=i[n?o-a:a];if(e(s[1],r?s[0]:a,t)===!1)return a+1}return a}return t.__iterateUncached(e,n)}function H(t,e,n,r){var i=t._cache;if(i){var o=i.length-1,a=0;return new k(function(){var t=i[n?o-a:a];return a++>o?w():x(e,r?t[0]:a-1,t[1])})}return t.__iteratorUncached(e,n)}function G(t,e){return e?K(e,t,"",{"":t}):W(t)}function K(t,e,n,r){return Array.isArray(e)?t.call(r,n,C(e).map(function(n,r){return K(t,n,r,e)})):$(e)?t.call(r,n,P(e).map(function(n,r){return K(t,n,r,e)})):e}function W(t){return Array.isArray(t)?C(t).map(W).toList():$(t)?P(t).map(W).toMap():t}function $(t){return t&&(t.constructor===Object||void 0===t.constructor)}function J(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!("function"!=typeof t.equals||"function"!=typeof e.equals||!t.equals(e))}function Y(t,e){if(t===e)return!0;if(!o(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||a(t)!==a(e)||s(t)!==s(e)||c(t)!==c(e))return!1;if(0===t.size&&0===e.size)return!0;var n=!u(t);if(c(t)){var r=t.entries();return e.every(function(t,e){var i=r.next().value;return i&&J(i[1],t)&&(n||J(i[0],e))})&&r.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var l=t;t=e,e=l}var f=!0,d=e.__iterate(function(e,r){return(n?t.has(e):i?J(e,t.get(r,gn)):J(t.get(r,gn),e))?void 0:(f=!1,!1)});return f&&t.size===d}function X(t,e){if(!(this instanceof X))return new X(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(In)return In;In=this}}function Q(t,e){if(!t)throw new Error(e)}function Z(t,e,n){if(!(this instanceof Z))return new Z(t,e,n);if(Q(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===e&&(e=1/0),n=void 0===n?1:Math.abs(n),t>e&&(n=-n),this._start=t,this._end=e,this._step=n,this.size=Math.max(0,Math.ceil((e-t)/n-1)+1),0===this.size){if(On)return On;On=this}}function tt(){throw TypeError("Abstract")}function et(){}function nt(){}function rt(){}function it(t){return t>>>1&1073741824|3221225471&t}function ot(t){if(t===!1||null===t||void 0===t)return 0;if("function"==typeof t.valueOf&&(t=t.valueOf(),t===!1||null===t||void 0===t))return 0;if(t===!0)return 1;var e=typeof t;if("number"===e){if(t!==t||t===1/0)return 0;var n=0|t;for(n!==t&&(n^=4294967295*t);t>4294967295;)t/=4294967295,n^=t;return it(n)}if("string"===e)return t.length>Nn?at(t):st(t);if("function"==typeof t.hashCode)return t.hashCode();if("object"===e)return ut(t);if("function"==typeof t.toString)return st(t.toString());throw new Error("Value type "+e+" cannot be hashed.")}function at(t){var e=Rn[t];return void 0===e&&(e=st(t),Fn===qn&&(Fn=0,Rn={}),Fn++,Rn[t]=e),e}function st(t){for(var e=0,n=0;n0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function lt(t){Q(t!==1/0,"Cannot perform this action with an infinite size.")}function ft(t){return null===t||void 0===t?xt():dt(t)&&!c(t)?t:xt().withMutations(function(e){var r=n(t);lt(r.size),r.forEach(function(t,n){return e.set(n,t)})})}function dt(t){return!(!t||!t[Un])}function ht(t,e){this.ownerID=t,this.entries=e}function pt(t,e,n){this.ownerID=t,this.bitmap=e,this.nodes=n}function mt(t,e,n){this.ownerID=t,this.count=e,this.nodes=n}function vt(t,e,n){this.ownerID=t,this.keyHash=e,this.entries=n}function gt(t,e,n){this.ownerID=t,this.keyHash=e,this.entry=n}function _t(t,e,n){this._type=e,this._reverse=n,this._stack=t._root&&bt(t._root)}function yt(t,e){return x(t,e[0],e[1])}function bt(t,e){return{node:t,index:0,__prev:e}}function kt(t,e,n,r){var i=Object.create(Bn);return i.size=t,i._root=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function xt(){return Vn||(Vn=kt(0))}function wt(t,e,n){var r,i;if(t._root){var o=l(_n),a=l(yn);if(r=St(t._root,t.__ownerID,0,void 0,e,n,o,a),!a.value)return t;i=t.size+(o.value?n===gn?-1:1:0)}else{if(n===gn)return t;i=1,r=new ht(t.__ownerID,[[e,n]])}return t.__ownerID?(t.size=i,t._root=r,t.__hash=void 0,t.__altered=!0,t):r?kt(i,r):xt()}function St(t,e,n,r,i,o,a,s){return t?t.update(e,n,r,i,o,a,s):o===gn?t:(f(s),f(a),new gt(e,r,[i,o]))}function Et(t){return t.constructor===gt||t.constructor===vt}function At(t,e,n,r,i){if(t.keyHash===r)return new vt(e,r,[t.entry,i]);var o,a=(0===n?t.keyHash:t.keyHash>>>n)&vn,s=(0===n?r:r>>>n)&vn,u=a===s?[At(t,e,n+pn,r,i)]:(o=new gt(e,r,i),s>a?[t,o]:[o,t]);return new pt(e,1<s;s++,u<<=1){var l=e[s];void 0!==l&&s!==r&&(i|=u,a[o++]=l)}return new pt(t,i,a)}function Ot(t,e,n,r,i){for(var o=0,a=new Array(mn),s=0;0!==n;s++,n>>>=1)a[s]=1&n?e[o++]:void 0;return a[r]=i,new mt(t,o+1,a)}function Pt(t,e,r){for(var i=[],a=0;a>1&1431655765,t=(858993459&t)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,127&t}function Lt(t,e,n,r){var i=r?t:h(t);return i[e]=n,i}function Nt(t,e,n,r){var i=t.length+1;if(r&&e+1===i)return t[e]=n,t;for(var o=new Array(i),a=0,s=0;i>s;s++)s===e?(o[s]=n,a=-1):o[s]=t[s+a];return o}function qt(t,e,n){var r=t.length-1;if(n&&e===r)return t.pop(),t;for(var i=new Array(r),o=0,a=0;r>a;a++)a===e&&(o=1),i[a]=t[a+o];return i}function Ft(t){var e=Ht();if(null===t||void 0===t)return e;if(Rt(t))return t;var n=r(t),i=n.size;return 0===i?e:(lt(i),i>0&&mn>i?Vt(0,i,pn,null,new Ut(n.toArray())):e.withMutations(function(t){t.setSize(i),n.forEach(function(e,n){return t.set(n,e)})}))}function Rt(t){return!(!t||!t[Wn])}function Ut(t,e){this.array=t,this.ownerID=e}function Bt(t,e){function n(t,e,n){return 0===e?r(t,n):i(t,e,n)}function r(t,n){var r=n===s?u&&u.array:t&&t.array,i=n>o?0:o-n,c=a-n;return c>mn&&(c=mn),function(){if(i===c)return Yn;var t=e?--c:i++;return r&&r[t]}}function i(t,r,i){var s,u=t&&t.array,c=i>o?0:o-i>>r,l=(a-i>>r)+1;return l>mn&&(l=mn),function(){for(;;){if(s){var t=s();if(t!==Yn)return t;s=null}if(c===l)return Yn;var o=e?--l:c++;s=n(u&&u[o],r-pn,i+(o<=t.size||0>e)return t.withMutations(function(t){0>e?Jt(t,e).set(0,n):Jt(t,0,e+1).set(e,n)});e+=t._origin;var r=t._tail,i=t._root,o=l(yn);return e>=Xt(t._capacity)?r=Kt(r,t.__ownerID,0,e,n,o):i=Kt(i,t.__ownerID,t._level,e,n,o),o.value?t.__ownerID?(t._root=i,t._tail=r,t.__hash=void 0,t.__altered=!0,t):Vt(t._origin,t._capacity,t._level,i,r):t}function Kt(t,e,n,r,i,o){var a=r>>>n&vn,s=t&&a0){var c=t&&t.array[a],l=Kt(c,e,n-pn,r,i,o);return l===c?t:(u=Wt(t,e),u.array[a]=l,u)}return s&&t.array[a]===i?t:(f(o),u=Wt(t,e),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Wt(t,e){return e&&t&&e===t.ownerID?t:new Ut(t?t.array.slice():[],e)}function $t(t,e){if(e>=Xt(t._capacity))return t._tail;if(e<1<0;)n=n.array[e>>>r&vn],r-=pn;return n}}function Jt(t,e,n){void 0!==e&&(e=0|e),void 0!==n&&(n=0|n);var r=t.__ownerID||new d,i=t._origin,o=t._capacity,a=i+e,s=void 0===n?o:0>n?o+n:i+n;if(a===i&&s===o)return t;if(a>=s)return t.clear();for(var u=t._level,c=t._root,l=0;0>a+l;)c=new Ut(c&&c.array.length?[void 0,c]:[],r),u+=pn,l+=1<=1<h?$t(t,s-1):h>f?new Ut([],r):p;if(p&&h>f&&o>a&&p.array.length){c=Wt(c,r);for(var v=c,g=u;g>pn;g-=pn){var _=f>>>g&vn;v=v.array[_]=Wt(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 t.__ownerID?(t.size=s-a,t._origin=a,t._capacity=s,t._level=u,t._root=c,t._tail=m,t.__hash=void 0,t.__altered=!0,t):Vt(a,s,u,c,m)}function Yt(t,e,n){for(var i=[],a=0,s=0;sa&&(a=c.size),o(u)||(c=c.map(function(t){return G(t)})),i.push(c)}return a>t.size&&(t=t.setSize(a)),Tt(t,e,i)}function Xt(t){return mn>t?0:t-1>>>pn<=mn&&a.size>=2*o.size?(i=a.filter(function(t,e){return void 0!==t&&s!==e}),r=i.toKeyedSeq().map(function(t){return t[0]}).flip().toMap(),t.__ownerID&&(r.__ownerID=i.__ownerID=t.__ownerID)):(r=o.remove(e),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return t;r=o,i=a.set(s,[e,n])}else r=o.set(e,a.size),i=a.set(a.size,[e,n]);return t.__ownerID?(t.size=r.size,t._map=r,t._list=i,t.__hash=void 0,t):te(r,i)}function re(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ie(t){this._iter=t,this.size=t.size}function oe(t){this._iter=t,this.size=t.size}function ae(t){this._iter=t,this.size=t.size}function se(t){var e=Ie(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Oe,e.__iterateUncached=function(e,n){var r=this;return t.__iterate(function(t,n){return e(n,t,r)!==!1},n)},e.__iteratorUncached=function(e,n){if(e===xn){var r=t.__iterator(e,n);return new k(function(){var t=r.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t})}return t.__iterator(e===kn?bn:kn,n)},e}function ue(t,e,n){var r=Ie(t);return r.size=t.size,r.has=function(e){return t.has(e)},r.get=function(r,i){var o=t.get(r,gn);return o===gn?i:e.call(n,o,r,t)},r.__iterateUncached=function(r,i){var o=this;return t.__iterate(function(t,i,a){return r(e.call(n,t,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=t.__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,e.call(n,a[1],s,t),i)})},r}function ce(t,e){var n=Ie(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=se(t);return e.reverse=function(){return t.flip()},e}),n.get=function(n,r){return t.get(e?n:-1-n,r)},n.has=function(n){return t.has(e?n:-1-n)},n.includes=function(e){return t.includes(e)},n.cacheResult=Oe,n.__iterate=function(e,n){var r=this;return t.__iterate(function(t,n){return e(t,n,r)},!n)},n.__iterator=function(e,n){return t.__iterator(e,!n)},n}function le(t,e,n,r){var i=Ie(t);return r&&(i.has=function(r){var i=t.get(r,gn);return i!==gn&&!!e.call(n,i,r,t)},i.get=function(r,i){var o=t.get(r,gn);return o!==gn&&e.call(n,o,r,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return t.__iterate(function(t,o,u){return e.call(n,t,o,u)?(s++,i(t,r?o:s-1,a)):void 0},o),s},i.__iteratorUncached=function(i,o){var a=t.__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(e.call(n,l,c,t))return x(i,r?c:s++,l,o)}})},i}function fe(t,e,n){var r=ft().asMutable();return t.__iterate(function(i,o){r.update(e.call(n,i,o,t),0,function(t){return t+1})}),r.asImmutable()}function de(t,e,n){var r=a(t),i=(c(t)?Qt():ft()).asMutable();t.__iterate(function(o,a){i.update(e.call(n,o,a,t),function(t){return t=t||[],t.push(r?[a,o]:o),t})});var o=Me(t);return i.map(function(e){return Se(t,o(e))})}function he(t,e,n,r){var i=t.size;if(void 0!==e&&(e=0|e),void 0!==n&&(n=n===1/0?i:0|n),g(e,n,i))return t;var o=_(e,i),a=y(n,i);if(o!==o||a!==a)return he(t.toSeq().cacheResult(),e,n,r);var s,u=a-o;u===u&&(s=0>u?0:u);var c=Ie(t);return c.size=0===s?s:t.size&&s||void 0,!r&&N(t)&&s>=0&&(c.get=function(e,n){return e=m(this,e),e>=0&&s>e?t.get(e+o,n):n}),c.__iterateUncached=function(e,n){var i=this;if(0===s)return 0;if(n)return this.cacheResult().__iterate(e,n);var a=0,u=!0,c=0;return t.__iterate(function(t,n){return u&&(u=a++s)return w();var t=i.next();return r||e===kn?t:e===bn?x(e,u-1,void 0,t):x(e,u-1,t.value[1],t)})},c}function pe(t,e,n){var r=Ie(t);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return t.__iterate(function(t,i,s){return e.call(n,t,i,s)&&++a&&r(t,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=t.__iterator(xn,i),s=!0;return new k(function(){if(!s)return w();var t=a.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(n,c,u,o)?r===xn?t:x(r,u,c,t):(s=!1,w())})},r}function me(t,e,n,r){var i=Ie(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate(function(t,o,c){return s&&(s=e.call(n,t,o,c))?void 0:(u++,i(t,r?o:u-1,a))}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(xn,o),u=!0,c=0;return new k(function(){var t,o,l;do{if(t=s.next(),t.done)return r||i===kn?t:i===bn?x(i,c++,void 0,t):x(i,c++,t.value[1],t);var f=t.value;o=f[0],l=f[1],u&&(u=e.call(n,l,o,a))}while(u);return i===xn?t:x(i,o,l,t)})},i}function ve(t,e){var r=a(t),i=[t].concat(e).map(function(t){return o(t)?r&&(t=n(t)):t=r?F(t):R(Array.isArray(t)?t:[t]),t}).filter(function(t){return 0!==t.size});if(0===i.length)return t;if(1===i.length){var u=i[0];if(u===t||r&&a(u)||s(t)&&s(u))return u}var c=new T(i);return r?c=c.toKeyedSeq():s(t)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(t,e){if(void 0!==t){var n=e.size;if(void 0!==n)return t+n}},0),c}function ge(t,e,n){var r=Ie(t);return r.__iterateUncached=function(r,i){function a(t,c){var l=this;t.__iterate(function(t,i){return(!e||e>c)&&o(t)?a(t,c+1):r(t,n?i:s++,l)===!1&&(u=!0),!u},i)}var s=0,u=!1;return a(t,0),s},r.__iteratorUncached=function(r,i){var a=t.__iterator(r,i),s=[],u=0; return new k(function(){for(;a;){var t=a.next();if(t.done===!1){var c=t.value;if(r===xn&&(c=c[1]),e&&!(s.length0}function we(t,n,r){var i=Ie(t);return i.size=new T(r).map(function(t){return t.size}).min(),i.__iterate=function(t,e){for(var n,r=this.__iterator(kn,e),i=0;!(n=r.next()).done&&t(n.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(t,i){var o=r.map(function(t){return t=e(t),A(i?t.reverse():t)}),a=0,s=!1;return new k(function(){var e;return s||(e=o.map(function(t){return t.next()}),s=e.some(function(t){return t.done})),s?w():x(t,a++,n.apply(null,e.map(function(t){return t.value})))})},i}function Se(t,e){return N(t)?e:t.constructor(e)}function Ee(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Ae(t){return lt(t.size),p(t)}function Me(t){return a(t)?n:s(t)?r:i}function Ie(t){return Object.create((a(t)?P:s(t)?C:j).prototype)}function Oe(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Pe(t,e){return t>e?1:e>t?-1:0}function Ce(t){var n=A(t);if(!n){if(!I(t))throw new TypeError("Expected iterable or array-like: "+t);n=A(e(t))}return n}function je(t,e){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(t);De(i,a),i.size=a.length,i._name=e,i._keys=a,i._defaultValues=t}this._map=ft(o)},i=r.prototype=Object.create(Qn);return i.constructor=r,r}function Te(t,e,n){var r=Object.create(Object.getPrototypeOf(t));return r._map=e,r.__ownerID=n,r}function ze(t){return t._name||t.constructor.name||"Record"}function De(t,e){try{e.forEach(Le.bind(void 0,t))}catch(n){}}function Le(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){Q(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}function Ne(t){return null===t||void 0===t?Ue():qe(t)&&!c(t)?t:Ue().withMutations(function(e){var n=i(t);lt(n.size),n.forEach(function(t){return e.add(t)})})}function qe(t){return!(!t||!t[Zn])}function Fe(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function Re(t,e){var n=Object.create(tr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ue(){return er||(er=Re(xt()))}function Be(t){return null===t||void 0===t?Ge():Ve(t)?t:Ge().withMutations(function(e){var n=i(t);lt(n.size),n.forEach(function(t){return e.add(t)})})}function Ve(t){return qe(t)&&c(t)}function He(t,e){var n=Object.create(nr);return n.size=t?t.size:0,n._map=t,n.__ownerID=e,n}function Ge(){return rr||(rr=He(ee()))}function Ke(t){return null===t||void 0===t?Je():We(t)?t:Je().unshiftAll(t)}function We(t){return!(!t||!t[ir])}function $e(t,e,n,r){var i=Object.create(or);return i.size=t,i._head=e,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Je(){return ar||(ar=$e(0))}function Ye(t,e){var n=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(n),t}function Xe(t,e){return e}function Qe(t,e){return[e,t]}function Ze(t){return function(){return!t.apply(this,arguments)}}function tn(t){return function(){return-t.apply(this,arguments)}}function en(t){return"string"==typeof t?JSON.stringify(t):String(t)}function nn(){return h(arguments)}function rn(t,e){return e>t?1:t>e?-1:0}function on(t){if(t.size===1/0)return 0;var e=c(t),n=a(t),r=e?1:0,i=t.__iterate(n?e?function(t,e){r=31*r+sn(ot(t),ot(e))|0}:function(t,e){r=r+sn(ot(t),ot(e))|0}:e?function(t){r=31*r+ot(t)|0}:function(t){r=r+ot(t)|0});return an(i,r)}function an(t,e){return e=Cn(e,3432918353),e=Cn(e<<15|e>>>-15,461845907),e=Cn(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Cn(e^e>>>16,2246822507),e=Cn(e^e>>>13,3266489909),e=it(e^e>>>16)}function sn(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var un=Array.prototype.slice;t(n,e),t(r,e),t(i,e),e.isIterable=o,e.isKeyed=a,e.isIndexed=s,e.isAssociative=u,e.isOrdered=c,e.Keyed=n,e.Indexed=r,e.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",fn="@@__IMMUTABLE_INDEXED__@@",dn="@@__IMMUTABLE_ORDERED__@@",hn="delete",pn=5,mn=1<=i;i++)if(t(n[e?r-i:i],i,this)===!1)return i+1;return i},T.prototype.__iterator=function(t,e){var n=this._array,r=n.length-1,i=0;return new k(function(){return i>r?w():x(t,i,n[e?r-i++:i++])})},t(z,P),z.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},z.prototype.has=function(t){return this._object.hasOwnProperty(t)},z.prototype.__iterate=function(t,e){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var a=r[e?i-o:o];if(t(n[a],a,this)===!1)return o+1}return o},z.prototype.__iterator=function(t,e){var n=this._object,r=this._keys,i=r.length-1,o=0;return new k(function(){var a=r[e?i-o:o];return o++>i?w():x(t,a,n[a])})},z.prototype[dn]=!0,t(D,C),D.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var n=this._iterable,r=A(n),i=0;if(E(r))for(var o;!(o=r.next()).done&&t(o.value,i++,this)!==!1;);return i},D.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var n=this._iterable,r=A(n);if(!E(r))return new k(w);var i=0;return new k(function(){var e=r.next();return e.done?e:x(t,i++,e.value)})},t(L,C),L.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var e=n.next();if(e.done)return e;r[i]=e.value}return x(t,i,r[i++])})};var Mn;t(X,C),X.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},X.prototype.get=function(t,e){return this.has(t)?this._value:e},X.prototype.includes=function(t){return J(this._value,t)},X.prototype.slice=function(t,e){var n=this.size;return g(t,e,n)?this:new X(this._value,y(e,n)-_(t,n))},X.prototype.reverse=function(){return this},X.prototype.indexOf=function(t){return J(this._value,t)?0:-1},X.prototype.lastIndexOf=function(t){return J(this._value,t)?this.size:-1},X.prototype.__iterate=function(t,e){for(var n=0;n=0&&e=e?new Z(0,0):new Z(this.get(t,this._end),this.get(e,this._end),this._step))},Z.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step===0){var n=e/this._step;if(n>=0&&n=o;o++){if(t(i,o,this)===!1)return o+1;i+=e?-r:r}return o},Z.prototype.__iterator=function(t,e){var n=this.size-1,r=this._step,i=e?this._start+n*r:this._start,o=0;return new k(function(){var a=i;return i+=e?-r:r,o>n?w():x(t,o++,a)})},Z.prototype.equals=function(t){return t instanceof Z?this._start===t._start&&this._end===t._end&&this._step===t._step:Y(this,t)};var On;t(tt,e),t(et,tt),t(nt,tt),t(rt,tt),tt.Keyed=et,tt.Indexed=nt,tt.Set=rt;var Pn,Cn="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){t=0|t,e=0|e;var n=65535&t,r=65535&e;return n*r+((t>>>16)*r+n*(e>>>16)<<16>>>0)|0},jn=Object.isExtensible,Tn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}(),zn="function"==typeof WeakMap;zn&&(Pn=new WeakMap);var Dn=0,Ln="__immutablehash__";"function"==typeof Symbol&&(Ln=Symbol(Ln));var Nn=16,qn=255,Fn=0,Rn={};t(ft,et),ft.of=function(){var t=un.call(arguments,0);return xt().withMutations(function(e){for(var n=0;n=t.length)throw new Error("Missing value for key: "+t[n]);e.set(t[n],t[n+1])}})},ft.prototype.toString=function(){return this.__toString("Map {","}")},ft.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},ft.prototype.set=function(t,e){return wt(this,t,e)},ft.prototype.setIn=function(t,e){return this.updateIn(t,gn,function(){return e})},ft.prototype.remove=function(t){return wt(this,t,gn)},ft.prototype.deleteIn=function(t){return this.updateIn(t,function(){return gn})},ft.prototype.update=function(t,e,n){return 1===arguments.length?t(this):this.updateIn([t],e,n)},ft.prototype.updateIn=function(t,e,n){n||(n=e,e=void 0);var r=zt(this,Ce(t),e,n);return r===gn?void 0:r},ft.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):xt()},ft.prototype.merge=function(){return Pt(this,void 0,arguments)},ft.prototype.mergeWith=function(t){var e=un.call(arguments,1);return Pt(this,t,e)},ft.prototype.mergeIn=function(t){var e=un.call(arguments,1);return this.updateIn(t,xt(),function(t){return"function"==typeof t.merge?t.merge.apply(t,e):e[e.length-1]})},ft.prototype.mergeDeep=function(){return Pt(this,Ct,arguments)},ft.prototype.mergeDeepWith=function(t){var e=un.call(arguments,1);return Pt(this,jt(t),e)},ft.prototype.mergeDeepIn=function(t){var e=un.call(arguments,1);return this.updateIn(t,xt(),function(t){return"function"==typeof t.mergeDeep?t.mergeDeep.apply(t,e):e[e.length-1]})},ft.prototype.sort=function(t){return Qt(be(this,t))},ft.prototype.sortBy=function(t,e){return Qt(be(this,e,t))},ft.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},ft.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new d)},ft.prototype.asImmutable=function(){return this.__ensureOwner()},ft.prototype.wasAltered=function(){return this.__altered},ft.prototype.__iterator=function(t,e){return new _t(this,t,e)},ft.prototype.__iterate=function(t,e){var n=this,r=0;return this._root&&this._root.iterate(function(e){return r++,t(e[1],e[0],n)},e),r},ft.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?kt(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},ft.isMap=dt;var Un="@@__IMMUTABLE_MAP__@@",Bn=ft.prototype;Bn[Un]=!0,Bn[hn]=Bn.remove,Bn.removeIn=Bn.deleteIn,ht.prototype.get=function(t,e,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},ht.prototype.update=function(t,e,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 Mt(t,u,r,i);var p=t&&t===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 ht(t,m)}},pt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=1<<((0===t?e:e>>>t)&vn),o=this.bitmap;return 0===(o&i)?r:this.nodes[Dt(o&i-1)].get(t+pn,e,n,r)},pt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var s=(0===e?n:n>>>e)&vn,u=1<=Gn)return Ot(t,d,c,s,p);if(l&&!p&&2===d.length&&Et(d[1^f]))return d[1^f];if(l&&p&&1===d.length&&Et(p))return p;var m=t&&t===this.ownerID,v=l?p?c:c^u:c|u,g=l?p?Lt(d,f,p,m):qt(d,f,m):Nt(d,f,p,m);return m?(this.bitmap=v,this.nodes=g,this):new pt(t,v,g)},mt.prototype.get=function(t,e,n,r){void 0===e&&(e=ot(n));var i=(0===t?e:e>>>t)&vn,o=this.nodes[i];return o?o.get(t+pn,e,n,r):r},mt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var s=(0===e?n:n>>>e)&vn,u=i===gn,c=this.nodes,l=c[s];if(u&&!l)return this;var f=St(l,t,e+pn,n,r,i,o,a);if(f===l)return this;var d=this.count;if(l){if(!f&&(d--,Kn>d))return It(t,c,d,s)}else d++;var h=t&&t===this.ownerID,p=Lt(c,s,f,h);return h?(this.count=d,this.nodes=p,this):new mt(t,d,p)},vt.prototype.get=function(t,e,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},vt.prototype.update=function(t,e,n,r,i,o,a){void 0===n&&(n=ot(r));var s=i===gn;if(n!==this.keyHash)return s?this:(f(a),f(o),At(this,t,e,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 gt(t,this.keyHash,u[1^c]);var p=t&&t===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 vt(t,this.keyHash,m)},gt.prototype.get=function(t,e,n,r){return J(n,this.entry[0])?this.entry[1]:r},gt.prototype.update=function(t,e,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?t&&t===this.ownerID?(this.entry[1]=i,this):new gt(t,this.keyHash,[r,i]):(f(o),At(this,t,e,ot(r),[r,i])))},ht.prototype.iterate=vt.prototype.iterate=function(t,e){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(t(n[e?i-r:r])===!1)return!1},pt.prototype.iterate=mt.prototype.iterate=function(t,e){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[e?i-r:r];if(o&&o.iterate(t,e)===!1)return!1}},gt.prototype.iterate=function(t,e){return t(this.entry)},t(_t,k),_t.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var n,r=e.node,i=e.index++;if(r.entry){if(0===i)return yt(t,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return yt(t,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 yt(t,o.entry);e=this._stack=bt(o,e)}continue}e=this._stack=this._stack.__prev}return w()};var Vn,Hn=mn/4,Gn=mn/2,Kn=mn/4;t(Ft,nt),Ft.of=function(){return this(arguments)},Ft.prototype.toString=function(){return this.__toString("List [","]")},Ft.prototype.get=function(t,e){if(t=m(this,t),t>=0&&t>>e&vn;if(r>=this.array.length)return new Ut([],t);var i,o=0===r;if(e>0){var a=this.array[r];if(i=a&&a.removeBefore(t,e-pn,n),i===a&&o)return this}if(o&&!i)return this;var s=Wt(this,t);if(!o)for(var u=0;r>u;u++)s.array[u]=void 0;return i&&(s.array[r]=i),s},Ut.prototype.removeAfter=function(t,e,n){if(n===(e?1<>>e&vn;if(r>=this.array.length)return this;var i;if(e>0){var o=this.array[r];if(i=o&&o.removeAfter(t,e-pn,n),i===o&&r===this.array.length-1)return this}var a=Wt(this,t);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Jn,Yn={};t(Qt,ft),Qt.of=function(){return this(arguments)},Qt.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Qt.prototype.get=function(t,e){var n=this._map.get(t);return void 0!==n?this._list.get(n)[1]:e},Qt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):ee()},Qt.prototype.set=function(t,e){return ne(this,t,e)},Qt.prototype.remove=function(t){return ne(this,t,gn)},Qt.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Qt.prototype.__iterate=function(t,e){var n=this;return this._list.__iterate(function(e){return e&&t(e[1],e[0],n)},e)},Qt.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},Qt.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),n=this._list.__ensureOwner(t);return t?te(e,n,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=n,this)},Qt.isOrderedMap=Zt,Qt.prototype[dn]=!0,Qt.prototype[hn]=Qt.prototype.remove;var Xn;t(re,P),re.prototype.get=function(t,e){return this._iter.get(t,e)},re.prototype.has=function(t){return this._iter.has(t)},re.prototype.valueSeq=function(){return this._iter.valueSeq()},re.prototype.reverse=function(){var t=this,e=ce(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},re.prototype.map=function(t,e){var n=this,r=ue(this,t,e);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(t,e)}),r},re.prototype.__iterate=function(t,e){var n,r=this;return this._iter.__iterate(this._useKeys?function(e,n){return t(e,n,r)}:(n=e?Ae(this):0,function(i){return t(i,e?--n:n++,r)}),e)},re.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var n=this._iter.__iterator(kn,e),r=e?Ae(this):0;return new k(function(){var i=n.next();return i.done?i:x(t,e?--r:r++,i.value,i)})},re.prototype[dn]=!0,t(ie,C),ie.prototype.includes=function(t){return this._iter.includes(t)},ie.prototype.__iterate=function(t,e){var n=this,r=0;return this._iter.__iterate(function(e){return t(e,r++,n)},e)},ie.prototype.__iterator=function(t,e){var n=this._iter.__iterator(kn,e),r=0;return new k(function(){var e=n.next();return e.done?e:x(t,r++,e.value,e)})},t(oe,j),oe.prototype.has=function(t){return this._iter.includes(t)},oe.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){return t(e,e,n)},e)},oe.prototype.__iterator=function(t,e){var n=this._iter.__iterator(kn,e);return new k(function(){var e=n.next();return e.done?e:x(t,e.value,e.value,e)})},t(ae,P),ae.prototype.entrySeq=function(){return this._iter.toSeq()},ae.prototype.__iterate=function(t,e){var n=this;return this._iter.__iterate(function(e){if(e){Ee(e);var r=o(e);return t(r?e.get(1):e[1],r?e.get(0):e[0],n)}},e)},ae.prototype.__iterator=function(t,e){var n=this._iter.__iterator(kn,e);return new k(function(){for(;;){var e=n.next();if(e.done)return e;var r=e.value;if(r){Ee(r);var i=o(r);return x(t,i?r.get(0):r[0],i?r.get(1):r[1],e)}}})},ie.prototype.cacheResult=re.prototype.cacheResult=oe.prototype.cacheResult=ae.prototype.cacheResult=Oe,t(je,et),je.prototype.toString=function(){return this.__toString(ze(this)+" {","}")},je.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},je.prototype.get=function(t,e){if(!this.has(t))return e;var n=this._defaultValues[t];return this._map?this._map.get(t,n):n},je.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=Te(this,xt()))},je.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key "'+t+'" on '+ze(this));if(this._map&&!this._map.has(t)){var n=this._defaultValues[t];if(e===n)return this}var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:Te(this,r)},je.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:Te(this,e)},je.prototype.wasAltered=function(){return this._map.wasAltered()},je.prototype.__iterator=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterator(t,e)},je.prototype.__iterate=function(t,e){var r=this;return n(this._defaultValues).map(function(t,e){return r.get(e)}).__iterate(t,e)},je.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?Te(this,e,t):(this.__ownerID=t,this._map=e,this)};var Qn=je.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,t(Ne,rt),Ne.of=function(){return this(arguments)},Ne.fromKeys=function(t){return this(n(t).keySeq())},Ne.prototype.toString=function(){return this.__toString("Set {","}")},Ne.prototype.has=function(t){return this._map.has(t)},Ne.prototype.add=function(t){return Fe(this,this._map.set(t,!0))},Ne.prototype.remove=function(t){return Fe(this,this._map.remove(t))},Ne.prototype.clear=function(){return Fe(this,this._map.clear())},Ne.prototype.union=function(){var t=un.call(arguments,0);return t=t.filter(function(t){return 0!==t.size}),0===t.length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(e){for(var n=0;n=0;n--)e={value:arguments[n],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):$e(t,e)},Ke.prototype.pushAll=function(t){if(t=r(t),0===t.size)return this;lt(t.size);var e=this.size,n=this._head;return t.reverse().forEach(function(t){e++,n={value:t,next:n}}),this.__ownerID?(this.size=e,this._head=n,this.__hash=void 0,this.__altered=!0,this):$e(e,n)},Ke.prototype.pop=function(){return this.slice(1)},Ke.prototype.unshift=function(){return this.push.apply(this,arguments)},Ke.prototype.unshiftAll=function(t){return this.pushAll(t)},Ke.prototype.shift=function(){return this.pop.apply(this,arguments)},Ke.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):Je()},Ke.prototype.slice=function(t,e){if(g(t,e,this.size))return this;var n=_(t,this.size),r=y(e,this.size);if(r!==this.size)return nt.prototype.slice.call(this,t,e);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):$e(i,o)},Ke.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?$e(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Ke.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var n=0,r=this._head;r&&t(r.value,n++,this)!==!1;)r=r.next;return n},Ke.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var n=0,r=this._head;return new k(function(){if(r){var e=r.value;return r=r.next,x(t,n++,e)}return w()})},Ke.isStack=We;var ir="@@__IMMUTABLE_STACK__@@",or=Ke.prototype;or[ir]=!0,or.withMutations=Bn.withMutations,or.asMutable=Bn.asMutable,or.asImmutable=Bn.asImmutable,or.wasAltered=Bn.wasAltered;var ar;e.Iterator=k,Ye(e,{toArray:function(){lt(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate(function(e,n){t[n]=e}),t},toIndexedSeq:function(){return new ie(this)},toJS:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJS?t.toJS():t}).__toJS()},toJSON:function(){return this.toSeq().map(function(t){return t&&"function"==typeof t.toJSON?t.toJSON():t}).__toJS()},toKeyedSeq:function(){return new re(this,!0)},toMap:function(){return ft(this.toKeyedSeq())},toObject:function(){lt(this.size);var t={};return this.__iterate(function(e,n){t[n]=e}),t},toOrderedMap:function(){return Qt(this.toKeyedSeq())},toOrderedSet:function(){return Be(a(this)?this.valueSeq():this)},toSet:function(){return Ne(a(this)?this.valueSeq():this)},toSetSeq:function(){return new oe(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ke(a(this)?this.valueSeq():this)},toList:function(){return Ft(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){var t=un.call(arguments,0);return Se(this,ve(this,t))},includes:function(t){return this.some(function(e){return J(e,t)})},entries:function(){return this.__iterator(xn)},every:function(t,e){lt(this.size);var n=!0;return this.__iterate(function(r,i,o){return t.call(e,r,i,o)?void 0:(n=!1,!1)}),n},filter:function(t,e){return Se(this,le(this,t,e,!0))},find:function(t,e,n){var r=this.findEntry(t,e);return r?r[1]:n},forEach:function(t,e){return lt(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){lt(this.size),t=void 0!==t?""+t:",";var e="",n=!0;return this.__iterate(function(r){n?n=!1:e+=t,e+=null!==r&&void 0!==r?r.toString():""}),e},keys:function(){return this.__iterator(bn)},map:function(t,e){return Se(this,ue(this,t,e))},reduce:function(t,e,n){lt(this.size);var r,i;return arguments.length<2?i=!0:r=e,this.__iterate(function(e,o,a){i?(i=!1,r=e):r=t.call(n,r,e,o,a)}),r},reduceRight:function(t,e,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return Se(this,ce(this,!0))},slice:function(t,e){return Se(this,he(this,t,e,!0))},some:function(t,e){return!this.every(Ze(t),e)},sort:function(t){return Se(this,be(this,t))},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(t,e){ -return p(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return fe(this,t,e)},equals:function(t){return Y(this,t)},entrySeq:function(){var t=this;if(t._cache)return new T(t._cache);var e=t.toSeq().map(Qe).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Ze(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate(function(n,i,o){return t.call(e,n,i,o)?(r=[i,n],!1):void 0}),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(v)},flatMap:function(t,e){return Se(this,_e(this,t,e))},flatten:function(t){return Se(this,ge(this,t,!0))},fromEntrySeq:function(){return new ae(this)},get:function(t,e){return this.find(function(e,n){return J(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=Ce(t);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,gn):gn,r===gn)return e}return r},groupBy:function(t,e){return de(this,t,e)},has:function(t){return this.get(t,gn)!==gn},hasIn:function(t){return this.getIn(t,gn)!==gn},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return J(e,t)})},keySeq:function(){return this.toSeq().map(Xe).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return ke(this,t)},maxBy:function(t,e){return ke(this,e,t)},min:function(t){return ke(this,t?tn(t):rn)},minBy:function(t,e){return ke(this,e?tn(e):rn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Se(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Se(this,me(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Ze(t),e)},sortBy:function(t,e){return Se(this,be(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Se(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Se(this,pe(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Ze(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=e.prototype;sr[cn]=!0,sr[En]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=en,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Ye(n,{flip:function(){return Se(this,se(this))},mapEntries:function(t,e){var n=this,r=0;return Se(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Se(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var ur=n.prototype;ur[ln]=!0,ur[En]=sr.entries,ur.__toJS=sr.toObject,ur.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+en(t)},Ye(r,{toKeyedSeq:function(){return new re(this,!1)},filter:function(t,e){return Se(this,le(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Se(this,ce(this,!1))},slice:function(t,e){return Se(this,he(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=_(t,0>t?this.count():this.size);var r=this.slice(0,t);return Se(this,1===n?r:r.concat(h(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return Se(this,ge(this,t,!1))},get:function(t,e){return t=m(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=m(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t100)return d(t,e,n);var u=o.diff(t,e),f=0;return u.forEach(function(t){if("="===t.op)f++;else if("!="===t.op){if(l(t.val)&&l(t.newVal)){var e=d(t.val,t.newVal,s(a,f));i=i.concat(e)}else i.push(c("replace",s(a,f),t.newVal));f++}else"+"===t.op?(i.push(c("add",s(a,f),t.val)),f++):"-"===t.op&&i.push(c("remove",s(a,f)))}),i},p=function(t,e,n){var r=n||"";return t===e?[]:[c("replace",s(r,""),e)]},m=function(t,e,n){return t==e||null!=t&&null!=e?f(t)&&f(e)?r.fromJS(h(t,e)):l(t)&&l(e)?r.fromJS(d(t,e)):r.fromJS(p(t,e,n)):r.fromJS([c("replace","/",e)])};t.exports=m},function(t,e,n){"use strict";var r=n(419),i=function(t){return r.Iterable.isKeyed(t)},o=function(t){return r.Iterable.isIndexed(t)},a=function(t,e,n){return"remove"===t?{op:t,path:e}:{op:t,path:e,value:n}};t.exports={isMap:i,isIndexed:o,op:a}},function(t,e,n){"use strict";function r(t,e){for(var n=t.size||0,r=e.size||0,a=o(n+1,r+1,0),s=0;n>s;s++)for(var u=0;r>u;u++)i.is(t.get(s),e.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(419),o=function(t,e,n){for(var r=[],i=0;t>i;i++)if(r[i]=new Array(e),null!=n)for(var o=0;e>o;o++)r[i][o]=n;return r},a=function(t,e){var n=r(t,e);return f(t,e,n)},s=i.Record({op:"=",val:null}),u=i.Record({op:"!=",val:null,newVal:null}),c=function(t,e){var n=r(t,e);return l(n,t,e,t.size||0,e.size||0)},l=function(t,e,n,r,o){return 0===r&&0===o?[]:r>0&&o>0&&i.is(e.get(r-1),n.get(o-1))?l(t,e,n,r-1,o-1).concat(new s({op:"=",val:e.get(r-1)})):r>0&&o>0&&r===o&&!i.is(e.get(r-1),n.get(o-1))?l(t,e,n,r-1,o-1).concat(new u({val:e.get(r-1),newVal:n.get(r-1)})):o>0&&(0===r||t[r][o-1]>=t[r-1][o])?l(t,e,n,r,o-1).concat(new s({op:"+",val:n.get(o-1)})):r>0&&(0===o||t[r][o-1]');t.form.append(i)}),!0):!0})}},{key:"addedNodes",value:function(t){var e=this;t.forEach(function(t){"childList"===t.type&&t.addedNodes&&(0,s["default"])("body").trigger("mutation._grav",t.target,t,e)})}}]),e}();e["default"]=u;e.Instance=new u("form#blueprints")}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(426),o=r(i),a=n(427),s=r(a),u=n(428),c=r(u),l=n(429),f=r(l),d=n(352),h=r(d),p=n(511),m=r(p);n(516),e["default"]={SelectizeField:{SelectizeField:o["default"],Instance:i.Instance},ArrayField:{ArrayField:s["default"],Instance:a.Instance},CollectionsField:{CollectionsField:c["default"],Instance:u.Instance},DateTimeField:{DateTimeField:f["default"],Instance:l.Instance},EditorField:{EditorField:h["default"],Instance:d.Instance},ColorpickerField:{ColorpickerField:m["default"],Instance:p.Instance}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Instance=void 0;var o=function(){function t(t,e){for(var n=0;n\n \n ':'\n
\n \n \n ',t+='\n \n \n
'}}]),t}(),l=function(){function t(){var e=this;i(this,t),u.on("input",'[data-grav-array-type="key"], [data-grav-array-type="value"]',function(t){return e.actionInput(t)}),u.on("click touch","[data-grav-array-action]",function(t){return e.actionEvent(t)})}return o(t,[{key:"actionInput",value:function(t){var e=(0,s["default"])(t.target),n=e.data("grav-array-type");this._setTemplate(e);var r=e.data("array-template"),i="key"===n?e:e.siblings('[data-grav-array-type="key"]:first'),o="value"===n?e:e.siblings('[data-grav-array-type="value"]:first'),a=r.getName()+"["+(r.isValueOnly()?this.getIndexFor(e):i.val())+"]";o.attr("name",o.val()?a:r.getName()),this.refreshNames(r)}},{key:"actionEvent",value:function(t){t&&t.preventDefault();var e=(0,s["default"])(t.target),n=e.data("grav-array-action");this._setTemplate(e),this[n+"Action"](e)}},{key:"addAction",value:function(t){var e=t.data("array-template"),n=t.closest('[data-grav-array-type="row"]');n.after(e.getNewRow())}},{key:"remAction",value:function(t){var e=t.data("array-template"),n=t.closest('[data-grav-array-type="row"]'),r=!n.siblings().length;if(r){var i=(0,s["default"])(e.getNewRow());n.after(i),i.find('[data-grav-array-type="value"]:last').attr("name",e.getName())}n.remove(),this.refreshNames(e)}},{key:"refreshNames",value:function(t){if(t.isValueOnly()){var e=t.container.find('> div > [data-grav-array-type="row"]'),n=e.find('[name]:not([name=""])');n.each(function(t,e){e=(0,s["default"])(e);var n=e.attr("name");n=n.replace(/\[\d+\]$/,"["+t+"]"),e.attr("name",n)}),n.length||e.find('[data-grav-array-type="value"]').attr("name",t.getName())}}},{key:"getIndexFor",value:function(t){var e=t.data("array-template"),n=t.closest('[data-grav-array-type="row"]');return e.container.find((e.isValueOnly()?"> div ":"")+' > [data-grav-array-type="row"]').index(n)}},{key:"_setTemplate",value:function(t){t.data("array-template")||t.data("array-template",new c(t.closest("[data-grav-array-name]")))}}]),t}();e["default"]=l;e.Instance=new l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Instance=void 0;var o=function(){function t(t,e){for(var n=0;n .collection-actions [data-action="add"]',function(t){return e.addItem(t)}),t.on("click",'> ul > li > .item-actions [data-action="delete"]',function(t){return e.removeItem(t)}),t.on("input","[data-key-observe]",function(t){return e.observeKey(t)}),t.find("[data-collection-holder]").each(function(t,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 e.reindex(n)}}))})}},{key:"addItem",value:function(t){var e=(0,s["default"])(t.currentTarget),n=e.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(t){var e=(0,s["default"])(t.currentTarget),n=e.closest("[data-collection-item]"),r=e.closest('[data-type="collection"]');n.remove(),this.reindex(r)}},{key:"observeKey",value:function(t){var e=(0,s["default"])(t.target),n=e.val(),r=e.closest("[data-collection-key]");r.data("collection-key-backup",r.data("collection-key")).data("collection-key",n),this.reindex(null,r)}},{key:"reindex",value:function(t,e){e=e||(0,s["default"])(t).closest('[data-type="collection"]').find("> ul > [data-collection-item]"),e.each(function(t,e){e=(0,s["default"])(e);var n=e.find("[data-key-observe]"),r=n.val(),i=n.length,o=e.data("collection-key-backup");e.attr("data-collection-key",i?r:t),["name","data-grav-field-name","for","id"].forEach(function(t){e.find("["+t+"], [_"+t+"]").each(function(){var e=(0,s["default"])(this),n=[],i=[new RegExp("\\[(\\d+|\\*|"+o+")\\]","g"),new RegExp("\\.(\\d+|\\*|"+o+")\\.","g")];if(!r)return e.attr("_"+t,e.attr(t)),void e.attr(t,null);e.attr("_"+t)&&(e.attr(t,e.attr("_"+t)),e.attr("_"+t,null)),e.parents("[data-collection-key]").map(function(t,e){return n.push((0,s["default"])(e).attr("data-collection-key"))}),n.reverse();var a=e.attr(t).replace(i[0],function(){return"["+(n.shift()||o)+"]"});a=a.replace(i[1],function(){return"."+n.shift()+"."}),e.attr(t,a)})})})}},{key:"_onAddedNodes",value:function(t,e){var n=this,r=(0,s["default"])(e).find('[data-type="collection"]');r.length&&r.each(function(t,e){e=(0,s["default"])(e),~n.lists.index(e)||n.addList(e)})}}]),t}();e["default"]=l;e.Instance=new l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Instance=void 0;var o=function(){function t(t,e){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 t(e){var n=this;i(this,t),this.selector=e,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(t,e,r,i){var o=r,a=(0,d.hex2rgb)(r);1>i&&(o="rgba("+a.r+", "+a.g+", "+a.b+", "+i+")");var s=e.closest(n.options.update);s.length||(s=e.siblings(n.options.update)),s.length||(s=e.parent(".g-colorpicker").find(n.options.update)),s.css({backgroundColor:o})})}return o(t,[{key:"attach",value:function(){var t=this;p.on(_,this.selector,function(e){return t.show(e,e.currentTarget)}),p.on(m,".g-colorpicker, .g-colorpicker i",this.bound("iconClick")),p.on("keydown",this.selector,function(e){switch(e.keyCode){case 9:t.hide();break;case 13:case 27:t.hide(),e.currentTarget.blur()}return!0}),p.on("keyup",this.selector,function(e){return t.updateFromInput(!0,e.currentTarget),!0}),p.on("paste",this.selector,function(e){setTimeout(function(){return t.updateFromInput(!0,e.currentTarget)},1)})}},{key:"show",value:function(t,e){e=(0,s["default"])(e),this.built||this.build(),this.element=e,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 t=(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"])(t).off("scroll",this.bound("reposition"))}}},{key:"build",value:function(){var t=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 e=(0,s["default"])('
').appendTo(this.wrapper);this.tabs={hue:(0,s["default"])('
').text("HUE").appendTo(e),brightness:(0,s["default"])('
').text("BRI").appendTo(e),saturation:(0,s["default"])('
').text("SAT").appendTo(e),wheel:(0,s["default"])('
').text("WHEEL").appendTo(e),transparent:(0,s["default"])('
').text("TRANSPARENT").appendTo(e)},e.on(m,"> div",function(n){var r=(0,s["default"])(n.currentTarget);if(r.is(t.tabs.transparent)){var i=t.opacitySlider.height();return t.opacity=0,t.opacitySlider.find(".cp-picker").css({top:(0,c["default"])(i-i*t.opacity,0,i)}),void t.move(t.opacitySlider,{manualOpacity:!0})}var o=e.find(".active"),a=o.attr("class").replace(/\s|active|cp-tab-/g,""),u=r.attr("class").replace(/\s|active|cp-tab-/g,"");t.wrapper.removeClass("cp-mode-"+a).addClass("cp-mode-"+u),o.removeClass("active"),r.addClass("active"),t.mode=u,t.updateFromInput()}),this.wrapper.appendTo(".content-wrapper"),this.built=!0,this.mode="hue"}},{key:"reposition",value:function(){var t=(0,s["default"])(".content-wrapper")[0],e=this.element[0].getBoundingClientRect(),n=t.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:e.top+e.height+t.scrollTop-n.top+r.y,left:e.left+t.scrollLeft-n.left+r.x})}},{key:"iconClick",value:function(t){if(this.wrapper&&this.wrapper.hasClass("cp-visible"))return!0;t&&t.preventDefault();var e=(0,s["default"])(t.currentTarget).find("input");setTimeout(function(){return e.focus()},50)}},{key:"bodyMove",value:function(t){t&&t.preventDefault(),this.target&&this.move(this.target,t)}},{key:"bodyClick",value:function(t){var e=(0,s["default"])(t.target);e.closest(".cp-wrapper").length||e.is(this.selector)||this.hide()}},{key:"bodyDown",value:function(t){t&&t.preventDefault(),this.target=(0,s["default"])(t.currentTarget),this.move(this.target,t,!0)}},{key:"targetReset",value:function(t){t&&t.preventDefault(),this.target=null}},{key:"move",value:function(t,e){var n=this.element,r=t.find(".cp-picker"),i=t[0].getBoundingClientRect(),o=i.left+window.scrollX,a=i.top+window.scrollY,s=Math.round((e?e.pageX:0)-o),u=Math.round((e?e.pageY:0)-a),c=void 0,l=void 0,f=void 0,d=void 0,h=e.changedTouches||e.originalEvent&&e.originalEvent.changedTouches;e&&h&&(s=(h?h[0].pageX:0)-o,u=(h?h[0].pageY:0)-a),e&&e.manualOpacity&&(u=i.height),0>s&&(s=0),0>u&&(u=0),s>i.width&&(s=i.width),u>i.height&&(u=i.height),t.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)),t.hasClass("cp-grid")?(r.css({top:u,left:s}),this.updateFromPicker(n,t)):(r.css({top:u}),this.updateFromPicker(n,t))}},{key:"updateFromInput",value:function(t,e){e=e?(0,s["default"])(e):this.element;var n=e.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})})}}t||e.val(this.getValue(i)),(this.element||e).trigger("change._grav_colorpicker",[e,i,r])}},{key:"updateFromPicker",value:function(t,e){var n=function(t,e){var n,r;return t.length&&e?(n=t[0].getBoundingClientRect().left,r=t[0].getBoundingClientRect().top,{x:n-e[0].getBoundingClientRect().left+t[0].offsetWidth/2,y:r-e[0].getBoundingClientRect().top+t[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,E=m[0].getBoundingClientRect().height,A=this.element.val(); +return p(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return fe(this,t,e)},equals:function(t){return Y(this,t)},entrySeq:function(){var t=this;if(t._cache)return new T(t._cache);var e=t.toSeq().map(Qe).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(Ze(t),e)},findEntry:function(t,e,n){var r=n;return this.__iterate(function(n,i,o){return t.call(e,n,i,o)?(r=[i,n],!1):void 0}),r},findKey:function(t,e){var n=this.findEntry(t,e);return n&&n[0]},findLast:function(t,e,n){return this.toKeyedSeq().reverse().find(t,e,n)},findLastEntry:function(t,e,n){return this.toKeyedSeq().reverse().findEntry(t,e,n)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(v)},flatMap:function(t,e){return Se(this,_e(this,t,e))},flatten:function(t){return Se(this,ge(this,t,!0))},fromEntrySeq:function(){return new ae(this)},get:function(t,e){return this.find(function(e,n){return J(n,t)},void 0,e)},getIn:function(t,e){for(var n,r=this,i=Ce(t);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,gn):gn,r===gn)return e}return r},groupBy:function(t,e){return de(this,t,e)},has:function(t){return this.get(t,gn)!==gn},hasIn:function(t){return this.getIn(t,gn)!==gn},isSubset:function(t){return t="function"==typeof t.includes?t:e(t),this.every(function(e){return t.includes(e)})},isSuperset:function(t){return t="function"==typeof t.isSubset?t:e(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(e){return J(e,t)})},keySeq:function(){return this.toSeq().map(Xe).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return ke(this,t)},maxBy:function(t,e){return ke(this,e,t)},min:function(t){return ke(this,t?tn(t):rn)},minBy:function(t,e){return ke(this,e?tn(e):rn,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return Se(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return Se(this,me(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(Ze(t),e)},sortBy:function(t,e){return Se(this,be(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return Se(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return Se(this,pe(this,t,e))},takeUntil:function(t,e){return this.takeWhile(Ze(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=e.prototype;sr[cn]=!0,sr[En]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=en,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Ye(n,{flip:function(){return Se(this,se(this))},mapEntries:function(t,e){var n=this,r=0;return Se(this,this.toSeq().map(function(i,o){return t.call(e,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(t,e){var n=this;return Se(this,this.toSeq().flip().map(function(r,i){return t.call(e,r,i,n)}).flip())}});var ur=n.prototype;ur[ln]=!0,ur[En]=sr.entries,ur.__toJS=sr.toObject,ur.__toStringMapper=function(t,e){return JSON.stringify(e)+": "+en(t)},Ye(r,{toKeyedSeq:function(){return new re(this,!1)},filter:function(t,e){return Se(this,le(this,t,e,!1))},findIndex:function(t,e){var n=this.findEntry(t,e);return n?n[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Se(this,ce(this,!1))},slice:function(t,e){return Se(this,he(this,t,e,!1))},splice:function(t,e){var n=arguments.length;if(e=Math.max(0|e,0),0===n||2===n&&!e)return this;t=_(t,0>t?this.count():this.size);var r=this.slice(0,t);return Se(this,1===n?r:r.concat(h(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var n=this.findLastEntry(t,e);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(t){return Se(this,ge(this,t,!1))},get:function(t,e){return t=m(this,t),0>t||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find(function(e,n){return n===t},void 0,e)},has:function(t){return t=m(this,t),t>=0&&(void 0!==this.size?this.size===1/0||t100)return d(t,e,n);var u=o.diff(t,e),f=0;return u.forEach(function(t){if("="===t.op)f++;else if("!="===t.op){if(l(t.val)&&l(t.newVal)){var e=d(t.val,t.newVal,s(a,f));i=i.concat(e)}else i.push(c("replace",s(a,f),t.newVal));f++}else"+"===t.op?(i.push(c("add",s(a,f),t.val)),f++):"-"===t.op&&i.push(c("remove",s(a,f)))}),i},p=function(t,e,n){var r=n||"";return t===e?[]:[c("replace",s(r,""),e)]},m=function(t,e,n){return t==e||null!=t&&null!=e?f(t)&&f(e)?r.fromJS(h(t,e)):l(t)&&l(e)?r.fromJS(d(t,e)):r.fromJS(p(t,e,n)):r.fromJS([c("replace","/",e)])};t.exports=m},function(t,e,n){"use strict";var r=n(419),i=function(t){return r.Iterable.isKeyed(t)},o=function(t){return r.Iterable.isIndexed(t)},a=function(t,e,n){return"remove"===t?{op:t,path:e}:{op:t,path:e,value:n}};t.exports={isMap:i,isIndexed:o,op:a}},function(t,e,n){"use strict";function r(t,e){for(var n=t.size||0,r=e.size||0,a=o(n+1,r+1,0),s=0;n>s;s++)for(var u=0;r>u;u++)i.is(t.get(s),e.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(419),o=function(t,e,n){for(var r=[],i=0;t>i;i++)if(r[i]=new Array(e),null!=n)for(var o=0;e>o;o++)r[i][o]=n;return r},a=function(t,e){var n=r(t,e);return f(t,e,n)},s=i.Record({op:"=",val:null}),u=i.Record({op:"!=",val:null,newVal:null}),c=function(t,e){var n=r(t,e);return l(n,t,e,t.size||0,e.size||0)},l=function(t,e,n,r,o){return 0===r&&0===o?[]:r>0&&o>0&&i.is(e.get(r-1),n.get(o-1))?l(t,e,n,r-1,o-1).concat(new s({op:"=",val:e.get(r-1)})):r>0&&o>0&&r===o&&!i.is(e.get(r-1),n.get(o-1))?l(t,e,n,r-1,o-1).concat(new u({val:e.get(r-1),newVal:n.get(r-1)})):o>0&&(0===r||t[r][o-1]>=t[r-1][o])?l(t,e,n,r,o-1).concat(new s({op:"+",val:n.get(o-1)})):r>0&&(0===o||t[r][o-1]');t.form.append(i)}),!0):!0})}},{key:"addedNodes",value:function(t){var e=this;t.forEach(function(t){"childList"===t.type&&t.addedNodes&&(0,s["default"])("body").trigger("mutation._grav",t.target,t,e)})}}]),e}();e["default"]=u;e.Instance=new u("form#blueprints")}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(426),o=r(i),a=n(427),s=r(a),u=n(428),c=r(u),l=n(429),f=r(l),d=n(352),h=r(d),p=n(511),m=r(p);n(516),e["default"]={SelectizeField:{SelectizeField:o["default"],Instance:i.Instance},ArrayField:{ArrayField:s["default"],Instance:a.Instance},CollectionsField:{CollectionsField:c["default"],Instance:u.Instance},DateTimeField:{DateTimeField:f["default"],Instance:l.Instance},EditorField:{EditorField:h["default"],Instance:d.Instance},ColorpickerField:{ColorpickerField:m["default"],Instance:p.Instance}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Instance=void 0;var o=function(){function t(t,e){for(var n=0;n\n \n ':'\n
\n \n \n ',t+='\n \n \n
'}}]),t}(),l=function(){function t(){var e=this;i(this,t),u.on("input",'[data-grav-array-type="key"], [data-grav-array-type="value"]',function(t){return e.actionInput(t)}),u.on("click touch","[data-grav-array-action]",function(t){return e.actionEvent(t)})}return o(t,[{key:"actionInput",value:function(t){var e=(0,s["default"])(t.target),n=e.data("grav-array-type");this._setTemplate(e);var r=e.data("array-template"),i="key"===n?e:e.siblings('[data-grav-array-type="key"]:first'),o="value"===n?e:e.siblings('[data-grav-array-type="value"]:first'),a=r.getName()+"["+(r.isValueOnly()?this.getIndexFor(e):i.val())+"]";o.attr("name",o.val()?a:r.getName()),this.refreshNames(r)}},{key:"actionEvent",value:function(t){t&&t.preventDefault();var e=(0,s["default"])(t.target),n=e.data("grav-array-action");this._setTemplate(e),this[n+"Action"](e)}},{key:"addAction",value:function(t){var e=t.data("array-template"),n=t.closest('[data-grav-array-type="row"]');n.after(e.getNewRow())}},{key:"remAction",value:function(t){var e=t.data("array-template"),n=t.closest('[data-grav-array-type="row"]'),r=!n.siblings().length;if(r){var i=(0,s["default"])(e.getNewRow());n.after(i),i.find('[data-grav-array-type="value"]:last').attr("name",e.getName())}n.remove(),this.refreshNames(e)}},{key:"refreshNames",value:function(t){if(t.isValueOnly()){var e=t.container.find('> div > [data-grav-array-type="row"]'),n=e.find('[name]:not([name=""])');n.each(function(t,e){e=(0,s["default"])(e);var n=e.attr("name");n=n.replace(/\[\d+\]$/,"["+t+"]"),e.attr("name",n)}),n.length||e.find('[data-grav-array-type="value"]').attr("name",t.getName())}}},{key:"getIndexFor",value:function(t){var e=t.data("array-template"),n=t.closest('[data-grav-array-type="row"]');return e.container.find((e.isValueOnly()?"> div ":"")+' > [data-grav-array-type="row"]').index(n)}},{key:"_setTemplate",value:function(t){t.data("array-template")||t.data("array-template",new c(t.closest("[data-grav-array-name]")))}}]),t}();e["default"]=l;e.Instance=new l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Instance=void 0;var o=function(){function t(t,e){for(var n=0;n .collection-actions [data-action="add"]',function(t){return e.addItem(t)}),t.on("click",'> ul > li > .item-actions [data-action="delete"]',function(t){return e.removeItem(t)}),t.on("input","[data-key-observe]",function(t){return e.observeKey(t)}),t.find("[data-collection-holder]").each(function(t,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 e.reindex(n)}}))})}},{key:"addItem",value:function(t){var e=(0,s["default"])(t.currentTarget),n=e.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(t){var e=(0,s["default"])(t.currentTarget),n=e.closest("[data-collection-item]"),r=e.closest('[data-type="collection"]');n.remove(),this.reindex(r)}},{key:"observeKey",value:function(t){var e=(0,s["default"])(t.target),n=e.val(),r=e.closest("[data-collection-key]");r.data("collection-key-backup",r.data("collection-key")).data("collection-key",n),this.reindex(null,r)}},{key:"reindex",value:function(t,e){e=e||(0,s["default"])(t).closest('[data-type="collection"]').find("> ul > [data-collection-item]"),e.each(function(t,e){e=(0,s["default"])(e);var n=e.find("[data-key-observe]"),r=n.val(),i=n.length,o=e.data("collection-key-backup");e.attr("data-collection-key",i?r:t),["name","data-grav-field-name","for","id"].forEach(function(t){e.find("["+t+"], [_"+t+"]").each(function(){var e=(0,s["default"])(this),n=[],a=[new RegExp("\\[(\\d+|\\*|"+o+")\\]","g"),new RegExp("\\.(\\d+|\\*|"+o+")\\.","g")];if(i&&!r)return e.attr("_"+t,e.attr(t)),void e.attr(t,null);e.attr("_"+t)&&(e.attr(t,e.attr("_"+t)),e.attr("_"+t,null)),e.parents("[data-collection-key]").map(function(t,e){return n.push((0,s["default"])(e).attr("data-collection-key"))}),n.reverse();var u=e.attr(t).replace(a[0],function(){return"["+(n.shift()||o)+"]"});u=u.replace(a[1],function(){return"."+n.shift()+"."}),e.attr(t,u)})})})}},{key:"_onAddedNodes",value:function(t,e){var n=this,r=(0,s["default"])(e).find('[data-type="collection"]');r.length&&r.each(function(t,e){e=(0,s["default"])(e),~n.lists.index(e)||n.addList(e)})}}]),t}();e["default"]=l;e.Instance=new l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Instance=void 0;var o=function(){function t(t,e){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 t(e){var n=this;i(this,t),this.selector=e,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(t,e,r,i){var o=r,a=(0,d.hex2rgb)(r);1>i&&(o="rgba("+a.r+", "+a.g+", "+a.b+", "+i+")");var s=e.closest(n.options.update);s.length||(s=e.siblings(n.options.update)),s.length||(s=e.parent(".g-colorpicker").find(n.options.update)),s.css({backgroundColor:o})})}return o(t,[{key:"attach",value:function(){var t=this;p.on(_,this.selector,function(e){return t.show(e,e.currentTarget)}),p.on(m,".g-colorpicker, .g-colorpicker i",this.bound("iconClick")),p.on("keydown",this.selector,function(e){switch(e.keyCode){case 9:t.hide();break;case 13:case 27:t.hide(),e.currentTarget.blur()}return!0}),p.on("keyup",this.selector,function(e){return t.updateFromInput(!0,e.currentTarget),!0}),p.on("paste",this.selector,function(e){setTimeout(function(){return t.updateFromInput(!0,e.currentTarget)},1)})}},{key:"show",value:function(t,e){e=(0,s["default"])(e),this.built||this.build(),this.element=e,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 t=(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"])(t).off("scroll",this.bound("reposition"))}}},{key:"build",value:function(){var t=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 e=(0,s["default"])('
').appendTo(this.wrapper);this.tabs={hue:(0,s["default"])('
').text("HUE").appendTo(e),brightness:(0,s["default"])('
').text("BRI").appendTo(e),saturation:(0,s["default"])('
').text("SAT").appendTo(e),wheel:(0,s["default"])('
').text("WHEEL").appendTo(e),transparent:(0,s["default"])('
').text("TRANSPARENT").appendTo(e)},e.on(m,"> div",function(n){var r=(0,s["default"])(n.currentTarget);if(r.is(t.tabs.transparent)){var i=t.opacitySlider.height();return t.opacity=0,t.opacitySlider.find(".cp-picker").css({top:(0,c["default"])(i-i*t.opacity,0,i)}),void t.move(t.opacitySlider,{manualOpacity:!0})}var o=e.find(".active"),a=o.attr("class").replace(/\s|active|cp-tab-/g,""),u=r.attr("class").replace(/\s|active|cp-tab-/g,"");t.wrapper.removeClass("cp-mode-"+a).addClass("cp-mode-"+u),o.removeClass("active"),r.addClass("active"),t.mode=u,t.updateFromInput()}),this.wrapper.appendTo(".content-wrapper"),this.built=!0,this.mode="hue"}},{key:"reposition",value:function(){var t=(0,s["default"])(".content-wrapper")[0],e=this.element[0].getBoundingClientRect(),n=t.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:e.top+e.height+t.scrollTop-n.top+r.y,left:e.left+t.scrollLeft-n.left+r.x})}},{key:"iconClick",value:function(t){if(this.wrapper&&this.wrapper.hasClass("cp-visible"))return!0;t&&t.preventDefault();var e=(0,s["default"])(t.currentTarget).find("input");setTimeout(function(){return e.focus()},50)}},{key:"bodyMove",value:function(t){t&&t.preventDefault(),this.target&&this.move(this.target,t)}},{key:"bodyClick",value:function(t){var e=(0,s["default"])(t.target);e.closest(".cp-wrapper").length||e.is(this.selector)||this.hide()}},{key:"bodyDown",value:function(t){t&&t.preventDefault(),this.target=(0,s["default"])(t.currentTarget),this.move(this.target,t,!0)}},{key:"targetReset",value:function(t){t&&t.preventDefault(),this.target=null}},{key:"move",value:function(t,e){var n=this.element,r=t.find(".cp-picker"),i=t[0].getBoundingClientRect(),o=i.left+window.scrollX,a=i.top+window.scrollY,s=Math.round((e?e.pageX:0)-o),u=Math.round((e?e.pageY:0)-a),c=void 0,l=void 0,f=void 0,d=void 0,h=e.changedTouches||e.originalEvent&&e.originalEvent.changedTouches;e&&h&&(s=(h?h[0].pageX:0)-o,u=(h?h[0].pageY:0)-a),e&&e.manualOpacity&&(u=i.height),0>s&&(s=0),0>u&&(u=0),s>i.width&&(s=i.width),u>i.height&&(u=i.height),t.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)),t.hasClass("cp-grid")?(r.css({top:u,left:s}),this.updateFromPicker(n,t)):(r.css({top:u}),this.updateFromPicker(n,t))}},{key:"updateFromInput",value:function(t,e){e=e?(0,s["default"])(e):this.element;var n=e.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})})}}t||e.val(this.getValue(i)),(this.element||e).trigger("change._grav_colorpicker",[e,i,r])}},{key:"updateFromPicker",value:function(t,e){var n=function(t,e){var n,r;return t.length&&e?(n=t[0].getBoundingClientRect().left,r=t[0].getBoundingClientRect().top,{x:n-e[0].getBoundingClientRect().left+t[0].offsetWidth/2,y:r-e[0].getBoundingClientRect().top+t[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,E=m[0].getBoundingClientRect().height,A=this.element.val(); if(A=(0,d.rgbstr2hex)(A)||A,(r=(0,d.parseHex)(A))||(r="#ffffff"),e.hasClass("cp-grid")||e.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})})}e.hasClass("cp-opacity-slider")&&(this.opacity=parseFloat(1-k.y/E).toFixed(2)),t.val(this.getValue(r)),this.element.trigger("change._grav_colorpicker",[this.element,r,this.opacity])}},{key:"getValue",value:function(t){if(1===this.opacity)return t;var e=(0,d.hex2rgb)(t);return"rgba("+e.r+", "+e.g+", "+e.b+", "+this.opacity+")"}},{key:"bound",value:function e(t){var e=this._bound||(this._bound={});return e[t]||(e[t]=(0,f["default"])(this[t],this))}}]),t}();e["default"]=y;e.Instance=new y("[data-grav-colorpicker]")},function(t,e){function n(t,e,n){return e>t?e:t>n?n:t}t.exports=n},function(t,e,n){function r(t,e,n){var r=i(arguments,2);return function(){return t.apply(e,r.concat(i(arguments)))}}var i=n(514);t.exports=r},function(t,e){function n(t,e,n){var r=t.length;e=null==e?0:0>e?Math.max(r+e,0):Math.min(e,r),n=null==n?r:0>n?Math.max(r+n,0):Math.min(n,r);for(var i=[];n>e;)i.push(t[e++]);return i}t.exports=n},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(e.parseHex=function(t){return t=t.replace(/[^A-F0-9]/gi,""),3!==t.length&&6!==t.length?"":(3===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),"#"+t.toLowerCase())},e.hsb2rgb=function(t){var e={},n=Math.round(t.h),r=Math.round(255*t.s/100),i=Math.round(255*t.b/100);if(0===r)e.r=e.g=e.b=i;else{var o=i,a=(255-r)*i/255,s=(o-a)*(n%60)/60;360===n&&(n=0),60>n?(e.r=o,e.b=a,e.g=a+s):120>n?(e.g=o,e.b=a,e.r=o-s):180>n?(e.g=o,e.r=a,e.b=a+s):240>n?(e.b=o,e.r=a,e.g=o-s):300>n?(e.b=o,e.g=a,e.r=a+s):360>n?(e.r=o,e.g=a,e.b=o-s):(e.r=0,e.g=0,e.b=0)}return{r:Math.round(e.r),g:Math.round(e.g),b:Math.round(e.b)}}),r=e.rgb2hex=function(t){var e=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return e.forEach(function(t,n){1===t.length&&(e[n]="0"+t)}),"#"+e.join("")},i=(e.rgbstr2hex=function(t){return t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),t&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""},e.hsb2hex=function(t){return r(n(t))},e.hex2hsb=function(t){var e=i(o(t));return 0===e.s&&(e.h=360),e},e.rgb2hsb=function(t){var e={h:0,s:0,b:0},n=Math.min(t.r,t.g,t.b),r=Math.max(t.r,t.g,t.b),i=r-n;return e.b=r,e.s=0!==r?255*i/r:0,0!==e.s?t.r===r?e.h=(t.g-t.b)/i:t.g===r?e.h=2+(t.b-t.r)/i:e.h=4+(t.r-t.g)/i:e.h=-1,e.h*=60,e.h<0&&(e.h+=360),e.s*=100/255,e.b*=100/255,e}),o=e.hex2rgb=function(t){return t=parseInt(t.indexOf("#")>-1?t.substring(1):t,16),{r:t>>16,g:(65280&t)>>8,b:255&t}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var i=n(1),o=r(i),a=n(322),s=r(a);(0,o["default"])("body").on("change",'.form-input-file > input[type="file"]',function(t){var e=t.target,n=e.files,r=(0,o["default"])(e).next();if(n.length){var i=n.length>1?"s":"",a="";a+=n.length+" file"+i+" selected",a+="
    ";for(var u=0;u"+n[u].name+" ("+(0,s["default"])(n[u].size,2)+")";a+="
",r.html(a)}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Instance=void 0;var o=function(){function t(t,e){for(var n=0;n