import java.util.*; import java.util.zip.*; import java.util.List; import java.util.regex.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.concurrent.locks.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; import javax.swing.table.*; import java.io.*; import java.net.*; import java.lang.reflect.*; import java.lang.ref.*; import java.lang.management.*; import java.security.*; import java.security.spec.*; import java.awt.*; import java.awt.event.*; import java.awt.image.*; import javax.imageio.*; import java.math.*; import x30_pkg.x30_util; import static x30_pkg.x30_util.VF1; import static x30_pkg.x30_util.l; import static x30_pkg.x30_util.fail; import static x30_pkg.x30_util.indexOf; import static x30_pkg.x30_util.getOpt; import static x30_pkg.x30_util.setOpt; import static x30_pkg.x30_util.callOpt; import static x30_pkg.x30_util.newWeakHashMap; import static x30_pkg.x30_util.newDangerousWeakHashMap; import static x30_pkg.x30_util.get; import static x30_pkg.x30_util.get_raw; import static x30_pkg.x30_util.assertTrue; import static x30_pkg.x30_util.isHeadless; import static x30_pkg.x30_util.isAndroid; import static x30_pkg.x30_util.isTrue; import x30_pkg.x30_util.DynamicObject; import loadableUtils.utils; import static loadableUtils.utils._threadInfo; import static loadableUtils.utils._threadInheritInfo; import static loadableUtils.utils._threadInfo_addMakerAndRetriever; import static loadableUtils.utils.dm_currentModule; import static loadableUtils.utils.dm_current_mandatory; import static loadableUtils.utils.match; import static loadableUtils.utils.getOpt_raw; import static loadableUtils.utils.setOpt_raw; import static loadableUtils.utils.getField; import static loadableUtils.utils.fieldType; import static loadableUtils.utils.format3; import static loadableUtils.utils.vm_generalIdentityHashSet; import static loadableUtils.utils.vm_generalHashMap; import static loadableUtils.utils.vm_generalWeakSubMap; import static loadableUtils.utils.bindToComponent; import static loadableUtils.utils.struct; import static loadableUtils.utils.structure; import static loadableUtils.utils.loadPage; import static loadableUtils.utils.loadPage_utf8; import static loadableUtils.utils.loadPageSilentlyWithTimeout; import static loadableUtils.utils.loadPageSilently; import static loadableUtils.utils.loadSnippet; import static loadableUtils.utils.loadSnippetQuietly; import static loadableUtils.utils.sendToLocalBot; import static loadableUtils.utils.sendToLocalBotOpt; import static loadableUtils.utils.sendToLocalBotQuietly; import static loadableUtils.utils.componentPopupMenu; import static loadableUtils.utils.componentPopupMenu_top; import static loadableUtils.utils.componentPopupMenu_initForComponent; import static loadableUtils.utils.componentPopupMenu_getEvent; import static loadableUtils.utils.listPopupMenu; import static loadableUtils.utils.tablePopupMenu; import static loadableUtils.utils.tablePopupMenuFirst; import static loadableUtils.utils.rowSorter_setComparators; import static loadableUtils.utils.sexyTableWithoutDrag; import static loadableUtils.utils.dm_current_generic; import static loadableUtils.utils.dm_current_mandatory_generic; import static loadableUtils.utils.cset; import static loadableUtils.utils.DynamicObject_loading; import static loadableUtils.utils.concepts_unlisted; import static loadableUtils.utils.makePopupMenuConditional; import static loadableUtils.utils.makeConceptsTable_idWidth; import static loadableUtils.utils.showConceptsTable_afterUpdate; import static loadableUtils.utils.dynamicObjectIsLoading; import static loadableUtils.utils.rethrow; import static loadableUtils.utils.hasBot; import static loadableUtils.utils.concepts_internStringsLongerThan; import static loadableUtils.utils.concepts_setUnlistedByDefault; import static loadableUtils.utils.realMC_tl; import loadableUtils.utils.F0; import loadableUtils.utils.F1; import loadableUtils.utils.IF0; import loadableUtils.utils.IF1; import loadableUtils.utils.IVF1; import loadableUtils.utils.IVF2; import loadableUtils.utils.Matches; import loadableUtils.utils.BetterLabel; import loadableUtils.utils.SingleComponentPanel; import loadableUtils.utils.Snippet; import loadableUtils.utils.Q; import loadableUtils.utils.ImageSurface; import loadableUtils.utils.structure_Data; import loadableUtils.utils.structure_ClassInfo; import loadableUtils.utils.RGBImage; import loadableUtils.utils.RGB; import loadableUtils.utils.BWImage; import loadableUtils.utils.MakesBufferedImage; import loadableUtils.utils.MultiSet; import loadableUtils.utils.Concept; import loadableUtils.utils.Concepts; import loadableUtils.utils.RC; import loadableUtils.utils.IConceptIndex; import loadableUtils.utils.IConceptCounter; import loadableUtils.utils.IFieldIndex; import loadableUtils.utils.Derefable; import loadableUtils.utils.ImageSurfaceSelector; import loadableUtils.utils.SimpleCRUD; import loadableUtils.utils.PersistableThrowable; import loadableUtils.utils.DynModule; import loadableUtils.utils.DynPrintLog; import loadableUtils.utils.DynObjectTable; import loadableUtils.utils.DynImageSurface; import loadableUtils.utils.DynCalculatedList; import loadableUtils.utils.GlobalID; import loadableUtils.utils.Rect; import loadableUtils.utils.Pt; import loadableUtils.utils.SynchronizedArrayList; import loadableUtils.utils.SecretValue; import loadableUtils.utils.HCRUD; import loadableUtils.utils.HCRUD_Data; import loadableUtils.utils.HCRUD_Concepts; import loadableUtils.utils.ValueConverterForField; import loadableUtils.utils.DefaultValueConverterForField; import loadableUtils.utils.OrError; import loadableUtils.utils.HTML; import static loadableUtils.utils.loadPageWithUserAgent; import static loadableUtils.utils.startsWithOneOf; import static loadableUtils.utils.addPrefixOptIfNempty; import static loadableUtils.utils.callTokenizer; import static loadableUtils.utils.getExceptionCause; import static loadableUtils.utils.dropStuffBeforeVerticalBar; import static loadableUtils.utils.multiLineQuote; import static loadableUtils.utils.dropLast; import static loadableUtils.utils.unsupportedOperation; import static loadableUtils.utils.isRunnableX; import static loadableUtils.utils.javaxDefaultVMArgs; import static loadableUtils.utils.appendParamsToURL; import static loadableUtils.utils.findConceptsWhere; import static loadableUtils.utils.subBot_serveJavaScript; import static loadableUtils.utils.dm_require; import static loadableUtils.utils.wrappedTextArea; import static loadableUtils.utils.infoMessage; import static loadableUtils.utils.litset; import static loadableUtils.utils.spaceRoundBracketed; import static loadableUtils.utils.printStackTrace; import static loadableUtils.utils.getPlural; import static loadableUtils.utils.pnlToStringWithEmptyLines; import static loadableUtils.utils.toInt_checked; import static loadableUtils.utils.spanTitle; import static loadableUtils.utils.litObjectArray; import static loadableUtils.utils.replacePrefix; import static loadableUtils.utils.tempDBLock; import static loadableUtils.utils.cloneLinkedHashMap; import static loadableUtils.utils.psI_str; import static loadableUtils.utils.loadJQuery2; import static loadableUtils.utils.toHex; import static loadableUtils.utils.showForm_arrange1; import static loadableUtils.utils.hideConsole; import static loadableUtils.utils.cget; import static loadableUtils.utils.quickSubstring; import static loadableUtils.utils.machineIsOffline; import static loadableUtils.utils.synchroTreeSet; import static loadableUtils.utils.replaceIfEqual; import static loadableUtils.utils.codePointToString; import static loadableUtils.utils.javaTok; import static loadableUtils.utils.childrenOfType; import static loadableUtils.utils.getConcept; import static loadableUtils.utils.buttonsInGroup; import static loadableUtils.utils.structure_isMarker; import static loadableUtils.utils.itemPlusArray; import static loadableUtils.utils.nPosts; import static loadableUtils.utils.toTokCondition; import static loadableUtils.utils.associatedInfosFile; import static loadableUtils.utils.or2_trim; import static loadableUtils.utils.lastThat; import static loadableUtils.utils.addPrefix; import static loadableUtils.utils.targetBlank; import static loadableUtils.utils.isCurlyBraced; import static loadableUtils.utils.setComponentID; import static loadableUtils.utils.b; import static loadableUtils.utils.licensed; import static loadableUtils.utils.doubleRatio; import static loadableUtils.utils.closeRandomAccessFile; import static loadableUtils.utils.i; import static loadableUtils.utils.addThreadInfoToRunnable; import static loadableUtils.utils.n; import static loadableUtils.utils.javaTokPlusBrackets2; import static loadableUtils.utils.p; import static loadableUtils.utils.reverseInPlace; import static loadableUtils.utils.nChanges; import static loadableUtils.utils.asGlobalID; import static loadableUtils.utils.reverseGet; import static loadableUtils.utils.listZipFile; import static loadableUtils.utils.uniq2; import static loadableUtils.utils.copyTextToClipboard; import static loadableUtils.utils.tok_splitAtAsterisk; import static loadableUtils.utils.findConceptWhere; import static loadableUtils.utils.muricaPasswordFile; import static loadableUtils.utils.wrap; import static loadableUtils.utils.startsWithIgnoreCase; import static loadableUtils.utils.addParamToURL; import static loadableUtils.utils.isJavaxModuleSnippetType; import static loadableUtils.utils.match2; import static loadableUtils.utils.emptyIterator; import static loadableUtils.utils.trueOrNull; import static loadableUtils.utils.match3; import static loadableUtils.utils.interruptThreads; import static loadableUtils.utils.hotwire_collectJars; import static loadableUtils.utils.callMain; import static loadableUtils.utils.markAsSrcLib; import static loadableUtils.utils.setConsoleInput; import static loadableUtils.utils.jsDropTrailingComments; import static loadableUtils.utils.containerAddFirst; import static loadableUtils.utils.empty; import static loadableUtils.utils.cancelAndInterruptThread; import static loadableUtils.utils.oneOf; import static loadableUtils.utils.caseInsensitiveComparator; import static loadableUtils.utils.jmatch; import static loadableUtils.utils.dropExtension; import static loadableUtils.utils.paramsToPairs; import static loadableUtils.utils.withMargin; import static loadableUtils.utils.syncCloneAndClearList; import static loadableUtils.utils.containsAngleBracketVars; import static loadableUtils.utils.navigableMultiSetMapValuesIterator_concurrent; import static loadableUtils.utils.list; import static loadableUtils.utils.hasMethod; import static loadableUtils.utils.enterKeyListener; import static loadableUtils.utils.prependIfNempty; import static loadableUtils.utils.osMXBean; import static loadableUtils.utils.javaTokWithExisting; import static loadableUtils.utils.toUtf8; import static loadableUtils.utils.dropEntryFromParams; import static loadableUtils.utils.cic; import static loadableUtils.utils.hotwire_compile; import static loadableUtils.utils.stringUnless; import static loadableUtils.utils.iteratorFromFunction_f0; import static loadableUtils.utils.setFrameIconLater; import static loadableUtils.utils.getTranspiledStandardFunctionsIfCached; import static loadableUtils.utils.reflection_classesNotToScan; import static loadableUtils.utils.remove; import static loadableUtils.utils.saveBinaryFile; import static loadableUtils.utils.emptyList; import static loadableUtils.utils.ymd_minus_hm; import static loadableUtils.utils.advancedOSMXBean; import static loadableUtils.utils.scanConceptForRefs; import static loadableUtils.utils.programID; import static loadableUtils.utils.showPackedFrame; import static loadableUtils.utils.jpanel; import static loadableUtils.utils.hselect; import static loadableUtils.utils.firstToken; import static loadableUtils.utils.print_byThread; import static loadableUtils.utils.joinSets; import static loadableUtils.utils.htitle_noEncode; import static loadableUtils.utils.conceptsWhere; import static loadableUtils.utils.dm_listStems; import static loadableUtils.utils.find3_levenWithSwapsDistance; import static loadableUtils.utils.popLast; import static loadableUtils.utils.addSlash; import static loadableUtils.utils.dm_makeModule; import static loadableUtils.utils.showForm_leftWidth; import static loadableUtils.utils.toIntPercent; import static loadableUtils.utils.containerTag; import static loadableUtils.utils.charAt; import static loadableUtils.utils.conceptWhere; import static loadableUtils.utils.collectSorted; import static loadableUtils.utils.stringBuilder; import static loadableUtils.utils.regexpCaseInsensitivePrefix; import static loadableUtils.utils.tok_identifiersInOrder; import static loadableUtils.utils.getSnippetTitles; import static loadableUtils.utils.grabValueAndCancel; import static loadableUtils.utils.jPopDownButton_noText; import static loadableUtils.utils.hhead_title; import static loadableUtils.utils.printShortException; import static loadableUtils.utils.hcrud_mergeTables; import static loadableUtils.utils.simpleDateFormat; import static loadableUtils.utils.javaTokNPunctuation_plusAsterisk; import static loadableUtils.utils.asStringArray; import static loadableUtils.utils.swingLater; import static loadableUtils.utils.dropTrailingSlash; import static loadableUtils.utils.toArray; import static loadableUtils.utils.getOuterClass; import static loadableUtils.utils.tok_unCurlyBracket; import static loadableUtils.utils.dbIndexing; import static loadableUtils.utils.findConceptWhereCI; import static loadableUtils.utils.sleepInCleanUp; import static loadableUtils.utils.text_multipleChoiceSplit; import static loadableUtils.utils.gtt; import static loadableUtils.utils.cloneList; import static loadableUtils.utils.html_massageAutofocusParam; import static loadableUtils.utils.stdEq2; import static loadableUtils.utils.defaultTimerName; import static loadableUtils.utils.toK; import static loadableUtils.utils.toM; import static loadableUtils.utils.even; import static loadableUtils.utils.dm_callModule; import static loadableUtils.utils.logStructure; import static loadableUtils.utils.dm_assertFirstSibling; import static loadableUtils.utils.boolOptParam; import static loadableUtils.utils.isJavaIdentifier; import static loadableUtils.utils.hstyle_sourceCodeLikeInRepo; import static loadableUtils.utils.regexp; import static loadableUtils.utils.ping; import static loadableUtils.utils.printNumberedLines; import static loadableUtils.utils.cmp; import static loadableUtils.utils.setFrameTitle; import static loadableUtils.utils._eq; import static loadableUtils.utils.formatDateAndTime; import static loadableUtils.utils.mapNonCodeTokens; import static loadableUtils.utils.getScreenWidth; import static loadableUtils.utils.formatFunctionCall; import static loadableUtils.utils.defaultAgeBasedBackupRetentionStrategy_shouldKeep; import static loadableUtils.utils.ahref_onClick; import static loadableUtils.utils.defaultVMArgs; import static loadableUtils.utils.localDateWithSeconds; import static loadableUtils.utils.makeBot; import static loadableUtils.utils.localMonth; import static loadableUtils.utils.getDBProgramID; import static loadableUtils.utils.countConceptsCI; import static loadableUtils.utils.tok_combineAngleBrackets_keep; import static loadableUtils.utils.flattenStringArray2; import static loadableUtils.utils.div_center; import static loadableUtils.utils.safeUnstructureAllowingClasses; import static loadableUtils.utils.getConsoleTextArea_gen; import static loadableUtils.utils.ai_spreadCertainIndices_2; import static loadableUtils.utils.isJavaxCompilableSnippetTypeExceptInclude; import static loadableUtils.utils.htmlEncode; import static loadableUtils.utils.chainPlus; import static loadableUtils.utils.divUnlessEmpty; import static loadableUtils.utils.parseLong; import static loadableUtils.utils.putIfNotThere; import static loadableUtils.utils.renderDBLoadTime; import static loadableUtils.utils.raf_findBeginningOfLine; import static loadableUtils.utils.applyFunctionToMapValue; import static loadableUtils.utils.afterLastSlash; import static loadableUtils.utils.aGlobalIDObjUnlessLoading; import static loadableUtils.utils.uniqCI2; import static loadableUtils.utils.getSnippetTitle; import static loadableUtils.utils.js_setRedirect; import static loadableUtils.utils.ivf1ToVF1; import static loadableUtils.utils.synchroLinkedList; import static loadableUtils.utils.type_LS; import static loadableUtils.utils.toList; import static loadableUtils.utils.formLayouter1; import static loadableUtils.utils.javaTokWithAllBrackets_cached; import static loadableUtils.utils.unquoteAll; import static loadableUtils.utils.tok_tokenBeforeLonelyReturnValue; import static loadableUtils.utils.joinStrings; import static loadableUtils.utils.getJavaModifiers; import static loadableUtils.utils.isEitherB; import static loadableUtils.utils.replaceACCInClassLoader; import static loadableUtils.utils.toIntArray; import static loadableUtils.utils.massageArgsForVarArgsCall; import static loadableUtils.utils.localMechListFile; import static loadableUtils.utils.dropTags; import static loadableUtils.utils.cleanKillVM; import static loadableUtils.utils.withoutKey; import static loadableUtils.utils.dm_currentModuleMandatory; import static loadableUtils.utils.eqOneOf; import static loadableUtils.utils.containsClosingBracket; import static loadableUtils.utils.syncLengthLevel2; import static loadableUtils.utils.roundBracket; import static loadableUtils.utils.listThreadLocalAdd; import static loadableUtils.utils.pageNav2; import static loadableUtils.utils.getMultiPorts; import static loadableUtils.utils.dm_fieldCheckBox; import static loadableUtils.utils.concatCollections_conservative; import static loadableUtils.utils.emptyToNull; import static loadableUtils.utils.joinWithBR; import static loadableUtils.utils.computerIDFile; import static loadableUtils.utils.cancelThread; import static loadableUtils.utils.mreplace; import static loadableUtils.utils.iteratorFromFunction; import static loadableUtils.utils.afterDelegatingToThread; import static loadableUtils.utils.vmBus_queryAll; import static loadableUtils.utils._registerIO; import static loadableUtils.utils.stdHash2; import static loadableUtils.utils.hAddToHead; import static loadableUtils.utils.javaxDataDir; import static loadableUtils.utils.tok_deRoundBracket; import static loadableUtils.utils.jmenu_autoMnemonic; import static loadableUtils.utils.substring; import static loadableUtils.utils.toSeconds; import static loadableUtils.utils.clickButton; import static loadableUtils.utils.anyIntRangeContains; import static loadableUtils.utils.getOpt_cached; import static loadableUtils.utils.rgbToIntList; import static loadableUtils.utils.cleanUp; import static loadableUtils.utils.flexMatchAngleBracketVarsIC_first; import static loadableUtils.utils.subBot_serveFile; import static loadableUtils.utils.mmo2_parsePattern; import static loadableUtils.utils.cleanUpAndGetWeakReferencesList; import static loadableUtils.utils.forEach; import static loadableUtils.utils.javascriptQuote; import static loadableUtils.utils.isMD5; import static loadableUtils.utils.smartSet; import static loadableUtils.utils.postJSONPage; import static loadableUtils.utils.syncListPlus; import static loadableUtils.utils.str_toK; import static loadableUtils.utils.mapLL; import static loadableUtils.utils.mapPutInRange; import static loadableUtils.utils.unicode_rightPointingTriangle; import static loadableUtils.utils.tok_isRoundBracketed; import static loadableUtils.utils.getConceptOpt; import static loadableUtils.utils.str_toM; import static loadableUtils.utils.hhtml; import static loadableUtils.utils.cloneSubList; import static loadableUtils.utils.isInRAMDisk; import static loadableUtils.utils.logQuotedWithTime; import static loadableUtils.utils.muricaCredentialsQuery; import static loadableUtils.utils.allInterfacesImplementedBy; import static loadableUtils.utils.containsNewLines; import static loadableUtils.utils.appendBracketed; import static loadableUtils.utils.js_evalOnWebSocketMessage; import static loadableUtils.utils.imageSnippetsCacheDir; import static loadableUtils.utils.aGlobalID; import static loadableUtils.utils.syncAddAll; import static loadableUtils.utils.spacePlusRoundBracketedIfNempty; import static loadableUtils.utils.preferredWidth; import static loadableUtils.utils.jsonEncode_shallowLineBreaks; import static loadableUtils.utils.hcss_responstableForForms; import static loadableUtils.utils.tempInterceptPrintIfNotIntercepted; import static loadableUtils.utils.removeSubList; import static loadableUtils.utils.jsonEncode_breakAtLevels; import static loadableUtils.utils.listFields; import static loadableUtils.utils.eqOrSame; import static loadableUtils.utils.makeFrame; import static loadableUtils.utils.callFunction; import static loadableUtils.utils.nConversations; import static loadableUtils.utils.newCancelPoint; import static loadableUtils.utils.flexMatchAngleBracketVarsIC_honorPunctuation_iterate; import static loadableUtils.utils.synchroWeakHashSet; import static loadableUtils.utils.javaDropAllComments; import static loadableUtils.utils.replaceListPart; import static loadableUtils.utils.toDouble; import static loadableUtils.utils.disposeFrame; import static loadableUtils.utils.javaTokForJFind_array; import static loadableUtils.utils.boostHashCombine; import static loadableUtils.utils.formatDoubleArrowMap_horizontallyAligned; import static loadableUtils.utils.preCleanUp; import static loadableUtils.utils.equalsIgnoreCase; import static loadableUtils.utils.tok_combineRoundCurlySquareBrackets_keep; import static loadableUtils.utils.thinAProgramsBackups; import static loadableUtils.utils.numberOfFunctionArguments; import static loadableUtils.utils.getClassDeclarationName; import static loadableUtils.utils.tempSetTL; import static loadableUtils.utils.renderVars_str; import static loadableUtils.utils.dottedSpan; import static loadableUtils.utils.pnl; import static loadableUtils.utils.hPopDownButton; import static loadableUtils.utils.tempLock; import static loadableUtils.utils.addInternalFrame; import static loadableUtils.utils.hcenter3; import static loadableUtils.utils.childOfType; import static loadableUtils.utils.isMac; import static loadableUtils.utils.shortClassNameIs; import static loadableUtils.utils.shortName; import static loadableUtils.utils.camelCase; import static loadableUtils.utils.lastIndexOf_byteArray; import static loadableUtils.utils.subBot_noCacheHeaders; import static loadableUtils.utils.instancesOf; import static loadableUtils.utils.liftLast; import static loadableUtils.utils.getProgramID; import static loadableUtils.utils.containsLowerCase; import static loadableUtils.utils.dropAfterSubstring; import static loadableUtils.utils.swic; import static loadableUtils.utils.unnull; import static loadableUtils.utils.findTranslators2; import static loadableUtils.utils.getFieldType; import static loadableUtils.utils.joinWithComma; import static loadableUtils.utils.conceptsWithFieldGreaterThan_sorted; import static loadableUtils.utils.replaceDollarVars; import static loadableUtils.utils.splitAtVerticalBar; import static loadableUtils.utils.decimalFormatEnglish; import static loadableUtils.utils.indicesOf; import static loadableUtils.utils.postPage; import static loadableUtils.utils.findBlock; import static loadableUtils.utils.startsAndEndsWith; import static loadableUtils.utils.vm_generalSubMap; import static loadableUtils.utils.tdTop; import static loadableUtils.utils.tryToReadErrorStreamFromURLConnection; import static loadableUtils.utils.subList; import static loadableUtils.utils.formatDouble; import static loadableUtils.utils.sortConceptsByID; import static loadableUtils.utils.toStringArray; import static loadableUtils.utils.minFrameWidth; import static loadableUtils.utils.withRightMargin; import static loadableUtils.utils.evalWithTimeoutOrFail; import static loadableUtils.utils.addAll; import static loadableUtils.utils.cicWithSmartWordBoundary; import static loadableUtils.utils.linux_fileInRamDisk; import static loadableUtils.utils.getVar; import static loadableUtils.utils.addFirst; import static loadableUtils.utils.nextToLast; import static loadableUtils.utils.frameTooSmall; import static loadableUtils.utils.unquoteAllLines; import static loadableUtils.utils.ahref; import static loadableUtils.utils.computerID; import static loadableUtils.utils.bytesToHex; import static loadableUtils.utils._inheritThreadInfo; import static loadableUtils.utils.structure_addTokenMarkers; import static loadableUtils.utils.serveWithContentType; import static loadableUtils.utils.withDBLock; import static loadableUtils.utils.zip2dir; import static loadableUtils.utils.exposeMethods2; import static loadableUtils.utils.serveJSON_breakAtLevels; import static loadableUtils.utils.formatDoubleFull; import static loadableUtils.utils.spliceString; import static loadableUtils.utils.pre; import static loadableUtils.utils.unlock; import static loadableUtils.utils.replaceVars; import static loadableUtils.utils.last; import static loadableUtils.utils.classNameToVM; import static loadableUtils.utils.caseInsensitiveSet; import static loadableUtils.utils.psI; import static loadableUtils.utils._recordNewSwingComponent; import static loadableUtils.utils.jsonTok; import static loadableUtils.utils.objectsWhereIC; import static loadableUtils.utils.addPlusToCount; import static loadableUtils.utils.filesWithExtension; import static loadableUtils.utils.splitAtTokens; import static loadableUtils.utils.warn; import static loadableUtils.utils.indicesOfAngleBracketVars; import static loadableUtils.utils.getMultipleKeys; import static loadableUtils.utils.setURLConnectionDefaultTimeouts; import static loadableUtils.utils.flattenList2; import static loadableUtils.utils.isStringList; import static loadableUtils.utils.paramsPlus_noOverwrite; import static loadableUtils.utils.plural; import static loadableUtils.utils.h3_htmlEncode; import static loadableUtils.utils.javaVersion; import static loadableUtils.utils.trimAll; import static loadableUtils.utils.gazelle_server; import static loadableUtils.utils.getClassLoader; import static loadableUtils.utils.fromLines; import static loadableUtils.utils.formatDouble_significant2; import static loadableUtils.utils.htmldecode_dropAllTags; import static loadableUtils.utils.isJavaxCompilableSnippetType; import static loadableUtils.utils.codeAnalysis_identifierSafetyMap; import static loadableUtils.utils.rpad; import static loadableUtils.utils.addIfNotNull; import static loadableUtils.utils.nTests; import static loadableUtils.utils.isString; import static loadableUtils.utils.angleBracketed; import static loadableUtils.utils._wrapIOCloseable; import static loadableUtils.utils.showFormSubmitButtonName; import static loadableUtils.utils.distinctCIFieldValuesOfConcepts; import static loadableUtils.utils.firstElementNotSubclassing; import static loadableUtils.utils.dm_ownQ; import static loadableUtils.utils.temp_loadPage_silent; import static loadableUtils.utils.listToTopTenCI; import static loadableUtils.utils.startQ; import static loadableUtils.utils.hours; import static loadableUtils.utils.veryQuickJava3; import static loadableUtils.utils.filterKeys; import static loadableUtils.utils.similarEmptyMultiMap; import static loadableUtils.utils.afterLastSpace; import static loadableUtils.utils.forEachLevel2; import static loadableUtils.utils.findMethod_checkArgs; import static loadableUtils.utils.allNonStaticNonTransientFields; import static loadableUtils.utils.joinWithVBar; import static loadableUtils.utils.regexp_findSnippetIDs; import static loadableUtils.utils.htmlencode; import static loadableUtils.utils.pair; import static loadableUtils.utils.registeredThreads; import static loadableUtils.utils.hbutton; import static loadableUtils.utils.parseInt; import static loadableUtils.utils.headless; import static loadableUtils.utils.hbuttonLink; import static loadableUtils.utils.lastIndexOf; import static loadableUtils.utils.structureOrText; import static loadableUtils.utils.isOpeningBracket; import static loadableUtils.utils.tempDir; import static loadableUtils.utils.filterNempty; import static loadableUtils.utils.closeAllAndClear; import static loadableUtils.utils.rawLink; import static loadableUtils.utils.setText; import static loadableUtils.utils.listGet; import static loadableUtils.utils.curlyBrace; import static loadableUtils.utils.parseFirstLong; import static loadableUtils.utils.vmBus_timerStarted; import static loadableUtils.utils.jlabel_textAsHTML_center; import static loadableUtils.utils.litciset; import static loadableUtils.utils.joinWithSpace; import static loadableUtils.utils.findButton; import static loadableUtils.utils.asForPairsWithB; import static loadableUtils.utils.csetAll; import static loadableUtils.utils.htmlQuery; import static loadableUtils.utils.formatLocalDateWithMinutes; import static loadableUtils.utils.firstWhereFirstLongIs; import static loadableUtils.utils.doAfter; import static loadableUtils.utils.printIndent; import static loadableUtils.utils.put; import static loadableUtils.utils.anchorFromURL; import static loadableUtils.utils.boolArrayFromBytes; import static loadableUtils.utils.leftScanModifiers; import static loadableUtils.utils.doPostSilently; import static loadableUtils.utils.regexpQuote; import static loadableUtils.utils.loadBinaryFilePart; import static loadableUtils.utils.matchStart; import static loadableUtils.utils.ratioToPercent; import static loadableUtils.utils.typeWriterConsole; import static loadableUtils.utils.snippetType_javaxDesktopModule; import static loadableUtils.utils.withoutNulls; import static loadableUtils.utils.parseColonPropertyCIMap; import static loadableUtils.utils.secretValueOrNull; import static loadableUtils.utils.firstIntegerString; import static loadableUtils.utils.replaceSublist; import static loadableUtils.utils.nLines; import static loadableUtils.utils.unquoteUsingCharArray; import static loadableUtils.utils.fileNotEmpty; import static loadableUtils.utils.codeTokensOnly; import static loadableUtils.utils.jmenuItem; import static loadableUtils.utils.standardCredentialsUser; import static loadableUtils.utils.javaTokPlusBrackets; import static loadableUtils.utils.mL_raw; import static loadableUtils.utils.emptyObjectArray; import static loadableUtils.utils.deleteConcepts; import static loadableUtils.utils.conceptID; import static loadableUtils.utils.isSubclassOf; import static loadableUtils.utils.parseCSSParameter; import static loadableUtils.utils.indentedStructure; import static loadableUtils.utils.hcheckbox; import static loadableUtils.utils.treeMultiMapIndexByField; import static loadableUtils.utils.joinSubList; import static loadableUtils.utils._hashCode; import static loadableUtils.utils.isMultilineQuoted; import static loadableUtils.utils.className; import static loadableUtils.utils.isSnippetID; import static loadableUtils.utils.callPostProcessor; import static loadableUtils.utils.isValidEmailAddress_simple; import static loadableUtils.utils.hjs_copyToClipboard; import static loadableUtils.utils.baseClassName; import static loadableUtils.utils.sortedByCalculatedField; import static loadableUtils.utils.getClasses; import static loadableUtils.utils.pcallOpt_noArgs; import static loadableUtils.utils.iround; import static loadableUtils.utils.mapToPairs; import static loadableUtils.utils.isAngleBracketed; import static loadableUtils.utils.codeTokens; import static loadableUtils.utils.isJavaxApplicationSnippetType; import static loadableUtils.utils.mechList_opt_tlft; import static loadableUtils.utils.listPlus; import static loadableUtils.utils.sortByFieldInPlace; import static loadableUtils.utils.dm_ownResource; import static loadableUtils.utils.db_standardExposedMethods; import static loadableUtils.utils.snippetImageURL_http; import static loadableUtils.utils.jreplace; import static loadableUtils.utils.fromSingleQuoteIdentifier; import static loadableUtils.utils.collectMaxLong; import static loadableUtils.utils.isConceptFieldIndexed; import static loadableUtils.utils.pcallFunction; import static loadableUtils.utils.zipTwoListsToPairs_lengthOfFirst; import static loadableUtils.utils.containsAnythingNeq; import static loadableUtils.utils.smartJoin; import static loadableUtils.utils.loadPageThroughProxy; import static loadableUtils.utils.treeSet; import static loadableUtils.utils.onUpdate; import static loadableUtils.utils.snippetTitle_cacheFile; import static loadableUtils.utils.small; import static loadableUtils.utils.h2_title; import static loadableUtils.utils.sortedIC; import static loadableUtils.utils.addAnchorToURL; import static loadableUtils.utils.sortByFieldDesc; import static loadableUtils.utils.zipTwoListsToPairs_longer; import static loadableUtils.utils.pcallF; import static loadableUtils.utils.holdInstance; import static loadableUtils.utils.replace; import static loadableUtils.utils.ownResource; import static loadableUtils.utils.makePostData; import static loadableUtils.utils.dynamize_noEncode; import static loadableUtils.utils.nChars; import static loadableUtils.utils.findCodeTokens; import static loadableUtils.utils.hbuttonOnClick_returnFalse; import static loadableUtils.utils.loadLibrary; import static loadableUtils.utils.regexpFirstGroupIC; import static loadableUtils.utils.tlft_j; import static loadableUtils.utils.minutes; import static loadableUtils.utils.paramsPlus_skipFirst; import static loadableUtils.utils.endsWithNewLine; import static loadableUtils.utils.wrapInDiv; import static loadableUtils.utils.syncRemoveLast; import static loadableUtils.utils.strUnnull; import static loadableUtils.utils.eitherAOpt; import static loadableUtils.utils.ciContentsIndexedList; import static loadableUtils.utils.stream2file; import static loadableUtils.utils.hjs; import static loadableUtils.utils.onEnter; import static loadableUtils.utils.htmlencode_forParams_useV2; import static loadableUtils.utils.vmBus_anyFalse; import static loadableUtils.utils.ukTimeZone_string; import static loadableUtils.utils.jMenuItem; import static loadableUtils.utils.changeListener; import static loadableUtils.utils.screenRectangle; import static loadableUtils.utils.ciSet; import static loadableUtils.utils.getClassName; import static loadableUtils.utils.sortedByCalculatedFieldDesc; import static loadableUtils.utils.pUnlessEmpty; import static loadableUtils.utils.iterateWithIndex1; import static loadableUtils.utils.bufferedInputStream; import static loadableUtils.utils.indexOfIC_underscore; import static loadableUtils.utils.sleepSeconds; import static loadableUtils.utils.mechMode; import static loadableUtils.utils.vmBus_wrapArgs; import static loadableUtils.utils.values; import static loadableUtils.utils.vm_generalMap; import static loadableUtils.utils.centerAndSouth; import static loadableUtils.utils.copyImageToClipboard; import static loadableUtils.utils.unicodeFromCodePoint; import static loadableUtils.utils.isLetter; import static loadableUtils.utils.parseLongOpt; import static loadableUtils.utils.litmap_impl_noOverwrite; import static loadableUtils.utils.toggleAlwaysOnTop; import static loadableUtils.utils.objectsWhereFieldGreaterThan; import static loadableUtils.utils.ymd; import static loadableUtils.utils.countryDialCodesMultiMap; import static loadableUtils.utils.toObjectArray; import static loadableUtils.utils.bufferedFileInputStream; import static loadableUtils.utils.highestByFunction; import static loadableUtils.utils.formatSnippetIDOpt; import static loadableUtils.utils.getScreenSize; import static loadableUtils.utils.highestConceptByField; import static loadableUtils.utils.process; import static loadableUtils.utils.loadTextFile; import static loadableUtils.utils.smartAddWithLayout; import static loadableUtils.utils.mapValues; import static loadableUtils.utils.syncNempty; import static loadableUtils.utils.clear; import static loadableUtils.utils.hotwireOnce; import static loadableUtils.utils.fromUtf8; import static loadableUtils.utils.hbody; import static loadableUtils.utils.call_withVarargs; import static loadableUtils.utils.stringIf; import static loadableUtils.utils.third; import static loadableUtils.utils.min_withNull; import static loadableUtils.utils.hsansserif; import static loadableUtils.utils.withCancelPoint; import static loadableUtils.utils.setThreadLocal; import static loadableUtils.utils.div_vbar; import static loadableUtils.utils.lookupPossiblyIgnoreCase; import static loadableUtils.utils.isSingleQuoteIdentifier; import static loadableUtils.utils.javaTokWithAngleBrackets; import static loadableUtils.utils.indexConceptFieldCI; import static loadableUtils.utils.containsRegexpIC; import static loadableUtils.utils.javaCompile_overInternalBot; import static loadableUtils.utils.tempLoadingAnim; import static loadableUtils.utils.conceptsWhereCI; import static loadableUtils.utils.callF; import static loadableUtils.utils.javaxSecretDir; import static loadableUtils.utils.htmlTok; import static loadableUtils.utils.lCommonPrefix; import static loadableUtils.utils.joinNemptiesWithSemicolon; import static loadableUtils.utils.newLinesToSpaces_trim; import static loadableUtils.utils.javaTokDropTrailingN; import static loadableUtils.utils.hms; import static loadableUtils.utils.min3; import static loadableUtils.utils.singlePlusArray; import static loadableUtils.utils.eqic_gen; import static loadableUtils.utils.trim; import static loadableUtils.utils.printWithTime; import static loadableUtils.utils.record; import static loadableUtils.utils.replaceAngleBracketVars_curly; import static loadableUtils.utils.secretProgramFile; import static loadableUtils.utils.numberOfWords2; import static loadableUtils.utils.hotwireCached; import static loadableUtils.utils.isWindows; import static loadableUtils.utils.phraseCache; import static loadableUtils.utils.mechMap; import static loadableUtils.utils.fsI_flex; import static loadableUtils.utils.shortenSnippetID; import static loadableUtils.utils.tok_firstClassName; import static loadableUtils.utils.newLinesToSpaces; import static loadableUtils.utils.syncAdd; import static loadableUtils.utils.getInternalFrame; import static loadableUtils.utils.roundToInt; import static loadableUtils.utils.evalInQ; import static loadableUtils.utils.runnableToF0; import static loadableUtils.utils.regexpExtractAll; import static loadableUtils.utils.htitle_h2; import static loadableUtils.utils.htitle_h1; import static loadableUtils.utils.stdFunctions_cached; import static loadableUtils.utils.mapToHashSet; import static loadableUtils.utils.formatWithThousands; import static loadableUtils.utils.domain; import static loadableUtils.utils.tokSplitAtComma; import static loadableUtils.utils.getTitlePaneComponent; import static loadableUtils.utils.hdesktopNotifications; import static loadableUtils.utils.rtrim_fromLines; import static loadableUtils.utils.showConsole; import static loadableUtils.utils.dropSuffixIgnoreCase; import static loadableUtils.utils.isLowerCase; import static loadableUtils.utils.parseColonProperties; import static loadableUtils.utils.regexpFindsIC; import static loadableUtils.utils.mapToLines_rtrim; import static loadableUtils.utils.subBot_serve404; import static loadableUtils.utils.isStaticMethod; import static loadableUtils.utils.paramsPlus; import static loadableUtils.utils.splitAtColon; import static loadableUtils.utils.htmlencode2; import static loadableUtils.utils.actionListener; import static loadableUtils.utils.isDollarVar; import static loadableUtils.utils.subIntArray; import static loadableUtils.utils.find3; import static loadableUtils.utils.loadSnippet_cached; import static loadableUtils.utils.find2; import static loadableUtils.utils.hreconnectingWebSockets; import static loadableUtils.utils.pre_htmlencode; import static loadableUtils.utils.rectangleUnion; import static loadableUtils.utils.addSlashPrefix; import static loadableUtils.utils.duplicateThisProgram; import static loadableUtils.utils.hscript; import static loadableUtils.utils.getJavaX; import static loadableUtils.utils.ipToCountry2020_safe; import static loadableUtils.utils.htmldecode; import static loadableUtils.utils.getCanonicalPath; import static loadableUtils.utils.td_valignTop; import static loadableUtils.utils.fileInfo; import static loadableUtils.utils.exceptionToStringShort; import static loadableUtils.utils.getServerTranspiled2; import static loadableUtils.utils.nuObjectWithoutArguments; import static loadableUtils.utils.findMainClass; import static loadableUtils.utils.intRangeContains; import static loadableUtils.utils.mapToOrderedMap; import static loadableUtils.utils.instanceFieldsMap; import static loadableUtils.utils.hreplaceTitle; import static loadableUtils.utils.toString; import static loadableUtils.utils.collectMinLong; import static loadableUtils.utils.setToolTipText; import static loadableUtils.utils.makeAndroid3; import static loadableUtils.utils.jsBool; import static loadableUtils.utils.isOpeningTag; import static loadableUtils.utils.showAnimationInTopRightCorner; import static loadableUtils.utils.loadBinaryFromZip; import static loadableUtils.utils.div; import static loadableUtils.utils.squareBracket; import static loadableUtils.utils.addComponentsFirst; import static loadableUtils.utils.hdivWithID; import static loadableUtils.utils.stepAllWithTimeout; import static loadableUtils.utils.tok_isJavaxMetaCommandLeftOf; import static loadableUtils.utils.toChain; import static loadableUtils.utils.arrayPlus; import static loadableUtils.utils.tok_splitAtPlus; import static loadableUtils.utils.checkTokCondition; import static loadableUtils.utils.getProgramTitle; import static loadableUtils.utils.filterConceptsIC; import static loadableUtils.utils.sortedByConceptIDDesc; import static loadableUtils.utils.renderVars_struct; import static loadableUtils.utils.formatLocalDateWithSeconds; import static loadableUtils.utils.joinNemptiesWithColon; import static loadableUtils.utils.snippetRawURL_maxCache; import static loadableUtils.utils.parseDoubleLeftArrowMapCI; import static loadableUtils.utils.joinNemptiesWithSpace; import static loadableUtils.utils.forbiddenPort; import static loadableUtils.utils.dbBotName; import static loadableUtils.utils.conceptsWhereIC; import static loadableUtils.utils.lithashset; import static loadableUtils.utils.month; import static loadableUtils.utils.domainName; import static loadableUtils.utils.isOK; import static loadableUtils.utils.innerException2; import static loadableUtils.utils.secondOfPair; import static loadableUtils.utils.renameFile; import static loadableUtils.utils.unrollParams; import static loadableUtils.utils.dropLoadableUtilsPackageFromStruct; import static loadableUtils.utils.optionalCurlyBrace; import static loadableUtils.utils.setOptIfNotNull; import static loadableUtils.utils.regionMatches; import static loadableUtils.utils.warnIfOddCount; import static loadableUtils.utils.replaceAll; import static loadableUtils.utils.joinWithPlus; import static loadableUtils.utils.collectionGet; import static loadableUtils.utils.frameStandardSize; import static loadableUtils.utils.hashCode; import static loadableUtils.utils.hcomment; import static loadableUtils.utils.newFileOutputStream; import static loadableUtils.utils.htd; import static loadableUtils.utils.shortClassName; import static loadableUtils.utils.loadLibraries; import static loadableUtils.utils.postProcess; import static loadableUtils.utils.checkConceptFields; import static loadableUtils.utils.htextfield; import static loadableUtils.utils.syncInstancesOf; import static loadableUtils.utils.map_ping; import static loadableUtils.utils.hhidden; import static loadableUtils.utils.mapComparatorDesc; import static loadableUtils.utils.rectContains; import static loadableUtils.utils.linesFromReader; import static loadableUtils.utils.setOptAll; import static loadableUtils.utils.bindLiveValueListenerToComponent; import static loadableUtils.utils.isOfflineMode; import static loadableUtils.utils.length; import static loadableUtils.utils.focusConsole; import static loadableUtils.utils.myFrames; import static loadableUtils.utils.multiSetMapToMultiSet; import static loadableUtils.utils.ulIfNempty; import static loadableUtils.utils.callAndMake_orDirect; import static loadableUtils.utils.print; import static loadableUtils.utils.newGZIPInputStream; import static loadableUtils.utils.touchFile; import static loadableUtils.utils.totalPreferredHeight; import static loadableUtils.utils.toRectangle; import static loadableUtils.utils.assertEvenLength; import static loadableUtils.utils.allMethodNames; import static loadableUtils.utils.printStackTrace2; import static loadableUtils.utils._topLevelErrorHandling; import static loadableUtils.utils.alphaNumComparatorIC; import static loadableUtils.utils.copyStreamWithPrints; import static loadableUtils.utils.consoleFrame; import static loadableUtils.utils.stackTraceForThread; import static loadableUtils.utils.classNames; import static loadableUtils.utils.mapPairs; import static loadableUtils.utils.identityHashCode; import static loadableUtils.utils.assertBiggerThan; import static loadableUtils.utils.dropUriPrefix; import static loadableUtils.utils.lock; import static loadableUtils.utils.findMethodNamed; import static loadableUtils.utils.hframeset_cols; import static loadableUtils.utils.weakRef; import static loadableUtils.utils.globalIDLength; import static loadableUtils.utils.closeAllWriters; import static loadableUtils.utils.swingNu; import static loadableUtils.utils.firstToLower; import static loadableUtils.utils.swingAndWait; import static loadableUtils.utils.htmlEncode2_gen; import static loadableUtils.utils.localSnippetFile; import static loadableUtils.utils.standardTimeZone; import static loadableUtils.utils.simpleSpacesTrim_javaTok; import static loadableUtils.utils.concatLists_syncIndividual; import static loadableUtils.utils.jbutton; import static loadableUtils.utils.makeAndCall_cached; import static loadableUtils.utils.jtextarea; import static loadableUtils.utils.isSubtypeOf; import static loadableUtils.utils.setEnabled; import static loadableUtils.utils.toDoubleArray; import static loadableUtils.utils.hpostform; import static loadableUtils.utils.emptyString; import static loadableUtils.utils.charToString; import static loadableUtils.utils.mechList_opt_tlft_cached; import static loadableUtils.utils.endsWithIgnoreCase; import static loadableUtils.utils.regexpIC; import static loadableUtils.utils.timerTask; import static loadableUtils.utils.getFileInfoField; import static loadableUtils.utils.loadFunction_cached; import static loadableUtils.utils.assertLessThan; import static loadableUtils.utils.listL; import static loadableUtils.utils.packInternalFrameVertically; import static loadableUtils.utils.isAGIBlueDomain; import static loadableUtils.utils.syncRemoveAllExceptLast; import static loadableUtils.utils.litlist; import static loadableUtils.utils.itemListener; import static loadableUtils.utils.toMS; import static loadableUtils.utils.assertIsIdentifier; import static loadableUtils.utils.cancelTimer; import static loadableUtils.utils.isLongConstant; import static loadableUtils.utils.escapeNewLines; import static loadableUtils.utils.methodApplicabilityScore; import static loadableUtils.utils.map; import static loadableUtils.utils.endsWithLetter; import static loadableUtils.utils.ewic; import static loadableUtils.utils.isStringCollection; import static loadableUtils.utils.matchEnd; import static loadableUtils.utils.max; import static loadableUtils.utils.htmlencode_forParams_v2; import static loadableUtils.utils.addParamsToURL; import static loadableUtils.utils.f2s; import static loadableUtils.utils.setVar; import static loadableUtils.utils.asCIMap; import static loadableUtils.utils.hscriptsrc; import static loadableUtils.utils.startsWithDigit; import static loadableUtils.utils.unicode_downPointingTriangle; import static loadableUtils.utils.mapPairB; import static loadableUtils.utils.md5; import static loadableUtils.utils.jLiveValueCheckBox; import static loadableUtils.utils.htmlcoarsetok; import static loadableUtils.utils.loadBinaryPageToFile; import static loadableUtils.utils.onClick; import static loadableUtils.utils.listWithoutIndicesInBitSet; import static loadableUtils.utils.addAndReturnIndex; import static loadableUtils.utils.javaValueToHTML; import static loadableUtils.utils.isAllUpperCase; import static loadableUtils.utils.regexReplace; import static loadableUtils.utils.flexMatchIC_getVarIndices; import static loadableUtils.utils.renderFileInfo; import static loadableUtils.utils.isAllDigits; import static loadableUtils.utils.mapPut_returnValue; import static loadableUtils.utils.listThreadLocalPopLast; import static loadableUtils.utils.publicCommOn; import static loadableUtils.utils.countryDialCodes; import static loadableUtils.utils.jenableUndoRedo; import static loadableUtils.utils.setChecked; import static loadableUtils.utils.joinPairWithColon; import static loadableUtils.utils.isTrue_getOpt; import static loadableUtils.utils.syncList; import static loadableUtils.utils.singleFieldName; import static loadableUtils.utils.formatColonProperties; import static loadableUtils.utils.isConceptList; import static loadableUtils.utils.getThreadLocal; import static loadableUtils.utils.sort; import static loadableUtils.utils.htmlEncode_quote; import static loadableUtils.utils.showWindow; import static loadableUtils.utils.optPar_ignoreOddLength; import static loadableUtils.utils.subBot_serveByteArray; import static loadableUtils.utils.disposeInternalFrame; import static loadableUtils.utils._registerTimer; import static loadableUtils.utils.indexConceptFieldIC; import static loadableUtils.utils.dm_watchField; import static loadableUtils.utils.jextract; import static loadableUtils.utils.hotwire_makeClassLoader; import static loadableUtils.utils.fillJPopupMenu; import static loadableUtils.utils.levenWithSwapsIC; import static loadableUtils.utils.synchroMap; import static loadableUtils.utils.firstChar; import static loadableUtils.utils.isUpperCaseLetter; import static loadableUtils.utils.deref; import static loadableUtils.utils.primitiveToBoxedType; import static loadableUtils.utils.matchesToMapUsingVarList_ciMap; import static loadableUtils.utils.cloneAndClear; import static loadableUtils.utils.dbBot; import static loadableUtils.utils.firstOfPairs; import static loadableUtils.utils.byteArrayStartsWith; import static loadableUtils.utils.printHidingCredentials; import static loadableUtils.utils.println; import static loadableUtils.utils.showForm_makeFrame; import static loadableUtils.utils.metaTransformer_transformableAndList; import static loadableUtils.utils.repeat; import static loadableUtils.utils.putAll; import static loadableUtils.utils.childWithClassNameEndingWith; import static loadableUtils.utils.expandParams; import static loadableUtils.utils.sourceCodeToHTML_noEncode; import static loadableUtils.utils.structureForUser; import static loadableUtils.utils.mapMinus; import static loadableUtils.utils.renameButton; import static loadableUtils.utils.dropSuffix; import static loadableUtils.utils.callStaticAnswerMethod; import static loadableUtils.utils.startsWithLetterOrDigit; import static loadableUtils.utils.getTag; import static loadableUtils.utils.findMethod_cached; import static loadableUtils.utils.hotwire_libraryIDsFromJar_deleteJarOnFail; import static loadableUtils.utils.subBot_serveWithContentType; import static loadableUtils.utils.cForwardAndBackRefsWithFieldIndicator; import static loadableUtils.utils.scoredSearch_score_single; import static loadableUtils.utils.makeTempDir; import static loadableUtils.utils.startMultiPort; import static loadableUtils.utils.renderDBSaveTime; import static loadableUtils.utils.synchroHashSet; import static loadableUtils.utils.filesEndingWith; import static loadableUtils.utils.serve404; import static loadableUtils.utils.objectsWhereCI; import static loadableUtils.utils.htag; import static loadableUtils.utils.asArray; import static loadableUtils.utils.getStringOpt; import static loadableUtils.utils.splitAtDoubleArrow_tok; import static loadableUtils.utils.isCurlyBracketed; import static loadableUtils.utils.pIfNempty; import static loadableUtils.utils.removeAll; import static loadableUtils.utils.snippetType_dynModule; import static loadableUtils.utils.getMinimumSize; import static loadableUtils.utils.flexMatchAngleBracketVarsIC_honorPunctuation_first; import static loadableUtils.utils.isURL; import static loadableUtils.utils.assertNotOnAWTThread; import static loadableUtils.utils.elapsedSeconds_sysNow; import static loadableUtils.utils.disableMenuItem; import static loadableUtils.utils.firstStartingWithIC_drop; import static loadableUtils.utils.getException; import static loadableUtils.utils.costCenter; import static loadableUtils.utils.getText; import static loadableUtils.utils.replaceCollection; import static loadableUtils.utils.parseDoubleLeftArrowMapCI_tlft; import static loadableUtils.utils.pairsB; import static loadableUtils.utils.pairsA; import static loadableUtils.utils.ensureConceptClassesAreIndexed; import static loadableUtils.utils.toLinesFullTrim; import static loadableUtils.utils.takeLast; import static loadableUtils.utils.dayOfMonth; import static loadableUtils.utils.checkFieldsIC; import static loadableUtils.utils.caseID; import static loadableUtils.utils.cgetAll_cloneLists; import static loadableUtils.utils.swic_notSame; import static loadableUtils.utils.javaCompileToJar_optionalRename; import static loadableUtils.utils.x30JarServerURL; import static loadableUtils.utils.getCachedTranspilationFile; import static loadableUtils.utils.newThread; import static loadableUtils.utils.cForwardRefsWithFieldNames; import static loadableUtils.utils.nemptyString; import static loadableUtils.utils.hstyle; import static loadableUtils.utils.asCaseInsensitiveMap; import static loadableUtils.utils.unstructure; import static loadableUtils.utils.uncurly; import static loadableUtils.utils.replaceSquareBracketVars; import static loadableUtils.utils.lines_possiblyRTrim; import static loadableUtils.utils.min; import static loadableUtils.utils.keysList; import static loadableUtils.utils.dropParam; import static loadableUtils.utils.arraycopy; import static loadableUtils.utils.isValidInternationalPhoneNumber; import static loadableUtils.utils.parseBusinessHours_pcall; import static loadableUtils.utils.fileExtension; import static loadableUtils.utils.showFormTitled; import static loadableUtils.utils.htmlTable2_noHtmlEncode; import static loadableUtils.utils.parseSecondLong; import static loadableUtils.utils.fileNameEncode; import static loadableUtils.utils.sortedByConceptID; import static loadableUtils.utils.nErrors; import static loadableUtils.utils.addAndReturn; import static loadableUtils.utils.reversedList; import static loadableUtils.utils.getSnippetTitleOpt; import static loadableUtils.utils.hostNameFromURL; import static loadableUtils.utils.cloneMap; import static loadableUtils.utils.collectField; import static loadableUtils.utils.localYear; import static loadableUtils.utils.ifThenElse; import static loadableUtils.utils.stringPar; import static loadableUtils.utils.domainIsUnder; import static loadableUtils.utils.getScreenHeight; import static loadableUtils.utils.directoryIsEmpty; import static loadableUtils.utils.getGlobalCache; import static loadableUtils.utils.simplifySafetyTags; import static loadableUtils.utils.keyWithBiggestValue; import static loadableUtils.utils.himgsnippet; import static loadableUtils.utils.jsBackLink; import static loadableUtils.utils.jsQuote; import static loadableUtils.utils.jsonPrepareData; import static loadableUtils.utils.isSpace; import static loadableUtils.utils.closeAllKeysAndClear; import static loadableUtils.utils.htmlEncode2_nlToBr; import static loadableUtils.utils.indentx; import static loadableUtils.utils.formatSnippetID; import static loadableUtils.utils.isCodeSafe; import static loadableUtils.utils.getSelectedItem; import static loadableUtils.utils.saveTranspiledStandardFunctions; import static loadableUtils.utils.startsWithAndEndsWith; import static loadableUtils.utils.descFieldComparator; import static loadableUtils.utils.linesFromFile; import static loadableUtils.utils.snippetImageURL; import static loadableUtils.utils.ymd_minus_hms; import static loadableUtils.utils.base64decode; import static loadableUtils.utils.itemPlusList; import static loadableUtils.utils.revalidate; import static loadableUtils.utils.unlisted; import static loadableUtils.utils.callF_all; import static loadableUtils.utils.findContainerTag; import static loadableUtils.utils.aGlobalIDObj; import static loadableUtils.utils.intArrayToList; import static loadableUtils.utils.mapGet2; import static loadableUtils.utils.hsnippetimg_scaleToWidth; import static loadableUtils.utils.nlToBr; import static loadableUtils.utils.tempAdd; import static loadableUtils.utils.conceptCount; import static loadableUtils.utils.loadProgramTextFile; import static loadableUtils.utils.cicAtOddPosition; import static loadableUtils.utils.stdHash; import static loadableUtils.utils.compileRegexp; import static loadableUtils.utils.dm_setModuleName; import static loadableUtils.utils.utf8charset; import static loadableUtils.utils.loadJQuery; import static loadableUtils.utils.evalWithTimeout; import static loadableUtils.utils.isLinux; import static loadableUtils.utils.addHeader; import static loadableUtils.utils.fairLock; import static loadableUtils.utils.dbLock; import static loadableUtils.utils.firstOfPair; import static loadableUtils.utils.simpleConceptIndex; import static loadableUtils.utils.arrayOfType; import static loadableUtils.utils.iff; import static loadableUtils.utils.addLineBreak; import static loadableUtils.utils.multiLineQuoteWithSpaces; import static loadableUtils.utils.menuItem; import static loadableUtils.utils.addDefaultVMOption; import static loadableUtils.utils.mapPutOrRemove; import static loadableUtils.utils.hfileupload; import static loadableUtils.utils.makeResponder; import static loadableUtils.utils.copyStream; import static loadableUtils.utils.dialCodeStringForCountryCode; import static loadableUtils.utils.nuStubInnerObject; import static loadableUtils.utils.newWeakHashSet; import static loadableUtils.utils.mainDesktopPane; import static loadableUtils.utils.argumentCompatibleWithType; import static loadableUtils.utils.struct_noStringSharing; import static loadableUtils.utils.keyWithHighestValue; import static loadableUtils.utils.DiskSnippetCache_getLibrary; import static loadableUtils.utils.callOptMC; import static loadableUtils.utils.showFormTitled_customLayout; import static loadableUtils.utils.squareBracketed; import static loadableUtils.utils.javaTokWithAllPlusAngleBracketsC; import static loadableUtils.utils.sortByCalculatedFieldDesc; import static loadableUtils.utils.hjssrc; import static loadableUtils.utils.lookupPossiblyCI; import static loadableUtils.utils.programName; import static loadableUtils.utils.parseSnippetIDs; import static loadableUtils.utils.strOrNull; import static loadableUtils.utils.highestBy; import static loadableUtils.utils.addToStringTree; import static loadableUtils.utils.repLine; import static loadableUtils.utils.useDummyMainClasses; import static loadableUtils.utils.nSteps; import static loadableUtils.utils.packFrame; import static loadableUtils.utils.hInitWebSocket; import static loadableUtils.utils.defaultThreadName; import static loadableUtils.utils.pcallFAll_returnFirstNotNull; import static loadableUtils.utils.isJavaXClassLoader; import static loadableUtils.utils.smartLastIndexOf; import static loadableUtils.utils.findClass; import static loadableUtils.utils.concatMap; import static loadableUtils.utils.loadSnippet_simpleCache; import static loadableUtils.utils.shortenClassName; import static loadableUtils.utils.isAngleBracketVar; import static loadableUtils.utils.upgradeJavaXAndRestart; import static loadableUtils.utils.anyFileWithExtensionInDir; import static loadableUtils.utils.replaceSubList; import static loadableUtils.utils.serveSnippetURL; import static loadableUtils.utils.humanizeFormLabel; import static loadableUtils.utils._close; import static loadableUtils.utils.starsToAngleBracketedNumbers; import static loadableUtils.utils.paramsToMap; import static loadableUtils.utils.countPred; import static loadableUtils.utils.copyFile; import static loadableUtils.utils.splitBusinessHoursAtMidnight; import static loadableUtils.utils.highestByField; import static loadableUtils.utils.getCodeFragmentSafety; import static loadableUtils.utils.serveJSON_shallowLineBreaks; import static loadableUtils.utils.printExceptionShort; import static loadableUtils.utils.getInnerMessage; import static loadableUtils.utils.putSetElementsFirst; import static loadableUtils.utils.close_pcall; import static loadableUtils.utils.sortedByFieldDesc; import static loadableUtils.utils.renderConceptDate; import static loadableUtils.utils.userHome; import static loadableUtils.utils.syncNextToLast; import static loadableUtils.utils.wrapForSmartAdd; import static loadableUtils.utils.hpassword; import static loadableUtils.utils.intToHex_flexLength; import static loadableUtils.utils.firstEntry; import static loadableUtils.utils.asSet; import static loadableUtils.utils.internIfLongerThan; import static loadableUtils.utils.indexOfIgnoreCase_manual; import static loadableUtils.utils.hasLock; import static loadableUtils.utils.hopeningTag; import static loadableUtils.utils.jsonDecodeMap; import static loadableUtils.utils.toM_double; import static loadableUtils.utils.getProgramDir; import static loadableUtils.utils.bindCheckBoxToLiveValue; import static loadableUtils.utils.fsIOpt; import static loadableUtils.utils.wrapPatternSyntaxException; import static loadableUtils.utils.deleteAllFilesInDirectory; import static loadableUtils.utils._entrySet; import static loadableUtils.utils.appendWithNewLine; import static loadableUtils.utils.assertEqualsVerbose; import static loadableUtils.utils.listZIP; import static loadableUtils.utils.first; import static loadableUtils.utils.span; import static loadableUtils.utils.asciiSideBySide; import static loadableUtils.utils.litorderedmap; import static loadableUtils.utils.indexOfSpaceEtc; import static loadableUtils.utils.mapPairsToList; import static loadableUtils.utils.tok_subListWithoutBorderNTokens; import static loadableUtils.utils.networkAllowanceTest; import static loadableUtils.utils.shallowClone; import static loadableUtils.utils.allChildren; import static loadableUtils.utils.multiSetToPairsByPopularity; import static loadableUtils.utils.mechList_opt; import static loadableUtils.utils.similarEmptySet; import static loadableUtils.utils.filterMapByFunctionOnKey; import static loadableUtils.utils.ahref_unstyled; import static loadableUtils.utils.sortFilesByName; import static loadableUtils.utils.ivf2ToVF2; import static loadableUtils.utils.syncLast; import static loadableUtils.utils.mapPut; import static loadableUtils.utils.onConceptsChange; import static loadableUtils.utils.oneOfTheFiles; import static loadableUtils.utils.printStructure; import static loadableUtils.utils.isInstanceX; import static loadableUtils.utils.objectToMap; import static loadableUtils.utils.rcall; import static loadableUtils.utils.onChange; import static loadableUtils.utils.nlToBr_withIndents; import static loadableUtils.utils.hsnippetimg; import static loadableUtils.utils.vmBus_onMessage; import static loadableUtils.utils.getUpToDateSnippetTranspilationMD5; import static loadableUtils.utils.renderEqualsCommaProperties; import static loadableUtils.utils.loadTextFileFromZipFile; import static loadableUtils.utils.loadGZTextFile; import static loadableUtils.utils.nuObject; import static loadableUtils.utils.remoteMechListMirrorsDir; import static loadableUtils.utils.treeMultiSetMap; import static loadableUtils.utils.utf8streamToString; import static loadableUtils.utils.loadImageAsFile; import static loadableUtils.utils.hjs_autoExpandingTextAreas; import static loadableUtils.utils.uniqueFileNameUsingMD5_80_v2; import static loadableUtils.utils.isMenuSeparatorIndicator; import static loadableUtils.utils.withTopMargin; import static loadableUtils.utils.abstractAction; import static loadableUtils.utils.hmobilefix; import static loadableUtils.utils.assertFalse; import static loadableUtils.utils.dm_inQ; import static loadableUtils.utils.dirOfFile; import static loadableUtils.utils.conceptsSortedByFieldCI; import static loadableUtils.utils.dropDollarPrefix; import static loadableUtils.utils.latestInstalledJavaX; import static loadableUtils.utils.printVars_str; import static loadableUtils.utils.innerException; import static loadableUtils.utils.remoteMechListMirrorNameFile; import static loadableUtils.utils.isCurrentThread; import static loadableUtils.utils._registerAutoCloseable; import static loadableUtils.utils.bigint; import static loadableUtils.utils.hotwire; import static loadableUtils.utils.trimJoinSubList; import static loadableUtils.utils.hasSuperclassShortNamed; import static loadableUtils.utils.newSubListOrSame; import static loadableUtils.utils.syncReplaceCollection; import static loadableUtils.utils.deSquareBracket; import static loadableUtils.utils.hexColorToCSSRGB; import static loadableUtils.utils.veryQuickJava; import static loadableUtils.utils.formatWithThousandsSeparator; import static loadableUtils.utils.loadPage_openConnection; import static loadableUtils.utils.eqicOrEq; import static loadableUtils.utils.eqicOrSwicPlusSpace; import static loadableUtils.utils.revalidateFrame; import static loadableUtils.utils.lowestByField; import static loadableUtils.utils.isTag; import static loadableUtils.utils.randomID; import static loadableUtils.utils.round; import static loadableUtils.utils.randomAccessFileForReading; import static loadableUtils.utils.syncPopLast; import static loadableUtils.utils.weakHashMap; import static loadableUtils.utils.getProgramName; import static loadableUtils.utils.lastChar; import static loadableUtils.utils.consoleInputFont; import static loadableUtils.utils.span_title; import static loadableUtils.utils.filterAntiFilter; import static loadableUtils.utils.rotateStringBuffer; import static loadableUtils.utils.dropParamFromURL; import static loadableUtils.utils.defaultTokenizerCacheSize; import static loadableUtils.utils.decodeURIParams; import static loadableUtils.utils.year; import static loadableUtils.utils.hNotificationPopups; import static loadableUtils.utils.subBot_serveInputStream; import static loadableUtils.utils.firstNotNull; import static loadableUtils.utils.strL; import static loadableUtils.utils.reverseString; import static loadableUtils.utils.score; import static loadableUtils.utils.howManySecondsAgo; import static loadableUtils.utils.subBot_httpd; import static loadableUtils.utils.quote; import static loadableUtils.utils.htmlEncode_nlToBr_withIndents; import static loadableUtils.utils.clearToken; import static loadableUtils.utils.sortLinesAlphaNumIC; import static loadableUtils.utils.htmlTable2; import static loadableUtils.utils.jreplaceExpandRefs; import static loadableUtils.utils.isLowerHexString; import static loadableUtils.utils.jTextField; import static loadableUtils.utils.llNonNulls; import static loadableUtils.utils.newLinesToSpaces2; import static loadableUtils.utils.uniqueConcept; import static loadableUtils.utils.fileServerURL; import static loadableUtils.utils.hasLetters; import static loadableUtils.utils.timeZone; import static loadableUtils.utils.hframeset_rows; import static loadableUtils.utils.fullRawLink; import static loadableUtils.utils.setTextAndSelectAll; import static loadableUtils.utils.contains; import static loadableUtils.utils.sorted; import static loadableUtils.utils.standardCredentials_noCookies; import static loadableUtils.utils.splitAtDoubleArrow_bothDirections; import static loadableUtils.utils.countConceptsWhereCI; import static loadableUtils.utils.renderHowLongAgoPlusModified; import static loadableUtils.utils.isRunnable; import static loadableUtils.utils.uniqCI; import static loadableUtils.utils.jsonEncodeMap; import static loadableUtils.utils.emptySet; import static loadableUtils.utils.showInternalFrameFormTitled; import static loadableUtils.utils.div_floatRight; import static loadableUtils.utils.lookupOrKeep; import static loadableUtils.utils.unCurlyBracket; import static loadableUtils.utils.isImageServerSnippet; import static loadableUtils.utils.sleep; import static loadableUtils.utils.allConcepts; import static loadableUtils.utils.indexConceptField; import static loadableUtils.utils.compileSnippetThroughServer; import static loadableUtils.utils.scoredSearch_score; import static loadableUtils.utils.isA; import static loadableUtils.utils.titlePopupMenu; import static loadableUtils.utils.mp3mimeType; import static loadableUtils.utils.isB; import static loadableUtils.utils.programIDWithCase; import static loadableUtils.utils.subBot_serveRedirect; import static loadableUtils.utils.vm_generalWeakSet; import static loadableUtils.utils.uniquifyCI; import static loadableUtils.utils.close; import static loadableUtils.utils.regexpReplaceIC; import static loadableUtils.utils.setHeaders; import static loadableUtils.utils.assertStartsWith; import static loadableUtils.utils.tempDirPossiblyInRAMDisk; import static loadableUtils.utils.isFile; import static loadableUtils.utils.javaxIncludeSnippetType; import static loadableUtils.utils.indexOfPred; import static loadableUtils.utils.ewicOneOf; import static loadableUtils.utils.makeComparator; import static loadableUtils.utils.standardClassesMap; import static loadableUtils.utils.setBounds; import static loadableUtils.utils.htmlencode_noQuotes; import static loadableUtils.utils.todo; import static loadableUtils.utils.conceptWhereIC; import static loadableUtils.utils.serveCSVWithFileName; import static loadableUtils.utils.swing; import static loadableUtils.utils.ciMultiSetMap; import static loadableUtils.utils.abs; import static loadableUtils.utils.tempSetThreadLocal; import static loadableUtils.utils.bytesFromHex; import static loadableUtils.utils.sortByMap_inPlace; import static loadableUtils.utils.optParam; import static loadableUtils.utils.readLineFromReaderWithClose; import static loadableUtils.utils.stdFunctions_uncached; import static loadableUtils.utils.uniqueString; import static loadableUtils.utils.findEndOfBracketPart; import static loadableUtils.utils.prepareProgramFile; import static loadableUtils.utils.calendarFromTime; import static loadableUtils.utils.hjavascript_src; import static loadableUtils.utils.eitherB; import static loadableUtils.utils._getClass; import static loadableUtils.utils.replaceMap; import static loadableUtils.utils.eitherA; import static loadableUtils.utils.syncShallowCloneElements; import static loadableUtils.utils.indentStructureString_firstLevels; import static loadableUtils.utils.instanceOf; import static loadableUtils.utils.asciiSideBySideWithSeparator; import static loadableUtils.utils.either2; import static loadableUtils.utils.either1; import static loadableUtils.utils.getComponents; import static loadableUtils.utils.paramsFromURL; import static loadableUtils.utils.rep; import static loadableUtils.utils.splitAtComma_trim; import static loadableUtils.utils.add; import static loadableUtils.utils.evalWithTimeoutOrException; import static loadableUtils.utils.simpleDateFormat_local; import static loadableUtils.utils.getCodeProgramDir; import static loadableUtils.utils.ciMultiMap; import static loadableUtils.utils.openConnection; import static loadableUtils.utils.addActionListener; import static loadableUtils.utils.showFormTitled_customArrangement; import static loadableUtils.utils.fixInternalFrame; import static loadableUtils.utils.hcss; import static loadableUtils.utils.mapKeys; import static loadableUtils.utils.snippetImageURL_noHttps; import static loadableUtils.utils.clearTokens; import static loadableUtils.utils.n_fancy2; import static loadableUtils.utils.java10OrHigher; import static loadableUtils.utils.splitAtJavaToken; import static loadableUtils.utils.subBot_serve500; import static loadableUtils.utils.saveTextFile; import static loadableUtils.utils.subBot_maxCacheHeaders; import static loadableUtils.utils.serveByteArray; import static loadableUtils.utils.javaTokPlusPeriod; import static loadableUtils.utils.printStruct; import static loadableUtils.utils.allFields; import static loadableUtils.utils.getWindow; import static loadableUtils.utils.hhiddenWithID; import static loadableUtils.utils.htmlEncode2If; import static loadableUtils.utils.loadJSONFile; import static loadableUtils.utils.findEndOfAngleBracketPart; import static loadableUtils.utils.emptyCloseableIterableIterator; import static loadableUtils.utils.mainBot; import static loadableUtils.utils.mapPlus; import static loadableUtils.utils.decodeHQuery; import static loadableUtils.utils.conceptWhereCI; import static loadableUtils.utils.lowestConceptByField; import static loadableUtils.utils.loadCachedTranspilation; import static loadableUtils.utils.infoBoxesLogFile; import static loadableUtils.utils.startDialogServerOnPortAbove; import static loadableUtils.utils.addToCollection; import static loadableUtils.utils.pnlToString; import static loadableUtils.utils.emptyDoubleArray; import static loadableUtils.utils.makeArray; import static loadableUtils.utils.lines; import static loadableUtils.utils.dropFirstThreeAndLastThree; import static loadableUtils.utils.unquote; import static loadableUtils.utils.deleteFile; import static loadableUtils.utils.tok_expandIfQuoted; import static loadableUtils.utils.centerAndSouthWithMargins; import static loadableUtils.utils.nempty; import static loadableUtils.utils.makeRandomID; import static loadableUtils.utils.isEmpty; import static loadableUtils.utils.lengthOfString; import static loadableUtils.utils.ipToInt; import static loadableUtils.utils.dm_os; import static loadableUtils.utils.serveText; import static loadableUtils.utils.standardFunctionsCacheUpToDate; import static loadableUtils.utils.javaTokC_noMLS_onReader; import static loadableUtils.utils.tok_classHasModifier; import static loadableUtils.utils.prependSquareBracketed; import static loadableUtils.utils.dm_getStemByID; import static loadableUtils.utils.hashCodeFor; import static loadableUtils.utils.sortByConceptID; import static loadableUtils.utils.mechList_raw; import static loadableUtils.utils.serveFile; import static loadableUtils.utils.vm_busListenersByMessage_live; import static loadableUtils.utils.reflection_isForbiddenMethod; import static loadableUtils.utils.getFileSize; import static loadableUtils.utils.bufferedReader; import static loadableUtils.utils.shorten; import static loadableUtils.utils.replaceElementsUsingMap; import static loadableUtils.utils.vm_threadInterruptionReasonsMap; import static loadableUtils.utils.iceil; import static loadableUtils.utils.smallestTransparentGIFDataURI; import static loadableUtils.utils.uniquify; import static loadableUtils.utils.asString; import static loadableUtils.utils.jfindAll; import static loadableUtils.utils.vm_generalMap_put; import static loadableUtils.utils.hjs_imgUploadBase64Encoder; import static loadableUtils.utils.copyListPart; import static loadableUtils.utils.dm_isFirstSiblingModule; import static loadableUtils.utils.windowsLineBreaks; import static loadableUtils.utils.litmap; import static loadableUtils.utils.lookupAllOpt; import static loadableUtils.utils.weakSet; import static loadableUtils.utils.snippetImageLink; import static loadableUtils.utils.newSubList; import static loadableUtils.utils.safeUnstructMapAllowingClasses; import static loadableUtils.utils.minuteInDay; import static loadableUtils.utils.addMenuItem; import static loadableUtils.utils.longestPrefixInNavigableSet; import static loadableUtils.utils.touchConcept; import static loadableUtils.utils.getOptMC; import static loadableUtils.utils.getAndRemove; import static loadableUtils.utils.stringToStringListOpt; import static loadableUtils.utils.html_valueLessParam; import static loadableUtils.utils.mapToLines; import static loadableUtils.utils.htmlQuote; import static loadableUtils.utils.findBackRefsWithFieldNames; import static loadableUtils.utils._inCore; import static loadableUtils.utils.myClassLoader; import static loadableUtils.utils.dm_rst; import static loadableUtils.utils.findConceptsWhereCI; import static loadableUtils.utils.makeDependent; import static loadableUtils.utils.jfind_preprocess; import static loadableUtils.utils.loadFunctions_clearCache; import static loadableUtils.utils.stringIfTrue; import static loadableUtils.utils.dependentClasses; import static loadableUtils.utils.pathToJavaxJar_noResourceLoader; import static loadableUtils.utils.nohupJavax; import static loadableUtils.utils.localSnippetTitle; import static loadableUtils.utils.renderHowLongAgo; import static loadableUtils.utils.showFrame; import static loadableUtils.utils.hrefresh; import static loadableUtils.utils.sortByCalculatedFieldDesc_inPlace; import static loadableUtils.utils.fileContentsIs; import static loadableUtils.utils.listFilesNotDirs; import static loadableUtils.utils.fileInSameDir; import static loadableUtils.utils.synchronizedSet; import static loadableUtils.utils.countConceptsWhereIC; import static loadableUtils.utils.hsimpletableheader; import static loadableUtils.utils.beforeVerticalBar; import static loadableUtils.utils.hStylesheetSnippet_maxCache; import static loadableUtils.utils.identityHashSet; import static loadableUtils.utils.isStringOrIntOrLong; import static loadableUtils.utils.strOr; import static loadableUtils.utils.isIdentifier; import static loadableUtils.utils._handleError; import static loadableUtils.utils.getTimeZone; import static loadableUtils.utils.localDateWithMinutes; import static loadableUtils.utils._registerIOWrap; import static loadableUtils.utils.dropTrailingSlashIfNemptyAfterwards; import static loadableUtils.utils.parseHourAndOptionalMinutesToMinutes; import static loadableUtils.utils.findEndOfBracketPart2; import static loadableUtils.utils.emojiShortNameMap; import static loadableUtils.utils.stringOptPar; import static loadableUtils.utils.callF_thread; import static loadableUtils.utils.neq; import static loadableUtils.utils.subArray; import static loadableUtils.utils.all; import static loadableUtils.utils.parseHexChar; import static loadableUtils.utils.codeAnalysis_isSafeIdentifier; import static loadableUtils.utils.paramsPlus_inFront; import static loadableUtils.utils.inputText; import static loadableUtils.utils.hasLettersAllUpperCase; import static loadableUtils.utils.recommendedTranspilationDateForStandardFunctions; import static loadableUtils.utils.regexpMatcherIC; import static loadableUtils.utils.cset_trueIfChanged; import static loadableUtils.utils.jTextArea; import static loadableUtils.utils.mapPlus_noOverwrite; import static loadableUtils.utils.serve500; import static loadableUtils.utils.isLetterOrDigit; import static loadableUtils.utils.uniq; import static loadableUtils.utils.onEnterInAllTextFields; import static loadableUtils.utils.iteratorFromFunction_withEndMarker_f0; import static loadableUtils.utils.vstackWithSpacing; import static loadableUtils.utils.collect; import static loadableUtils.utils.scanForComponents; import static loadableUtils.utils.registerConcept; import static loadableUtils.utils.defaultJavaXTranslatorID; import static loadableUtils.utils.nullIfEmpty; import static loadableUtils.utils.isSafeStandardFunction; import static loadableUtils.utils.hotwire_libraryIDsFromJar; import static loadableUtils.utils.applyFunctionToValue; import static loadableUtils.utils.indent; import static loadableUtils.utils.tok_splitAtComma_unquote; import static loadableUtils.utils.infoBox; import static loadableUtils.utils.simpleDateFormat_timeZone; import static loadableUtils.utils.angleBracketVarsToStars; import static loadableUtils.utils.rect; import static loadableUtils.utils.derefRef; import static loadableUtils.utils.dbBotStandardName; import static loadableUtils.utils.tempCleaningUp; import static loadableUtils.utils.hjavascript_src_withType; import static loadableUtils.utils.joinNempties; import static loadableUtils.utils.html_emojisToUnicode; import static loadableUtils.utils.mkdirsFor; import static loadableUtils.utils.keySet; import static loadableUtils.utils.listFiles; import static loadableUtils.utils._run; import static loadableUtils.utils.indentStructureString; import static loadableUtils.utils.mapToSet; import static loadableUtils.utils.optCast; import static loadableUtils.utils.replacePlusWithSpace; import static loadableUtils.utils.loadBinaryPage; import static loadableUtils.utils.findEndOfBlock; import static loadableUtils.utils.tb_mainServer; import static loadableUtils.utils.any; import static loadableUtils.utils.disposeWindow; import static loadableUtils.utils.textFieldFromComboBox; import static loadableUtils.utils.litCIMap; import static loadableUtils.utils.proxyFromInvocationHandler; import static loadableUtils.utils.joinNemptiesWithColonSpace; import static loadableUtils.utils.dropHTMLTags; import static loadableUtils.utils.callMainBot; import static loadableUtils.utils.emptyIntArray; import static loadableUtils.utils.listAdd; import static loadableUtils.utils.reversed; import static loadableUtils.utils.stdcompare; import static loadableUtils.utils.moveToTopRightCorner; import static loadableUtils.utils.hjs_fileUploadBase64Encoder; import static loadableUtils.utils.eqGetOneOf; import static loadableUtils.utils.done2_always; import static loadableUtils.utils.paramsToOrderedMap; import static loadableUtils.utils.mapToObjectArray; import static loadableUtils.utils.isInstance; import static loadableUtils.utils.regexpReplace; import static loadableUtils.utils.dm_q; import static loadableUtils.utils.programFile; import static loadableUtils.utils.tempActivity; import static loadableUtils.utils.raf_findEndOfLine; import static loadableUtils.utils.setFrameContents; import static loadableUtils.utils.cloneIfList; import static loadableUtils.utils.dropFirstAndLast; import static loadableUtils.utils.gazelle_postMentionRegexp; import static loadableUtils.utils.lookupIgnoreCase; import static loadableUtils.utils.setInternalFrameContents; import static loadableUtils.utils.hrefBlank; import static loadableUtils.utils.dm_doEvery; import static loadableUtils.utils.tokPrepend_reTok; import static loadableUtils.utils.setOptAllDyn_pcall; import static loadableUtils.utils.removeFromMultiPort; import static loadableUtils.utils.onIndividualConceptChange_notOnAllChanged; import static loadableUtils.utils.jMinWidthAtLeast; import static loadableUtils.utils.isConceptClassIndexed; import static loadableUtils.utils.pcallOpt; import static loadableUtils.utils.nonNulls; import static loadableUtils.utils.hinputfield; import static loadableUtils.utils.asCIMultiSet; import static loadableUtils.utils.mapWithoutKey; import static loadableUtils.utils.cancelTo; import static loadableUtils.utils.md5OfFile; import static loadableUtils.utils.dm_getModule; import static loadableUtils.utils.parseDoubleArrowMapCI_tlft; import static loadableUtils.utils.ai_splitCamelCase; import static loadableUtils.utils.deleteConcept; import static loadableUtils.utils.replaceAngleBracketVars; import static loadableUtils.utils.loadBufferedImageFixingGIFs; import static loadableUtils.utils.litobjectarray; import static loadableUtils.utils.muricaCredentialsPlus; import static loadableUtils.utils.saveBinaryFileVerbose; import static loadableUtils.utils.getMainBot; import static loadableUtils.utils.shortenEndTime; import static loadableUtils.utils.standardLogFile; import static loadableUtils.utils.isCIMap; import static loadableUtils.utils.ipToCountry2020; import static loadableUtils.utils.showLoadingAnimation; import static loadableUtils.utils.aSecretGlobalID; import static loadableUtils.utils.flattenArray2; import static loadableUtils.utils.consoleInputFieldOrComboBox; import static loadableUtils.utils.strOrEmpty; import static loadableUtils.utils.dir2zip_recurse; import static loadableUtils.utils.curly; import static loadableUtils.utils.dropFirstLine; import static loadableUtils.utils.defaultNewFrameBounds; import static loadableUtils.utils.angleBracket; import static loadableUtils.utils.scoredSearch_prepare; import static loadableUtils.utils.nMessages; import static loadableUtils.utils.call; import static loadableUtils.utils.cnew; import static loadableUtils.utils.setMinus; import static loadableUtils.utils.serverMechList_raw_fresh; import static loadableUtils.utils.toCaseInsensitiveSet_treeSet; import static loadableUtils.utils.unzipSnippet; import static loadableUtils.utils.renderStructs; import static loadableUtils.utils.loadBufferedImage; import static loadableUtils.utils.reversedString; import static loadableUtils.utils.parseFirstInt; import static loadableUtils.utils.layoutManagerFromFunction; import static loadableUtils.utils.gzInputStream; import static loadableUtils.utils.getQueryFromURL; import static loadableUtils.utils.dm_enter; import static loadableUtils.utils.hotwire_finish; import static loadableUtils.utils.lockOrFail; import static loadableUtils.utils.uniqCI_returnIfNew; import static loadableUtils.utils.subCharSequence; import static loadableUtils.utils.toRunnable; import static loadableUtils.utils.digitsOnly; import static loadableUtils.utils.renameSubmitButton; import static loadableUtils.utils.indexOfSubList; import static loadableUtils.utils.trimValues; import static loadableUtils.utils.joinLines; import static loadableUtils.utils.run; import static loadableUtils.utils.allClasses; import static loadableUtils.utils.javaTokWithAllBrackets; import static loadableUtils.utils.hhmm; import static loadableUtils.utils.isInteger; import static loadableUtils.utils.getServerTranspiled; import static loadableUtils.utils.setFieldToIVF1Proxy; import static loadableUtils.utils.replaceExtension; import static loadableUtils.utils.dataToTable_makeRow; import static loadableUtils.utils.renderColonProperties; import static loadableUtils.utils.syncGet; import static loadableUtils.utils.failIfOddCount; import static loadableUtils.utils.indexConceptFieldDesc; import static loadableUtils.utils.cdelete; import static loadableUtils.utils.mapWithIndexStartingAt1; import static loadableUtils.utils.checkCondition; import static loadableUtils.utils.getInjectionID; import static loadableUtils.utils.getPossiblyInternalFrame; import static loadableUtils.utils.takeFirstOfByteArray; import static loadableUtils.utils.subBot_isHttps; import static loadableUtils.utils.ciMap; import static loadableUtils.utils.spaces; import static loadableUtils.utils.actualUserDir; import static loadableUtils.utils.sortedIgnoreCase; import static loadableUtils.utils.beautifyStructure; import static loadableUtils.utils.jrightAlignedLine; import static loadableUtils.utils.flexMatchIC_iterate; import static loadableUtils.utils.hjs_markRowMagic; import static loadableUtils.utils.synchroSet; import static loadableUtils.utils.muricaPassword; import static loadableUtils.utils.toRect; import static loadableUtils.utils.snippetLink; import static loadableUtils.utils.callJavaX; import static loadableUtils.utils.loadFunctions_cached; import static loadableUtils.utils.formatDoubleX; import static loadableUtils.utils.not; import static loadableUtils.utils.now; import static loadableUtils.utils.localTimeZone; import static loadableUtils.utils.smartTimerTask; import static loadableUtils.utils.p_vbar; import static loadableUtils.utils.setAdd; import static loadableUtils.utils.csetIfUnset; import static loadableUtils.utils.getProgramFile; import static loadableUtils.utils.hsubmit; import static loadableUtils.utils.lastTwo; import static loadableUtils.utils.actionListenerInNewThread; import static loadableUtils.utils.consoleInputField; import static loadableUtils.utils.unquoteCharacter; import static loadableUtils.utils.htmlencode_forParams; import static loadableUtils.utils.rawEmojisList; import static loadableUtils.utils.p_alignRight; import static loadableUtils.utils.eqicOneOf; import static loadableUtils.utils.maxLineCount; import static loadableUtils.utils.possibleMD5; import static loadableUtils.utils.htitle; import static loadableUtils.utils.intToHex; import static loadableUtils.utils.countWords; import static loadableUtils.utils.formatDate; import static loadableUtils.utils.lastException; import static loadableUtils.utils.splitAtSpace; import static loadableUtils.utils.getCanonicalFile; import static loadableUtils.utils.getComputerID_quick; import static loadableUtils.utils.htmlEncode2; import static loadableUtils.utils.isStringStartingWith; import static loadableUtils.utils.getAndClearList; import static loadableUtils.utils.pairsAWhereB; import static loadableUtils.utils.hcss_responstable; import static loadableUtils.utils.snippetRawURL; import static loadableUtils.utils.prependEmptyOptionForHSelect; import static loadableUtils.utils.loadTextFilePossiblyGZipped; import static loadableUtils.utils.showFormTitled2; import static loadableUtils.utils.setURLConnectionTimeouts; import static loadableUtils.utils.vm_getResourceLoader; import static loadableUtils.utils.hdiv; import static loadableUtils.utils.getSwingFontScale; import static loadableUtils.utils.match3_startOrEndOfLine; import static loadableUtils.utils.transpiledStandardFunctions_file; import static loadableUtils.utils.addPrefixIfNotEmpty2; import static loadableUtils.utils.dropLeadingSlash; import static loadableUtils.utils.substanceLookAndFeelEnabled; import static loadableUtils.utils.optPar; import static loadableUtils.utils.dropFirstTwoAndLastTwo; import static loadableUtils.utils.failIfUnlicensed; import static loadableUtils.utils.selectedItem; import static loadableUtils.utils.doPost; import static loadableUtils.utils.saveFileVerbose; import static loadableUtils.utils.keysSortedByValuesDesc; import static loadableUtils.utils.isNormalQuoted; import static loadableUtils.utils.fixTimestamp; import static loadableUtils.utils.addIfNempty; import static loadableUtils.utils.urlConnection_getInputStream; import static loadableUtils.utils.allToLong; import static loadableUtils.utils.parseFloat; import static loadableUtils.utils.allPlus; import static loadableUtils.utils.reverseOrder; import static loadableUtils.utils.loadingAnim; import static loadableUtils.utils.saveGZTextFile; import static loadableUtils.utils.fileExists; import static loadableUtils.utils.himgsrc; import static loadableUtils.utils.toLinesFullTrim_java; import static loadableUtils.utils.tok_statementToBlock; import static loadableUtils.utils.theAGIBlueDomain; import static loadableUtils.utils.javaxCachesDir; import static loadableUtils.utils.getAWTFrame; import static loadableUtils.utils.getClassNames; import static loadableUtils.utils.h1_title; import static loadableUtils.utils.iteratorFromFunction_f0_autoCloseable; import static loadableUtils.utils.singleObjectMethodProxy; import static loadableUtils.utils.javaTokC; import static loadableUtils.utils.toLower; import static loadableUtils.utils.onSelectedItem; import static loadableUtils.utils.newWeakReference; import static loadableUtils.utils.uniquifyAndSortAlphaNum; import static loadableUtils.utils.print_setPrefixForThread; import static loadableUtils.utils.hhtml_head_title_body; import static loadableUtils.utils.caseInsensitiveMultiMap; import static loadableUtils.utils.boolToInt; import static loadableUtils.utils.lowestByAlphaNum; import static loadableUtils.utils.sameSnippetID; import static loadableUtils.utils.recommendedTranspilationDateForStandardFunction; import static loadableUtils.utils.compareIC; import static loadableUtils.utils.callFAll; import static loadableUtils.utils.muricaCredentials; import static loadableUtils.utils.indexOfIgnoreCase; import static loadableUtils.utils.newButton; import static loadableUtils.utils.listZip; import static loadableUtils.utils.match3_withIntsAndIDs; import static loadableUtils.utils.getClass; import static loadableUtils.utils.objectWhere; import static loadableUtils.utils.isAbsolutePath; import static loadableUtils.utils.formatInt; import static loadableUtils.utils.findWhere; import static loadableUtils.utils.hotwire_copyOver; import static loadableUtils.utils.hbuttonOnClick; import static loadableUtils.utils.stream2string; import static loadableUtils.utils.urlWithoutQueryAndAnchor; import static loadableUtils.utils.assertVerbose; import static loadableUtils.utils.getOneLineFileInfoField; import static loadableUtils.utils.dm_moduleLibID; import static loadableUtils.utils.allToUpper; import static loadableUtils.utils.hhiddenWithIDAndName; import static loadableUtils.utils.raf_readFilePart; import static loadableUtils.utils.myLibraryFiles; import static loadableUtils.utils.neqOneOf; import static loadableUtils.utils.firstThat; import static loadableUtils.utils.caseInsensitiveMap; import static loadableUtils.utils.filterConcepts; import static loadableUtils.utils.dropTranslators; import static loadableUtils.utils.syncIdentityHashSet; import static loadableUtils.utils.getClassLoaderOrSame; import static loadableUtils.utils.dm_resolveModule; import static loadableUtils.utils.containsKey; import static loadableUtils.utils.dropHTMLComments; import static loadableUtils.utils.mechHashMap; import static loadableUtils.utils.tok_transpileIfQuoted_dollarVars; import static loadableUtils.utils.containsATextArea; import static loadableUtils.utils.vmBus_noObjections; import static loadableUtils.utils.vmGeneralMap_get; import static loadableUtils.utils.isSymLink; import static loadableUtils.utils.jsonEncode; import static loadableUtils.utils.regexpMatches; import static loadableUtils.utils.localSnippetsDir; import static loadableUtils.utils.regexpMatcher; import static loadableUtils.utils.call_checkArgs; import static loadableUtils.utils.replaceIfEquals; import static loadableUtils.utils.collectionMutex; import static loadableUtils.utils.mechList_opt_raw_fresh; import static loadableUtils.utils.confirmOKCancel; import static loadableUtils.utils.structureOrTextForUser; import static loadableUtils.utils.sortedByField; import static loadableUtils.utils.getRawType; import static loadableUtils.utils.containsNewLine; import static loadableUtils.utils.retireClassLoader; import static loadableUtils.utils.isGIF; import static loadableUtils.utils.getFrame; import static loadableUtils.utils.dm_evalInQ; import static loadableUtils.utils.jlabel; import static loadableUtils.utils.words2; import static loadableUtils.utils.joinNemptiesWithVBar; import static loadableUtils.utils.dm_fieldLiveValue; import static loadableUtils.utils.mapGet; import static loadableUtils.utils.parseSnippetID; import static loadableUtils.utils.veryQuickJava_finish; import static loadableUtils.utils.addInFront; import static loadableUtils.utils.splitAtComma; import static loadableUtils.utils.findAllFiles_noDirs; import static loadableUtils.utils.callAndMake; import static loadableUtils.utils.containsNulls; import static loadableUtils.utils.uniquifyList; import static loadableUtils.utils.htextinput; import static loadableUtils.utils.setAll; import static loadableUtils.utils.getPID; import static loadableUtils.utils.conceptFields; import static loadableUtils.utils.methodsBot2; import static loadableUtils.utils.litparams; import static loadableUtils.utils.lUtf8; import static loadableUtils.utils.runnableThread; import static loadableUtils.utils.toolTip; import static loadableUtils.utils.swic$; import static loadableUtils.utils.localMechListsDir; import static loadableUtils.utils.subBot_serveHTML; import static loadableUtils.utils.firstToUpper; import static loadableUtils.utils.mapComparator; import static loadableUtils.utils.standardCredentialsPass; import static loadableUtils.utils.indexOf_byteArray; import static loadableUtils.utils.compileRegexpIC; import static loadableUtils.utils.litcimap; import static loadableUtils.utils.rCallOnSelectedListItem; import static loadableUtils.utils.typeWriterFont; import static loadableUtils.utils.hotwireDependent; import static loadableUtils.utils.beginCriticalAction; import static loadableUtils.utils.programSecretFile; import static loadableUtils.utils.sendOpt; import static loadableUtils.utils.reverseList; import static loadableUtils.utils.disposeWindowAfter; import static loadableUtils.utils.tok_combineCurlyBrackets_keep; import static loadableUtils.utils.asList; import static loadableUtils.utils.setDynObjectValue; import static loadableUtils.utils.wrapAsActivity; import static loadableUtils.utils.saveTextFileUnlessExists; import static loadableUtils.utils.remoteMechListMirrorFile; import static loadableUtils.utils.concatLists_conservative; import static loadableUtils.utils.neatMechListURL; import static loadableUtils.utils.unicode_leftPointingTriangle; import static loadableUtils.utils.joinWithSemicolon; import static loadableUtils.utils.html_evaluateIfTags; import static loadableUtils.utils.parentFile; import static loadableUtils.utils.getServerTranspiledWithoutLibs; import static loadableUtils.utils.dropSuffixIC; import static loadableUtils.utils.hexToBytes; import static loadableUtils.utils.isProperlyQuoted; import static loadableUtils.utils.proxy; import static loadableUtils.utils.nuEmptyObject; import static loadableUtils.utils.showInTopRightCorner; import static loadableUtils.utils.cloneListSynchronizingOn; import static loadableUtils.utils.lambdaMap; import static loadableUtils.utils.padList; import static loadableUtils.utils.getType; import static loadableUtils.utils.mapPut_noOverwrite; import static loadableUtils.utils.endsWith; import static loadableUtils.utils.postPageSilently; import static loadableUtils.utils.ping_okInCleanUp; import static loadableUtils.utils.asLinkedHashMap; import static loadableUtils.utils.asHashMap; import static loadableUtils.utils.listSet; import static loadableUtils.utils.deleteDirectory; import static loadableUtils.utils.fileNempty; import static loadableUtils.utils.cancelTimers; import static loadableUtils.utils.hfulltag; import static loadableUtils.utils.splitAt; import static loadableUtils.utils.removeLast; import static loadableUtils.utils.allBackRefs; import static loadableUtils.utils.getInternalFrameTitlePaneComponent; import static loadableUtils.utils.vmBus_send; import static loadableUtils.utils.unparseCSSParameter; import static loadableUtils.utils.mergeSets; import static loadableUtils.utils.endMarker; import static loadableUtils.utils.copyFields; import static loadableUtils.utils.serveJSON; import static loadableUtils.utils.dm_getStem; import static loadableUtils.utils.set; import static loadableUtils.utils.iteratorFromFunction_withEndMarker; import static loadableUtils.utils.asCollection; import static loadableUtils.utils.appendSlash; import static loadableUtils.utils.hselect_list; import static loadableUtils.utils._registerThread; import static loadableUtils.utils.words; import static loadableUtils.utils.reTok; import static loadableUtils.utils.dm_rEnter; import static loadableUtils.utils.binarySearchForLineInTextFile; import static loadableUtils.utils.getInnerException; import static loadableUtils.utils.getTextTrim; import static loadableUtils.utils.javaDropComments; import static loadableUtils.utils.linesPreservingTrailingNewLine; import static loadableUtils.utils.loadLibraryOrSrcLib; import static loadableUtils.utils.sortedByFieldIC; import static loadableUtils.utils.dropAfterSlash; import static loadableUtils.utils.timeInTimeZone; import static loadableUtils.utils.listMinus; import static loadableUtils.utils.localMechList_opt_raw_fresh; import static loadableUtils.utils.dropAllTags; import static loadableUtils.utils.callOpt_getCache; import static loadableUtils.utils.phraseToRegExp; import static loadableUtils.utils.fieldNameForConceptLink; import static loadableUtils.utils.saveTranspiledCode; import static loadableUtils.utils.sfu; import static loadableUtils.utils.onlyNonNullParams; import static loadableUtils.utils.getAndClearThreadLocal; import static loadableUtils.utils.jsonDecode; import static loadableUtils.utils.multiMapToMap; import static loadableUtils.utils.jInternalFrame; import static loadableUtils.utils.addPair; import static loadableUtils.utils.getStackTrace; import static loadableUtils.utils.javax; import static loadableUtils.utils.countryDialCodes_rawNumbersTreeMultiMap; import static loadableUtils.utils.isQuoted; import static loadableUtils.utils.beforeColonOrAll; import static loadableUtils.utils.copyToClipboard; import static loadableUtils.utils.scorerWithSuccessesAndErrors; import static loadableUtils.utils.emptyCharArray; import static loadableUtils.utils.hhiddenMulti; import static loadableUtils.utils.fixACCInClassLoader; import static loadableUtils.utils.toK_str; import static loadableUtils.utils.isFalse; import static loadableUtils.utils.imageServerURL; import static loadableUtils.utils.eq; import static loadableUtils.utils.isLocalSnippetID; import static loadableUtils.utils.applyDefaultMargin; import static loadableUtils.utils.containsSpaces; import static loadableUtils.utils.conceptsWithFieldGreaterThan; import static loadableUtils.utils.parseDoubleLeftArrowMap; import static loadableUtils.utils.eitherIsA; import static loadableUtils.utils.isDigit; import static loadableUtils.utils.hinlinepostform; import static loadableUtils.utils.eitherIsB; import static loadableUtils.utils.dropSlashPrefix; import static loadableUtils.utils.dm_callOS; import static loadableUtils.utils.tok_splitAtComma; import static loadableUtils.utils.isDirectory; import static loadableUtils.utils.hform; import static loadableUtils.utils.loadTextFileFromZip; import static loadableUtils.utils.pnlToStringWithEmptyLines_rtrim; import static loadableUtils.utils.h1; import static loadableUtils.utils.h2; import static loadableUtils.utils.h3; import static loadableUtils.utils.snippetType_javaxModule; import static loadableUtils.utils.logQuoted; import static loadableUtils.utils.random; import static loadableUtils.utils.trimSubstring; import static loadableUtils.utils.newRandomAccessFile; import static loadableUtils.utils.listMinusSet; import static loadableUtils.utils.mapKeyAndFunction; import static loadableUtils.utils.md5OrNull; import static loadableUtils.utils.syncWeakHashMap; import static loadableUtils.utils.pcallFAll; import static loadableUtils.utils.hmp3upload; import static loadableUtils.utils.insertString; import static loadableUtils.utils.synchronizedMRUCache; import static loadableUtils.utils.startThread; import static loadableUtils.utils.asObjectArray; import static loadableUtils.utils.logQuotedWithDate; import static loadableUtils.utils.padLeft; import static loadableUtils.utils.snippetType_javaxSource; import static loadableUtils.utils.interruptThread; import static loadableUtils.utils.rcall_string; import static loadableUtils.utils.simpleSpaces_javaTok; import static loadableUtils.utils.getPreferredWidth; import static loadableUtils.utils.minInternalFrameWidth; import static loadableUtils.utils.getString; import static loadableUtils.utils.containsIgnoreCase; import static loadableUtils.utils.sendMailThroughScript; import static loadableUtils.utils.loadSnippetSilently; import static loadableUtils.utils.nlTok; import static loadableUtils.utils.vm_busListeners_live; import static loadableUtils.utils.paramsWithout; import static loadableUtils.utils.saveTextFileIfChanged; import static loadableUtils.utils.synchroHashMap; import static loadableUtils.utils.defaultBotName; import static loadableUtils.utils.dataSnippetLink; import static loadableUtils.utils.conceptsFile; import static loadableUtils.utils.toCaseInsensitiveSet; import static loadableUtils.utils.hotwireCore; import static loadableUtils.utils.returnOrThrow_either; import static loadableUtils.utils.urlencode; import static loadableUtils.utils.loadTextFileOrCreateWithRandomID; import static loadableUtils.utils.dropFrom; import static loadableUtils.utils.interceptPrintInThisThread; import static loadableUtils.utils.hr; import static loadableUtils.utils.dm_call; import static loadableUtils.utils.javaxCodeDir; import static loadableUtils.utils.systemHashCodeHex; import static loadableUtils.utils.hcrud_imagePreviewStyle; import static loadableUtils.utils.appendQueryToURL; import static loadableUtils.utils.findEndOfCurlyBracketPart; import static loadableUtils.utils.dm_moduleIDs; import static loadableUtils.utils.saveTiming_noPrint; import static loadableUtils.utils.listFilesWithSuffix; import static loadableUtils.utils.cloneSet; import static loadableUtils.utils.join; import static loadableUtils.utils.fsI; import static loadableUtils.utils.eqic_unnull; import static loadableUtils.utils.hcss_linkColorInherit; import static loadableUtils.utils.clamp; import static loadableUtils.utils.splitAtDoubleLeftArrow; import static loadableUtils.utils.binaryMimeType; import static loadableUtils.utils.hTitleClean; import static loadableUtils.utils.isSubstanceLAF; import static loadableUtils.utils.calcHeight; import static loadableUtils.utils.html_showLineFeedsForPRE; import static loadableUtils.utils.lower; import static loadableUtils.utils.getSecretProgramDir; import static loadableUtils.utils.loadTextFile_trim; import static loadableUtils.utils.safeUnstructure; import static loadableUtils.utils.moveFile; import static loadableUtils.utils.odd; import static loadableUtils.utils.stringTree2_javaTok; import static loadableUtils.utils.iterateListWithIndex; import static loadableUtils.utils.dm_getService; import static loadableUtils.utils.thisDollarOneFields; import static loadableUtils.utils.hpasswordfield; import static loadableUtils.utils.isInstanceOf; import static loadableUtils.utils.orEmptyQuotes; import static loadableUtils.utils.isMarkedAsSrcLib; import static loadableUtils.utils.standardTextFieldPopupMenu; import static loadableUtils.utils.componentsBoundingSize; import static loadableUtils.utils.lmap; import static loadableUtils.utils.cleanKill; import static loadableUtils.utils.loadDataSnippetToFile_noResourceLoader; import static loadableUtils.utils.htmlTagFullParamString; import static loadableUtils.utils.splitAtMinus; import static loadableUtils.utils.ahref_undecorated; import static loadableUtils.utils.javaTokForStructure; import static loadableUtils.utils.isCISet; import static loadableUtils.utils.parseDoubleArrowMapCI; import static loadableUtils.utils.setDefaultVMArgs; import static loadableUtils.utils.replaceDollarVars_dyn; import static loadableUtils.utils.persistableThrowable; import static loadableUtils.utils.renameFile_assertTrue; import static loadableUtils.utils.gazelle_textURL; import static loadableUtils.utils.containsSpace; import static loadableUtils.utils.itemPlus; import static loadableUtils.utils.creator; import static loadableUtils.utils.cloneKeys_noSync; import static loadableUtils.utils.timeInTimeZoneWithOptionalDate_24; import static loadableUtils.utils.hotwireSharingLibraries; import static loadableUtils.utils.hcheckboxWithText; import static loadableUtils.utils.change; import static loadableUtils.utils.vmBus_query; import static loadableUtils.utils.quoteIfNotIdentifierOrInteger; import static loadableUtils.utils.cloneAndClearList; import static loadableUtils.utils.assertEquals; import static loadableUtils.utils.joinMap; import static loadableUtils.utils.regionMatchesIC; import static loadableUtils.utils.isJAR; import static loadableUtils.utils.clearAllTokens; import static loadableUtils.utils.parseLongOpt_pcall; import static loadableUtils.utils.tlft; import static loadableUtils.utils.programTitle; import static loadableUtils.utils.tok_combineRoundOrCurlyBrackets_keep; import static loadableUtils.utils.toPath; import static loadableUtils.utils.dm_vmBus_onMessage; import static loadableUtils.utils.getPreferredSize; import static loadableUtils.utils.jTextAreaWithUndo; import static loadableUtils.utils.takeFirstOfIntArray; import static loadableUtils.utils.endsWithLetterOrDigit; import static loadableUtils.utils.dm_startQ; import static loadableUtils.utils.vm_generalMap_get; import static loadableUtils.utils.dropSpaces; import static loadableUtils.utils.ahref_js; import static loadableUtils.utils.newTypeWriterTextArea; import static loadableUtils.utils.ll; import static loadableUtils.utils.concatArrays; import static loadableUtils.utils.n2; import static loadableUtils.utils.mmo2_match; import static loadableUtils.utils.closeAutoCloseables; import static loadableUtils.utils.getLookAndFeel; import static loadableUtils.utils.appendNewLineIfNempty; import static loadableUtils.utils.allUnique; import static loadableUtils.utils.lines_rtrim; import static loadableUtils.utils.second; import static loadableUtils.utils.jCheckBoxMenuItem; import static loadableUtils.utils.parse3_cachedPattern; import static loadableUtils.utils.appendToFile; import static loadableUtils.utils.mc; import static loadableUtils.utils.rotateStringBuilder; import static loadableUtils.utils.replaceTokens; import static loadableUtils.utils.parseDoubleArrowMap; import static loadableUtils.utils.standardCredentialsMap; import static loadableUtils.utils.quoteUnlessIdentifierOrInteger; import static loadableUtils.utils.takeFirst; import static loadableUtils.utils.intToBytes; import static loadableUtils.utils.hparagraphs; import static loadableUtils.utils.isEditableComboBox; import static loadableUtils.utils.jrightalignedline; import static loadableUtils.utils.regexReplaceIC; import static loadableUtils.utils.hreplacetag; import static loadableUtils.utils.entrySet; import static loadableUtils.utils.actualUserHome; import static loadableUtils.utils.syncLambdaMap; import static loadableUtils.utils.javaTokWithAllPlusAngleBrackets; import static loadableUtils.utils.cleanJavaCompilerOutput; import static loadableUtils.utils.trimJoin; import static loadableUtils.utils.saveTextFileIfDifferent; import static loadableUtils.utils.jsonEncode_breakAtLevel1; import static loadableUtils.utils.codeTokensAsStringArray; import static loadableUtils.utils.containsDollarVars; import static loadableUtils.utils.hijackPrint; import static loadableUtils.utils.keys; import static loadableUtils.utils.enableWordWrapForTextArea; import static loadableUtils.utils.stringToChar; import static loadableUtils.utils.dropPrefix_trim; import static loadableUtils.utils.parse3_cachedInput; import static loadableUtils.utils.uniqCI2_sync; import static loadableUtils.utils.hresponstable; import static loadableUtils.utils.smartIndexOf; import static loadableUtils.utils.assertIdentifier; import static loadableUtils.utils.tokAppend_reTok; import static loadableUtils.utils.parseDouble; import static loadableUtils.utils.checkFileNotTooBigToRead; import static loadableUtils.utils.remoteMechListMirrorMetaFile; import static loadableUtils.utils._print; import static loadableUtils.utils.sleepQuietly; import static loadableUtils.utils.ok2; import static loadableUtils.utils.mapToValues; import static loadableUtils.utils.ol; import static loadableUtils.utils.htableRaw2; import static loadableUtils.utils.simpleSpaces; import static loadableUtils.utils.mechList_raw_fresh; import static loadableUtils.utils.toInt; import static loadableUtils.utils.allConceptFieldsAsMap; import static loadableUtils.utils.or; import static loadableUtils.utils.syncMRUCache; import static loadableUtils.utils.imageSnippetURLOrEmptyGIF; import static loadableUtils.utils.dropPunctuation; import static loadableUtils.utils.jCheckBox; import static loadableUtils.utils.rtrim; import static loadableUtils.utils.dropTagsAndHTMLComments; import static loadableUtils.utils.toMS_int; import static loadableUtils.utils.roundDownTo; import static loadableUtils.utils.jlabel_textAsHTML_center_ifNeeded; import static loadableUtils.utils.charDiff; import static loadableUtils.utils.vm_globalACC; import static loadableUtils.utils.hasConceptIC; import static loadableUtils.utils.guessMimeTypeFromFileName; import static loadableUtils.utils.systemLoad; import static loadableUtils.utils.swingConstruct; import static loadableUtils.utils.isAllowed; import static loadableUtils.utils.mapPlus_inFront; import static loadableUtils.utils.handleEscapeKey; import static loadableUtils.utils.dm_modulesWithLibID; import static loadableUtils.utils.treeMultiMap; import static loadableUtils.utils.getSnippetTitle_safe; import static loadableUtils.utils.upper; import static loadableUtils.utils.jPreferWidth; import static loadableUtils.utils.neqic; import static loadableUtils.utils.infoMessage_makePanel; import static loadableUtils.utils.setDefaultClassFinder; import static loadableUtils.utils.doEvery; import static loadableUtils.utils.countLines; import static loadableUtils.utils.fastIntern; import static loadableUtils.utils.iterator; import static loadableUtils.utils.isSlowMachine; import static loadableUtils.utils.putMultipleKeys; import static loadableUtils.utils.collectInstances; import static loadableUtils.utils.hasConceptWhereIC; import static loadableUtils.utils.getOrKeep; import static loadableUtils.utils.assertNotNull; import static loadableUtils.utils.hhtml_title_body; import static loadableUtils.utils.isAWTThread; import static loadableUtils.utils.filterParams; import static loadableUtils.utils.parseBusinessHours; import static loadableUtils.utils.filterChars; import static loadableUtils.utils.currentThread; import static loadableUtils.utils.directoryEmpty; import static loadableUtils.utils.regexpContainsIC; import static loadableUtils.utils.neqGet; import static loadableUtils.utils.tok_combineRoundBrackets_keep; import static loadableUtils.utils.transformKeys; import static loadableUtils.utils.emojisToUnicode; import static loadableUtils.utils.similarEmptyList; import static loadableUtils.utils.himageupload; import static loadableUtils.utils.jtextfield; import static loadableUtils.utils.transpileRaw; import static loadableUtils.utils.str; import static loadableUtils.utils.standardCredentials; import static loadableUtils.utils.systemCPULoad; import static loadableUtils.utils.setOptAll_pcall; import static loadableUtils.utils.tempInterceptPrint; import static loadableUtils.utils.ol_htmlEncode; import static loadableUtils.utils.westAndCenter; import static loadableUtils.utils.hstylesheetsrc; import static loadableUtils.utils.changeParam; import static loadableUtils.utils.singular; import static loadableUtils.utils.loadBinarySnippet; import static loadableUtils.utils.concurrentlyIterateValues; import static loadableUtils.utils._initFrame; import static loadableUtils.utils.fixNewLines; import static loadableUtils.utils.addToMultiPort; import static loadableUtils.utils.printWithIndent; import static loadableUtils.utils.beforeDelegatingToThread; import static loadableUtils.utils.hfullcenter; import static loadableUtils.utils.syncAddOrCreate; import static loadableUtils.utils.unicode_undoArrow; import static loadableUtils.utils.strictPutIC; import static loadableUtils.utils.tokPrepend; import static loadableUtils.utils.appendRoundBracketed; import static loadableUtils.utils.dm_listModuleIDs; import static loadableUtils.utils.syncPut; import static loadableUtils.utils.hideCredentials; import static loadableUtils.utils.getMainClass; import static loadableUtils.utils.intRange; import static loadableUtils.utils.intern; import static loadableUtils.utils.asCISet; import static loadableUtils.utils.internalFrameDefaultPosition; import static loadableUtils.utils.numberOfMethodArguments; import static loadableUtils.utils.himg; import static loadableUtils.utils.td; import static loadableUtils.utils.splitAtDoubleArrow; import static loadableUtils.utils.syncMapPut2_createLinkedHashMap; import static loadableUtils.utils.splitAtAmpersand; import static loadableUtils.utils.splitByJavaToken; import static loadableUtils.utils.th; import static loadableUtils.utils.syncMapToPairs; import static loadableUtils.utils.hjssnippet_maxCache; import static loadableUtils.utils.isSubclass; import static loadableUtils.utils.dm_ownTimer; import static loadableUtils.utils.arrayOfSameType; import static loadableUtils.utils.tr; import static loadableUtils.utils.tt; import static loadableUtils.utils.flexMatchAngleBracketVarsIC_iterate; import static loadableUtils.utils.methodsStartingWith; import static loadableUtils.utils.dm_moduleID; import static loadableUtils.utils.checkConceptFieldsIC; import static loadableUtils.utils.backupConceptsNow; import static loadableUtils.utils.hquery; import static loadableUtils.utils.faviconMimeType; import static loadableUtils.utils.navigableMultiSetMapValuesIterator; import static loadableUtils.utils.boolPar; import static loadableUtils.utils.doublePut; import static loadableUtils.utils.squareBracketIfNempty; import static loadableUtils.utils.parseBigInt; import static loadableUtils.utils.jscroll; import static loadableUtils.utils.readLineHidden; import static loadableUtils.utils.putUnlessZero; import static loadableUtils.utils.conceptIDOrNull; import static loadableUtils.utils.ul; import static loadableUtils.utils.trimLoadTextFile; import static loadableUtils.utils.print_append; import static loadableUtils.utils.programDir; import static loadableUtils.utils.hlabelFor; import static loadableUtils.utils.print_byThread_dontCreate; import static loadableUtils.utils.elapsedSeconds_timestamp; import static loadableUtils.utils.showForm_makeComponents; import static loadableUtils.utils.centerInternalFrame; import static loadableUtils.utils.isSafeCodeFragment; import static loadableUtils.utils.fieldComparator; import static loadableUtils.utils.javaTokC_noMLS_iterator; import static loadableUtils.utils.isChecked; import static loadableUtils.utils.or2; import static loadableUtils.utils.mapPairsToLines; import static loadableUtils.utils.imageIO_readURL; import static loadableUtils.utils.innerCleanUp; import static loadableUtils.utils.jPopDownButton; import static loadableUtils.utils.mmo2_levenWithSwapsScore; import static loadableUtils.utils.similarEmptyMap; import static loadableUtils.utils.asRunnable; import static loadableUtils.utils.toFile; import static loadableUtils.utils.consoleSetInput; import static loadableUtils.utils._get; import static loadableUtils.utils.div_alignRight; import static loadableUtils.utils.gazelle_allSyntacticPatternsFromInput; import static loadableUtils.utils.drop; import static loadableUtils.utils.applyTranspilationFunction; import static loadableUtils.utils.snippetType_JavaXDesktop; import static loadableUtils.utils.mkdirsForFile; import static loadableUtils.utils.runnableToVF1; import static loadableUtils.utils.gazelle_navLinks; import static loadableUtils.utils.eqGet; import static loadableUtils.utils.getConceptFieldCIIndex; import static loadableUtils.utils.newFile; import static loadableUtils.utils.standardTitlePopupMenu; import static loadableUtils.utils.getSnippetTitle_cached; import static loadableUtils.utils.javaTokWithBrackets; import static loadableUtils.utils.navigableKeys; import static loadableUtils.utils.ul_htmlEncode; import static loadableUtils.utils.formatCSVFileForExcel2; import static loadableUtils.utils.indexSingletonConcept; import static loadableUtils.utils.synchroList; import static loadableUtils.utils.serveInputStream; import static loadableUtils.utils.componentToJComponent; import static loadableUtils.utils.formatDoubleArrowPairs_horizontallyAligned; import static loadableUtils.utils.subBot_serveFile_maxCache; import static loadableUtils.utils.alphaNumComparator; import static loadableUtils.utils.matcherInt; import static loadableUtils.utils.tempDisposeWindow; import static loadableUtils.utils.checkFields; import static loadableUtils.utils.loadFunctions; import static loadableUtils.utils.localDayOfMonth; import static loadableUtils.utils.quoteOr; import static loadableUtils.utils.listFilesOnly; import static loadableUtils.utils.eqic; import static loadableUtils.utils.readLine; import static loadableUtils.utils.hpre_htmlencode; import static loadableUtils.utils.unicode_newLineArrow; import static loadableUtils.utils.if0ToF0; import static loadableUtils.utils.pairA; import static loadableUtils.utils.autoVMExit; import static loadableUtils.utils.jreplace_dyn; import static loadableUtils.utils.consoleClearInput; import static loadableUtils.utils.indexOfIC; import static loadableUtils.utils.compareIgnoreCase_jdk; import static loadableUtils.utils.parseIntOpt; import static loadableUtils.utils.javaTok_noMLS; import static loadableUtils.utils.dollarVarsToStars; import static loadableUtils.utils._handleException; import static loadableUtils.utils.dropFirst; import static loadableUtils.utils.longSnippetLink; import static loadableUtils.utils.pairB; import static loadableUtils.utils.conceptsFileName; import static loadableUtils.utils.waitForVarToBeNotNull; import static loadableUtils.utils.htitledSectionWithDiv; import static loadableUtils.utils.addAllComponents; import static loadableUtils.utils.javaTok_substringC; import static loadableUtils.utils.hscript_clickableRows; import static loadableUtils.utils.tok_allIdentifiers; import static loadableUtils.utils.javaTok_substringN; import static loadableUtils.utils.newFileInputStream; import static loadableUtils.utils.urldecode; import static loadableUtils.utils.hinput; import static loadableUtils.utils.sortedAlphaNum; import static loadableUtils.utils.isLocalSnippet; import static loadableUtils.utils.nConcepts; import static loadableUtils.utils.href; import static loadableUtils.utils.makeAccessible; import static loadableUtils.utils.getStackTrace2; import static loadableUtils.utils.dropPrefix; import static loadableUtils.utils.mechMapCI; import static loadableUtils.utils.defaultMetaTransformer; import static loadableUtils.utils.scanConceptForRefsWithFieldNames; import static loadableUtils.utils.imageServerLink; import static loadableUtils.utils.deAngleBracket; import static loadableUtils.utils.subByteArray; import static loadableUtils.utils.readerToString; import static loadableUtils.utils._registerDangerousWeakMap; import static loadableUtils.utils.loadBeginningOfBinaryFile; import static loadableUtils.utils.hotwire_classesToShare; import static loadableUtils.utils.mapPairsB; import static loadableUtils.utils.addSuffix; import static loadableUtils.utils.utf8; import static loadableUtils.utils.dummyMainClassName; import static loadableUtils.utils.parseList; import static loadableUtils.utils.hopeningtag; import static loadableUtils.utils.parse3; import static loadableUtils.utils.emptyMap; import static loadableUtils.utils.jrigid; import static loadableUtils.utils.toLines; import static loadableUtils.utils.primitiveToBoxedTypeOpt; import static loadableUtils.utils.sysTime; import static loadableUtils.utils.parseStdFunctionsList; import static loadableUtils.utils.tok_integersInOrder; import static loadableUtils.utils.getClientIPFromHeaders; import static loadableUtils.utils.popFirst; import static loadableUtils.utils.allToString; import static loadableUtils.utils.newObjectArrayOfSameType; import static loadableUtils.utils.utf8bufferedReader; import static loadableUtils.utils.restart; import static loadableUtils.utils.smartIndexOfSpaceEtc; import static loadableUtils.utils.secondOfPairs; import static loadableUtils.utils.unicode_crossProduct; import static loadableUtils.utils.rcurry; import static loadableUtils.utils.preciseCall; import static loadableUtils.utils.onlyKeys; import static loadableUtils.utils.countryDialCodeByCountryCode; import static loadableUtils.utils.maxStringLength; import static loadableUtils.utils.isAbstract; import static loadableUtils.utils.fraction; import static loadableUtils.utils.filter; import static loadableUtils.utils.getWeakRef; import static loadableUtils.utils.ensureConceptClassIsIndexed; import static loadableUtils.utils.doLater; import static loadableUtils.utils.ensureDBNotRunning; import static loadableUtils.utils.syncEmpty; import static loadableUtils.utils.messageBox; import static loadableUtils.utils.findStaticMethod; import static loadableUtils.utils.actualProgramID; import static loadableUtils.utils.sortByCalculatedField; import static loadableUtils.utils.findBackRefs; import static loadableUtils.utils.keysWithoutHidden; import static loadableUtils.utils.isGeneralFileServerSnippet; import static loadableUtils.utils.nempties; import static loadableUtils.utils.unwrapTrivialExceptionWraps; import static loadableUtils.utils.sortedAlphanumIC; import static loadableUtils.utils.temp_printPrefix; import static loadableUtils.utils.componentPopupMenuItem; import static loadableUtils.utils.showForm_makeInternalFrame; import static loadableUtils.utils.htmlEncode_nlToBR; import static loadableUtils.utils.nfilter; import static loadableUtils.utils.imageSnippetCacheFile; import static loadableUtils.utils.callOpt_noArgs; import static loadableUtils.utils.allSpreads; import static loadableUtils.utils.mmo2_matchWithTypos; import static loadableUtils.utils.tok_findEndOfStatement; import static loadableUtils.utils.addToContainer; import static loadableUtils.utils.multiMapPut; import static loadableUtils.utils.stringTreeLeafValue2; import static loadableUtils.utils.cloneList_noSync; import static loadableUtils.utils.tok_javaDropCommentsFromWhitespace; import static loadableUtils.utils.tag; import static loadableUtils.utils.customLayoutPanel; import static loadableUtils.utils.syncL; import static loadableUtils.utils.safeUnstructureMap; import static loadableUtils.utils.syncClear; import static loadableUtils.utils.htextarea; import static loadableUtils.utils.hhead; import static loadableUtils.utils.hashOfLong; import static loadableUtils.utils.splitCamelCase; import static loadableUtils.utils.toLong; import static loadableUtils.utils.betterCIComparator; import static loadableUtils.utils.copyFileToClipboard; import static loadableUtils.utils.localTimeWithSeconds; import static loadableUtils.utils.indexRandomConceptField; import static loadableUtils.utils.hotwireSharingLibraries_silently; import static loadableUtils.utils.htmlEncode_nlToBr; import static loadableUtils.utils.mapNonNulls; import static loadableUtils.utils.hjs_selectize; import static loadableUtils.utils.concatLists; import static loadableUtils.utils.fileSize; import static loadableUtils.utils.mapToParams; import static loadableUtils.utils.invokeMethod; import static loadableUtils.utils.isInQ; import static loadableUtils.utils.countTokens; import static loadableUtils.utils.h3_htitle; import static loadableUtils.utils.isMainProgram; import static loadableUtils.utils.defaultRandomGenerator; import static loadableUtils.utils.downloadLock; import static loadableUtils.utils.printConceptIndices; import static loadableUtils.utils.mapToMultiMap; import static loadableUtils.utils.unicode_smallDownPointingTriangle; import static loadableUtils.utils.methodIsStatic; import static loadableUtils.utils.renderVars; import static loadableUtils.utils.ahref_possiblyTargetBlank; import static loadableUtils.utils.sysNow; import static loadableUtils.utils.imageIcon; import static loadableUtils.utils.countConcepts; import static loadableUtils.utils.hPopDownButtonWithText; import static loadableUtils.utils.dropPrefixTrim; import static loadableUtils.utils.elapsedSeconds; import static loadableUtils.utils.hmsWithColons; import static loadableUtils.utils.consoleFont; import static loadableUtils.utils.printStructs; import static loadableUtils.utils.getAll; import static loadableUtils.utils.componentID; import static loadableUtils.utils.params_stylePlus; import static loadableUtils.utils.fixOuterRefs; import static loadableUtils.utils.timestampFromYMDH; import static loadableUtils.utils.onEnterIfTextField; import static loadableUtils.utils.caseInsensitiveSet_treeSet; import static loadableUtils.utils.heldInstance; import static loadableUtils.utils.firstJavaToken; import static loadableUtils.utils.fromUTF8; import static loadableUtils.utils.classForName; import static loadableUtils.utils.hjavascript_src_snippet; import static loadableUtils.utils.makeBold; import static loadableUtils.utils.tok_packageName; import static loadableUtils.utils.countWordsWithoutAngleBracketedAndStars; import static loadableUtils.utils.userDir; import static loadableUtils.utils.hjavascript; import static loadableUtils.utils.isClosingBracket; import static loadableUtils.utils.startsWith; import loadableUtils.utils.VF2; import loadableUtils.utils.MultiSetMap; import loadableUtils.utils.Var; import loadableUtils.utils.JavaXHyperlinker; import loadableUtils.utils.Visitable; import loadableUtils.utils.DefunctClassLoader; import loadableUtils.utils.Scorer; import loadableUtils.utils.ITokCondition; import loadableUtils.utils.TokCondition; import loadableUtils.utils.ConceptsRefChecker; import loadableUtils.utils.RightAlignedLine; import loadableUtils.utils.SimpleLiveValue; import loadableUtils.utils.CancelToCancelPoint; import loadableUtils.utils.ConceptFieldIndexDesc; import loadableUtils.utils.ReliableSingleThread; import loadableUtils.utils.FixedRateTimer; import loadableUtils.utils.IWebRequest; import loadableUtils.utils.ConceptFieldIndex; import loadableUtils.utils.AbstractLayoutManager; import loadableUtils.utils.IterableIterator; import loadableUtils.utils.F2; import loadableUtils.utils.RandomAccessAbstractList; import loadableUtils.utils.Flag; import loadableUtils.utils.ContentsIndexedList; import loadableUtils.utils.FileTransferable; import loadableUtils.utils.Not; import loadableUtils.utils.IHasGlobalID; import loadableUtils.utils.StringBufferWithMaxSize; import loadableUtils.utils.CloseableIterableIterator; import loadableUtils.utils.ExpiringMap2; import loadableUtils.utils.IContentsIndexedList2; import loadableUtils.utils.IFieldsToList; import loadableUtils.utils.IF2; import loadableUtils.utils.ConceptFieldIndexCI; import loadableUtils.utils.Producer; import loadableUtils.utils.DynNewBot2; import loadableUtils.utils.And; import loadableUtils.utils.IVar; import loadableUtils.utils.MechMode; import loadableUtils.utils.DynPrintLogAndEnabled; import loadableUtils.utils.Cache; import loadableUtils.utils._MethodCache; import loadableUtils.utils.DynGazelleRocks; import loadableUtils.utils.Chain; import loadableUtils.utils.CountryDialCode; import loadableUtils.utils.ConceptWithGlobalID; import loadableUtils.utils.MechListDependentCache; import loadableUtils.utils.LiveValue; import loadableUtils.utils.IContentsIndexedList; import loadableUtils.utils.ParameterizedTypeImpl; import loadableUtils.utils.Dyn_FieldWatcher; import loadableUtils.utils.Timestamp; import loadableUtils.utils.LetterLayout; import loadableUtils.utils.MultiMap; import loadableUtils.utils.HTMLTabs; import loadableUtils.utils.QuickException; import loadableUtils.utils.LongRange; import loadableUtils.utils.Lowest; import loadableUtils.utils.SnippetTitles; import loadableUtils.utils.JavaScript; import loadableUtils.utils._PrintIndent; import loadableUtils.utils.IResourceLoader; import loadableUtils.utils.BreadthFirstPathFinder_withLinkType; import loadableUtils.utils.Either; import loadableUtils.utils.ReliableSingleThread_Multi; import loadableUtils.utils.Steppable; import loadableUtils.utils.proxy_InvocationHandler; import loadableUtils.utils.MMOPattern; import loadableUtils.utils.MetaTransformer; import loadableUtils.utils.ScoredSearcher; import loadableUtils.utils.CompilerBot; import loadableUtils.utils.Pair; import loadableUtils.utils.HTMLFramer1; import loadableUtils.utils.JavaXClassLoader; import loadableUtils.utils.StringTree2; import loadableUtils.utils.DialogIO; import loadableUtils.utils.IntRange; import loadableUtils.utils.JavaXClassLoaderWithParent; import loadableUtils.utils.Transformable; import loadableUtils.utils.CancelPoint; import loadableUtils.utils.MRUCache; import loadableUtils.utils.TransferableImage; import loadableUtils.utils.FieldIndicator; import loadableUtils.utils.JavaXClassLoaderWithParent2; import loadableUtils.utils.InternationalPhoneValidator; import loadableUtils.utils.AlphanumComparator; import loadableUtils.utils.ReverseChain; import loadableUtils.utils.Scored; import loadableUtils.utils.HasIndex; import loadableUtils.utils.User; import loadableUtils.utils.UserPost; import static loadableUtils.utils.botMod; class main { static public String programID; static public void _onLoad_initUtils() { utils.__javax = javax(); } static public void _onLoad_defaultClassFinder() { setDefaultClassFinder(new F1() { public Class get(String name) { Class c = findClass_fullName(name); if (c != null) return c; if (name.startsWith("main$")) return loadableUtils.utils.findClass_fullName("loadableUtils.utils" + name.substring(4)); return null; } }); } static public ThreadLocal dynamicObjectIsLoading_threadLocal() { return DynamicObject_loading; } static public class BEACalculations { public GazelleBEA mod; public BEACalculations(GazelleBEA mod) { this.mod = mod; } transient public int liveOutputDelay = 1000; transient public double algoTimeout = 30.0; public void reactAllInputsWithSomePatterns() { for (BEAObject input : mod.beaObjectsOfType("input")) { ReactInputWithSomePatterns r = new ReactInputWithSomePatterns(); r.input = input; r.ccOut = db_mainConcepts(); r.max = 10; r.start(); stepAllWithTimeout(10.0, r); } } public class ReactInputWithSomePatterns implements Steppable { public BEAObject input; public Concepts ccOut; public int max = 3, n; public Iterator patterns; public void start() { n = countConceptsWhereIC(ccOut, BEAObject.class, "input", input, "type", "match"); patterns = iterator(sortByConceptID(conceptsWhereIC(BEAObject.class, "type", "Pattern"))); } public boolean step() { if (n >= max) return false; if (!patterns.hasNext()) return false; if (reactInputWithPattern(input, patterns.next(), ccOut) != null) ++n; return true; } } public Map matchInputWithPattern(BEAObject input, BEAObject pattern) { String text = getString("text", input); return matchInputWithPattern(text, pattern); } public Map matchInputWithPattern(String text, BEAObject pattern) { String pat = getString("text", pattern); boolean punctuationOnly = isTrue_getOpt("punctuationOnly", pattern); if (pattern.typeIs("Syntactic Pattern")) return matchInputWithSyntacticPattern(text, pat, punctuationOnly); else if (eqic_gen(getOpt("subType", pattern), "PhraseCache")) return phraseCache(pat, text) ? litmap() : null; else return matchInputWithPattern(text, pat, punctuationOnly); } public Map matchInputWithSyntacticPattern(String text, String pat) { return matchInputWithSyntacticPattern(text, pat, false); } public Map matchInputWithSyntacticPattern(String text, String pat, boolean punctuationOnly) { pat = starsToAngleBracketedNumbers(pat); return matchInputWithPattern(text, pat, punctuationOnly); } public Map matchInputWithPattern(String text, String pat) { return matchInputWithPattern(text, pat, false); } public Map matchInputWithPattern(String text, String pat, boolean punctuationOnly) { Map mapping = flexMatchAngleBracketVarsIC_honorPunctuation_first(pat, text); if (mapping != null || punctuationOnly) return mapping; return flexMatchAngleBracketVarsIC_first(pat, text); } public BEAObject reactInputWithPattern(BEAObject input, BEAObject pattern) { return reactInputWithPattern(input, pattern, db_mainConcepts()); } public BEAObject reactInputWithPattern(BEAObject input, BEAObject pattern, Concepts ccOut) { if (input == null || pattern == null) return null; Map mapping = matchInputWithPattern(input, pattern); if (mapping == null) return null; return cnew(ccOut, BEAObject.class, "type", "Match", "input", input, "pattern", pattern, "mapping", mapping); } public Object serveAnalyzeInput(GazelleBEA.Req req) { Concepts ccOut = new Concepts(); BEAObject input = getConcept(BEAObject.class, parseLong(req.get("id"))); if (input == null) input = cnew(ccOut, BEAObject.class, "type", "Input", "text", req.get("q")); String text = getString("text", input); ReactInputWithSomePatterns r = new ReactInputWithSomePatterns(); r.input = input; r.ccOut = ccOut; r.max = 1000; r.start(); stepAllWithTimeout(10.0, r); List matches = conceptsWhereIC(ccOut, BEAObject.class, "type", "Match"); return h1_title("Analyze Input") + p("Input: " + b(htmlEncode(text))) + p(empty(matches) ? "No matches" : "Matches") + ul_htmlEncode(matches); } public Object serveQueryPage(GazelleBEA.Req req) { String q = req.get("q"), algorithm = req.get("algorithm"); boolean dontRun = eq(req.get("dontRun"), "1"); boolean liveOutput = eq(req.get("liveOutput"), "1"); if (liveOutput) req.noSpam(); if (eqic(algorithm, "process input")) algorithm = "Process new input v3"; Map> algorithms = litorderedmap("Process new input v3", (IF0) () -> new ProcessNewInput_v3(), "Process new input v2", (IF0) () -> new ProcessNewInput_v2(), "Process new input", (IF0) () -> new ProcessNewInput(), "Run pattern", (IF0) () -> new RunPattern(), "Find rewrites for match", (IF0) () -> new FindRewrites(), "Reverse input (test algorithm)", (IF0) () -> new ReverseInput(), "Timeout test", (IF0) () -> new TimeoutTest(), "Syntactic pattern from input", (IF0) () -> new SyntacticPatternFromInput(), "Apply all text functions", (IF0) () -> new ApplyTextFunctions(), "Find Path", (IF0) () -> new FindPath(), "Execute text query", (IF0) () -> new ExecuteTextQuery(), "Make syntactic patterns for all patterns in DB", (IF0) () -> new MakeSyntacticPatterns()); String output = empty(algorithm) || dontRun ? null : doAlgorithm(algorithms, algorithm, q, liveOutput); if (liveOutput) return jsonEncode(litorderedmap("answer", output)); String right = mod.html_loggedIn(); String centered = htitle_h2(ahref(mod.baseLink + "/", "Gazelle BEA") + " Query") + hscript(replaceVars("\n var sugLoading = false, sugTriggerAgain = false;\n\n function sugTrigger() {\n console.log(\"sugTrigger\");\n if (sugLoading) { sugTriggerAgain = true; return; }\n\n // get form data as JSON\n \n var data = {\n \"liveOutput\" : \"1\",\n \"q\": $(\"textarea[name=q]\").val(),\n \"algorithm\": $(\"select[name=algorithm]\").val()\n };\n \n const url = \"/query\";\n console.log(\"Loading \" + url + \" with \" + data);\n sugLoading = true;\n $.post(url, data,\n function(result) {\n console.log(\"Suggestor result: \" + result);\n const answer = !result ? \"\" : JSON.parse(result).answer;\n if (answer) {\n $(\"#liveResult .sectionContents\").html(answer);\n $(\"#liveResult\").show();\n } else\n $(\"#liveResult\").hide();\n //$(\"#suggestorResult\").html(answer ? \"Suggestor says: \" + answer : \"\");\n }\n ).always(function() {\n console.log(\"sug loading done\");\n setTimeout(function() {\n sugLoading = false;\n if (sugTriggerAgain) { sugTriggerAgain = false; sugTrigger(); }\n }, liveOutputDelay);\n });\n }\n\n $(document).ready(function() {\n $(\"textarea[name=q], input[name=q], select[name=algorithm]\").on('input propertychange change', sugTrigger);\n sugTrigger();\n });\n ", "liveOutputDelay", liveOutputDelay)) + hform(p("Query (Ctrl+Enter): " + htextarea(q, "id", "mainInput", "name", "q", "class", "auto-expand", "style", "max-height: 10em; width: 300px; vertical-align: top", "onkeydown", "\n if ((event.keyCode == 10 || event.keyCode == 13) && event.ctrlKey) $(this).closest('form').submit();\n ") + hjs("$(document).ready(function() {\n autoExpandTextArea(document.getElementById(\"mainInput\"));\n });") + "   Algorithm: " + hselect_list(keys(algorithms), algorithm, "name", "algorithm") + "   " + hbutton("Go"))); return hhtml(hhead(hmobilefix() + hsansserif() + loadJQuery2() + hjs_autoExpandingTextAreas() + mod.webSocketHeadStuff(req) + hNotificationPopups()) + hbody(div_alignRight(right) + div_center(centered) + htitledSectionWithDiv("Live Result", "", "id", "liveResult", "style", "display: none", "innerDivStyle", "max-height: 150px; overflow: auto") + (output == null ? "" : h3(algorithm) + output))); } public String doAlgorithm(Map> algorithms, String algorithm, String q, boolean liveMode) { GazelleBEA.Req req = mod.currentReq.get(); StringBufferWithMaxSize out = new StringBufferWithMaxSize(1000000); IF0 algo = lookupPossiblyCI(algorithms, algorithm); if (algo == null) out.append("Algorithm not found: " + algorithm); else { if (isB(evalWithTimeout(algoTimeout, new Runnable() { public void run() { try { AutoCloseable __8 = mod.enter(); try { AutoCloseable __9 = tempSetTL(mod.currentReq, req); try { Algorithm alg = algo.get(); alg.liveMode = liveMode; alg.q = q; alg.out = out; alg.runIt(); } finally { _close(__9); } } finally { _close(__8); } } catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "temp mod.enter();\n temp tempSetTL(mod.currentReq, req);\n Algori..."; } }))) out.append("\n[algorithm timeout]"); } return str(out); } abstract public class Algorithm implements Runnable { public String q; public Appendable out; public boolean liveMode = false; public Concepts localConcepts; public List nonMatches; public void runLiveMode() { } public void appendHTML(String html) { appendHTML(this.out, html); } public void appendHTML(Appendable out, String html) { try { if (empty(html)) return; html = wrapInDiv(html, "style", "margin-top: 0.5em"); out.append(html).append("\n"); } catch (Exception __e) { throw rethrow(__e); } } public void appendText(String text) { appendText(this.out, text); } public void appendText(Appendable out, String text) { try { if (empty(text)) return; out.append(hpre_htmlencode(rtrim(text))); } catch (Exception __e) { throw rethrow(__e); } } public void appendTextBold(String text) { appendTextBold(this.out, text); } public void appendTextBold(Appendable out, String text) { try { if (empty(text)) return; out.append(b(hpre_htmlencode(rtrim(text)))); } catch (Exception __e) { throw rethrow(__e); } } public void allowSuggestingAnswer(BEAObject input) { if (input == null) return; String text = input.text(); String url = mod.baseLink + "/saveAnswer"; appendHTML(hpostform("Suggest an answer to " + htmlEncode_quote(text) + ": " + htextarea(text, "id", "suggestAnswer", "name", "text", "class", "auto-expand", "style", "max-height: 10em; width: 300px; vertical-align: top") + hhidden("inputID", input.id) + hhidden("redirect", "") + " " + hsubmit("Save answer") + " [Optional rewrite type: " + hinputfield("rewriteType", "style", "width: 100px") + " ]", "action", url, "onsubmit", js_setRedirect())); } public void saveInput(String q) { Pair p = uniqCI2(BEAObject.class, "type", "Input", "text", q); if (p.b) { csetIfUnset(p.a, "createdBy", mod.user(mod.currentReq.get())); appendHTML("Input saved"); } } public void runNonMatches() { if (nempty(nonMatches)) { appendHTML(hr()); callFAll(nonMatches); } } public void runIt() { if (liveMode) runLiveMode(); else run(); runNonMatches(); } } public class ReverseInput extends Algorithm { public void run() { appendText(reversed(q)); } public void runLiveMode() { run(); } } public class TimeoutTest extends Algorithm { public void run() { sleepSeconds(120); } } public class RunPattern extends Algorithm { public void run() { BEAObject pattern = mod.beaGet(parseFirstLong(q)); if (pattern == null) { appendText("Pattern not found"); return; } appendText("Pattern: " + pattern); for (BEAObject input : mod.beaList("Input")) { String text = input.text(); Map mapping = matchInputWithPattern(input, pattern); if (mapping == null) nonMatches.add(new Runnable() { public void run() { try { appendText("Checking Input: " + input + " - No match"); } catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "appendText(\"Checking Input: \" + input + \" - No match\");"; } }); else { String result = "\n" + indent(formatDoubleArrowMap_horizontallyAligned(mapping)); appendText("Checking Input: " + input + result); allowStoringMatch(this, input, pattern, mapping); } } } } public class FindRewrites extends Algorithm { public void run() { BEAObject match = mod.beaGet(parseFirstLong(q)); if (match == null || !match.typeIs("Match")) { appendText("Match not found"); return; } BEAObject pattern = (BEAObject) (cget("pattern", match)); BEAObject input = (BEAObject) (cget("input", match)); Map mapping = (Map) (get("mapping", match)); appendText("Match: " + match); appendText("Input: " + input); appendText("Pattern: " + pattern); appendText("Mapping:\n" + indent(formatDoubleArrowMap_horizontallyAligned(mapping))); appendRewrites(this, input, input.text(), pattern, match, mapping); } } public List appendRewrites(Algorithm algo, BEAObject input, String inputText, BEAObject pattern, BEAObject match, Map mapping) { Collection rewrites = mod.beaBackRefs(pattern, "Rewrite"); List texts = new ArrayList(); for (BEAObject r : rewrites) { String text = r.text(); String textWithVars = text; if (pattern.typeIs("Syntactic pattern")) textWithVars = starsToAngleBracketedNumbers(text); String text2 = replaceAngleBracketVars_curly(textWithVars, mapping); algo.appendText(" Using pattern rewrite: " + text); algo.appendTextBold(" " + inputText + "\n" + " => " + text2); texts.add(text2); BEAObject existing = match == null || input == null ? null : conceptWhereIC(BEAObject.class, "type", "Rewrite", "input", input, "text", text2, "match", match, "patternRewrite", r, "label", "good"); if (existing != null) algo.appendHTML("Rewrite exists: " + mod.beaLinkHTML(existing)); else if (match != null && input != null) algo.appendHTML(hinlinepostform(hhiddenMulti("action", "create", "f_type", "Rewrite", "f_text", text2, "f_input", input.id, "metaInfo_input", "concept", "f_match", match.id, "metaInfo_match", "concept", "f_patternRewrite", r.id, "metaInfo_patternRewrite", "concept", "f_label", "good") + hbutton("Good rewrite"), "target", "_blank", "action", mod.crudLink(BEAObject.class))); } return texts; } public class ProcessNewInput extends Algorithm { public void run() { q = trim(q); BEAObject input = handleInput(this, q, false); for (BEAObject pattern : mod.beaListAny("Pattern", "Syntactic Pattern")) { Map mapping = matchInputWithPattern(q, pattern); if (mapping == null) nonMatches.add(new Runnable() { public void run() { try { appendText("Checking Pattern: " + pattern + " - No match"); } catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "appendText(\"Checking Pattern: \" + pattern + \" - No match\");"; } }); else { String result = "\n" + indent(formatDoubleArrowMap_horizontallyAligned(mapping)); appendText("Checking Pattern: " + pattern + result); if (input == null) { } else allowStoringMatch(this, input, pattern, mapping); appendRewrites(this, input, q, pattern, null, mapping); } } } } public class ProcessNewInput_v2 extends Algorithm { public void run() { q = trim(q); saveInput(q); BEAObject input = handleInput(this, q, false); if (input != null) { Collection rewrites = mod.beaBackRefs(input, "Rewrite"); BEAObject rewrite = random(rewrites); if (rewrite != null) appendHTML("My answer: " + b(htmlEncode2(rewrite.text())) + " " + ahref(mod.beaShortURL(rewrite), "[source]")); } allowSuggestingAnswer(input); for (BEAObject pattern : syntacticPatternsSortedBySpecificityDesc()) { { if (isTrue_getOpt("alwaysMatches", pattern)) continue; } Map mapping = matchInputWithPattern(q, pattern); if (mapping == null) { if (nonMatches != null) nonMatches.add(new Runnable() { public void run() { try { appendHTML("Checking Syntactic Pattern: " + mod.beaLinkHTML(pattern) + " - No match"); } catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "appendHTML(\"Checking Syntactic Pattern: \" + mod.beaLinkHTML(pattern) + \" - No..."; } }); } else { String result = "Grouped as: " + replaceAngleBracketVars_curly(starsToAngleBracketedNumbers(pattern.text()), mapping) + "\n" + indent(formatDoubleArrowMap_horizontallyAligned(mapping)); appendHTML(hr()); appendHTML("Checking Syntactic Pattern: " + mod.beaLinkHTML(pattern)); appendText(result); BEAObject match = null; if (input == null) { } else match = allowStoringMatch(this, input, pattern, mapping); MultiMap subInputRewrites = ciMultiMap(); for (String subInput : uniquifyCI(values(mapping))) if (!eqic(subInput, q)) { BEAObject subInputObj = handleInput(this, subInput, "Sub-Input", true); if (subInputObj != null) { List subRewrites = concatLists(conceptsWhereCI(BEAObject.class, "type", "Rewrite", "input", subInputObj), conceptsWhereCI(BEAObject.class, "type", "Rewrite", "isRewriteOf", subInputObj)); for (BEAObject r : subRewrites) appendHTML("  Sub-Rewrite found: " + r); subInputRewrites.putAll(subInput, subRewrites); } } appendRewrites(this, input, q, pattern, match, mapping); Map rewrittenMapping = mapValues(mapping, s -> { BEAObject rewrite = random(subInputRewrites.get(s)); return rewrite == null ? s : uncurly(rewrite.text()); }); String randomRewrite = replaceAngleBracketVars_curly(starsToAngleBracketedNumbers(pattern.text()), rewrittenMapping); if (neq(randomRewrite, q)) appendText("Random rewrite from sub-inputs: " + randomRewrite); } } } } public class ProcessNewInput_v3 extends Algorithm { public void run() { q = trim(q); saveInput(q); BEAObject input = handleInput(this, q, false); HTMLTabs tabs = new HTMLTabs(); { StringBuffer toTab = new StringBuffer(); Algorithm alg = new ProcessNewInput_v2(); alg.q = q; alg.out = toTab; alg.runIt(); tabs.add("Match input with patterns", toTab); } { StringBuffer toTab = new StringBuffer(); Algorithm alg = new SyntacticPatternFromInput(); alg.q = q; alg.out = toTab; alg.runIt(); tabs.add("Make syntactic pattern", toTab); } appendHTML(tabs.html()); } } public BEAObject allowStoringMatch(Algorithm algo, BEAObject input, BEAObject pattern, Map mapping) { BEAObject match = conceptWhereCI(BEAObject.class, "type", "Match", "pattern", pattern, "input", input, "mapping", mapping); if (match != null) { algo.appendHTML("Match exists: " + mod.beaLinkHTML(match)); return match; } algo.appendHTML(joinWithSpace(storeMatchForm(input, pattern, "good"), storeMatchForm(input, pattern, "bad"))); return null; } public String storeMatchForm(BEAObject input, BEAObject pattern, String label) { return hinlinepostform(hhiddenMulti("pattern", pattern.id, "input", input.id, "label", label, "redirect", "") + hbutton(firstToUpper(label) + " match"), "action", mod.baseLink + "/storeMatch", "onsubmit", js_setRedirect()); } public class MakeSyntacticPatterns extends Algorithm implements Runnable { public void run() { for (BEAObject p : mod.beaList("Pattern")) { appendText(p + " => " + makeSyntacticPattern(p)); } } } public String syntacticPatternText(BEAObject p) { return simpleSpacesTrim_javaTok(angleBracketVarsToStars(p.text())); } public BEAObject makeSyntacticPattern(BEAObject p) { if (p == null || !p.typeIs("Pattern") || empty(p.text())) return null; print("makeSyntacticPattern", p); String text = syntacticPatternText(p); BEAObject sp = uniqCI(BEAObject.class, "type", "Syntactic Pattern", "text", text); cset(p, "syntacticPattern", sp); return sp; } public BEAObject handleInput(Algorithm algo, String q, boolean showProcessLink) { return handleInput(algo, q, "Input", showProcessLink); } public BEAObject handleInput(Algorithm algo, String q, String desc, boolean showProcessLink) { algo.appendHTML((desc + ": ") + tt(htmlEncode(q)) + (!showProcessLink ? "" : " " + targetBlank(addParamsToURL(mod.baseLink + "/query", "q", q, "algorithm", "process input"), "Process"))); BEAObject input = mod.findInput(q); algo.appendHTML(inputHTML(input, desc, q)); return input; } public String inputHTML(BEAObject input, String q) { return inputHTML(input, "Input", q); } public String inputHTML(BEAObject input, String desc, String q) { return input != null ? (desc + " exists: ") + mod.beaLinkHTML(input) : !mod.requestAuthed() && !mod.allowAnonymousInputUpload ? null : hinlinepostform(hhiddenMulti("text", q, "redirect", "") + hbutton(("Save " + desc)), "action", mod.baseLink + "/saveInput", "onsubmit", js_setRedirect()); } public String syntacticPatternLinkHTML(BEAObject obj, String text) { return syntacticPatternLinkHTML(obj, text, null); } public String syntacticPatternLinkHTML(BEAObject obj, String text, BEAObject fromInput) { String desc = "Syntactic pattern"; return obj != null ? mod.beaLinkHTML(obj) : !mod.requestAuthed() ? null : hinlinepostform(hhiddenMulti("text", text, "fromInput", conceptIDOrNull(fromInput), "redirect", "") + hbutton(("Save " + (firstToLower(desc)))), "action", mod.baseLink + "/saveSyntacticPattern", "onsubmit", js_setRedirect()); } public class SyntacticPatternFromInput extends Algorithm implements Runnable { public void run() { BEAObject input = handleInput(this, q, false); if (countTokens(q) > 10) { appendText("Input too long to extract syntactic patterns"); return; } String q2 = dropPunctuation(q); List data = new ArrayList(); for (String pat : sortedIC(gazelle_allSyntacticPatternsFromInput(q))) { Map mapping = matchInputWithSyntacticPattern(q2, pat); BEAObject obj = conceptWhereIC(BEAObject.class, "type", "Syntactic Pattern", "text", pat); Map row = litorderedmap("Syntactic Pattern", htmlEncode2(pat), "In database", syntacticPatternLinkHTML(obj, pat, input)); for (Map.Entry __6 : _entrySet(mapping)) { String key = __6.getKey(); String val = __6.getValue(); row.put("Argument " + key, htmlEncode2(val)); } data.add(row); } appendHTML(print(htmlTable2_noHtmlEncode(data))); } } public class ApplyTextFunctions extends Algorithm { public void run() { q = trim(q); saveInput(q); BEAObject input = handleInput(this, q, false); localConcepts = db_mainConcepts(); LinkedHashSet objectsMade = new LinkedHashSet(); for (BEAObject f : mod.beaList("JavaX Standard Function")) { try { String fName = getString("name", f); if (!isIdentifier(fName)) continue; if (!isSafeStandardFunction(fName)) { { if (nonMatches != null) nonMatches.add(new Runnable() { public void run() { try { appendText("Function " + fName + " not safe"); } catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "appendText(\"Function \" + fName + \" not safe\");"; } }); } continue; } BEAObject o = cnew(localConcepts, BEAObject.class, "type", "Function Result", "function", f, "functionCalled", fName, "input", input, "calculating", true); objectsMade.add(o); try { Object holder = loadFunction_cached(fName); Object result = evalWithTimeoutOrFail(10.0, () -> call(holder, fName, q)); if (!(result instanceof List) && isStringCollection(result)) result = asList((Collection) result); if (result == null) cset(o, "resultType", "null"); else if (result instanceof String) cset(o, "resultType", "string", "result", result); else if (isStringList(result)) cset(o, "resultType", "list of strings", "result", result); else cset(o, "result", "other" + appendRoundBracketed(className(result)), "result", shorten(1000, str(result))); } catch (Throwable e) { cset(o, "resultType", "error", "error", getStackTrace(e)); } cset(o, "calculating", null); } catch (Throwable __e) { _handleException(__e); } } appendHTML(h3("Results of function calls")); HCRUD crud = mod.makeCRUD(BEAObject.class, mod.currentReq.get()); HCRUD_Concepts crudData = (HCRUD_Concepts) (crud.data); crudData.listConcepts_firstStep = () -> objectsMade; appendHTML(crud.renderTable(true)); } } public class FindPath extends Algorithm { public BreadthFirstPathFinder_withLinkType pathFinder = new BreadthFirstPathFinder_withLinkType(); public BEAObject start, dest; public void run() { start = mod.beaGet(parseFirstLong(q)); dest = mod.beaGet(parseSecondLong(q)); if (start == null || dest == null) { appendText("Please supply object IDs of start and end"); return; } appendHTML("Looking for path from " + mod.beaToHTML(start) + " to " + mod.beaToHTML(dest)); pathFinder.getChildren = o -> cForwardAndBackRefsWithFieldIndicator(BEAObject.class, o); pathFinder.add(start); while (!pathFinder.nodeReached(dest) && pathFinder.step()) { } List> path = pathFinder.examplePathWithTypes(start, dest); if (path == null) appendText("No path found!"); else { appendHTML(b("Path found!")); appendHTML(ol(map(path, p -> { String html = mod.beaHTML(p.a); if (p.b == null) return html; String arrow = ifThenElse(p.b.forward, ">>", "<<"); return html + " " + htmlEncode2(joinNemptiesWithSpace(arrow, p.b.field, arrow)); }))); } } } public class ExecuteTextQuery extends Algorithm { public void run() { saveInput(q = trim(q)); appendHTML(h3("Result")); appendHTML(htmlEncode2(strOrEmpty(executeTextQuery(q)))); } } public int patternSpecificity(BEAObject pattern) { return countWordsWithoutAngleBracketedAndStars(pattern.text()); } public List syntacticPatternsSortedBySpecificityDesc() { return sortedByCalculatedFieldDesc(__19 -> patternSpecificity(__19), mod.beaList("Syntactic Pattern")); } public Object executeTextQuery(String s) { Matches m = new Matches(); if (match3_withIntsAndIDs("all references in field of object ", s, m)) { Object value = cget(mod.beaGet(m.unq(1)), m.unq(0)); return value instanceof Collection ? instancesOf(BEAObject.class, (Collection) value) : value instanceof BEAObject ? ll((BEAObject) value) : ll(); } return new QueryNotUnderstood(s); } static public class QueryNotUnderstood implements IFieldsToList { public String s; public QueryNotUnderstood() { } public QueryNotUnderstood(String s) { this.s = s; } public String toString() { return shortClassName(this) + "(" + s + ")"; } public boolean equals(Object o) { if (!(o instanceof QueryNotUnderstood)) return false; QueryNotUnderstood __10 = (QueryNotUnderstood) o; return eq(s, __10.s); } public int hashCode() { int h = 1528655894; h = boostHashCombine(h, _hashCode(s)); return h; } public Object[] _fieldsToList() { return new Object[] { s }; } } } static public class GazelleBEA extends DynGazelleRocks { static public boolean _switchableField_mirrorBEAObjects = true; public boolean mirrorBEAObjects = false; static public boolean _switchableField_enableAutoRuns = true; public boolean enableAutoRuns = true; static public boolean _switchableField_enableNewBEAObjectNotis = true; public boolean enableNewBEAObjectNotis = true; transient public ReliableSingleThread_Multi rstAutoRuns = new ReliableSingleThread_Multi<>(1000, __15 -> performAutoRuns(__15)); transient public Q notificationQ; transient public ReliableSingleThread_Multi rstDistributeNewObject = new ReliableSingleThread_Multi<>(1000, __16 -> distributeNewObject_impl(__16)); transient public Set newObjectsDistributed = weakSet(); transient public BEACalculations calculations = new BEACalculations(this); transient public int newFieldsToShow = 3; transient public boolean allowAnonymousInputUpload = true; static public boolean _switchableField_maxInputLength = true; public int maxInputLength = 50000; public void init() { super.init(); botName = heading = adminName = "Gazelle BEA"; enableVars = true; showTalkToBotLink = true; phoneNumberSpecialInputField = false; } public void startDB() { db(); } public void start() { assertEquals(BEAObject.class, callF(defaultDefaultClassFinder(), "main$BEAObject")); assertEquals(ConceptWithGlobalID.class, callF(defaultDefaultClassFinder(), "main$ConceptWithGlobalID")); seedDBFrom("#1030602"); storeBaseClassesInStructure = true; super.start(); print("main concepts: " + db_mainConcepts() + ", count: " + db_mainConcepts().countConcepts()); print(renderConceptClassesWithCount(db_mainConcepts())); print("Inputs: " + n2(beaCount("Input"))); showCRUDToEveryone = true; if (!enabled) return; rstUpdateBEAMirrors.addAll(list(BEAObject.class)); newObjectsDistributed.addAll(list(BEAObject.class)); onIndividualConceptChange_notOnAllChanged(BEAObject.class, o -> { if (enableAutoRuns) rstAutoRuns.add(o); if (enableNewBEAObjectNotis && newObjectsDistributed.add(o)) rstDistributeNewObject.add(o); }); notificationQ = dm_startQ(); dm_doEvery(30.0, new Runnable() { public void run() { try { print(new ConceptsRefChecker(db_mainConcepts()).runAndFixAll()); } catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "print(ConceptsRefChecker(db_mainConcepts()).runAndFixAll());"; } }); } public void makeIndices() { super.makeIndices(); indexConceptFieldDesc(BEAObject.class, "_modified"); indexConceptFieldIC(BEAObject.class, "type"); indexConceptField(BEAObject.class, "input"); } public List crudClasses(Req req) { return listPlus(super.crudClasses(req), BEAObject.class); } public String authFormHeading() { return h3("Gazelle BEA"); } public void makeFramer(Req req) { super.makeFramer(req); req.framer.renderTitle = () -> h1(ahref(baseLink + "/", "Gazelle BEA") + " " + htmlEncode2(req.framer.title)); req.framer.addInHead(hjs_autoExpandingTextAreas()); } public HCRUD_Concepts crudData(Class c, Req req) { HCRUD_Concepts cc = super.crudData(c, req); if (c == BEAObject.class) { cc.humanizeFieldNames = false; cc.convertConceptValuesToRefs = true; cc.itemName = () -> "BEA Object"; cc.onCreate.add(o -> cset(o, "createdBy", currentUser())); cc.getObjectForDuplication = id -> { Map item = cc.getObjectForDuplication_base(id); item.put("creator", req.auth.user.get()); item.put("createdFrom", getConcept(toLong(id))); return item; }; cc.emptyObject = () -> { Map item = cc.emptyObject_base(); item.put("type", ""); return item; }; Set deletableRefs = litciset("Match"); cc.objectCanBeDeleted = id -> all(findBackRefs(BEAObject.class, cc.conceptForID(id)), o -> contains(deletableRefs, o.type())); cc.actuallyDeleteConcept = o -> { deleteConcepts(filter(findBackRefs(BEAObject.class, o), o2 -> contains(deletableRefs, o2.type()))); cdelete(o); }; } return cc; } public HCRUD makeCRUD(Class c, Req req, HTMLFramer1 framer) { HCRUD crud = super.makeCRUD(c, req, framer); HCRUD_Concepts data = (HCRUD_Concepts) (crud.data); crud.showOnlySelected = true; crud.showSearchField = true; if (data.customFilter == null) crud.descending = true; crud.cleanItemIDs = true; if (c == BEAObject.class) { crud.cellColumnToolTips = true; crud.unshownFields = litset("mirrorPost", "globalID"); crud.showTextFieldsAsAutoExpandingTextAreas = true; HCRUD_Concepts cc = (HCRUD_Concepts) (crud.data); String typeFilter = req.get("type"); if (nempty(typeFilter)) cc.addCIFilter("type", typeFilter); crud.renderCmds = map -> { BEAObject o = getConcept(BEAObject.class, crud.itemIDAsLong(map)); List cmds = new ArrayList(); if (nempty(o.text())) cmds.add(targetBlank(addParamsToURL(baseLink + "/query", "q", o.text(), "algorithm", "process input"), "Use text as query")); if (o.typeIs("Input")) { cmds.add(ahref(addParamsToURL(crudLink(BEAObject.class), "cmd", "new", "title", "Add Pattern For Input", "f_type", "Pattern", "f_text", getStringOpt("text", o), "f_shouldMatch", o.id, "metaInfo_shouldMatch", "concept"), "Add pattern")); cmds.add(ahref(appendParamsToURL(baseLink + "/query", "q", o.text(), "algorithm", "Apply all text functions"), "Apply all text functions")); } if (o.typeIs("Pattern")) cmds.add(ahref(appendParamsToURL(baseLink + "/query", "q", o.id, "algorithm", "Run pattern"), "Run pattern against all inputs")); if (o.typeIs("Match")) cmds.add(ahref(appendParamsToURL(baseLink + "/query", "q", o.id, "algorithm", "Find rewrites for match"), "Find rewrites")); cmds.add(ahref(addParamsToURL(baseLink + "/markUseful", "redirect", beaShortURL(o), "objectID", o.id), "Mark useful")); cmds.add(ahref(addParamsToURL(crudLink(BEAObject.class), "cmd", "new", "title", "Add Comment", "f_type", "Comment", "f_on", o.id, "f_text", "", "metaInfo_on", "concept"), "Add comment")); if (o.typeIsOneOf("Script", "Step in script") || eqic(beforeVerticalBar(o.type()), "Instruction")) cmds.add(ahref(addParamsToURL(baseLink + "/runInstruction", "instruction", o.id), "Run")); if (o.typeIs("Function Result") && eqic(cget("resultType", o), "string")) cmds.add(ahref(addParamsToURL(baseLink + "/convertResultToInput", "result", o.id), "Convert to input")); framer.addInHead(hjs_copyToClipboard()); cmds.add(ahref_onClick(formatFunctionCall("copyToClipboard", jsQuote(o.globalIDStr())), "Copy global ID [" + o.globalIDStr() + "]")); return joinNemptiesWithVBar(crud.renderCmds_base(map), !o.typeIsOneOf("Input", "Pattern", "Syntactic Pattern") ? null : addRewriteHTML(o), hPopDownButton(cmds)); }; cc.massageItemMapForList = (item, map) -> { BEAObject o = (BEAObject) item; if (o.typeIs("Input")) { Collection matches = objectsWhereCI(findBackRefs(o, BEAObject.class), "type", "match"); ((Map) map).put("Best Matches", new HTML(hparagraphs(lmap(__20 -> matchDescHTML(__20), takeFirst(3, matches))))); } String idField = crud.idField(); Object id = ((Map) map).get(idField); if (id instanceof String) ((Map) map).put(idField, new HTML(ahref(beaShortURL(o), id))); if (o.typeIs("Function Result")) { Object value = getOpt("result", o); ((Map) map).put("result", new HTML(javaValueToHTML(value))); } }; crud.massageFormMatrix = (map, matrix) -> { for (int i = 1; i <= newFieldsToShow; i++) { String nf = "newField" + i; String refSelector = crud.renderInput((nf + "_conceptValue"), cc.makeConceptsComboBox((nf + "_conceptValue"), BEAObject.class), null) + hjs("$(\"[name=" + nf + "_conceptValue]\").hide()"); List types = ll("String", "BEAObject", "Bool"); String typeSelector = hselect_list(types, "name", (nf + "_type"), "onchange", "\r\n var value = this.value;\r\n $(\"[name=" + nf + "_value]\").toggle(value != \"BEAObject\");\r\n $(\"#" + nf + "_refBox\").toggle(value == \"BEAObject\");\r\n "); matrix.add(ll("Add field:
" + htextfield((nf + "_name"), "title", "New field name"), htmlTable2_noHtmlEncode(ll(ll(htextfield((nf + "_value")), span(refSelector, "id", (nf + "_refBox"), "style", "display: none"), "Type", typeSelector)), "noHeader", true, "tableParams", litobjectarray("style", "width: 100%")))); } }; crud.preprocessUpdateParams = params -> { params = cloneMap(params); params = mapValues(params, v -> eq(v, "") ? null : v); for (int i = 1; i <= max(newFieldsToShow, 10); i++) { String nf = "newField" + i; String name = params.get((nf + "_name")), type = params.get((nf + "_type")), refValue = params.get((nf + "_conceptValue")), value = params.get((nf + "_value")); if (eqic(type, "BEAObject")) { value = refValue; params.put("metaInfo_" + name, "concept"); } else if (eqic(type, "Bool")) params.put("metaInfo_" + name, "bool"); if (eq(value, "")) value = null; if (nempty(name)) params.put(crud.fieldPrefix + name, value); } return params; }; } return crud; } public Object serveBotFunction(Req req, String function, Map data, User user) { if (eq(function, "beaList")) { long changedAfter = toLong(data.get("changedAfter")); double pollFor = min(bot_maxPollSeconds, toLong(data.get("pollFor"))); long startTime = sysNow(); if (changedAfter > 0 && changedAfter == now()) sleep(1); Collection objects; while (true) { objects = changedAfter == 0 ? list(BEAObject.class) : conceptsWithFieldGreaterThan_sorted(BEAObject.class, "_modified", changedAfter); if (nempty(objects) || pollFor == 0 || elapsedSeconds_sysNow(startTime) >= pollFor) return serveJSON_breakAtLevels(2, "result", map(objects, obj -> litorderedmap("gid", str(obj.globalID()), "struct", obj.structureString()))); sleep(bot_pollInterval); } } return super.serveBotFunction(req, function, data, user); } transient public ReliableSingleThread_Multi rstUpdateBEAMirrors = new ReliableSingleThread_Multi<>(100, c -> c.updateMirrorPost()); public Object serveOtherPage2(Req req) { printVars_str("serveOtherPage2", "uri", req.uri); { Object __14 = super.serveOtherPage2(req); if (__14 != null) return __14; } String uri = dropTrailingSlashIfNemptyAfterwards(req.uri); Matches m = new Matches(); if (swic_notSame(uri, "/beaCRUD/", m)) return renderBEAObjectTable(req, urldecode(m.rest())); if (eq(uri, "/inputs")) return renderBEAObjectTable(req, "input"); if (eq(uri, "/syntacticPatternsWithoutRewrites")) { HCRUD crud = makeBEAObjectCRUD(req, "Syntactic Pattern"); HCRUD_Concepts data = (HCRUD_Concepts) (crud.data); IF1 prev = data.customFilter; data.customFilter = list -> { list = filter(list, c -> empty(beaBackRefs(c, "Rewrite"))); return postProcess(prev, list); }; crud.customTitle = "Syntactic patterns without rewrites"; return serveCRUD(req, BEAObject.class, crud); } if (eq(uri, "/inputsWithoutRewrites")) { HCRUD crud = makeBEAObjectCRUD(req, "input"); HCRUD_Concepts data = (HCRUD_Concepts) (crud.data); IF1 prev = data.customFilter; data.customFilter = list -> { list = filter(list, c -> empty(beaBackRefs(c, "Rewrite"))); return postProcess(prev, list); }; crud.customTitle = "Inputs without rewrites"; return serveCRUD(req, BEAObject.class, crud); } if (eq(uri, "/inputsWithoutMatches")) { HCRUD crud = makeBEAObjectCRUD(req, "input"); HCRUD_Concepts data = (HCRUD_Concepts) (crud.data); IF1 prev = data.customFilter; data.customFilter = list -> { list = filter(list, c -> empty(beaBackRefs(c, "Match"))); return postProcess(prev, list); }; crud.customTitle = "Inputs without matches"; return serveCRUD(req, BEAObject.class, crud); } if (eq(uri, "/patterns")) return renderBEAObjectTable(req, "pattern"); if (eq(uri, "/syntacticPatterns")) return renderBEAObjectTable(req, "Syntactic Pattern"); if (eq(uri, "/matches")) return renderBEAObjectTable(req, "match"); if (eq(uri, "/rewrites")) return renderBEAObjectTable(req, "rewrite"); if (eq(uri, "/aiTasks")) return renderBEAObjectTable(req, "AI Task"); if (eq(uri, "/query")) return calculations.serveQueryPage(req); if (eq(uri, "/saveInput")) { String text = trim(req.get("text")); String info = trim(req.get("info")); if (empty(text)) return subBot_serve500("Input empty"); if (l(text) > maxInputLength) return subBot_serve500("Input too long"); BEAObject input = uniqCI(BEAObject.class, "type", "Input", "text", text, "createdBy", user(req)); if (nempty(info)) uniqCI(BEAObject.class, "type", "Input Source", "input", input, "source", info); return hrefresh(or2(req.get("redirect"), baseLink + "/")); } if (eq(uri, "/markUseful")) { BEAObject o = beaGet(req.get("objectID")); if (o == null) return subBot_serve500("Object not found"); uniqCI(BEAObject.class, "type", "Useful", "object", o, "createdBy", user(req)); return hrefresh(or2(req.get("redirect"), baseLink + "/")); } if (eq(uri, "/saveAnswer")) { String text = trim(req.get("text")); String rewriteType = or2(trim(req.get("rewriteType")), "Suggested Answer"); long inputID = toLong(req.get("inputID")); BEAObject input = beaGet(inputID); if (input == null) return subBot_serve500("Input not found"); if (empty(text)) return subBot_serve500("Text empty"); if (l(text) > maxInputLength) return subBot_serve500("Text too long"); uniqCI(BEAObject.class, "type", "Rewrite", "text", text, "isRewriteOf", input, "rewriteType", rewriteType, "createdBy", user(req)); return hrefresh(or2(req.get("redirect"), baseLink + "/")); } if (!inMasterMode(req)) return null; if (eq(uri, "/uploadInputs")) return serveUploadTexts(req, "Input"); if (eq(uri, "/uploadPatterns")) return serveUploadTexts(req, "Pattern"); if (eq(uri, "/analyzeInput")) return calculations.serveAnalyzeInput(req); if (eq(uri, "/allBEATypes")) { MultiSet ms = asCIMultiSet(collect("type", list(BEAObject.class))); return h2_title("All BEA object types") + ul(mapPairs(multiSetToPairsByPopularity(ms), (type, count) -> { String _type = or2(type, "(no type)"); return count + " " + ahref(baseLink + "/beaCRUD/" + urlencode(_type), htmlEncode2(_type)); })); } if (eq(uri, "/storeMatch")) { BEAObject pattern = beaGet(req.get("pattern")); BEAObject input = beaGet(req.get("input")); String label = req.get("label"); BEAObject match = calculations.reactInputWithPattern(input, pattern); if (match == null) return "Couldn't match"; cset(match, "label", label); return hrefresh(or2(req.get("redirect"), beaObjectURL(match))); } if (eq(uri, "/saveSyntacticPattern")) { String text = req.get("text"); BEAObject fromInput = beaGet(req.get("fromInput")); BEAObject pat = uniqCI(BEAObject.class, "type", "Syntactic Pattern", "text", text, "createdBy", user(req)); csetIfUnset(pat, "fromInput", fromInput); if (fromInput != null) calculations.reactInputWithPattern(fromInput, pat); return hrefresh(or2(req.get("redirect"), baseLink + "/")); } if (eq(uri, "/runInstruction")) { BEAObject o = beaGet(req.get("instruction")); runInstruction(o); return hrefresh(beaObjectURL(o)); } if (eq(uri, "/convertResultToInput")) { BEAObject result = beaGet(req.get("result")); if (result == null) return subBot_serve500("Object not found"); String text = unquote(getString("result", result)); if (l(text) > maxInputLength) return subBot_serve500("Input too long"); BEAObject input = uniqCI(BEAObject.class, "type", "Input", "text", text); uniqCI(BEAObject.class, "type", "Input Source", "input", input, "source", result); return hrefresh(beaShortURL(input)); } return null; } public HCRUD makeBEAObjectCRUD(Req req, String type) { HCRUD crud = makeCRUD(BEAObject.class, req); crud.baseLink = req.uri(); HCRUD_Concepts data = (HCRUD_Concepts) (crud.data); data.itemName = () -> firstToUpper(type); data.addCIFilter("type", eqic(type, "(no type)") ? null : type); if (eqicOneOf(type, "Input", "Pattern", "AI Task")) { IF0> prev = data.emptyObject; data.emptyObject = () -> { Map item = data.emptyObject_fallback(prev); item.put("text", ""); return item; }; } return crud; } public Object renderBEAObjectTable(Req req, String type) { HCRUD crud = makeBEAObjectCRUD(req, type); return serveCRUD(req, BEAObject.class, crud); } public Object serveUploadTexts(Req req, String type) { String inputs = req.get("text"); List output = new ArrayList(); if (nempty(inputs)) { for (String text : tlft(inputs)) { Pair p = uniqCI2_sync(BEAObject.class, "type", type, "text", text); if (cget("uploadedBy", p.a) == null) cset(p.a, "uploadedBy", req.auth.user); output.add(type + " " + (p.b ? "added" : "exists") + " (ID " + p.a.id + "): " + text); } } return h2("Upload " + plural(type)) + hpostform(p(plural(type) + " (one per line):") + p(htextarea(inputs, "name", "text")) + pIfNempty(htmlEncode_nlToBR(lines(output))) + hsubmit("Upload " + plural(type))); } public Collection beaObjectsOfType(String type) { return conceptsWhereCI(BEAObject.class, "type", type); } public void reactAllInputsWithSomePatterns() { calculations.reactAllInputsWithSomePatterns(); } public String navDiv() { HCRUD crud = makeCRUD(BEAObject.class, currentReq.get()); int inputsWithoutRewrites = countPred(beaList("Input"), c -> empty(beaBackRefs(c, "Rewrite"))); int inputsWithoutMatches = countPred(beaList("Input"), c -> empty(beaBackRefs(c, "Match"))); int syntacticPatternsWithoutRewrites = countPred(beaList("Syntactic Pattern"), c -> empty(beaBackRefs(c, "Rewrite"))); return joinNemptiesWithVBar(beaNavLink("Input", crud), beaNavLink("Pattern", crud), beaNavLink("Syntactic Pattern", crud), ahref(baseLink + "/syntacticPatternsWithoutRewrites", n2(syntacticPatternsWithoutRewrites) + " Syntactic patterns w/o rewrites"), beaNavLink("Match", crud), beaNavLink("Rewrite", crud), beaNavLink("AI Task", crud), ahref(baseLink + "/query", "Query"), ahref(baseLink + "/inputsWithoutMatches", n2(inputsWithoutMatches) + " Inputs w/o matches"), ahref(baseLink + "/inputsWithoutRewrites", n2(inputsWithoutRewrites) + " Inputs w/o rewrites"), hPopDownButtonWithText("Bot Forum", navLinks("flat", true, "withStats", false)), hPopDownButton(ahref(baseLink + "/allBEATypes", "All object types"), ahref(baseLink + "/stats", "Stats"), !inMasterMode(currentReq.get()) ? null : ahref(baseLink + "/refchecker", "Reference checker"))); } public String beaNavLink(String type, HCRUD crud) { return beaNavLink(type, crud, beaCount(type)); } public String beaNavLink(String type, HCRUD crud, int count) { String plural = firstToLower(plural(type)); String link = baseLink + "/" + camelCase(plural); return ahref(link, count + " " + firstToUpper(plural)) + (!crud.actuallyAllowCreate() ? "" : " " + ahref(addParamToURL(link, "cmd", "new"), "+")); } public String beaObjectURL(BEAObject o) { return conceptLink(o, currentReq.get()); } public String matchDescHTML(BEAObject m) { try { BEAObject pat = cget("pattern", m); Map mapping = (Map) (cget("mapping", m)); return ahref_undecorated(crudLink(m), htmlEncode2(quote(getString("text", pat))) + "
  with " + renderEqualsCommaProperties(mapping)); } catch (Throwable __e) { _handleException(__e); } return htmlEncode2(str(m)); } public int beaCount(String type) { return countConceptsWhereCI(BEAObject.class, "type", type); } public Collection beaList(String type) { return conceptsWhereCI(BEAObject.class, "type", type); } public Collection beaListAny(String... types) { return concatLists(lmap(__21 -> beaList(__21), litciset(types))); } public BEAObject beaGet(long id) { return getConceptOpt(BEAObject.class, id); } public BEAObject beaGet(String id) { return beaGet(parseFirstLong(id)); } public BEAObject cgetBEA(String field, BEAObject o) { return (BEAObject) cget(field, o); } public String beaLinkHTML(BEAObject o) { return o == null ? null : ahref(conceptLink(o), htmlEncode2_nlToBr(str(o))); } public String beaToHTML(BEAObject o) { return beaLinkHTML(o); } public String beaHTML(BEAObject o) { return beaLinkHTML(o); } public String beaShortURL(BEAObject o) { return o == null ? null : baseLink + "/" + o.id; } public Collection beaBackRefs(BEAObject o, String type) { return objectsWhereCI(findBackRefs(BEAObject.class, o), "type", type); } public Object serveDefaultPage(Req req) { HTMLFramer1 framer = req.framer; framer.add(hcenter3(hsnippetimg_scaleToWidth(200, "#1102967", 200, 110, "title", "Gazelle"), "style", "margin-top: 100px")); return completeFrame(req); } public String html_loggedIn() { User user = user(currentReq.get()); return user == null ? ahref(baseLink + "/", "Log in") : "Logged in as " + htmlEncode2(user.name); } public void distributeNewObject_impl(BEAObject o) { if (o.typeIs("Match")) return; distributeNotification("New object: " + o); } public void performAutoRuns(BEAObject o) { print("performAutoRuns", o); for (BEAObject autoRun : beaList("Auto Run")) { if (!isTrue(getOpt("enabled", autoRun))) { print("Not enabled: " + autoRun); continue; } String type = getString("onChangedObjectOfType", autoRun); if (!o.typeIs(type)) { print("Wrong type: " + type); continue; } print("Running " + autoRun); BEAObject procedure = (BEAObject) (cget("procedure", autoRun)); String internalCode = getString("internalCode", procedure); print("internalCode", internalCode); if (eqic(internalCode, "convertInputToPattern")) { String text = o.text(); if (!containsAngleBracketVars(text)) { print("No angle bracket vars"); continue; } BEAObject p = uniqCI_returnIfNew(BEAObject.class, "type", "Pattern", "text", text); cset(p, "fromInput", o, "byProcedure", procedure, "byAutoRun", autoRun); print("p", p); } else if (eqic(internalCode, "makeSyntacticPattern")) { print("sp", calculations.makeSyntacticPattern(o)); } else print("Unknown internal code"); } } public BEAObject findInput(String text) { return conceptWhereIC(BEAObject.class, "type", "Input", "text", text); } public String addRewriteHTML(BEAObject o) { return ahref(addParamsToURL(crudLink(BEAObject.class), "cmd", "new", "title", "Add Rewrite", "f_type", "Rewrite", "f_text", getStringOpt("text", o), "f_isRewriteOf", o.id, "metaInfo_isRewriteOf", "concept"), "Add Rewrite"); } public Object serveIntegerLink(Req req, long id) { BEAObject o = getConceptOpt(BEAObject.class, id); if (o != null) return htitle(str(o)) + hrefresh(conceptLink(o)); return super.serveIntegerLink(req, id); } public void distributeTestNotification() { distributeNotification("It is " + localTimeWithSeconds()); } public void distributeNotification(String text) { notificationQ.add(new Runnable() { public void run() { try { for (Pair p : syncMapToPairs(webSockets)) { String jsCode = "window.createNotification({ theme: 'success', showDuration: 3000 })(" + jsonEncodeMap("message", text) + ");"; call(p.a, "send", jsonEncodeMap("eval", jsCode)); } } catch (Exception __e) { throw rethrow(__e); } } public String toString() { return "/*for (User user)\r\n if (nemptyAfterTrim(user.notificationSetting))\r\n ..."; } }); } public void runInstruction(BEAObject o) { if (o == null) return; try { BEAObject instruction = o; if (o.typeIs("Step in script")) instruction = (BEAObject) cget(o, "instruction"); if (instruction.typeIs("Instruction | List objects by type")) { saveInstructionResult(o, beaList(getString("typeToList", instruction))); return; } if (instruction.typeIs("Instruction | List object types")) { saveInstructionResult(o, distinctCIFieldValuesOfConcepts(BEAObject.class, "type")); return; } if (instruction.typeIs("Instruction | Filter list by text starting with")) { BEAObject scriptRun = cgetBEA("scriptRun", o); if (scriptRun == null) throw fail("Need to be run as part of script"); List steps = scriptRunSteps(scriptRun); int idx = indexOf(steps, o); if (idx < 0) throw fail("Step not found in script run"); List list = firstNotNull(map(reversed(takeFirst(steps, idx)), step -> optCast(List.class, cget("data", cgetBEA("result", step))))); String prefix = getString("prefix", instruction); List filtered = filter(list, obj -> swic(obj.text(), prefix)); saveInstructionResult(o, filtered); return; } if (instruction.typeIs("Script")) { BEAObject script = instruction; BEAObject scriptRun = cnew(BEAObject.class, "type", "Script Run", "script", script); int i = 0; List steps = new ArrayList(); while ((instruction = (BEAObject) cget(instruction, "step" + (++i))) != null) { BEAObject step = cnew(BEAObject.class, "type", "Step in script", "step", i, "scriptRun", scriptRun, "instruction", instruction); steps.add(step); } cset(scriptRun, "steps", steps); return; } cnew(BEAObject.class, "type", "Instruction Error", "instruction", o, "error", "Unknown instruction type"); } catch (Throwable e) { cnew(BEAObject.class, "type", "Instruction Error", "instruction", o, "error", getStackTrace(e)); } } public BEAObject saveInstructionResult(BEAObject instruction, Object data) { BEAObject result = cnew(BEAObject.class, "type", "Instruction Result", "instruction", instruction, "data", data); cset(instruction, "result", result); return result; } public List scriptRunSteps(BEAObject scriptRun) { return (List) cget("steps", scriptRun); } } static public boolean _moduleClass_GazelleBEA = true; static public class BEAObject extends ConceptWithGlobalID { public Ref mirrorPost = new Ref(); public void change() { super.change(); ((GazelleBEA) botMod()).rstUpdateBEAMirrors.add(this); } public void delete() { cdelete(mirrorPost.get()); super.delete(); } public void updateMirrorPost() { GazelleBEA mod = (GazelleBEA) (botMod()); if (isDeleted() || !mod.mirrorBEAObjects) return; if (!mirrorPost.has()) cset(this, "mirrorPost", cnew(UserPost.class, "type", "BEA Object", "creator", mod.internalUser(), "botInfo", "BEA Mirror Bot")); String text = structureString(); cset(mirrorPost.get(), "title", str(this), "text", text); } public String structureString() { String text = "Error"; try { structure_Data data = new structure_Data() { public structure_ClassInfo newClass(Class c) { structure_ClassInfo info = super.newClass(c); if (c == Concept.Ref.class) { info.special = true; info.serializeObject = o -> { Concept cc = (Concept) (deref((Concept.Ref) o)); if (cc instanceof BEAObject) append("CRef(gid=" + quote(((BEAObject) cc).globalID()) + ")", 6); else if (cc != null) append("CRef(id=" + cc.id + ")", 6); else append("CRef", 1); }; } return info; } public void setFields(structure_ClassInfo info, List fields) { if (isSubclassOf(info.c, BEAObject.class)) { removeAll(fields, getField(BEAObject.class, "refs"), getField(BEAObject.class, "backRefs")); } super.setFields(info, fields); } }; String struct = structure(this, data); struct = dropLoadableUtilsPackageFromStruct(struct); text = indentStructureString_firstLevels(1, struct); } catch (Throwable __e) { _handleException(__e); } return text; } public String toString() { String type = strOrNull(cget("type", this)); String s = super.toString(); if (nempty(type)) { s = type + " " + id; if (eqic(type, "Match")) s += appendBracketed(strOrNull(getOpt("label", this))) + " " + getOpt("mapping", this) + appendBracketed(getOpt("input", this) + " + " + getOpt("pattern", this)); } boolean enabled = eq(true, getOpt("enabled", this)); if (enabled) s += " [enabled]"; String text = or2(text(), getStringOpt("name", this)); if (text != null) s += " " + quote(text); Object fc = getOpt("functionCalled", this); if (fc != null) s += " " + fc; return s; } public String type() { return getStringOpt("type", this); } public boolean typeIs(String type) { return eqic(type(), type); } public boolean typeIsOneOf(String... types) { return eqicOneOf(type(), types); } public String text() { return getStringOpt("text", this); } } static volatile public Concepts mainConcepts; static public Concepts db_mainConcepts() { if (mainConcepts == null) mainConcepts = newConceptsWithClassFinder(getDBProgramID()); return mainConcepts; } static public void cleanMeUp_concepts() { if (db_mainConcepts() != null) db_mainConcepts().cleanMeUp(); } static public HashMap findClass_fullName_cache = new HashMap(); static public Class findClass_fullName(String name) { synchronized (findClass_fullName_cache) { if (findClass_fullName_cache.containsKey(name)) return findClass_fullName_cache.get(name); Class c; try { c = Class.forName(name); } catch (ClassNotFoundException e) { c = null; } findClass_fullName_cache.put(name, c); return c; } } static public void db() { conceptsAndBot(); } static public void db(Integer autoSaveInterval) { conceptsAndBot(autoSaveInterval); } static public Object defaultDefaultClassFinder() { return new F1() { public Class get(String name) { { Class c = findClass_fullName(name); if (c != null) return c; } if (name.startsWith("loadableUtils.utils$")) { Class c = findClass_fullName("main" + name.substring(19)); if (c != null) return c; } else if (name.startsWith("main$")) { Class c = findClass_fullName("loadableUtils.utils" + name.substring(4)); if (c != null) return c; } return null; } }; } static public void seedDBFrom(String progID) { bootstrapConceptsFrom(progID); } static public String renderConceptClassesWithCount(Concepts cc) { MultiSet ms = new MultiSet(); for (Concept c : values(cc.concepts)) ms.add(dynamicShortName(c)); return renderMultiSet(ms); } static public Concepts newConceptsWithClassFinder(String progID) { Concepts cc = new Concepts(progID); cc.classFinder = _defaultClassFinder(); return cc; } volatile static public boolean conceptsAndBot_running = false; static public boolean conceptsAndBot_thinOnStart = true; static public void conceptsAndBot() { conceptsAndBot(null); } static public void conceptsAndBot(Integer autoSaveInterval) { if (conceptsAndBot_running) return; conceptsAndBot_running = true; Concepts cc = db_mainConcepts(); try { if (cc.useFileLock) { if (!cc.fileLock().tryToLock()) { ensureDBNotRunning(dbBotStandardName()); cc.fileLock().forceLock(); } } else ensureDBNotRunning(dbBotStandardName()); } catch (Throwable _e) { cc.dontSave = true; throw rethrow(_e); } cc.persist(autoSaveInterval); dbBot(false); if (conceptsAndBot_thinOnStart) { try { thinAProgramsBackups(getDBProgramID(), true); } catch (Throwable __e) { _handleException(__e); } } } static public void bootstrapConceptsFrom(String progID) { for (String ending : ll("", ".gz")) { File f1 = getProgramFile(progID, "concepts.structure" + ending); File f2 = getProgramFile(programID(), "concepts.structure" + ending); if ((!f2.exists() || eq(ending, ".gz") && fileSize(f2) <= 24) && f1.exists()) copyFile(f1, f2); } } static public String dynamicShortName(Object o) { return shortDynamicClassName(o); } static public String renderMultiSet(MultiSet ms) { if (ms == null) return "-"; List l = new ArrayList(); for (Object o : ms.highestFirst()) l.add(str(o) + " (" + ms.get(o) + ")"); return joinWithComma(l); } static public Object _defaultClassFinder_value = defaultDefaultClassFinder(); static public Object _defaultClassFinder() { return _defaultClassFinder_value; } static public String shortDynamicClassName(Object o) { if (o instanceof DynamicObject && ((DynamicObject) o).className != null) return ((DynamicObject) o).className; return shortClassName(o); } }