/*
 * This file is part of the TYPO3 CMS project.
 *
 * It is free software; you can redistribute it and/or modify it under
 * the terms of the GNU General Public License, either version 2
 * of the License, or any later version.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 *
 * The TYPO3 project - inspiring people to share!
 */
class j{constructor(g,N,b,I,h,T){this.indented=g,this.column=N,this.type=b,this.prev=h,this.info=T,I!=null&&(this.align=I)}}function V(F,g){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(g.lastType)}class oe{create(){const g=/[\w$\xa1-\uffff]/,b={name:"typoscript",localVars:void 0,doubleIndentSwitch:!1},I=function(){function e(a){return{type:a,style:"keyword"}}const r=e("keyword a"),t=e("keyword b");return{_CSS_DEFAULT_STYLE:e("_CSS_DEFAULT_STYLE"),_LOCAL_LANG:e("_LOCAL_LANG"),_offset:e("_offset"),absRefPrefix:e("absRefPrefix"),accessibility:e("accessibility"),ACT:t,ACTIFSUB:t,ACTIFSUBRO:e("ACTIFSUBRO"),ACTRO:t,addAttributes:e("addAttributes"),addExtUrlsAndShortCuts:e("addExtUrlsAndShortCuts"),addItems:e("addItems"),additionalHeaders:e("additionalHeaders"),additionalParams:e("additionalParams"),addQueryString:e("addQueryString"),adjustItemsH:e("adjustItemsH"),adjustSubItemsH:e("adjustSubItemsH"),admPanel:r,after:e("after"),afterImg:e("afterImg"),afterImgLink:e("afterImgLink"),afterImgTagParams:e("afterImgTagParams"),afterROImg:e("afterROImg"),afterWrap:e("afterWrap"),age:e("age"),alertPopups:e("alertPopups"),align:e("align"),all:t,allow:e("allow"),allowCaching:e("allowCaching"),allowedAttribs:e("allowedAttribs"),allowedClasses:e("allowedClasses"),allowedCols:e("allowedCols"),allowedNewTables:e("allowedNewTables"),allowTags:e("allowTags"),allStdWrap:e("allStdWrap"),allWrap:e("allWrap"),alt_print:r,alternativeSortingField:e("alternativeSortingField"),altIcons:e("altIcons"),altImgResource:e("altImgResource"),altLabels:e("altLabels"),altTarget:e("altTarget"),altText:e("altText"),altUrl:e("altUrl"),altUrl_noDefaultParams:e("altUrl_noDefaultParams"),altWrap:e("altWrap"),always:e("always"),alwaysActivePIDlist:e("alwaysActivePIDlist"),alwaysLink:e("alwaysLink"),andWhere:e("andWhere"),angle:e("angle"),antiAlias:e("antiAlias"),append:e("append"),applyTotalH:e("applyTotalH"),applyTotalW:e("applyTotalW"),archive:e("archive"),ascii:t,ATagAfterWrap:e("ATagAfterWrap"),ATagBeforeWrap:e("ATagBeforeWrap"),ATagParams:e("ATagParams"),ATagTitle:e("ATagTitle"),atLeast:t,atMost:t,attribute:e("attribute"),auth:r,autoLevels:e("autoLevels"),autonumber:e("autonumber"),backColor:e("backColor"),background:e("background"),baseURL:e("baseURL"),BE:t,be_groups:t,be_users:t,before:e("before"),beforeImg:e("beforeImg"),beforeImgLink:e("beforeImgLink"),beforeImgTagParams:e("beforeImgTagParams"),beforeROImg:e("beforeROImg"),beforeWrap:e("beforeWrap"),begin:e("begin"),bgCol:e("bgCol"),bgImg:e("bgImg"),blur:e("blur"),bm:e("bm"),bodyTag:e("bodyTag"),bodyTagAdd:e("bodyTagAdd"),bodyTagCObject:e("bodyTagCObject"),bodytext:e("bodytext"),borderCol:e("borderCol"),borderThick:e("borderThick"),bottomBackColor:e("bottomBackColor"),bottomContent:e("bottomContent"),bottomHeight:e("bottomHeight"),bottomImg:e("bottomImg"),bottomImg_mask:e("bottomImg_mask"),BOX:t,br:e("br"),browse:t,browser:r,brTag:e("brTag"),bullet:e("bullet"),bulletlist:e("bulletlist"),bullets:t,bytes:e("bytes"),cache:r,cache_clearAtMidnight:e("cache_clearAtMidnight"),cache_period:e("cache_period"),caption:e("caption"),caption_stdWrap:e("caption_stdWrap"),captionHeader:e("captionHeader"),captionSplit:e("captionSplit"),CARRAY:e("CARRAY"),CASE:e("CASE"),case:e("case"),casesensitiveComp:e("casesensitiveComp"),cellpadding:e("cellpadding"),cellspacing:e("cellspacing"),char:e("char"),charcoal:e("charcoal"),charMapConfig:e("charMapConfig"),CHECK:r,check:e("check"),class:e("class"),classesAnchor:e("classesAnchor"),classesCharacter:e("classesCharacter"),classesImage:e("classesImage"),classesParagraph:e("classesParagraph"),clear:e("clear"),clearCache:e("clearCache"),clearCache_disable:e("clearCache_disable"),clearCache_pageGrandParent:e("clearCache_pageGrandParent"),clearCache_pageSiblingChildren:e("clearCache_pageSiblingChildren"),clearCacheCmd:e("clearCacheCmd"),clearCacheLevels:e("clearCacheLevels"),clearCacheOfPages:e("clearCacheOfPages"),clickTitleMode:e("clickTitleMode"),clipboardNumberPads:e("clipboardNumberPads"),cMargins:e("cMargins"),COA:e("COA"),COA_INT:e("COA_INT"),cObj:r,COBJ_ARRAY:e("COBJ_ARRAY"),cObject:r,cObjNum:e("cObjNum"),collapse:e("collapse"),collections:e("collections"),color:e("color"),color1:e("color1"),color2:e("color2"),color3:e("color3"),color4:e("color4"),colors:e("colors"),colour:e("colour"),colPos_list:e("colPos_list"),colRelations:e("colRelations"),cols:e("cols"),colSpace:e("colSpace"),COMMENT:r,comment_auto:e("comment_auto"),commentWrap:e("commentWrap"),compX:e("compX"),compY:e("compY"),conf:e("conf"),CONFIG:e("CONFIG"),config:r,CONSTANTS:e("CONSTANTS"),constants:e("constants"),CONTENT:e("CONTENT"),content:r,contextMenu:e("contextMenu"),copy:r,copyLevels:e("copyLevels"),count_HMENU_MENUOBJ:e("count_HMENU_MENUOBJ"),count_menuItems:e("count_menuItems"),count_MENUOBJ:e("count_MENUOBJ"),create:e("create"),crop:e("crop"),csConv:e("csConv"),CType:e("CType"),CUR:t,CURIFSUB:t,CURIFSUBRO:t,current:e("current"),CURRO:t,curUid:e("curUid"),cut:r,cWidth:e("cWidth"),data:e("data"),dataArray:r,dataWrap:e("dataWrap"),date:e("date"),date_stdWrap:e("date_stdWrap"),datePrefix:e("datePrefix"),dayofmonth:r,dayofweek:r,DB:e("DB"),db_list:r,debug:e("debug"),debugData:e("debugData"),debugFunc:e("debugFunc"),debugItemConf:e("debugItemConf"),default:t,defaultAlign:e("defaultAlign"),defaultCmd:e("defaultCmd"),defaultHeaderType:e("defaultHeaderType"),defaultOutput:e("defaultOutput"),defaults:e("defaults"),defaultType:e("defaultType"),delete:e("delete"),denyTags:e("denyTags"),depth:e("depth"),DESC:e("DESC"),description:t,dimensions:e("dimensions"),direction:e("direction"),directory:t,directReturn:t,disableAllHeaderCode:e("disableAllHeaderCode"),disableAltText:e("disableAltText"),disableBodyTag:e("disableBodyTag"),disabled:e("disabled"),disableDelete:e("disableDelete"),disableHideAtCopy:e("disableHideAtCopy"),disableItems:e("disableItems"),disableNoMatchingValueElement:e("disableNoMatchingValueElement"),disablePrefixComment:e("disablePrefixComment"),disablePrependAtCopy:e("disablePrependAtCopy"),disableSearchBox:e("disableSearchBox"),disableSingleTableView:e("disableSingleTableView"),displayContent:e("displayContent"),displayFieldIcons:e("displayFieldIcons"),displayIcons:e("displayIcons"),displayMessages:e("displayMessages"),displayRecord:e("displayRecord"),displayTimes:e("displayTimes"),distributeX:e("distributeX"),distributeY:e("distributeY"),div:t,DIV:e("DIV"),doctype:e("doctype"),DOCUMENT_BODY:e("DOCUMENT_BODY"),doktype:e("doktype"),doNotLinkIt:e("doNotLinkIt"),doNotShowLink:e("doNotShowLink"),doNotStripHTML:e("doNotStripHTML"),dontCheckPid:e("dontCheckPid"),dontLinkIfSubmenu:e("dontLinkIfSubmenu"),dontWrapInTable:e("dontWrapInTable"),doubleBrTag:e("doubleBrTag"),dynCSS:r,edge:e("edge"),edit:r,edit_access:r,edit_docModuleUpload:e("edit_docModuleUpload"),EFFECT:e("EFFECT"),elements:e("elements"),else:t,email:t,emailMeAtLogin:e("emailMeAtLogin"),emailMess:e("emailMess"),emboss:e("emboss"),enable:e("enable"),encapsLines:e("encapsLines"),encapsLinesStdWrap:e("encapsLinesStdWrap"),encapsTagList:e("encapsTagList"),end:t,entryLevel:e("entryLevel"),equalH:e("equalH"),equals:t,everybody:e("everybody"),excludeDoktypes:e("excludeDoktypes"),excludeUidList:e("excludeUidList"),expAll:e("expAll"),expand:e("expand"),explode:e("explode"),ext:e("ext"),external:t,externalBlocks:e("externalBlocks"),extTarget:e("extTarget"),face:e("face"),false:t,FE:t,fe_adminLib:e("fe_adminLib"),fe_groups:t,fe_users:t,feadmin:t,field:e("field"),fieldName:e("fieldName"),fieldOrder:e("fieldOrder"),fieldRequired:e("fieldRequired"),fields:e("fields"),fieldWrap:e("fieldWrap"),file:e("file"),file1:e("file1"),file2:e("file2"),file3:e("file3"),file4:e("file4"),file5:e("file5"),FILES:e("FILES"),files:e("files"),firstLabel:e("firstLabel"),firstLabelGeneral:e("firstLabelGeneral"),fixAttrib:e("fixAttrib"),flip:e("flip"),flop:e("flop"),FLUIDTEMPLATE:e("FLUIDTEMPLATE"),folder:r,folders:e("folders"),folderTree:r,foldoutMenu:r,fontColor:e("fontColor"),fontFile:e("fontFile"),fontOffset:e("fontOffset"),fontSize:e("fontSize"),fontSizeMultiplicator:e("fontSizeMultiplicator"),forceDisplayFieldIcons:e("forceDisplayFieldIcons"),forceDisplayIcons:e("forceDisplayIcons"),forceTemplateParsing:e("forceTemplateParsing"),forceTypeValue:e("forceTypeValue"),FORM:e("FORM"),format:e("format"),function:e("function"),Functions:r,gamma:e("gamma"),gapBgCol:e("gapBgCol"),gapLineCol:e("gapLineCol"),gapLineThickness:e("gapLineThickness"),gapWidth:e("gapWidth"),get:e("get"),getBorder:e("getBorder"),getLeft:e("getLeft"),getRight:e("getRight"),GIFBUILDER:e("GIFBUILDER"),global:e("global"),globalNesting:e("globalNesting"),globalString:e("globalString"),globalVar:e("globalVar"),GP:e("GP"),gray:e("gray"),group:e("group"),groupBy:e("groupBy"),groupid:e("groupid"),header:t,header_layout:e("header_layout"),headerComment:e("headerComment"),headerData:e("headerData"),headerSpace:e("headerSpace"),headTag:e("headTag"),height:e("height"),helpText:e("helpText"),hidden:e("hidden"),hiddenFields:e("hiddenFields"),hide:e("hide"),hidePStyleItems:e("hidePStyleItems"),hideRecords:e("hideRecords"),highColor:e("highColor"),history:e("history"),HMENU:e("HMENU"),hostname:r,hour:r,HTML:e("HTML"),html:t,HTMLparser:e("HTMLparser"),HTMLparser_tags:e("HTMLparser_tags"),htmlSpecialChars:e("htmlSpecialChars"),htmlTag_setParams:e("htmlTag_setParams"),http:e("http"),icon:e("icon"),icon_image_ext_list:e("icon_image_ext_list"),icon_link:e("icon_link"),iconCObject:e("iconCObject"),id:t,IENV:e("IENV"),if:t,ifEmpty:t,IFSUB:t,IFSUBRO:t,IMAGE:e("IMAGE"),image:t,image_frames:e("image_frames"),imageLinkWrap:e("imageLinkWrap"),imagePath:e("imagePath"),images:e("images"),imageWrapIfAny:e("imageWrapIfAny"),IMG_RESOURCE:e("IMG_RESOURCE"),imgList:r,imgMax:e("imgMax"),imgNameNotRandom:e("imgNameNotRandom"),imgNamePrefix:e("imgNamePrefix"),imgObjNum:e("imgObjNum"),imgParams:e("imgParams"),imgPath:e("imgPath"),imgResource:r,imgStart:e("imgStart"),IMGTEXT:e("IMGTEXT"),imgText:r,import:e("import"),inBranch:t,inc:e("inc"),includeCSS:e("includeCSS"),includeLibrary:e("includeLibrary"),includeNotInMenu:e("includeNotInMenu"),index:e("index"),index_descrLgd:e("index_descrLgd"),index_enable:e("index_enable"),index_externals:e("index_externals"),info:r,inlineStyle2TempFile:e("inlineStyle2TempFile"),innerStdWrap:e("innerStdWrap"),innerStdWrap_all:e("innerStdWrap_all"),innerWrap:e("innerWrap"),innerWrap2:e("innerWrap2"),input:e("input"),inputLevels:e("inputLevels"),insertData:e("insertData"),intensity:e("intensity"),intTarget:e("intTarget"),intval:e("intval"),invert:e("invert"),IP:r,IProcFunc:e("IProcFunc"),isFalse:t,isGreaterThan:t,isInList:t,isLessThan:t,isPositive:t,isTrue:t,itemArrayProcFunc:e("itemArrayProcFunc"),itemH:e("itemH"),items:e("items"),itemsProcFunc:e("itemsProcFunc"),itemsProcessors:e("itemsProcessors"),iterations:e("iterations"),join:e("join"),JSwindow:r,JSWindow:e("JSWindow"),JSwindow_params:e("JSwindow_params"),keep:e("keep"),keepEntries:e("keepEntries"),keepNonMatchedTags:e("keepNonMatchedTags"),key:e("key"),keyword3:t,LABEL:r,label:e("label"),labelStdWrap:e("labelStdWrap"),labelWrap:e("labelWrap"),lang:e("lang"),languageField:e("languageField"),layout:r,left:e("left"),leftjoin:e("leftjoin"),levels:e("levels"),leveltitle:t,leveluid:e("leveluid"),lib:r,limit:e("limit"),line:e("line"),lineColor:e("lineColor"),lineThickness:e("lineThickness"),linkPrefix:e("linkPrefix"),linkTitleToSelf:e("linkTitleToSelf"),linkVars:e("linkVars"),linkWrap:e("linkWrap"),list:t,listNum:e("listNum"),listOnlyInSingleTableView:e("listOnlyInSingleTableView"),LIT:e("LIT"),lm:e("lm"),LOAD_REGISTER:e("LOAD_REGISTER"),locale_all:e("locale_all"),localNesting:e("localNesting"),locationData:e("locationData"),login:t,loginUser:r,lowColor:e("lowColor"),lower:e("lower"),LR:e("LR"),mailform:t,mailto:e("mailto"),main:e("main"),makelinks:e("makelinks"),markerWrap:e("markerWrap"),marks:r,mask:e("mask"),max:e("max"),maxAge:e("maxAge"),maxChars:e("maxChars"),maxH:e("maxH"),maxHeight:e("maxHeight"),maxItems:e("maxItems"),maxW:e("maxW"),maxWidth:e("maxWidth"),maxWInText:e("maxWInText"),media:t,menu:t,menuHeight:e("menuHeight"),menuName:e("menuName"),menuOffset:e("menuOffset"),menuWidth:e("menuWidth"),message_preview:e("message_preview"),META:e("META"),meta:e("meta"),method:e("method"),min:e("min"),minH:e("minH"),minItems:e("minItems"),minute:r,minW:e("minW"),mod:t,mode:e("mode"),module:r,month:r,move_wizard:r,MP_defaults:e("MP_defaults"),MP_disableTypolinkClosestMPvalue:e("MP_disableTypolinkClosestMPvalue"),MP_mapRootPoints:e("MP_mapRootPoints"),MULTIMEDIA:e("MULTIMEDIA"),multimedia:t,name:e("name"),negate:t,nesting:e("nesting"),neverHideAtCopy:e("neverHideAtCopy"),new:r,NEW:t,new_wizard:r,newPageWiz:e("newPageWiz"),newRecordFromTable:e("newRecordFromTable"),newWindow:e("newWindow"),newWizards:e("newWizards"),next:e("next"),niceText:e("niceText"),nicetext:e("nicetext"),NO:t,no_cache:e("no_cache"),no_search:e("no_search"),noAttrib:e("noAttrib"),noCache:e("noCache"),noCreateRecordsLink:e("noCreateRecordsLink"),noLink:e("noLink"),noMatchingValue_label:e("noMatchingValue_label"),nonCachedSubst:e("nonCachedSubst"),none:t,nonTypoTagStdWrap:e("nonTypoTagStdWrap"),nonTypoTagUserFunc:e("nonTypoTagUserFunc"),nonWrappedTag:e("nonWrappedTag"),noOrderBy:e("noOrderBy"),noPageTitle:e("noPageTitle"),noResultObj:r,noThumbsInEB:e("noThumbsInEB"),noTrimWrap:e("noTrimWrap"),noValueInsert:e("noValueInsert"),numRows:r,obj:e("obj"),offset:e("offset"),onlineWorkspaceInfo:e("onlineWorkspaceInfo"),onlyCurrentPid:e("onlyCurrentPid"),opacity:e("opacity"),options:r,orderBy:e("orderBy"),outerWrap:e("outerWrap"),outline:e("outline"),outputLevels:e("outputLevels"),override:e("override"),overrideAttribs:e("overrideAttribs"),overrideId:e("overrideId"),PAGE:e("PAGE"),page:r,PAGE_TARGET:e("PAGE_TARGET"),PAGE_TSCONFIG_ID:e("PAGE_TSCONFIG_ID"),PAGE_TSCONFIG_IDLIST:e("PAGE_TSCONFIG_IDLIST"),PAGE_TSCONFIG_STR:e("PAGE_TSCONFIG_STR"),pageFrameObj:e("pageFrameObj"),pages:t,pageTitleFirst:e("pageTitleFirst"),pageTree:r,parameter:e("parameter"),params:e("params"),parseFunc:e("parseFunc"),parseFunc_RTE:t,parser:e("parser"),password:e("password"),paste:r,path:e("path"),permissions:e("permissions"),perms:r,pid:t,pid_list:e("pid_list"),pidInList:e("pidInList"),PIDinRootline:r,PIDupinRootline:r,pixelSpaceFontSizeRef:e("pixelSpaceFontSizeRef"),plaintextLib:e("plaintextLib"),plainTextStdWrap:e("plainTextStdWrap"),plugin:r,postCObject:e("postCObject"),postLineBlanks:e("postLineBlanks"),postLineChar:e("postLineChar"),postLineLen:e("postLineLen"),postUserFunc:e("postUserFunc"),postUserFuncInt:e("postUserFuncInt"),preBlanks:e("preBlanks"),preCObject:e("preCObject"),prefix:e("prefix"),prefixComment:e("prefixComment"),prefixRelPathWith:e("prefixRelPathWith"),preIfEmptyListNum:e("preIfEmptyListNum"),preLineBlanks:e("preLineBlanks"),preLineChar:e("preLineChar"),preLineLen:e("preLineLen"),prepend:e("prepend"),preserveEntities:e("preserveEntities"),preUserFunc:e("preUserFunc"),prev:e("prev"),preview:r,previewBorder:e("previewBorder"),prevnextToSection:e("prevnextToSection"),prioriCalc:e("prioriCalc"),proc:e("proc"),processor_allowUpscaling:e("processor_allowUpscaling"),properties:e("properties"),protect:e("protect"),protectLvar:e("protectLvar"),publish:r,publish_levels:e("publish_levels"),quality:e("quality"),RADIO:r,radio:e("radio"),radioWrap:e("radioWrap"),range:e("range"),rawUrlEncode:e("rawUrlEncode"),recipient:e("recipient"),RECORDS:e("RECORDS"),recursive:e("recursive"),redirect:e("redirect"),redirectToURL:e("redirectToURL"),references:e("references"),register:e("register"),relPathPrefix:e("relPathPrefix"),remap:e("remap"),remapTag:e("remapTag"),REMOTE_ADDR:e("REMOTE_ADDR"),removeDefaultJS:e("removeDefaultJS"),removeIfEquals:e("removeIfEquals"),removeIfFalse:e("removeIfFalse"),removeItems:e("removeItems"),removeObjectsOfDummy:e("removeObjectsOfDummy"),removePrependedNumbers:e("removePrependedNumbers"),removeTags:e("removeTags"),removeWrapping:e("removeWrapping"),renderObj:r,renderWrap:e("renderWrap"),REQ:r,required:t,reset:e("reset"),resources:e("resources"),RESTORE_REGISTER:e("RESTORE_REGISTER"),resultObj:e("resultObj"),returnLast:e("returnLast"),returnUrl:e("returnUrl"),rightjoin:e("rightjoin"),rm:e("rm"),rmTagIfNoAttrib:e("rmTagIfNoAttrib"),RO:t,rootline:t,rotate:e("rotate"),rows:e("rows"),rowSpace:e("rowSpace"),RTE:r,RTE_compliant:r,rules:e("rules"),sample:e("sample"),saveClipboard:e("saveClipboard"),saveDocNew:e("saveDocNew"),script:t,search:t,SEARCHRESULT:e("SEARCHRESULT"),secondRow:e("secondRow"),section:e("section"),sectionIndex:e("sectionIndex"),select:r,selectFields:e("selectFields"),separator:e("separator"),set:e("set"),setContentToCurrent:e("setContentToCurrent"),setCurrent:e("setCurrent"),setfixed:e("setfixed"),setOnly:e("setOnly"),setup:r,shadow:e("shadow"),SHARED:e("SHARED"),sharpen:e("sharpen"),shear:e("shear"),short:e("short"),shortcut:t,shortcutFrame:e("shortcutFrame"),shortcutIcon:e("shortcutIcon"),show:e("show"),showAccessRestrictedPages:e("showAccessRestrictedPages"),showActive:e("showActive"),showFirst:e("showFirst"),showHiddenPages:e("showHiddenPages"),showHiddenRecords:e("showHiddenRecords"),showHistory:e("showHistory"),showPageIdWithTitle:e("showPageIdWithTitle"),showTagFreeClasses:e("showTagFreeClasses"),showWebsiteTitle:e("showWebsiteTitle"),simulateDate:e("simulateDate"),simulateUserGroup:e("simulateUserGroup"),singlePid:e("singlePid"),site_author:e("site_author"),site_reserved:e("site_reserved"),sitemap:t,siteUrl:e("siteUrl"),size:e("size"),solarize:e("solarize"),sorting:e("sorting"),source:e("source"),space:e("space"),spaceBelowAbove:e("spaceBelowAbove"),spaceLeft:e("spaceLeft"),spaceRight:e("spaceRight"),spacing:e("spacing"),spamProtectEmailAddresses:e("spamProtectEmailAddresses"),spamProtectEmailAddresses_atSubst:e("spamProtectEmailAddresses_atSubst"),spamProtectEmailAddresses_lastDotSubst:e("spamProtectEmailAddresses_lastDotSubst"),SPC:t,special:e("special"),split:r,splitChar:e("splitChar"),splitRendering:e("splitRendering"),src:e("src"),stdWrap:r,stdWrap2:e("stdWrap2"),strftime:e("strftime"),stripHtml:e("stripHtml"),styles:e("styles"),submenuObjSuffixes:e("submenuObjSuffixes"),subMenuOffset:e("subMenuOffset"),submit:e("submit"),subparts:r,subst_elementUid:e("subst_elementUid"),substMarksSeparately:e("substMarksSeparately"),substring:e("substring"),swirl:e("swirl"),sys_dmail:t,sys_filemounts:t,sys_note:t,sys_template:t,system:r,table:t,tableCellColor:e("tableCellColor"),tableParams:e("tableParams"),tables:e("tables"),tableStdWrap:e("tableStdWrap"),tableWidth:e("tableWidth"),tags:e("tags"),target:e("target"),TCAdefaults:e("TCAdefaults"),TCEFORM:e("TCEFORM"),TCEMAIN:e("TCEMAIN"),TDparams:e("TDparams"),temp:r,template:r,templateContent:e("templateContent"),templateFile:e("templateFile"),TEXT:e("TEXT"),text:t,textarea:e("textarea"),textMargin:e("textMargin"),textMargin_outOfText:e("textMargin_outOfText"),textMaxLength:e("textMaxLength"),textObjNum:e("textObjNum"),textpic:t,textPos:e("textPos"),thickness:e("thickness"),this:t,tile:e("tile"),time_stdWrap:e("time_stdWrap"),tipafriendLib:e("tipafriendLib"),title:e("title"),titleLen:e("titleLen"),titleText:e("titleText"),tm:e("tm"),TMENU:e("TMENU"),TMENUITEM:e("TMENUITEM"),token:e("token"),top:t,totalWidth:e("totalWidth"),transparentBackground:e("transparentBackground"),transparentColor:e("transparentColor"),treeLevel:r,trim:e("trim"),true:t,tsdebug:r,tsdebug_tree:e("tsdebug_tree"),TSFE:e("TSFE"),type:e("type"),typeNum:e("typeNum"),types:e("types"),typolink:r,uid:t,uidInList:e("uidInList"),uniqueGlobal:t,uniqueLocal:t,unset:e("unset"),unsetEmpty:t,updated:t,uploads:t,upper:e("upper"),url:r,us:t,useLargestItemX:e("useLargestItemX"),useLargestItemY:e("useLargestItemY"),USER:e("USER"),user:e("user"),USER_INT:e("USER_INT"),user_task:t,useragent:r,USERDEF1:t,USERDEF1RO:t,USERDEF2:t,USERDEF2RO:t,userdefined:e("userdefined"),userFunc:r,userfunction:e("userfunction"),usergroup:t,userid:e("userid"),userProc:e("userProc"),USR:t,USRRO:t,value:e("value"),valueArray:e("valueArray"),version:r,view:r,wave:e("wave"),web_func:t,web_info:t,web_layout:t,records:t,web_ts:e("web_ts"),where:e("where"),width:e("width"),wiz:e("wiz"),wordSpacing:e("wordSpacing"),workArea:e("workArea"),workOnSubpart:r,wrap:e("wrap"),wrap1:e("wrap1"),wrap2:e("wrap2"),wrap3:e("wrap3"),wrapAfterTags:e("wrapAfterTags"),wrapAlign:e("wrapAlign"),wrapFieldName:e("wrapFieldName"),wrapItemAndSub:e("wrapItemAndSub"),wrapNonWrappedLines:e("wrapNonWrappedLines"),wraps:e("wraps"),xhtml_strict:t,xhtml_trans:t,xmlprologue:e("xmlprologue"),XY:t}}(),h=/[\+\-\*\&\%\/=<>!\?]/;let T=!1;function z(e){let r=!1,t,a=!1;for(;(t=e.next())!==void 0;){if(!r){if(t==="/"&&!a)return;t==="["?a=!0:a&&t==="]"&&(a=!1)}r=!r&&t==="\\"}}let w,_;function s(e,r,t){return w=e,_=t,r}function P(e,r){const t=e.next();if(typeof t=="string"){if(t===`
`&&(T=!1),t==="."&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return s("number","number");if(t==="."&&e.match(".."))return s("spread","meta");if(t&&/[\[\]{}\(\),;\:\.]/.test(t))return s(t);if(t==="<"||t===">"||t==="."||t==="="&&e.peek()!=="<")return T=!0,s(t,"operator");if(!T&&t&&/[\[\]\(\),;\:\.\<\>\=]/.test(t))return s(t,"operator");if(t==="0"&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),s("number","number");if(t==="0"&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),s("number","number");if(t==="0"&&e.eat(/b/i))return e.eatWhile(/[01]/i),s("number","number");if(t&&/\d/.test(t))return e.match(/^\d*(?:\.\d+)?(?:[eE][+\-]?\d+)?/),s("number","number");if(t==="/")return e.eat("*")?(r.tokenize=L,L(e,r)):e.eat("/")?(e.skipToEnd(),s("comment","comment")):V(e,r)?(z(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),s("regexp","string-2")):(e.eatWhile(h),s("operator","operator",e.current()));if(t==="#")return e.skipToEnd(),s("comment","comment");if(h.test(t))return(t!==">"||!r.lexical||r.lexical.type!==">")&&e.eatWhile(h),s("operator","operator",e.current());if(g.test(t)){e.eatWhile(g);const a=e.current();if(I.propertyIsEnumerable(a)){const o=I[a];return s(o.type,o.style,a)}return T?s("string","string",a):s("variable",void 0,a)}}}function L(e,r){let t=!1,a;for(;(a=e.next())!==void 0;){if(a==="/"&&t){r.tokenize=P;break}t=a==="*"}return s("comment","comment")}const Y={atom:!0,number:!0,variable:!0,string:!0,regexp:!0};function J(e,r){for(let t=e.localVars;t;t=t.next)if(t.name==r)return!0;for(let t=e.context;t;t=t.prev)for(let a=t.vars;a;a=a.next)if(a.name==r)return!0}const l={state:null,column:null,marked:null,cc:null};function q(e,r,t,a,o){const n=e.cc;for(l.state=e,l.stream=o,l.marked=null,l.cc=n,l.style=r,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){const p=n.length?n.pop():C;if(typeof p=="function"&&p(t,a)){for(;n.length&&n[n.length-1]&&n[n.length-1].lex;)n.pop()();return l.marked?l.marked:t==="variable"&&J(e,a)?"variable-2":r}}}function d(...e){for(let r=e.length-1;r>=0;r--)l.cc.push(e[r])}function i(...e){return d(...e),!0}function v(e){function r(a){for(let o=a;o;o=o.next)if(o.name==e)return!0;return!1}const t=l.state;if(l.marked="def",t.context){if(r(t.localVars))return;t.localVars={name:e,next:t.localVars}}}function u(e,r){const t=function(){const a=l.state;let o=a.indented;if(a.lexical.type==="stat")o=a.lexical.indented;else for(let n=a.lexical;n&&n.type===")"&&n.align;n=n.prev)o=n.indented;a.lexical=new j(o,l.stream.column(),e,null,a.lexical,r)};return t.lex=!0,t}function c(){const e=l.state;e.lexical.prev&&(e.lexical.type===")"&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}c.lex=!0;function f(e){function r(t){return t==e?i():e===";"?d():i(r)}return r}function C(e,r){return e==="keyword a"?i(u("form"),X,C,c):e==="keyword b"?i(u("form"),C,c):e==="{"?i(u("}"),D,c):e===";"?i():e==="variable"?i(u("stat"),$):e==="import"?i(u("stat"),te,c):r==="@"?i(m,C):d(u("stat"),m,f(";"),c)}function m(e){return U(e,!1)}function y(e){return U(e,!0)}function X(e){return e!=="("?d():i(u(")"),m,f(")"),c)}function U(e,r){const t=r?A:E;return Y.hasOwnProperty(e)?i(t):e==="keyword c"?i(r?Q:W):e==="("?i(u(")"),W,f(")"),c,t):e==="operator"?i(r?y:m):e==="{"?k(O,"}",null,t):i()}function W(e){return e.match(/[;\}\)\],]/)?d():d(m)}function Q(e){return e.match(/[;\}\)\],]/)?d():d(y)}function E(e,r){return e===","?i(m):A(e,r,!1)}function A(e,r,t){const a=t==!1?E:A,o=t==!1?m:y;if(e==="operator")return/\+\+|--/.test(r)?i(a):r==="?"?i(m,f(":"),o):i(o);if(e!==";"){if(e==="(")return k(y,")","call",a);if(e===".")return i(K,a);if(e==="[")return i(u("]"),W,f("]"),c,a)}}function $(e){return e===":"?i(c,C):d(E,f(";"),c)}function K(e){if(e==="variable")return l.marked="property",i()}function O(e){if(e==="async")return l.marked="property",i(O);if(e==="variable"||l.style==="keyword")return l.marked="property",i(M);if(e==="number"||e==="string")return l.marked=l.style+" property",i(M);if(e==="modifier")return i(O);if(e===":")return d(M)}function M(e){if(e===":")return i(y)}function Z(e,r,t){function a(o,n){if(t?t.indexOf(o)>-1:o===","){const p=l.state.lexical;return p.info==="call"&&(p.pos=(p.pos||0)+1),i(function(x,S){return x==r||S==r?d():d(e)},a)}return o==r||n==r?i():i(f(r))}return function(o,n){return o==r||n==r?i():d(e,a)}}function k(e,r,t,...a){for(const o of a)l.cc.push(o);return i(u(r,t),Z(e,r),c)}function D(e){return e==="}"?i():d(C,D)}function B(e,r){if(e==="modifier")return i(B);if(e==="variable")return v(r),i();if(e==="{")return k(ee,"}")}function ee(e,r){return e==="variable"&&!l.stream.match(/^\s*:/,!1)?(v(r),i(H)):(e==="variable"&&(l.marked="property"),e==="}"?d():i(f(":"),B,H))}function H(e,r){if(r==="=")return i(y)}function te(e){return e==="string"?i():d(R,G,ae)}function R(e,r){return e==="{"?k(R,"}"):(e==="variable"&&v(r),r==="*"&&(l.marked="keyword"),i(re))}function G(e){if(e===",")return i(R,G)}function re(e,r){if(r==="as")return l.marked="keyword",i(R)}function ae(e,r){if(r==="from")return l.marked="keyword",i(m)}function ie(e,r){return e.lastType==="operator"||e.lastType===","||h.test(r.charAt(0))||/[,.]/.test(r.charAt(0))}class ne{constructor(){this.electricInput=/^\s*(?:case .*?:|default:|\{|\})$/,this.blockCommentStart="/*",this.blockCommentEnd="*/",this.lineComment="#",this.fold="brace",this.closeBrackets=`(){}''""\``,this.helperType="typoscript",this.name="TypoScript"}startState(r){return{tokenize:P,lastType:"sof",cc:[],lexical:new j(-r,0,"block",!1),localVars:b.localVars,context:b.localVars&&{vars:b.localVars},indented:0}}token(r,t){if(r.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=r.indentation()),t.tokenize!=L&&r.eatSpace())return null;const a=t.tokenize(r,t);return w==="comment"?a:(t.lastType=w==="operator"&&(_==="++"||_==="--")?"incdec":w,q(t,a,w,_,r))}indent(r,t,a){if(r.tokenize==L)return null;if(r.tokenize!=P)return 0;const o=t&&t.charAt(0);let n=r.lexical,p;for(;(n.type==="stat"||n.type==="form")&&(o==="}"||(p=r.cc[r.cc.length-1])&&(p==E||p==A)&&!/^[,\.=+\-*:?[\(]/.test(t));)n=n.prev;const x=n.type,S=o==x;return x==="form"&&o==="{"?n.indented:x==="form"?n.indented+a.unit:x==="stat"?n.indented+(ie(r,t)?a.unit:0):n.info==="switch"&&!S&&b.doubleIndentSwitch!=!1?n.indented+(/^(?:case|default)\b/.test(t)?a.unit:2*a.unit):n.align?n.column+(S?0:1):n.indented+(S?0:a.unit)}expressionAllowed(r,t){return V(r,t)}}return new ne}}export{oe as TypoScriptStreamParserFactory};
