From 44715ee09b7b326667369ab0508ef10f3d45e7c5 Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Wed, 16 May 2018 10:59:44 -0700 Subject: [PATCH] Filepicker: Pass params in the POST when listing files in folder --- themes/grav/app/forms/fields/filepicker.js | 5 +++-- themes/grav/js/admin.min.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/themes/grav/app/forms/fields/filepicker.js b/themes/grav/app/forms/fields/filepicker.js index 521ec848..9672c021 100644 --- a/themes/grav/app/forms/fields/filepicker.js +++ b/themes/grav/app/forms/fields/filepicker.js @@ -1,5 +1,5 @@ import $ from 'jquery'; -import { config } from 'grav-config'; +import { config, uri_params } from 'grav-config'; import request from '../../utils/request'; const insertTextAt = (string, index, text) => [string.slice(0, index), text, string.slice(index)].join(''); @@ -45,10 +45,11 @@ export default class FilePickerField { let parent = field.closest('[data-grav-filepicker]'); let name = parent.data('name'); let value = parent.data('value'); + let params = JSON.stringify(uri_params || '{}'); request(url, { method: 'post', - body: { name } + body: { name, params } }, (response) => { if (typeof response.files === 'undefined') { return; diff --git a/themes/grav/js/admin.min.js b/themes/grav/js/admin.min.js index 6c95bcbc..fa69cb31 100644 --- a/themes/grav/js/admin.min.js +++ b/themes/grav/js/admin.min.js @@ -9,7 +9,7 @@ e.registerHelper("hintWords","css",x),e.defineMIME("text/css",{documentTypes:i,m e.registerHelper("hintWords","php",[a,o,s].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var l={name:"clike",helperType:"php",keywords:t(a),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(o),builtin:t(s),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var n;if(n=e.match(/<<\s*/)){var i=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var a=e.current().slice(n[0].length+(i?2:1));if(i&&e.eat(i),a)return(t.tokStack||(t.tokStack=[])).push(a,0),t.tokenize=r(a,"'"!=i),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=r('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=r(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,n){function r(t,n){var r=n.curMode==a;if(t.sol()&&n.pending&&'"'!=n.pending&&"'"!=n.pending&&(n.pending=null),r)return r&&null==n.php.tokenize&&t.match("?>")?(n.curMode=i,n.curState=n.html,n.php.context.prev||(n.php=null),"meta"):a.token(t,n.curState);if(t.match(/^<\?\w*/))return n.curMode=a,n.php||(n.php=e.startState(a,i.indent(n.html,""))),n.curState=n.php,"meta";if('"'==n.pending||"'"==n.pending){for(;!t.eol()&&t.next()!=n.pending;);var o="string"}else if(n.pending&&t.pos/.test(l)?n.pending=s[0]:n.pending={end:t.pos,style:o},t.backUp(l.length-u)),o}var i=e.getMode(t,n&&n.htmlMode||"text/html"),a=e.getMode(t,l);return{startState:function(){var t=e.startState(i),r=n.startOpen?e.startState(a):null;return{html:t,php:r,curMode:n.startOpen?a:i,curState:n.startOpen?r:t,pending:null}},copyState:function(t){var n,r=t.html,o=e.copyState(i,r),s=t.php,l=s&&e.copyState(a,s);return n=t.curMode==i?o:l,{html:o,php:l,curMode:t.curMode,curState:n,pending:t.pending}},token:r,indent:function(e,t){return e.curMode!=a&&/^\s*<\//.test(t)||e.curMode==a&&/^\?>/.test(t)?i.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",l)})},function(e,t,n){!function(e){e(n(392))}(function(e){"use strict";function t(e,t,n,r,i,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=i,this.prev=a}function n(e,n,r,i){var a=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(a=e.context.indented),e.context=new t(a,n,r,i,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function i(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function o(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,j=l.isIdentifierChar||/[\w\$_\xa1-\uffff]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-m,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var o=t.context;if(e.sol()&&(null==o.align&&(o.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return d(e,t),null;p=h=null;var s=(t.tokenize||u)(e,t);if("comment"==s||"meta"==s)return s;if(null==o.align&&(o.align=!0),";"==p||":"==p||","==p&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==p)n(t,e.column(),"}");else if("["==p)n(t,e.column(),"]");else if("("==p)n(t,e.column(),")");else if("}"==p){for(;"statement"==o.type;)o=r(t);for("}"==o.type&&(o=r(t));"statement"==o.type;)o=r(t)}else p==o.type?r(t):E&&(("}"==o.type||"top"==o.type)&&";"!=p||"statement"==o.type&&"newstatement"==p)&&n(t,e.column(),"statement",e.current());if("variable"==s&&("def"==t.prevToken||l.typeFirstDefinitions&&i(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(s="def"),S.token){var c=S.token(e,t,s);void 0!==c&&(s=c)}return"def"==s&&l.styleDefs===!1&&(s="variable"),t.startOfLine=!1,t.prevToken=h?"def":s||p,d(e,t),s},indent:function(t,n){if(t.tokenize!=u&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,i=n&&n.charAt(0);if("statement"==r.type&&"}"==i&&(r=r.prev),l.dontIndentStatements)for(;"statement"==r.type&&l.dontIndentStatements.test(r.info);)r=r.prev;if(S.indent){var a=S.indent(t,r,n);if("number"==typeof a)return a}var o=i==r.type,s=r.prev&&"switch"==r.prev.info;if(l.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||o?r.indented+(o?0:m)+(o||!s||/^(?:case|default)\b/.test(n)?0:m):r.indented+v:r.column+(o?0:1)},electricInput:I?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});var b="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",w="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:o(b),types:o(w+" 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:o("case do else for if switch while struct"),defKeywords:o("struct"),typeFirstDefinitions:!0,atoms:o("null true false"),hooks:{"#":l,"*":u},modeProps:{fold:["brace","include"]}}),m(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:o(b+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:o(w+" bool wchar_t"),blockKeywords:o("catch class do else finally for if struct switch try while"),defKeywords:o("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:o("true false null"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":l,"*":u,u:f,U:f,L:f,R:f,0:c,1:c,2:c,3:c,4:c,5:c,6:c,7:c,8:c,9:c,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&d(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),m("text/x-java",{name:"clike",keywords:o("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 @interface"),types:o("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:o("catch class do else finally for if switch try while"),defKeywords:o("class interface enum @interface"),typeFirstDefinitions:!0,atoms:o("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),m("text/x-csharp",{name:"clike",keywords:o("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:o("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:o("catch class do else finally for foreach if struct switch try while"),defKeywords:o("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=p,p(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),m("text/x-scala",{name:"clike",keywords:o("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:o("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:o("catch class enum do else finally for forSome if match switch try while"),defKeywords:o("class enum def object package trait type val var"),atoms:o("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=v,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=g(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{triples:'"'}}}),m("text/x-kotlin",{name:"clike",keywords:o("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 suspend actual expect"),types:o("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,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object interface fun"),atoms:o("true false null this"),hooks:{'"':function(e,t){return t.tokenize=y(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),m(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:o("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:o("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:o("for while do if else struct"),builtin:o("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:o("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:{"#":l},modeProps:{fold:["brace","include"]}}),m("text/x-nesc",{name:"clike",keywords:o(b+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:o(w),blockKeywords:o("case do else for if switch while struct"),atoms:o("null true false"),hooks:{"#":l},modeProps:{fold:["brace","include"]}}),m("text/x-objectivec",{name:"clike",keywords:o(b+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:o(w),atoms:o("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":l,indent:function(e,t,n){if("statement"==t.type&&/^@\w/.test(n))return t.indented}},modeProps:{fold:"brace"}}),m("text/x-squirrel",{name:"clike",keywords:o("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:o(w),blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:!0,atoms:o("true false null"),hooks:{"#":l},modeProps:{fold:["brace","include"]}});var k=null;m("text/x-ceylon",{name:"clike",keywords:o("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:o("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:o("class dynamic function interface module object package value"),builtin:o("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:o("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=_(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!k||!e.match("`"))&&(t.tokenize=k,k=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})},function(e,t,n){!function(e){e(n(392),n(429))}(function(e){"use strict";e.defineMode("sass",function(t){function n(e){return new RegExp("^"+e.join("|"))}function r(e){return!e.peek()||e.match(/\s+$/,!1)}function i(e,t){var n=e.peek();return")"===n?(e.next(),t.tokenizer=c,"operator"):"("===n?(e.next(),e.eatSpace(),"operator"):"'"===n||'"'===n?(t.tokenizer=o(e.next()),"string"):(t.tokenizer=o(")",!1),"string")}function a(e,t){return function(n,r){return n.sol()&&n.indentation()<=e?(r.tokenizer=c,c(n,r)):(t&&n.skipTo("*/")?(n.next(),n.next(),r.tokenizer=c):n.skipToEnd(),"comment")}}function o(e,t){function n(i,a){var o=i.next(),l=i.peek(),u=i.string.charAt(i.pos-2),f="\\"!==o&&l===e||o===e&&"\\"!==u;return f?(o!==e&&t&&i.next(),r(i)&&(a.cursorHalf=0),a.tokenizer=c,"string"):"#"===o&&"{"===l?(a.tokenizer=s(n),i.next(),"operator"):"string"}return null==t&&(t=!0),n}function s(e){return function(t,n){return"}"===t.peek()?(t.next(),n.tokenizer=e,"operator"):c(t,n)}}function l(e){if(0==e.indentCount){e.indentCount++;var n=e.scopes[0].offset,r=n+t.indentUnit;e.scopes.unshift({offset:r})}}function u(e){1!=e.scopes.length&&e.scopes.shift()}function c(e,t){var n=e.peek();if(e.match("/*"))return t.tokenizer=a(e.indentation(),!0),t.tokenizer(e,t);if(e.match("//"))return t.tokenizer=a(e.indentation(),!1),t.tokenizer(e,t);if(e.match("#{"))return t.tokenizer=s(c),"operator";if('"'===n||"'"===n)return e.next(),t.tokenizer=o(n),"string";if(t.cursorHalf){if("#"===n&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return r(e)&&(t.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return r(e)&&(t.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return r(e)&&(t.cursorHalf=0),"unit";if(e.match(_))return r(e)&&(t.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=i,r(e)&&(t.cursorHalf=0),"atom";if("$"===n)return e.next(),e.eatWhile(/[\w-]/),r(e)&&(t.cursorHalf=0),"variable-2";if("!"===n)return e.next(),t.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(w))return r(e)&&(t.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return r(e)&&(t.cursorHalf=0),d=e.current().toLowerCase(),v.hasOwnProperty(d)?"atom":m.hasOwnProperty(d)?"keyword":h.hasOwnProperty(d)?(t.prevProp=e.current().toLowerCase(),"property"):"tag";if(r(e))return t.cursorHalf=0,null}else{if("-"===n&&e.match(/^-\w+-/))return"meta";if("."===n){if(e.next(),e.match(/^[\w-]+/))return l(t),"qualifier";if("#"===e.peek())return l(t),"tag"}if("#"===n){if(e.next(),e.match(/^[\w-]+/))return l(t),"builtin";if("#"===e.peek())return l(t),"tag"}if("$"===n)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(_))return"keyword";if(e.match(/^url/)&&"("===e.peek())return t.tokenizer=i,"atom";if("="===n&&e.match(/^=[\w-]+/))return l(t),"meta";if("+"===n&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===n&&e.match(/@extend/)&&(e.match(/\s*[\w]/)||u(t)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return l(t),"def";if("@"===n)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){d=e.current().toLowerCase();var f=t.prevProp+"-"+d;return h.hasOwnProperty(f)?"property":h.hasOwnProperty(d)?(t.prevProp=d,"property"):g.hasOwnProperty(d)?"property":"tag"}return e.match(/ *:/,!1)?(l(t),t.cursorHalf=1,t.prevProp=e.current().toLowerCase(),"property"):e.match(/ *,/,!1)?"tag":(l(t),"tag")}if(":"===n)return e.match(k)?"variable-3":(e.next(),t.cursorHalf=1,"operator")}return e.match(w)?"operator":(e.next(),null)}function f(e,n){e.sol()&&(n.indentCount=0);var r=n.tokenizer(e,n),i=e.current();if("@return"!==i&&"}"!==i||u(n),null!==r){for(var a=e.pos-i.length,o=a+t.indentUnit*n.indentCount,s=[],l=0;l","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"],w=n(b),k=/^::?[a-zA-Z_][\w\-]*/;return{startState:function(){return{tokenizer:c,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var n=f(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e){return e.scopes[0].offset}}},"css"),e.defineMIME("text/x-sass","sass")})},function(e,t,n){!function(e){e(n(392),n(441))}(function(e){"use strict";e.defineMode("twig:inner",function(){function e(e,o){var s=e.peek();if(o.incomment)return e.skipTo("#}")?(e.eatWhile(/\#|}/),o.incomment=!1):e.skipToEnd(),"comment";if(o.intag){if(o.operator){if(o.operator=!1,e.match(i))return"atom";if(e.match(a))return"number"}if(o.sign){if(o.sign=!1,e.match(i))return"atom";if(e.match(a))return"number"}if(o.instring)return s==o.instring&&(o.instring=!1),e.next(),"string";if("'"==s||'"'==s)return o.instring=s,e.next(),"string";if(e.match(o.intag+"}")||e.eat("-")&&e.match(o.intag+"}"))return o.intag=!1,"tag";if(e.match(n))return o.operator=!0,"operator";if(e.match(r))o.sign=!0;else if(e.eat(" ")||e.sol()){if(e.match(t))return"keyword";if(e.match(i))return"atom";if(e.match(a))return"number";e.sol()&&e.next()}else e.next();return"variable"}if(e.eat("{")){if(e.eat("#"))return o.incomment=!0,e.skipTo("#}")?(e.eatWhile(/\#|}/),o.incomment=!1):e.skipToEnd(),"comment";if(s=e.eat(/\{|%/))return o.intag=s,"{"==s&&(o.intag="}"),e.eat("-"),"tag"}e.next()}var t=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],n=/^[+\-*&%=<>!?|~^]/,r=/^[:\[\(\{]/,i=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],a=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return t=new RegExp("(("+t.join(")|(")+"))\\b"),i=new RegExp("(("+i.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(t,n){return e(t,n)}}}),e.defineMode("twig",function(t,n){var r=e.getMode(t,"twig:inner");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:r,parseDelimiters:!0}):r}),e.defineMIME("text/x-twig","twig")})},function(e,t,n){!function(e){e(n(392))}(function(e){"use strict";e.multiplexingMode=function(t){function n(e,t,n,r){if("string"==typeof t){var i=e.indexOf(t,n);return r&&i>-1?i+t.length:i}var a=t.exec(n?e.slice(n):e);return a?a.index+n+(r?a[0].length:0):-1}var r=Array.prototype.slice.call(arguments,1);return{startState:function(){return{outer:e.startState(t),innerActive:null,inner:null}},copyState:function(n){return{outer:e.copyState(t,n.outer),innerActive:n.innerActive,inner:n.innerActive&&e.copyState(n.innerActive.mode,n.inner)}},token:function(i,a){if(a.innerActive){var o=a.innerActive,s=i.string;if(!o.close&&i.sol())return a.innerActive=a.inner=null,this.token(i,a);var l=o.close?n(s,o.close,i.pos,o.parseDelimiters):-1;if(l==i.pos&&!o.parseDelimiters)return i.match(o.close),a.innerActive=a.inner=null,o.delimStyle&&o.delimStyle+" "+o.delimStyle+"-close";l>-1&&(i.string=s.slice(0,l));var u=o.mode.token(i,a.inner);return l>-1&&(i.string=s),l==i.pos&&o.parseDelimiters&&(a.innerActive=a.inner=null),o.innerStyle&&(u=u?u+" "+o.innerStyle:o.innerStyle),u}for(var c=1/0,s=i.string,f=0;fn.keyCol)return e.skipToEnd(),"string";if(n.literal&&(n.literal=!1),e.sol()){if(n.keyCol=0,n.pair=!1,n.pairStart=!1,e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==r?n.inlinePairs++:"}"==r?n.inlinePairs--:"["==r?n.inlineList++:n.inlineList--,"meta";if(n.inlineList>0&&!i&&","==r)return e.next(),"meta";if(n.inlinePairs>0&&!i&&","==r)return n.keyCol=0,n.pair=!1,n.pairStart=!1,e.next(),"meta";if(n.pairStart){if(e.match(/^\s*(\||\>)\s*/))return n.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==n.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(n.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(t))return"keyword"}return!n.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(n.pair=!0,n.keyCol=e.indentation(),"atom"):n.pair&&e.match(/^:\s*/)?(n.pairStart=!0,"meta"):(n.pairStart=!1,n.escaped="\\"==r,e.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")})},function(e,t,n){!function(e){e(n(392))}(function(e){"use strict";function t(e,t){var r=t.line,i=0,a=0,o=n.exec(e.getLine(r)),s=o[1];do{i+=1;var l=r+i,u=e.getLine(l),c=n.exec(u);if(c){var f=c[1],d=parseInt(o[3],10)+i-a,p=parseInt(c[3],10),h=p;if(s===f)d===p&&(h=p+1),d>p&&(h=d+1),e.replaceRange(u.replace(n,f+h+c[4]+c[5]),{line:l,ch:0},{line:l,ch:u.length});else{if(s.length>f.length)return;if(s.length[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,r=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(a){ if(a.getOption("disableInput"))return e.Pass;for(var o=a.listSelections(),s=[],l=0;l\s*$/.test(p)||a.replaceRange("",{line:u.line,ch:0},{line:u.line,ch:u.ch+1}),s[l]="\n";else{var v=h[1],g=h[5],y=!(i.test(h[2])||h[2].indexOf(">")>=0),_=y?parseInt(h[3],10)+1+h[4]:h[2].replace("x"," ");s[l]="\n"+v+_+g,y&&t(a,u)}}a.replaceSelections(s)}})},function(e,t,n){!function(e){e(n(392))}(function(e){"use strict";function t(e){for(var t=0;t1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(t,i,e)}function m(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(function(){p(e)},t.options.delay||500))}function v(e,t){for(var n=t.target||t.srcElement,r=document.createDocumentFragment(),a=0;a=0&&b.splice(t,1)}function s(e){var t=document.createElement("style");return e.attrs.type="text/css",u(t,e.attrs),a(e,t),t}function l(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",u(t,e.attrs),a(e,t),t}function u(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function c(e,t){var n,r,i,a;if(t.transform&&e.css){if(a=t.transform(e.css),!a)return function(){};e.css=a}if(t.singleton){var u=_++;n=y||(y=s(t)),r=f.bind(null,n,u,!1),i=f.bind(null,n,u,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=p.bind(null,n,t),i=function(){o(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=d.bind(null,n),i=function(){o(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function f(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=k(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function d(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function p(e,t,n){var r=n.css,i=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||a)&&(r=w(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(o),s&&URL.revokeObjectURL(s)}var h={},m=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},v=m(function(){return window&&document&&document.all&&!window.atob}),g=function(e){var t={};return function(n){return"undefined"==typeof t[n]&&(t[n]=e.call(this,n)),t[n]}}(function(e){return document.querySelector(e)}),y=null,_=0,b=[],w=n(450);e.exports=function(e,t){t=t||{},t.attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||(t.singleton=v()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=i(e,t);return r(n,t),function(e){for(var a=[],o=0;o-1&&(o+=s)}var l={message:i.reason,severity:i.code.startsWith("W")?"warning":"error",from:e.Pos(i.line-1,a),to:e.Pos(i.line-1,o)};n.push(l)}}}e.registerHelper("lint","javascript",t)})},function(e,t,n){!function(e){e(n(392))}(function(e){"use strict";e.registerHelper("lint","json",function(t){var n=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),n;jsonlint.parseError=function(t,r){var i=r.loc;n.push({from:e.Pos(i.first_line-1,i.first_column),to:e.Pos(i.last_line-1,i.last_column),message:t})};try{jsonlint.parse(t)}catch(e){}return n})})},function(e,t,n){!function(e){e(n(392))}(function(e){"use strict";e.registerHelper("lint","yaml",function(t){var n=[];if(!window.jsyaml)return window.console&&window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run."),n;try{jsyaml.load(t)}catch(t){var r=t.mark,i=r?e.Pos(r.line,r.column):e.Pos(0,0),a=i;n.push({from:i,to:a,message:t.message})}return n})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i);(0,a.default)('[name="task"][value="saveas"], [name="task"][value="switchlanguage"]').on("mousedown touchstart",function(e){var t=["lang","redirect"],n=(0,a.default)(e.currentTarget),r=(0,a.default)("#"+n.attr("form"));if(r.length)return t.forEach(function(e){var t=n.attr(e);if(t){var i=r.find('[name="data['+e+']"]');i.length||(i=(0,a.default)(''),r.append(i)),i.val(t)}}),!0})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(457),a=r(i),o=n(463),s=r(o),l=n(464),u=r(l);t.default={Form:{Form:s.default,Instance:o.Instance},Fields:u.default,FormState:{FormState:a.default,Instance:i.Instance}}},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.DOMBehaviors=t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{ignore:[],form_id:"blueprints"};i(this,e),this.options=t,this.refresh(),this.form&&this.fields.length&&(d=this.collect(),this.loadState=d,p.attach())}return a(e,[{key:"refresh",value:function(){return this.form=(0,s.default)("form#"+this.options.form_id).filter(":noparents(.remodal)"),this.fields=(0,s.default)("form#"+this.options.form_id+' *, [form="'+this.options.form_id+'"]').filter(":input:not(.no-form)").filter(":noparents(.remodal)"),this}},{key:"collect",value:function(){var e=this;if(this.form&&this.fields.length){var t={};return this.refresh().fields.each(function(n,r){r=(0,s.default)(r);var i=r.prop("name"),a=r.prop("type"),o=r.prop("tagName").toLowerCase(),l=void 0;if(!i.startsWith("toggleable_")&&"data[lang]"!==i&&"data[redirect]"!==i){switch(a){case"checkbox":l=r.is(":checked");break;case"radio":if(!r.is(":checked"))return;l=r.val();break;default:l=r.val()}"select"===o&&null===l&&(l=""),Array.isArray(l)&&(l=l.join("|")),i&&!~e.options.ignore.indexOf(i)&&(t[i]=l)}}),u.default.OrderedMap(t)}}},{key:"diff",value:function(){return(0,f.default)(d,this.collect())}},{key:"equals",value:function(){return this.form&&this.fields.length?u.default.is(d,this.collect()):null}}]),e}();t.default=h;var m=t.Instance=new h;t.DOMBehaviors=p}).call(t,function(){return this}())},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){"use strict";function e(e,t){t&&(e.prototype=Object.create(t.prototype)),e.prototype.constructor=e}function t(e){return a(e)?e:C(e)}function n(e){return o(e)?e:O(e)}function r(e){return s(e)?e:P(e)}function i(e){return a(e)&&!l(e)?e:T(e)}function a(e){return!(!e||!e[un])}function o(e){return!(!e||!e[cn])}function s(e){return!(!e||!e[fn])}function l(e){return o(e)||s(e)}function u(e){return!(!e||!e[dn])}function c(e){return e.value=!1,e}function f(e){e&&(e.value=!0)}function d(){}function p(e,t){t=t||0;for(var n=Math.max(0,e.length-t),r=new Array(n),i=0;i>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?h(e)+t:t}function v(){return!0}function g(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function y(e,t){return b(e,t,0)}function _(e,t){return b(e,t,t)}function b(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function w(e){this.next=e}function k(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function x(){return{value:void 0,done:!0}}function S(e){return!!I(e)}function A(e){return e&&"function"==typeof e.next}function E(e){var t=I(e);return t&&t.call(e)}function I(e){var t=e&&(xn&&e[xn]||e[Sn]);if("function"==typeof t)return t}function M(e){return e&&"number"==typeof e.length}function C(e){return null===e||void 0===e?q():a(e)?e.toSeq():R(e)}function O(e){return null===e||void 0===e?q().toKeyedSeq():a(e)?o(e)?e.toSeq():e.fromEntrySeq():F(e)}function P(e){return null===e||void 0===e?q():a(e)?o(e)?e.entrySeq():e.toIndexedSeq():U(e)}function T(e){return(null===e||void 0===e?q():a(e)?o(e)?e.entrySeq():e:U(e)).toSetSeq()}function j(e){this._array=e,this.size=e.length}function z(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function D(e){this._iterable=e,this.size=e.length||e.size}function L(e){this._iterator=e,this._iteratorCache=[]}function N(e){return!(!e||!e[En])}function q(){return In||(In=new j([]))}function F(e){var t=Array.isArray(e)?new j(e).fromEntrySeq():A(e)?new L(e).fromEntrySeq():S(e)?new D(e).fromEntrySeq():"object"==typeof e?new z(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function U(e){var t=B(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function R(e){var t=B(e)||"object"==typeof e&&new z(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function B(e){return M(e)?new j(e):A(e)?new L(e):S(e)?new D(e):void 0}function V(e,t,n,r){var i=e._cache;if(i){for(var a=i.length-1,o=0;o<=a;o++){var s=i[n?a-o:o];if(t(s[1],r?s[0]:o,e)===!1)return o+1}return o}return e.__iterateUncached(t,n)}function H(e,t,n,r){var i=e._cache;if(i){var a=i.length-1,o=0;return new w(function(){var e=i[n?a-o:o];return o++>a?x():k(t,r?e[0]:o-1,e[1])})}return e.__iteratorUncached(t,n)}function G(e,t){return t?W(t,e,"",{"":e}):K(e)}function W(e,t,n,r){return Array.isArray(t)?e.call(r,n,P(t).map(function(n,r){return W(e,n,r,t)})):$(t)?e.call(r,n,O(t).map(function(n,r){return W(e,n,r,t)})):t}function K(e){return Array.isArray(e)?P(e).map(K).toList():$(e)?O(e).map(K).toMap():e}function $(e){return e&&(e.constructor===Object||void 0===e.constructor)}function J(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Y(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||o(e)!==o(t)||s(e)!==s(t)||u(e)!==u(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!l(e);if(u(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&J(i[1],e)&&(n||J(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var c=e;e=t,t=c}var f=!0,d=t.__iterate(function(t,r){if(n?!e.has(t):i?!J(t,e.get(r,gn)):!J(e.get(r,gn),t))return f=!1,!1});return f&&e.size===d}function X(e,t){if(!(this instanceof X))return new X(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Mn)return Mn;Mn=this}}function Q(e,t){if(!e)throw new Error(t)}function Z(e,t,n){if(!(this instanceof Z))return new Z(e,t,n);if(Q(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function ae(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return ie(n)}if("string"===t)return e.length>Nn?oe(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return le(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function oe(e){var t=Un[e];return void 0===t&&(t=se(e),Fn===qn&&(Fn=0,Un={}),Fn++,Un[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function ce(e){Q(e!==1/0,"Cannot perform this action with an infinite size.")}function fe(e){return null===e||void 0===e?ke():de(e)&&!u(e)?e:ke().withMutations(function(t){var r=n(e);ce(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function de(e){return!(!e||!e[Rn])}function pe(e,t){this.ownerID=e,this.entries=t}function he(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ge(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ye(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&be(e._root)}function _e(e,t){return k(e,t[0],t[1])}function be(e,t){return{node:e,index:0,__prev:t}}function we(e,t,n,r){var i=Object.create(Bn);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function ke(){return Vn||(Vn=we(0))}function xe(e,t,n){var r,i;if(e._root){var a=c(yn),o=c(_n);if(r=Se(e._root,e.__ownerID,0,void 0,t,n,a,o),!o.value)return e;i=e.size+(a.value?n===gn?-1:1:0)}else{if(n===gn)return e;i=1,r=new pe(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?we(i,r):ke()}function Se(e,t,n,r,i,a,o,s){return e?e.update(t,n,r,i,a,o,s):a===gn?e:(f(s),f(o),new ge(t,r,[i,a]))}function Ae(e){return e.constructor===ge||e.constructor===ve}function Ee(e,t,n,r,i){if(e.keyHash===r)return new ve(t,r,[e.entry,i]);var a,o=(0===n?e.keyHash:e.keyHash>>>n)&vn,s=(0===n?r:r>>>n)&vn,l=o===s?[Ee(e,t,n+hn,r,i)]:(a=new ge(t,r,i),o>>=1)o[s]=1&n?t[a++]:void 0;return o[r]=i,new me(e,a+1,o)}function Oe(e,t,r){for(var i=[],o=0;o>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function Le(e,t,n,r){var i=r?e:p(e);return i[t]=n,i}function Ne(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var a=new Array(i),o=0,s=0;s0&&ia?0:a-n,u=o-n;return u>mn&&(u=mn),function(){if(i===u)return Yn;var e=t?--u:i++;return r&&r[e]}}function i(e,r,i){var s,l=e&&e.array,u=i>a?0:a-i>>r,c=(o-i>>r)+1;return c>mn&&(c=mn),function(){for(;;){if(s){var e=s();if(e!==Yn)return e;s=null}if(u===c)return Yn;var a=t?--c:u++;s=n(l&&l[a],r-hn,i+(a<=e.size||t<0)return e.withMutations(function(e){t<0?Je(e,t).set(0,n):Je(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,a=c(_n);return t>=Xe(e._capacity)?r=We(r,e.__ownerID,0,t,n,a):i=We(i,e.__ownerID,e._level,t,n,a),a.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):Ve(e._origin,e._capacity,e._level,i,r):e}function We(e,t,n,r,i,a){var o=r>>>n&vn,s=e&&o0){var u=e&&e.array[o],c=We(u,t,n-hn,r,i,a);return c===u?e:(l=Ke(e,t),l.array[o]=c,l)}return s&&e.array[o]===i?e:(f(a),l=Ke(e,t),void 0===i&&o===l.array.length-1?l.array.pop():l.array[o]=i,l)}function Ke(e,t){return t&&e&&t===e.ownerID?e:new Re(e?e.array.slice():[],t)}function $e(e,t){if(t>=Xe(e._capacity))return e._tail; if(t<1<0;)n=n.array[t>>>r&vn],r-=hn;return n}}function Je(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new d,i=e._origin,a=e._capacity,o=i+t,s=void 0===n?a:n<0?a+n:i+n;if(o===i&&s===a)return e;if(o>=s)return e.clear();for(var l=e._level,u=e._root,c=0;o+c<0;)u=new Re(u&&u.array.length?[void 0,u]:[],r),l+=hn,c+=1<=1<f?new Re([],r):h;if(h&&p>f&&ohn;g-=hn){var y=f>>>g&vn;v=v.array[y]=Ke(v.array[y],r)}v.array[f>>>hn&vn]=h}if(s=p)o-=p,s-=p,l=hn,u=null,m=m&&m.removeBefore(r,0,o);else if(o>i||p>>l&vn;if(_!==p>>>l&vn)break;_&&(c+=(1<i&&(u=u.removeBefore(r,l,o-c)),u&&po&&(o=u.size),a(l)||(u=u.map(function(e){return G(e)})),i.push(u)}return o>e.size&&(e=e.setSize(o)),je(e,t,i)}function Xe(e){return e>>hn<=mn&&o.size>=2*a.size?(i=o.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=a.remove(t),i=s===o.size-1?o.pop():o.set(s,void 0))}else if(l){if(n===o.get(s)[1])return e;r=a,i=o.set(s,[t,n])}else r=a.set(t,o.size),i=o.set(o.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):et(r,i)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function st(e){var t=Mt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ct,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===kn){var r=e.__iterator(t,n);return new w(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===wn?bn:wn,n)},t}function lt(e,t,n){var r=Mt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var a=e.get(r,gn);return a===gn?i:t.call(n,a,r,e)},r.__iterateUncached=function(r,i){var a=this;return e.__iterate(function(e,i,o){return r(t.call(n,e,i,o),i,a)!==!1},i)},r.__iteratorUncached=function(r,i){var a=e.__iterator(kn,i);return new w(function(){var i=a.next();if(i.done)return i;var o=i.value,s=o[0];return k(r,s,t.call(n,o[1],s,e),i)})},r}function ut(e,t){var n=Mt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Ct,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function ct(e,t,n,r){var i=Mt(e);return r&&(i.has=function(r){var i=e.get(r,gn);return i!==gn&&!!t.call(n,i,r,e)},i.get=function(r,i){var a=e.get(r,gn);return a!==gn&&t.call(n,a,r,e)?a:i}),i.__iterateUncached=function(i,a){var o=this,s=0;return e.__iterate(function(e,a,l){if(t.call(n,e,a,l))return s++,i(e,r?a:s-1,o)},a),s},i.__iteratorUncached=function(i,a){var o=e.__iterator(kn,a),s=0;return new w(function(){for(;;){var a=o.next();if(a.done)return a;var l=a.value,u=l[0],c=l[1];if(t.call(n,c,u,e))return k(i,r?u:s++,c,a)}})},i}function ft(e,t,n){var r=fe().asMutable();return e.__iterate(function(i,a){r.update(t.call(n,i,a,e),0,function(e){return e+1})}),r.asImmutable()}function dt(e,t,n){var r=o(e),i=(u(e)?Qe():fe()).asMutable();e.__iterate(function(a,o){i.update(t.call(n,a,o,e),function(e){return e=e||[],e.push(r?[o,a]:a),e})});var a=It(e);return i.map(function(t){return St(e,a(t))})}function pt(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),g(t,n,i))return e;var a=y(t,i),o=_(n,i);if(a!==a||o!==o)return pt(e.toSeq().cacheResult(),t,n,r);var s,l=o-a;l===l&&(s=l<0?0:l);var u=Mt(e);return u.size=0===s?s:e.size&&s||void 0,!r&&N(e)&&s>=0&&(u.get=function(t,n){return t=m(this,t),t>=0&&ts)return x();var e=i.next();return r||t===wn?e:t===bn?k(t,l-1,void 0,e):k(t,l-1,e.value[1],e)})},u}function ht(e,t,n){var r=Mt(e);return r.__iterateUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterate(r,i);var o=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++o&&r(e,i,a)}),o},r.__iteratorUncached=function(r,i){var a=this;if(i)return this.cacheResult().__iterator(r,i);var o=e.__iterator(kn,i),s=!0;return new w(function(){if(!s)return x();var e=o.next();if(e.done)return e;var i=e.value,l=i[0],u=i[1];return t.call(n,u,l,a)?r===kn?e:k(r,l,u,e):(s=!1,x())})},r}function mt(e,t,n,r){var i=Mt(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,l=0;return e.__iterate(function(e,a,u){if(!s||!(s=t.call(n,e,a,u)))return l++,i(e,r?a:l-1,o)}),l},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(kn,a),l=!0,u=0;return new w(function(){var e,a,c;do{if(e=s.next(),e.done)return r||i===wn?e:i===bn?k(i,u++,void 0,e):k(i,u++,e.value[1],e);var f=e.value;a=f[0],c=f[1],l&&(l=t.call(n,c,a,o))}while(l);return i===kn?e:k(i,a,c,e)})},i}function vt(e,t){var r=o(e),i=[e].concat(t).map(function(e){return a(e)?r&&(e=n(e)):e=r?F(e):U(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var l=i[0];if(l===e||r&&o(l)||s(e)&&s(l))return l}var u=new j(i);return r?u=u.toKeyedSeq():s(e)||(u=u.toSetSeq()),u=u.flatten(!0),u.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),u}function gt(e,t,n){var r=Mt(e);return r.__iterateUncached=function(r,i){function o(e,u){var c=this;e.__iterate(function(e,i){return(!t||u0}function xt(e,n,r){var i=Mt(e);return i.size=new j(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(wn,t),i=0;!(n=r.next()).done&&e(n.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(e,i){var a=r.map(function(e){return e=t(e),E(i?e.reverse():e)}),o=0,s=!1;return new w(function(){var t;return s||(t=a.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?x():k(e,o++,n.apply(null,t.map(function(e){return e.value})))})},i}function St(e,t){return N(e)?t:e.constructor(t)}function At(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Et(e){return ce(e.size),h(e)}function It(e){return o(e)?n:s(e)?r:i}function Mt(e){return Object.create((o(e)?O:s(e)?P:T).prototype)}function Ct(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):C.prototype.cacheResult.call(this)}function Ot(e,t){return e>t?1:et?-1:0}function an(e){if(e.size===1/0)return 0;var t=u(e),n=o(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+sn(ae(e),ae(t))|0}:function(e,t){r=r+sn(ae(e),ae(t))|0}:t?function(e){r=31*r+ae(e)|0}:function(e){r=r+ae(e)|0});return on(i,r)}function on(e,t){return t=Pn(t,3432918353),t=Pn(t<<15|t>>>-15,461845907),t=Pn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Pn(t^t>>>16,2246822507),t=Pn(t^t>>>13,3266489909),t=ie(t^t>>>16)}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var ln=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=a,t.isKeyed=o,t.isIndexed=s,t.isAssociative=l,t.isOrdered=u,t.Keyed=n,t.Indexed=r,t.Set=i;var un="@@__IMMUTABLE_ITERABLE__@@",cn="@@__IMMUTABLE_KEYED__@@",fn="@@__IMMUTABLE_INDEXED__@@",dn="@@__IMMUTABLE_ORDERED__@@",pn="delete",hn=5,mn=1<r?x():k(e,i,n[t?r-i++:i++])})},e(z,O),z.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},z.prototype.has=function(e){return this._object.hasOwnProperty(e)},z.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,a=0;a<=i;a++){var o=r[t?i-a:a];if(e(n[o],o,this)===!1)return a+1}return a},z.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,a=0;return new w(function(){var o=r[t?i-a:a];return a++>i?x():k(e,o,n[o])})},z.prototype[dn]=!0,e(D,P),D.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=E(n),i=0;if(A(r))for(var a;!(a=r.next()).done&&e(a.value,i++,this)!==!1;);return i},D.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=E(n);if(!A(r))return new w(x);var i=0;return new w(function(){var t=r.next();return t.done?t:k(e,i++,t.value)})},e(L,P),L.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return k(e,i,r[i++])})};var In;e(X,P),X.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},X.prototype.get=function(e,t){return this.has(e)?this._value:t},X.prototype.includes=function(e){return J(this._value,e)},X.prototype.slice=function(e,t){var n=this.size;return g(e,t,n)?this:new X(this._value,_(t,n)-y(e,n))},X.prototype.reverse=function(){return this},X.prototype.indexOf=function(e){return J(this._value,e)?0:-1},X.prototype.lastIndexOf=function(e){return J(this._value,e)?this.size:-1},X.prototype.__iterate=function(e,t){for(var n=0;n=0&&t=0&&nn?x():k(e,a++,o)})},Z.prototype.equals=function(e){return e instanceof Z?this._start===e._start&&this._end===e._end&&this._step===e._step:Y(this,e)};var Cn;e(ee,t),e(te,ee),e(ne,ee),e(re,ee),ee.Keyed=te,ee.Indexed=ne,ee.Set=re;var On,Pn="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},Tn=Object.isExtensible,jn=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),zn="function"==typeof WeakMap;zn&&(On=new WeakMap);var Dn=0,Ln="__immutablehash__";"function"==typeof Symbol&&(Ln=Symbol(Ln));var Nn=16,qn=255,Fn=0,Un={};e(fe,te),fe.of=function(){var e=ln.call(arguments,0);return ke().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},fe.prototype.toString=function(){return this.__toString("Map {","}")},fe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},fe.prototype.set=function(e,t){return xe(this,e,t)},fe.prototype.setIn=function(e,t){return this.updateIn(e,gn,function(){return t})},fe.prototype.remove=function(e){return xe(this,e,gn)},fe.prototype.deleteIn=function(e){return this.updateIn(e,function(){return gn})},fe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},fe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=ze(this,Pt(e),t,n);return r===gn?void 0:r},fe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):ke()},fe.prototype.merge=function(){return Oe(this,void 0,arguments)},fe.prototype.mergeWith=function(e){var t=ln.call(arguments,1);return Oe(this,e,t)},fe.prototype.mergeIn=function(e){var t=ln.call(arguments,1);return this.updateIn(e,ke(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},fe.prototype.mergeDeep=function(){return Oe(this,Pe,arguments)},fe.prototype.mergeDeepWith=function(e){var t=ln.call(arguments,1);return Oe(this,Te(e),t)},fe.prototype.mergeDeepIn=function(e){var t=ln.call(arguments,1);return this.updateIn(e,ke(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},fe.prototype.sort=function(e){return Qe(bt(this,e))},fe.prototype.sortBy=function(e,t){return Qe(bt(this,t,e))},fe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},fe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new d)},fe.prototype.asImmutable=function(){return this.__ensureOwner()},fe.prototype.wasAltered=function(){return this.__altered},fe.prototype.__iterator=function(e,t){return new ye(this,e,t)},fe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},fe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?we(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},fe.isMap=de;var Rn="@@__IMMUTABLE_MAP__@@",Bn=fe.prototype;Bn[Rn]=!0,Bn[pn]=Bn.remove,Bn.removeIn=Bn.deleteIn,pe.prototype.get=function(e,t,n,r){for(var i=this.entries,a=0,o=i.length;a=Hn)return Ie(e,l,r,i);var h=e&&e===this.ownerID,m=h?l:p(l);return d?s?u===c-1?m.pop():m[u]=m.pop():m[u]=[r,i]:m.push([r,i]),h?(this.entries=m,this):new pe(e,m)}},he.prototype.get=function(e,t,n,r){void 0===t&&(t=ae(n));var i=1<<((0===e?t:t>>>e)&vn),a=this.bitmap;return 0===(a&i)?r:this.nodes[De(a&i-1)].get(e+hn,t,n,r)},he.prototype.update=function(e,t,n,r,i,a,o){void 0===n&&(n=ae(r));var s=(0===t?n:n>>>t)&vn,l=1<=Gn)return Ce(e,d,u,s,h);if(c&&!h&&2===d.length&&Ae(d[1^f]))return d[1^f];if(c&&h&&1===d.length&&Ae(h))return h;var m=e&&e===this.ownerID,v=c?h?u:u^l:u|l,g=c?h?Le(d,f,h,m):qe(d,f,m):Ne(d,f,h,m);return m?(this.bitmap=v,this.nodes=g,this):new he(e,v,g)},me.prototype.get=function(e,t,n,r){void 0===t&&(t=ae(n));var i=(0===e?t:t>>>e)&vn,a=this.nodes[i];return a?a.get(e+hn,t,n,r):r},me.prototype.update=function(e,t,n,r,i,a,o){void 0===n&&(n=ae(r));var s=(0===t?n:n>>>t)&vn,l=i===gn,u=this.nodes,c=u[s];if(l&&!c)return this;var f=Se(c,e,t+hn,n,r,i,a,o);if(f===c)return this;var d=this.count;if(c){if(!f&&(d--,d=0&&e>>t&vn;if(r>=this.array.length)return new Re([],e);var i,a=0===r;if(t>0){var o=this.array[r];if(i=o&&o.removeBefore(e,t-hn,n),i===o&&a)return this}if(a&&!i)return this;var s=Ke(this,e);if(!a)for(var l=0;l>>t&vn;if(r>=this.array.length)return this;var i;if(t>0){var a=this.array[r];if(i=a&&a.removeAfter(e,t-hn,n),i===a&&r===this.array.length-1)return this}var o=Ke(this,e);return o.array.splice(r+1),i&&(o.array[r]=i),o};var Jn,Yn={};e(Qe,fe),Qe.of=function(){return this(arguments)},Qe.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Qe.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Qe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tt()},Qe.prototype.set=function(e,t){return nt(this,e,t)},Qe.prototype.remove=function(e){return nt(this,e,gn)},Qe.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Qe.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Qe.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Qe.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?et(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Qe.isOrderedMap=Ze,Qe.prototype[dn]=!0,Qe.prototype[pn]=Qe.prototype.remove;var Xn;e(rt,O),rt.prototype.get=function(e,t){return this._iter.get(e,t)},rt.prototype.has=function(e){return this._iter.has(e)},rt.prototype.valueSeq=function(){return this._iter.valueSeq()},rt.prototype.reverse=function(){var e=this,t=ut(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},rt.prototype.map=function(e,t){var n=this,r=lt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},rt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Et(this):0,function(i){return e(i,t?--n:n++,r)}),t)},rt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(wn,t),r=t?Et(this):0;return new w(function(){var i=n.next();return i.done?i:k(e,t?--r:r++,i.value,i)})},rt.prototype[dn]=!0,e(it,P),it.prototype.includes=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},it.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t),r=0;return new w(function(){var t=n.next();return t.done?t:k(e,r++,t.value,t)})},e(at,T),at.prototype.has=function(e){return this._iter.includes(e)},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){var t=n.next();return t.done?t:k(e,t.value,t.value,t)})},e(ot,O),ot.prototype.entrySeq=function(){return this._iter.toSeq()},ot.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){At(t);var r=a(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(wn,t);return new w(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){At(r);var i=a(r);return k(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},it.prototype.cacheResult=rt.prototype.cacheResult=at.prototype.cacheResult=ot.prototype.cacheResult=Ct,e(Tt,te),Tt.prototype.toString=function(){return this.__toString(zt(this)+" {","}")},Tt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Tt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Tt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=jt(this,ke()))},Tt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+zt(this));if(this._map&&!this._map.has(e)){var n=this._defaultValues[e];if(t===n)return this}var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:jt(this,r)},Tt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:jt(this,t)},Tt.prototype.wasAltered=function(){return this._map.wasAltered()},Tt.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},Tt.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},Tt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?jt(this,t,e):(this.__ownerID=e,this._map=t,this)};var Qn=Tt.prototype;Qn[pn]=Qn.remove,Qn.deleteIn=Qn.removeIn=Bn.removeIn,Qn.merge=Bn.merge,Qn.mergeWith=Bn.mergeWith,Qn.mergeIn=Bn.mergeIn,Qn.mergeDeep=Bn.mergeDeep,Qn.mergeDeepWith=Bn.mergeDeepWith, -Qn.mergeDeepIn=Bn.mergeDeepIn,Qn.setIn=Bn.setIn,Qn.update=Bn.update,Qn.updateIn=Bn.updateIn,Qn.withMutations=Bn.withMutations,Qn.asMutable=Bn.asMutable,Qn.asImmutable=Bn.asImmutable,e(Nt,re),Nt.of=function(){return this(arguments)},Nt.fromKeys=function(e){return this(n(e).keySeq())},Nt.prototype.toString=function(){return this.__toString("Set {","}")},Nt.prototype.has=function(e){return this._map.has(e)},Nt.prototype.add=function(e){return Ft(this,this._map.set(e,!0))},Nt.prototype.remove=function(e){return Ft(this,this._map.remove(e))},Nt.prototype.clear=function(){return Ft(this,this._map.clear())},Nt.prototype.union=function(){var e=ln.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):$t(e,t)},Wt.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;ce(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):$t(t,n)},Wt.prototype.pop=function(){return this.slice(1)},Wt.prototype.unshift=function(){return this.push.apply(this,arguments)},Wt.prototype.unshiftAll=function(e){return this.pushAll(e)},Wt.prototype.shift=function(){return this.pop.apply(this,arguments)},Wt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Jt()},Wt.prototype.slice=function(e,t){if(g(e,t,this.size))return this;var n=y(e,this.size),r=_(t,this.size);if(r!==this.size)return ne.prototype.slice.call(this,e,t);for(var i=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):$t(i,a)},Wt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?$t(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Wt.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},Wt.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,k(e,n++,t)}return x()})},Wt.isStack=Kt;var ir="@@__IMMUTABLE_STACK__@@",ar=Wt.prototype;ar[ir]=!0,ar.withMutations=Bn.withMutations,ar.asMutable=Bn.asMutable,ar.asImmutable=Bn.asImmutable,ar.wasAltered=Bn.wasAltered;var or;t.Iterator=w,Yt(t,{toArray:function(){ce(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return fe(this.toKeyedSeq())},toObject:function(){ce(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Qe(this.toKeyedSeq())},toOrderedSet:function(){return Bt(o(this)?this.valueSeq():this)},toSet:function(){return Nt(o(this)?this.valueSeq():this)},toSetSeq:function(){return new at(this)},toSeq:function(){return s(this)?this.toIndexedSeq():o(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Wt(o(this)?this.valueSeq():this)},toList:function(){return Fe(o(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=ln.call(arguments,0);return St(this,vt(this,e))},includes:function(e){return this.some(function(t){return J(t,e)})},entries:function(){return this.__iterator(kn)},every:function(e,t){ce(this.size);var n=!0;return this.__iterate(function(r,i,a){if(!e.call(t,r,i,a))return n=!1,!1}),n},filter:function(e,t){return St(this,ct(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return ce(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){ce(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return St(this,lt(this,e,t))},reduce:function(e,t,n){ce(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,a,o){i?(i=!1,r=t):r=e.call(n,r,t,a,o)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return St(this,ut(this,!0))},slice:function(e,t){return St(this,pt(this,e,t,!0))},some:function(e,t){return!this.every(Zt(e),t)},sort:function(e){return St(this,bt(this,e))},values:function(){return this.__iterator(wn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return h(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return ft(this,e,t)},equals:function(e){return Y(this,e)},entrySeq:function(){var e=this;if(e._cache)return new j(e._cache);var t=e.toSeq().map(Qt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Zt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,a){if(e.call(t,n,i,a))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(v)},flatMap:function(e,t){return St(this,yt(this,e,t))},flatten:function(e){return St(this,gt(this,e,!0))},fromEntrySeq:function(){return new ot(this)},get:function(e,t){return this.find(function(t,n){return J(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=Pt(e);!(n=i.next()).done;){var a=n.value;if(r=r&&r.get?r.get(a,gn):gn,r===gn)return t}return r},groupBy:function(e,t){return dt(this,e,t)},has:function(e){return this.get(e,gn)!==gn},hasIn:function(e){return this.getIn(e,gn)!==gn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return J(t,e)})},keySeq:function(){return this.toSeq().map(Xt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return wt(this,e)},maxBy:function(e,t){return wt(this,t,e)},min:function(e){return wt(this,e?en(e):rn)},minBy:function(e,t){return wt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return St(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return St(this,mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Zt(e),t)},sortBy:function(e,t){return St(this,bt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return St(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return St(this,ht(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Zt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=an(this))}});var sr=t.prototype;sr[un]=!0,sr[An]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=tn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Yt(n,{flip:function(){return St(this,st(this))},mapEntries:function(e,t){var n=this,r=0;return St(this,this.toSeq().map(function(i,a){return e.call(t,[a,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return St(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var lr=n.prototype;lr[cn]=!0,lr[An]=sr.entries,lr.__toJS=sr.toObject,lr.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Yt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return St(this,ct(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return St(this,ut(this,!1))},slice:function(e,t){return St(this,pt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=y(e,e<0?this.count():this.size);var r=this.slice(0,e);return St(this,1===n?r:r.concat(p(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return St(this,gt(this,e,!1))},get:function(e,t){return e=m(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=m(this,e),e>=0&&(void 0!==this.size?this.size===1/0||e=1e4)return d(e,t,n);var l=a.diff(e,t),f=0;return l.forEach(function(e){if("="===e.op)f++;else if("!="===e.op){if(c(e.val)&&c(e.newVal)){var t=d(e.val,e.newVal,s(o,f));i=i.concat(t)}else i.push(u("replace",s(o,f),e.newVal));f++}else"+"===e.op?(i.push(u("add",s(o,f),e.val)),f++):"-"===e.op&&i.push(u("remove",s(o,f)))}),i},h=function(e,t,n){var r=n||"";return e===t?[]:[u("replace",s(r,""),t)]},m=function(e,t,n){return r.is(e,t)?r.List():e==t||null!=e&&null!=t?f(e)&&f(t)?r.fromJS(p(e,t)):c(e)&&c(t)?r.fromJS(d(e,t)):r.fromJS(h(e,t,n)):r.fromJS([u("replace","/",t)])};e.exports=m},function(e,t,n){"use strict";var r=n(458),i=function(e){return r.Iterable.isKeyed(e)},a=function(e){return r.Iterable.isIndexed(e)},o=function(e,t,n){return"remove"===e?{op:e,path:t}:{op:e,path:t,value:n}};e.exports={isMap:i,isIndexed:a,op:o}},function(e,t,n){"use strict";function r(e,t){for(var n=e.size||0,r=t.size||0,o=a(n+1,r+1,0),s=0;s=0||c>=0;)u>=0&&c>=0&&i.is(t.get(u),n.get(c))?(o.push(new s({op:"=",val:t.get(u)})),u-=1,c-=1):u>=0&&c>=0&&u===c&&!i.is(t.get(u),n.get(c))?(o.push(new l({val:t.get(u),newVal:n.get(u)})),u-=1,c-=1):c>=0&&(u===-1||e[u+1][c]>=e[u][c+1])?(o.push(new s({op:"+",val:n.get(c)})),c-=1):u>=0&&(c===-1||e[u+1][c]');n.append(i)}),e=!0,!0)})})}},{key:"addedNodes",value:function(e){var t=this;e.forEach(function(e){"childList"===e.type&&(e.addedNodes&&(0,s.default)("body").trigger("mutation._grav",e.target,e,t),e.removedNodes&&(0,s.default)("body").trigger("mutation_removed._grav",{target:e.target,mutation:e},t))})}}]),t}();t.default=l;t.Instance=new l("form#blueprints")}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(465),a=r(i),o=n(466),s=r(o),l=n(467),u=r(l),c=n(468),f=r(c),d=n(469),p=r(d),h=n(390),m=r(h),v=n(592),g=r(v),y=n(387),_=r(y),b=n(597),w=r(b),k=n(600),x=r(k),S=n(601),A=r(S),E=n(602),I=r(E);t.default={FilepickerField:{FilepickerField:a.default,Instance:i.Instance},SelectizeField:{SelectizeField:s.default,Instance:o.Instance},ArrayField:{ArrayField:u.default,Instance:l.Instance},CollectionsField:{CollectionsField:f.default,Instance:c.Instance},DateTimeField:{DateTimeField:p.default,Instance:d.Instance},EditorField:{EditorField:m.default,Instance:h.Instance},ColorpickerField:{ColorpickerField:g.default,Instance:v.Instance},FilesField:{FilesField:_.default,Instance:y.Instance},SelectUniqueField:{SelectUniqueField:A.default,Instance:S.Instance},MediapickerField:{MediapickerField:w.default,Instance:b.Instance},MultilevelField:{MultilevelField:x.default,Instance:k.Instance},IconpickerField:{IconpickerField:I.default,Instance:E.Instance}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"all",r=l.config.current_url+(".json/task"+l.config.param_sep+"getFilesInFolder"),o=e.closest("[data-grav-filepicker]"),s=o.data("name"),u=o.data("value");(0,c.default)(r,{method:"post",body:{name:s}},function(e){if("undefined"!=typeof e.files){var r=[];a=e.thumbs||{};for(var o=0;o0,d=!1,p=function(e,t){var n="";if(u&&i&&(!e.status||"available"===e.status)&&e.name.match(/\.(jpg|jpeg|png|gif)$/i)){var r=f(l.config.base_url_relative+"/../"+i+"/"+e.name,-4,"@2x"),o=f(l.config.base_url_relative+"/../"+i+"/"+e.name,-4,"@3x"),s=a[e.name]||l.config.base_url_relative+"/../"+i+"/"+e.name;n='\n "}return'
\n \n '+n+' '+t(e.name)+"\n \n
"};r.selectize({plugins:["required-fix"],valueField:"name",labelField:"name",searchField:"name",optgroups:[{$order:1,value:"pending",label:"Pending"},{$order:2,value:"available",label:"Available"}],optgroupField:"status",create:!1,preload:!1,render:{option:function(e,t){return p(e,t)},item:function(e,t){return p(e,t)}},onInitialize:function(){this.load(function(e){return o(r,function(t){return e(t)},"selected")})},onLoad:function(){if(!d){var e=this.getValue();this.updateOption(e,{name:e}),d=!0}},onFocus:function(){this.load(function(e){return o(r,function(t){return e(t)})})}})}}}]),e}();t.default=d;t.Instance=new d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.options=Object.assign({},n),this.elements=[],(0,s.default)("[data-grav-selectize]").each(function(e,n){return t.add(n)}),(0,s.default)("body").on("mutation._grav",this._onAddedNodes.bind(this))}return a(e,[{key:"add",value:function(e){e=(0,s.default)(e);var t=e.prop("tagName").toLowerCase(),n="input"===t||"select"===t,r=(n?e.closest("[data-grav-selectize]"):e).data("grav-selectize")||{},i=n?e:e.find("input, select");i.length&&!i.get(0).selectize&&(i.selectize(s.default.extend({},r,{plugins:["required-fix"]})),this.elements.push(i.data("selectize")))}},{key:"_onAddedNodes",value:function(e,t){var n=this,r=(0,s.default)(t).find("select.fancy, input.fancy, [data-grav-selectize]");r.length&&r.each(function(e,t){return n.add(t)})}}]),e}();t.default=l;t.Instance=new l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n\n \n \n ':'\n
\n \n \n \n ',e+='\n \n \n
'}}]),e}(),d=function(){function e(){var t=this;i(this,e),c.on("input",'[data-grav-array-type="key"], [data-grav-array-type="value"]',function(e){return t.actionInput(e)}),c.on("click touch",'[data-grav-array-action]:not([data-grav-array-action="sort"])',function(e){return t.actionEvent(e)}),this.arrays=(0,s.default)(),(0,s.default)('[data-grav-field="array"]').each(function(e,n){return t.addArray(n)}),(0,s.default)("body").on("mutation._grav",this._onAddedNodes.bind(this))}return a(e,[{key:"addArray",value:function(e){e=(0,s.default)(e),e.find('[data-grav-array-type="container"]').each(function(e,t){t=(0,s.default)(t),t.data("array-sort")||t[0].hasAttribute("data-array-nosort")||t.data("array-sort",new u.default(t.get(0),{handle:".fa-bars",animation:150}))})}},{key:"actionInput",value:function(e){var t=(0,s.default)(e.target),n=t.data("grav-array-type");this._setTemplate(t);var r=t.data("array-template"),i="key"===n?t:t.siblings('[data-grav-array-type="key"]:first'),a="value"===n?t:t.siblings('[data-grav-array-type="value"]:first'),o=r.isValueOnly()?this.getIndexFor(t):i.val();o=o.toString().replace(/\[/g,"%5B").replace(/]/g,"%5D");var l=r.getName()+"["+o+"]";a.attr("name",a.val()?l:r.getName()),this.refreshNames(r)}},{key:"actionEvent",value:function(e){e&&e.preventDefault();var t=(0,s.default)(e.target),n=t.data("grav-array-action"),r=t.parents('[data-grav-array-type="container"]');this._setTemplate(t),this[n+"Action"](t);var i=r.find("> div");r[i.length>1?"removeClass":"addClass"]("one-child")}},{key:"addAction",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]');n.after(t.getNewRow())}},{key:"remAction",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]'),r=!n.siblings().length;if(r){var i=(0,s.default)(t.getNewRow());n.after(i),i.find('[data-grav-array-type="value"]:last').attr("name",t.getName())}n.remove(),this.refreshNames(t)}},{key:"refreshNames",value:function(e){if(e.isValueOnly()){var t=e.container.find('> div > [data-grav-array-type="row"]'),n=t.find('[name]:not([name=""])');n.each(function(e,t){t=(0,s.default)(t);var n=t.attr("name");n=n.replace(/\[\d+\]$/,"["+e+"]"),t.attr("name",n)}),n.length||t.find('[data-grav-array-type="value"]').attr("name",e.getName())}}},{key:"getIndexFor",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]');return t.container.find((t.isValueOnly()?"> div ":"")+' > [data-grav-array-type="row"]').index(n)}},{key:"_setTemplate",value:function(e){e.data("array-template")||e.data("array-template",new f(e.closest("[data-grav-array-name]")))}},{key:"_onAddedNodes",value:function(e,t){var n=this,r=(0,s.default)(t).find('[data-grav-field="array"]');r.length&&r.each(function(e,t){t=(0,s.default)(t),~n.arrays.index(t)||n.addArray(t)})}}]),e}();t.default=d;t.Instance=new d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n .collection-actions [data-action="add"]',function(e){return t.addItem(e)}),e.on("click",'> ul > li > .item-actions [data-action="delete"]',function(e){return t.removeItem(e)}),e.on("click",'> ul > li > .item-actions [data-action="collapse"]',function(e){return t.collapseItem(e)}),e.on("click",'> ul > li > .item-actions [data-action="expand"]',function(e){return t.expandItem(e)}),e.on("click",'> .collection-actions [data-action-sort="date"]',function(e){return t.sortItems(e)}),e.on("click",'> .collection-actions [data-action="collapse_all"]',function(e){return t.collapseItems(e)}),e.on("click",'> .collection-actions [data-action="expand_all"]',function(e){return t.expandItems(e)}),e.on("input change","[data-key-observe]",function(e){return t.observeKey(e)}),e.find("[data-collection-holder]").each(function(e,n){n=(0,s.default)(n),n.data("collection-sort")||n[0].hasAttribute("data-collection-nosort")||n.data("collection-sort",new u.default(n.get(0),{ +Qn.mergeDeepIn=Bn.mergeDeepIn,Qn.setIn=Bn.setIn,Qn.update=Bn.update,Qn.updateIn=Bn.updateIn,Qn.withMutations=Bn.withMutations,Qn.asMutable=Bn.asMutable,Qn.asImmutable=Bn.asImmutable,e(Nt,re),Nt.of=function(){return this(arguments)},Nt.fromKeys=function(e){return this(n(e).keySeq())},Nt.prototype.toString=function(){return this.__toString("Set {","}")},Nt.prototype.has=function(e){return this._map.has(e)},Nt.prototype.add=function(e){return Ft(this,this._map.set(e,!0))},Nt.prototype.remove=function(e){return Ft(this,this._map.remove(e))},Nt.prototype.clear=function(){return Ft(this,this._map.clear())},Nt.prototype.union=function(){var e=ln.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):$t(e,t)},Wt.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;ce(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):$t(t,n)},Wt.prototype.pop=function(){return this.slice(1)},Wt.prototype.unshift=function(){return this.push.apply(this,arguments)},Wt.prototype.unshiftAll=function(e){return this.pushAll(e)},Wt.prototype.shift=function(){return this.pop.apply(this,arguments)},Wt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Jt()},Wt.prototype.slice=function(e,t){if(g(e,t,this.size))return this;var n=y(e,this.size),r=_(t,this.size);if(r!==this.size)return ne.prototype.slice.call(this,e,t);for(var i=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):$t(i,a)},Wt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?$t(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Wt.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},Wt.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new w(function(){if(r){var t=r.value;return r=r.next,k(e,n++,t)}return x()})},Wt.isStack=Kt;var ir="@@__IMMUTABLE_STACK__@@",ar=Wt.prototype;ar[ir]=!0,ar.withMutations=Bn.withMutations,ar.asMutable=Bn.asMutable,ar.asImmutable=Bn.asImmutable,ar.wasAltered=Bn.wasAltered;var or;t.Iterator=w,Yt(t,{toArray:function(){ce(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return fe(this.toKeyedSeq())},toObject:function(){ce(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Qe(this.toKeyedSeq())},toOrderedSet:function(){return Bt(o(this)?this.valueSeq():this)},toSet:function(){return Nt(o(this)?this.valueSeq():this)},toSetSeq:function(){return new at(this)},toSeq:function(){return s(this)?this.toIndexedSeq():o(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Wt(o(this)?this.valueSeq():this)},toList:function(){return Fe(o(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=ln.call(arguments,0);return St(this,vt(this,e))},includes:function(e){return this.some(function(t){return J(t,e)})},entries:function(){return this.__iterator(kn)},every:function(e,t){ce(this.size);var n=!0;return this.__iterate(function(r,i,a){if(!e.call(t,r,i,a))return n=!1,!1}),n},filter:function(e,t){return St(this,ct(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return ce(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){ce(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return St(this,lt(this,e,t))},reduce:function(e,t,n){ce(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,a,o){i?(i=!1,r=t):r=e.call(n,r,t,a,o)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return St(this,ut(this,!0))},slice:function(e,t){return St(this,pt(this,e,t,!0))},some:function(e,t){return!this.every(Zt(e),t)},sort:function(e){return St(this,bt(this,e))},values:function(){return this.__iterator(wn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return h(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return ft(this,e,t)},equals:function(e){return Y(this,e)},entrySeq:function(){var e=this;if(e._cache)return new j(e._cache);var t=e.toSeq().map(Qt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Zt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,a){if(e.call(t,n,i,a))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(v)},flatMap:function(e,t){return St(this,yt(this,e,t))},flatten:function(e){return St(this,gt(this,e,!0))},fromEntrySeq:function(){return new ot(this)},get:function(e,t){return this.find(function(t,n){return J(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=Pt(e);!(n=i.next()).done;){var a=n.value;if(r=r&&r.get?r.get(a,gn):gn,r===gn)return t}return r},groupBy:function(e,t){return dt(this,e,t)},has:function(e){return this.get(e,gn)!==gn},hasIn:function(e){return this.getIn(e,gn)!==gn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return J(t,e)})},keySeq:function(){return this.toSeq().map(Xt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return wt(this,e)},maxBy:function(e,t){return wt(this,t,e)},min:function(e){return wt(this,e?en(e):rn)},minBy:function(e,t){return wt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return St(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return St(this,mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Zt(e),t)},sortBy:function(e,t){return St(this,bt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return St(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return St(this,ht(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Zt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=an(this))}});var sr=t.prototype;sr[un]=!0,sr[An]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=tn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Yt(n,{flip:function(){return St(this,st(this))},mapEntries:function(e,t){var n=this,r=0;return St(this,this.toSeq().map(function(i,a){return e.call(t,[a,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return St(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var lr=n.prototype;lr[cn]=!0,lr[An]=sr.entries,lr.__toJS=sr.toObject,lr.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Yt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return St(this,ct(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return St(this,ut(this,!1))},slice:function(e,t){return St(this,pt(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=y(e,e<0?this.count():this.size);var r=this.slice(0,e);return St(this,1===n?r:r.concat(p(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return St(this,gt(this,e,!1))},get:function(e,t){return e=m(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=m(this,e),e>=0&&(void 0!==this.size?this.size===1/0||e=1e4)return d(e,t,n);var l=a.diff(e,t),f=0;return l.forEach(function(e){if("="===e.op)f++;else if("!="===e.op){if(c(e.val)&&c(e.newVal)){var t=d(e.val,e.newVal,s(o,f));i=i.concat(t)}else i.push(u("replace",s(o,f),e.newVal));f++}else"+"===e.op?(i.push(u("add",s(o,f),e.val)),f++):"-"===e.op&&i.push(u("remove",s(o,f)))}),i},h=function(e,t,n){var r=n||"";return e===t?[]:[u("replace",s(r,""),t)]},m=function(e,t,n){return r.is(e,t)?r.List():e==t||null!=e&&null!=t?f(e)&&f(t)?r.fromJS(p(e,t)):c(e)&&c(t)?r.fromJS(d(e,t)):r.fromJS(h(e,t,n)):r.fromJS([u("replace","/",t)])};e.exports=m},function(e,t,n){"use strict";var r=n(458),i=function(e){return r.Iterable.isKeyed(e)},a=function(e){return r.Iterable.isIndexed(e)},o=function(e,t,n){return"remove"===e?{op:e,path:t}:{op:e,path:t,value:n}};e.exports={isMap:i,isIndexed:a,op:o}},function(e,t,n){"use strict";function r(e,t){for(var n=e.size||0,r=t.size||0,o=a(n+1,r+1,0),s=0;s=0||c>=0;)u>=0&&c>=0&&i.is(t.get(u),n.get(c))?(o.push(new s({op:"=",val:t.get(u)})),u-=1,c-=1):u>=0&&c>=0&&u===c&&!i.is(t.get(u),n.get(c))?(o.push(new l({val:t.get(u),newVal:n.get(u)})),u-=1,c-=1):c>=0&&(u===-1||e[u+1][c]>=e[u][c+1])?(o.push(new s({op:"+",val:n.get(c)})),c-=1):u>=0&&(c===-1||e[u+1][c]');n.append(i)}),e=!0,!0)})})}},{key:"addedNodes",value:function(e){var t=this;e.forEach(function(e){"childList"===e.type&&(e.addedNodes&&(0,s.default)("body").trigger("mutation._grav",e.target,e,t),e.removedNodes&&(0,s.default)("body").trigger("mutation_removed._grav",{target:e.target,mutation:e},t))})}}]),t}();t.default=l;t.Instance=new l("form#blueprints")}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(465),a=r(i),o=n(466),s=r(o),l=n(467),u=r(l),c=n(468),f=r(c),d=n(469),p=r(d),h=n(390),m=r(h),v=n(592),g=r(v),y=n(387),_=r(y),b=n(597),w=r(b),k=n(600),x=r(k),S=n(601),A=r(S),E=n(602),I=r(E);t.default={FilepickerField:{FilepickerField:a.default,Instance:i.Instance},SelectizeField:{SelectizeField:s.default,Instance:o.Instance},ArrayField:{ArrayField:u.default,Instance:l.Instance},CollectionsField:{CollectionsField:f.default,Instance:c.Instance},DateTimeField:{DateTimeField:p.default,Instance:d.Instance},EditorField:{EditorField:m.default,Instance:h.Instance},ColorpickerField:{ColorpickerField:g.default,Instance:v.Instance},FilesField:{FilesField:_.default,Instance:y.Instance},SelectUniqueField:{SelectUniqueField:A.default,Instance:S.Instance},MediapickerField:{MediapickerField:w.default,Instance:b.Instance},MultilevelField:{MultilevelField:x.default,Instance:k.Instance},IconpickerField:{IconpickerField:I.default,Instance:E.Instance}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"all",r=l.config.current_url+(".json/task"+l.config.param_sep+"getFilesInFolder"),o=e.closest("[data-grav-filepicker]"),s=o.data("name"),u=o.data("value"),f=JSON.stringify(l.uri_params||"{}");(0,c.default)(r,{method:"post",body:{name:s,params:f}},function(e){if("undefined"!=typeof e.files){var r=[];a=e.thumbs||{};for(var o=0;o0,d=!1,p=function(e,t){var n="";if(u&&i&&(!e.status||"available"===e.status)&&e.name.match(/\.(jpg|jpeg|png|gif)$/i)){var r=f(l.config.base_url_relative+"/../"+i+"/"+e.name,-4,"@2x"),o=f(l.config.base_url_relative+"/../"+i+"/"+e.name,-4,"@3x"),s=a[e.name]||l.config.base_url_relative+"/../"+i+"/"+e.name;n='\n "}return'
\n \n '+n+' '+t(e.name)+"\n \n
"};r.selectize({plugins:["required-fix"],valueField:"name",labelField:"name",searchField:"name",optgroups:[{$order:1,value:"pending",label:"Pending"},{$order:2,value:"available",label:"Available"}],optgroupField:"status",create:!1,preload:!1,render:{option:function(e,t){return p(e,t)},item:function(e,t){return p(e,t)}},onInitialize:function(){this.load(function(e){return o(r,function(t){return e(t)},"selected")})},onLoad:function(){if(!d){var e=this.getValue();this.updateOption(e,{name:e}),d=!0}},onFocus:function(){this.load(function(e){return o(r,function(t){return e(t)})})}})}}}]),e}();t.default=d;t.Instance=new d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.options=Object.assign({},n),this.elements=[],(0,s.default)("[data-grav-selectize]").each(function(e,n){return t.add(n)}),(0,s.default)("body").on("mutation._grav",this._onAddedNodes.bind(this))}return a(e,[{key:"add",value:function(e){e=(0,s.default)(e);var t=e.prop("tagName").toLowerCase(),n="input"===t||"select"===t,r=(n?e.closest("[data-grav-selectize]"):e).data("grav-selectize")||{},i=n?e:e.find("input, select");i.length&&!i.get(0).selectize&&(i.selectize(s.default.extend({},r,{plugins:["required-fix"]})),this.elements.push(i.data("selectize")))}},{key:"_onAddedNodes",value:function(e,t){var n=this,r=(0,s.default)(t).find("select.fancy, input.fancy, [data-grav-selectize]");r.length&&r.each(function(e,t){return n.add(t)})}}]),e}();t.default=l;t.Instance=new l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n\n \n \n ':'\n
\n \n \n \n ',e+='\n \n \n
'}}]),e}(),d=function(){function e(){var t=this;i(this,e),c.on("input",'[data-grav-array-type="key"], [data-grav-array-type="value"]',function(e){return t.actionInput(e)}),c.on("click touch",'[data-grav-array-action]:not([data-grav-array-action="sort"])',function(e){return t.actionEvent(e)}),this.arrays=(0,s.default)(),(0,s.default)('[data-grav-field="array"]').each(function(e,n){return t.addArray(n)}),(0,s.default)("body").on("mutation._grav",this._onAddedNodes.bind(this))}return a(e,[{key:"addArray",value:function(e){e=(0,s.default)(e),e.find('[data-grav-array-type="container"]').each(function(e,t){t=(0,s.default)(t),t.data("array-sort")||t[0].hasAttribute("data-array-nosort")||t.data("array-sort",new u.default(t.get(0),{handle:".fa-bars",animation:150}))})}},{key:"actionInput",value:function(e){var t=(0,s.default)(e.target),n=t.data("grav-array-type");this._setTemplate(t);var r=t.data("array-template"),i="key"===n?t:t.siblings('[data-grav-array-type="key"]:first'),a="value"===n?t:t.siblings('[data-grav-array-type="value"]:first'),o=r.isValueOnly()?this.getIndexFor(t):i.val();o=o.toString().replace(/\[/g,"%5B").replace(/]/g,"%5D");var l=r.getName()+"["+o+"]";a.attr("name",a.val()?l:r.getName()),this.refreshNames(r)}},{key:"actionEvent",value:function(e){e&&e.preventDefault();var t=(0,s.default)(e.target),n=t.data("grav-array-action"),r=t.parents('[data-grav-array-type="container"]');this._setTemplate(t),this[n+"Action"](t);var i=r.find("> div");r[i.length>1?"removeClass":"addClass"]("one-child")}},{key:"addAction",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]');n.after(t.getNewRow())}},{key:"remAction",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]'),r=!n.siblings().length;if(r){var i=(0,s.default)(t.getNewRow());n.after(i),i.find('[data-grav-array-type="value"]:last').attr("name",t.getName())}n.remove(),this.refreshNames(t)}},{key:"refreshNames",value:function(e){if(e.isValueOnly()){var t=e.container.find('> div > [data-grav-array-type="row"]'),n=t.find('[name]:not([name=""])');n.each(function(e,t){t=(0,s.default)(t);var n=t.attr("name");n=n.replace(/\[\d+\]$/,"["+e+"]"),t.attr("name",n)}),n.length||t.find('[data-grav-array-type="value"]').attr("name",e.getName())}}},{key:"getIndexFor",value:function(e){var t=e.data("array-template"),n=e.closest('[data-grav-array-type="row"]');return t.container.find((t.isValueOnly()?"> div ":"")+' > [data-grav-array-type="row"]').index(n)}},{key:"_setTemplate",value:function(e){e.data("array-template")||e.data("array-template",new f(e.closest("[data-grav-array-name]")))}},{key:"_onAddedNodes",value:function(e,t){var n=this,r=(0,s.default)(t).find('[data-grav-field="array"]');r.length&&r.each(function(e,t){t=(0,s.default)(t),~n.arrays.index(t)||n.addArray(t)})}}]),e}();t.default=d;t.Instance=new d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n .collection-actions [data-action="add"]',function(e){return t.addItem(e)}),e.on("click",'> ul > li > .item-actions [data-action="delete"]',function(e){return t.removeItem(e)}),e.on("click",'> ul > li > .item-actions [data-action="collapse"]',function(e){return t.collapseItem(e)}),e.on("click",'> ul > li > .item-actions [data-action="expand"]',function(e){return t.expandItem(e)}),e.on("click",'> .collection-actions [data-action-sort="date"]',function(e){return t.sortItems(e)}),e.on("click",'> .collection-actions [data-action="collapse_all"]',function(e){return t.collapseItems(e)}),e.on("click",'> .collection-actions [data-action="expand_all"]',function(e){return t.expandItems(e)}),e.on("input change","[data-key-observe]",function(e){return t.observeKey(e)}),e.find("[data-collection-holder]").each(function(e,n){n=(0,s.default)(n),n.data("collection-sort")||n[0].hasAttribute("data-collection-nosort")||n.data("collection-sort",new u.default(n.get(0),{ forceFallback:!1,handle:".collection-sort",animation:150,onUpdate:function(){return t.reindex(n)}}))}),this._updateActionsStateBasedOnMinMax(e)}},{key:"addItem",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.data("action-add")||"bottom",r=(0,s.default)(t.closest('[data-type="collection"]')),i=(0,s.default)(r.find('> [data-collection-template="new"]').data("collection-template-html"));this._updateActionsStateBasedOnMinMax(r);var a=r.closest('[data-type="collection"]').find("> ul > [data-collection-item]"),o=r.data("max");if(!("undefined"!=typeof o&&a.length>=o)){r.find("> [data-collection-holder]")["top"===n?"prepend":"append"](i),this.reindex(r),a=r.closest('[data-type="collection"]').find("> ul > [data-collection-item]");var l=r.closest('[data-type="collection"]').find('[data-action-add="top"]'),u=r.closest('[data-type="collection"]').find('[data-action="sort"]');a.length&&(l.length&&l.parent().removeClass("hidden"),u.length&&a.length>1&&u.removeClass("hidden")),(0,s.default)('[data-grav-field="toggleable"] input[type="checkbox"]').trigger("change")}}},{key:"removeItem",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.closest("[data-collection-item]"),r=(0,s.default)(t.closest('[data-type="collection"]')),i=r.closest('[data-type="collection"]').find("> ul > [data-collection-item]"),a=r.data("min");if(!("undefined"!=typeof a&&i.length<=a)){n.remove(),this.reindex(r),i=r.closest('[data-type="collection"]').find("> ul > [data-collection-item]");var o=r.closest('[data-type="collection"]').find('[data-action-add="top"]'),l=r.closest('[data-type="collection"]').find('[data-action="sort"]');i.length||o.length&&o.parent().addClass("hidden"),l.length&&i.length<=1&&l.addClass("hidden"),this._updateActionsStateBasedOnMinMax(r)}}},{key:"collapseItems",value:function(e){var t=(0,s.default)(e.currentTarget),n=(0,s.default)(t.closest('[data-type="collection"]')).find('> ul > [data-collection-item] > .item-actions [data-action="collapse"]');n.click()}},{key:"collapseItem",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.closest("[data-collection-item]");t.attr("data-action","expand").removeClass("fa-chevron-circle-down").addClass("fa-chevron-circle-right"),n.addClass("collection-collapsed")}},{key:"expandItems",value:function(e){var t=(0,s.default)(e.currentTarget),n=(0,s.default)(t.closest('[data-type="collection"]')).find('> ul > [data-collection-item] > .item-actions [data-action="expand"]');n.click()}},{key:"expandItem",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.closest("[data-collection-item]");t.attr("data-action","collapse").removeClass("fa-chevron-circle-right").addClass("fa-chevron-circle-down"),n.removeClass("collection-collapsed")}},{key:"sortItems",value:function(e){var t=(0,s.default)(e.currentTarget),n=t.data("action-sort"),r=t.data("action-sort-dir")||"asc",i=(0,s.default)(t.closest('[data-type="collection"]')),a=i.closest('[data-type="collection"]').find("> ul > [data-collection-item]");a.sort(function(e,t){var i=(0,s.default)(e).find('[name$="['+n+']"]'),a=(0,s.default)(t).find('[name$="['+n+']"]'),o=void 0;return o="asc"===r?i.val()a.val()?1:0:i.val()>a.val()?-1:i.val() ul > [data-collection-item]"),t.each(function(e,t){t=(0,s.default)(t);var n=t.find("[data-key-observe]"),r=n.val(),i=n.length,a=t.data("collection-key-backup");t.attr("data-collection-key",i?r:e),["name","data-grav-field-name","for","id","data-grav-file-settings"].forEach(function(e){t.find("["+e+"], [_"+e+"]").each(function(){var t=(0,s.default)(this),n=[],o=[new RegExp("\\[(\\d+|\\*|"+a+")\\]","g"),new RegExp("\\.(\\d+|\\*|"+a+")\\.","g")];if(i&&!r)return t.attr("_"+e,t.attr(e)),void t.attr(e,null);t.attr("_"+e)&&(t.attr(e,t.attr("_"+e)),t.attr("_"+e,null)),t.parents("[data-collection-key]").map(function(e,t){return n.push((0,s.default)(t).attr("data-collection-key"))}),n.reverse();var l=a,u=t.attr(e).replace(o[0],function(){return l=n.shift()||l,"["+l+"]"});u=u.replace(o[1],function(){return l=n.shift()||l,"."+l+"."}),t.attr(e,u)})})})}},{key:"_onAddedNodes",value:function(e,t){var n=this,r=(0,s.default)(t).find('[data-type="collection"]');r.length&&r.each(function(e,t){t=(0,s.default)(t),~n.lists.index(t)||n.addList(t)})}},{key:"_updateActionsStateBasedOnMinMax",value:function(e){var t=e.closest('[data-type="collection"]').find("> ul > [data-collection-item]"),n=e.data("min"),r=e.data("max");e.find('> .collection-actions [data-action="add"]').attr("disabled",!1),e.find('> ul > li > .item-actions [data-action="delete"]').attr("disabled",!1),"undefined"!=typeof n&&t.length<=n&&e.find('> ul > li > .item-actions [data-action="delete"]').attr("disabled",!0),"undefined"!=typeof r&&t.length>=r&&e.find('> .collection-actions [data-action="add"]').attr("disabled",!0)}}]),e}();t.default=c;t.Instance=new c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n-1,h=(0,s.default)("body"),m="mousedown touchstart MSPointerDown pointerdown",v="mousemove touchmove MSPointerMove pointermove",g="mouseup touchend MSPointerUp pointerup",y=p?"focus":"focusin",_=function(){function e(t){var n=this;i(this,e),this.selector=t,this.field=(0,s.default)(this.selector),this.options=Object.assign({},this.field.data("grav-colorpicker")),this.built=!1,this.attach(),this.options.update&&this.field.on("change._grav_colorpicker",function(e,t,r,i){var a=r,o=(0,d.hex2rgb)(r);i<1&&(a="rgba("+o.r+", "+o.g+", "+o.b+", "+i+")");var s=t.closest(n.options.update);s.length||(s=t.siblings(n.options.update)),s.length||(s=t.parent(".g-colorpicker").find(n.options.update)),s.css({backgroundColor:a})})}return a(e,[{key:"attach",value:function(){var e=this;h.on(y,this.selector,function(t){return e.show(t,t.currentTarget)}),h.on(m,this.selector+" .g-colorpicker, "+this.selector+" .g-colorpicker i",this.bound("iconClick")),h.on("keydown",this.selector,function(t){switch(t.keyCode){case 9:e.hide();break;case 13:case 27:e.hide(),t.currentTarget.blur()}return!0}),h.on("keyup",this.selector,function(t){return e.updateFromInput(!0,t.currentTarget),!0}),h.on("paste",this.selector,function(t){setTimeout(function(){return e.updateFromInput(!0,t.currentTarget)},1)})}},{key:"show",value:function(e,t){t=(0,s.default)(t),this.built||this.build(),this.element=t,this.reposition(),this.wrapper.addClass("cp-visible"),this.updateFromInput();var n=(0,s.default)("#admin-main .content-wrapper").data("scrollbar").getViewElement();this.wrapper.on(m,".cp-grid, .cp-slider, .cp-opacity-slider",this.bound("bodyDown")),h.on(v,this.bound("bodyMove")),h.on(m,this.bound("bodyClick")),h.on(g,this.bound("targetReset")),(0,s.default)(n).on("scroll",this.bound("reposition"))}},{key:"hide",value:function(){if(this.built){this.wrapper.removeClass("cp-visible");var e=(0,s.default)("#admin-main .content-wrapper").data("scrollbar").getViewElement();this.wrapper.undelegate(m,".cp-grid, .cp-slider, .cp-opacity-slider",this.bound("bodyDown")),h.off(v,this.bound("bodyMove")),h.off(m,this.bound("bodyClick")),h.off(g,this.bound("targetReset")),(0,s.default)(e).off("scroll",this.bound("reposition"))}}},{key:"build",value:function(){var e=this;this.wrapper=(0,s.default)('
'),this.slider=(0,s.default)('
').appendTo(this.wrapper).append((0,s.default)('
')),this.opacitySlider=(0,s.default)('
').appendTo(this.wrapper).append((0,s.default)('
')),this.grid=(0,s.default)('
').appendTo(this.wrapper).append((0,s.default)('
')).append((0,s.default)('
')),(0,s.default)("
").appendTo(this.grid.find(".cp-picker"));var t=(0,s.default)('
').appendTo(this.wrapper);this.tabs={hue:(0,s.default)('
').text("HUE").appendTo(t),brightness:(0,s.default)('
').text("BRI").appendTo(t),saturation:(0,s.default)('
').text("SAT").appendTo(t),wheel:(0,s.default)('
').text("WHEEL").appendTo(t),transparent:(0,s.default)('
').text("TRANSPARENT").appendTo(t)},t.on(m,"> div",function(n){var r=(0,s.default)(n.currentTarget);if(r.is(e.tabs.transparent)){var i=e.opacitySlider.height();return e.opacity=0,e.opacitySlider.find(".cp-picker").css({top:(0,u.default)(i-i*e.opacity,0,i)}),void e.move(e.opacitySlider,{manualOpacity:!0})}var a=t.find(".active"),o=a.attr("class").replace(/\s|active|cp-tab-/g,""),l=r.attr("class").replace(/\s|active|cp-tab-/g,"");e.wrapper.removeClass("cp-mode-"+o).addClass("cp-mode-"+l),a.removeClass("active"),r.addClass("active"),e.mode=l,e.updateFromInput()}),this.wrapper.appendTo(".content-wrapper"),this.built=!0,this.mode="hue"}},{key:"reposition",value:function(){var e=(0,s.default)(".content-wrapper")[0],t=this.element[0].getBoundingClientRect(),n=e.getBoundingClientRect(),r={x:0,y:0};this.options.offset&&(r.x=this.options.offset.x||0,r.y=this.options.offset.y||0),this.wrapper.css({top:t.top+t.height+e.scrollTop-n.top+r.y,left:t.left+e.scrollLeft-n.left+r.x})}},{key:"iconClick",value:function(e){if(this.wrapper&&this.wrapper.hasClass("cp-visible"))return!0;e&&e.preventDefault();var t=(0,s.default)(e.currentTarget).find("input");setTimeout(function(){return t.focus()},50)}},{key:"bodyMove",value:function(e){e&&e.preventDefault(),this.target&&this.move(this.target,e)}},{key:"bodyClick",value:function(e){var t=(0,s.default)(e.target);t.closest(".cp-wrapper").length||t.is(this.selector)||this.hide()}},{key:"bodyDown",value:function(e){e&&e.preventDefault(),this.target=(0,s.default)(e.currentTarget),this.move(this.target,e,!0)}},{key:"targetReset",value:function(e){e&&e.preventDefault(),this.target=null}},{key:"move",value:function(e,t){var n=this.element,r=e.find(".cp-picker"),i=e[0].getBoundingClientRect(),a=i.left+window.scrollX,o=i.top+window.scrollY,s=Math.round((t?t.pageX:0)-a),l=Math.round((t?t.pageY:0)-o),u=void 0,c=void 0,f=void 0,d=void 0,p=t.changedTouches||t.originalEvent&&t.originalEvent.changedTouches;t&&p&&(s=(p?p[0].pageX:0)-a,l=(p?p[0].pageY:0)-o),t&&t.manualOpacity&&(l=i.height),s<0&&(s=0),l<0&&(l=0),s>i.width&&(s=i.width),l>i.height&&(l=i.height),e.parent(".cp-mode-wheel").length&&r.parent(".cp-grid").length&&(u=75-s,c=75-l,f=Math.sqrt(u*u+c*c),d=Math.atan2(c,u),d<0&&(d+=2*Math.PI),f>75&&(s=75-75*Math.cos(d),l=75-75*Math.sin(d)),s=Math.round(s),l=Math.round(l)),e.hasClass("cp-grid")?(r.css({top:l,left:s}),this.updateFromPicker(n,e)):(r.css({top:l}),this.updateFromPicker(n,e))}},{key:"updateFromInput",value:function(e,t){t=t?(0,s.default)(t):this.element;var n=t.val(),r=n.replace(/\s/g,"").match(/^rgba?\([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},(.+)\)/),i=void 0,a=void 0;if(n=(0,d.rgbstr2hex)(n)||n,r=r?(0,u.default)(r[1],0,1):1,(i=(0,d.parseHex)(n))||(i="#ffffff"),a=(0,d.hex2hsb)(i),this.built){this.opacity=r;var o=this.opacitySlider.height();this.opacitySlider.find(".cp-picker").css({top:(0,u.default)(o-o*this.opacity,0,o)});var l=this.grid.height(),c=this.grid.width(),f=void 0,p=void 0,h=void 0,m=void 0;switch(o=this.slider.height(),this.mode){case"wheel":f=(0,u.default)(Math.ceil(.75*a.s),0,l/2),p=a.h*Math.PI/180,h=(0,u.default)(75-Math.cos(p)*f,0,c),m=(0,u.default)(75-Math.sin(p)*f,0,l),this.grid.css({backgroundColor:"transparent"}).find(".cp-picker").css({top:m,left:h}),m=150-a.b/(100/l),""===i&&(m=0),this.slider.find(".cp-picker").css({top:m}),this.slider.css({backgroundColor:(0,d.hsb2hex)({h:a.h,s:a.s,b:100})});break;case"saturation":h=(0,u.default)(5*a.h/12,0,150),m=(0,u.default)(l-Math.ceil(a.b/(100/l)),0,l),this.grid.find(".cp-picker").css({top:m,left:h}),m=(0,u.default)(o-a.s*(o/100),0,o),this.slider.find(".cp-picker").css({top:m}),this.slider.css({backgroundColor:(0,d.hsb2hex)({h:a.h,s:100,b:a.b})}),this.grid.find(".cp-grid-inner").css({opacity:a.s/100});break;case"brightness":h=(0,u.default)(5*a.h/12,0,150),m=(0,u.default)(l-Math.ceil(a.s/(100/l)),0,l),this.grid.find(".cp-picker").css({top:m,left:h}),m=(0,u.default)(o-a.b*(o/100),0,o),this.slider.find(".cp-picker").css({top:m}),this.slider.css({backgroundColor:(0,d.hsb2hex)({h:a.h,s:a.s,b:100})}),this.grid.find(".cp-grid-inner").css({opacity:1-a.b/100});break;case"hue":default:h=(0,u.default)(Math.ceil(a.s/(100/c)),0,c),m=(0,u.default)(l-Math.ceil(a.b/(100/l)),0,l),this.grid.find(".cp-picker").css({top:m,left:h}),m=(0,u.default)(o-a.h/(360/o),0,o),this.slider.find(".cp-picker").css({top:m}),this.grid.css({backgroundColor:(0,d.hsb2hex)({h:a.h,s:100,b:100})})}}e||t.val(this.getValue(i)),(this.element||t).trigger("change._grav_colorpicker",[t,i,r])}},{key:"updateFromPicker",value:function(e,t){var n=function(e,t){var n,r;return e.length&&t?(n=e[0].getBoundingClientRect().left,r=e[0].getBoundingClientRect().top,{x:n-t[0].getBoundingClientRect().left+e[0].offsetWidth/2,y:r-t[0].getBoundingClientRect().top+e[0].offsetHeight/2}):null},r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,l=void 0,c=void 0,f=void 0,p=this.wrapper.find(".cp-grid"),h=this.wrapper.find(".cp-slider"),m=this.wrapper.find(".cp-opacity-slider"),v=p.find(".cp-picker"),g=h.find(".cp-picker"),y=m.find(".cp-picker"),_=n(v,p),b=n(g,h),w=n(y,m),k=p[0].getBoundingClientRect().width,x=p[0].getBoundingClientRect().height,S=h[0].getBoundingClientRect().height,A=m[0].getBoundingClientRect().height,E=this.element.val();if(E=(0,d.rgbstr2hex)(E)||E,(r=(0,d.parseHex)(E))||(r="#ffffff"),t.hasClass("cp-grid")||t.hasClass("cp-slider"))switch(this.mode){case"wheel":s=k/2-_.x,l=x/2-_.y,c=Math.sqrt(s*s+l*l),f=Math.atan2(l,s),f<0&&(f+=2*Math.PI),c>75&&(c=75,_.x=69-75*Math.cos(f),_.y=69-75*Math.sin(f)),a=(0,u.default)(c/.75,0,100),i=(0,u.default)(180*f/Math.PI,0,360),o=(0,u.default)(100-Math.floor(b.y*(100/S)),0,100),r=(0,d.hsb2hex)({h:i,s:a,b:o}),h.css({backgroundColor:(0,d.hsb2hex)({h:i,s:a,b:100})});break;case"saturation":i=(0,u.default)(parseInt(_.x*(360/k),10),0,360),a=(0,u.default)(100-Math.floor(b.y*(100/S)),0,100),o=(0,u.default)(100-Math.floor(_.y*(100/x)),0,100),r=(0,d.hsb2hex)({h:i,s:a,b:o}),h.css({backgroundColor:(0,d.hsb2hex)({h:i,s:100,b:o})}),p.find(".cp-grid-inner").css({opacity:a/100});break;case"brightness":i=(0,u.default)(parseInt(_.x*(360/k),10),0,360),a=(0,u.default)(100-Math.floor(_.y*(100/x)),0,100),o=(0,u.default)(100-Math.floor(b.y*(100/S)),0,100),r=(0,d.hsb2hex)({h:i,s:a,b:o}),h.css({backgroundColor:(0,d.hsb2hex)({h:i,s:a,b:100})}),p.find(".cp-grid-inner").css({opacity:1-o/100});break;default:i=(0,u.default)(360-parseInt(b.y*(360/S),10),0,360),a=(0,u.default)(Math.floor(_.x*(100/k)),0,100),o=(0,u.default)(100-Math.floor(_.y*(100/x)),0,100),r=(0,d.hsb2hex)({h:i,s:a,b:o}),p.css({backgroundColor:(0,d.hsb2hex)({h:i,s:100,b:100})})}t.hasClass("cp-opacity-slider")&&(this.opacity=parseFloat(1-w.y/A).toFixed(2)),e.val(this.getValue(r)),this.element.trigger("change._grav_colorpicker",[this.element,r,this.opacity])}},{key:"getValue",value:function(e){if(1===this.opacity)return e;var t=(0,d.hex2rgb)(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+this.opacity+")"}},{key:"bound",value:function e(t){var e=this._bound||(this._bound={});return e[t]||(e[t]=(0,f.default)(this[t],this))}}]),e}();t.default=_;t.Instance=new _("[data-grav-colorpicker]")},function(e,t){function n(e,t,n){return en?n:e}e.exports=n},function(e,t,n){function r(e,t,n){var r=i(arguments,2);return function(){return e.apply(t,r.concat(i(arguments)))}}var i=n(595);e.exports=r},function(e,t){function n(e,t,n){var r=e.length;t=null==t?0:t<0?Math.max(r+t,0):Math.min(t,r),n=null==n?r:n<0?Math.max(r+n,0):Math.min(n,r);for(var i=[];t-1?e.substring(1):e,16),{r:e>>16,g:(65280&e)>>8,b:255&e}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),a=r(i),o=n(598),s=r(o),l=n(372),u={tree:".pages-list-container .mediapicker-scroll",thumb:".thumbs-list-container .mediapicker-scroll"};(0,a.default)(function(){var e="",t=(0,a.default)("body"),n=[],r=[];(0,a.default)(u.tree).each(function(e,t){n.push(new s.default(t,{autoshow:!0}))}),(0,a.default)(u.thumb).each(function(e,t){r.push(new s.default(t,{autoshow:!0}))}),(0,a.default)(document).on("input change",".media-container .media-range",function(e){var t=(0,a.default)(e.currentTarget),i=t.closest(".remodal"),o=i.find(".media-container div.card-item"),s=t.val()+"px";o.each(function(){(0,a.default)(this).css("width",s)}),n.forEach(function(e){return e.update()}),r.forEach(function(e){return e.update()})}),(0,a.default)(document).on("opened",".remodal",function(){setTimeout(function(){n.forEach(function(e){return e.update()}),r.forEach(function(e){return e.update()})},10)}),t.on("click","[data-mediapicker-modal-trigger]",function(i){var o=(0,a.default)(i.currentTarget),c=(0,a.default)(this).data("grav-mediapicker-unique-identifier"),f=t.find('[data-remodal-unique-identifier="'+c+'"]');e=a.default.remodal.lookup[f.data("remodal")],e||(f.remodal(),e=a.default.remodal.lookup[f.data("remodal")]),(0,a.default)(u.tree).filter(function(e,t){return!(0,a.default)(t).data("scrollbar")}).each(function(e,t){n.push(new s.default(t,{autoshow:!0}))}),(0,a.default)(u.thumb).filter(function(e,t){return!(0,a.default)(t).data("scrollbar")}).each(function(e,t){r.push(new s.default(t,{autoshow:!0}))}),e.open(),e.dataField=o.find("input"),n.forEach(function(e){return e.update()}),r.forEach(function(e){return e.update()}),f.find(".js__files").trigger("fillView"),setTimeout(function(){return l.Instance.reload()},100)}),t.on("click","[data-remodal-mediapicker] .media-container.in-modal .admin-media-details a",function(t){t.preventDefault(),t.stopPropagation();var n=(0,a.default)(t.target).parents(".js__media-element").data("file-url"),r=n.replace(/ /g,"%20");e.dataField.val(r),e.close()})})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.Instance=void 0;var a=function(){function e(e,t){for(var n=0;n