From cdc90f40590f18902674867ea7ce7be2cf4c2d5e Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Thu, 8 Aug 2019 10:45:01 -0700 Subject: [PATCH 01/17] Refactored field utilities. --- core/block.js | 8 +- core/block_dragger.js | 5 +- core/block_svg.js | 12 +-- core/field.js | 136 +--------------------------- core/field_angle.js | 3 +- core/field_checkbox.js | 3 +- core/field_colour.js | 3 +- core/field_date.js | 3 +- core/field_dropdown.js | 9 +- core/field_image.js | 3 +- core/field_label.js | 3 +- core/field_label_serializable.js | 3 +- core/field_number.js | 3 +- core/field_textinput.js | 3 +- core/field_variable.js | 3 +- core/flyout_button.js | 2 +- core/utils/dom.js | 75 +++++++++++++++ core/utils/field.js | 92 +++++++++++++++++++ core/xml.js | 4 +- demos/custom-fields/field_turtle.js | 2 +- tests/mocha/field_test.js | 4 +- 21 files changed, 214 insertions(+), 165 deletions(-) create mode 100644 core/utils/field.js diff --git a/core/block.js b/core/block.js index eeb4a0c48..43fe84f8d 100644 --- a/core/block.js +++ b/core/block.js @@ -39,6 +39,7 @@ goog.require('Blockly.Input'); goog.require('Blockly.Mutator'); goog.require('Blockly.utils'); goog.require('Blockly.utils.Coordinate'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.string'); goog.require('Blockly.Warning'); goog.require('Blockly.Workspace'); @@ -1636,18 +1637,13 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) { default: // This should handle all field JSON parsing, including // options that can be applied to any field type. - field = Blockly.Field.fromJson(element); + field = Blockly.utils.fields.fromJson(element); // Unknown field. if (!field) { if (element['alt']) { element = element['alt']; altRepeat = true; - } else { - console.warn('Blockly could not create a field of type ' + - element['type'] + - '. You may need to register your custom field. See ' + - 'github.com/google/blockly/issues/1584'); } } } diff --git a/core/block_dragger.js b/core/block_dragger.js index fa6bc723d..7e64b8e8e 100644 --- a/core/block_dragger.js +++ b/core/block_dragger.js @@ -31,6 +31,7 @@ goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockMove'); goog.require('Blockly.InsertionMarkerManager'); goog.require('Blockly.utils.Coordinate'); +goog.require('Blockly.utils.dom'); /** @@ -164,7 +165,7 @@ Blockly.BlockDragger.prototype.startBlockDrag = function(currentDragDeltaXY, // During a drag there may be a lot of rerenders, but not field changes. // Turn the cache on so we don't do spurious remeasures during the drag. - Blockly.Field.startCache(); + Blockly.utils.dom.startTextWidthCache(); this.workspace_.setResizesEnabled(false); Blockly.blockAnimations.disconnectUiStop(); @@ -225,7 +226,7 @@ Blockly.BlockDragger.prototype.endBlockDrag = function(e, currentDragDeltaXY) { this.dragBlock(e, currentDragDeltaXY); this.dragIconData_ = []; - Blockly.Field.stopCache(); + Blockly.utils.dom.stopTextWidthCache(); Blockly.blockAnimations.disconnectUiStop(); diff --git a/core/block_svg.js b/core/block_svg.js index 9db42e1b6..4c22e0fbe 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -270,9 +270,9 @@ Blockly.BlockSvg.prototype.setParent = function(newParent) { return; } - Blockly.Field.startCache(); + Blockly.utils.dom.startTextWidthCache(); Blockly.BlockSvg.superClass_.setParent.call(this, newParent); - Blockly.Field.stopCache(); + Blockly.utils.dom.stopTextWidthCache(); var svgRoot = this.getSvgRoot(); @@ -893,7 +893,7 @@ Blockly.BlockSvg.prototype.dispose = function(healStack, animate) { return; } Blockly.Tooltip.hide(); - Blockly.Field.startCache(); + Blockly.utils.dom.startTextWidthCache(); // Save the block's workspace temporarily so we can resize the // contents once the block is disposed. var blockWorkspace = this.workspace; @@ -952,7 +952,7 @@ Blockly.BlockSvg.prototype.dispose = function(healStack, animate) { this.svgPath_ = null; this.svgPathLight_ = null; this.svgPathDark_ = null; - Blockly.Field.stopCache(); + Blockly.utils.dom.stopTextWidthCache(); }; /** @@ -1539,7 +1539,7 @@ Blockly.BlockSvg.prototype.positionNearConnection = function(sourceConnection, * If true, also render block's parent, grandparent, etc. Defaults to true. */ Blockly.BlockSvg.prototype.render = function(opt_bubble) { - Blockly.Field.startCache(); + Blockly.utils.dom.startTextWidthCache(); this.rendered = true; // TODO (#2702): Choose an API for picking the renderer. Blockly.blockRendering.render(this); @@ -1555,7 +1555,7 @@ Blockly.BlockSvg.prototype.render = function(opt_bubble) { this.workspace.resizeContents(); } } - Blockly.Field.stopCache(); + Blockly.utils.dom.stopTextWidthCache(); }; /** diff --git a/core/field.js b/core/field.js index ff34e0baa..54554129a 100644 --- a/core/field.js +++ b/core/field.js @@ -57,71 +57,6 @@ Blockly.Field = function(value, opt_validator) { opt_validator && this.setValidator(opt_validator); }; -/** - * The set of all registered fields, keyed by field type as used in the JSON - * definition of a block. - * @type {!Object} - * @private - */ -Blockly.Field.TYPE_MAP_ = {}; - -/** - * Registers a field type. May also override an existing field type. - * Blockly.Field.fromJson uses this registry to find the appropriate field. - * @param {string} type The field type name as used in the JSON definition. - * @param {!{fromJson: Function}} fieldClass The field class containing a - * fromJson function that can construct an instance of the field. - * @throws {Error} if the type name is empty, or the fieldClass is not an - * object containing a fromJson function. - */ -Blockly.Field.register = function(type, fieldClass) { - if ((typeof type != 'string') || (type.trim() == '')) { - throw Error('Invalid field type "' + type + '"'); - } - if (!fieldClass || (typeof fieldClass.fromJson != 'function')) { - throw Error('Field "' + fieldClass + '" must have a fromJson function'); - } - Blockly.Field.TYPE_MAP_[type] = fieldClass; -}; - -/** - * Construct a Field from a JSON arg object. - * Finds the appropriate registered field by the type name as registered using - * Blockly.Field.register. - * @param {!Object} options A JSON object with a type and options specific - * to the field type. - * @return {Blockly.Field} The new field instance or null if a field wasn't - * found with the given type name - * @package - */ -Blockly.Field.fromJson = function(options) { - var fieldClass = Blockly.Field.TYPE_MAP_[options['type']]; - if (fieldClass) { - var field = fieldClass.fromJson(options); - if (options['tooltip'] !== undefined) { - var rawValue = options['tooltip']; - var localizedText = Blockly.utils.replaceMessageReferences(rawValue); - field.setTooltip(localizedText); - } - return field; - } - return null; -}; - -/** - * Temporary cache of text widths. - * @type {Object} - * @private - */ -Blockly.Field.cacheWidths_ = null; - -/** - * Number of current references to cache. - * @type {number} - * @private - */ -Blockly.Field.cacheReference_ = 0; - /** * The default height of the border rect on any field. * @type {number} @@ -588,14 +523,14 @@ Blockly.Field.prototype.render_ = function() { /** * Updates the width of the field. Redirects to updateSize_(). * @deprecated May 2019 Use Blockly.Field.updateSize_() to force an update - * to the size of the field, or Blockly.Field.getCachedWidth() to check the - * size of the field.. + * to the size of the field, or Blockly.utils.dom.getTextWidth() to + * check the size of the field. */ Blockly.Field.prototype.updateWidth = function() { console.warn('Deprecated call to updateWidth, call' + ' Blockly.Field.updateSize_ to force an update to the size of the' + - ' field, or Blockly.Field.getCachedWidth() to check the size of the' + - ' field.'); + ' field, or Blockly.utils.dom.getTextWidth() to check the size' + + ' of the field.'); this.updateSize_(); }; @@ -604,7 +539,7 @@ Blockly.Field.prototype.updateWidth = function() { * @protected */ Blockly.Field.prototype.updateSize_ = function() { - var textWidth = Blockly.Field.getCachedWidth(this.textElement_); + var textWidth = Blockly.utils.dom.getTextWidth(this.textElement_); var totalWidth = textWidth; if (this.borderRect_) { totalWidth += Blockly.Field.X_PADDING; @@ -613,67 +548,6 @@ Blockly.Field.prototype.updateSize_ = function() { this.size_.width = totalWidth; }; -/** - * Gets the width of a text element, caching it in the process. - * @param {!Element} textElement An SVG 'text' element. - * @return {number} Width of element. - */ -Blockly.Field.getCachedWidth = function(textElement) { - var key = textElement.textContent + '\n' + textElement.className.baseVal; - var width; - - // Return the cached width if it exists. - if (Blockly.Field.cacheWidths_) { - width = Blockly.Field.cacheWidths_[key]; - if (width) { - return width; - } - } - - // Attempt to compute fetch the width of the SVG text element. - try { - if (Blockly.utils.userAgent.IE || Blockly.utils.userAgent.EDGE) { - width = textElement.getBBox().width; - } else { - width = textElement.getComputedTextLength(); - } - } catch (e) { - // In other cases where we fail to geth the computed text. Instead, use an - // approximation and do not cache the result. At some later point in time - // when the block is inserted into the visible DOM, this method will be - // called again and, at that point in time, will not throw an exception. - return textElement.textContent.length * 8; - } - - // Cache the computed width and return. - if (Blockly.Field.cacheWidths_) { - Blockly.Field.cacheWidths_[key] = width; - } - return width; -}; - -/** - * Start caching field widths. Every call to this function MUST also call - * stopCache. Caches must not survive between execution threads. - */ -Blockly.Field.startCache = function() { - Blockly.Field.cacheReference_++; - if (!Blockly.Field.cacheWidths_) { - Blockly.Field.cacheWidths_ = {}; - } -}; - -/** - * Stop caching field widths. Unless caching was already on when the - * corresponding call to startCache was made. - */ -Blockly.Field.stopCache = function() { - Blockly.Field.cacheReference_--; - if (!Blockly.Field.cacheReference_) { - Blockly.Field.cacheWidths_ = null; - } -}; - /** * Returns the height and width of the field. * diff --git a/core/field_angle.js b/core/field_angle.js index f4871ba7b..aeb91e536 100644 --- a/core/field_angle.js +++ b/core/field_angle.js @@ -29,6 +29,7 @@ goog.provide('Blockly.FieldAngle'); goog.require('Blockly.DropDownDiv'); goog.require('Blockly.FieldTextInput'); goog.require('Blockly.utils.dom'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.math'); goog.require('Blockly.utils.userAgent'); @@ -353,4 +354,4 @@ Blockly.FieldAngle.prototype.doClassValidation_ = function(opt_newValue) { return n; }; -Blockly.Field.register('field_angle', Blockly.FieldAngle); +Blockly.utils.fields.register('field_angle', Blockly.FieldAngle); diff --git a/core/field_checkbox.js b/core/field_checkbox.js index f75f0a800..b8f9f1d82 100644 --- a/core/field_checkbox.js +++ b/core/field_checkbox.js @@ -30,6 +30,7 @@ goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Field'); goog.require('Blockly.utils.dom'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); @@ -210,4 +211,4 @@ Blockly.FieldCheckbox.prototype.convertValueToBool_ = function(value) { } }; -Blockly.Field.register('field_checkbox', Blockly.FieldCheckbox); +Blockly.utils.fields.register('field_checkbox', Blockly.FieldCheckbox); diff --git a/core/field_colour.js b/core/field_colour.js index 2b5c529d2..13eff115e 100644 --- a/core/field_colour.js +++ b/core/field_colour.js @@ -31,6 +31,7 @@ goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Field'); goog.require('Blockly.utils.colour'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); @@ -346,4 +347,4 @@ Blockly.FieldColour.prototype.dropdownDispose_ = function() { Blockly.unbindEvent_(this.onUpWrapper_); }; -Blockly.Field.register('field_colour', Blockly.FieldColour); +Blockly.utils.fields.register('field_colour', Blockly.FieldColour); diff --git a/core/field_date.js b/core/field_date.js index d742b30f4..9b2ab30f4 100644 --- a/core/field_date.js +++ b/core/field_date.js @@ -29,6 +29,7 @@ goog.provide('Blockly.FieldDate'); goog.require('Blockly.Events'); goog.require('Blockly.Field'); goog.require('Blockly.utils.dom'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.string'); goog.require('goog.date'); @@ -323,4 +324,4 @@ Blockly.FieldDate.CSS = [ '}' ]; -Blockly.Field.register('field_date', Blockly.FieldDate); +Blockly.utils.fields.register('field_date', Blockly.FieldDate); diff --git a/core/field_dropdown.js b/core/field_dropdown.js index 210e424ca..9d481bde4 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -33,6 +33,7 @@ goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Field'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); goog.require('Blockly.utils.string'); goog.require('Blockly.utils.uiMenu'); @@ -492,7 +493,7 @@ Blockly.FieldDropdown.prototype.renderSelectedImage_ = function() { this.imageElement_.setAttribute('height', this.imageJson_.height); this.imageElement_.setAttribute('width', this.imageJson_.width); - var arrowWidth = Blockly.Field.getCachedWidth(this.arrow_); + var arrowWidth = Blockly.utils.dom.getTextWidth(this.arrow_); var imageHeight = Number(this.imageJson_.height); var imageWidth = Number(this.imageJson_.width); @@ -524,8 +525,8 @@ Blockly.FieldDropdown.prototype.renderSelectedText_ = function() { this.textElement_.setAttribute('x', Blockly.Field.DEFAULT_TEXT_OFFSET); // Height and width include the border rect. this.size_.height = Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT; - this.size_.width = - Blockly.Field.getCachedWidth(this.textElement_) + Blockly.Field.X_PADDING; + this.size_.width = Blockly.utils.dom.getTextWidth(this.textElement_) + + Blockly.Field.X_PADDING; }; /** @@ -565,4 +566,4 @@ Blockly.FieldDropdown.validateOptions_ = function(options) { } }; -Blockly.Field.register('field_dropdown', Blockly.FieldDropdown); +Blockly.utils.fields.register('field_dropdown', Blockly.FieldDropdown); diff --git a/core/field_image.js b/core/field_image.js index b0a13ec0c..37dbf5765 100644 --- a/core/field_image.js +++ b/core/field_image.js @@ -30,6 +30,7 @@ goog.require('Blockly.Field'); goog.require('Blockly.Tooltip'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); @@ -222,4 +223,4 @@ Blockly.FieldImage.prototype.setOnClickHandler = function(func) { this.clickHandler_ = func; }; -Blockly.Field.register('field_image', Blockly.FieldImage); +Blockly.utils.fields.register('field_image', Blockly.FieldImage); diff --git a/core/field_label.js b/core/field_label.js index abfe0b438..8134feb09 100644 --- a/core/field_label.js +++ b/core/field_label.js @@ -31,6 +31,7 @@ goog.require('Blockly.Field'); goog.require('Blockly.Tooltip'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); @@ -100,4 +101,4 @@ Blockly.FieldLabel.prototype.doClassValidation_ = function(opt_newValue) { return String(opt_newValue); }; -Blockly.Field.register('field_label', Blockly.FieldLabel); +Blockly.utils.fields.register('field_label', Blockly.FieldLabel); diff --git a/core/field_label_serializable.js b/core/field_label_serializable.js index 833a4c61d..38f8ddb05 100644 --- a/core/field_label_serializable.js +++ b/core/field_label_serializable.js @@ -29,6 +29,7 @@ goog.provide('Blockly.FieldLabelSerializable'); goog.require('Blockly.FieldLabel'); goog.require('Blockly.utils'); +goog.require('Blockly.utils.fields'); /** @@ -75,5 +76,5 @@ Blockly.FieldLabelSerializable.prototype.EDITABLE = false; */ Blockly.FieldLabelSerializable.prototype.SERIALIZABLE = true; -Blockly.Field.register( +Blockly.utils.fields.register( 'field_label_serializable', Blockly.FieldLabelSerializable); diff --git a/core/field_number.js b/core/field_number.js index d430145c8..347ae60d7 100644 --- a/core/field_number.js +++ b/core/field_number.js @@ -27,6 +27,7 @@ goog.provide('Blockly.FieldNumber'); goog.require('Blockly.FieldTextInput'); +goog.require('Blockly.utils.fields'); /** @@ -138,4 +139,4 @@ Blockly.FieldNumber.prototype.doClassValidation_ = function(opt_newValue) { return n; }; -Blockly.Field.register('field_number', Blockly.FieldNumber); +Blockly.utils.fields.register('field_number', Blockly.FieldNumber); diff --git a/core/field_textinput.js b/core/field_textinput.js index 92dcc31a0..f9fa93f25 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -34,6 +34,7 @@ goog.require('Blockly.utils'); goog.require('Blockly.utils.aria'); goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.utils.dom'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); goog.require('Blockly.utils.userAgent'); @@ -448,4 +449,4 @@ Blockly.FieldTextInput.nonnegativeIntegerValidator = function(text) { return n; }; -Blockly.Field.register('field_input', Blockly.FieldTextInput); +Blockly.utils.fields.register('field_input', Blockly.FieldTextInput); diff --git a/core/field_variable.js b/core/field_variable.js index 209d9be57..c4af8fb0d 100644 --- a/core/field_variable.js +++ b/core/field_variable.js @@ -31,6 +31,7 @@ goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.FieldDropdown'); goog.require('Blockly.Msg'); goog.require('Blockly.utils'); +goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); goog.require('Blockly.VariableModel'); goog.require('Blockly.Variables'); @@ -430,4 +431,4 @@ Blockly.FieldVariable.prototype.referencesVariables = function() { return true; }; -Blockly.Field.register('field_variable', Blockly.FieldVariable); +Blockly.utils.fields.register('field_variable', Blockly.FieldVariable); diff --git a/core/flyout_button.js b/core/flyout_button.js index bf4ae27ec..973e3a320 100644 --- a/core/flyout_button.js +++ b/core/flyout_button.js @@ -156,7 +156,7 @@ Blockly.FlyoutButton.prototype.createDom = function() { this.svgGroup_); svgText.textContent = Blockly.utils.replaceMessageReferences(this.text_); - this.width = Blockly.Field.getCachedWidth(svgText); + this.width = Blockly.utils.dom.getTextWidth(svgText); this.height = 20; // Can't compute it :( if (!this.isLabel_) { diff --git a/core/utils/dom.js b/core/utils/dom.js index 9897fb5da..694cdd9a2 100644 --- a/core/utils/dom.js +++ b/core/utils/dom.js @@ -63,6 +63,20 @@ Blockly.utils.dom.Node = { DOCUMENT_POSITION_CONTAINED_BY: 16 }; +/** + * Temporary cache of text widths. + * @type {Object} + * @private + */ +Blockly.utils.dom.cacheWidths_ = null; + +/** + * Number of current references to cache. + * @type {number} + * @private + */ +Blockly.utils.dom.cacheReference_ = 0; + /** * Helper method for creating SVG elements. * @param {string} name Element's tag name. @@ -197,3 +211,64 @@ Blockly.utils.dom.setCssTransform = function(element, transform) { element.style['transform'] = transform; element.style['-webkit-transform'] = transform; }; + +/** + * Start caching text widths. Every call to this function MUST also call + * stopTextWidthCache. Caches must not survive between execution threads. + */ +Blockly.utils.dom.startTextWidthCache = function() { + Blockly.utils.dom.cacheReference_++; + if (!Blockly.utils.dom.cacheWidths_) { + Blockly.utils.dom.cacheWidths_ = {}; + } +}; + +/** + * Stop caching field widths. Unless caching was already on when the + * corresponding call to startTextWidthCache was made. + */ +Blockly.utils.dom.stopTextWidthCache = function() { + Blockly.utils.dom.cacheReference_--; + if (!Blockly.utils.dom.cacheReference_) { + Blockly.utils.dom.cacheWidths_ = null; + } +}; + +/** + * Gets the width of a text element, caching it in the process. + * @param {!Element} textElement An SVG 'text' element. + * @return {number} Width of element. + */ +Blockly.utils.dom.getTextWidth = function(textElement) { + var key = textElement.textContent + '\n' + textElement.className.baseVal; + var width; + + // Return the cached width if it exists. + if (Blockly.utils.dom.cacheWidths_) { + width = Blockly.utils.dom.cacheWidths_[key]; + if (width) { + return width; + } + } + + // Attempt to compute fetch the width of the SVG text element. + try { + if (Blockly.utils.userAgent.IE || Blockly.utils.userAgent.EDGE) { + width = textElement.getBBox().width; + } else { + width = textElement.getComputedTextLength(); + } + } catch (e) { + // In other cases where we fail to get the computed text. Instead, use an + // approximation and do not cache the result. At some later point in time + // when the block is inserted into the visible DOM, this method will be + // called again and, at that point in time, will not throw an exception. + return textElement.textContent.length * 8; + } + + // Cache the computed width and return. + if (Blockly.utils.dom.cacheWidths_) { + Blockly.utils.dom.cacheWidths_[key] = width; + } + return width; +}; diff --git a/core/utils/field.js b/core/utils/field.js new file mode 100644 index 000000000..2b95cf2f8 --- /dev/null +++ b/core/utils/field.js @@ -0,0 +1,92 @@ +/** + * @license + * Visual Blocks Editor + * + * Copyright 2019 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// TODO: Files in this directory seem to not be specific to Blockly, yet +// this one is. Should it be moved to the core? +/** + * @fileoverview Utility methods for handling fields. + * @author bekawestberg@gmail.com (Beka Westberg) + */ +'use strict'; + +/** + * @name Blockly.utils + * @namespace + */ +goog.provide('Blockly.utils.fields'); + + +/** + * The set of all registered fields, keyed by field type as used in the JSON + * definition of a block. + * @type {!Object} + * @private + */ +Blockly.utils.fields.typeMap_ = {}; + +/** + * Registers a field type. May also override an existing field type. + * Blockly.utils.fields.fromJson uses this registry to + * find the appropriate field type. + * @param {string} type The field type name as used in the JSON definition. + * @param {!{fromJson: Function}} fieldClass The field class containing a + * fromJson function that can construct an instance of the field. + * @throws {Error} if the type name is empty, or the fieldClass is not an + * object containing a fromJson function. + */ +Blockly.utils.fields.register = function(type, fieldClass) { + if ((typeof type != 'string') || (type.trim() == '')) { + throw Error('Invalid field type "' + type + '"'); + } + if (!fieldClass || (typeof fieldClass.fromJson != 'function')) { + throw Error('Field "' + fieldClass + '" must have a fromJson function'); + } + Blockly.utils.fields.typeMap_[type] = fieldClass; +}; + +/** + * Construct a Field from a JSON arg object. + * Finds the appropriate registered field by the type name as registered using + * Blockly.utils.fields.register. + * @param {!Object} options A JSON object with a type and options specific + * to the field type. + * @return {Blockly.Field} The new field instance or null if a field wasn't + * found with the given type name + * @package + */ +Blockly.utils.fields.fromJson = function(options) { + var fieldClass = Blockly.utils.fields.typeMap_[options['type']]; + if (!fieldClass) { + console.warn('Blockly could not create a field of type ' + options['type'] + + '. The field is probably not being registered. This may be because the' + + ' file is not loaded, the field does not register itself (See:' + + ' github.com/google/blockly/issues/1584), or the registration is not' + + ' being reached.'); + return null; + } + + var field = fieldClass.fromJson(options); + if (options['tooltip'] !== undefined) { + var rawValue = options['tooltip']; + var localizedText = Blockly.utils.replaceMessageReferences(rawValue); + field.setTooltip(localizedText); + } + return field; +}; diff --git a/core/xml.js b/core/xml.js index 148ca3fd2..bc0e1fc0b 100644 --- a/core/xml.js +++ b/core/xml.js @@ -376,7 +376,7 @@ Blockly.Xml.domToWorkspace = function(xml, workspace) { width = workspace.getWidth(); } var newBlockIds = []; // A list of block IDs added by this call. - Blockly.Field.startCache(); + Blockly.utils.dom.startTextWidthCache(); // Safari 7.1.3 is known to provide node lists with extra references to // children beyond the lists' length. Trust the length, do not use the // looping pattern of checking the index for an object. @@ -433,7 +433,7 @@ Blockly.Xml.domToWorkspace = function(xml, workspace) { if (!existingGroup) { Blockly.Events.setGroup(false); } - Blockly.Field.stopCache(); + Blockly.utils.dom.stopTextWidthCache(); } // Re-enable workspace resizing. if (workspace.setResizesEnabled) { diff --git a/demos/custom-fields/field_turtle.js b/demos/custom-fields/field_turtle.js index da49d9a1a..dc7b8c8ea 100644 --- a/demos/custom-fields/field_turtle.js +++ b/demos/custom-fields/field_turtle.js @@ -533,7 +533,7 @@ CustomFields.FieldTurtle.prototype.fromXml = function(fieldElement) { // Blockly needs to know the JSON name of this field. Usually this is // registered at the bottom of the field class. -Blockly.Field.register('field_turtle', CustomFields.FieldTurtle); +Blockly.utils.fields.register('field_turtle', CustomFields.FieldTurtle); // Called by initView to create all of the SVGs. This is just used to keep // the code more organized. diff --git a/tests/mocha/field_test.js b/tests/mocha/field_test.js index 5493e93e2..6d5454434 100644 --- a/tests/mocha/field_test.js +++ b/tests/mocha/field_test.js @@ -19,7 +19,7 @@ */ suite('Abstract Fields', function() { - suite.skip('Is Serializable', function() { + suite('Is Serializable', function() { // Both EDITABLE and SERIALIZABLE are default. function FieldDefault() { this.name = 'NAME'; @@ -72,7 +72,7 @@ suite('Abstract Fields', function() { assertEquals(true, field.isSerializable()); }); }); - suite.skip('setValue', function() { + suite('setValue', function() { function addSpies(field) { if (!this.isSpying) { sinon.spy(field, 'doValueInvalid_'); From 16c59d2ffc2bf9a092952d5f8f456f7e4844dce1 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Thu, 8 Aug 2019 15:48:28 -0700 Subject: [PATCH 02/17] Added tests and remove jsunit fields test file. --- core/utils/field.js | 3 +- tests/jsunit/field_test.js | 126 ------------------------------- tests/jsunit/index.html | 1 - tests/mocha/index.html | 1 + tests/mocha/utils_field_test.js | 127 ++++++++++++++++++++++++++++++++ 5 files changed, 130 insertions(+), 128 deletions(-) delete mode 100644 tests/jsunit/field_test.js create mode 100644 tests/mocha/utils_field_test.js diff --git a/core/utils/field.js b/core/utils/field.js index 2b95cf2f8..531fad10c 100644 --- a/core/utils/field.js +++ b/core/utils/field.js @@ -53,7 +53,8 @@ Blockly.utils.fields.typeMap_ = {}; */ Blockly.utils.fields.register = function(type, fieldClass) { if ((typeof type != 'string') || (type.trim() == '')) { - throw Error('Invalid field type "' + type + '"'); + throw Error('Invalid field type "' + type + '". The type must be a' + + ' non-empty string.'); } if (!fieldClass || (typeof fieldClass.fromJson != 'function')) { throw Error('Field "' + fieldClass + '" must have a fromJson function'); diff --git a/tests/jsunit/field_test.js b/tests/jsunit/field_test.js deleted file mode 100644 index 2da04834d..000000000 --- a/tests/jsunit/field_test.js +++ /dev/null @@ -1,126 +0,0 @@ -/** - * @license - * Visual Blocks Editor - * - * Copyright 2017 Google Inc. - * https://developers.google.com/blockly/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - /** - * @fileoverview Tests for Blockly.Field - * @author fenichel@google.com (Rachel Fenichel) - */ -'use strict'; - -function test_field_isEditable_simple() { - var field = new Blockly.Field("Dummy text"); - // EDITABLE is true by default, but without a source block a field can't be - // edited. - assertFalse('Field without a block is not editable', - field.isCurrentlyEditable()); -} - -function test_field_isEditable_false() { - // Setting EDITABLE to false doesn't matter. - var field = new Blockly.Field("Dummy text"); - field.EDITABLE = false; - assertFalse('Field without a block is not editable', - field.isCurrentlyEditable()); -} - -function test_field_isEditable_editableBlock() { - var editableBlock = { - isEditable: function() { - return true; - } - }; - - var field = new Blockly.Field("Dummy text"); - field.sourceBlock_ = editableBlock; - - assertTrue('Editable field with editable block is editable', - field.isCurrentlyEditable()); -} - -function test_field_isEditable_editableBlock_false() { - var editableBlock = { - isEditable: function() { - return true; - } - }; - - var field = new Blockly.Field("Dummy text"); - field.sourceBlock_ = editableBlock; - field.EDITABLE = false; - - assertFalse('Non-editable field with editable block is not editable', - field.isCurrentlyEditable()); -} - -function test_field_isEditable_nonEditableBlock() { - var nonEditableBlock = { - isEditable: function() { - return false; - } - }; - - var field = new Blockly.Field("Dummy text"); - field.sourceBlock_ = nonEditableBlock; - - assertFalse('Editable field with non-editable block is not editable', - field.isCurrentlyEditable()); -} - -function test_field_isEditable_nonEditableBlock_false() { - var nonEditableBlock = { - isEditable: function() { - return false; - } - }; - - var field = new Blockly.Field("Dummy text"); - field.sourceBlock_ = nonEditableBlock; - field.EDITABLE = false; - - assertFalse('Non-editable field with non-editable block is not editable', - field.isCurrentlyEditable()); -} - -function test_field_register_with_custom_field() { - var CustomFieldType = function(value) { - CustomFieldType.superClass_.constructor.call(this, value); - }; - goog.inherits(CustomFieldType, Blockly.Field); - - CustomFieldType.fromJson = function(options) { - return new CustomFieldType(options['value']); - }; - - var json = { - type: 'field_custom_test', - value: 'ok' - }; - - // before registering - var field = Blockly.Field.fromJson(json); - assertNull(field); - - Blockly.Field.register('field_custom_test', CustomFieldType); - - // after registering - field = Blockly.Field.fromJson(json); - assertNotNull(field); - assertEquals(field.getValue(), 'ok'); -} diff --git a/tests/jsunit/index.html b/tests/jsunit/index.html index 038d20faf..3cf5307f9 100644 --- a/tests/jsunit/index.html +++ b/tests/jsunit/index.html @@ -18,7 +18,6 @@ - diff --git a/tests/mocha/index.html b/tests/mocha/index.html index 736f577ae..26a5ce34d 100644 --- a/tests/mocha/index.html +++ b/tests/mocha/index.html @@ -48,6 +48,7 @@ +
diff --git a/tests/mocha/utils_field_test.js b/tests/mocha/utils_field_test.js new file mode 100644 index 000000000..367ee7579 --- /dev/null +++ b/tests/mocha/utils_field_test.js @@ -0,0 +1,127 @@ +/** + * @license + * Visual Blocks Editor + * + * Copyright 2019 Google Inc. + * https://developers.google.com/blockly/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @fileoverview Tests for Blockly.utils.fields + * @author bekawestberg@gmail.com (Beka WEstberg) + */ +'use strict'; + +suite('Field Utils', function() { + function CustomFieldType(value) { + CustomFieldType.superClass_.constructor.call(this, value); + } + goog.inherits(CustomFieldType, Blockly.Field); + CustomFieldType.fromJson = function(options) { + return new CustomFieldType(options['value']); + }; + + teardown(function() { + if (Blockly.utils.fields.typeMap_['field_custom_test']) { + delete Blockly.utils.fields.typeMap_['field_custom_test']; + } + }); + suite('Registration', function() { + test('Simple', function() { + Blockly.utils.fields.register('field_custom_test', CustomFieldType); + }); + test('Empty String Key', function() { + chai.assert.throws(function() { + Blockly.utils.fields.register('', CustomFieldType); + }.bind(this), 'Invalid field type'); + }); + test('Class as Key', function() { + chai.assert.throws(function() { + Blockly.utils.fields.register(CustomFieldType, ''); + }.bind(this), 'Invalid field type'); + }); + test('fromJson as Key', function() { + chai.assert.throws(function() { + Blockly.utils.fields.register(CustomFieldType.fromJson, ''); + }.bind(this), 'Invalid field type'); + }); + // TODO (#2788): What do you want it to do if you overwrite a key? + test('Overwrite a Key', function() { + Blockly.utils.fields.register('field_custom_test', CustomFieldType); + + Blockly.utils.fields.register('field_custom_test', CustomFieldType); + }); + test('Null Value', function() { + chai.assert.throws(function() { + Blockly.utils.fields.register('field_custom_test', null); + }.bind(this), 'fromJson function'); + }); + test('No fromJson', function() { + var fromJson = CustomFieldType.fromJson; + delete CustomFieldType.fromJson; + chai.assert.throws(function() { + Blockly.utils.fields.register('field_custom_test', CustomFieldType); + }.bind(this), 'fromJson function'); + CustomFieldType.fromJson = fromJson; + }); + test('fromJson not a function', function() { + var fromJson = CustomFieldType.fromJson; + CustomFieldType.fromJson = true; + chai.assert.throws(function() { + Blockly.utils.fields.register('field_custom_test', CustomFieldType); + }.bind(this), 'fromJson function'); + CustomFieldType.fromJson = fromJson; + }); + }); + suite('Retrieval', function() { + test('Simple', function() { + Blockly.utils.fields.register('field_custom_test', CustomFieldType); + + var json = { + type: 'field_custom_test', + value: 'ok' + }; + + var field = Blockly.utils.fields.fromJson(json); + chai.assert.isNotNull(field); + chai.assert.equal('ok', field.getValue()); + }); + test('Not Registered', function() { + var json = { + type: 'field_custom_test', + value: 'ok' + }; + + var spy = sinon.stub(console, 'warn'); + var field = Blockly.utils.fields.fromJson(json); + chai.assert.isNull(field); + chai.assert.isTrue(spy.called); + spy.restore(); + }); + // TODO: Is this supposed to be case sensitive? + test.skip('Case Different', function() { + Blockly.utils.fields.register('field_custom_test', CustomFieldType); + + var json = { + type: 'FIELD_CUSTOM_TEST', + value: 'ok' + }; + + var field = Blockly.utils.fields.fromJson(json); + chai.assert.isNotNull(field); + chai.assert.equal('ok', field.getValue()); + }); + }); +}); From 84937a0ff6f249bf095b6e7e75817b6b57202bc8 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Thu, 8 Aug 2019 16:40:45 -0700 Subject: [PATCH 03/17] Fixed lint error. --- core/field_dropdown.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/field_dropdown.js b/core/field_dropdown.js index 9d481bde4..989523b85 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -525,8 +525,8 @@ Blockly.FieldDropdown.prototype.renderSelectedText_ = function() { this.textElement_.setAttribute('x', Blockly.Field.DEFAULT_TEXT_OFFSET); // Height and width include the border rect. this.size_.height = Blockly.Field.BORDER_RECT_DEFAULT_HEIGHT; - this.size_.width = Blockly.utils.dom.getTextWidth(this.textElement_) - + Blockly.Field.X_PADDING; + this.size_.width = Blockly.utils.dom.getTextWidth(this.textElement_) + + Blockly.Field.X_PADDING; }; /** From 0872d022e1a48b4aacfbb7295bcad0c184e3922d Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Thu, 8 Aug 2019 19:42:16 -0700 Subject: [PATCH 04/17] Changed utils.fields -> fieldRegistry. Also removed useless tooltip requires. --- core/block.js | 4 +- core/field_angle.js | 4 +- core/field_checkbox.js | 4 +- core/field_colour.js | 4 +- core/field_date.js | 4 +- core/field_dropdown.js | 4 +- core/field_image.js | 5 +-- core/field_label.js | 5 +-- core/field_label_serializable.js | 4 +- core/field_number.js | 4 +- core/{utils/field.js => field_registry.js} | 20 +++++----- core/field_textinput.js | 4 +- core/field_variable.js | 4 +- ...s_field_test.js => field_registry_test.js} | 38 +++++++++---------- tests/mocha/index.html | 2 +- 15 files changed, 53 insertions(+), 57 deletions(-) rename core/{utils/field.js => field_registry.js} (83%) rename tests/mocha/{utils_field_test.js => field_registry_test.js} (71%) diff --git a/core/block.js b/core/block.js index 43fe84f8d..d63612aaf 100644 --- a/core/block.js +++ b/core/block.js @@ -39,7 +39,7 @@ goog.require('Blockly.Input'); goog.require('Blockly.Mutator'); goog.require('Blockly.utils'); goog.require('Blockly.utils.Coordinate'); -goog.require('Blockly.utils.fields'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils.string'); goog.require('Blockly.Warning'); goog.require('Blockly.Workspace'); @@ -1637,7 +1637,7 @@ Blockly.Block.prototype.interpolate_ = function(message, args, lastDummyAlign) { default: // This should handle all field JSON parsing, including // options that can be applied to any field type. - field = Blockly.utils.fields.fromJson(element); + field = Blockly.fieldRegistry.fromJson(element); // Unknown field. if (!field) { diff --git a/core/field_angle.js b/core/field_angle.js index aeb91e536..f1d54af76 100644 --- a/core/field_angle.js +++ b/core/field_angle.js @@ -27,9 +27,9 @@ goog.provide('Blockly.FieldAngle'); goog.require('Blockly.DropDownDiv'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.FieldTextInput'); goog.require('Blockly.utils.dom'); -goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.math'); goog.require('Blockly.utils.userAgent'); @@ -354,4 +354,4 @@ Blockly.FieldAngle.prototype.doClassValidation_ = function(opt_newValue) { return n; }; -Blockly.utils.fields.register('field_angle', Blockly.FieldAngle); +Blockly.fieldRegistry.register('field_angle', Blockly.FieldAngle); diff --git a/core/field_checkbox.js b/core/field_checkbox.js index b8f9f1d82..7f4ec4caf 100644 --- a/core/field_checkbox.js +++ b/core/field_checkbox.js @@ -29,8 +29,8 @@ goog.provide('Blockly.FieldCheckbox'); goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Field'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils.dom'); -goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); @@ -211,4 +211,4 @@ Blockly.FieldCheckbox.prototype.convertValueToBool_ = function(value) { } }; -Blockly.utils.fields.register('field_checkbox', Blockly.FieldCheckbox); +Blockly.fieldRegistry.register('field_checkbox', Blockly.FieldCheckbox); diff --git a/core/field_colour.js b/core/field_colour.js index 13eff115e..059fcb756 100644 --- a/core/field_colour.js +++ b/core/field_colour.js @@ -30,8 +30,8 @@ goog.require('Blockly.DropDownDiv'); goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Field'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils.colour'); -goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); @@ -347,4 +347,4 @@ Blockly.FieldColour.prototype.dropdownDispose_ = function() { Blockly.unbindEvent_(this.onUpWrapper_); }; -Blockly.utils.fields.register('field_colour', Blockly.FieldColour); +Blockly.fieldRegistry.register('field_colour', Blockly.FieldColour); diff --git a/core/field_date.js b/core/field_date.js index 9b2ab30f4..3ab5d0a30 100644 --- a/core/field_date.js +++ b/core/field_date.js @@ -28,8 +28,8 @@ goog.provide('Blockly.FieldDate'); goog.require('Blockly.Events'); goog.require('Blockly.Field'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils.dom'); -goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.string'); goog.require('goog.date'); @@ -324,4 +324,4 @@ Blockly.FieldDate.CSS = [ '}' ]; -Blockly.utils.fields.register('field_date', Blockly.FieldDate); +Blockly.fieldRegistry.register('field_date', Blockly.FieldDate); diff --git a/core/field_dropdown.js b/core/field_dropdown.js index 989523b85..70c00bd08 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -31,9 +31,9 @@ goog.provide('Blockly.FieldDropdown'); goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Field'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); -goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); goog.require('Blockly.utils.string'); goog.require('Blockly.utils.uiMenu'); @@ -566,4 +566,4 @@ Blockly.FieldDropdown.validateOptions_ = function(options) { } }; -Blockly.utils.fields.register('field_dropdown', Blockly.FieldDropdown); +Blockly.fieldRegistry.register('field_dropdown', Blockly.FieldDropdown); diff --git a/core/field_image.js b/core/field_image.js index 37dbf5765..22685f560 100644 --- a/core/field_image.js +++ b/core/field_image.js @@ -27,10 +27,9 @@ goog.provide('Blockly.FieldImage'); goog.require('Blockly.Field'); -goog.require('Blockly.Tooltip'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); -goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); @@ -223,4 +222,4 @@ Blockly.FieldImage.prototype.setOnClickHandler = function(func) { this.clickHandler_ = func; }; -Blockly.utils.fields.register('field_image', Blockly.FieldImage); +Blockly.fieldRegistry.register('field_image', Blockly.FieldImage); diff --git a/core/field_label.js b/core/field_label.js index 8134feb09..c89b574d0 100644 --- a/core/field_label.js +++ b/core/field_label.js @@ -28,10 +28,9 @@ goog.provide('Blockly.FieldLabel'); goog.require('Blockly.Field'); -goog.require('Blockly.Tooltip'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); -goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); @@ -101,4 +100,4 @@ Blockly.FieldLabel.prototype.doClassValidation_ = function(opt_newValue) { return String(opt_newValue); }; -Blockly.utils.fields.register('field_label', Blockly.FieldLabel); +Blockly.fieldRegistry.register('field_label', Blockly.FieldLabel); diff --git a/core/field_label_serializable.js b/core/field_label_serializable.js index 38f8ddb05..f6fa0ee33 100644 --- a/core/field_label_serializable.js +++ b/core/field_label_serializable.js @@ -28,8 +28,8 @@ goog.provide('Blockly.FieldLabelSerializable'); goog.require('Blockly.FieldLabel'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils'); -goog.require('Blockly.utils.fields'); /** @@ -76,5 +76,5 @@ Blockly.FieldLabelSerializable.prototype.EDITABLE = false; */ Blockly.FieldLabelSerializable.prototype.SERIALIZABLE = true; -Blockly.utils.fields.register( +Blockly.fieldRegistry.register( 'field_label_serializable', Blockly.FieldLabelSerializable); diff --git a/core/field_number.js b/core/field_number.js index 347ae60d7..496ee66f6 100644 --- a/core/field_number.js +++ b/core/field_number.js @@ -26,8 +26,8 @@ goog.provide('Blockly.FieldNumber'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.FieldTextInput'); -goog.require('Blockly.utils.fields'); /** @@ -139,4 +139,4 @@ Blockly.FieldNumber.prototype.doClassValidation_ = function(opt_newValue) { return n; }; -Blockly.utils.fields.register('field_number', Blockly.FieldNumber); +Blockly.fieldRegistry.register('field_number', Blockly.FieldNumber); diff --git a/core/utils/field.js b/core/field_registry.js similarity index 83% rename from core/utils/field.js rename to core/field_registry.js index 531fad10c..15a66e042 100644 --- a/core/utils/field.js +++ b/core/field_registry.js @@ -18,8 +18,6 @@ * limitations under the License. */ -// TODO: Files in this directory seem to not be specific to Blockly, yet -// this one is. Should it be moved to the core? /** * @fileoverview Utility methods for handling fields. * @author bekawestberg@gmail.com (Beka Westberg) @@ -27,10 +25,10 @@ 'use strict'; /** - * @name Blockly.utils + * @name Blockly.fieldRegistry * @namespace */ -goog.provide('Blockly.utils.fields'); +goog.provide('Blockly.fieldRegistry'); /** @@ -39,11 +37,11 @@ goog.provide('Blockly.utils.fields'); * @type {!Object} * @private */ -Blockly.utils.fields.typeMap_ = {}; +Blockly.fieldRegistry.typeMap_ = {}; /** * Registers a field type. May also override an existing field type. - * Blockly.utils.fields.fromJson uses this registry to + * Blockly.fieldRegistry.fromJson uses this registry to * find the appropriate field type. * @param {string} type The field type name as used in the JSON definition. * @param {!{fromJson: Function}} fieldClass The field class containing a @@ -51,7 +49,7 @@ Blockly.utils.fields.typeMap_ = {}; * @throws {Error} if the type name is empty, or the fieldClass is not an * object containing a fromJson function. */ -Blockly.utils.fields.register = function(type, fieldClass) { +Blockly.fieldRegistry.register = function(type, fieldClass) { if ((typeof type != 'string') || (type.trim() == '')) { throw Error('Invalid field type "' + type + '". The type must be a' + ' non-empty string.'); @@ -59,21 +57,21 @@ Blockly.utils.fields.register = function(type, fieldClass) { if (!fieldClass || (typeof fieldClass.fromJson != 'function')) { throw Error('Field "' + fieldClass + '" must have a fromJson function'); } - Blockly.utils.fields.typeMap_[type] = fieldClass; + Blockly.fieldRegistry.typeMap_[type] = fieldClass; }; /** * Construct a Field from a JSON arg object. * Finds the appropriate registered field by the type name as registered using - * Blockly.utils.fields.register. + * Blockly.fieldRegistry.register. * @param {!Object} options A JSON object with a type and options specific * to the field type. * @return {Blockly.Field} The new field instance or null if a field wasn't * found with the given type name * @package */ -Blockly.utils.fields.fromJson = function(options) { - var fieldClass = Blockly.utils.fields.typeMap_[options['type']]; +Blockly.fieldRegistry.fromJson = function(options) { + var fieldClass = Blockly.fieldRegistry.typeMap_[options['type']]; if (!fieldClass) { console.warn('Blockly could not create a field of type ' + options['type'] + '. The field is probably not being registered. This may be because the' + diff --git a/core/field_textinput.js b/core/field_textinput.js index f9fa93f25..a8f9b6f3b 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -29,12 +29,12 @@ goog.provide('Blockly.FieldTextInput'); goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.Field'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.Msg'); goog.require('Blockly.utils'); goog.require('Blockly.utils.aria'); goog.require('Blockly.utils.Coordinate'); goog.require('Blockly.utils.dom'); -goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); goog.require('Blockly.utils.userAgent'); @@ -449,4 +449,4 @@ Blockly.FieldTextInput.nonnegativeIntegerValidator = function(text) { return n; }; -Blockly.utils.fields.register('field_input', Blockly.FieldTextInput); +Blockly.fieldRegistry.register('field_input', Blockly.FieldTextInput); diff --git a/core/field_variable.js b/core/field_variable.js index c4af8fb0d..853460e25 100644 --- a/core/field_variable.js +++ b/core/field_variable.js @@ -29,9 +29,9 @@ goog.provide('Blockly.FieldVariable'); goog.require('Blockly.Events'); goog.require('Blockly.Events.BlockChange'); goog.require('Blockly.FieldDropdown'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.Msg'); goog.require('Blockly.utils'); -goog.require('Blockly.utils.fields'); goog.require('Blockly.utils.Size'); goog.require('Blockly.VariableModel'); goog.require('Blockly.Variables'); @@ -431,4 +431,4 @@ Blockly.FieldVariable.prototype.referencesVariables = function() { return true; }; -Blockly.utils.fields.register('field_variable', Blockly.FieldVariable); +Blockly.fieldRegistry.register('field_variable', Blockly.FieldVariable); diff --git a/tests/mocha/utils_field_test.js b/tests/mocha/field_registry_test.js similarity index 71% rename from tests/mocha/utils_field_test.js rename to tests/mocha/field_registry_test.js index 367ee7579..0d51b83f8 100644 --- a/tests/mocha/utils_field_test.js +++ b/tests/mocha/field_registry_test.js @@ -19,12 +19,12 @@ */ /** - * @fileoverview Tests for Blockly.utils.fields - * @author bekawestberg@gmail.com (Beka WEstberg) + * @fileoverview Tests for Blockly.fieldRegistry + * @author bekawestberg@gmail.com (Beka Westberg) */ 'use strict'; -suite('Field Utils', function() { +suite('Field Registry', function() { function CustomFieldType(value) { CustomFieldType.superClass_.constructor.call(this, value); } @@ -34,45 +34,45 @@ suite('Field Utils', function() { }; teardown(function() { - if (Blockly.utils.fields.typeMap_['field_custom_test']) { - delete Blockly.utils.fields.typeMap_['field_custom_test']; + if (Blockly.fieldRegistry.typeMap_['field_custom_test']) { + delete Blockly.fieldRegistry.typeMap_['field_custom_test']; } }); suite('Registration', function() { test('Simple', function() { - Blockly.utils.fields.register('field_custom_test', CustomFieldType); + Blockly.fieldRegistry.register('field_custom_test', CustomFieldType); }); test('Empty String Key', function() { chai.assert.throws(function() { - Blockly.utils.fields.register('', CustomFieldType); + Blockly.fieldRegistry.register('', CustomFieldType); }.bind(this), 'Invalid field type'); }); test('Class as Key', function() { chai.assert.throws(function() { - Blockly.utils.fields.register(CustomFieldType, ''); + Blockly.fieldRegistry.register(CustomFieldType, ''); }.bind(this), 'Invalid field type'); }); test('fromJson as Key', function() { chai.assert.throws(function() { - Blockly.utils.fields.register(CustomFieldType.fromJson, ''); + Blockly.fieldRegistry.register(CustomFieldType.fromJson, ''); }.bind(this), 'Invalid field type'); }); // TODO (#2788): What do you want it to do if you overwrite a key? test('Overwrite a Key', function() { - Blockly.utils.fields.register('field_custom_test', CustomFieldType); + Blockly.fieldRegistry.register('field_custom_test', CustomFieldType); - Blockly.utils.fields.register('field_custom_test', CustomFieldType); + Blockly.fieldRegistry.register('field_custom_test', CustomFieldType); }); test('Null Value', function() { chai.assert.throws(function() { - Blockly.utils.fields.register('field_custom_test', null); + Blockly.fieldRegistry.register('field_custom_test', null); }.bind(this), 'fromJson function'); }); test('No fromJson', function() { var fromJson = CustomFieldType.fromJson; delete CustomFieldType.fromJson; chai.assert.throws(function() { - Blockly.utils.fields.register('field_custom_test', CustomFieldType); + Blockly.fieldRegistry.register('field_custom_test', CustomFieldType); }.bind(this), 'fromJson function'); CustomFieldType.fromJson = fromJson; }); @@ -80,21 +80,21 @@ suite('Field Utils', function() { var fromJson = CustomFieldType.fromJson; CustomFieldType.fromJson = true; chai.assert.throws(function() { - Blockly.utils.fields.register('field_custom_test', CustomFieldType); + Blockly.fieldRegistry.register('field_custom_test', CustomFieldType); }.bind(this), 'fromJson function'); CustomFieldType.fromJson = fromJson; }); }); suite('Retrieval', function() { test('Simple', function() { - Blockly.utils.fields.register('field_custom_test', CustomFieldType); + Blockly.fieldRegistry.register('field_custom_test', CustomFieldType); var json = { type: 'field_custom_test', value: 'ok' }; - var field = Blockly.utils.fields.fromJson(json); + var field = Blockly.fieldRegistry.fromJson(json); chai.assert.isNotNull(field); chai.assert.equal('ok', field.getValue()); }); @@ -105,21 +105,21 @@ suite('Field Utils', function() { }; var spy = sinon.stub(console, 'warn'); - var field = Blockly.utils.fields.fromJson(json); + var field = Blockly.fieldRegistry.fromJson(json); chai.assert.isNull(field); chai.assert.isTrue(spy.called); spy.restore(); }); // TODO: Is this supposed to be case sensitive? test.skip('Case Different', function() { - Blockly.utils.fields.register('field_custom_test', CustomFieldType); + Blockly.fieldRegistry.register('field_custom_test', CustomFieldType); var json = { type: 'FIELD_CUSTOM_TEST', value: 'ok' }; - var field = Blockly.utils.fields.fromJson(json); + var field = Blockly.fieldRegistry.fromJson(json); chai.assert.isNotNull(field); chai.assert.equal('ok', field.getValue()); }); diff --git a/tests/mocha/index.html b/tests/mocha/index.html index 26a5ce34d..cbceb33ca 100644 --- a/tests/mocha/index.html +++ b/tests/mocha/index.html @@ -48,7 +48,7 @@ - +
From 542ba09d78b33f5d382510eca90c35e8f0683287 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Sat, 10 Aug 2019 08:39:48 -0700 Subject: [PATCH 05/17] Try to Fix Mocha: Remove unnecessary function bindings? --- tests/mocha/field_registry_test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/mocha/field_registry_test.js b/tests/mocha/field_registry_test.js index 0d51b83f8..1fa06bc9d 100644 --- a/tests/mocha/field_registry_test.js +++ b/tests/mocha/field_registry_test.js @@ -45,17 +45,17 @@ suite('Field Registry', function() { test('Empty String Key', function() { chai.assert.throws(function() { Blockly.fieldRegistry.register('', CustomFieldType); - }.bind(this), 'Invalid field type'); + }, 'Invalid field type'); }); test('Class as Key', function() { chai.assert.throws(function() { Blockly.fieldRegistry.register(CustomFieldType, ''); - }.bind(this), 'Invalid field type'); + }, 'Invalid field type'); }); test('fromJson as Key', function() { chai.assert.throws(function() { Blockly.fieldRegistry.register(CustomFieldType.fromJson, ''); - }.bind(this), 'Invalid field type'); + }, 'Invalid field type'); }); // TODO (#2788): What do you want it to do if you overwrite a key? test('Overwrite a Key', function() { @@ -66,14 +66,14 @@ suite('Field Registry', function() { test('Null Value', function() { chai.assert.throws(function() { Blockly.fieldRegistry.register('field_custom_test', null); - }.bind(this), 'fromJson function'); + }, 'fromJson function'); }); test('No fromJson', function() { var fromJson = CustomFieldType.fromJson; delete CustomFieldType.fromJson; chai.assert.throws(function() { Blockly.fieldRegistry.register('field_custom_test', CustomFieldType); - }.bind(this), 'fromJson function'); + }, 'fromJson function'); CustomFieldType.fromJson = fromJson; }); test('fromJson not a function', function() { @@ -81,7 +81,7 @@ suite('Field Registry', function() { CustomFieldType.fromJson = true; chai.assert.throws(function() { Blockly.fieldRegistry.register('field_custom_test', CustomFieldType); - }.bind(this), 'fromJson function'); + }, 'fromJson function'); CustomFieldType.fromJson = fromJson; }); }); From b300583b6aa37006aba7c443714c6cb09a2d2ad1 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Sat, 10 Aug 2019 08:59:15 -0700 Subject: [PATCH 06/17] Try to Fix Mocha: Remove changed tests. --- tests/mocha/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/mocha/index.html b/tests/mocha/index.html index cbceb33ca..bbd47c511 100644 --- a/tests/mocha/index.html +++ b/tests/mocha/index.html @@ -30,7 +30,7 @@ - + @@ -40,6 +40,7 @@ + @@ -48,7 +49,6 @@ -
From 891d23795e3b026de8ece785df5231858832718c Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Sat, 10 Aug 2019 09:17:33 -0700 Subject: [PATCH 07/17] Corrected some language. --- core/field_registry.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/field_registry.js b/core/field_registry.js index 15a66e042..a103ea645 100644 --- a/core/field_registry.js +++ b/core/field_registry.js @@ -19,7 +19,9 @@ */ /** - * @fileoverview Utility methods for handling fields. + * @fileoverview Fields can be created based on a JSON definition. This file + * contains methods for registering those JSON definitions, and building the + * fields based on JSON. * @author bekawestberg@gmail.com (Beka Westberg) */ 'use strict'; @@ -74,8 +76,8 @@ Blockly.fieldRegistry.fromJson = function(options) { var fieldClass = Blockly.fieldRegistry.typeMap_[options['type']]; if (!fieldClass) { console.warn('Blockly could not create a field of type ' + options['type'] + - '. The field is probably not being registered. This may be because the' + - ' file is not loaded, the field does not register itself (See:' + + '. The field is probably not being registered. This could be because' + + ' the file is not loaded, the field does not register itself (See:' + ' github.com/google/blockly/issues/1584), or the registration is not' + ' being reached.'); return null; From 204928101946daa96d911a732af6359cd76ee0f2 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 14 Aug 2019 07:21:21 -0700 Subject: [PATCH 08/17] Fixed turtle field registration. --- demos/custom-fields/field_turtle.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/demos/custom-fields/field_turtle.js b/demos/custom-fields/field_turtle.js index dc7b8c8ea..f31989dff 100644 --- a/demos/custom-fields/field_turtle.js +++ b/demos/custom-fields/field_turtle.js @@ -29,6 +29,7 @@ goog.provide('CustomFields.FieldTurtle'); // You must require the abstract field class to inherit from. goog.require('Blockly.Field'); +goog.require('Blockly.fieldRegistry'); goog.require('Blockly.utils'); goog.require('Blockly.utils.dom'); goog.require('Blockly.utils.Size'); @@ -533,7 +534,7 @@ CustomFields.FieldTurtle.prototype.fromXml = function(fieldElement) { // Blockly needs to know the JSON name of this field. Usually this is // registered at the bottom of the field class. -Blockly.utils.fields.register('field_turtle', CustomFields.FieldTurtle); +Blockly.fieldRegistry.register('field_turtle', CustomFields.FieldTurtle); // Called by initView to create all of the SVGs. This is just used to keep // the code more organized. @@ -742,4 +743,4 @@ CustomFields.FieldTurtle.prototype.createView_ = function() { 'stroke': '#000', 'stroke-opacity': .3 }, this.stripesPattern_); -} +}; From ae3e8895b7f0768e069ef9741137aee61d53d4a3 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Fri, 16 Aug 2019 09:56:35 -0700 Subject: [PATCH 09/17] Maybe fix Mocha? --- core/field_registry.js | 4 ---- core/utils/dom.js | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/field_registry.js b/core/field_registry.js index a103ea645..06cb2e3bc 100644 --- a/core/field_registry.js +++ b/core/field_registry.js @@ -26,10 +26,6 @@ */ 'use strict'; -/** - * @name Blockly.fieldRegistry - * @namespace - */ goog.provide('Blockly.fieldRegistry'); diff --git a/core/utils/dom.js b/core/utils/dom.js index 694cdd9a2..2a52e331b 100644 --- a/core/utils/dom.js +++ b/core/utils/dom.js @@ -32,6 +32,8 @@ */ goog.provide('Blockly.utils.dom'); +goog.require('Blockly.utils.userAgent'); + /** * Required name space for SVG elements. From 1d99c0ffefcf4d9fe2ef8c87239084c24a02e981 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Fri, 16 Aug 2019 10:04:05 -0700 Subject: [PATCH 10/17] Rebuild for rebase. --- blockly_compressed.js | 144 ++--- blockly_uncompressed.js | 1136 +++++++++++++++++++-------------------- 2 files changed, 630 insertions(+), 650 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index d5e08da8b..503b3e8ce 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -772,10 +772,12 @@ Blockly.longStart_=function(a,b){Blockly.longStop_();a.changedTouches&&1!=a.chan Blockly.Touch.shouldHandleEvent=function(a){return!Blockly.Touch.isMouseOrTouchEvent(a)||Blockly.Touch.checkTouchIdentifier(a)};Blockly.Touch.getTouchIdentifierFromEvent=function(a){return void 0!=a.pointerId?a.pointerId:a.changedTouches&&a.changedTouches[0]&&void 0!==a.changedTouches[0].identifier&&null!==a.changedTouches[0].identifier?a.changedTouches[0].identifier:"mouse"}; Blockly.Touch.checkTouchIdentifier=function(a){var b=Blockly.Touch.getTouchIdentifierFromEvent(a);return void 0!==Blockly.Touch.touchIdentifier_&&null!==Blockly.Touch.touchIdentifier_?Blockly.Touch.touchIdentifier_==b:"mousedown"==a.type||"touchstart"==a.type||"pointerdown"==a.type?(Blockly.Touch.touchIdentifier_=b,!0):!1};Blockly.Touch.setClientFromTouch=function(a){if(Blockly.utils.string.startsWith(a.type,"touch")){var b=a.changedTouches[0];a.clientX=b.clientX;a.clientY=b.clientY}}; Blockly.Touch.isMouseOrTouchEvent=function(a){return Blockly.utils.string.startsWith(a.type,"touch")||Blockly.utils.string.startsWith(a.type,"mouse")||Blockly.utils.string.startsWith(a.type,"pointer")};Blockly.Touch.isTouchEvent=function(a){return Blockly.utils.string.startsWith(a.type,"touch")||Blockly.utils.string.startsWith(a.type,"pointer")}; -Blockly.Touch.splitEventByTouches=function(a){var b=[];if(a.changedTouches)for(var c=0;c"!=d.slice(-2)&&(b+=" ")}a=a.join("\n");a=a.replace(/(<(\w+)\b[^>]*>[^\n]*)\n *<\/\2>/g,"$1");return a.replace(/^\n/,"")}; Blockly.Xml.textToDom=function(a){var b=Blockly.utils.xml.textToDomDocument(a);if(!b||!b.documentElement||b.getElementsByTagName("parsererror").length)throw Error("textToDom was unable to parse: "+a);return b.documentElement};Blockly.Xml.clearWorkspaceAndLoadFromXml=function(a,b){b.setResizesEnabled(!1);b.clear();var c=Blockly.Xml.domToWorkspace(a,b);b.setResizesEnabled(!0);return c}; -Blockly.Xml.domToWorkspace=function(a,b){if(a instanceof Blockly.Workspace){var c=a;a=b;b=c;console.warn("Deprecated call to Blockly.Xml.domToWorkspace, swap the arguments.")}var d;b.RTL&&(d=b.getWidth());c=[];Blockly.Field.startCache();var e=a.childNodes.length,f=Blockly.Events.getGroup();f||Blockly.Events.setGroup(!0);b.setResizesEnabled&&b.setResizesEnabled(!1);var g=!0;try{for(var h=0;hthis.maxDisplayLength&&(a=a.substring(0,this.maxDisplayLength-2)+"\u2026");a=a.replace(/\s/g,Blockly.Field.NBSP);this.sourceBlock_.RTL&&(a+="\u200f");return a};Blockly.Field.prototype.getText=function(){return this.text_};Blockly.Field.prototype.setText=function(a){null!==a&&(a=String(a),a!==this.text_&&(this.text_=a,this.forceRerender()))}; @@ -1304,8 +1301,9 @@ Blockly.Field.prototype.forceRerender=function(){this.isDirty_=!0;this.sourceBlo Blockly.Field.prototype.setValue=function(a){if(null!==a){var b=this.doClassValidation_(a);a=this.processValidation_(a,b);if(!(a instanceof Error)){if(b=this.getValidator())if(b=b.call(this,a),a=this.processValidation_(a,b),a instanceof Error)return;b=this.getValue();b!==a&&(this.sourceBlock_&&Blockly.Events.isEnabled()&&Blockly.Events.fire(new Blockly.Events.BlockChange(this.sourceBlock_,"field",this.name,b,a)),this.doValueUpdate_(a),this.isDirty_&&this.forceRerender())}}}; Blockly.Field.prototype.processValidation_=function(a,b){if(null===b)return this.doValueInvalid_(a),this.isDirty_&&this.forceRerender(),Error();void 0!==b&&(a=b);return a};Blockly.Field.prototype.getValue=function(){return this.value_};Blockly.Field.prototype.doClassValidation_=function(a){return a=this.classValidator(a)};Blockly.Field.prototype.doValueUpdate_=function(a){this.value_=a;this.isDirty_=!0;this.text_=String(a)};Blockly.Field.prototype.doValueInvalid_=function(a){}; Blockly.Field.prototype.onMouseDown_=function(a){this.sourceBlock_&&this.sourceBlock_.workspace&&(a=this.sourceBlock_.workspace.getGesture(a))&&a.setStartField(this)};Blockly.Field.prototype.setTooltip=function(a){var b=this.getClickTarget_();b?b.tooltip=a||""===a?a:this.sourceBlock_:this.tooltip_=a};Blockly.Field.prototype.getClickTarget_=function(){return this.clickTarget_||this.getSvgRoot()};Blockly.Field.prototype.getAbsoluteXY_=function(){return Blockly.utils.style.getPageOffset(this.borderRect_)}; -Blockly.Field.prototype.referencesVariables=function(){return!1};Blockly.Field.prototype.getParentInput=function(){for(var a=null,b=this.sourceBlock_,c=b.inputList,d=0;da||a>this.fieldRow.length)throw Error("index "+a+" out of bounds.");if(!b&&!c)return a;"string"==typeof b&&(b=new Blockly.FieldLabel(b));b.setSourceBlock(this.sourceBlock_);this.sourceBlock_.rendered&&b.init();b.name=c;b.prefixField&&(a=this.insertFieldAt(a,b.prefixField));this.fieldRow.splice(a,0,b);++a;b.suffixField&&(a=this.insertFieldAt(a,b.suffixField));this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_()); return a};Blockly.Input.prototype.removeField=function(a){for(var b=0,c;c=this.fieldRow[b];b++)if(c.name===a){c.dispose();this.fieldRow.splice(b,1);this.sourceBlock_.rendered&&(this.sourceBlock_.render(),this.sourceBlock_.bumpNeighbours_());return}throw Error('Field "%s" not found.',a);};Blockly.Input.prototype.isVisible=function(){return this.visible_}; Blockly.Input.prototype.setVisible=function(a){var b=[];if(this.visible_==a)return b;for(var c=(this.visible_=a)?"block":"none",d=0,e;e=this.fieldRow[d];d++)e.setVisible(a);this.connection&&(a?b=this.connection.unhideAll():this.connection.hideAll(),d=this.connection.targetBlock())&&(d.getSvgRoot().style.display=c,a||(d.rendered=!1));return b};Blockly.Input.prototype.setCheck=function(a){if(!this.connection)throw Error("This input does not have a connection.");this.connection.setCheck(a);return this}; @@ -1357,7 +1355,7 @@ Blockly.Block.prototype.jsonInitColour_=function(a,b){if("colour"in a)if(void 0= Blockly.Block.prototype.mixin=function(a,b){if(void 0!==b&&"boolean"!=typeof b)throw Error("opt_disableCheck must be a boolean if provided");if(!b){var c=[],d;for(d in a)void 0!==this[d]&&c.push(d);if(c.length)throw Error("Mixin will overwrite block members: "+JSON.stringify(c));}goog.mixin(this,a)}; Blockly.Block.prototype.interpolate_=function(a,b,c){var d=Blockly.utils.tokenizeInterpolation(a),e=[],f=0;a=[];for(var g=0;g=h||h>b.length)throw Error('Block "'+this.type+'": Message index %'+h+" out of range.");if(e[h])throw Error('Block "'+this.type+'": Message index %'+h+" duplicated.");e[h]=!0;f++;a.push(b[h-1])}else(h=h.trim())&&a.push(h)}if(f!=b.length)throw Error('Block "'+this.type+'": Message does not reference all '+b.length+" arg(s)."); a.length&&("string"==typeof a[a.length-1]||Blockly.utils.string.startsWith(a[a.length-1].type,"field_"))&&(g={type:"input_dummy"},c&&(g.align=c),a.push(g));c={LEFT:Blockly.ALIGN_LEFT,RIGHT:Blockly.ALIGN_RIGHT,CENTRE:Blockly.ALIGN_CENTRE};b=[];for(g=0;g=this.inputList.length)throw RangeError("Input index "+a+" out of bounds.");if(b>this.inputList.length)throw RangeError("Reference input "+b+" out of bounds.");var c=this.inputList[a];this.inputList.splice(a,1);athis.highlightOffset_&&this.steps_.push("V",a.yPos+a.height-this.highlightOffset_))}; Blockly.blockRendering.Highlighter.prototype.drawBottomRow=function(a){var b=a.yPos+a.height-a.overhangY;if(this.RTL_)this.steps_.push("V",b-this.highlightOffset_);else{var c=this.info_.bottomRow.elements[0];"square corner"===c.type?this.steps_.push(Blockly.utils.svgPaths.moveTo(a.xPos+this.highlightOffset_,b-this.highlightOffset_)):"round corner"===c.type&&(this.steps_.push(Blockly.utils.svgPaths.moveTo(a.xPos,b)),this.steps_.push(this.outsideCornerPaths_.bottomLeft()))}}; Blockly.blockRendering.Highlighter.prototype.drawLeft=function(){var a=this.info_.outputConnection;a&&(a=a.connectionOffsetY+a.height,this.RTL_?this.steps_.push(Blockly.utils.svgPaths.moveTo(this.info_.startX,a)):(this.steps_.push(Blockly.utils.svgPaths.moveTo(this.info_.startX+this.highlightOffset_,this.info_.height-this.highlightOffset_)),this.steps_.push("V",a)),this.steps_.push(this.puzzleTabPaths_.pathUp(this.RTL_)));this.RTL_||(a=this.info_.topRow,a.elements[0].isRoundedCorner()?this.steps_.push("V", this.outsideCornerPaths_.height):this.steps_.push("V",a.startY+this.highlightOffset_))}; Blockly.blockRendering.Highlighter.prototype.drawInlineInput=function(a){var b=this.highlightOffset_,c=a.xPos+a.connectionWidth,d=a.centerline-a.height/2,e=a.width-a.connectionWidth,f=d+b;this.RTL_?(d=a.connectionOffsetY-b,a=a.height-(a.connectionOffsetY+a.connectionHeight)+b,b=Blockly.utils.svgPaths.moveTo(c-b,f)+Blockly.utils.svgPaths.lineOnAxis("v",d)+this.puzzleTabPaths_.pathDown(this.RTL_)+Blockly.utils.svgPaths.lineOnAxis("v",a)+Blockly.utils.svgPaths.lineOnAxis("h",e)):b=Blockly.utils.svgPaths.moveTo(a.xPos+ -a.width+b,f)+Blockly.utils.svgPaths.lineOnAxis("v",a.height)+Blockly.utils.svgPaths.lineOnAxis("h",-e)+Blockly.utils.svgPaths.moveTo(c,d+a.connectionOffsetY)+this.puzzleTabPaths_.pathDown(this.RTL_);this.inlineSteps_.push(b)};Blockly.blockRendering.Debug=function(){this.debugElements_=[];this.svgRoot_=null};Blockly.blockRendering.Debug.prototype.clearElems=function(){for(var a=0,b;b=this.debugElements_[a];a++)Blockly.utils.dom.removeNode(b);this.debugElements_=[]};Blockly.blockRendering.Debug.prototype.drawSpacerRow=function(a,b,c){this.debugElements_.push(Blockly.utils.dom.createSvgElement("rect",{"class":"rowSpacerRect blockRenderDebug",x:c?-(a.xPos+a.width):a.xPos,y:b,width:a.width,height:a.height},this.svgRoot_))}; -Blockly.blockRendering.Debug.prototype.drawSpacerElem=function(a,b,c){var d=a.xPos;c&&(d=-(d+a.width));b=Math.min(a.height,b);this.debugElements_.push(Blockly.utils.dom.createSvgElement("rect",{"class":"elemSpacerRect blockRenderDebug",x:d,y:a.centerline-b/2,width:a.width,height:b},this.svgRoot_))}; -Blockly.blockRendering.Debug.prototype.drawRenderedElem=function(a,b){var c=a.xPos;b&&(c=-(c+a.width));this.debugElements_.push(Blockly.utils.dom.createSvgElement("rect",{"class":"rowRenderingRect blockRenderDebug",x:c,y:a.centerline-a.height/2,width:a.width,height:a.height},this.svgRoot_));a.isInput&&this.drawConnection(a.connection)}; -Blockly.blockRendering.Debug.prototype.drawConnection=function(a){if(a.type==Blockly.INPUT_VALUE){var b=4;var c="magenta";var d="none"}else a.type==Blockly.OUTPUT_VALUE?(b=2,d=c="magenta"):a.type==Blockly.NEXT_STATEMENT?(b=4,c="goldenrod",d="none"):a.type==Blockly.PREVIOUS_STATEMENT&&(b=2,d=c="goldenrod");this.debugElements_.push(Blockly.utils.dom.createSvgElement("circle",{"class":"blockRenderDebug",cx:a.offsetInBlock_.x,cy:a.offsetInBlock_.y,r:b,fill:d,stroke:c},this.svgRoot_))}; -Blockly.blockRendering.Debug.prototype.drawRenderedRow=function(a,b,c){this.debugElements_.push(Blockly.utils.dom.createSvgElement("rect",{"class":"elemRenderingRect blockRenderDebug",x:c?-(a.xPos+a.width):a.xPos,y:b,width:a.width,height:a.height},this.svgRoot_))};Blockly.blockRendering.Debug.prototype.drawRowWithElements=function(a,b,c){for(var d=0;da&&(a+=360);a>Blockly.FieldAngle.WRAP&&(a-=360);return a};Blockly.Field.register("field_angle",Blockly.FieldAngle);Blockly.FieldCheckbox=function(a,b){a=this.doClassValidation_(a);null===a&&(a="FALSE");Blockly.FieldCheckbox.superClass_.constructor.call(this,a,b);this.size_.width=Blockly.FieldCheckbox.WIDTH};goog.inherits(Blockly.FieldCheckbox,Blockly.Field);Blockly.FieldCheckbox.fromJson=function(a){return new Blockly.FieldCheckbox(a.checked)};Blockly.FieldCheckbox.WIDTH=15;Blockly.FieldCheckbox.CHECK_CHAR="\u2713";Blockly.FieldCheckbox.CHECK_X_OFFSET=Blockly.Field.DEFAULT_TEXT_OFFSET-3; +Blockly.FieldAngle.prototype.doClassValidation_=function(a){a=Number(a)%360;if(isNaN(a))return null;0>a&&(a+=360);a>Blockly.FieldAngle.WRAP&&(a-=360);return a};Blockly.fieldRegistry.register("field_angle",Blockly.FieldAngle);Blockly.FieldCheckbox=function(a,b){a=this.doClassValidation_(a);null===a&&(a="FALSE");Blockly.FieldCheckbox.superClass_.constructor.call(this,a,b);this.size_.width=Blockly.FieldCheckbox.WIDTH};goog.inherits(Blockly.FieldCheckbox,Blockly.Field);Blockly.FieldCheckbox.fromJson=function(a){return new Blockly.FieldCheckbox(a.checked)};Blockly.FieldCheckbox.WIDTH=15;Blockly.FieldCheckbox.CHECK_CHAR="\u2713";Blockly.FieldCheckbox.CHECK_X_OFFSET=Blockly.Field.DEFAULT_TEXT_OFFSET-3; Blockly.FieldCheckbox.CHECK_Y_OFFSET=14;Blockly.FieldCheckbox.prototype.SERIALIZABLE=!0;Blockly.FieldCheckbox.prototype.CURSOR="default";Blockly.FieldCheckbox.prototype.isDirty_=!1; Blockly.FieldCheckbox.prototype.initView=function(){Blockly.FieldCheckbox.superClass_.initView.call(this);this.textElement_.setAttribute("x",Blockly.FieldCheckbox.CHECK_X_OFFSET);this.textElement_.setAttribute("y",Blockly.FieldCheckbox.CHECK_Y_OFFSET);Blockly.utils.dom.addClass(this.textElement_,"blocklyCheckbox");var a=document.createTextNode(Blockly.FieldCheckbox.CHECK_CHAR);this.textElement_.appendChild(a);this.textElement_.style.display=this.value_?"block":"none"}; Blockly.FieldCheckbox.prototype.showEditor_=function(){this.setValue(!this.value_)};Blockly.FieldCheckbox.prototype.doClassValidation_=function(a){return!0===a||"TRUE"===a?"TRUE":!1===a||"FALSE"===a?"FALSE":null};Blockly.FieldCheckbox.prototype.doValueUpdate_=function(a){this.value_=this.convertValueToBool_(a);this.textElement_&&(this.textElement_.style.display=this.value_?"block":"none")};Blockly.FieldCheckbox.prototype.getValue=function(){return this.value_?"TRUE":"FALSE"}; -Blockly.FieldCheckbox.prototype.getValueBoolean=function(){return this.value_};Blockly.FieldCheckbox.prototype.getText=function(){return String(this.convertValueToBool_(this.value_))};Blockly.FieldCheckbox.prototype.convertValueToBool_=function(a){return"string"==typeof a?"TRUE"==a:!!a};Blockly.Field.register("field_checkbox",Blockly.FieldCheckbox);Blockly.utils.colour={};Blockly.utils.colour.parse=function(a){a=String(a).toLowerCase().trim();var b=Blockly.utils.colour.names[a];if(b)return b;b="#"==a[0]?a:"#"+a;if(/^#[0-9a-f]{6}$/.test(b))return b;if(/^#[0-9a-f]{3}$/.test(b))return["#",b[1],b[1],b[2],b[2],b[3],b[3]].join("");var c=a.match(/^(?:rgb)?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);return c&&(a=Number(c[1]),b=Number(c[2]),c=Number(c[3]),0<=a&&256>a&&0<=b&&256>b&&0<=c&&256>c)?Blockly.utils.colour.rgbToHex(a,b,c):null}; +Blockly.FieldCheckbox.prototype.getValueBoolean=function(){return this.value_};Blockly.FieldCheckbox.prototype.getText=function(){return String(this.convertValueToBool_(this.value_))};Blockly.FieldCheckbox.prototype.convertValueToBool_=function(a){return"string"==typeof a?"TRUE"==a:!!a};Blockly.fieldRegistry.register("field_checkbox",Blockly.FieldCheckbox);Blockly.utils.colour={};Blockly.utils.colour.parse=function(a){a=String(a).toLowerCase().trim();var b=Blockly.utils.colour.names[a];if(b)return b;b="#"==a[0]?a:"#"+a;if(/^#[0-9a-f]{6}$/.test(b))return b;if(/^#[0-9a-f]{3}$/.test(b))return["#",b[1],b[1],b[2],b[2],b[3],b[3]].join("");var c=a.match(/^(?:rgb)?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/);return c&&(a=Number(c[1]),b=Number(c[2]),c=Number(c[3]),0<=a&&256>a&&0<=b&&256>b&&0<=c&&256>c)?Blockly.utils.colour.rgbToHex(a,b,c):null}; Blockly.utils.colour.rgbToHex=function(a,b,c){b=a<<16|b<<8|c;return 16>a?"#"+(16777216|b).toString(16).substr(1):"#"+b.toString(16)};Blockly.utils.colour.hexToRgb=function(a){a=parseInt(a.substr(1),16);return[a>>16,a>>8&255,a&255]}; Blockly.utils.colour.hsvToHex=function(a,b,c){var d=0,e=0,f=0;if(0==b)f=e=d=c;else{var g=Math.floor(a/60),h=a/60-g;a=c*(1-b);var k=c*(1-b*h);b=c*(1-b*(1-h));switch(g){case 1:d=k;e=c;f=a;break;case 2:d=a;e=c;f=b;break;case 3:d=a;e=k;f=c;break;case 4:d=b;e=a;f=c;break;case 5:d=c;e=a;f=k;break;case 6:case 0:d=c,e=b,f=a}}return Blockly.utils.colour.rgbToHex(Math.floor(d),Math.floor(e),Math.floor(f))}; Blockly.utils.colour.blend=function(a,b,c){a=Blockly.utils.colour.hexToRgb(Blockly.utils.colour.parse(a));b=Blockly.utils.colour.hexToRgb(Blockly.utils.colour.parse(b));return Blockly.utils.colour.rgbToHex(Math.round(b[0]+c*(a[0]-b[0])),Math.round(b[1]+c*(a[1]-b[1])),Math.round(b[2]+c*(a[2]-b[2])))}; @@ -1589,7 +1597,7 @@ Blockly.FieldColour.prototype.getText=function(){var a=this.value_;/^#(.)\1(.)\2 Blockly.FieldColour.TITLES=[];Blockly.FieldColour.COLUMNS=7;Blockly.FieldColour.prototype.setColours=function(a,b){this.colours_=a;b&&(this.titles_=b);return this};Blockly.FieldColour.prototype.setColumns=function(a){this.columns_=a;return this}; Blockly.FieldColour.prototype.showEditor_=function(){var a=this.dropdownCreate_();Blockly.DropDownDiv.getContentDiv().appendChild(a);Blockly.DropDownDiv.setColour(this.DROPDOWN_BACKGROUND_COLOUR,this.DROPDOWN_BORDER_COLOUR);Blockly.DropDownDiv.showPositionedByField(this,this.dropdownDispose_.bind(this))};Blockly.FieldColour.prototype.onClick_=function(a){(a=a.target)&&!a.label&&(a=a.parentNode);a=a&&a.label;null!==a&&(this.setValue(a),Blockly.DropDownDiv.hideIfOwner(this))}; Blockly.FieldColour.prototype.dropdownCreate_=function(){var a=this.columns_||Blockly.FieldColour.COLUMNS,b=this.colours_||Blockly.FieldColour.COLOURS,c=this.titles_||Blockly.FieldColour.TITLES,d=this.getValue(),e=document.createElement("table");e.className="blocklyColourTable";for(var f,g=0;g=c||0>=b)throw Error("Height and width values of an image field must be greater than 0.");this.imageHeight_=c;this.size_=new Blockly.utils.Size(b,c+Blockly.FieldImage.Y_PADDING);this.flipRtl_=f;this.text_=d||"";this.setValue(a||"");"function"==typeof e&& +d[0]+" in: ",d)):(b=!0,console.error("Invalid option["+c+"]: Each FieldDropdown option must be an array. Found: ",d))}if(b)throw TypeError("Found invalid FieldDropdown options.");};Blockly.fieldRegistry.register("field_dropdown",Blockly.FieldDropdown);Blockly.FieldLabelSerializable=function(a,b){Blockly.FieldLabelSerializable.superClass_.constructor.call(this,a,b)};goog.inherits(Blockly.FieldLabelSerializable,Blockly.FieldLabel);Blockly.FieldLabelSerializable.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.text);return new Blockly.FieldLabelSerializable(b,a["class"])};Blockly.FieldLabelSerializable.prototype.EDITABLE=!1;Blockly.FieldLabelSerializable.prototype.SERIALIZABLE=!0; +Blockly.fieldRegistry.register("field_label_serializable",Blockly.FieldLabelSerializable);Blockly.FieldImage=function(a,b,c,d,e,f){this.sourceBlock_=null;if(!a)throw Error("Src value of an image field is required");if(isNaN(c)||isNaN(b))throw Error("Height and width values of an image field must cast to numbers.");c=Number(c);b=Number(b);if(0>=c||0>=b)throw Error("Height and width values of an image field must be greater than 0.");this.imageHeight_=c;this.size_=new Blockly.utils.Size(b,c+Blockly.FieldImage.Y_PADDING);this.flipRtl_=f;this.text_=d||"";this.setValue(a||"");"function"==typeof e&& (this.clickHandler_=e)};goog.inherits(Blockly.FieldImage,Blockly.Field);Blockly.FieldImage.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.src),c=Number(Blockly.utils.replaceMessageReferences(a.width)),d=Number(Blockly.utils.replaceMessageReferences(a.height)),e=Blockly.utils.replaceMessageReferences(a.alt);return new Blockly.FieldImage(b,c,d,e,null,!!a.flipRtl)};Blockly.FieldImage.Y_PADDING=1;Blockly.FieldImage.prototype.EDITABLE=!1;Blockly.FieldImage.prototype.isDirty_=!1; Blockly.FieldImage.prototype.initView=function(){this.imageElement_=Blockly.utils.dom.createSvgElement("image",{height:this.imageHeight_+"px",width:this.size_.width+"px",alt:this.text_},this.fieldGroup_);this.imageElement_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.value_)};Blockly.FieldImage.prototype.doClassValidation_=function(a){return"string"!=typeof a?null:a}; Blockly.FieldImage.prototype.doValueUpdate_=function(a){this.value_=a;this.imageElement_&&this.imageElement_.setAttributeNS(Blockly.utils.dom.XLINK_NS,"xlink:href",this.value_||"")};Blockly.FieldImage.prototype.getFlipRtl=function(){return this.flipRtl_};Blockly.FieldImage.prototype.setText=function(a){this.setAlt(a)};Blockly.FieldImage.prototype.setAlt=function(a){null!==a&&(this.text_=a,this.imageElement_&&this.imageElement_.setAttribute("alt",a||""))}; -Blockly.FieldImage.prototype.showEditor_=function(){this.clickHandler_&&this.clickHandler_(this)};Blockly.FieldImage.prototype.setOnClickHandler=function(a){this.clickHandler_=a};Blockly.Field.register("field_image",Blockly.FieldImage);Blockly.FieldNumber=function(a,b,c,d,e){this.setConstraints(b,c,d);a=this.doClassValidation_(a);null===a&&(a=0);Blockly.FieldNumber.superClass_.constructor.call(this,a,e)};goog.inherits(Blockly.FieldNumber,Blockly.FieldTextInput);Blockly.FieldNumber.fromJson=function(a){return new Blockly.FieldNumber(a.value,a.min,a.max,a.precision)};Blockly.FieldNumber.prototype.SERIALIZABLE=!0; +Blockly.FieldImage.prototype.showEditor_=function(){this.clickHandler_&&this.clickHandler_(this)};Blockly.FieldImage.prototype.setOnClickHandler=function(a){this.clickHandler_=a};Blockly.fieldRegistry.register("field_image",Blockly.FieldImage);Blockly.FieldNumber=function(a,b,c,d,e){this.setConstraints(b,c,d);a=this.doClassValidation_(a);null===a&&(a=0);Blockly.FieldNumber.superClass_.constructor.call(this,a,e)};goog.inherits(Blockly.FieldNumber,Blockly.FieldTextInput);Blockly.FieldNumber.fromJson=function(a){return new Blockly.FieldNumber(a.value,a.min,a.max,a.precision)};Blockly.FieldNumber.prototype.SERIALIZABLE=!0; Blockly.FieldNumber.prototype.setConstraints=function(a,b,c){c=Number(c);this.precision_=isNaN(c)?0:c;c=this.precision_.toString();var d=c.indexOf(".");this.fractionalDigits_=-1==d?-1:c.length-(d+1);a=Number(a);this.min_=isNaN(a)?-Infinity:a;b=Number(b);this.max_=isNaN(b)?Infinity:b;this.setValue(this.getValue())}; -Blockly.FieldNumber.prototype.doClassValidation_=function(a){if(null===a||void 0===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=Number(a||0);if(isNaN(a))return null;a=Math.min(Math.max(a,this.min_),this.max_);this.precision_&&isFinite(a)&&(a=Math.round(a/this.precision_)*this.precision_);return a=-1==this.fractionalDigits_?a:Number(a.toFixed(this.fractionalDigits_))};Blockly.Field.register("field_number",Blockly.FieldNumber);Blockly.FieldVariable=function(a,b,c,d){this.menuGenerator_=Blockly.FieldVariable.dropdownCreate;this.size_=new Blockly.utils.Size(0,Blockly.BlockSvg.MIN_BLOCK_Y);b&&this.setValidator(b);this.defaultVariableName=a||"";this.setTypes_(c,d);this.value_=null};goog.inherits(Blockly.FieldVariable,Blockly.FieldDropdown);Blockly.FieldVariable.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.variable);return new Blockly.FieldVariable(b,null,a.variableTypes,a.defaultType)}; +Blockly.FieldNumber.prototype.doClassValidation_=function(a){if(null===a||void 0===a)return null;a=String(a);a=a.replace(/O/ig,"0");a=a.replace(/,/g,"");a=Number(a||0);if(isNaN(a))return null;a=Math.min(Math.max(a,this.min_),this.max_);this.precision_&&isFinite(a)&&(a=Math.round(a/this.precision_)*this.precision_);return a=-1==this.fractionalDigits_?a:Number(a.toFixed(this.fractionalDigits_))};Blockly.fieldRegistry.register("field_number",Blockly.FieldNumber);Blockly.FieldVariable=function(a,b,c,d){this.menuGenerator_=Blockly.FieldVariable.dropdownCreate;this.size_=new Blockly.utils.Size(0,Blockly.BlockSvg.MIN_BLOCK_Y);b&&this.setValidator(b);this.defaultVariableName=a||"";this.setTypes_(c,d);this.value_=null};goog.inherits(Blockly.FieldVariable,Blockly.FieldDropdown);Blockly.FieldVariable.fromJson=function(a){var b=Blockly.utils.replaceMessageReferences(a.variable);return new Blockly.FieldVariable(b,null,a.variableTypes,a.defaultType)}; Blockly.FieldVariable.prototype.workspace_=null;Blockly.FieldVariable.prototype.SERIALIZABLE=!0;Blockly.FieldVariable.prototype.initModel=function(){if(!this.variable_){var a=Blockly.Variables.getOrCreateVariablePackage(this.workspace_,null,this.defaultVariableName,this.defaultType_);Blockly.Events.disable();this.setValue(a.getId());Blockly.Events.enable()}}; Blockly.FieldVariable.prototype.fromXml=function(a){var b=a.getAttribute("id"),c=a.textContent,d=a.getAttribute("variabletype")||a.getAttribute("variableType")||"";b=Blockly.Variables.getOrCreateVariablePackage(this.workspace_,b,c,d);if(null!=d&&d!==b.type)throw Error("Serialized variable type with id '"+b.getId()+"' had type "+b.type+", and does not match variable field that references it: "+Blockly.Xml.domToText(a)+".");this.setValue(b.getId())}; Blockly.FieldVariable.prototype.toXml=function(a){this.initModel();a.id=this.variable_.getId();a.textContent=this.variable_.name;this.variable_.type&&a.setAttribute("variabletype",this.variable_.type);return a};Blockly.FieldVariable.prototype.setSourceBlock=function(a){if(a.isShadow())throw Error("Variable fields are not allowed to exist on shadow blocks.");Blockly.FieldVariable.superClass_.setSourceBlock.call(this,a);this.workspace_=a.workspace}; @@ -1625,7 +1633,7 @@ Blockly.FieldVariable.prototype.getVariableTypes_=function(){var a=this.variable Blockly.FieldVariable.prototype.setTypes_=function(a,b){var c=b||"";if(null==a||void 0==a)var d=null;else if(Array.isArray(a)){d=a;for(var e=!1,f=0;f Date: Fri, 16 Aug 2019 10:26:01 -0700 Subject: [PATCH 11/17] Maybe fix mocha? --- blockly_uncompressed.js | 2 +- core/field_registry.js | 2 ++ tests/mocha/index.html | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/blockly_uncompressed.js b/blockly_uncompressed.js index d261dcc77..31812a66d 100644 --- a/blockly_uncompressed.js +++ b/blockly_uncompressed.js @@ -70,7 +70,7 @@ goog.addDependency("../../../" + dir + "/core/field_image.js", ['Blockly.FieldIm goog.addDependency("../../../" + dir + "/core/field_label.js", ['Blockly.FieldLabel'], ['Blockly.Field', 'Blockly.fieldRegistry', 'Blockly.utils', 'Blockly.utils.dom', 'Blockly.utils.Size']); goog.addDependency("../../../" + dir + "/core/field_label_serializable.js", ['Blockly.FieldLabelSerializable'], ['Blockly.FieldLabel', 'Blockly.fieldRegistry', 'Blockly.utils']); goog.addDependency("../../../" + dir + "/core/field_number.js", ['Blockly.FieldNumber'], ['Blockly.fieldRegistry', 'Blockly.FieldTextInput']); -goog.addDependency("../../../" + dir + "/core/field_registry.js", ['Blockly.fieldRegistry'], []); +goog.addDependency("../../../" + dir + "/core/field_registry.js", ['Blockly.fieldRegistry'], ['Blockly.utils']); goog.addDependency("../../../" + dir + "/core/field_textinput.js", ['Blockly.FieldTextInput'], ['Blockly.Events', 'Blockly.Events.BlockChange', 'Blockly.Field', 'Blockly.fieldRegistry', 'Blockly.Msg', 'Blockly.utils', 'Blockly.utils.aria', 'Blockly.utils.Coordinate', 'Blockly.utils.dom', 'Blockly.utils.Size', 'Blockly.utils.userAgent']); goog.addDependency("../../../" + dir + "/core/field_variable.js", ['Blockly.FieldVariable'], ['Blockly.Events', 'Blockly.Events.BlockChange', 'Blockly.FieldDropdown', 'Blockly.fieldRegistry', 'Blockly.Msg', 'Blockly.utils', 'Blockly.utils.Size', 'Blockly.VariableModel', 'Blockly.Variables', 'Blockly.Xml']); goog.addDependency("../../../" + dir + "/core/flyout_base.js", ['Blockly.Flyout'], ['Blockly.Block', 'Blockly.Events', 'Blockly.Events.BlockCreate', 'Blockly.Events.VarCreate', 'Blockly.FlyoutButton', 'Blockly.Gesture', 'Blockly.Tooltip', 'Blockly.Touch', 'Blockly.utils', 'Blockly.utils.Coordinate', 'Blockly.utils.dom', 'Blockly.WorkspaceSvg', 'Blockly.Xml']); diff --git a/core/field_registry.js b/core/field_registry.js index 06cb2e3bc..2125ea97f 100644 --- a/core/field_registry.js +++ b/core/field_registry.js @@ -28,6 +28,8 @@ goog.provide('Blockly.fieldRegistry'); +goog.require('Blockly.utils'); + /** * The set of all registered fields, keyed by field type as used in the JSON diff --git a/tests/mocha/index.html b/tests/mocha/index.html index bbd47c511..7f27db666 100644 --- a/tests/mocha/index.html +++ b/tests/mocha/index.html @@ -30,7 +30,7 @@ - + @@ -40,7 +40,7 @@ - + From 23366e40b45e847bceb8f26f3e9b23ed7af87531 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Fri, 16 Aug 2019 10:45:26 -0700 Subject: [PATCH 12/17] Maybe fix mocha? --- blockly_compressed.js | 778 +++++++++++++++++++++++++++++++++++++++- blockly_uncompressed.js | 2 +- 2 files changed, 777 insertions(+), 3 deletions(-) diff --git a/blockly_compressed.js b/blockly_compressed.js index 503b3e8ce..ce3df731d 100644 --- a/blockly_compressed.js +++ b/blockly_compressed.js @@ -734,7 +734,770 @@ goog.ui.Menu.prototype.setAllowHighlightDisabled=function(a){this.allowHighlight goog.ui.Menu.prototype.handleEnterItem=function(a){this.allowAutoFocus_&&this.getKeyEventTarget().focus();return goog.ui.Menu.superClass_.handleEnterItem.call(this,a)};goog.ui.Menu.prototype.highlightNextPrefix=function(a){var b=new RegExp("^"+goog.string.regExpEscape(a),"i");return this.highlightHelper(function(a,d){var c=0>a?0:a,f=!1;do{++a;a==d&&(a=0,f=!0);var g=this.getChildAt(a).getCaption();if(g&&g.match(b))return a}while(!f||a!=c);return this.getHighlightedIndex()},this.getHighlightedIndex())}; goog.ui.Menu.prototype.canHighlightItem=function(a){return(this.allowHighlightDisabled_||a.isEnabled())&&a.isVisible()&&a.isSupportedState(goog.ui.Component.State.HOVER)};goog.ui.Menu.prototype.decorateInternal=function(a){this.decorateContent(a);goog.ui.Menu.superClass_.decorateInternal.call(this,a)}; goog.ui.Menu.prototype.handleKeyEventInternal=function(a){var b=goog.ui.Menu.superClass_.handleKeyEventInternal.call(this,a);b||this.forEachChild(function(c){!b&&c.getMnemonic&&c.getMnemonic()==a.keyCode&&(this.isEnabled()&&this.setHighlighted(c),b=c.handleKeyEvent(a))},this);return b};goog.ui.Menu.prototype.setHighlightedIndex=function(a){goog.ui.Menu.superClass_.setHighlightedIndex.call(this,a);(a=this.getChildAt(a))&&goog.style.scrollIntoContainerView(a.getElement(),this.getElement())}; -goog.ui.Menu.prototype.decorateContent=function(a){var b=this.getRenderer();a=this.getDomHelper().getElementsByTagNameAndClass("DIV",b.getCssClass()+"-content",a);for(var c=a.length,d=0;db%28}; +goog.date.getNumberOfDaysInMonth=function(a,b){switch(b){case goog.date.month.FEB:return goog.date.isLeapYear(a)?29:28;case goog.date.month.JUN:case goog.date.month.SEP:case goog.date.month.NOV:case goog.date.month.APR:return 30}return 31};goog.date.isSameDay=function(a,b){var c=b||new Date(goog.now());return a.getDate()==c.getDate()&&goog.date.isSameMonth(a,c)};goog.date.isSameMonth=function(a,b){var c=b||new Date(goog.now());return a.getMonth()==c.getMonth()&&goog.date.isSameYear(a,c)}; +goog.date.isSameYear=function(a,b){var c=b||new Date(goog.now());return a.getFullYear()==c.getFullYear()};goog.date.getCutOffSameWeek_=function(a,b,c,d,e){a=new Date(a,b,c);d=goog.isDef(d)?d:goog.date.weekDay.THU;e=e||goog.date.weekDay.MON;b=(a.getDay()+6)%7;return a.valueOf()+((d-e+7)%7-(b-e+7)%7)*goog.date.MS_PER_DAY}; +goog.date.getWeekNumber=function(a,b,c,d,e){a=goog.date.getCutOffSameWeek_(a,b,c,d,e);b=(new Date((new Date(a)).getFullYear(),0,1)).valueOf();return Math.floor(Math.round((a-b)/goog.date.MS_PER_DAY)/7)+1};goog.date.getYearOfWeek=function(a,b,c,d,e){a=goog.date.getCutOffSameWeek_(a,b,c,d,e);return(new Date(a)).getFullYear()};goog.date.min=function(a,b){return ab?a:b}; +goog.date.setIso8601DateTime=function(a,b){b=goog.string.trim(b);var c=-1==b.indexOf("T")?" ":"T";c=b.split(c);return goog.date.setIso8601DateOnly_(a,c[0])&&(2>c.length||goog.date.setIso8601TimeOnly_(a,c[1]))}; +goog.date.setIso8601DateOnly_=function(a,b){var c=b.match(goog.date.splitDateStringRegex_);if(!c)return!1;var d=Number(c[2]),e=Number(c[3]),f=Number(c[4]),g=Number(c[5]),h=Number(c[6])||1;a.setFullYear(Number(c[1]));f?(a.setDate(1),a.setMonth(0),a.add(new goog.date.Interval(goog.date.Interval.DAYS,f-1))):g?goog.date.setDateFromIso8601Week_(a,g,h):(d&&(a.setDate(1),a.setMonth(d-1)),e&&a.setDate(e));return!0}; +goog.date.setDateFromIso8601Week_=function(a,b,c){a.setMonth(0);a.setDate(1);var d=a.getDay()||7;b=new goog.date.Interval(goog.date.Interval.DAYS,(4>=d?1-d:8-d)+(Number(c)+7*(Number(b)-1))-1);a.add(b)}; +goog.date.setIso8601TimeOnly_=function(a,b){var c=b.match(goog.date.splitTimezoneStringRegex_);if(c){var d=b.substring(0,b.length-c[0].length);if("Z"===c[0])var e=0;else e=60*Number(c[2])+Number(c[3]),e*="-"==c[1]?1:-1}else d=b;d=d.match(goog.date.splitTimeStringRegex_);if(!d)return!1;if(c){goog.asserts.assertNumber(e);c=a.getYear();var f=a.getMonth(),g=a.getDate();d=Date.UTC(c,f,g,Number(d[1]),Number(d[2])||0,Number(d[3])||0,d[4]?1E3*Number(d[4]):0);a.setTime(d+6E4*e)}else a.setHours(Number(d[1])), +a.setMinutes(Number(d[2])||0),a.setSeconds(Number(d[3])||0),a.setMilliseconds(d[4]?1E3*Number(d[4]):0);return!0}; +goog.date.Interval=function(a,b,c,d,e,f){goog.isString(a)?(this.years=a==goog.date.Interval.YEARS?b:0,this.months=a==goog.date.Interval.MONTHS?b:0,this.days=a==goog.date.Interval.DAYS?b:0,this.hours=a==goog.date.Interval.HOURS?b:0,this.minutes=a==goog.date.Interval.MINUTES?b:0,this.seconds=a==goog.date.Interval.SECONDS?b:0):(this.years=a||0,this.months=b||0,this.days=c||0,this.hours=d||0,this.minutes=e||0,this.seconds=f||0)}; +goog.date.Interval.fromIsoString=function(a){a=a.match(goog.date.splitDurationRegex_);if(!a)return null;var b=!(a[6]||a[7]||a[8]);if(b&&!(a[2]||a[3]||a[4])||b&&a[5])return null;b=a[1];var c=parseInt(a[2],10)||0,d=parseInt(a[3],10)||0,e=parseInt(a[4],10)||0,f=parseInt(a[6],10)||0,g=parseInt(a[7],10)||0;a=parseFloat(a[8])||0;return b?new goog.date.Interval(-c,-d,-e,-f,-g,-a):new goog.date.Interval(c,d,e,f,g,a)}; +goog.date.Interval.prototype.toIsoString=function(a){var b=Math.min(this.years,this.months,this.days,this.hours,this.minutes,this.seconds),c=Math.max(this.years,this.months,this.days,this.hours,this.minutes,this.seconds);if(0>b&&0b&&c.push("-");c.push("P");(this.years||a)&&c.push(Math.abs(this.years)+"Y");(this.months||a)&&c.push(Math.abs(this.months)+"M");(this.days||a)&&c.push(Math.abs(this.days)+"D");if(this.hours||this.minutes||this.seconds|| +a)c.push("T"),(this.hours||a)&&c.push(Math.abs(this.hours)+"H"),(this.minutes||a)&&c.push(Math.abs(this.minutes)+"M"),(this.seconds||a)&&c.push(Math.abs(this.seconds)+"S");return c.join("")};goog.date.Interval.prototype.equals=function(a){return a.years==this.years&&a.months==this.months&&a.days==this.days&&a.hours==this.hours&&a.minutes==this.minutes&&a.seconds==this.seconds}; +goog.date.Interval.prototype.clone=function(){return new goog.date.Interval(this.years,this.months,this.days,this.hours,this.minutes,this.seconds)};goog.date.Interval.YEARS="y";goog.date.Interval.MONTHS="m";goog.date.Interval.DAYS="d";goog.date.Interval.HOURS="h";goog.date.Interval.MINUTES="n";goog.date.Interval.SECONDS="s";goog.date.Interval.prototype.isZero=function(){return 0==this.years&&0==this.months&&0==this.days&&0==this.hours&&0==this.minutes&&0==this.seconds}; +goog.date.Interval.prototype.getInverse=function(){return this.times(-1)};goog.date.Interval.prototype.times=function(a){return new goog.date.Interval(this.years*a,this.months*a,this.days*a,this.hours*a,this.minutes*a,this.seconds*a)};goog.date.Interval.prototype.getTotalSeconds=function(){goog.asserts.assert(0==this.years&&0==this.months);return 60*(60*(24*this.days+this.hours)+this.minutes)+this.seconds}; +goog.date.Interval.prototype.add=function(a){this.years+=a.years;this.months+=a.months;this.days+=a.days;this.hours+=a.hours;this.minutes+=a.minutes;this.seconds+=a.seconds}; +goog.date.Date=function(a,b,c){goog.isNumber(a)?(this.date=this.buildDate_(a,b||0,c||1),this.maybeFixDst_(c||1)):goog.isObject(a)?(this.date=this.buildDate_(a.getFullYear(),a.getMonth(),a.getDate()),this.maybeFixDst_(a.getDate())):(this.date=new Date(goog.now()),a=this.date.getDate(),this.date.setHours(0),this.date.setMinutes(0),this.date.setSeconds(0),this.date.setMilliseconds(0),this.maybeFixDst_(a))}; +goog.date.Date.prototype.buildDate_=function(a,b,c){b=new Date(a,b,c);0<=a&&100>a&&b.setFullYear(b.getFullYear()-1900);return b};goog.date.Date.prototype.firstDayOfWeek_=goog.i18n.DateTimeSymbols.FIRSTDAYOFWEEK;goog.date.Date.prototype.firstWeekCutOffDay_=goog.i18n.DateTimeSymbols.FIRSTWEEKCUTOFFDAY;goog.date.Date.prototype.clone=function(){var a=new goog.date.Date(this.date);a.firstDayOfWeek_=this.firstDayOfWeek_;a.firstWeekCutOffDay_=this.firstWeekCutOffDay_;return a}; +goog.date.Date.prototype.getFullYear=function(){return this.date.getFullYear()};goog.date.Date.prototype.getYear=function(){return this.getFullYear()};goog.date.Date.prototype.getMonth=function(){return this.date.getMonth()};goog.date.Date.prototype.getDate=function(){return this.date.getDate()};goog.date.Date.prototype.getTime=function(){return this.date.getTime()};goog.date.Date.prototype.getDay=function(){return this.date.getDay()}; +goog.date.Date.prototype.getIsoWeekday=function(){return(this.getDay()+6)%7};goog.date.Date.prototype.getWeekday=function(){return(this.getIsoWeekday()-this.firstDayOfWeek_+7)%7};goog.date.Date.prototype.getUTCFullYear=function(){return this.date.getUTCFullYear()};goog.date.Date.prototype.getUTCMonth=function(){return this.date.getUTCMonth()};goog.date.Date.prototype.getUTCDate=function(){return this.date.getUTCDate()};goog.date.Date.prototype.getUTCDay=function(){return this.date.getDay()}; +goog.date.Date.prototype.getUTCHours=function(){return this.date.getUTCHours()};goog.date.Date.prototype.getUTCMinutes=function(){return this.date.getUTCMinutes()};goog.date.Date.prototype.getUTCIsoWeekday=function(){return(this.date.getUTCDay()+6)%7};goog.date.Date.prototype.getUTCWeekday=function(){return(this.getUTCIsoWeekday()-this.firstDayOfWeek_+7)%7};goog.date.Date.prototype.getFirstDayOfWeek=function(){return this.firstDayOfWeek_};goog.date.Date.prototype.getFirstWeekCutOffDay=function(){return this.firstWeekCutOffDay_}; +goog.date.Date.prototype.getNumberOfDaysInMonth=function(){return goog.date.getNumberOfDaysInMonth(this.getFullYear(),this.getMonth())};goog.date.Date.prototype.getWeekNumber=function(){return goog.date.getWeekNumber(this.getFullYear(),this.getMonth(),this.getDate(),this.firstWeekCutOffDay_,this.firstDayOfWeek_)};goog.date.Date.prototype.getYearOfWeek=function(){return goog.date.getYearOfWeek(this.getFullYear(),this.getMonth(),this.getDate(),this.firstWeekCutOffDay_,this.firstDayOfWeek_)}; +goog.date.Date.prototype.getDayOfYear=function(){for(var a=this.getDate(),b=this.getFullYear(),c=this.getMonth()-1;0<=c;c--)a+=goog.date.getNumberOfDaysInMonth(b,c);return a};goog.date.Date.prototype.getTimezoneOffset=function(){return this.date.getTimezoneOffset()};goog.date.Date.prototype.getTimezoneOffsetString=function(){var a=this.getTimezoneOffset();if(0==a)a="Z";else{var b=Math.abs(a)/60,c=Math.floor(b);b=60*(b-c);a=(0b&&(b+=12);var d=goog.date.getNumberOfDaysInMonth(c,b);d=Math.min(d,this.getDate());this.setDate(1);this.setFullYear(c);this.setMonth(b);this.setDate(d)}a.days&&(b=new Date(this.getYear(),this.getMonth(),this.getDate(),12),a=new Date(b.getTime()+864E5*a.days),this.setDate(1),this.setFullYear(a.getFullYear()),this.setMonth(a.getMonth()),this.setDate(a.getDate()), +this.maybeFixDst_(a.getDate()))};goog.date.Date.prototype.toIsoString=function(a,b){return[this.getFullYear(),goog.string.padNumber(this.getMonth()+1,2),goog.string.padNumber(this.getDate(),2)].join(a?"-":"")+(b?this.getTimezoneOffsetString():"")};goog.date.Date.prototype.toUTCIsoString=function(a,b){return[this.getUTCFullYear(),goog.string.padNumber(this.getUTCMonth()+1,2),goog.string.padNumber(this.getUTCDate(),2)].join(a?"-":"")+(b?"Z":"")}; +goog.date.Date.prototype.equals=function(a){return!(!a||this.getYear()!=a.getYear()||this.getMonth()!=a.getMonth()||this.getDate()!=a.getDate())};goog.date.Date.prototype.toString=function(){return this.toIsoString()};goog.date.Date.prototype.maybeFixDst_=function(a){this.getDate()!=a&&(a=this.getDate()=a.length)throw goog.iter.StopIteration;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");}; +goog.iter.forEach=function(a,b,c){if(goog.isArrayLike(a))try{goog.array.forEach(a,b,c)}catch(d){if(d!==goog.iter.StopIteration)throw d;}else{a=goog.iter.toIterator(a);try{for(;;)b.call(c,a.next(),void 0,a)}catch(d){if(d!==goog.iter.StopIteration)throw d;}}};goog.iter.filter=function(a,b,c){var d=goog.iter.toIterator(a);a=new goog.iter.Iterator;a.next=function(){for(;;){var a=d.next();if(b.call(c,a,void 0,d))return a}};return a}; +goog.iter.filterFalse=function(a,b,c){return goog.iter.filter(a,goog.functions.not(b),c)};goog.iter.range=function(a,b,c){var d=0,e=a,f=c||1;1=e||0>f&&d<=e)throw goog.iter.StopIteration;var a=d;d+=f;return a};return g};goog.iter.join=function(a,b){return goog.iter.toArray(a).join(b)}; +goog.iter.map=function(a,b,c){var d=goog.iter.toIterator(a);a=new goog.iter.Iterator;a.next=function(){var a=d.next();return b.call(c,a,void 0,d)};return a};goog.iter.reduce=function(a,b,c,d){var e=c;goog.iter.forEach(a,function(a){e=b.call(d,e,a)});return e};goog.iter.some=function(a,b,c){a=goog.iter.toIterator(a);try{for(;;)if(b.call(c,a.next(),void 0,a))return!0}catch(d){if(d!==goog.iter.StopIteration)throw d;}return!1}; +goog.iter.every=function(a,b,c){a=goog.iter.toIterator(a);try{for(;;)if(!b.call(c,a.next(),void 0,a))return!1}catch(d){if(d!==goog.iter.StopIteration)throw d;}return!0};goog.iter.chain=function(a){return goog.iter.chainFromIterable(arguments)}; +goog.iter.chainFromIterable=function(a){var b=goog.iter.toIterator(a);a=new goog.iter.Iterator;var c=null;a.next=function(){for(;;){if(null==c){var a=b.next();c=goog.iter.toIterator(a)}try{return c.next()}catch(e){if(e!==goog.iter.StopIteration)throw e;c=null}}};return a};goog.iter.dropWhile=function(a,b,c){var d=goog.iter.toIterator(a);a=new goog.iter.Iterator;var e=!0;a.next=function(){for(;;){var a=d.next();if(!e||!b.call(c,a,void 0,d))return e=!1,a}};return a}; +goog.iter.takeWhile=function(a,b,c){var d=goog.iter.toIterator(a);a=new goog.iter.Iterator;a.next=function(){var a=d.next();if(b.call(c,a,void 0,d))return a;throw goog.iter.StopIteration;};return a};goog.iter.toArray=function(a){if(goog.isArrayLike(a))return goog.array.toArray(a);a=goog.iter.toIterator(a);var b=[];goog.iter.forEach(a,function(a){b.push(a)});return b}; +goog.iter.equals=function(a,b,c){a=goog.iter.zipLongest({},a,b);var d=c||goog.array.defaultCompareEquality;return goog.iter.every(a,function(a){return d(a[0],a[1])})};goog.iter.nextOrValue=function(a,b){try{return goog.iter.toIterator(a).next()}catch(c){if(c!=goog.iter.StopIteration)throw c;return b}}; +goog.iter.product=function(a){if(goog.array.some(arguments,function(a){return!a.length})||!arguments.length)return new goog.iter.Iterator;var b=new goog.iter.Iterator,c=arguments,d=goog.array.repeat(0,c.length);b.next=function(){if(d){for(var a=goog.array.map(d,function(a,b){return c[b][a]}),b=d.length-1;0<=b;b--){goog.asserts.assert(d);if(d[b]=b),a=goog.iter.limit(a,c-b));return a};goog.iter.hasDuplicates_=function(a){var b=[];goog.array.removeDuplicates(a,b);return a.length!=b.length};goog.iter.permutations=function(a,b){var c=goog.iter.toArray(a),d=goog.isNumber(b)?b:c.length;c=goog.array.repeat(c,d);c=goog.iter.product.apply(void 0,c);return goog.iter.filter(c,function(a){return!goog.iter.hasDuplicates_(a)})}; +goog.iter.combinations=function(a,b){function c(a){return d[a]}var d=goog.iter.toArray(a),e=goog.iter.range(d.length);e=goog.iter.permutations(e,b);var f=goog.iter.filter(e,function(a){return goog.array.isSorted(a)});e=new goog.iter.Iterator;e.next=function(){return goog.array.map(f.next(),c)};return e}; +goog.iter.combinationsWithReplacement=function(a,b){function c(a){return d[a]}var d=goog.iter.toArray(a),e=goog.array.range(d.length);e=goog.array.repeat(e,b);e=goog.iter.product.apply(void 0,e);var f=goog.iter.filter(e,function(a){return goog.array.isSorted(a)});e=new goog.iter.Iterator;e.next=function(){return goog.array.map(f.next(),c)};return e};goog.date.DateRange=function(a,b){this.startDate_=a;this.endDate_=b};goog.date.DateRange.MINIMUM_DATE=new goog.date.Date(0,0,1);goog.date.DateRange.MAXIMUM_DATE=new goog.date.Date(9999,11,31);goog.date.DateRange.prototype.getStartDate=function(){return this.startDate_};goog.date.DateRange.prototype.getEndDate=function(){return this.endDate_};goog.date.DateRange.prototype.contains=function(a){return a.valueOf()>=this.startDate_.valueOf()&&a.valueOf()<=this.endDate_.valueOf()}; +goog.date.DateRange.prototype.iterator=function(){return new goog.date.DateRange.Iterator(this)};goog.date.DateRange.equals=function(a,b){return a===b?!0:null==a||null==b?!1:a.startDate_.equals(b.startDate_)&&a.endDate_.equals(b.endDate_)};goog.date.DateRange.offsetInDays_=function(a,b){var c=a.clone();c.add(new goog.date.Interval(goog.date.Interval.DAYS,b));return c}; +goog.date.DateRange.offsetInMonths_=function(a,b){var c=a.clone();c.setDate(1);c.add(new goog.date.Interval(goog.date.Interval.MONTHS,b));return c};goog.date.DateRange.yesterday=function(a){a=goog.date.DateRange.cloneOrCreate_(a);a=goog.date.DateRange.offsetInDays_(a,-1);return new goog.date.DateRange(a,a.clone())};goog.date.DateRange.today=function(a){a=goog.date.DateRange.cloneOrCreate_(a);return new goog.date.DateRange(a,a.clone())}; +goog.date.DateRange.last7Days=function(a){a=goog.date.DateRange.cloneOrCreate_(a);var b=goog.date.DateRange.offsetInDays_(a,-1);return new goog.date.DateRange(goog.date.DateRange.offsetInDays_(a,-7),b)};goog.date.DateRange.thisMonth=function(a){a=goog.date.DateRange.cloneOrCreate_(a);return new goog.date.DateRange(goog.date.DateRange.offsetInMonths_(a,0),goog.date.DateRange.offsetInDays_(goog.date.DateRange.offsetInMonths_(a,1),-1))}; +goog.date.DateRange.lastMonth=function(a){a=goog.date.DateRange.cloneOrCreate_(a);return new goog.date.DateRange(goog.date.DateRange.offsetInMonths_(a,-1),goog.date.DateRange.offsetInDays_(goog.date.DateRange.offsetInMonths_(a,0),-1))};goog.date.DateRange.thisWeek=function(a){a=goog.date.DateRange.cloneOrCreate_(a);var b=a.getIsoWeekday(),c=a.getFirstDayOfWeek();a=goog.date.DateRange.offsetInDays_(a,-(b>=c?b-c:b+(7-c)));b=goog.date.DateRange.offsetInDays_(a,6);return new goog.date.DateRange(a,b)}; +goog.date.DateRange.lastWeek=function(a){var b=goog.date.DateRange.thisWeek(a);a=goog.date.DateRange.offsetInDays_(b.getStartDate(),-7);b=goog.date.DateRange.offsetInDays_(b.getEndDate(),-7);return new goog.date.DateRange(a,b)};goog.date.DateRange.lastBusinessWeek=function(a){a=goog.date.DateRange.cloneOrCreate_(a);a=goog.date.DateRange.offsetInDays_(a,-7-a.getIsoWeekday());var b=goog.date.DateRange.offsetInDays_(a,4);return new goog.date.DateRange(a,b)}; +goog.date.DateRange.allTime=function(a){return new goog.date.DateRange(goog.date.DateRange.MINIMUM_DATE,goog.date.DateRange.MAXIMUM_DATE)};goog.date.DateRange.StandardDateRangeKeys={YESTERDAY:"yesterday",TODAY:"today",LAST_7_DAYS:"last7days",THIS_MONTH:"thismonth",LAST_MONTH:"lastmonth",THIS_WEEK:"thisweek",LAST_WEEK:"lastweek",LAST_BUSINESS_WEEK:"lastbusinessweek",ALL_TIME:"alltime"}; +goog.date.DateRange.standardDateRange=function(a,b){switch(a){case goog.date.DateRange.StandardDateRangeKeys.YESTERDAY:return goog.date.DateRange.yesterday(b);case goog.date.DateRange.StandardDateRangeKeys.TODAY:return goog.date.DateRange.today(b);case goog.date.DateRange.StandardDateRangeKeys.LAST_7_DAYS:return goog.date.DateRange.last7Days(b);case goog.date.DateRange.StandardDateRangeKeys.THIS_MONTH:return goog.date.DateRange.thisMonth(b);case goog.date.DateRange.StandardDateRangeKeys.LAST_MONTH:return goog.date.DateRange.lastMonth(b); +case goog.date.DateRange.StandardDateRangeKeys.THIS_WEEK:return goog.date.DateRange.thisWeek(b);case goog.date.DateRange.StandardDateRangeKeys.LAST_WEEK:return goog.date.DateRange.lastWeek(b);case goog.date.DateRange.StandardDateRangeKeys.LAST_BUSINESS_WEEK:return goog.date.DateRange.lastBusinessWeek(b);case goog.date.DateRange.StandardDateRangeKeys.ALL_TIME:return goog.date.DateRange.allTime(b);default:throw Error("no such date range key: "+a);}}; +goog.date.DateRange.cloneOrCreate_=function(a){return a?a.clone():new goog.date.Date};goog.date.DateRange.Iterator=function(a){this.nextDate_=a.getStartDate().clone();this.endDate_=Number(a.getEndDate().toIsoString())};goog.inherits(goog.date.DateRange.Iterator,goog.iter.Iterator); +goog.date.DateRange.Iterator.prototype.next=function(){if(Number(this.nextDate_.toIsoString())>this.endDate_)throw goog.iter.StopIteration;var a=this.nextDate_.clone();this.nextDate_.add(new goog.date.Interval(goog.date.Interval.DAYS,1));return a};goog.i18n.TimeZone=function(){};goog.i18n.TimeZone.MILLISECONDS_PER_HOUR_=36E5;goog.i18n.TimeZone.NameType={STD_SHORT_NAME:0,STD_LONG_NAME:1,DLT_SHORT_NAME:2,DLT_LONG_NAME:3};goog.i18n.TimeZone.createTimeZone=function(a){if("number"==typeof a)return goog.i18n.TimeZone.createSimpleTimeZone_(a);var b=new goog.i18n.TimeZone;b.timeZoneId_=a.id;b.standardOffset_=-a.std_offset;b.tzNames_=a.names;b.tzNamesExt_=a.names_ext;b.transitions_=a.transitions;return b}; +goog.i18n.TimeZone.createSimpleTimeZone_=function(a){var b=new goog.i18n.TimeZone;b.standardOffset_=a;b.timeZoneId_=goog.i18n.TimeZone.composePosixTimeZoneID_(a);var c=goog.i18n.TimeZone.composeUTCString_(a);a=goog.i18n.TimeZone.composeGMTString_(a);b.tzNames_=[c,c];b.tzNamesExt_={STD_LONG_NAME_GMT:a,STD_GENERIC_LOCATION:a};b.transitions_=[];return b}; +goog.i18n.TimeZone.composeGMTString_=function(a){var b=["GMT"];b.push(0>=a?"+":"-");a=Math.abs(a);b.push(goog.string.padNumber(Math.floor(a/60)%100,2),":",goog.string.padNumber(a%60,2));return b.join("")};goog.i18n.TimeZone.composePosixTimeZoneID_=function(a){if(0==a)return"Etc/GMT";var b=["Etc/GMT",0>a?"-":"+"];a=Math.abs(a);b.push(Math.floor(a/60)%100);a%=60;0!=a&&b.push(":",goog.string.padNumber(a,2));return b.join("")}; +goog.i18n.TimeZone.composeUTCString_=function(a){if(0==a)return"UTC";var b=["UTC",0>a?"+":"-"];a=Math.abs(a);b.push(Math.floor(a/60)%100);a%=60;0!=a&&b.push(":",a);return b.join("")};goog.i18n.TimeZone.prototype.getTimeZoneData=function(){return{id:this.timeZoneId_,std_offset:-this.standardOffset_,names:goog.array.clone(this.tzNames_),names_ext:goog.object.clone(this.tzNamesExt_),transitions:goog.array.clone(this.transitions_)}}; +goog.i18n.TimeZone.prototype.getDaylightAdjustment=function(a){a=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes())/goog.i18n.TimeZone.MILLISECONDS_PER_HOUR_;for(var b=0;b=this.transitions_[b];)b+=2;return 0==b?0:this.transitions_[b-1]};goog.i18n.TimeZone.prototype.getGMTString=function(a){return goog.i18n.TimeZone.composeGMTString_(this.getOffset(a))};goog.i18n.TimeZone.prototype.getUTCString=function(a){return goog.i18n.TimeZone.composeUTCString_(this.getOffset(a))}; +goog.i18n.TimeZone.prototype.getLongName=function(a){return this.tzNames_[this.isDaylightTime(a)?goog.i18n.TimeZone.NameType.DLT_LONG_NAME:goog.i18n.TimeZone.NameType.STD_LONG_NAME]};goog.i18n.TimeZone.prototype.getOffset=function(a){return this.standardOffset_-this.getDaylightAdjustment(a)};goog.i18n.TimeZone.prototype.getRFCTimeZoneString=function(a){a=-this.getOffset(a);var b=[0>a?"-":"+"];a=Math.abs(a);b.push(goog.string.padNumber(Math.floor(a/60)%100,2),goog.string.padNumber(a%60,2));return b.join("")}; +goog.i18n.TimeZone.prototype.getShortName=function(a){return this.tzNames_[this.isDaylightTime(a)?goog.i18n.TimeZone.NameType.DLT_SHORT_NAME:goog.i18n.TimeZone.NameType.STD_SHORT_NAME]};goog.i18n.TimeZone.prototype.getTimeZoneId=function(){return this.timeZoneId_};goog.i18n.TimeZone.prototype.isDaylightTime=function(a){return 0a)var b=this.dateTimeSymbols_.DATEFORMATS[a];else if(8>a)b=this.dateTimeSymbols_.TIMEFORMATS[a-4];else if(12>a)b=this.dateTimeSymbols_.DATETIMEFORMATS[a-8],b=b.replace("{1}",this.dateTimeSymbols_.DATEFORMATS[a-8]),b=b.replace("{0}",this.dateTimeSymbols_.TIMEFORMATS[a-8]);else{this.applyStandardPattern_(goog.i18n.DateTimeFormat.Format.MEDIUM_DATETIME);return}this.applyPattern_(b)}; +goog.i18n.DateTimeFormat.prototype.localizeNumbers_=function(a){return goog.i18n.DateTimeFormat.localizeNumbers(a,this.dateTimeSymbols_)};goog.i18n.DateTimeFormat.enforceAsciiDigits_=!1;goog.i18n.DateTimeFormat.removeRlmInPatterns_=!1;goog.i18n.DateTimeFormat.setEnforceAsciiDigits=function(a){goog.i18n.DateTimeFormat.enforceAsciiDigits_=a;goog.i18n.DateTimeFormat.removeRlmInPatterns_=a};goog.i18n.DateTimeFormat.isEnforceAsciiDigits=function(){return goog.i18n.DateTimeFormat.enforceAsciiDigits_}; +goog.i18n.DateTimeFormat.localizeNumbers=function(a,b){a=String(a);var c=b||goog.i18n.DateTimeSymbols;if(void 0===c.ZERODIGIT||goog.i18n.DateTimeFormat.enforceAsciiDigits_)return a;for(var d=[],e=0;e=f?String.fromCharCode(c.ZERODIGIT+f-48):a.charAt(e))}return d.join("")};goog.i18n.DateTimeFormat.prototype.formatEra_=function(a,b){var c=0c&&(c=-c);2==a&&(c%=100);return this.localizeNumbers_(goog.string.padNumber(c,a))};goog.i18n.DateTimeFormat.prototype.formatYearOfWeek_=function(a,b){var c=goog.date.getYearOfWeek(b.getFullYear(),b.getMonth(),b.getDate(),this.dateTimeSymbols_.FIRSTWEEKCUTOFFDAY,this.dateTimeSymbols_.FIRSTDAYOFWEEK);0>c&&(c=-c);2==a&&(c%=100);return this.localizeNumbers_(goog.string.padNumber(c,a))}; +goog.i18n.DateTimeFormat.prototype.formatMonth_=function(a,b){var c=b.getMonth();switch(a){case 5:return this.dateTimeSymbols_.NARROWMONTHS[c];case 4:return this.dateTimeSymbols_.MONTHS[c];case 3:return this.dateTimeSymbols_.SHORTMONTHS[c];default:return this.localizeNumbers_(goog.string.padNumber(c+1,a))}}; +goog.i18n.DateTimeFormat.validateDateHasTime_=function(a){if(!(a.getHours&&a.getSeconds&&a.getMinutes))throw Error("The date to format has no time (probably a goog.date.Date). Use Date or goog.date.DateTime, or use a pattern without time fields.");};goog.i18n.DateTimeFormat.prototype.format24Hours_=function(a,b){goog.i18n.DateTimeFormat.validateDateHasTime_(b);var c=goog.i18n.DateTimeFormat.getHours_(b)||24;return this.localizeNumbers_(goog.string.padNumber(c,a))}; +goog.i18n.DateTimeFormat.prototype.formatFractionalSeconds_=function(a,b){var c=b.getMilliseconds()/1E3;return this.localizeNumbers_(c.toFixed(Math.min(3,a)).substr(2)+(3c?1:0]};goog.i18n.DateTimeFormat.prototype.format1To12Hours_=function(a,b){goog.i18n.DateTimeFormat.validateDateHasTime_(b);var c=goog.i18n.DateTimeFormat.getHours_(b)%12||12;return this.localizeNumbers_(goog.string.padNumber(c,a))}; +goog.i18n.DateTimeFormat.prototype.format0To11Hours_=function(a,b){goog.i18n.DateTimeFormat.validateDateHasTime_(b);var c=goog.i18n.DateTimeFormat.getHours_(b)%12;return this.localizeNumbers_(goog.string.padNumber(c,a))};goog.i18n.DateTimeFormat.prototype.format0To23Hours_=function(a,b){goog.i18n.DateTimeFormat.validateDateHasTime_(b);var c=goog.i18n.DateTimeFormat.getHours_(b);return this.localizeNumbers_(goog.string.padNumber(c,a))}; +goog.i18n.DateTimeFormat.prototype.formatStandaloneDay_=function(a,b){var c=b.getDay();switch(a){case 5:return this.dateTimeSymbols_.STANDALONENARROWWEEKDAYS[c];case 4:return this.dateTimeSymbols_.STANDALONEWEEKDAYS[c];case 3:return this.dateTimeSymbols_.STANDALONESHORTWEEKDAYS[c];default:return this.localizeNumbers_(goog.string.padNumber(c,1))}}; +goog.i18n.DateTimeFormat.prototype.formatStandaloneMonth_=function(a,b){var c=b.getMonth();switch(a){case 5:return this.dateTimeSymbols_.STANDALONENARROWMONTHS[c];case 4:return this.dateTimeSymbols_.STANDALONEMONTHS[c];case 3:return this.dateTimeSymbols_.STANDALONESHORTMONTHS[c];default:return this.localizeNumbers_(goog.string.padNumber(c+1,a))}};goog.i18n.DateTimeFormat.prototype.formatQuarter_=function(a,b){var c=Math.floor(b.getMonth()/3);return 4>a?this.dateTimeSymbols_.SHORTQUARTERS[c]:this.dateTimeSymbols_.QUARTERS[c]}; +goog.i18n.DateTimeFormat.prototype.formatDate_=function(a,b){return this.localizeNumbers_(goog.string.padNumber(b.getDate(),a))};goog.i18n.DateTimeFormat.prototype.formatMinutes_=function(a,b){goog.i18n.DateTimeFormat.validateDateHasTime_(b);return this.localizeNumbers_(goog.string.padNumber(b.getMinutes(),a))};goog.i18n.DateTimeFormat.prototype.formatSeconds_=function(a,b){goog.i18n.DateTimeFormat.validateDateHasTime_(b);return this.localizeNumbers_(goog.string.padNumber(b.getSeconds(),a))}; +goog.i18n.DateTimeFormat.prototype.formatWeekOfYear_=function(a,b){var c=goog.date.getWeekNumber(b.getFullYear(),b.getMonth(),b.getDate(),this.dateTimeSymbols_.FIRSTWEEKCUTOFFDAY,this.dateTimeSymbols_.FIRSTDAYOFWEEK);return this.localizeNumbers_(goog.string.padNumber(c,a))};goog.i18n.DateTimeFormat.prototype.formatTimeZoneRFC_=function(a,b,c){c=c||goog.i18n.TimeZone.createTimeZone(b.getTimezoneOffset());return 4>a?c.getRFCTimeZoneString(b):this.localizeNumbers_(c.getGMTString(b))}; +goog.i18n.DateTimeFormat.prototype.formatTimeZone_=function(a,b,c){c=c||goog.i18n.TimeZone.createTimeZone(b.getTimezoneOffset());return 4>a?c.getShortName(b):c.getLongName(b)};goog.i18n.DateTimeFormat.prototype.formatTimeZoneId_=function(a,b){b=b||goog.i18n.TimeZone.createTimeZone(a.getTimezoneOffset());return b.getTimeZoneId()};goog.i18n.DateTimeFormat.prototype.formatTimeZoneLocationId_=function(a,b,c){c=c||goog.i18n.TimeZone.createTimeZone(b.getTimezoneOffset());return 2>=a?c.getTimeZoneId():c.getGenericLocation(b)}; +goog.i18n.DateTimeFormat.prototype.formatField_=function(a,b,c,d,e){var f=a.length;switch(a.charAt(0)){case "G":return this.formatEra_(f,c);case "y":return this.formatYear_(f,c);case "Y":return this.formatYearOfWeek_(f,c);case "M":return this.formatMonth_(f,c);case "k":return this.format24Hours_(f,d);case "S":return this.formatFractionalSeconds_(f,d);case "E":return this.formatDayOfWeek_(f,c);case "a":return this.formatAmPm_(f,d);case "h":return this.format1To12Hours_(f,d);case "K":return this.format0To11Hours_(f, +d);case "H":return this.format0To23Hours_(f,d);case "c":return this.formatStandaloneDay_(f,c);case "L":return this.formatStandaloneMonth_(f,c);case "Q":return this.formatQuarter_(f,c);case "d":return this.formatDate_(f,c);case "m":return this.formatMinutes_(f,d);case "s":return this.formatSeconds_(f,d);case "v":return this.formatTimeZoneId_(b,e);case "V":return this.formatTimeZoneLocationId_(f,b,e);case "w":return this.formatWeekOfYear_(f,d);case "z":return this.formatTimeZone_(f,b,e);case "Z":return this.formatTimeZoneRFC_(f, +b,e);default:return""}};goog.i18n.DateTimePatterns_af={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd-MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_am={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE\u1363 MMM d",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE\u1363 MMM d y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d h:mm a zzzz"}; +goog.i18n.DateTimePatterns_ar={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM\u200f/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/\u200fM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE\u060c d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE\u060c d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM h:mm a zzzz"};goog.i18n.DateTimePatterns_ar_DZ=goog.i18n.DateTimePatterns_ar; +goog.i18n.DateTimePatterns_ar_EG=goog.i18n.DateTimePatterns_ar;goog.i18n.DateTimePatterns_az={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd.MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"d MMM, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"d MMM y, EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_be={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y '\u0433'. G",YEAR_MONTH_ABBR:"LLL y",YEAR_MONTH_FULL:"LLLL y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d.M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_bg={YEAR_FULL:"y '\u0433'.",YEAR_FULL_WITH_ERA:"y '\u0433'. G",YEAR_MONTH_ABBR:"MM.y '\u0433'.",YEAR_MONTH_FULL:"MMMM y '\u0433'.",YEAR_MONTH_SHORT:"MM.y '\u0433'.",MONTH_DAY_ABBR:"d.MM",MONTH_DAY_FULL:"d MMMM",MONTH_DAY_SHORT:"d.MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d.MM.y '\u0433'.",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d.MM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d.MM.y '\u0433'.",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d.MM, HH:mm '\u0447'. zzzz"}; +goog.i18n.DateTimePatterns_bn={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM h:mm a zzzz"}; +goog.i18n.DateTimePatterns_br={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd/MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_bs={YEAR_FULL:"y.",YEAR_FULL_WITH_ERA:"y. G",YEAR_MONTH_ABBR:"MMM y.",YEAR_MONTH_FULL:"LLLL y.",YEAR_MONTH_SHORT:"M/y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y.",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d. MMM y.",DAY_ABBR:"d.",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM HH:mm (zzzz)"}; +goog.i18n.DateTimePatterns_ca={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"LLL 'de' y",YEAR_MONTH_FULL:"LLLL 'de' y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM 'de' y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, H:mm zzzz"}; +goog.i18n.DateTimePatterns_chr={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"MMM d, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, MMM d",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, MMM d, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_cs={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"LLLL y",YEAR_MONTH_FULL:"LLLL y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d. M.",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d. M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. M. y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d. M.",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d. M. y",DAY_ABBR:"d.",MONTH_DAY_TIME_ZONE_SHORT:"d. M. H:mm zzzz"}; +goog.i18n.DateTimePatterns_cy={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_da={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d. MMM y",DAY_ABBR:"d.",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM HH.mm zzzz"}; +goog.i18n.DateTimePatterns_de={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d. MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM, HH:mm zzzz"};goog.i18n.DateTimePatterns_de_AT=goog.i18n.DateTimePatterns_de; +goog.i18n.DateTimePatterns_de_CH=goog.i18n.DateTimePatterns_de;goog.i18n.DateTimePatterns_el={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"LLLL y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_en={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"MMM d, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, MMM d",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, MMM d, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_en_AU={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_en_CA={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"MM-dd",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"MMM d, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, MMM d",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, MMM d, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_en_GB={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd/MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_en_IE={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_en_IN={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd/MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_en_SG={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd/MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a zzzz"};goog.i18n.DateTimePatterns_en_US=goog.i18n.DateTimePatterns_en; +goog.i18n.DateTimePatterns_en_ZA={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"dd MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"MM/dd",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"dd MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, dd MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, dd MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"dd MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_es={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM 'de' y",YEAR_MONTH_SHORT:"M/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd 'de' MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d 'de' MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM H:mm zzzz"}; +goog.i18n.DateTimePatterns_es_419={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMMM 'de' y",YEAR_MONTH_FULL:"MMMM 'de' y",YEAR_MONTH_SHORT:"M/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd 'de' MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d 'de' MMMM",MONTH_DAY_YEAR_MEDIUM:"d 'de' MMMM 'de' y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d 'de' MMM 'de' y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM H:mm zzzz"};goog.i18n.DateTimePatterns_es_ES=goog.i18n.DateTimePatterns_es; +goog.i18n.DateTimePatterns_es_MX={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMMM 'de' y",YEAR_MONTH_FULL:"MMMM 'de' y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd 'de' MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d 'de' MMMM",MONTH_DAY_YEAR_MEDIUM:"d 'de' MMMM 'de' y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d 'de' MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d 'de' MMMM 'de' y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_es_US={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMMM 'de' y",YEAR_MONTH_FULL:"MMMM 'de' y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd 'de' MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d 'de' MMMM",MONTH_DAY_YEAR_MEDIUM:"d 'de' MMMM 'de' y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d 'de' MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d 'de' MMMM 'de' y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM h:mm a zzzz"}; +goog.i18n.DateTimePatterns_et={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d. MMMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_eu={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"y MMM",YEAR_MONTH_FULL:"y('e')'ko' MMMM",YEAR_MONTH_SHORT:"y/MM",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"y MMM d",WEEKDAY_MONTH_DAY_MEDIUM:"MMM d, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y MMM d, EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d HH:mm zzzz"}; +goog.i18n.DateTimePatterns_fa={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"y/MM",MONTH_DAY_ABBR:"d LLL",MONTH_DAY_FULL:"dd LLLL",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"d LLLL",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d LLL",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d LLL\u060c\u200f HH:mm (zzzz)"}; +goog.i18n.DateTimePatterns_fi={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"LLL y",YEAR_MONTH_FULL:"LLLL y",YEAR_MONTH_SHORT:"M.y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"ccc d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d. MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM 'klo' H.mm zzzz"}; +goog.i18n.DateTimePatterns_fil={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"MMM d, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, MMM d",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, MMM d, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_fr={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd/MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM '\u00e0' HH:mm zzzz"}; +goog.i18n.DateTimePatterns_fr_CA={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"M-d",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH 'h' mm zzzz"}; +goog.i18n.DateTimePatterns_ga={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd/MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_gl={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM 'de' y",YEAR_MONTH_FULL:"MMMM 'de' y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d 'de' MMM",MONTH_DAY_FULL:"dd 'de' MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d 'de' MMMM",MONTH_DAY_YEAR_MEDIUM:"d/MM/y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d 'de' MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d/MM/y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"HH:mm zzzz, d 'de' MMM"}; +goog.i18n.DateTimePatterns_gsw={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"y MMM d",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d. MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_gu={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM h:mm a zzzz"}; +goog.i18n.DateTimePatterns_haw={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"y MMMM",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM h:mm a zzzz"}; +goog.i18n.DateTimePatterns_he={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"M.y",MONTH_DAY_ABBR:"d \u05d1MMM",MONTH_DAY_FULL:"dd \u05d1MMMM",MONTH_DAY_SHORT:"d.M",MONTH_DAY_MEDIUM:"d \u05d1MMMM",MONTH_DAY_YEAR_MEDIUM:"d \u05d1MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d \u05d1MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d \u05d1MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d \u05d1MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_hi={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_hr={YEAR_FULL:"y.",YEAR_FULL_WITH_ERA:"y. G",YEAR_MONTH_ABBR:"LLL y.",YEAR_MONTH_FULL:"LLLL y.",YEAR_MONTH_SHORT:"MM. y.",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"dd. MM.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y.",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d. MMM y.",DAY_ABBR:"d.",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_hu={YEAR_FULL:"y.",YEAR_FULL_WITH_ERA:"G y.",YEAR_MONTH_ABBR:"y. MMM",YEAR_MONTH_FULL:"y. MMMM",YEAR_MONTH_SHORT:"y. MM.",MONTH_DAY_ABBR:"MMM d.",MONTH_DAY_FULL:"MMMM dd.",MONTH_DAY_SHORT:"M. d.",MONTH_DAY_MEDIUM:"MMMM d.",MONTH_DAY_YEAR_MEDIUM:"y. MMM d.",WEEKDAY_MONTH_DAY_MEDIUM:"MMM d., EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y. MMM d., EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d. HH:mm zzzz"}; +goog.i18n.DateTimePatterns_hy={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y \u0569.",YEAR_MONTH_ABBR:"y \u0569. LLL",YEAR_MONTH_FULL:"y \u0569\u2024 LLLL",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"dd.MM",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"d MMM, y \u0569.",WEEKDAY_MONTH_DAY_MEDIUM:"d MMM, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y \u0569. MMM d, EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_id={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH.mm zzzz"}; +goog.i18n.DateTimePatterns_in={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH.mm zzzz"}; +goog.i18n.DateTimePatterns_is={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM. y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d. MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM, zzzz \u2013 HH:mm"}; +goog.i18n.DateTimePatterns_it={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_iw={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"M.y",MONTH_DAY_ABBR:"d \u05d1MMM",MONTH_DAY_FULL:"dd \u05d1MMMM",MONTH_DAY_SHORT:"d.M",MONTH_DAY_MEDIUM:"d \u05d1MMMM",MONTH_DAY_YEAR_MEDIUM:"d \u05d1MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d \u05d1MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d \u05d1MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d \u05d1MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_ja={YEAR_FULL:"y\u5e74",YEAR_FULL_WITH_ERA:"Gy\u5e74",YEAR_MONTH_ABBR:"y\u5e74M\u6708",YEAR_MONTH_FULL:"y\u5e74M\u6708",YEAR_MONTH_SHORT:"y/MM",MONTH_DAY_ABBR:"M\u6708d\u65e5",MONTH_DAY_FULL:"M\u6708dd\u65e5",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"M\u6708d\u65e5",MONTH_DAY_YEAR_MEDIUM:"y\u5e74M\u6708d\u65e5",WEEKDAY_MONTH_DAY_MEDIUM:"M\u6708d\u65e5(EEE)",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y\u5e74M\u6708d\u65e5(EEE)",DAY_ABBR:"d\u65e5",MONTH_DAY_TIME_ZONE_SHORT:"M\u6708d\u65e5 H:mm zzzz"}; +goog.i18n.DateTimePatterns_ka={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM. y",YEAR_MONTH_FULL:"MMMM, y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d.M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM. y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM. y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_kk={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y '\u0436'.",YEAR_MONTH_ABBR:"y '\u0436'. MMM",YEAR_MONTH_FULL:"y '\u0436'. MMMM",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd.MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"y '\u0436'. d MMM",WEEKDAY_MONTH_DAY_MEDIUM:"d MMM, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y '\u0436'. d MMM, EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_km={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_kn={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"MMM d,y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, MMM d, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d h:mm a zzzz"}; +goog.i18n.DateTimePatterns_ko={YEAR_FULL:"y\ub144",YEAR_FULL_WITH_ERA:"G y\ub144",YEAR_MONTH_ABBR:"y\ub144 MMM",YEAR_MONTH_FULL:"y\ub144 MMMM",YEAR_MONTH_SHORT:"y. M.",MONTH_DAY_ABBR:"MMM d\uc77c",MONTH_DAY_FULL:"MMMM dd\uc77c",MONTH_DAY_SHORT:"M. d.",MONTH_DAY_MEDIUM:"MMMM d\uc77c",MONTH_DAY_YEAR_MEDIUM:"y\ub144 MMM d\uc77c",WEEKDAY_MONTH_DAY_MEDIUM:"MMM d\uc77c (EEE)",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y\ub144 MMM d\uc77c (EEE)",DAY_ABBR:"d\uc77c",MONTH_DAY_TIME_ZONE_SHORT:"MMM d\uc77c a h:mm zzzz"}; +goog.i18n.DateTimePatterns_ky={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y-'\u0436'.",YEAR_MONTH_ABBR:"y-'\u0436'. MMM",YEAR_MONTH_FULL:"y-'\u0436'., MMMM",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"d-MMM",MONTH_DAY_FULL:"dd-MMMM",MONTH_DAY_SHORT:"dd-MM",MONTH_DAY_MEDIUM:"d-MMMM",MONTH_DAY_YEAR_MEDIUM:"y-'\u0436'. d-MMM",WEEKDAY_MONTH_DAY_MEDIUM:"d-MMM, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y-'\u0436'. d-MMM, EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d-MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_ln={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"y MMMM",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_lo={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_lt={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y 'm'. G",YEAR_MONTH_ABBR:"y-MM",YEAR_MONTH_FULL:"y 'm'. LLLL",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"MM-dd",MONTH_DAY_FULL:"MMMM dd 'd'.",MONTH_DAY_SHORT:"MM-d",MONTH_DAY_MEDIUM:"MMMM d 'd'.",MONTH_DAY_YEAR_MEDIUM:"y-MM-dd",WEEKDAY_MONTH_DAY_MEDIUM:"MM-dd, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y-MM-dd, EEE",DAY_ABBR:"dd",MONTH_DAY_TIME_ZONE_SHORT:"MM-dd HH:mm; zzzz"}; +goog.i18n.DateTimePatterns_lv={YEAR_FULL:"y. 'g'.",YEAR_FULL_WITH_ERA:"G y. 'g'.",YEAR_MONTH_ABBR:"y. 'g'. MMM",YEAR_MONTH_FULL:"y. 'g'. MMMM",YEAR_MONTH_SHORT:"MM.y.",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"dd.MM.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"y. 'g'. d. MMM",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, y. 'g'. d. MMM",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_mk={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y '\u0433'.",YEAR_MONTH_FULL:"MMMM y '\u0433'.",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d.M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y '\u0433'.",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y '\u0433'.",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_ml={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"y MMM",YEAR_MONTH_FULL:"y MMMM",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"y MMM d",WEEKDAY_MONTH_DAY_MEDIUM:"MMM d, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y MMM d, EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d h:mm a zzzz"}; +goog.i18n.DateTimePatterns_mn={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"y '\u043e\u043d\u044b' MMM",YEAR_MONTH_FULL:"y '\u043e\u043d\u044b' MMMM",YEAR_MONTH_SHORT:"y MMMMM",MONTH_DAY_ABBR:"MMM'\u044b\u043d' d",MONTH_DAY_FULL:"MMMM'\u044b\u043d' dd",MONTH_DAY_SHORT:"MMMMM/dd",MONTH_DAY_MEDIUM:"MMMM'\u044b\u043d' d",MONTH_DAY_YEAR_MEDIUM:"y '\u043e\u043d\u044b' MMM'\u044b\u043d' d",WEEKDAY_MONTH_DAY_MEDIUM:"MMM'\u044b\u043d' d. EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y '\u043e\u043d\u044b' MMM'\u044b\u043d' d. EEE", +DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM'\u044b\u043d' d HH:mm (zzzz)"};goog.i18n.DateTimePatterns_mo={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd.MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_mr={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d, MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_ms={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d-M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_mt={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"dd 'ta'\u2019 MMMM",MONTH_DAY_SHORT:"MM-dd",MONTH_DAY_MEDIUM:"d 'ta'\u2019 MMMM",MONTH_DAY_YEAR_MEDIUM:"d 'ta'\u2019 MMM, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d 'ta'\u2019 MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d 'ta'\u2019 MMM, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d HH:mm zzzz"}; +goog.i18n.DateTimePatterns_my={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"y MMMM",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"y\u104a MMM d",WEEKDAY_MONTH_DAY_MEDIUM:"MMM d\u104a EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y\u104a MMM d\u104a EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM zzzz HH:mm"}; +goog.i18n.DateTimePatterns_nb={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d. MMM y",DAY_ABBR:"d.",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_ne={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"y MMM",YEAR_MONTH_FULL:"y MMMM",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"MM-dd",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"y MMM d",WEEKDAY_MONTH_DAY_MEDIUM:"MMM d, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y MMM d, EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_nl={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d-M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_no={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d. MMM y",DAY_ABBR:"d.",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM, HH:mm zzzz"};goog.i18n.DateTimePatterns_no_NO=goog.i18n.DateTimePatterns_no; +goog.i18n.DateTimePatterns_or={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"MMM d, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, MMM d",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, MMM d, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_pa={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_pl={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"LLL y",YEAR_MONTH_FULL:"LLLL y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d.MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_pt={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM 'de' y",YEAR_MONTH_FULL:"MMMM 'de' y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d 'de' MMM",MONTH_DAY_FULL:"dd 'de' MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d 'de' MMMM",MONTH_DAY_YEAR_MEDIUM:"d 'de' MMM 'de' y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d 'de' MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d 'de' MMM 'de' y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d 'de' MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_pt_BR=goog.i18n.DateTimePatterns_pt;goog.i18n.DateTimePatterns_pt_PT={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MM/y",YEAR_MONTH_FULL:"MMMM 'de' y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d/MM",MONTH_DAY_FULL:"dd 'de' MMMM",MONTH_DAY_SHORT:"dd/MM",MONTH_DAY_MEDIUM:"d 'de' MMMM",MONTH_DAY_YEAR_MEDIUM:"d/MM/y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d/MM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d/MM/y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d/MM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_ro={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd.MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_ru={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y '\u0433'. G",YEAR_MONTH_ABBR:"LLL y '\u0433'.",YEAR_MONTH_FULL:"LLLL y '\u0433'.",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd.MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y '\u0433'.",WEEKDAY_MONTH_DAY_MEDIUM:"ccc, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y '\u0433'.",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_sh={YEAR_FULL:"y.",YEAR_FULL_WITH_ERA:"y. G",YEAR_MONTH_ABBR:"MMM y.",YEAR_MONTH_FULL:"MMMM y.",YEAR_MONTH_SHORT:"MM.y.",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y.",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d. MMM y.",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_si={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"y MMM",YEAR_MONTH_FULL:"y MMMM",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"M-d",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"y MMM d",WEEKDAY_MONTH_DAY_MEDIUM:"MMM d EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y MMM d, EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d HH.mm zzzz"}; +goog.i18n.DateTimePatterns_sk={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"M/y",YEAR_MONTH_FULL:"LLLL y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d. M.",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d. M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. M. y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d. M.",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d. M. y",DAY_ABBR:"d.",MONTH_DAY_TIME_ZONE_SHORT:"d. M., H:mm zzzz"}; +goog.i18n.DateTimePatterns_sl={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d. M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d. MMM y",DAY_ABBR:"d.",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_sq={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d.M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, h:mm a, zzzz"}; +goog.i18n.DateTimePatterns_sr={YEAR_FULL:"y.",YEAR_FULL_WITH_ERA:"y. G",YEAR_MONTH_ABBR:"MMM y.",YEAR_MONTH_FULL:"MMMM y.",YEAR_MONTH_SHORT:"MM.y.",MONTH_DAY_ABBR:"d. MMM",MONTH_DAY_FULL:"dd. MMMM",MONTH_DAY_SHORT:"d.M.",MONTH_DAY_MEDIUM:"d. MMMM",MONTH_DAY_YEAR_MEDIUM:"d. MMM y.",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d. MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d. MMM y.",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d. MMM HH:mm zzzz"};goog.i18n.DateTimePatterns_sr_Latn=goog.i18n.DateTimePatterns_sr; +goog.i18n.DateTimePatterns_sv={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_sw={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, MMM d, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_ta={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM, y",WEEKDAY_MONTH_DAY_MEDIUM:"MMM d, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d, a h:mm zzzz"}; +goog.i18n.DateTimePatterns_te={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM-y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d, MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"d MMM, EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"d MMM, y, EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM h:mm a zzzz"}; +goog.i18n.DateTimePatterns_th={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM G y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_tl={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"MMM d, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, MMM d",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, MMM d, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d, h:mm a zzzz"}; +goog.i18n.DateTimePatterns_tr={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"d MMMM EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"d MMM y EEE",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM HH:mm zzzz"}; +goog.i18n.DateTimePatterns_uk={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"LLL y",YEAR_MONTH_FULL:"LLLL y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd.MM",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM, HH:mm zzzz"}; +goog.i18n.DateTimePatterns_ur={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM\u060c y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE\u060c d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE\u060c d MMM\u060c y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d MMM h:mm a zzzz"}; +goog.i18n.DateTimePatterns_uz={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM, y",YEAR_MONTH_FULL:"MMMM, y",YEAR_MONTH_SHORT:"MM.y",MONTH_DAY_ABBR:"d-MMM",MONTH_DAY_FULL:"dd-MMMM",MONTH_DAY_SHORT:"dd/MM",MONTH_DAY_MEDIUM:"d-MMMM",MONTH_DAY_YEAR_MEDIUM:"d-MMM, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d-MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d-MMM, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"d-MMM, HH:mm (zzzz)"}; +goog.i18n.DateTimePatterns_vi={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"y G",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM 'n\u0103m' y",YEAR_MONTH_SHORT:"'th\u00e1ng' MM, y",MONTH_DAY_ABBR:"d MMM",MONTH_DAY_FULL:"dd MMMM",MONTH_DAY_SHORT:"dd/M",MONTH_DAY_MEDIUM:"d MMMM",MONTH_DAY_YEAR_MEDIUM:"d MMM, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, d MMM",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, d MMM, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"HH:mm zzzz, d MMM"}; +goog.i18n.DateTimePatterns_zh={YEAR_FULL:"y\u5e74",YEAR_FULL_WITH_ERA:"Gy\u5e74",YEAR_MONTH_ABBR:"y\u5e74M\u6708",YEAR_MONTH_FULL:"y\u5e74M\u6708",YEAR_MONTH_SHORT:"y\u5e74M\u6708",MONTH_DAY_ABBR:"M\u6708d\u65e5",MONTH_DAY_FULL:"M\u6708dd\u65e5",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"M\u6708d\u65e5",MONTH_DAY_YEAR_MEDIUM:"y\u5e74M\u6708d\u65e5",WEEKDAY_MONTH_DAY_MEDIUM:"M\u6708d\u65e5EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y\u5e74M\u6708d\u65e5EEE",DAY_ABBR:"d\u65e5",MONTH_DAY_TIME_ZONE_SHORT:"M\u6708d\u65e5 zzzz ah:mm"}; +goog.i18n.DateTimePatterns_zh_CN=goog.i18n.DateTimePatterns_zh; +goog.i18n.DateTimePatterns_zh_HK={YEAR_FULL:"y\u5e74",YEAR_FULL_WITH_ERA:"Gy\u5e74",YEAR_MONTH_ABBR:"y\u5e74M\u6708",YEAR_MONTH_FULL:"y\u5e74M\u6708",YEAR_MONTH_SHORT:"MM/y",MONTH_DAY_ABBR:"M\u6708d\u65e5",MONTH_DAY_FULL:"M\u6708dd\u65e5",MONTH_DAY_SHORT:"d/M",MONTH_DAY_MEDIUM:"M\u6708d\u65e5",MONTH_DAY_YEAR_MEDIUM:"y\u5e74M\u6708d\u65e5",WEEKDAY_MONTH_DAY_MEDIUM:"M\u6708d\u65e5EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y\u5e74M\u6708d\u65e5EEE",DAY_ABBR:"d\u65e5",MONTH_DAY_TIME_ZONE_SHORT:"M\u6708d\u65e5 ah:mm [zzzz]"}; +goog.i18n.DateTimePatterns_zh_TW={YEAR_FULL:"y\u5e74",YEAR_FULL_WITH_ERA:"Gy\u5e74",YEAR_MONTH_ABBR:"y\u5e74M\u6708",YEAR_MONTH_FULL:"y\u5e74M\u6708",YEAR_MONTH_SHORT:"y/MM",MONTH_DAY_ABBR:"M\u6708d\u65e5",MONTH_DAY_FULL:"M\u6708dd\u65e5",MONTH_DAY_SHORT:"M/d",MONTH_DAY_MEDIUM:"M\u6708d\u65e5",MONTH_DAY_YEAR_MEDIUM:"y\u5e74M\u6708d\u65e5",WEEKDAY_MONTH_DAY_MEDIUM:"M\u6708d\u65e5 EEE",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"y\u5e74M\u6708d\u65e5 EEE",DAY_ABBR:"d\u65e5",MONTH_DAY_TIME_ZONE_SHORT:"M\u6708d\u65e5 ah:mm [zzzz]"}; +goog.i18n.DateTimePatterns_zu={YEAR_FULL:"y",YEAR_FULL_WITH_ERA:"G y",YEAR_MONTH_ABBR:"MMM y",YEAR_MONTH_FULL:"MMMM y",YEAR_MONTH_SHORT:"y-MM",MONTH_DAY_ABBR:"MMM d",MONTH_DAY_FULL:"MMMM dd",MONTH_DAY_SHORT:"MM-dd",MONTH_DAY_MEDIUM:"MMMM d",MONTH_DAY_YEAR_MEDIUM:"MMM d, y",WEEKDAY_MONTH_DAY_MEDIUM:"EEE, MMM d",WEEKDAY_MONTH_DAY_YEAR_MEDIUM:"EEE, MMM d, y",DAY_ABBR:"d",MONTH_DAY_TIME_ZONE_SHORT:"MMM d HH:mm zzzz"};goog.i18n.DateTimePatternsType=function(){};goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en; +switch(goog.LOCALE){case "af":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_af;break;case "am":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_am;break;case "ar":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ar;break;case "ar_DZ":case "ar-DZ":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ar_DZ;break;case "ar_EG":case "ar-EG":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ar_EG;break;case "az":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_az;break;case "be":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_be;break;case "bg":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_bg;break;case "bn":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_bn;break;case "br":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_br;break;case "bs":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_bs;break;case "ca":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ca;break;case "chr":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_chr;break;case "cs":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_cs;break;case "cy":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_cy;break;case "da":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_da;break;case "de":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_de;break;case "de_AT":case "de-AT":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_de_AT;break;case "de_CH":case "de-CH":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_de_CH;break;case "el":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_el; +break;case "en":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en;break;case "en_AU":case "en-AU":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en_AU;break;case "en_CA":case "en-CA":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en_CA;break;case "en_GB":case "en-GB":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en_GB;break;case "en_IE":case "en-IE":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en_IE;break;case "en_IN":case "en-IN":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en_IN; +break;case "en_SG":case "en-SG":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en_SG;break;case "en_US":case "en-US":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en_US;break;case "en_ZA":case "en-ZA":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_en_ZA;break;case "es":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_es;break;case "es_419":case "es-419":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_es_419;break;case "es_ES":case "es-ES":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_es_ES;break;case "es_MX":case "es-MX":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_es_MX;break;case "es_US":case "es-US":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_es_US;break;case "et":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_et;break;case "eu":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_eu;break;case "fa":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_fa;break;case "fi":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_fi; +break;case "fil":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_fil;break;case "fr":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_fr;break;case "fr_CA":case "fr-CA":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_fr_CA;break;case "ga":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ga;break;case "gl":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_gl;break;case "gsw":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_gsw;break;case "gu":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_gu;break;case "haw":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_haw;break;case "he":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_he;break;case "hi":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_hi;break;case "hr":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_hr;break;case "hu":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_hu;break;case "hy":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_hy;break;case "id":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_id;break;case "in":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_in;break;case "is":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_is;break;case "it":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_it;break;case "iw":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_iw;break;case "ja":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ja;break;case "ka":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ka;break;case "kk":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_kk;break;case "km":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_km;break;case "kn":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_kn;break;case "ko":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ko;break;case "ky":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ky;break;case "ln":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ln;break;case "lo":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_lo;break;case "lt":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_lt;break;case "lv":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_lv;break;case "mk":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_mk;break;case "ml":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ml;break;case "mn":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_mn;break;case "mo":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_mo;break;case "mr":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_mr;break;case "ms":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_ms;break;case "mt":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_mt;break;case "my":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_my;break;case "nb":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_nb;break;case "ne":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ne;break;case "nl":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_nl;break;case "no":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_no;break;case "no_NO":case "no-NO":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_no_NO;break;case "or":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_or;break;case "pa":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_pa;break;case "pl":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_pl;break;case "pt":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_pt;break;case "pt_BR":case "pt-BR":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_pt_BR;break;case "pt_PT":case "pt-PT":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_pt_PT; +break;case "ro":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ro;break;case "ru":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ru;break;case "sh":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_sh;break;case "si":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_si;break;case "sk":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_sk;break;case "sl":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_sl;break;case "sq":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_sq; +break;case "sr":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_sr;break;case "sr_Latn":case "sr-Latn":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_sr_Latn;break;case "sv":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_sv;break;case "sw":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_sw;break;case "ta":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ta;break;case "te":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_te;break;case "th":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_th;break;case "tl":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_tl;break;case "tr":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_tr;break;case "uk":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_uk;break;case "ur":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_ur;break;case "uz":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_uz;break;case "vi":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_vi;break;case "zh":goog.i18n.DateTimePatterns= +goog.i18n.DateTimePatterns_zh;break;case "zh_CN":case "zh-CN":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_zh_CN;break;case "zh_HK":case "zh-HK":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_zh_HK;break;case "zh_TW":case "zh-TW":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_zh_TW;break;case "zu":goog.i18n.DateTimePatterns=goog.i18n.DateTimePatterns_zu};goog.ui.DatePickerRenderer=function(){};goog.ui.DatePickerRenderer.prototype.renderNavigationRow=goog.abstractMethod;goog.ui.DatePickerRenderer.prototype.renderFooterRow=goog.abstractMethod;goog.ui.DefaultDatePickerRenderer=function(a,b){this.baseCssClass_=a;this.dom_=b||goog.dom.getDomHelper()};goog.ui.DefaultDatePickerRenderer.prototype.getDomHelper=function(){return this.dom_};goog.ui.DefaultDatePickerRenderer.prototype.getBaseCssClass=function(){return this.baseCssClass_}; +goog.ui.DefaultDatePickerRenderer.prototype.renderNavigationRow=function(a,b,c,d){b?(d=this.getDomHelper().createElement("TD"),d.colSpan=c?1:2,this.createButton_(d,"\u00ab",this.getBaseCssClass()+"-previousMonth"),a.appendChild(d),d=this.getDomHelper().createElement("TD"),d.colSpan=c?6:5,d.className=this.getBaseCssClass()+"-monthyear",a.appendChild(d),d=this.getDomHelper().createElement("TD"),this.createButton_(d,"\u00bb",this.getBaseCssClass()+"-nextMonth"),a.appendChild(d)):(c=this.getDomHelper().createElement("TD"), +c.colSpan=5,this.createButton_(c,"\u00ab",this.getBaseCssClass()+"-previousMonth"),this.createButton_(c,"",this.getBaseCssClass()+"-month"),this.createButton_(c,"\u00bb",this.getBaseCssClass()+"-nextMonth"),b=this.getDomHelper().createElement("TD"),b.colSpan=3,this.createButton_(b,"\u00ab",this.getBaseCssClass()+"-previousYear"),this.createButton_(b,"",this.getBaseCssClass()+"-year"),this.createButton_(b,"\u00bb",this.getBaseCssClass()+"-nextYear"),d.indexOf("y")a||0>b)return null;var c=a+1;return this.elTable_[c]?this.elTable_[c][b+1]||null:null};goog.ui.DatePicker.prototype.setDate=function(a){this.setDate_(a,!0)}; +goog.ui.DatePicker.prototype.setDate_=function(a,b){var c=a==this.date_||a&&this.date_&&a.getFullYear()==this.date_.getFullYear()&&a.getMonth()==this.date_.getMonth(),d=a==this.date_||c&&a.getDate()==this.date_.getDate();this.date_=a&&new goog.date.Date(a);a&&(this.activeMonth_.set(this.date_),this.activeMonth_.setFullYear(this.date_.getFullYear()),this.activeMonth_.setDate(1));this.updateCalendarGrid_();if(b){var e=new goog.ui.DatePickerEvent(goog.ui.DatePicker.Events.SELECT,this,this.date_);this.dispatchEvent(e)}d|| +(d=new goog.ui.DatePickerEvent(goog.ui.DatePicker.Events.CHANGE,this,this.date_),this.dispatchEvent(d));c||this.fireChangeActiveMonthEvent_()}; +goog.ui.DatePicker.prototype.updateNavigationRow_=function(){if(this.elNavRow_){for(var a=this.elNavRow_;a.firstChild;)a.removeChild(a.firstChild);var b=this.symbols_.DATEFORMATS[goog.i18n.DateTimeFormat.Format.FULL_DATE].toLowerCase();this.renderer_.renderNavigationRow(a,this.simpleNavigation_,this.showWeekNum_,b);if(this.simpleNavigation_){this.addPreventDefaultClickHandler_(a,this.getBaseCssClass()+"-previousMonth",this.previousMonth);if(b=goog.dom.getElementByClass(this.getBaseCssClass()+"-previousMonth", +a))goog.a11y.aria.setState(b,goog.a11y.aria.State.HIDDEN,!0),b.tabIndex=-1;this.addPreventDefaultClickHandler_(a,this.getBaseCssClass()+"-nextMonth",this.nextMonth);if(b=goog.dom.getElementByClass(this.getBaseCssClass()+"-nextMonth",a))goog.a11y.aria.setState(b,goog.a11y.aria.State.HIDDEN,!0),b.tabIndex=-1;this.elMonthYear_=goog.dom.getElementByClass(this.getBaseCssClass()+"-monthyear",a)}else this.addPreventDefaultClickHandler_(a,this.getBaseCssClass()+"-previousMonth",this.previousMonth),this.addPreventDefaultClickHandler_(a, +this.getBaseCssClass()+"-nextMonth",this.nextMonth),this.addPreventDefaultClickHandler_(a,this.getBaseCssClass()+"-month",this.showMonthMenu_),this.addPreventDefaultClickHandler_(a,this.getBaseCssClass()+"-previousYear",this.previousYear),this.addPreventDefaultClickHandler_(a,this.getBaseCssClass()+"-nextYear",this.nextYear),this.addPreventDefaultClickHandler_(a,this.getBaseCssClass()+"-year",this.showYearMenu_),this.elMonth_=goog.dom.getElementByClass(this.getBaseCssClass()+"-month",a),this.elYear_= +goog.dom.getDomHelper().getElementByClass(this.getBaseCssClass()+"-year",a)}};goog.ui.DatePicker.prototype.addPreventDefaultClickHandler_=function(a,b,c){a=goog.dom.getElementByClass(b,a);this.getHandler().listen(a,goog.events.EventType.CLICK,function(a){a.preventDefault();c.call(this,a)})}; +goog.ui.DatePicker.prototype.updateFooterRow_=function(){if(this.elFootRow_){var a=this.elFootRow_;goog.dom.removeChildren(a);this.renderer_.renderFooterRow(a,this.showWeekNum_);this.addPreventDefaultClickHandler_(a,this.getBaseCssClass()+"-today-btn",this.selectToday);this.addPreventDefaultClickHandler_(a,this.getBaseCssClass()+"-none-btn",this.selectNone);this.elToday_=goog.dom.getElementByClass(this.getBaseCssClass()+"-today-btn",a);this.elNone_=goog.dom.getElementByClass(this.getBaseCssClass()+ +"-none-btn",a);this.updateTodayAndNone_()}}; +goog.ui.DatePicker.prototype.decorateInternal=function(a){goog.ui.DatePicker.superClass_.decorateInternal.call(this,a);goog.asserts.assert(a);goog.dom.classlist.add(a,this.getBaseCssClass());var b=this.dom_.createDom("TABLE",{role:"presentation"}),c=this.dom_.createDom("THEAD"),d=this.dom_.createDom("TBODY",{role:"grid"}),e=this.dom_.createDom("TFOOT");d.tabIndex=0;this.tableBody_=d;this.tableFoot_=e;var f=this.dom_.createDom("TR",{role:"row"});f.className=this.getBaseCssClass()+"-head";this.elNavRow_= +f;this.updateNavigationRow_();c.appendChild(f);this.elTable_=[];for(var g=0;7>g;g++){f=this.dom_.createElement("TR");this.elTable_[g]=[];for(var h=0;8>h;h++){var k=this.dom_.createElement(0==h||0==g?"th":"td");0!=h&&0!=g||h==g?0!==g&&0!==h&&(goog.a11y.aria.setRole(k,"gridcell"),k.setAttribute("tabindex","-1")):(k.className=0==h?this.getBaseCssClass()+"-week":this.getBaseCssClass()+"-wday",goog.a11y.aria.setRole(k,0==h?"rowheader":"columnheader"));f.appendChild(k);this.elTable_[g][h]=k}d.appendChild(f)}f= +this.dom_.createElement("TR");f.className=this.getBaseCssClass()+"-foot";this.elFootRow_=f;this.updateFooterRow_();e.appendChild(f);b.cellSpacing="0";b.cellPadding="0";b.appendChild(c);b.appendChild(d);b.appendChild(e);a.appendChild(b);this.redrawWeekdays_();this.updateCalendarGrid_();a.tabIndex=0};goog.ui.DatePicker.prototype.createDom=function(){goog.ui.DatePicker.superClass_.createDom.call(this);this.decorateInternal(this.getElement())}; +goog.ui.DatePicker.prototype.enterDocument=function(){goog.ui.DatePicker.superClass_.enterDocument.call(this);var a=this.getHandler();a.listen(this.tableBody_,goog.events.EventType.CLICK,this.handleGridClick_);a.listen(this.getKeyHandlerForElement_(this.getElement()),goog.events.KeyHandler.EventType.KEY,this.handleGridKeyPress_)}; +goog.ui.DatePicker.prototype.exitDocument=function(){goog.ui.DatePicker.superClass_.exitDocument.call(this);this.destroyMenu_();for(var a in this.keyHandlers_)this.keyHandlers_[a].dispose();this.keyHandlers_={}};goog.ui.DatePicker.prototype.create=goog.ui.DatePicker.prototype.decorate; +goog.ui.DatePicker.prototype.disposeInternal=function(){goog.ui.DatePicker.superClass_.disposeInternal.call(this);this.elNone_=this.elToday_=this.elYear_=this.elMonthYear_=this.elMonth_=this.elFootRow_=this.elNavRow_=this.tableFoot_=this.tableBody_=this.elTable_=null}; +goog.ui.DatePicker.prototype.handleGridClick_=function(a){if("TD"==a.target.tagName){var b,c=-2,d=-2;for(b=a.target;b;b=b.previousSibling,c++);for(b=a.target.parentNode;b;b=b.previousSibling,d++);a=this.grid_[d][c];this.isUserSelectableDate_(a)&&this.setDate(a.clone())}}; +goog.ui.DatePicker.prototype.handleGridKeyPress_=function(a){switch(a.keyCode){case 33:a.preventDefault();var b=-1;break;case 34:a.preventDefault();b=1;break;case 37:a.preventDefault();var c=-1;break;case 39:a.preventDefault();c=1;break;case 38:a.preventDefault();c=-7;break;case 40:a.preventDefault();c=7;break;case 36:a.preventDefault();this.selectToday();break;case 46:a.preventDefault();this.selectNone();break;case 13:case 32:a.preventDefault(),this.setDate_(this.date_,!0);default:return}this.date_? +(a=this.date_.clone(),a.add(new goog.date.Interval(0,b,c))):(a=this.activeMonth_.clone(),a.setDate(1));this.isUserSelectableDate_(a)&&(this.setDate_(a,!1),this.selectedCell_.focus())};goog.ui.DatePicker.prototype.showMonthMenu_=function(a){a.stopPropagation();a=[];for(var b=0;12>b;b++)a.push(this.symbols_.STANDALONEMONTHS[b]);this.createMenu_(this.elMonth_,a,this.handleMonthMenuClick_,this.symbols_.STANDALONEMONTHS[this.activeMonth_.getMonth()])}; +goog.ui.DatePicker.prototype.showYearMenu_=function(a){a.stopPropagation();a=[];for(var b=this.activeMonth_.getFullYear(),c=this.activeMonth_.clone(),d=-goog.ui.DatePicker.YEAR_MENU_RANGE_;d<=goog.ui.DatePicker.YEAR_MENU_RANGE_;d++)c.setFullYear(b+d),a.push(this.i18nDateFormatterYear_.format(c));this.createMenu_(this.elYear_,a,this.handleYearMenuClick_,this.i18nDateFormatterYear_.format(this.activeMonth_))}; +goog.ui.DatePicker.prototype.handleMonthMenuClick_=function(a){a=Number(a.getAttribute("itemIndex"));this.activeMonth_.setMonth(a);this.updateCalendarGrid_();this.elMonth_.focus&&this.elMonth_.focus()};goog.ui.DatePicker.prototype.handleYearMenuClick_=function(a){if(a.firstChild.nodeType==goog.dom.NodeType.TEXT){a=Number(a.getAttribute("itemIndex"));var b=this.activeMonth_.getFullYear();this.activeMonth_.setFullYear(b+a-goog.ui.DatePicker.YEAR_MENU_RANGE_);this.updateCalendarGrid_()}this.elYear_.focus()}; +goog.ui.DatePicker.prototype.createMenu_=function(a,b,c,d){this.destroyMenu_();var e=this.dom_.createElement("DIV");e.className=this.getBaseCssClass()+"-menu";this.menuSelected_=null;for(var f=this.dom_.createElement("UL"),g=0;gc+b&&a.add(new goog.date.Interval(goog.date.Interval.DAYS,-7));b=new goog.date.Interval(goog.date.Interval.DAYS,1);this.grid_=[];for(c=0;6>c;c++){this.grid_[c]=[];for(var d=0;7>d;d++){this.grid_[c][d]=a.clone();var e=a.getFullYear();a.add(b);0==a.getMonth()&&1==a.getDate()&&e++;a.setFullYear(e)}}this.redrawCalendarGrid_()}}; +goog.ui.DatePicker.prototype.redrawCalendarGrid_=function(){if(this.getElement()){var a=this.activeMonth_.getMonth(),b=new goog.date.Date,c=b.getFullYear(),d=b.getMonth();b=b.getDate();for(var e=goog.ui.DatePicker.MAX_NUM_WEEKS_,f=0;fg;g++){var h=this.grid_[f][g],k=this.elTable_[f+1][g+1];k.id||(k.id=this.cellIdGenerator_.getNextUniqueId());goog.asserts.assert(k,"The table DOM element cannot be null.");goog.a11y.aria.setRole(k,"gridcell");goog.a11y.aria.setLabel(k,this.i18nDateFormatterDayAriaLabel_.format(h));var l=[this.getBaseCssClass()+"-date"];this.isUserSelectableDate_(h)||l.push(this.getBaseCssClass()+"-unavailable-date");if(this.showOtherMonths_|| +h.getMonth()==a){h.getMonth()!=a&&l.push(this.getBaseCssClass()+"-other-month");var m=(g+this.activeMonth_.getFirstDayOfWeek()+7)%7;this.wdayStyles_[m]&&l.push(this.wdayStyles_[m]);h.getDate()==b&&h.getMonth()==d&&h.getFullYear()==c&&l.push(this.getBaseCssClass()+"-today");this.date_&&h.getDate()==this.date_.getDate()&&h.getMonth()==this.date_.getMonth()&&h.getFullYear()==this.date_.getFullYear()&&(l.push(this.getBaseCssClass()+"-selected"),goog.asserts.assert(this.tableBody_,"The table body DOM element cannot be null"), +this.selectedCell_=k);this.decoratorFunction_&&(m=this.decoratorFunction_(h))&&l.push(m);h=this.longDateFormat_?this.i18nDateFormatterDay2_.format(h):this.i18nDateFormatterDay_.format(h);goog.dom.setTextContent(k,h)}else goog.dom.setTextContent(k,"");goog.dom.classlist.set(k,l.join(" "))}4<=f&&(g=this.elTable_[f+1][0].parentElement||this.elTable_[f+1][0].parentNode,k=this.grid_[f][0].getMonth()==a,goog.style.setElementShown(g,k||this.showFixedNumWeeks_),k||(e=Math.min(e,f)))}a=(this.showFixedNumWeeks_? +goog.ui.DatePicker.MAX_NUM_WEEKS_:e)+(this.showWeekdays_?1:0);this.lastNumberOfRowsInGrid_!=a&&(this.lastNumberOfRowsInGrid_a;a++){var b=this.elTable_[0][a+1],c=(a+this.activeMonth_.getFirstDayOfWeek()+7)%7;goog.dom.setTextContent(b,this.wdayNames_[(c+1)%7])}goog.style.setElementShown(this.elTable_[0][0].parentElement||this.elTable_[0][0].parentNode,this.showWeekdays_)}}; +goog.ui.DatePicker.prototype.getKeyHandlerForElement_=function(a){var b=goog.getUid(a);b in this.keyHandlers_||(this.keyHandlers_[b]=new goog.events.KeyHandler(a));return this.keyHandlers_[b]};goog.ui.DatePickerEvent=function(a,b,c){goog.events.Event.call(this,a,b);this.date=c};goog.inherits(goog.ui.DatePickerEvent,goog.events.Event); var Blockly={};Blockly.Blocks=Object.create(null);Blockly.Msg={};goog.getMsgOrig=goog.getMsg;goog.getMsg=function(a,b){var c=goog.getMsg.blocklyMsgMap[a];c&&(a=Blockly.Msg[c]);return goog.getMsgOrig(a,b)};goog.getMsg.blocklyMsgMap={Today:"TODAY"}; Blockly.utils={};Blockly.utils.base={};Blockly.utils.global=this||self;Blockly.utils.Coordinate=function(a,b){this.x=a;this.y=b};Blockly.utils.Coordinate.equals=function(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1};Blockly.utils.Coordinate.distance=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};Blockly.utils.Coordinate.magnitude=function(a){return Math.sqrt(a.x*a.x+a.y*a.y)};Blockly.utils.Coordinate.difference=function(a,b){return new Blockly.utils.Coordinate(a.x-b.x,a.y-b.y)}; Blockly.utils.Coordinate.sum=function(a,b){return new Blockly.utils.Coordinate(a.x+b.x,a.y+b.y)};Blockly.utils.Coordinate.prototype.scale=function(a){this.x*=a;this.y*=a;return this};Blockly.utils.Coordinate.prototype.translate=function(a,b){this.x+=a;this.y+=b;return this};Blockly.utils.string={};Blockly.utils.string.startsWith=function(a,b){return 0==a.lastIndexOf(b,0)};Blockly.utils.string.shortestStringLength=function(a){return a.length?a.reduce(function(a,c){return a.length Date: Fri, 16 Aug 2019 10:52:48 -0700 Subject: [PATCH 13/17] Remove everything but date tests. --- tests/mocha/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/mocha/index.html b/tests/mocha/index.html index 7f27db666..81fd7fc7f 100644 --- a/tests/mocha/index.html +++ b/tests/mocha/index.html @@ -24,7 +24,7 @@ - + - +