UNPKG

deltascrambler

Version:

Scramble and scramble image generator for all WCA and lots of non-WCA puzzles

1,656 lines (1,533 loc) 712 kB
// The next line will get replaced with the contents of the // gwt-generated tnoodlejs.nocache.js. So don't mess with it unless // you know what you're doing! function TNOODLEJS_GWT() { function tnoodlejs(){ var $wnd_0 = window, $doc_0 = document, gwtOnLoad, bodyDone, base = '', metaProps = {}, values = [], providers = [], answers = [], softPermutationId = 0, onLoadErrorFunc, propertyErrorFunc; if (!$wnd_0.__gwt_stylesLoaded) { $wnd_0.__gwt_stylesLoaded = {}; } if (!$wnd_0.__gwt_scriptsLoaded) { $wnd_0.__gwt_scriptsLoaded = {}; } function isHostedMode(){ var result = false; try { var query = $wnd_0.location.search; return (query.indexOf('gwt.codesvr=') != -1 || (query.indexOf('gwt.hosted=') != -1 || $wnd_0.external && $wnd_0.external.gwtOnLoad)) && query.indexOf('gwt.hybrid') == -1; } catch (e) { } isHostedMode = function(){ return result; } ; return result; } function maybeStartModule(){ if (gwtOnLoad && bodyDone) { gwtOnLoad(onLoadErrorFunc, 'tnoodlejs', base, softPermutationId); } } function computeScriptBase(){ var thisScript, markerId = '__gwt_marker_tnoodlejs', markerScript; $doc_0.write('<script id="' + markerId + '"><\/script>'); markerScript = $doc_0.getElementById(markerId); thisScript = markerScript && markerScript.previousSibling; while (thisScript && thisScript.tagName != 'SCRIPT') { thisScript = thisScript.previousSibling; } function getDirectoryOfFile(path){ var hashIndex = path.lastIndexOf('#'); if (hashIndex == -1) { hashIndex = path.length; } var queryIndex = path.indexOf('?'); if (queryIndex == -1) { queryIndex = path.length; } var slashIndex = path.lastIndexOf('/', Math.min(queryIndex, hashIndex)); return slashIndex >= 0?path.substring(0, slashIndex + 1):''; } ; if (thisScript && thisScript.src) { base = getDirectoryOfFile(thisScript.src); } if (base == '') { var baseElements = $doc_0.getElementsByTagName('base'); if (baseElements.length > 0) { base = baseElements[baseElements.length - 1].href; } else { base = getDirectoryOfFile($doc_0.location.href); } } else if (base.match(/^\w+:\/\//)) { } else { var img = $doc_0.createElement('img'); img.src = base + 'clear.cache.gif'; base = getDirectoryOfFile(img.src); } if (markerScript) { markerScript.parentNode.removeChild(markerScript); } } function processMetas(){ var metas = document.getElementsByTagName('meta'); for (var i = 0, n = metas.length; i < n; ++i) { var meta = metas[i], name_0 = meta.getAttribute('name'), content_0; if (name_0) { if (name_0 == 'gwt:property') { content_0 = meta.getAttribute('content'); if (content_0) { var value, eq = content_0.indexOf('='); if (eq >= 0) { name_0 = content_0.substring(0, eq); value = content_0.substring(eq + 1); } else { name_0 = content_0; value = ''; } metaProps[name_0] = value; } } else if (name_0 == 'gwt:onPropertyErrorFn') { content_0 = meta.getAttribute('content'); if (content_0) { try { propertyErrorFunc = eval(content_0); } catch (e) { alert('Bad handler "' + content_0 + '" for "gwt:onPropertyErrorFn"'); } } } else if (name_0 == 'gwt:onLoadErrorFn') { content_0 = meta.getAttribute('content'); if (content_0) { try { onLoadErrorFunc = eval(content_0); } catch (e) { alert('Bad handler "' + content_0 + '" for "gwt:onLoadErrorFn"'); } } } } } } function unflattenKeylistIntoAnswers(propValArray, value){ var answer = answers; for (var i = 0, n = propValArray.length - 1; i < n; ++i) { answer = answer[propValArray[i]] || (answer[propValArray[i]] = []); } answer[propValArray[n]] = value; } function computePropValue(propName){ var value = providers[propName](), allowedValuesMap = values[propName]; if (value in allowedValuesMap) { return value; } var allowedValuesList = []; for (var k in allowedValuesMap) { allowedValuesList[allowedValuesMap[k]] = k; } if (propertyErrorFunc) { propertyErrorFunc(propName, allowedValuesList, value); } throw null; } providers['user.agent'] = function(){ var ua = navigator.userAgent.toLowerCase(); var makeVersion = function(result){ return parseInt(result[1]) * 1000 + parseInt(result[2]); } ; if (function(){ return ua.indexOf('opera') != -1; } ()) return 'opera'; if (function(){ return ua.indexOf('webkit') != -1; } ()) return 'safari'; if (function(){ return ua.indexOf('msie') != -1 && $doc_0.documentMode >= 9; } ()) return 'ie9'; if (function(){ return ua.indexOf('msie') != -1 && $doc_0.documentMode >= 8; } ()) return 'ie8'; if (function(){ var result = /msie ([0-9]+)\.([0-9]+)/.exec(ua); if (result && result.length == 3) return makeVersion(result) >= 6000; } ()) return 'ie6'; if (function(){ return ua.indexOf('gecko') != -1; } ()) return 'gecko1_8'; return 'unknown'; } ; values['user.agent'] = {gecko1_8:0, ie6:1, ie8:2, ie9:3, opera:4, safari:5}; tnoodlejs.onScriptLoad = function(gwtOnLoadFunc){ tnoodlejs = null; gwtOnLoad = gwtOnLoadFunc; maybeStartModule(); } ; if (isHostedMode()) { alert('Single-script hosted mode not yet implemented. See issue ' + 'http://code.google.com/p/google-web-toolkit/issues/detail?id=2079'); return; } computeScriptBase(); processMetas(); try { var strongName; unflattenKeylistIntoAnswers(['gecko1_8'], '6A3536386280D7102EB8DF9B6F10F8A9'); unflattenKeylistIntoAnswers(['ie6'], '6A3536386280D7102EB8DF9B6F10F8A9' + ':1'); unflattenKeylistIntoAnswers(['ie8'], '6A3536386280D7102EB8DF9B6F10F8A9' + ':2'); unflattenKeylistIntoAnswers(['ie9'], '6A3536386280D7102EB8DF9B6F10F8A9' + ':3'); unflattenKeylistIntoAnswers(['opera'], '6A3536386280D7102EB8DF9B6F10F8A9' + ':4'); unflattenKeylistIntoAnswers(['safari'], '6A3536386280D7102EB8DF9B6F10F8A9' + ':5'); strongName = answers[computePropValue('user.agent')]; var idx = strongName.indexOf(':'); if (idx != -1) { softPermutationId = Number(strongName.substring(idx + 1)); } } catch (e) { return; } var onBodyDoneTimerId; function onBodyDone(){ if (!bodyDone) { bodyDone = true; maybeStartModule(); if ($doc_0.removeEventListener) { $doc_0.removeEventListener('DOMContentLoaded', onBodyDone, false); } if (onBodyDoneTimerId) { clearInterval(onBodyDoneTimerId); } } } if ($doc_0.addEventListener) { $doc_0.addEventListener('DOMContentLoaded', function(){ onBodyDone(); } , false); } var onBodyDoneTimerId = setInterval(function(){ if (/loaded|complete/.test($doc_0.readyState)) { onBodyDone(); } } , 50); } tnoodlejs(); (function () {var $gwt_version = "2.5.1";var $wnd = window;var $doc = $wnd.document;var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var $strongName = '6A3536386280D7102EB8DF9B6F10F8A9';var _, P0_longLit = {l:0, m:0, h:0}, P1_longLit = {l:1, m:0, h:0}, Pf_longLit = {l:15, m:0, h:0}, P1e_longLit = {l:30, m:0, h:0}, P32_longLit = {l:50, m:0, h:0}, P64_longLit = {l:100, m:0, h:0}, Pc8_longLit = {l:200, m:0, h:0}, P3e8_longLit = {l:1000, m:0, h:0}, Pea60_longLit = {l:60000, m:0, h:0}, Pf4240_longLit = {l:1000000, m:0, h:0}, P111110_longLit = {l:1118480, m:0, h:0}, Pffffff_longLit = {l:4194303, m:3, h:0}, P111111111110_longLit = {l:1118480, m:279620, h:1}, Pba9876543210_longLit = {l:1323536, m:2777561, h:11}, seedTable = {}, Q$Object = 0, Q$String = 1, Q$boolean_$1 = 2, Q$byte_$1 = 3, Q$char_$1 = 4, Q$Style$HasCssName = 5, Q$Style$TextAlign = 6, Q$HasDirection$Direction = 7, Q$JSONArray = 8, Q$JSONNumber = 9, Q$JSONObject = 10, Q$JSONString = 11, Q$LongLibBase$LongEmul = 12, Q$HtmlLogFormatter = 13, Q$SafeUri = 14, Q$SafeUriString = 15, Q$EventListener = 16, Q$UserAgentAsserter$UserAgentProperty = 17, Q$CubieCube = 18, Q$Search = 19, Q$FullCube = 20, Q$Center1 = 21, Q$CornerCube = 22, Q$Edge3 = 23, Q$FullCube_0 = 24, Q$FullCube_$1 = 25, Q$Search_0 = 26, Q$double_$1 = 27, Q$int_$1 = 28, Q$int_$2 = 29, Q$Serializable = 30, Q$Boolean = 31, Q$CharSequence = 32, Q$Class = 33, Q$Comparable = 34, Q$Double = 35, Q$Enum = 36, Q$Exception = 37, Q$Integer = 38, Q$Number = 39, Q$Object_$1 = 40, Q$StackTraceElement = 41, Q$String_$1 = 42, Q$Throwable = 43, Q$Date = 44, Q$HashMap = 45, Q$LinkedHashMap$ChainEntry = 46, Q$List = 47, Q$Map = 48, Q$Map$Entry = 49, Q$NoSuchElementException = 50, Q$RandomAccess = 51, Q$Set = 52, Q$TreeMap$Node = 53, Q$TreeMap$SubMapType = 54, Q$Handler = 55, Q$Handler_$1 = 56, Q$Logger = 57, Q$InvalidMoveException = 58, Q$InvalidScrambleException = 59, Q$Puzzle = 60, Q$Puzzle$Bucket = 61, Q$Puzzle$PuzzleState = 62, Q$Color = 63, Q$Element = 64, Q$InvalidHexColorException = 65, Q$Path = 66, Q$Path$Command = 67, Q$Point2D$Double = 68, Q$Transform = 69, Q$Exportable = 70, Q$ClockPuzzle = 71, Q$ClockPuzzle$ClockState = 72, Q$CubePuzzle = 73, Q$CubePuzzle$CubeMove = 74, Q$CubePuzzle$CubeMove_$1 = 75, Q$CubePuzzle$CubeState = 76, Q$CubePuzzle$Face = 77, Q$FourByFourCubePuzzle = 78, Q$FourByFourRandomTurnsCubePuzzle = 79, Q$MegaminxPuzzle = 80, Q$MegaminxPuzzle$Face = 81, Q$MegaminxPuzzle$MegaminxState = 82, Q$NoInspectionFiveByFiveCubePuzzle = 83, Q$NoInspectionFourByFourCubePuzzle = 84, Q$NoInspectionThreeByThreeCubePuzzle = 85, Q$PyraminxPuzzle = 86, Q$PyraminxPuzzle$PyraminxState = 87, Q$SkewbPuzzle = 88, Q$SkewbPuzzle$SkewbState = 89, Q$SquareOnePuzzle = 90, Q$SquareOnePuzzle$SquareOneState = 91, Q$SquareOneUnfilteredPuzzle = 92, Q$ThreeByThreeCubeFewestMovesPuzzle = 93, Q$ThreeByThreeCubePuzzle = 94, Q$TwoByTwoCubePuzzle = 95, CM$ = {}; function newSeed(id){ return new seedTable[id]; } function defineSeed(id, superSeed, castableTypeMap){ var seed = seedTable[id]; if (seed && !seed.___clazz$) { _ = seed.prototype; } else { !seed && (seed = seedTable[id] = function(){ } ); _ = seed.prototype = superSeed < 0?{}:newSeed(superSeed); _.castableTypeMap$ = castableTypeMap; } for (var i_0 = 3; i_0 < arguments.length; ++i_0) { arguments[i_0].prototype = _; } if (seed.___clazz$) { _.___clazz$ = seed.___clazz$; seed.___clazz$ = null; } } function makeCastMap(a){ var result = {}; for (var i_0 = 0, c = a.length; i_0 < c; ++i_0) { result[a[i_0]] = 1; } return result; } function nullMethod(){ } defineSeed(1, -1, CM$); _.equals$ = function equals(other){ return this === other; } ; _.getClass$ = function getClass_0(){ return this.___clazz$; } ; _.hashCode$ = function hashCode_0(){ return getHashCode(this); } ; _.toString$ = function toString_0(){ return this.___clazz$.typeName + '@' + toPowerOfTwoString(this.hashCode$()); } ; _.toString = function(){ return this.toString$(); } ; _.typeMarker$ = nullMethod; function setUncaughtExceptionHandler(handler){ sUncaughtExceptionHandler = handler; } var sUncaughtExceptionHandler = null; function $getStackTrace(this$static){ if (this$static.stackTrace == null) { return initDim(_3Ljava_lang_StackTraceElement_2_classLit, makeCastMap([Q$Serializable, Q$Object_$1]), Q$StackTraceElement, 0, 0); } return this$static.stackTrace; } function $setStackTrace(this$static, stackTrace){ var c, copy, i_0; copy = initDim(_3Ljava_lang_StackTraceElement_2_classLit, makeCastMap([Q$Serializable, Q$Object_$1]), Q$StackTraceElement, stackTrace.length, 0); for (i_0 = 0 , c = stackTrace.length; i_0 < c; ++i_0) { if (!stackTrace[i_0]) { throw new NullPointerException_0; } copy[i_0] = stackTrace[i_0]; } this$static.stackTrace = copy; } function Throwable_0(){ com_google_gwt_core_client_impl_StackTraceCreator_Collector().fillInStackTrace(this); } function Throwable_1(message, cause){ com_google_gwt_core_client_impl_StackTraceCreator_Collector().fillInStackTrace(this); this.cause = cause; this.detailMessage = message; } defineSeed(8, 1, makeCastMap([Q$Serializable, Q$Throwable])); _.getMessage = function getMessage(){ return this.detailMessage; } ; _.toString$ = function toString_1(){ var className, msg; className = this.___clazz$.typeName; msg = this.getMessage(); return msg != null?className + ': ' + msg:className; } ; _.cause = null; _.detailMessage = null; _.stackTrace = null; function Exception_0(message){ com_google_gwt_core_client_impl_StackTraceCreator_Collector().fillInStackTrace(this); this.detailMessage = message; } defineSeed(7, 8, makeCastMap([Q$Serializable, Q$Exception, Q$Throwable])); function RuntimeException_0(){ Throwable_0.call(this); } function RuntimeException_1(message){ Exception_0.call(this, message); } defineSeed(6, 7, makeCastMap([Q$Serializable, Q$Exception, Q$Throwable]), RuntimeException_0, RuntimeException_1); function JavaScriptException_0(e){ RuntimeException_0.call(this); this.e = e; this.description = ''; com_google_gwt_core_client_impl_StackTraceCreator_Collector().createStackTrace(this); } function getExceptionDescription(e){ return instanceOfJso(e)?getExceptionDescription0(dynamicCastJso(e)):e + ''; } function getExceptionDescription0(e){ return e == null?null:e.message; } function getExceptionName(e){ return e == null?'null':instanceOfJso(e)?getExceptionName0(dynamicCastJso(e)):instanceOf(e, Q$String)?'String':getClass__devirtual$(e).typeName; } function getExceptionName0(e){ return e == null?null:e.name; } function getExceptionProperties(e){ return instanceOfJso(e)?getProperties(dynamicCastJso(e)):''; } defineSeed(5, 6, makeCastMap([Q$Serializable, Q$Exception, Q$Throwable]), JavaScriptException_0); _.getMessage = function getMessage_0(){ this.message_0 == null && (this.name_0 = getExceptionName(this.e) , this.description = this.description + ': ' + getExceptionDescription(this.e) , this.message_0 = '(' + this.name_0 + ') ' + getExceptionProperties(this.e) + this.description , undefined); return this.message_0; } ; _.description = ''; _.e = null; _.message_0 = null; _.name_0 = null; function equals__devirtual$(this$static, other){ var maybeJsoInvocation; return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.equals$(other):maybeJsoInvocation === other; } function getClass__devirtual$(this$static){ var maybeJsoInvocation; return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.___clazz$:Lcom_google_gwt_core_client_JavaScriptObject_2_classLit; } function hashCode__devirtual$(this$static){ var maybeJsoInvocation; return maybeJsoInvocation = this$static , isJavaObject(maybeJsoInvocation)?maybeJsoInvocation.hashCode$():getHashCode(maybeJsoInvocation); } function create(milliseconds){ return new Date(milliseconds); } function $clinit_JsonUtils(){ var out; $clinit_JsonUtils = nullMethod; escapeTable = (out = ['\\u0000', '\\u0001', '\\u0002', '\\u0003', '\\u0004', '\\u0005', '\\u0006', '\\u0007', '\\b', '\\t', '\\n', '\\u000B', '\\f', '\\r', '\\u000E', '\\u000F', '\\u0010', '\\u0011', '\\u0012', '\\u0013', '\\u0014', '\\u0015', '\\u0016', '\\u0017', '\\u0018', '\\u0019', '\\u001A', '\\u001B', '\\u001C', '\\u001D', '\\u001E', '\\u001F'] , out[34] = '\\"' , out[92] = '\\\\' , out[173] = '\\u00ad' , out[1536] = '\\u0600' , out[1537] = '\\u0601' , out[1538] = '\\u0602' , out[1539] = '\\u0603' , out[1757] = '\\u06dd' , out[1807] = '\\u070f' , out[6068] = '\\u17b4' , out[6069] = '\\u17b5' , out[8203] = '\\u200b' , out[8204] = '\\u200c' , out[8205] = '\\u200d' , out[8206] = '\\u200e' , out[8207] = '\\u200f' , out[8232] = '\\u2028' , out[8233] = '\\u2029' , out[8234] = '\\u202a' , out[8235] = '\\u202b' , out[8236] = '\\u202c' , out[8237] = '\\u202d' , out[8238] = '\\u202e' , out[8288] = '\\u2060' , out[8289] = '\\u2061' , out[8290] = '\\u2062' , out[8291] = '\\u2063' , out[8292] = '\\u2064' , out[8298] = '\\u206a' , out[8299] = '\\u206b' , out[8300] = '\\u206c' , out[8301] = '\\u206d' , out[8302] = '\\u206e' , out[8303] = '\\u206f' , out[65279] = '\\ufeff' , out[65529] = '\\ufff9' , out[65530] = '\\ufffa' , out[65531] = '\\ufffb' , out); typeof JSON == 'object' && typeof JSON.parse == 'function'; } function escapeValue(toEscape){ $clinit_JsonUtils(); var s = toEscape.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g, function(x){ var lookedUp; return lookedUp = escapeTable[x.charCodeAt(0)] , lookedUp == null?x:lookedUp; } ); return '"' + s + '"'; } var escapeTable; defineSeed(14, 1, {}); function apply(jsFunction, thisObj, args){ return jsFunction.apply(thisObj, args); var __0; } function enter(){ var now; if (entryDepth != 0) { now = (new Date).getTime(); if (now - watchdogEntryDepthLastScheduled > 2000) { watchdogEntryDepthLastScheduled = now; watchdogEntryDepthTimerId = watchdogEntryDepthSchedule(); } } if (entryDepth++ == 0) { $flushEntryCommands(($clinit_SchedulerImpl() , INSTANCE)); return true; } return false; } function entry_0(jsFunction){ return function(){ try { return entry0(jsFunction, this, arguments); } catch (e) { throw e; } } ; } function entry0(jsFunction, thisObj, args){ var initialEntry, t; initialEntry = enter(); try { if (sUncaughtExceptionHandler) { try { return apply(jsFunction, thisObj, args); } catch ($e0) { $e0 = caught($e0); if (instanceOf($e0, Q$Throwable)) { t = $e0; $onUncaughtException(sUncaughtExceptionHandler, t); return undefined; } else throw $e0; } } else { return apply(jsFunction, thisObj, args); } } finally { exit(initialEntry); } } function exit(initialEntry){ initialEntry && $flushFinallyCommands(($clinit_SchedulerImpl() , INSTANCE)); --entryDepth; if (initialEntry) { if (watchdogEntryDepthTimerId != -1) { watchdogEntryDepthCancel(watchdogEntryDepthTimerId); watchdogEntryDepthTimerId = -1; } } } function getHashCode(o){ return o.$H || (o.$H = ++sNextHashId); } function watchdogEntryDepthCancel(timerId){ $wnd.clearTimeout(timerId); } function watchdogEntryDepthSchedule(){ return $wnd.setTimeout(function(){ entryDepth != 0 && (entryDepth = 0); watchdogEntryDepthTimerId = -1; } , 10); } var entryDepth = 0, sNextHashId = 0, watchdogEntryDepthLastScheduled = 0, watchdogEntryDepthTimerId = -1; function $clinit_SchedulerImpl(){ $clinit_SchedulerImpl = nullMethod; INSTANCE = new SchedulerImpl_0; } function $flushEntryCommands(this$static){ var oldQueue, rescheduled; if (this$static.entryCommands) { rescheduled = null; do { oldQueue = this$static.entryCommands; this$static.entryCommands = null; rescheduled = runScheduledTasks(oldQueue, rescheduled); } while (this$static.entryCommands); this$static.entryCommands = rescheduled; } } function $flushFinallyCommands(this$static){ var oldQueue, rescheduled; if (this$static.finallyCommands) { rescheduled = null; do { oldQueue = this$static.finallyCommands; this$static.finallyCommands = null; rescheduled = runScheduledTasks(oldQueue, rescheduled); } while (this$static.finallyCommands); this$static.finallyCommands = rescheduled; } } function SchedulerImpl_0(){ } function push(queue, task){ !queue && (queue = []); queue[queue.length] = task; return queue; } function runScheduledTasks(tasks, rescheduled){ var e, i_0, j, t; for (i_0 = 0 , j = tasks.length; i_0 < j; ++i_0) { t = tasks[i_0]; try { t[1]?t[0].nullMethod() && (rescheduled = push(rescheduled, t)):t[0].nullMethod(); } catch ($e0) { $e0 = caught($e0); if (instanceOf($e0, Q$Throwable)) { e = $e0; !!sUncaughtExceptionHandler && $onUncaughtException(sUncaughtExceptionHandler, e); } else throw $e0; } } return rescheduled; } defineSeed(16, 14, {}, SchedulerImpl_0); _.entryCommands = null; _.finallyCommands = null; var INSTANCE; function extractNameFromToString(fnToString){ var index, start, toReturn; toReturn = ''; fnToString = $trim(fnToString); index = fnToString.indexOf('('); start = fnToString.indexOf('function') == 0?8:0; if (index == -1) { index = $indexOf(fnToString, fromCodePoint(64)); start = fnToString.indexOf('function ') == 0?9:0; } index != -1 && (toReturn = $trim(fnToString.substr(start, index - start))); return toReturn.length > 0?toReturn:'anonymous'; } function getProperties(e){ return $getProperties((com_google_gwt_core_client_impl_StackTraceCreator_Collector() , e)); } function parseInt_0(number){ return parseInt(number) || -1; } function splice(arr, length_0){ arr.length >= length_0 && arr.splice(0, length_0); return arr; } function $getProperties(e){ var result = ''; try { for (var prop in e) { if (prop != 'name' && prop != 'message' && prop != 'toString') { try { result += '\n ' + prop + ': ' + e[prop]; } catch (ignored) { } } } } catch (ignored) { } return result; } function $makeException(){ try { null.a(); } catch (e) { return e; } } function StackTraceCreator$Collector_0(){ } defineSeed(19, 1, {}, StackTraceCreator$Collector_0); _.collect = function collect(){ var seen = {}; var toReturn = []; var callee = arguments.callee.caller.caller; while (callee) { var name_0 = this.extractName(callee.toString()); toReturn.push(name_0); var keyName = ':' + name_0; var withThisName = seen[keyName]; if (withThisName) { var i_0, j; for (i_0 = 0 , j = withThisName.length; i_0 < j; i_0++) { if (withThisName[i_0] === callee) { return toReturn; } } } (withThisName || (seen[keyName] = [])).push(callee); callee = callee.caller; } return toReturn; } ; _.createStackTrace = function createStackTrace(e){ var i_0, j, stack, stackTrace; stack = this.inferFrom(instanceOfJso(e.e)?dynamicCastJso(e.e):null); stackTrace = initDim(_3Ljava_lang_StackTraceElement_2_classLit, makeCastMap([Q$Serializable, Q$Object_$1]), Q$StackTraceElement, stack.length, 0); for (i_0 = 0 , j = stackTrace.length; i_0 < j; ++i_0) { stackTrace[i_0] = new StackTraceElement_0(stack[i_0], null, -1); } $setStackTrace(e, stackTrace); } ; _.extractName = function extractName(fnToString){ return extractNameFromToString(fnToString); } ; _.fillInStackTrace = function fillInStackTrace(t){ var i_0, j, stack, stackTrace; stack = com_google_gwt_core_client_impl_StackTraceCreator_Collector().collect(); stackTrace = initDim(_3Ljava_lang_StackTraceElement_2_classLit, makeCastMap([Q$Serializable, Q$Object_$1]), Q$StackTraceElement, stack.length, 0); for (i_0 = 0 , j = stackTrace.length; i_0 < j; ++i_0) { stackTrace[i_0] = new StackTraceElement_0(stack[i_0], null, -1); } $setStackTrace(t, stackTrace); } ; _.inferFrom = function inferFrom(e){ return []; } ; function $inferFrom(this$static, e){ var i_0, j, stack; stack = this$static.getStack(e); for (i_0 = 0 , j = stack.length; i_0 < j; ++i_0) { stack[i_0] = this$static.extractName(stack[i_0]); } return stack; } function StackTraceCreator$CollectorMoz_0(){ } defineSeed(21, 19, {}, StackTraceCreator$CollectorMoz_0); _.collect = function collect_0(){ return splice(this.inferFrom($makeException()), this.toSplice()); } ; _.getStack = function getStack(e){ return e && e.stack?e.stack.split('\n'):[]; } ; _.inferFrom = function inferFrom_0(e){ return $inferFrom(this, e); } ; _.toSplice = function toSplice(){ return 2; } ; function $clinit_StackTraceCreator$CollectorChrome(){ $clinit_StackTraceCreator$CollectorChrome = nullMethod; Error.stackTraceLimit = 128; } function $inferFrom_0(this$static, e){ var stack; stack = $inferFrom(this$static, e); return stack.length == 0?(new StackTraceCreator$Collector_0).inferFrom(e):splice(stack, 1); } function $parseStackTrace(this$static, e, stack){ var col, endFileUrl, fileName, i_0, j, lastColon, line, location_0, stackElements, stackTrace; stackTrace = initDim(_3Ljava_lang_StackTraceElement_2_classLit, makeCastMap([Q$Serializable, Q$Object_$1]), Q$StackTraceElement, stack.length, 0); for (i_0 = 0 , j = stackTrace.length; i_0 < j; ++i_0) { stackElements = $split(stack[i_0], '@@', 0); line = -1; col = -1; fileName = 'Unknown'; if (stackElements.length == 2 && stackElements[1] != null) { location_0 = stackElements[1]; lastColon = $lastIndexOf(location_0, fromCodePoint(58)); endFileUrl = $lastIndexOf_0(location_0, fromCodePoint(58), lastColon - 1); fileName = location_0.substr(0, endFileUrl - 0); if (lastColon != -1 && endFileUrl != -1) { line = parseInt_0(location_0.substr(endFileUrl + 1, lastColon - (endFileUrl + 1))); col = parseInt_0($substring(location_0, lastColon + 1)); } } stackTrace[i_0] = new StackTraceElement_0(stackElements[0], fileName + '@' + col, this$static.replaceIfNoSourceMap(line < 0?-1:line)); } $setStackTrace(e, stackTrace); } defineSeed(20, 21, {}); _.collect = function collect_1(){ var res; res = splice($inferFrom_0(this, $makeException()), 3); res.length == 0 && (res = splice((new StackTraceCreator$Collector_0).collect(), 1)); return res; } ; _.createStackTrace = function createStackTrace_0(e){ var stack; stack = $inferFrom_0(this, instanceOfJso(e.e)?dynamicCastJso(e.e):null); $parseStackTrace(this, e, stack); } ; _.extractName = function extractName_0(fnToString){ var closeParen, index, location_0, toReturn; if (fnToString.length == 0) { return 'anonymous'; } toReturn = $trim(fnToString); toReturn.indexOf('at ') == 0 && (toReturn = $substring(toReturn, 3)); index = toReturn.indexOf('['); index != -1 && (toReturn = $trim(toReturn.substr(0, index - 0)) + $trim($substring(toReturn, toReturn.indexOf(']', index) + 1))); index = toReturn.indexOf('('); if (index == -1) { index = toReturn.indexOf('@'); if (index == -1) { location_0 = toReturn; toReturn = ''; } else { location_0 = $trim($substring(toReturn, index + 1)); toReturn = $trim(toReturn.substr(0, index - 0)); } } else { closeParen = toReturn.indexOf(')', index); location_0 = toReturn.substr(index + 1, closeParen - (index + 1)); toReturn = $trim(toReturn.substr(0, index - 0)); } index = $indexOf(toReturn, fromCodePoint(46)); index != -1 && (toReturn = $substring(toReturn, index + 1)); return (toReturn.length > 0?toReturn:'anonymous') + '@@' + location_0; } ; _.fillInStackTrace = function fillInStackTrace_0(t){ var stack; stack = com_google_gwt_core_client_impl_StackTraceCreator_Collector().collect(); $parseStackTrace(this, t, stack); } ; _.inferFrom = function inferFrom_1(e){ return $inferFrom_0(this, e); } ; _.replaceIfNoSourceMap = function replaceIfNoSourceMap(line){ return line; } ; _.toSplice = function toSplice_0(){ return 3; } ; function StackTraceCreator$CollectorChromeNoSourceMap_0(){ $clinit_StackTraceCreator$CollectorChrome(); } defineSeed(22, 20, {}, StackTraceCreator$CollectorChromeNoSourceMap_0); _.replaceIfNoSourceMap = function replaceIfNoSourceMap_0(line){ return -1; } ; function StackTraceCreator$CollectorOpera_0(){ } defineSeed(23, 21, {}, StackTraceCreator$CollectorOpera_0); _.extractName = function extractName_1(fnToString){ return fnToString.length == 0?'anonymous':fnToString; } ; _.getStack = function getStack_0(e){ var i_0, i2, idx, j, toReturn; toReturn = e && e.message?e.message.split('\n'):[]; for (i_0 = 0 , i2 = 0 , j = toReturn.length; i2 < j; ++i_0 , i2 += 2) { idx = toReturn[i2].lastIndexOf('function '); idx == -1?(toReturn[i_0] = '' , undefined):(toReturn[i_0] = $trim($substring(toReturn[i2], idx + 9)) , undefined); } toReturn.length = i_0; return toReturn; } ; _.toSplice = function toSplice_1(){ return 3; } ; defineSeed(24, 1, {}); function StringBufferImplAppend_0(){ } defineSeed(25, 24, {}, StringBufferImplAppend_0); _.append = function append(data, x){ this.string += x; } ; _.append_0 = function append_0(data, x){ this.string += x; } ; _.append_1 = function append_1(data, x){ this.string += x; } ; _.append_2 = function append_2(data, x){ this.string += x; } ; _.appendNonNull = function appendNonNull(data, x){ this.string += x; } ; _.createData = function createData(){ return null; } ; _.length_0 = function length_1(data){ return this.string.length; } ; _.replace_0 = function replace_0(data, start, end, toInsert){ this.string = $substring_0(this.string, 0, start) + toInsert + $substring(this.string, end); } ; _.toString_0 = function toString_2(data){ return this.string; } ; _.string = ''; function $appendNonNull(a, x){ a[a.explicitLength++] = x; } function $takeString(a){ var s = a.join(''); a.length = a.explicitLength = 0; return s; } function $toString(this$static, a){ var s; s = $takeString(a); $appendNonNull(a, s); return s; } defineSeed(27, 24, {}); _.append = function append_3(a, x){ a[a.explicitLength++] = x; } ; _.append_0 = function append_4(a, x){ a[a.explicitLength++] = x; } ; _.append_1 = function append_5(a, x){ $appendNonNull(a, '' + x); } ; _.append_2 = function append_6(a, x){ a[a.explicitLength++] = x == null?'null':x; } ; _.appendNonNull = function appendNonNull_0(a, x){ $appendNonNull(a, x); } ; _.createData = function createData_0(){ var array = []; array.explicitLength = 0; return array; } ; _.length_0 = function length_2(a){ return $toString(this, a).length; } ; _.replace_0 = function replace_1(a, start, end, toInsert){ var s; s = $takeString(a); $appendNonNull(a, s.substr(0, start - 0)); a[a.explicitLength++] = toInsert == null?'null':toInsert; $appendNonNull(a, $substring(s, end)); } ; _.toString_0 = function toString_3(a){ return $toString(this, a); } ; function StringBufferImplArray_0(){ } defineSeed(26, 27, {}, StringBufferImplArray_0); function $clinit_DOMImpl(){ $clinit_DOMImpl = nullMethod; impl_0 = com_google_gwt_dom_client_DOMImpl(); } function $getFirstChildElement(elem){ var child = elem.firstChild; while (child && child.nodeType != 1) child = child.nextSibling; return child; } defineSeed(28, 1, {}); _.createElement_0 = function createElement(doc, tag){ return doc.createElement(tag); } ; _.getTagName = function getTagName(elem){ return elem.tagName; } ; _.imgSetSrc = function imgSetSrc(img, src){ img.src = src; } ; _.setInnerText = function setInnerText(elem, text){ while (elem.firstChild) { elem.removeChild(elem.firstChild); } text != null && elem.appendChild(elem.ownerDocument.createTextNode(text)); } ; _.toString_1 = function toString_4(elem){ return elem.outerHTML; } ; var impl_0; function isOrHasChildImpl(parent_0, child){ if (parent_0.nodeType != 1 && parent_0.nodeType != 9) { return parent_0 == child; } if (child.nodeType != 1) { child = child.parentNode; if (!child) { return false; } } if (parent_0.nodeType == 9) { return parent_0 === child || parent_0.body && parent_0.body.contains(child); } else { return parent_0 === child || parent_0.contains(child); } } defineSeed(30, 28, {}); _.createElement_0 = function createElement_0(doc, tagName){ var container, elem; if (tagName.indexOf(':') != -1) { container = (!doc.__gwt_container && (doc.__gwt_container = doc.createElement('div')) , doc.__gwt_container); container.innerHTML = '<' + tagName + '/>' || ''; elem = $getFirstChildElement(($clinit_DOMImpl() , container)); container.removeChild(elem); return elem; } return doc.createElement(tagName); } ; _.eventGetRelatedTarget = function eventGetRelatedTarget(evt){ return evt.relatedTarget || (evt.type == 'mouseout'?evt.toElement:evt.fromElement); } ; _.getTagName = function getTagName_0(elem){ var scopeName, tagName; tagName = elem.tagName; scopeName = elem.scopeName; if (scopeName == null || $equalsIgnoreCase('html', scopeName)) { return tagName; } return scopeName + ':' + tagName; } ; _.isOrHasChild = function isOrHasChild(parent_0, child){ return isOrHasChildImpl(parent_0, child); } ; _.setInnerText = function setInnerText_0(elem, text){ elem.innerText = text || ''; } ; var currentEventTarget = null; function DOMImplIE6_0(){ $clinit_DOMImpl(); } function isIE6_0(){ if (!isIE6Detected) { isIE6 = isIE6Impl(); isIE6Detected = true; } return isIE6; } function isIE6Impl(){ function makeVersion(result){ return parseInt(result[1]) * 1000 + parseInt(result[2]); } var ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('msie') != -1) { var result_0 = /msie ([0-9]+)\.([0-9]+)/.exec(ua); if (result_0 && result_0.length == 3) { var v = makeVersion(result_0); if (v < 7000) { return true; } } } return false; } defineSeed(29, 30, {}, DOMImplIE6_0); _.imgSetSrc = function imgSetSrc_0(img, src){ isIE6_0()?setImgSrc(img, src):(img.src = src , undefined); } ; var isIE6 = false, isIE6Detected = false; function DOMImplIE8_0(){ $clinit_DOMImpl(); } defineSeed(31, 30, {}, DOMImplIE8_0); defineSeed(34, 28, {}); _.eventGetRelatedTarget = function eventGetRelatedTarget_0(evt){ return evt.relatedTarget; } ; _.isOrHasChild = function isOrHasChild_0(parent_0, child){ return parent_0.contains(child); } ; _.setInnerText = function setInnerText_1(elem, text){ elem.textContent = text || ''; } ; defineSeed(33, 34, {}); function DOMImplIE9_0(){ $clinit_DOMImpl(); } defineSeed(32, 33, {}, DOMImplIE9_0); _.isOrHasChild = function isOrHasChild_1(parent_0, child){ return isOrHasChildImpl(parent_0, child); } ; function DOMImplMozilla_0(){ $clinit_DOMImpl(); } defineSeed(35, 34, {}, DOMImplMozilla_0); _.eventGetRelatedTarget = function eventGetRelatedTarget_1(evt){ var relatedTarget = evt.relatedTarget; if (!relatedTarget) { return null; } try { var nodeName = relatedTarget.nodeName; return relatedTarget; } catch (e) { return null; } } ; _.isOrHasChild = function isOrHasChild_2(parent_0, child){ return parent_0 === child || !!(parent_0.compareDocumentPosition(child) & 16); } ; _.toString_1 = function toString_5(elem){ var doc = elem.ownerDocument; var temp = elem.cloneNode(true); var tempDiv = doc.createElement('DIV'); tempDiv.appendChild(temp); outer = tempDiv.innerHTML; temp.innerHTML = ''; return outer; } ; function DOMImplOpera_0(){ $clinit_DOMImpl(); } defineSeed(36, 34, {}, DOMImplOpera_0); function DOMImplWebkit_0(){ $clinit_DOMImpl(); } defineSeed(37, 33, {}, DOMImplWebkit_0); function $isOrHasChild(this$static, child){ return ($clinit_DOMImpl() , impl_0).isOrHasChild(this$static, child); } function $createDivElement(this$static){ return ($clinit_DOMImpl() , impl_0).createElement_0(this$static, 'div'); } function $createImageElement(this$static){ return ($clinit_DOMImpl() , impl_0).createElement_0(this$static, 'img'); } function $getString(this$static){ return ($clinit_DOMImpl() , impl_0).toString_1(this$static); } function $setInnerHTML(this$static, html){ this$static.innerHTML = html || ''; } function $setInnerText(this$static, text){ ($clinit_DOMImpl() , impl_0).setInnerText(this$static, text); } function $setSrc(this$static, src){ ($clinit_DOMImpl() , impl_0).imgSetSrc(this$static, src); } function $clinit_ImageSrcIE6(){ $clinit_ImageSrcIE6 = nullMethod; executeBackgroundImageCacheCommand(); } function addTop(srcImgMap, img, src){ img.src = src; if (img.complete) { return; } img.__kids = []; img.__pendingSrc = src; srcImgMap[src] = img; var _onload = img.onload, _onerror = img.onerror, _onabort = img.onabort; function finish(_originalHandler){ var kids = img.__kids; img.__cleanup(); window.setTimeout(function(){ for (var i_0 = 0; i_0 < kids.length; ++i_0) { var kid = kids[i_0]; if (kid.__pendingSrc == src) { kid.src = src; kid.__pendingSrc = null; } } } , 0); _originalHandler && _originalHandler.call(img); } img.onload = function(){ finish(_onload); } ; img.onerror = function(){ finish(_onerror); } ; img.onabort = function(){ finish(_onabort); } ; img.__cleanup = function(){ img.onload = _onload; img.onerror = _onerror; img.onabort = _onabort; img.__cleanup = img.__pendingSrc = img.__kids = null; delete srcImgMap[src]; } ; } function cleanupExpandos(img){ img.__cleanup = img.__pendingSrc = img.__kids = null; } function executeBackgroundImageCacheCommand(){ try { $doc.execCommand('BackgroundImageCache', false, true); } catch (e) { } } function removeChild(parent_0, child, checkOnly){ var kids = parent_0.__kids; for (var i_0 = 0, c = kids.length; i_0 < c; ++i_0) { if (kids[i_0] === child) { if (!checkOnly) { kids.splice(i_0, 1); child.__pendingSrc = null; } return true; } } return false; } function removeTop(srcImgMap, img){ var src = img.__pendingSrc; var kids = img.__kids; img.__cleanup(); if (img = kids[0]) { img.__pendingSrc = null; addTop(srcImgMap, img, src); if (img.__pendingSrc) { kids.splice(0, 1); img.__kids = kids; } else { for (var i_0 = 1, c = kids.length; i_0 < c; ++i_0) { kids[i_0].src = src; kids[i_0].__pendingSrc = null; } } } } function setImgSrc(img, src){ $clinit_ImageSrcIE6(); var isSameSource, oldSrc, top_0; isSameSource = $equals_0(img.__pendingSrc || img.src, src); !srcImgMap_0 && (srcImgMap_0 = {}); oldSrc = img.__pendingSrc; if (oldSrc != null) { top_0 = srcImgMap_0[oldSrc]; if (!top_0) { cleanupExpandos(img); } else if (top_0 == img) { if (isSameSource) { return; } removeTop(srcImgMap_0, top_0); } else if (removeChild(top_0, img, isSameSource)) { if (isSameSource) { return; } } else { cleanupExpandos(img); } } top_0 = srcImgMap_0[src]; !top_0?addTop(srcImgMap_0, img, src):(top_0.__kids.push(img) , img.__pendingSrc = top_0.__pendingSrc , undefined); } var srcImgMap_0 = null; function $compareTo(this$static, other){ return this$static.ordinal - other.ordinal; } function Enum_0(name_0, ordinal){ this.name_0 = name_0; this.ordinal = ordinal; } function createValueOfMap(enumConstants){ var result, value, value$index, value$max; result = {}; for (value$index = 0 , value$max = enumConstants.length; value$index < value$max; ++value$index) { value = enumConstants[value$index]; result[':' + value.name_0] = value; } return result; } function valueOf(map, name_0){ var result; result = map[':' + name_0]; if (result) { return result; } if (name_0 == null) { throw new NullPointerException_0; } throw new IllegalArgumentException_0; } defineSeed(46, 1, makeCastMap([Q$Serializable, Q$Comparable, Q$Enum])); _.compareTo$ = function compareTo(other){ return $compareTo(this, dynamicCast(other, Q$Enum)); } ; _.equals$ = function equals_0(other){ return this === other; } ; _.hashCode$ = function hashCode_1(){ return getHashCode(this); } ; _.toString$ = function toString_6(){ return this.name_0; } ; _.name_0 = null; _.ordinal = 0; function $clinit_Style$TextAlign(){ $clinit_Style$TextAlign = nullMethod; CENTER = new Style$TextAlign$1_0; JUSTIFY = new Style$TextAlign$2_0; LEFT = new Style$TextAlign$3_0; RIGHT = new Style$TextAlign$4_0; $VALUES = initValues(_3Lcom_google_gwt_dom_client_Style$TextAlign_2_classLit, makeCastMap([Q$Serializable, Q$Object_$1]), Q$Style$TextAlign, [CENTER, JUSTIFY, LEFT, RIGHT]); } function values_0(){ $clinit_Style$TextAlign(); return $VALUES; } defineSeed(45, 46, makeCastMap([Q$Style$HasCssName, Q$Style$TextAlign, Q$Serializable, Q$Comparable, Q$Enum])); var $VALUES, CENTER, JUSTIFY, LEFT, RIGHT; function Style$TextAlign$1_0(){ Enum_0.call(this, 'CENTER', 0); } defineSeed(47, 45, makeCastMap([Q$Style$HasCssName, Q$Style$TextAlign, Q$Serializable, Q$Comparable, Q$Enum]), Style$TextAlign$1_0); function Style$TextAlign$2_0(){ Enum_0.call(this, 'JUSTIFY', 1); } defineSeed(48, 45, makeCastMap([Q$Style$HasCssName, Q$Style$TextAlign, Q$Serializable, Q$Comparable, Q$Enum]), Style$TextAlign$2_0); function Style$TextAlign$3_0(){ Enum_0.call(this, 'LEFT', 2); } defineSeed(49, 45, makeCastMap([Q$Style$HasCssName, Q$Style$TextAlign, Q$Serializable, Q$Comparable, Q$Enum]), Style$TextAlign$3_0); function Style$TextAlign$4_0(){ Enum_0.call(this, 'RIGHT', 3); } defineSeed(50, 45, makeCastMap([Q$Style$HasCssName, Q$Style$TextAlign, Q$Serializable, Q$Comparable, Q$Enum]), Style$TextAlign$4_0); function fireNativeEvent(){ } function throwIfNull(value){ if (null == value) { throw new NullPointerException_1('encodedURLComponent cannot be null'); } } function getDirectionOnElement(elem){ var dirPropertyValue; dirPropertyValue = elem['dir'] == null?null:String(elem['dir']); if ($equalsIgnoreCase('rtl', dirPropertyValue)) { return $clinit_HasDirection$Direction() , RTL; } else if ($equalsIgnoreCase('ltr', dirPropertyValue)) { return $clinit_HasDirection$Direction() , LTR; } return $clinit_HasDirection$Direction() , DEFAULT; } function setDirectionOnElement(elem, direction){ switch (direction.ordinal) { case 0: { elem['dir'] = 'rtl'; break; } case 1: { elem['dir'] = 'ltr'; break; } case 2: { getDirectionOnElement(elem) != ($clinit_HasDirection$Direction() , DEFAULT) && (elem['dir'] = '' , undefined); break; } } } function $clinit_HasDirection$Direction(){ $clinit_HasDirection$Direction = nullMethod; RTL = new HasDirection$Direction_0('RTL', 0); LTR = new HasDirection$Direction_0('LTR', 1); DEFAULT = new HasDirection$Direction_0('DEFAULT', 2); $VALUES_0 = initValues(_3Lcom_google_gwt_i18n_client_HasDirection$Direction_2_classLit, makeCastMap([Q$Serializable, Q$Object_$1]), Q$HasDirection$Direction, [RTL, LTR, DEFAULT]); } function HasDirection$Direction_0(enum$name, enum$ordinal){ Enum_0.call(this, enum$name, enum$ordinal); } function values_1(){ $clinit_HasDirection$Direction(); return $VALUES_0; } defineSeed(59, 46, makeCastMap([Q$HasDirection$Direction, Q$Serializable, Q$Comparable, Q$Enum]), HasDirection$Direction_0); var $VALUES_0, DEFAULT, LTR, RTL; function $clinit_LocaleInfo(){ $clinit_LocaleInfo = nullMethod; instance_0 = new LocaleInfo_0; } function $getNumberConstants(this$static){ !this$static.numberConstants && (this$static.numberConstants = new NumberConstantsImpl__0); return this$static.numberConstants; } function LocaleInfo_0(){ } defineSeed(60, 1, {}, LocaleInfo_0); _.numberConstants = null; var instance_0; function $clinit_NumberFormat(){ $clinit_NumberFormat = nullMethod; $getNumberConstants(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance_0)); } function $addExponent(this$static, digits){ var exponentDigits, i_0; digits.impl.append_2(digits.data, 'E'); if (this$static.exponent < 0) { this$static.exponent = -this$static.exponent; digits.impl.append_2(digits.data, '-'); } exponentDigits = '' + this$static.exponent; for (i_0 = exponentDigits.length; i_0 < this$static.minExponentDigits; ++i_0) { digits.impl.appendNonNull(digits.data, '0'); } digits.impl.append_2(digits.data, exponentDigits); } function $addZeroAndDecimal(this$static, digits){ if (this$static.digitsLength == 0) { digits.impl.replace_0(digits.data, 0, 0, '0'); ++this$static.decimalPosition; ++this$static.digitsLength; } if (this$static.decimalPosition < this$static.digitsLength || this$static.decimalSeparatorAlwaysShown) { $insert(digits, this$static.decimalPosition, '.'); ++this$static.digitsLength; } } function $adjustFractionDigits(this$static, digits){ var requiredDigits, toRemove; requiredDigits = this$static.decimalPosition + this$static.minimumFractionDigits; if (this$static.digitsLength < requiredDigits) { while (this$static.digitsLength < requiredDigits) { digits.impl.appendNonNull(digits.data, '0'); ++this$static.digitsLength; } } else { toRemove = this$static.decimalPosition + this$static.maximumFractionDigits; toRemove > this$static.digitsLength && (toRemove = this$static.digitsLength); while (toRemove > requiredDigits && $charAt(digits.impl.toString_0(digits.data), toRemove - 1) == 48) { --toRemove; } if (toRemove < this$static.digitsLength) { $delete_0(digits, toRemove, this$static.digitsLength); this$static.digitsLength = toRemove; } } } function $computeExponent(this$static, digits){ var remainder, strip; strip = 0; while (strip < this$static.digitsLength - 1 && $charAt(digits.impl.toString_0(digits.data), strip) == 48) { ++strip; } if (strip > 0) { digits.impl.replace_0(digits.data, 0, strip, ''); this$static.digitsLength -= strip; this$static.exponent -= strip; } if (this$static.maximumIntegerDigits > this$static.minimumIntegerDigits && this$static.maximumIntegerDigits > 0) { this$static.exponent += this$static.decimalPosition - 1; remainder = this$static.exponent % this$static.maximumIntegerDigits; remainder < 0 && (remainder += this$static.maximumIntegerDigits); this$static.decimalPosition = remainder + 1; this$static.exponent -= remainder; } else { this$static.exponent += this$static.decimalPosition - this$static.minimumIntegerDigits; this$static.decimalPosition = this$static.minimumIntegerDigits; } if (this$static.digitsLength == 1 && digits.impl.toString_0(digits.data).charCodeAt(0) == 48) { this$static.exponent = 0; this$static.decimalPosition = this$static.minimumIntegerDigits; } } function $format(this$static, number){ var buf, isNegative, preRound, scale, useExponent, currentGroupingSize; if (isNaN(number)) { return 'NaN'; } isNegative = number < 0 || number == 0 && 1 / number < 0; isNegative && (number = -number); buf = new StringBuilder_0; if (!isFinite(number)) { $append_5(buf, isNegative?this$static.negativePrefix:this$static.positivePrefix); buf.impl.append_2(buf.data, '\u221E'); $append_5(buf, isNegative?this$static.negativeSuffix:this$static.positiveSuffix); return buf.impl.toString_0(buf.data); } number *= this$static.multiplier; scale = toScaledString(buf, number); preRound = buf.impl.length_0(buf.data) + scale + this$static.maximumFractionDigits + 3; if (preRound > 0 && preRound < buf.impl.length_0(buf.data) && $charAt(buf.impl.toString_0(buf.data), preRound) == 57) { $propagateCarry(this$static, buf, preRound - 1); scale += buf.impl.length_0(buf.data) - preRound; $delete_0(buf, preRound, buf.impl.length_0(buf.data)); } this$static.exponent = 0; this$static.digitsLength = buf.impl.length_0(buf.data); this$static.decimalPosition = this$static.digitsLength + scale; useExponent = this$static.useExponentialNotation; currentGroupingSize = this$static.groupingSize; this$static.decimalPosition > 1024 && (useExponent = true); useExponent && $computeExponent(this$static, buf); $processLeadingZeros(this$static, buf); $roundValue(this$static, buf); $insertGroupingSeparators(this$static, buf, currentGroupingSize); $adjustFractionDigits(this$static, buf); $addZeroAndDecimal(this$static, buf); useExponent && $addExponent(this$static, buf); $insert(buf, 0, isNegative?this$static.negativePrefix:this$static.positivePrefix); $append_5(buf, isNegative?this$static.negativeSuffix:this$static.positiveSuffix); return buf.impl.toString_0(buf.data); } function $insertGroupingSeparators(this$static, digits, g){ var i_0; if (g > 0) { for (i_0 = g; i_0 < this$static.decimalPosition; i_0 += g + 1) { $insert(digits, this$static.decimalPosition - i_0, ','); ++this$static.decimalPosition; ++this$static.digitsLength; } } } function $parseAffix(this$static, pattern, start, affix, inNegativePattern){ var ch, inQuote, len, pos; $delete(affix, affix.impl.length_0(affix.data)); inQuote = false; len = pattern.length; for (pos = start; pos < len; ++pos) { ch = pattern.charCodeAt(pos); if (ch == 39) { if (pos + 1 < len && pattern.charCodeAt(pos + 1) == 39) { ++pos; affix.impl.append_2(affix.data, "'"); } else { inQuote = !inQuote; } continue; } if (inQuote) { affix.impl.appendNonNull(affix.data, String.fromCharCode(ch)); } else { switch (ch) { case 35: case 48: case 44: case 46: case 59: return pos - start; case 164: this$static.isCurre