UNPKG

create-expo-cljs-app

Version:

Create a react native application with Expo and Shadow-CLJS!

1 lines 19.6 MB
["^ ","~:foreign-libs",[],"~:externs",[],"~:resources",[["^ ","~:cache-key",["6025affb7181cd40418600864f58eed1ea80055d"],"~:output-name","goog.labs.testing.objectmatcher.js","~:resource-id",["~:shadow.build.classpath/resource","goog/labs/testing/objectmatcher.js"],"~:resource-name","goog/labs/testing/objectmatcher.js","~:type","~:goog","~:source","// Copyright 2012 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS-IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @fileoverview Provides the built-in object matchers like equalsObject,\n * hasProperty, instanceOf, etc.\n */\n\ngoog.provide('goog.labs.testing.AnyObjectMatcher');\ngoog.provide('goog.labs.testing.HasPropertyMatcher');\ngoog.provide('goog.labs.testing.InstanceOfMatcher');\ngoog.provide('goog.labs.testing.IsNullMatcher');\ngoog.provide('goog.labs.testing.IsNullOrUndefinedMatcher');\ngoog.provide('goog.labs.testing.IsUndefinedMatcher');\ngoog.provide('goog.labs.testing.ObjectEqualsMatcher');\n\ngoog.require('goog.labs.testing.Matcher');\n\n\n\n/**\n * Matches any object value.\n *\n * @constructor @struct @implements {goog.labs.testing.Matcher} @final\n */\ngoog.labs.testing.AnyObjectMatcher = function() {};\n\n\n/** @override */\ngoog.labs.testing.AnyObjectMatcher.prototype.matches = function(actualValue) {\n return goog.isObject(actualValue);\n};\n\n\n/** @override */\ngoog.labs.testing.AnyObjectMatcher.prototype.describe = function(actualValue) {\n return '<' + actualValue + '> is not an object';\n};\n\n\n\n/**\n * The Equals matcher.\n *\n * @param {!Object} expectedObject The expected object.\n *\n * @constructor\n * @struct\n * @implements {goog.labs.testing.Matcher}\n * @final\n */\ngoog.labs.testing.ObjectEqualsMatcher = function(expectedObject) {\n /**\n * @type {!Object}\n * @private\n */\n this.object_ = expectedObject;\n};\n\n\n/**\n * Determines if two objects are the same.\n *\n * @override\n */\ngoog.labs.testing.ObjectEqualsMatcher.prototype.matches = function(\n actualObject) {\n return actualObject === this.object_;\n};\n\n\n/**\n * @override\n */\ngoog.labs.testing.ObjectEqualsMatcher.prototype.describe = function(\n actualObject) {\n return 'Input object is not the same as the expected object.';\n};\n\n\n\n/**\n * The HasProperty matcher.\n *\n * @param {string} property Name of the property to test.\n *\n * @constructor\n * @struct\n * @implements {goog.labs.testing.Matcher}\n * @final\n */\ngoog.labs.testing.HasPropertyMatcher = function(property) {\n /**\n * @type {string}\n * @private\n */\n this.property_ = property;\n};\n\n\n/**\n * Determines if an object has a property.\n *\n * @override\n */\ngoog.labs.testing.HasPropertyMatcher.prototype.matches = function(\n actualObject) {\n return this.property_ in actualObject;\n};\n\n\n/**\n * @override\n */\ngoog.labs.testing.HasPropertyMatcher.prototype.describe = function(\n actualObject) {\n return 'Object does not have property: ' + this.property_;\n};\n\n\n\n/**\n * The InstanceOf matcher.\n *\n * @param {!Object} object The expected class object.\n *\n * @constructor\n * @struct\n * @implements {goog.labs.testing.Matcher}\n * @final\n */\ngoog.labs.testing.InstanceOfMatcher = function(object) {\n /**\n * @type {!Object}\n * @private\n */\n this.object_ = object;\n};\n\n\n/**\n * Determines if an object is an instance of another object.\n *\n * @override\n */\ngoog.labs.testing.InstanceOfMatcher.prototype.matches = function(actualObject) {\n return actualObject instanceof this.object_;\n};\n\n\n/**\n * @override\n */\ngoog.labs.testing.InstanceOfMatcher.prototype.describe = function(\n actualObject) {\n return 'Input object is not an instance of the expected object';\n};\n\n\n\n/**\n * The IsNullOrUndefined matcher.\n *\n * @constructor\n * @struct\n * @implements {goog.labs.testing.Matcher}\n * @final\n */\ngoog.labs.testing.IsNullOrUndefinedMatcher = function() {};\n\n\n/**\n * Determines if input value is null or undefined.\n *\n * @override\n */\ngoog.labs.testing.IsNullOrUndefinedMatcher.prototype.matches = function(\n actualValue) {\n return actualValue == null;\n};\n\n\n/**\n * @override\n */\ngoog.labs.testing.IsNullOrUndefinedMatcher.prototype.describe = function(\n actualValue) {\n return actualValue + ' is not null or undefined.';\n};\n\n\n\n/**\n * The IsNull matcher.\n *\n * @constructor\n * @struct\n * @implements {goog.labs.testing.Matcher}\n * @final\n */\ngoog.labs.testing.IsNullMatcher = function() {};\n\n\n/**\n * Determines if input value is null.\n *\n * @override\n */\ngoog.labs.testing.IsNullMatcher.prototype.matches = function(actualValue) {\n return actualValue === null;\n};\n\n\n/**\n * @override\n */\ngoog.labs.testing.IsNullMatcher.prototype.describe = function(actualValue) {\n return actualValue + ' is not null.';\n};\n\n\n\n/**\n * The IsUndefined matcher.\n *\n * @constructor\n * @struct\n * @implements {goog.labs.testing.Matcher}\n * @final\n */\ngoog.labs.testing.IsUndefinedMatcher = function() {};\n\n\n/**\n * Determines if input value is undefined.\n *\n * @override\n */\ngoog.labs.testing.IsUndefinedMatcher.prototype.matches = function(actualValue) {\n return actualValue === undefined;\n};\n\n\n/**\n * @override\n */\ngoog.labs.testing.IsUndefinedMatcher.prototype.describe = function(\n actualValue) {\n return actualValue + ' is not undefined.';\n};\n\n\n/** @return {!goog.labs.testing.AnyObjectMatcher} */\nvar anyObject = goog.labs.testing.AnyObjectMatcher.anyObject = function() {\n return new goog.labs.testing.AnyObjectMatcher();\n};\n\n\n/**\n * Returns a matcher that matches objects that are equal to the input object.\n * Equality in this case means the two objects are references to the same\n * object.\n *\n * @param {!Object} object The expected object.\n *\n * @return {!goog.labs.testing.ObjectEqualsMatcher} A\n * ObjectEqualsMatcher.\n */\nvar equalsObject =\n goog.labs.testing.ObjectEqualsMatcher.equalsObject = function(object) {\n return new goog.labs.testing.ObjectEqualsMatcher(object);\n };\n\n\n/**\n * Returns a matcher that matches objects that contain the input property.\n *\n * @param {string} property The property name to check.\n *\n * @return {!goog.labs.testing.HasPropertyMatcher} A HasPropertyMatcher.\n */\nvar hasProperty =\n goog.labs.testing.HasPropertyMatcher.hasProperty = function(property) {\n return new goog.labs.testing.HasPropertyMatcher(property);\n };\n\n\n/**\n * Returns a matcher that matches instances of the input class.\n *\n * @param {!Object} object The class object.\n *\n * @return {!goog.labs.testing.InstanceOfMatcher} A\n * InstanceOfMatcher.\n */\nvar instanceOfClass =\n goog.labs.testing.InstanceOfMatcher.instanceOfClass = function(object) {\n return new goog.labs.testing.InstanceOfMatcher(object);\n };\n\n\n/**\n * Returns a matcher that matches all null values.\n *\n * @return {!goog.labs.testing.IsNullMatcher} A IsNullMatcher.\n */\nvar isNull = goog.labs.testing.IsNullMatcher.isNull = function() {\n return new goog.labs.testing.IsNullMatcher();\n};\n\n\n/**\n * Returns a matcher that matches all null and undefined values.\n *\n * @return {!goog.labs.testing.IsNullOrUndefinedMatcher} A\n * IsNullOrUndefinedMatcher.\n */\nvar isNullOrUndefined =\n goog.labs.testing.IsNullOrUndefinedMatcher.isNullOrUndefined = function() {\n return new goog.labs.testing.IsNullOrUndefinedMatcher();\n };\n\n\n/**\n * Returns a matcher that matches undefined values.\n *\n * @return {!goog.labs.testing.IsUndefinedMatcher} A IsUndefinedMatcher.\n */\nvar isUndefined =\n goog.labs.testing.IsUndefinedMatcher.isUndefined = function() {\n return new goog.labs.testing.IsUndefinedMatcher();\n };\n","~:last-modified",1592063303606,"~:requires",["~#set",["~$goog.labs.testing.Matcher","~$goog"]],"~:pom-info",["^ ","~:description","The Google Closure Library is a collection of JavaScript code\n designed for use with the Google Closure JavaScript Compiler.\n\n This non-official distribution was prepared by the ClojureScript\n team at http://clojure.org/","~:group-id","~$org.clojure","~:artifact-id","~$google-closure-library","~:name","Google Closure Library","~:id","~$org.clojure/google-closure-library","~:url","http://code.google.com/p/closure-library/","~:parent-group-id","~$org.sonatype.oss","~:coordinate",["^H","0.0-20191016-6ae1f72f"],"~:version","0.0-20191016-6ae1f72f"],"~:inspect-info",["^ ","~:js-str-offsets",[],"~:js-esm",false,"~:js-imports",[],"~:js-invalid-requires",[],"~:goog-provides",["goog.labs.testing.AnyObjectMatcher","goog.labs.testing.HasPropertyMatcher","goog.labs.testing.InstanceOfMatcher","goog.labs.testing.IsNullMatcher","goog.labs.testing.IsNullOrUndefinedMatcher","goog.labs.testing.IsUndefinedMatcher","goog.labs.testing.ObjectEqualsMatcher"],"~:js-language","es3","~:goog-module",null,"~:js-requires",[],"~:goog-requires",["goog.labs.testing.Matcher"],"~:uses-global-buffer",false,"~:uses-global-process",false],"^I",["~#url","jar:file:/home/justin/.m2/repository/org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f.jar!/goog/labs/testing/objectmatcher.js"],"~:provides",["^=",["~$goog.labs.testing.IsNullMatcher","~$goog.labs.testing.HasPropertyMatcher","~$goog.labs.testing.ObjectEqualsMatcher","~$goog.labs.testing.IsNullOrUndefinedMatcher","~$goog.labs.testing.IsUndefinedMatcher","~$goog.labs.testing.AnyObjectMatcher","~$goog.labs.testing.InstanceOfMatcher"]],"~:from-jar",true,"~:deps",["^?","^>"]],["^ ","^3",["6025affb7181cd40418600864f58eed1ea80055d"],"^4","goog.editor.plugins.emoticons.js","^5",["^6","goog/editor/plugins/emoticons.js"],"^7","goog/editor/plugins/emoticons.js","^8","^9","^:","// Copyright 2009 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS-IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// All Rights Reserved\n\n/**\n * @fileoverview Plugin for generating emoticons.\n *\n * @author nicksantos@google.com (Nick Santos)\n */\n\ngoog.provide('goog.editor.plugins.Emoticons');\n\ngoog.require('goog.dom.TagName');\ngoog.require('goog.editor.Plugin');\ngoog.require('goog.editor.range');\ngoog.require('goog.functions');\ngoog.require('goog.ui.emoji.Emoji');\ngoog.require('goog.userAgent');\n\n\n\n/**\n * Plugin for generating emoticons.\n *\n * @constructor\n * @extends {goog.editor.Plugin}\n * @final\n */\ngoog.editor.plugins.Emoticons = function() {\n goog.editor.plugins.Emoticons.base(this, 'constructor');\n};\ngoog.inherits(goog.editor.plugins.Emoticons, goog.editor.Plugin);\n\n\n/** The emoticon command. */\ngoog.editor.plugins.Emoticons.COMMAND = '+emoticon';\n\n\n/** @override */\ngoog.editor.plugins.Emoticons.prototype.getTrogClassId =\n goog.functions.constant(goog.editor.plugins.Emoticons.COMMAND);\n\n\n/** @override */\ngoog.editor.plugins.Emoticons.prototype.isSupportedCommand = function(command) {\n return command == goog.editor.plugins.Emoticons.COMMAND;\n};\n\n\n/**\n * Inserts an emoticon into the editor at the cursor location. Places the\n * cursor to the right of the inserted emoticon.\n * @param {string} command Command to execute.\n * @param {*=} opt_arg Emoji to insert.\n * @return {!Object|undefined} The result of the command.\n * @override\n */\ngoog.editor.plugins.Emoticons.prototype.execCommandInternal = function(\n command, opt_arg) {\n var emoji = /** @type {goog.ui.emoji.Emoji} */ (opt_arg);\n\n var styleProperties = 'margin:0 0.2ex;vertical-align:middle;';\n var emojiHeight = emoji.getHeight();\n styleProperties += emojiHeight ? 'height:' + emojiHeight + 'px;' : '';\n var emojiWidth = emoji.getWidth();\n styleProperties += emojiWidth ? 'width:' + emojiWidth + 'px;' : '';\n\n var dom = this.getFieldDomHelper();\n var imgAttributes = {'src': emoji.getUrl(), 'style': styleProperties};\n if (emoji.getAltText()) {\n imgAttributes['alt'] = emoji.getAltText();\n }\n var img = dom.createDom(goog.dom.TagName.IMG, imgAttributes);\n\n img.setAttribute(goog.ui.emoji.Emoji.ATTRIBUTE, emoji.getId());\n img.setAttribute(goog.ui.emoji.Emoji.DATA_ATTRIBUTE, emoji.getId());\n\n this.getFieldObject().getRange().replaceContentsWithNode(img);\n\n // IE8 does the right thing with the cursor, and has a js error when we try\n // to place the cursor manually.\n // IE9 loses the cursor when the window is focused, so focus first.\n if (!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9)) {\n this.getFieldObject().focus();\n goog.editor.range.placeCursorNextTo(img, false);\n }\n};\n","^;",1592063303606,"^<",["^=",["~$goog.functions","~$goog.editor.range","^?","~$goog.userAgent","~$goog.ui.emoji.Emoji","~$goog.editor.Plugin","~$goog.dom.TagName"]],"^@",["^ ","^A","The Google Closure Library is a collection of JavaScript code\n designed for use with the Google Closure JavaScript Compiler.\n\n This non-official distribution was prepared by the ClojureScript\n team at http://clojure.org/","^B","^C","^D","^E","^F","Google Closure Library","^G","^H","^I","http://code.google.com/p/closure-library/","^J","^K","^L",["^H","0.0-20191016-6ae1f72f"],"^M","0.0-20191016-6ae1f72f"],"^N",["^ ","^O",[],"^P",false,"^Q",[],"^R",[],"^S",["goog.editor.plugins.Emoticons"],"^T","es3","^U",null,"^V",[],"^W",["goog.dom.TagName","goog.editor.Plugin","goog.editor.range","goog.functions","goog.ui.emoji.Emoji","goog.userAgent"],"^X",false,"^Y",false],"^I",["^Z","jar:file:/home/justin/.m2/repository/org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f.jar!/goog/editor/plugins/emoticons.js"],"^[",["^=",["~$goog.editor.plugins.Emoticons"]],"^17",true,"^18",["^?","^1>","^1=","^1:","^19","^1<","^1;"]],["^ ","^3",["6025affb7181cd40418600864f58eed1ea80055d"],"^4","goog.module.module.js","^5",["^6","goog/module/module.js"],"^7","goog/module/module.js","^8","^9","^:","// Copyright 2006 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS-IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n *\n * @fileoverview This class supports the dynamic loading of compiled\n * javascript modules at runtime, as described in the designdoc.\n *\n * <http://go/js_modules_design>\n *\n */\n\ngoog.provide('goog.module');\n\n// TODO(johnlenz): Here we explicitly initialize the namespace to avoid\n// problems with the goog.module method in base.js. We should rename this\n// entire package to goog.loader and then we can delete this file.\n//\n// However, note that it is tricky to do that without breaking the world.\n/**\n * @suppress {duplicate}\n * @type {function(string):void}\n */\ngoog.module = goog.module || {};\n","^;",1592063303606,"^<",["^=",["^?"]],"^@",["^ ","^A","The Google Closure Library is a collection of JavaScript code\n designed for use with the Google Closure JavaScript Compiler.\n\n This non-official distribution was prepared by the ClojureScript\n team at http://clojure.org/","^B","^C","^D","^E","^F","Google Closure Library","^G","^H","^I","http://code.google.com/p/closure-library/","^J","^K","^L",["^H","0.0-20191016-6ae1f72f"],"^M","0.0-20191016-6ae1f72f"],"^N",["^ ","^O",[],"^P",false,"^Q",[],"^R",[],"^S",["goog.module"],"^T","es3","^U",null,"^V",[],"^W",[],"^X",false,"^Y",false],"^I",["^Z","jar:file:/home/justin/.m2/repository/org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f.jar!/goog/module/module.js"],"^[",["^=",["~$goog.module"]],"^17",true,"^18",["^?"]],["^ ","^3",["6025affb7181cd40418600864f58eed1ea80055d"],"^4","goog.i18n.uchar.remotenamefetcher.js","^5",["^6","goog/i18n/uchar/remotenamefetcher.js"],"^7","goog/i18n/uchar/remotenamefetcher.js","^8","^9","^:","// Copyright 2012 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS-IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @fileoverview Object which fetches Unicode codepoint names from a remote data\n * source. This data source should accept two parameters:\n * <ol>\n * <li>c - the list of codepoints in hexadecimal format\n * <li>p - the name property\n * </ol>\n * and return a JSON object representation of the result.\n * For example, calling this data source with the following URL:\n * http://datasource?c=50,ff,102bd&p=name\n * Should return a JSON object which looks like this:\n * <pre>\n * {\"50\":{\"name\":\"LATIN CAPITAL LETTER P\"},\n * \"ff\":{\"name\":\"LATIN SMALL LETTER Y WITH DIAERESIS\"},\n * \"102bd\":{\"name\":\"CARIAN LETTER K2\"}}\n * </pre>.\n */\n\ngoog.provide('goog.i18n.uChar.RemoteNameFetcher');\n\ngoog.require('goog.Disposable');\ngoog.require('goog.Uri');\ngoog.require('goog.events');\ngoog.require('goog.i18n.uChar');\ngoog.require('goog.i18n.uChar.NameFetcher');\ngoog.require('goog.log');\ngoog.require('goog.net.EventType');\ngoog.require('goog.net.XhrIo');\n\n\n\n/**\n * Builds the RemoteNameFetcher object. This object retrieves codepoint names\n * from a remote data source.\n *\n * @param {string} dataSourceUri URI to the data source.\n * @constructor\n * @implements {goog.i18n.uChar.NameFetcher}\n * @extends {goog.Disposable}\n * @final\n */\ngoog.i18n.uChar.RemoteNameFetcher = function(dataSourceUri) {\n goog.i18n.uChar.RemoteNameFetcher.base(this, 'constructor');\n\n /**\n * XHRIo object for prefetch() asynchronous calls.\n *\n * @type {!goog.net.XhrIo}\n * @private\n */\n this.prefetchXhrIo_ = new goog.net.XhrIo();\n\n /**\n * XHRIo object for getName() asynchronous calls.\n *\n * @type {!goog.net.XhrIo}\n * @private\n */\n this.getNameXhrIo_ = new goog.net.XhrIo();\n\n /**\n * URI to the data.\n *\n * @type {string}\n * @private\n */\n this.dataSourceUri_ = dataSourceUri;\n\n /**\n * A cache of all the collected names from the server.\n *\n * @type {!Map<string, string>}\n * @private\n */\n this.charNames_ = new Map();\n};\ngoog.inherits(goog.i18n.uChar.RemoteNameFetcher, goog.Disposable);\n\n\n/**\n * Key to the listener on XHR for prefetch(). Used to clear previous listeners.\n *\n * @type {goog.events.Key}\n * @private\n */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.prefetchLastListenerKey_;\n\n\n/**\n * Key to the listener on XHR for getName(). Used to clear previous listeners.\n *\n * @type {goog.events.Key}\n * @private\n */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.getNameLastListenerKey_;\n\n\n/**\n * A reference to the RemoteNameFetcher logger.\n *\n * @type {goog.log.Logger}\n * @private\n */\ngoog.i18n.uChar.RemoteNameFetcher.logger_ =\n goog.log.getLogger('goog.i18n.uChar.RemoteNameFetcher');\n\n\n\n\n/** @override */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.disposeInternal = function() {\n goog.i18n.uChar.RemoteNameFetcher.base(this, 'disposeInternal');\n this.prefetchXhrIo_.dispose();\n this.getNameXhrIo_.dispose();\n};\n\n\n/** @override */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.prefetch = function(characters) {\n // Abort the current request if there is one\n if (this.prefetchXhrIo_.isActive()) {\n goog.log.info(\n goog.i18n.uChar.RemoteNameFetcher.logger_,\n 'Aborted previous prefetch() call for new incoming request');\n this.prefetchXhrIo_.abort();\n }\n if (this.prefetchLastListenerKey_) {\n goog.events.unlistenByKey(this.prefetchLastListenerKey_);\n }\n\n // Set up new listener\n var preFetchCallback = goog.bind(this.prefetchCallback_, this);\n this.prefetchLastListenerKey_ = goog.events.listenOnce(\n this.prefetchXhrIo_, goog.net.EventType.COMPLETE, preFetchCallback);\n\n this.fetch_(\n goog.i18n.uChar.RemoteNameFetcher.RequestType_.BASE_88, characters,\n this.prefetchXhrIo_);\n};\n\n\n/**\n * Callback on completion of the prefetch operation.\n *\n * @private\n */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.prefetchCallback_ = function() {\n this.processResponse_(this.prefetchXhrIo_);\n};\n\n\n/** @override */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.getName = function(\n character, callback) {\n var codepoint = goog.i18n.uChar.toCharCode(character).toString(16);\n\n if (this.charNames_.has(codepoint)) {\n var name = this.charNames_.get(codepoint);\n callback(name);\n return;\n }\n\n // Abort the current request if there is one\n if (this.getNameXhrIo_.isActive()) {\n goog.log.info(\n goog.i18n.uChar.RemoteNameFetcher.logger_,\n 'Aborted previous getName() call for new incoming request');\n this.getNameXhrIo_.abort();\n }\n if (this.getNameLastListenerKey_) {\n goog.events.unlistenByKey(this.getNameLastListenerKey_);\n }\n\n // Set up new listener\n var getNameCallback =\n goog.bind(this.getNameCallback_, this, codepoint, callback);\n this.getNameLastListenerKey_ = goog.events.listenOnce(\n this.getNameXhrIo_, goog.net.EventType.COMPLETE, getNameCallback);\n\n this.fetch_(\n goog.i18n.uChar.RemoteNameFetcher.RequestType_.CODEPOINT, codepoint,\n this.getNameXhrIo_);\n};\n\n\n/**\n * Callback on completion of the getName operation.\n *\n * @param {string} codepoint The codepoint in hexadecimal format.\n * @param {function(?string)} callback The callback function called when the\n * name retrieval is complete, contains a single string parameter with the\n * codepoint name, this parameter will be null if the character name is not\n * defined.\n * @private\n */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.getNameCallback_ = function(\n codepoint, callback) {\n this.processResponse_(this.getNameXhrIo_);\n var name =\n this.charNames_.has(codepoint) ? this.charNames_.get(codepoint) : null;\n callback(name);\n};\n\n\n/**\n * Process the response received from the server and store results in the cache.\n *\n * @param {!goog.net.XhrIo} xhrIo The XhrIo object used to make the request.\n * @private\n */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.processResponse_ = function(xhrIo) {\n if (!xhrIo.isSuccess()) {\n goog.log.error(\n goog.i18n.uChar.RemoteNameFetcher.logger_,\n 'Problem with data source: ' + xhrIo.getLastError());\n return;\n }\n var result = xhrIo.getResponseJson();\n for (var codepoint in result) {\n if (result[codepoint].hasOwnProperty('name')) {\n this.charNames_.set(codepoint, result[codepoint]['name']);\n }\n }\n};\n\n\n/**\n * Enum for the different request types.\n *\n * @enum {string}\n * @private\n */\ngoog.i18n.uChar.RemoteNameFetcher.RequestType_ = {\n\n /**\n * Request type that uses a base 88 string containing a set of codepoints to\n * be fetched from the server (see goog.i18n.charpickerdata for more\n * information on b88).\n */\n BASE_88: 'b88',\n\n /**\n * Request type that uses a a string of comma separated codepoint values.\n */\n CODEPOINT: 'c'\n};\n\n\n/**\n * Fetches a set of codepoint names from the data source.\n *\n * @param {!goog.i18n.uChar.RemoteNameFetcher.RequestType_} requestType The\n * request type of the operation. This parameter specifies how the server is\n * called to fetch a particular set of codepoints.\n * @param {string} requestInput The input to the request, this is the value that\n * is passed onto the server to complete the request.\n * @param {!goog.net.XhrIo} xhrIo The XHRIo object to execute the server call.\n * @private\n */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.fetch_ = function(\n requestType, requestInput, xhrIo) {\n var url = new goog.Uri(this.dataSourceUri_);\n url.setParameterValue(requestType, requestInput);\n url.setParameterValue('p', 'name');\n goog.log.info(\n goog.i18n.uChar.RemoteNameFetcher.logger_, 'Request: ' + url.toString());\n xhrIo.send(url);\n};\n\n\n/** @override */\ngoog.i18n.uChar.RemoteNameFetcher.prototype.isNameAvailable = function(\n character) {\n return true;\n};\n","^;",1592063303606,"^<",["^=",["~$goog.net.XhrIo","~$goog.Uri","^?","~$goog.i18n.uChar","~$goog.log","~$goog.net.EventType","~$goog.Disposable","~$goog.i18n.uChar.NameFetcher","~$goog.events"]],"^@",["^ ","^A","The Google Closure Library is a collection of JavaScript code\n designed for use with the Google Closure JavaScript Compiler.\n\n This non-official distribution was prepared by the ClojureScript\n team at http://clojure.org/","^B","^C","^D","^E","^F","Google Closure Library","^G","^H","^I","http://code.google.com/p/closure-library/","^J","^K","^L",["^H","0.0-20191016-6ae1f72f"],"^M","0.0-20191016-6ae1f72f"],"^N",["^ ","^O",[],"^P",false,"^Q",[],"^R",[],"^S",["goog.i18n.uChar.RemoteNameFetcher"],"^T","es3","^U",null,"^V",[],"^W",["goog.Disposable","goog.Uri","goog.events","goog.i18n.uChar","goog.i18n.uChar.NameFetcher","goog.log","goog.net.EventType","goog.net.XhrIo"],"^X",false,"^Y",false],"^I",["^Z","jar:file:/home/justin/.m2/repository/org/clojure/google-closure-library/0.0-20191016-6ae1f72f/google-closure-library-0.0-20191016-6ae1f72f.jar!/goog/i18n/uchar/remotenamefetcher.js"],"^[",["^=",["~$goog.i18n.uChar.RemoteNameFetcher"]],"^17",true,"^18",["^?","^1F","^1B","^1H","^1C","^1G","^1D","^1E","^1A"]],["^ ","^3",["6025affb7181cd40418600864f58eed1ea80055d"],"^4","goog.editor.seamlessfield.js","^5",["^6","goog/editor/seamlessfield.js"],"^7","goog/editor/seamlessfield.js","^8","^9","^:","// Copyright 2006 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS-IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @fileoverview Class to encapsulate an editable field that blends in with\n * the style of the page. The field can be fixed height, grow with its\n * contents, or have a min height after which it grows to its contents.\n * This is a goog.editor.Field, but with blending and sizing capabilities,\n * and avoids using an iframe whenever possible.\n *\n * @author nicksantos@google.com (Nick Santos)\n * @see ../demos/editor/seamlessfield.html\n */\n\n\ngoog.provide('goog.editor.SeamlessField');\n\ngoog.require('goog.cssom.iframe.style');\ngoog.require('goog.dom');\ngoog.require('goog.dom.Range');\ngoog.require('goog.dom.TagName');\ngoog.require('goog.dom.safe');\ngoog.require('goog.editor.BrowserFeature');\ngoog.require('goog.editor.Field');\ngoog.require('goog.editor.icontent');\ngoog.require('goog.editor.icontent.FieldFormatInfo');\ngoog.require('goog.editor.icontent.FieldStyleInfo');\ngoog.require('goog.editor.node');\ngoog.require('goog.events');\ngoog.require('goog.events.EventType');\ngoog.require('goog.html.SafeHtml');\ngoog.require('goog.log');\ngoog.require('goog.style');\n\n\n\n/**\n * This class encapsulates an editable field that blends in with the\n * surrounding page.\n * To see events fired by this object, please see the base class.\n *\n * @param {string} id An identifer for the field. This is used to find the\n * field and the element associated with this field.\n * @param {Document=} opt_doc The document that the element with the given\n * id can be found it.\n * @constructor\n * @extends {goog.editor.Field}\n */\ngoog.editor.SeamlessField = function(id, opt_doc) {\n goog.editor.Field.call(this, id, opt_doc);\n};\ngoog.inherits(goog.editor.SeamlessField, goog.editor.Field);\n\n\n/**\n * @override\n */\ngoog.editor.SeamlessField.prototype.logger =\n goog.log.getLogger('goog.editor.SeamlessField');\n\n// Functions dealing with field sizing.\n\n\n/**\n * The key used for listening for the \"dragover\" event.\n * @type {goog.events.Key}\n * @private\n */\ngoog.editor.SeamlessField.prototype.listenForDragOverEventKey_;\n\n\n/**\n * The key used for listening for the iframe \"load\" event.\n * @type {goog.events.Key}\n * @private\n */\ngoog.editor.SeamlessField.prototype.listenForIframeLoadEventKey_;\n\n\n/**\n * Sets the min height of this editable field's iframe. Only used in growing\n * mode when an iframe is used. This will cause an immediate field sizing to\n * update the field if necessary based on the new min height.\n * @param {number} height The min height specified as a number of pixels,\n * e.g., 75.\n */\ngoog.editor.SeamlessField.prototype.setMinHeight = function(height) {\n if (height == this.minHeight_) {\n // Do nothing if the min height isn't changing.\n return;\n }\n this.minHeight_ = height;\n if (this.usesIframe()) {\n this.doFieldSizingGecko();\n }\n};\n\n\n/**\n * Whether the field should be rendered with a fixed height, or should expand\n * to fit its contents.\n * @type {boolean}\n * @private\n */\ngoog.editor.SeamlessField.prototype.isFixedHeight_ = false;\n\n\n/**\n * Whether the fixed-height handling has been overridden manually.\n * @type {boolean}\n * @private\n */\ngoog.editor.SeamlessField.prototype.isFixedHeightOverridden_ = false;\n\n\n/**\n * @return {boolean} Whether the field should be rendered with a fixed\n * height, or should expand to fit its contents.\n * @override\n */\ngoog.editor.SeamlessField.prototype.isFixedHeight = function() {\n return this.isFixedHeight_;\n};\n\n\n/**\n * @param {boolean} newVal Explicitly set whether the field should be\n * of a fixed-height. This overrides auto-detection.\n */\ngoog.editor.SeamlessField.prototype.overrideFixedHeight = function(newVal) {\n this.isFixedHeight_ = newVal;\n this.isFixedHeightOverridden_ = true;\n};\n\n\n/**\n * Auto-detect whether the current field should have a fixed height.\n * @private\n */\ngoog.editor.SeamlessField.prototype.autoDetectFixedHeight_ = function() {\n if (!this.isFixedHeightOverridden_) {\n var originalElement = this.getOriginalElement();\n if (originalElement) {\n this.isFixedHeight_ =\n goog.style.getComputedOverflowY(originalElement) == 'auto';\n }\n }\n};\n\n\n/**\n * Resize the iframe in response to the wrapper div changing size.\n * @private\n */\ngoog.editor.SeamlessField.prototype.handleOuterDocChange_ = function() {\n if (this.isEventStopped(goog.editor.Field.EventType.CHANGE)) {\n return;\n }\n this.sizeIframeToWrapperGecko_();\n};\n\n\n/**\n * Sizes the iframe to its body's height.\n * @private\n */\ngoog.editor.SeamlessField.prototype.sizeIframeToBodyHeightGecko_ = function() {\n if (this.acquireSizeIframeLockGecko_()) {\n var resized = false;\n var ifr = this.getEditableIframe();\n if (ifr) {\n var fieldHeight = this.getIframeBodyHeightGecko_();\n\n if (this.minHeight_) {\n fieldHeight = Math.max(fieldHeight, this.minHeight_);\n }\n if (parseInt(goog.style.getStyle(ifr, 'height'), 10) != fieldHeight) {\n ifr.style.height = fieldHeight + 'px';\n resized = true;\n }\n }\n this.releaseSizeIframeLockGecko_();\n if (resized) {\n this.dispatchEvent(goog.editor.Field.EventType.IFRAME_RESIZED);\n }\n }\n};\n\n\n/**\n * @return {number} The height of the editable iframe's body.\n * @private\n */\ngoog.editor.SeamlessField.prototype.getIframeBodyHeightGecko_ = function() {\n var ifr = this.getEditableIframe();\n var body = ifr.contentDocument.body;\n var htmlElement = /** @type {!HTMLElement} */ (body.parentNode);\n\n\n // If the iframe's height is 0, then the offsetHeight/scrollHeight of the\n // HTML element in the iframe can be totally wack (i.e. too large\n // by 50-500px). Also, in standard's mode the clientHeight is 0.\n if (parseInt(goog.style.getStyle(ifr, 'height'), 10) === 0) {\n goog.style.setStyle(ifr, 'height', 1 + 'px');\n }\n\n var fieldHeight;\n if (goog.editor.node.isStandardsMode(body)) {\n // If in standards-mode,\n // grab the HTML element as it will contain all the field's\n // contents. The body's height, for example, will not include that of\n // floated images at the bottom in standards mode.\n // Note that this value include all scrollbars *except* for scrollbars\n // on the HTML element itself.\n fieldHeight = htmlElement.offsetHeight;\n } else {\n // In quirks-mode, the body-element always seems\n // to size to the containing window. The html-element however,\n // sizes to the content, and can thus end up with a value smaller\n // than its child body-element if the content is shrinking.\n // We want to make the iframe shrink too when the content shrinks,\n // so rather than size the iframe to the body-element, size it to\n // the html-element.\n fieldHeight = htmlElement.scrollHeight;\n\n // If there is a horizontal scroll, add in the thickness of the\n // scrollbar.\n if (htmlElement.clientHeight != htmlElement.offsetHeight) {\n fieldHeight += goog.editor.SeamlessField.getScrollbarWidth_();\n }\n }\n\n return fieldHeight;\n};\n\n\n/**\n * Grabs the width of a scrollbar from the browser and caches the result.\n * @return {number} The scrollbar width in pixels.\n * @private\n */\ngoog.editor.SeamlessField.getScrollbarWidth_ = function() {\n return goog.editor.SeamlessField.scrollbarWidth_ ||\n (goog.editor.SeamlessField.scrollbarWidth_ =\n goog.style.getScrollbarWidth());\n};\n\n\n/**\n * Sizes the iframe to its container div's width. The width of the div\n * is controlled by its containing context, not by its contents.\n * if it extends outside of it's contents, then it gets a horizontal scroll.\n * @private\n */\ngoog.editor.SeamlessField.prototype.sizeIframeToWrapperGecko_ = function() {\n if (this.acquireSizeIframeLockGecko_()) {\n var ifr = this.getEditableIframe();\n var field = this.getElement();\n var resized = false;\n if (ifr && field) {\n var fieldPaddingBox;\n var widthDiv = /** @type {!HTMLElement} */ (ifr.parentNode);\n\n var width = widthDiv.offsetWidth;\n if (parseInt(goog.style.getStyle(ifr, 'width'), 10) != width) {\n fieldPaddingBox = goog.style.getPaddingBox(field);\n ifr.style.width = width + 'px';\n field.style.width =\n width - fieldPaddingBox.left - fieldPaddingBox.right + 'px';\n resized = true;\n }\n\n var height = widthDiv.offsetHeight;\n if (this.isFixedHeight() &&\n parseInt(goog.style.getStyle(ifr, 'height'), 10) != height) {\n if (!fieldPaddingBox) {\n fieldPaddingBox = goog.style.getPaddingBox(field);\n }\n ifr.style.height = height + 'px';\n field.style.height =\n height - fieldPaddingBox.top - fieldPaddingBox.bottom + 'px';\n resized = true;\n }\n }\n this.releaseSizeIframeLockGecko_();\n if (resized) {\n this.dispatchEvent(goog.editor.Field.EventType.IFRAME_RESIZED);\n }\n }\n};\n\n\n/**\n * Perform all the sizing immediately.\n */\ngoog.editor.SeamlessField.prototype.doFieldSizingGecko = function() {\n // Because doFieldSizingGecko can be called after a setTimeout\n // it is possible that the field has been destroyed before this call\n // to do the sizing is executed. Check for field existence and do nothing\n // if it has already been destroyed.\n if (this.getElement()) {\n // The order of operations is important here. Sizing the iframe to the\n // wrapper could cause the width to change, which could change the line\n // wrapping, which could change the body height. So we need to do that\n // first, then size the iframe to fit the body height.\n this.sizeIframeToWrapperGecko_();\n if (!this.isFixedHeight()) {\n this.sizeIframeToBodyHeightGecko_();\n }\n }\n};\n\n\n/**\n * Acquires a lock on resizing the field iframe. This is used to ensure that\n * modifications we make while in a mutation event handler don't cause\n * infinite loops.\n * @return {boolean} False if the lock is already acquired.\n * @private\n */\ngoog.editor.SeamlessField.prototype.acquireSizeIframeLockGecko_ = function() {\n if (this.sizeIframeLock_) {\n return false;\n }\n return this.sizeIframeLock_ = true;\n};\n\n\n/**\n * Releases a lock on resizing the field iframe. This is used to ensure that\n * modifications we make while in a mutation event handler don't cause\n * infinite loops.\n * @private\n */\ngoog.editor.SeamlessField.prototype.releaseSizeIframeLockGecko_ = function() {\n this.sizeIframeLock_ = false;\n};\n\n\n// Functions dealing with blending in with the surrounding page.\n\n\n/**\n * String containing the css rules that, if applied to a document's body,\n * would style that body as if it were the original element we made editable.\n * See goog.cssom.iframe.style.getElementContext for more details.\n * @type {string}\n * @private\n */\ngoog.editor.SeamlessField.prototype.iframeableCss_ = '';\n\n\n/**\n * Gets the css rules that should be used to style an iframe's body as if it\n * were the original element that we made editable.\n * @param {boolean=} opt_forceRegeneration Set to true to not read the cached\n * copy and instead completely regenerate the css rules.\n * @return {string} The string containing the css rules to use.\n */\ngoog.editor.SeamlessField.prototype.getIframeableCss = function(\n opt_forceRegeneration) {\n if (!this.iframeableCss_ || opt_forceRegeneration) {\n var originalElement = this.getOriginalElement();\n if (originalElement) {\n this.iframeableCss_ = goog.cssom.iframe.style.getElementContext(\n originalElement, opt_forceRegeneration);\n }\n }\n return this.iframeableCss_;\n};\n\n\n/**\n * Sets the css rules that should be used inside the editable iframe.\n * Note: to clear the css cache between makeNotEditable/makeEditable,\n * call this with \"\" as iframeableCss.\n * TODO(user): Unify all these css setting methods + Nick's open\n * CL. This is getting ridiculous.\n * @param {string} iframeableCss String containing the css rules to use.\n */\ngoog.editor.SeamlessField.prototype.setIframeableCss = function(iframeableCss) {\n this.iframeableCss_ = iframeableCss;\n};\n\n\n/**\n * Used to ensure that CSS stylings are only installed once for none\n * iframe seamless mode.\n * TODO(user): Make it a formal part of the API that you can only\n * set one set of styles globally.\n * In seamless, non-iframe mode, all the stylings would go in the\n * same document and conflict.\n * @type {boolean}\n * @private\n */\ngoog.editor.SeamlessField.haveInstalledCss_ = false;\n\n\n// Overridden methods.\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.usesIframe = function() {\n // TODO(user): Switch Firefox to using contentEditable\n // rather than designMode iframe once contentEditable support\n // is less buggy.\n return !goog.editor.BrowserFeature.HAS_CONTENT_EDITABLE;\n};\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.setupMutationEventHandlersGecko =\n function() {\n goog.editor.SeamlessField.superClass_.setupMutationEventHandlersGecko.call(\n this);\n\n if (this.usesIframe()) {\n var iframe = this.getEditableIframe();\n var outerDoc = iframe.ownerDocument;\n this.eventRegister.listen(\n outerDoc, goog.editor.Field.MUTATION_EVENTS_GECKO,\n this.handleOuterDocChange_, true);\n\n // If the images load after we do the initial sizing, then this will\n // force a field resize.\n this.listenForIframeLoadEventKey_ = goog.events.listenOnce(\n this.getEditableDomHelper().getWindow(), goog.events.EventType.LOAD,\n this.sizeIframeToBodyHeightGecko_, true, this);\n\n this.eventRegister.listen(\n outerDoc, 'DOMAttrModified',\n goog.bind(this.handleDomAttrChange, this, this.handleOuterDocChange_),\n true);\n }\n};\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.handleChange = function() {\n if (this.isEventStopped(goog.editor.Field.EventType.CHANGE)) {\n return;\n }\n\n goog.editor.SeamlessField.superClass_.handleChange.call(this);\n\n if (this.usesIframe()) {\n this.sizeIframeToBodyHeightGecko_();\n }\n};\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.dispatchBlur = function() {\n if (this.isEventStopped(goog.editor.Field.EventType.BLUR)) {\n return;\n }\n\n goog.editor.SeamlessField.superClass_.dispatchBlur.call(this);\n\n // Clear the selection and restore the current range back after collapsing\n // it. The ideal solution would have been to just leave the range intact; but\n // when there are multiple fields present on the page, its important that\n // the selection isn't retained when we switch between the fields. We also\n // have to make sure that the cursor position is retained when we tab in and\n // out of a field and our approach addresses both these issues.\n // Another point to note is that we do it on a setTimeout to allow for\n // DOM modifications on blur. Otherwise, something like setLoremIpsum will\n // leave a blinking cursor in the field even though it's blurred.\n if (!goog.editor.BrowserFeature.HAS_CONTENT_EDITABLE &&\n !goog.editor.BrowserFeature.CLEARS_SELECTION_WHEN_FOCUS_LEAVES) {\n var win = this.getEditableDomHelper().getWindow();\n var dragging = false;\n goog.events.unlistenByKey(this.listenForDragOverEventKey_);\n this.listenForDragOverEventKey_ = goog.events.listenOnce(\n win.document.body, 'dragover', function() { dragging = true; });\n goog.global.setTimeout(goog.bind(function() {\n // Do not clear the selection if we're only dragging text.\n // This addresses a bug on FF1.5/linux where dragging fires a blur,\n // but clearing the selection confuses Firefox's drag-and-drop\n // implementation. For more info, see http://b/1061064\n if (!dragging) {\n if (this.editableDomHelper) {\n var rng = this.getRange();\n\n // If there are multiple fields on a page, we need to make sure that\n // the selection isn't retained when we switch between fields. We\n // could have collapsed the range but there is a bug in GECKO where\n // the selection stays highlighted even though its backing range is\n // collapsed (http://b/1390115). To get around this, we clear the\n // selection and restore the collapsed range back in. Restoring the\n // range is important so that the cursor stays intact when we tab out\n // and into a field (See http://b/1790301 for additional details on\n // this).\n var iframeWindow = this.editableDomHelper.getWindow();\n goog.dom.Range.clearSelection(iframeWindow);\n\n if (rng) {\n rng.collapse(true);\n rng.select();\n }\n }\n }\n }, this), 0);\n }\n};\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.turnOnDesignModeGecko = function() {\n goog.editor.SeamlessField.superClass_.turnOnDesignModeGecko.call(this);\n var doc = this.getEditableDomHelper().getDocument();\n\n doc.execCommand('enableInlineTableEditing', false, 'false');\n doc.execCommand('enableObjectResizing', false, 'false');\n};\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.installStyles = function() {\n if (!this.usesIframe()) {\n if (!goog.editor.SeamlessField.haveInstalledCss_) {\n if (this.cssStyles.getTypedStringValue()) {\n goog.style.installSafeStyleSheet(this.cssStyles, this.getElement());\n }\n\n // TODO(user): this should be reset to false when the editor is quit.\n // In non-iframe mode, CSS styles should only be instaled once.\n goog.editor.SeamlessField.haveInstalledCss_ = true;\n }\n }\n};\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.makeEditableInternal = function(\n opt_iframeSrc) {\n if (this.usesIframe()) {\n goog.editor.SeamlessField.superClass_.makeEditableInternal.call(\n this, opt_iframeSrc);\n } else {\n var field = this.getOriginalElement();\n if (field) {\n this.setupFieldObject(field);\n field.contentEditable = true;\n\n this.injectContents(field.innerHTML, field);\n\n this.handleFieldLoad();\n }\n }\n};\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.handleFieldLoad = function() {\n if (this.usesIframe()) {\n // If the CSS inheriting code screws up (e.g. makes fonts too large) and\n // the field is sized off in goog.editor.Field.makeIframeField, then we need\n // to size it correctly, but it needs to be visible for the browser\n // to have fully rendered it. We need to put this on a timeout to give\n // the browser time to render.\n var self = this;\n goog.global.setTimeout(function() { self.doFieldSizingGecko(); }, 0);\n }\n goog.editor.SeamlessField.superClass_.handleFieldLoad.call(this);\n};\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.getIframeAttributes = function() {\n return {'frameBorder': 0, 'style': 'padding:0;'};\n};\n\n\n/** @override */\ngoog.editor.SeamlessField.prototype.attachIframe = function(iframe) {\n this.autoDetectFixedHeight_();\n var field = this.getOriginalElement();\n var dh = goog.dom.getDomHelper(field);\n\n // Grab the width/height values of the field before modifying any CSS\n // as some of the modifications affect its size (e.g. innerHTML='')\n // Here, we set the size of the field to fixed so there's not too much\n // jiggling when we set the innerHTML of the field.\n var oldWidth = field.style.width;\n var oldHeight = field.style.height;\n goog.style.setStyle(field, 'visibility', 'hidden');\n\n // If there is a floated element at the bottom of the field,\n // then it needs a clearing div at the end to cause the clientHeight\n // to contain the entire field.\n // Also, with css re-writing, the margins of the first/last\n // paragraph don't seem to get included in the clientHeight. Specifically,\n // the extra divs below force the field's clientHeight to include the\n // margins on the first and last elements contained within it.\n var startDiv = dh.createDom(\n goog.dom.TagName.DIV,\n {'style': 'height:0;clear:both', 'innerHTML': '&nbsp;'});\n var endDiv = startDiv.cloneNode(true);\n field.insertBefore(startDiv, field.firstChild);\n goog.dom.appendChild(field, endDiv);\n\n var contentBox = goog.style.getContentBoxSize(field);\n var width = contentBox.width;\n var height = contentBox.height;\n\n var html = '';\n if (this.isFixedHeight()) {\n html = '&nbsp;';\n\n goog.style.setStyle(field, 'position', 'relative');\n goog.style.setStyle(field, 'overflow', 'visible');\n\n goog.style.setStyle(iframe, 'position', 'absolute');\n goog.style.setStyle(iframe, 'top', '0');\n goog.style.setStyle(iframe, 'left', '0');\n }\n goog.style.setSize(field, width, height);\n\n // In strict mode, browsers put blank space at the bottom and right\n // if a field when it has an iframe child, to fill up the remaining line\n // height. So make the line height = 0.\n if (goog.editor.node.isStandardsMode(field)) {\n this.originalFieldLineHeight_ = field.style.lineHeight;\n goog.style.setStyle(field, 'lineHeight', '0');\n }\n\n goog.editor.node.replaceInnerHtml(field, html);\n // Set the initial size\n goog.style.setSize(iframe, width, height);\n goog.style.setSize(field, oldWidth, oldHeight);\n goog.style.setStyle(field, 'visibility', '');\n goog.dom.appendChild(field, iframe);\n\n // Only write if its not IE HTTPS in which case we're waiting for load.\n if (!this.shouldLoadAsynchronously()) {\n var doc = iframe.contentWindow.document;\n if (goog.editor.node.isStandardsMode(iframe.ownerDocument)) {\n doc.open();\n var emptyHtml = goog.html.SafeHtml.concat(\n goog.html.SafeHtml.DOCTYPE_HTML, goog.html.SafeHtml.create('html'));\n goog.dom.safe.documentWrite(doc, e