| Server IP : 162.214.74.102 / Your IP : 216.73.216.139 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/www/lrsys_projetos/sopizzas/build/history-base/ |
Upload File : |
if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
if (!__coverage__['build/history-base/history-base.js']) {
__coverage__['build/history-base/history-base.js'] = {"path":"build/history-base/history-base.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0},"b":{"1":[0,0],"2":[0,0,0,0,0,0,0],"3":[0,0,0,0],"4":[0,0],"5":[0,0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":43}}},"2":{"name":"HistoryBase","line":57,"loc":{"start":{"line":57,"column":0},"end":{"line":57,"column":23}}},"3":{"name":"_isSimpleObject","line":83,"loc":{"start":{"line":83,"column":0},"end":{"line":83,"column":32}}},"4":{"name":"(anonymous_4)","line":168,"loc":{"start":{"line":168,"column":11},"end":{"line":168,"column":29}}},"5":{"name":"(anonymous_5)","line":294,"loc":{"start":{"line":294,"column":9},"end":{"line":294,"column":21}}},"6":{"name":"(anonymous_6)","line":314,"loc":{"start":{"line":314,"column":14},"end":{"line":314,"column":45}}},"7":{"name":"(anonymous_7)","line":330,"loc":{"start":{"line":330,"column":9},"end":{"line":330,"column":24}}},"8":{"name":"(anonymous_8)","line":352,"loc":{"start":{"line":352,"column":13},"end":{"line":352,"column":25}}},"9":{"name":"(anonymous_9)","line":370,"loc":{"start":{"line":370,"column":18},"end":{"line":370,"column":49}}},"10":{"name":"(anonymous_10)","line":391,"loc":{"start":{"line":391,"column":13},"end":{"line":391,"column":44}}},"11":{"name":"(anonymous_11)","line":415,"loc":{"start":{"line":415,"column":17},"end":{"line":415,"column":50}}},"12":{"name":"(anonymous_12)","line":427,"loc":{"start":{"line":427,"column":34},"end":{"line":427,"column":56}}},"13":{"name":"(anonymous_13)","line":431,"loc":{"start":{"line":431,"column":34},"end":{"line":431,"column":56}}},"14":{"name":"(anonymous_14)","line":447,"loc":{"start":{"line":447,"column":22},"end":{"line":447,"column":49}}},"15":{"name":"(anonymous_15)","line":505,"loc":{"start":{"line":505,"column":22},"end":{"line":505,"column":49}}},"16":{"name":"(anonymous_16)","line":558,"loc":{"start":{"line":558,"column":21},"end":{"line":558,"column":55}}},"17":{"name":"(anonymous_17)","line":569,"loc":{"start":{"line":569,"column":31},"end":{"line":569,"column":54}}},"18":{"name":"(anonymous_18)","line":583,"loc":{"start":{"line":583,"column":32},"end":{"line":583,"column":56}}},"19":{"name":"(anonymous_19)","line":616,"loc":{"start":{"line":616,"column":17},"end":{"line":616,"column":42}}},"20":{"name":"(anonymous_20)","line":631,"loc":{"start":{"line":631,"column":18},"end":{"line":631,"column":31}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":639,"column":56}},"2":{"start":{"line":43,"column":0},"end":{"line":55,"column":32}},"3":{"start":{"line":57,"column":0},"end":{"line":59,"column":1}},"4":{"start":{"line":58,"column":4},"end":{"line":58,"column":38}},"5":{"start":{"line":61,"column":0},"end":{"line":66,"column":3}},"6":{"start":{"line":68,"column":0},"end":{"line":70,"column":1}},"7":{"start":{"line":69,"column":4},"end":{"line":69,"column":26}},"8":{"start":{"line":83,"column":0},"end":{"line":85,"column":1}},"9":{"start":{"line":84,"column":4},"end":{"line":84,"column":41}},"10":{"start":{"line":96,"column":0},"end":{"line":96,"column":33}},"11":{"start":{"line":107,"column":0},"end":{"line":107,"column":30}},"12":{"start":{"line":118,"column":0},"end":{"line":118,"column":38}},"13":{"start":{"line":131,"column":0},"end":{"line":133,"column":48}},"14":{"start":{"line":154,"column":0},"end":{"line":155,"column":34}},"15":{"start":{"line":157,"column":0},"end":{"line":634,"column":9}},"16":{"start":{"line":169,"column":8},"end":{"line":169,"column":25}},"17":{"start":{"line":180,"column":8},"end":{"line":180,"column":45}},"18":{"start":{"line":190,"column":9},"end":{"line":190,"column":37}},"19":{"start":{"line":204,"column":8},"end":{"line":205,"column":44}},"20":{"start":{"line":254,"column":8},"end":{"line":257,"column":11}},"21":{"start":{"line":260,"column":8},"end":{"line":262,"column":9}},"22":{"start":{"line":261,"column":12},"end":{"line":261,"column":39}},"23":{"start":{"line":295,"column":8},"end":{"line":295,"column":46}},"24":{"start":{"line":296,"column":8},"end":{"line":296,"column":30}},"25":{"start":{"line":297,"column":8},"end":{"line":297,"column":46}},"26":{"start":{"line":315,"column":8},"end":{"line":315,"column":23}},"27":{"start":{"line":316,"column":8},"end":{"line":316,"column":27}},"28":{"start":{"line":317,"column":8},"end":{"line":317,"column":53}},"29":{"start":{"line":331,"column":8},"end":{"line":332,"column":46}},"30":{"start":{"line":334,"column":8},"end":{"line":338,"column":9}},"31":{"start":{"line":335,"column":12},"end":{"line":335,"column":77}},"32":{"start":{"line":337,"column":12},"end":{"line":337,"column":61}},"33":{"start":{"line":353,"column":8},"end":{"line":353,"column":46}},"34":{"start":{"line":354,"column":8},"end":{"line":354,"column":34}},"35":{"start":{"line":355,"column":8},"end":{"line":355,"column":46}},"36":{"start":{"line":371,"column":8},"end":{"line":371,"column":23}},"37":{"start":{"line":372,"column":8},"end":{"line":372,"column":27}},"38":{"start":{"line":373,"column":8},"end":{"line":373,"column":57}},"39":{"start":{"line":392,"column":8},"end":{"line":392,"column":80}},"40":{"start":{"line":394,"column":8},"end":{"line":397,"column":9}},"41":{"start":{"line":396,"column":12},"end":{"line":396,"column":53}},"42":{"start":{"line":399,"column":8},"end":{"line":399,"column":50}},"43":{"start":{"line":400,"column":8},"end":{"line":400,"column":20}},"44":{"start":{"line":417,"column":8},"end":{"line":424,"column":11}},"45":{"start":{"line":427,"column":8},"end":{"line":429,"column":17}},"46":{"start":{"line":428,"column":12},"end":{"line":428,"column":51}},"47":{"start":{"line":431,"column":8},"end":{"line":433,"column":17}},"48":{"start":{"line":432,"column":12},"end":{"line":432,"column":51}},"49":{"start":{"line":488,"column":8},"end":{"line":492,"column":11}},"50":{"start":{"line":539,"column":8},"end":{"line":542,"column":11}},"51":{"start":{"line":559,"column":8},"end":{"line":562,"column":27}},"52":{"start":{"line":564,"column":8},"end":{"line":564,"column":36}},"53":{"start":{"line":565,"column":8},"end":{"line":565,"column":36}},"54":{"start":{"line":567,"column":8},"end":{"line":592,"column":9}},"55":{"start":{"line":569,"column":12},"end":{"line":580,"column":21}},"56":{"start":{"line":570,"column":16},"end":{"line":570,"column":45}},"57":{"start":{"line":572,"column":16},"end":{"line":579,"column":17}},"58":{"start":{"line":573,"column":20},"end":{"line":576,"column":22}},"59":{"start":{"line":578,"column":20},"end":{"line":578,"column":37}},"60":{"start":{"line":583,"column":12},"end":{"line":589,"column":21}},"61":{"start":{"line":584,"column":16},"end":{"line":588,"column":17}},"62":{"start":{"line":585,"column":20},"end":{"line":585,"column":41}},"63":{"start":{"line":586,"column":20},"end":{"line":586,"column":43}},"64":{"start":{"line":587,"column":20},"end":{"line":587,"column":37}},"65":{"start":{"line":591,"column":12},"end":{"line":591,"column":47}},"66":{"start":{"line":594,"column":8},"end":{"line":601,"column":9}},"67":{"start":{"line":595,"column":12},"end":{"line":600,"column":24}},"68":{"start":{"line":619,"column":8},"end":{"line":619,"column":42}},"69":{"start":{"line":632,"column":8},"end":{"line":632,"column":54}},"70":{"start":{"line":636,"column":0},"end":{"line":636,"column":28}}},"branchMap":{"1":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":0},"end":{"line":68,"column":0}},{"start":{"line":68,"column":0},"end":{"line":68,"column":0}}]},"2":{"line":131,"type":"binary-expr","locations":[{"start":{"line":131,"column":23},"end":{"line":131,"column":34}},{"start":{"line":131,"column":38},"end":{"line":131,"column":59}},{"start":{"line":132,"column":8},"end":{"line":132,"column":32}},{"start":{"line":132,"column":37},"end":{"line":132,"column":56}},{"start":{"line":132,"column":60},"end":{"line":132,"column":75}},{"start":{"line":133,"column":9},"end":{"line":133,"column":22}},{"start":{"line":133,"column":26},"end":{"line":133,"column":45}}]},"3":{"line":154,"type":"binary-expr","locations":[{"start":{"line":154,"column":32},"end":{"line":154,"column":53}},{"start":{"line":154,"column":57},"end":{"line":154,"column":78}},{"start":{"line":155,"column":9},"end":{"line":155,"column":17}},{"start":{"line":155,"column":21},"end":{"line":155,"column":32}}]},"4":{"line":180,"type":"binary-expr","locations":[{"start":{"line":180,"column":32},"end":{"line":180,"column":38}},{"start":{"line":180,"column":42},"end":{"line":180,"column":44}}]},"5":{"line":204,"type":"binary-expr","locations":[{"start":{"line":204,"column":44},"end":{"line":204,"column":62}},{"start":{"line":205,"column":16},"end":{"line":205,"column":35}},{"start":{"line":205,"column":39},"end":{"line":205,"column":43}}]},"6":{"line":260,"type":"if","locations":[{"start":{"line":260,"column":8},"end":{"line":260,"column":8}},{"start":{"line":260,"column":8},"end":{"line":260,"column":8}}]},"7":{"line":334,"type":"if","locations":[{"start":{"line":334,"column":8},"end":{"line":334,"column":8}},{"start":{"line":334,"column":8},"end":{"line":334,"column":8}}]},"8":{"line":335,"type":"cond-expr","locations":[{"start":{"line":335,"column":54},"end":{"line":335,"column":64}},{"start":{"line":335,"column":67},"end":{"line":335,"column":76}}]},"9":{"line":335,"type":"binary-expr","locations":[{"start":{"line":335,"column":19},"end":{"line":335,"column":27}},{"start":{"line":335,"column":31},"end":{"line":335,"column":51}}]},"10":{"line":337,"type":"cond-expr","locations":[{"start":{"line":337,"column":30},"end":{"line":337,"column":52}},{"start":{"line":337,"column":55},"end":{"line":337,"column":60}}]},"11":{"line":392,"type":"cond-expr","locations":[{"start":{"line":392,"column":28},"end":{"line":392,"column":61}},{"start":{"line":392,"column":64},"end":{"line":392,"column":79}}]},"12":{"line":394,"type":"if","locations":[{"start":{"line":394,"column":8},"end":{"line":394,"column":8}},{"start":{"line":394,"column":8},"end":{"line":394,"column":8}}]},"13":{"line":394,"type":"binary-expr","locations":[{"start":{"line":394,"column":12},"end":{"line":394,"column":25}},{"start":{"line":394,"column":29},"end":{"line":394,"column":51}},{"start":{"line":395,"column":16},"end":{"line":395,"column":49}}]},"14":{"line":564,"type":"binary-expr","locations":[{"start":{"line":564,"column":8},"end":{"line":564,"column":16}},{"start":{"line":564,"column":21},"end":{"line":564,"column":34}}]},"15":{"line":565,"type":"binary-expr","locations":[{"start":{"line":565,"column":8},"end":{"line":565,"column":15}},{"start":{"line":565,"column":21},"end":{"line":565,"column":34}}]},"16":{"line":567,"type":"if","locations":[{"start":{"line":567,"column":8},"end":{"line":567,"column":8}},{"start":{"line":567,"column":8},"end":{"line":567,"column":8}}]},"17":{"line":567,"type":"binary-expr","locations":[{"start":{"line":567,"column":12},"end":{"line":567,"column":37}},{"start":{"line":567,"column":41},"end":{"line":567,"column":67}}]},"18":{"line":572,"type":"if","locations":[{"start":{"line":572,"column":16},"end":{"line":572,"column":16}},{"start":{"line":572,"column":16},"end":{"line":572,"column":16}}]},"19":{"line":584,"type":"if","locations":[{"start":{"line":584,"column":16},"end":{"line":584,"column":16}},{"start":{"line":584,"column":16},"end":{"line":584,"column":16}}]},"20":{"line":584,"type":"binary-expr","locations":[{"start":{"line":584,"column":20},"end":{"line":584,"column":44}},{"start":{"line":584,"column":48},"end":{"line":584,"column":70}}]},"21":{"line":594,"type":"if","locations":[{"start":{"line":594,"column":8},"end":{"line":594,"column":8}},{"start":{"line":594,"column":8},"end":{"line":594,"column":8}}]},"22":{"line":594,"type":"binary-expr","locations":[{"start":{"line":594,"column":12},"end":{"line":594,"column":21}},{"start":{"line":594,"column":25},"end":{"line":594,"column":35}}]},"23":{"line":619,"type":"binary-expr","locations":[{"start":{"line":619,"column":27},"end":{"line":619,"column":35}},{"start":{"line":619,"column":39},"end":{"line":619,"column":41}}]}},"code":["(function () { YUI.add('history-base', function (Y, NAME) {","","/**"," * Provides browser history management functionality using a simple"," * add/replace/get paradigm. This can be used to ensure that the browser's back"," * and forward buttons work as the user expects and to provide bookmarkable URLs"," * that return the user to the current application state, even in an Ajax"," * application that doesn't perform full-page refreshes."," *"," * @module history"," * @main history"," * @since 3.2.0"," */","","/**"," * Provides global state management backed by an object, but with no browser"," * history integration. For actual browser history integration and back/forward"," * support, use the history-html5 or history-hash modules."," *"," * @module history"," * @submodule history-base"," * @class HistoryBase"," * @uses EventTarget"," * @constructor"," * @param {Object} config (optional) configuration object, which may contain"," * zero or more of the following properties:"," *"," * <dl>"," * <dt>force (Boolean)</dt>"," * <dd>"," * If `true`, a `history:change` event will be fired whenever the URL"," * changes, even if there is no associated state change. Default is `false`."," * </dd>"," *"," * <dt>initialState (Object)</dt>"," * <dd>"," * Initial state to set, as an object hash of key/value pairs. This will be"," * merged into the current global state."," * </dd>"," * </dl>"," */","","var Lang = Y.Lang,"," Obj = Y.Object,"," GlobalEnv = YUI.namespace('Env.History'),"," YArray = Y.Array,",""," doc = Y.config.doc,"," docMode = doc.documentMode,"," win = Y.config.win,",""," DEFAULT_OPTIONS = {merge: true},"," EVT_CHANGE = 'change',"," SRC_ADD = 'add',"," SRC_REPLACE = 'replace';","","function HistoryBase() {"," this._init.apply(this, arguments);","}","","Y.augment(HistoryBase, Y.EventTarget, null, null, {"," emitFacade : true,"," prefix : 'history',"," preventable: false,"," queueable : true","});","","if (!GlobalEnv._state) {"," GlobalEnv._state = {};","}","","// -- Private Methods ----------------------------------------------------------","","/**"," * Returns <code>true</code> if <i>value</i> is a simple object and not a"," * function or an array."," *"," * @method _isSimpleObject"," * @param {mixed} value"," * @return {Boolean}"," * @private"," */","function _isSimpleObject(value) {"," return Lang.type(value) === 'object';","}","","// -- Public Static Properties -------------------------------------------------","","/**"," * Name of this component."," *"," * @property NAME"," * @type String"," * @static"," */","HistoryBase.NAME = 'historyBase';","","/**"," * Constant used to identify state changes originating from the"," * <code>add()</code> method."," *"," * @property SRC_ADD"," * @type String"," * @static"," * @final"," */","HistoryBase.SRC_ADD = SRC_ADD;","","/**"," * Constant used to identify state changes originating from the"," * <code>replace()</code> method."," *"," * @property SRC_REPLACE"," * @type String"," * @static"," * @final"," */","HistoryBase.SRC_REPLACE = SRC_REPLACE;","","/**"," * Whether or not this browser supports the HTML5 History API."," *"," * @property html5"," * @type Boolean"," * @static"," */","","// All HTML5-capable browsers except Gecko 2+ (Firefox 4+) correctly return","// true for 'onpopstate' in win. In order to support Gecko 2, we fall back to a","// UA sniff for now. (current as of Firefox 4.0b2)","HistoryBase.html5 = !!(win.history && win.history.pushState &&"," win.history.replaceState && ('onpopstate' in win || Y.UA.gecko >= 2) &&"," (!Y.UA.android || Y.UA.android >= 2.4));","","/**"," * Whether or not this browser supports the <code>window.onhashchange</code>"," * event natively. Note that even if this is <code>true</code>, you may"," * still want to use HistoryHash's synthetic <code>hashchange</code> event"," * since it normalizes implementation differences and fixes spec violations"," * across various browsers."," *"," * @property nativeHashChange"," * @type Boolean"," * @static"," */","","// Most browsers that support hashchange expose it on the window. Opera 10.6+","// exposes it on the document (but you can still attach to it on the window).","//","// IE8 supports the hashchange event, but only in IE8 Standards","// Mode. However, IE8 in IE7 compatibility mode still defines the","// event but never fires it, so we can't just detect the event. We also can't","// just UA sniff for IE8, since other browsers support this event as well.","HistoryBase.nativeHashChange = ('onhashchange' in win || 'onhashchange' in doc) &&"," (!docMode || docMode > 7);","","Y.mix(HistoryBase.prototype, {"," // -- Initialization -------------------------------------------------------",""," /**"," * Initializes this HistoryBase instance. This method is called by the"," * constructor."," *"," * @method _init"," * @param {Object} config configuration object"," * @protected"," */"," _init: function (config) {"," var initialState;",""," /**"," * Configuration object provided by the user on instantiation, or an"," * empty object if one wasn't provided."," *"," * @property _config"," * @type Object"," * @default {}"," * @protected"," */"," config = this._config = config || {};",""," /**"," * If `true`, a `history:change` event will be fired whenever the URL"," * changes, even if there is no associated state change."," *"," * @property force"," * @type Boolean"," * @default false"," */"," this.force = !!config.force;",""," /**"," * Resolved initial state: a merge of the user-supplied initial state"," * (if any) and any initial state provided by a subclass. This may"," * differ from <code>_config.initialState</code>. If neither the config"," * nor a subclass supplies an initial state, this property will be"," * <code>null</code>."," *"," * @property _initialState"," * @type Object|null"," * @default {}"," * @protected"," */"," initialState = this._initialState = this._initialState ||"," config.initialState || null;",""," /**"," * Fired when the state changes. To be notified of all state changes"," * regardless of the History or YUI instance that generated them,"," * subscribe to this event on <code>Y.Global</code>. If you would rather"," * be notified only about changes generated by this specific History"," * instance, subscribe to this event on the instance."," *"," * @event history:change"," * @param {EventFacade} e Event facade with the following additional"," * properties:"," *"," * <dl>"," * <dt>changed (Object)</dt>"," * <dd>"," * Object hash of state items that have been added or changed. The"," * key is the item key, and the value is an object containing"," * <code>newVal</code> and <code>prevVal</code> properties"," * representing the values of the item both before and after the"," * change. If the item was newly added, <code>prevVal</code> will be"," * <code>undefined</code>."," * </dd>"," *"," * <dt>newVal (Object)</dt>"," * <dd>"," * Object hash of key/value pairs of all state items after the"," * change."," * </dd>"," *"," * <dt>prevVal (Object)</dt>"," * <dd>"," * Object hash of key/value pairs of all state items before the"," * change."," * </dd>"," *"," * <dt>removed (Object)</dt>"," * <dd>"," * Object hash of key/value pairs of state items that have been"," * removed. Values are the old values prior to removal."," * </dd>"," *"," * <dt>src (String)</dt>"," * <dd>"," * The source of the event. This can be used to selectively ignore"," * events generated by certain sources."," * </dd>"," * </dl>"," */"," this.publish(EVT_CHANGE, {"," broadcast: 2,"," defaultFn: this._defChangeFn"," });",""," // If initialState was provided, merge it into the current state."," if (initialState) {"," this.replace(initialState);"," }"," },",""," // -- Public Methods -------------------------------------------------------",""," /**"," * Adds a state entry with new values for the specified keys. By default,"," * the new state will be merged into the existing state, and new values will"," * override existing values. Specifying a <code>null</code> or"," * <code>undefined</code> value will cause that key to be removed from the"," * new state entry."," *"," * @method add"," * @param {Object} state Object hash of key/value pairs."," * @param {Object} options (optional) Zero or more of the following options:"," * <dl>"," * <dt>merge (Boolean)</dt>"," * <dd>"," * <p>"," * If <code>true</code> (the default), the new state will be merged"," * into the existing state. New values will override existing values,"," * and <code>null</code> or <code>undefined</code> values will be"," * removed from the state."," * </p>"," * <p>"," * If <code>false</code>, the existing state will be discarded as a"," * whole and the new state will take its place."," * </p>"," * </dd>"," * </dl>"," * @chainable"," */"," add: function () {"," var args = YArray(arguments, 0, true);"," args.unshift(SRC_ADD);"," return this._change.apply(this, args);"," },",""," /**"," * Adds a state entry with a new value for a single key. By default, the new"," * value will be merged into the existing state values, and will override an"," * existing value with the same key if there is one. Specifying a"," * <code>null</code> or <code>undefined</code> value will cause the key to"," * be removed from the new state entry."," *"," * @method addValue"," * @param {String} key State parameter key."," * @param {String} value New value."," * @param {Object} options (optional) Zero or more options. See"," * <code>add()</code> for a list of supported options."," * @chainable"," */"," addValue: function (key, value, options) {"," var state = {};"," state[key] = value;"," return this._change(SRC_ADD, state, options);"," },",""," /**"," * Returns the current value of the state parameter specified by <i>key</i>,"," * or an object hash of key/value pairs for all current state parameters if"," * no key is specified."," *"," * @method get"," * @param {String} key (optional) State parameter key."," * @return {Object|String} Value of the specified state parameter, or an"," * object hash of key/value pairs for all current state parameters."," */"," get: function (key) {"," var state = GlobalEnv._state,"," isObject = _isSimpleObject(state);",""," if (key) {"," return isObject && Obj.owns(state, key) ? state[key] : undefined;"," } else {"," return isObject ? Y.mix({}, state, true) : state; // mix provides a fast shallow clone."," }"," },",""," /**"," * Same as <code>add()</code> except that a new browser history entry will"," * not be created. Instead, the current history entry will be replaced with"," * the new state."," *"," * @method replace"," * @param {Object} state Object hash of key/value pairs."," * @param {Object} options (optional) Zero or more options. See"," * <code>add()</code> for a list of supported options."," * @chainable"," */"," replace: function () {"," var args = YArray(arguments, 0, true);"," args.unshift(SRC_REPLACE);"," return this._change.apply(this, args);"," },",""," /**"," * Same as <code>addValue()</code> except that a new browser history entry"," * will not be created. Instead, the current history entry will be replaced"," * with the new state."," *"," * @method replaceValue"," * @param {String} key State parameter key."," * @param {String} value New value."," * @param {Object} options (optional) Zero or more options. See"," * <code>add()</code> for a list of supported options."," * @chainable"," */"," replaceValue: function (key, value, options) {"," var state = {};"," state[key] = value;"," return this._change(SRC_REPLACE, state, options);"," },",""," // -- Protected Methods ----------------------------------------------------",""," /**"," * Changes the state. This method provides a common implementation shared by"," * the public methods for changing state."," *"," * @method _change"," * @param {String} src Source of the change, for inclusion in event facades"," * to facilitate filtering."," * @param {Object} state Object hash of key/value pairs."," * @param {Object} options (optional) Zero or more options. See"," * <code>add()</code> for a list of supported options."," * @protected"," * @chainable"," */"," _change: function (src, state, options) {"," options = options ? Y.merge(DEFAULT_OPTIONS, options) : DEFAULT_OPTIONS;",""," if (options.merge && _isSimpleObject(state) &&"," _isSimpleObject(GlobalEnv._state)) {"," state = Y.merge(GlobalEnv._state, state);"," }",""," this._resolveChanges(src, state, options);"," return this;"," },",""," /**"," * Called by _resolveChanges() when the state has changed. This method takes"," * care of actually firing the necessary events."," *"," * @method _fireEvents"," * @param {String} src Source of the changes, for inclusion in event facades"," * to facilitate filtering."," * @param {Object} changes Resolved changes."," * @param {Object} options Zero or more options. See <code>add()</code> for"," * a list of supported options."," * @protected"," */"," _fireEvents: function (src, changes, options) {"," // Fire the global change event."," this.fire(EVT_CHANGE, {"," _options: options,"," changed : changes.changed,"," newVal : changes.newState,"," prevVal : changes.prevState,"," removed : changes.removed,"," src : src"," });",""," // Fire change/remove events for individual items."," Obj.each(changes.changed, function (value, key) {"," this._fireChangeEvent(src, key, value);"," }, this);",""," Obj.each(changes.removed, function (value, key) {"," this._fireRemoveEvent(src, key, value);"," }, this);"," },",""," /**"," * Fires a dynamic \"[key]Change\" event."," *"," * @method _fireChangeEvent"," * @param {String} src source of the change, for inclusion in event facades"," * to facilitate filtering"," * @param {String} key key of the item that was changed"," * @param {Object} value object hash containing <i>newVal</i> and"," * <i>prevVal</i> properties for the changed item"," * @protected"," */"," _fireChangeEvent: function (src, key, value) {"," /**"," * <p>"," * Dynamic event fired when an individual history item is added or"," * changed. The name of this event depends on the name of the key that"," * changed. To listen to change events for a key named \"foo\", subscribe"," * to the <code>fooChange</code> event; for a key named \"bar\", subscribe"," * to <code>barChange</code>, etc."," * </p>"," *"," * <p>"," * Key-specific events are only fired for instance-level changes; that"," * is, changes that were made via the same History instance on which the"," * event is subscribed. To be notified of changes made by other History"," * instances, subscribe to the global <code>history:change</code> event."," * </p>"," *"," * @event [key]Change"," * @param {EventFacade} e Event facade with the following additional"," * properties:"," *"," * <dl>"," * <dt>newVal (mixed)</dt>"," * <dd>"," * The new value of the item after the change."," * </dd>"," *"," * <dt>prevVal (mixed)</dt>"," * <dd>"," * The previous value of the item before the change, or"," * <code>undefined</code> if the item was just added and has no"," * previous value."," * </dd>"," *"," * <dt>src (String)</dt>"," * <dd>"," * The source of the event. This can be used to selectively ignore"," * events generated by certain sources."," * </dd>"," * </dl>"," */"," this.fire(key + 'Change', {"," newVal : value.newVal,"," prevVal: value.prevVal,"," src : src"," });"," },",""," /**"," * Fires a dynamic \"[key]Remove\" event."," *"," * @method _fireRemoveEvent"," * @param {String} src source of the change, for inclusion in event facades"," * to facilitate filtering"," * @param {String} key key of the item that was removed"," * @param {mixed} value value of the item prior to its removal"," * @protected"," */"," _fireRemoveEvent: function (src, key, value) {"," /**"," * <p>"," * Dynamic event fired when an individual history item is removed. The"," * name of this event depends on the name of the key that was removed."," * To listen to remove events for a key named \"foo\", subscribe to the"," * <code>fooRemove</code> event; for a key named \"bar\", subscribe to"," * <code>barRemove</code>, etc."," * </p>"," *"," * <p>"," * Key-specific events are only fired for instance-level changes; that"," * is, changes that were made via the same History instance on which the"," * event is subscribed. To be notified of changes made by other History"," * instances, subscribe to the global <code>history:change</code> event."," * </p>"," *"," * @event [key]Remove"," * @param {EventFacade} e Event facade with the following additional"," * properties:"," *"," * <dl>"," * <dt>prevVal (mixed)</dt>"," * <dd>"," * The value of the item before it was removed."," * </dd>"," *"," * <dt>src (String)</dt>"," * <dd>"," * The source of the event. This can be used to selectively ignore"," * events generated by certain sources."," * </dd>"," * </dl>"," */"," this.fire(key + 'Remove', {"," prevVal: value,"," src : src"," });"," },",""," /**"," * Resolves the changes (if any) between <i>newState</i> and the current"," * state and fires appropriate events if things have changed."," *"," * @method _resolveChanges"," * @param {String} src source of the changes, for inclusion in event facades"," * to facilitate filtering"," * @param {Object} newState object hash of key/value pairs representing the"," * new state"," * @param {Object} options Zero or more options. See <code>add()</code> for"," * a list of supported options."," * @protected"," */"," _resolveChanges: function (src, newState, options) {"," var changed = {},"," isChanged,"," prevState = GlobalEnv._state,"," removed = {};",""," newState || (newState = {});"," options || (options = {});",""," if (_isSimpleObject(newState) && _isSimpleObject(prevState)) {"," // Figure out what was added or changed."," Obj.each(newState, function (newVal, key) {"," var prevVal = prevState[key];",""," if (newVal !== prevVal) {"," changed[key] = {"," newVal : newVal,"," prevVal: prevVal"," };",""," isChanged = true;"," }"," }, this);",""," // Figure out what was removed."," Obj.each(prevState, function (prevVal, key) {"," if (!Obj.owns(newState, key) || newState[key] === null) {"," delete newState[key];"," removed[key] = prevVal;"," isChanged = true;"," }"," }, this);"," } else {"," isChanged = newState !== prevState;"," }",""," if (isChanged || this.force) {"," this._fireEvents(src, {"," changed : changed,"," newState : newState,"," prevState: prevState,"," removed : removed"," }, options);"," }"," },",""," /**"," * Stores the specified state. Don't call this method directly; go through"," * _resolveChanges() to ensure that changes are resolved and all events are"," * fired properly."," *"," * @method _storeState"," * @param {String} src source of the changes"," * @param {Object} newState new state to store"," * @param {Object} options Zero or more options. See <code>add()</code> for"," * a list of supported options."," * @protected"," */"," _storeState: function (src, newState) {"," // Note: the src and options params aren't used here, but they are used"," // by subclasses."," GlobalEnv._state = newState || {};"," },",""," // -- Protected Event Handlers ---------------------------------------------",""," /**"," * Default <code>history:change</code> event handler."," *"," * @method _defChangeFn"," * @param {EventFacade} e state change event facade"," * @protected"," */"," _defChangeFn: function (e) {"," this._storeState(e.src, e.newVal, e._options);"," }","}, true);","","Y.HistoryBase = HistoryBase;","","","}, 'patched-v3.18.1', {\"requires\": [\"event-custom-complex\"]});","","}());"]};
}
var __cov_tUpnrk9X1lAU31qwSqNljg = __coverage__['build/history-base/history-base.js'];
__cov_tUpnrk9X1lAU31qwSqNljg.s['1']++;YUI.add('history-base',function(Y,NAME){__cov_tUpnrk9X1lAU31qwSqNljg.f['1']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['2']++;var Lang=Y.Lang,Obj=Y.Object,GlobalEnv=YUI.namespace('Env.History'),YArray=Y.Array,doc=Y.config.doc,docMode=doc.documentMode,win=Y.config.win,DEFAULT_OPTIONS={merge:true},EVT_CHANGE='change',SRC_ADD='add',SRC_REPLACE='replace';__cov_tUpnrk9X1lAU31qwSqNljg.s['3']++;function HistoryBase(){__cov_tUpnrk9X1lAU31qwSqNljg.f['2']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['4']++;this._init.apply(this,arguments);}__cov_tUpnrk9X1lAU31qwSqNljg.s['5']++;Y.augment(HistoryBase,Y.EventTarget,null,null,{emitFacade:true,prefix:'history',preventable:false,queueable:true});__cov_tUpnrk9X1lAU31qwSqNljg.s['6']++;if(!GlobalEnv._state){__cov_tUpnrk9X1lAU31qwSqNljg.b['1'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['7']++;GlobalEnv._state={};}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['1'][1]++;}__cov_tUpnrk9X1lAU31qwSqNljg.s['8']++;function _isSimpleObject(value){__cov_tUpnrk9X1lAU31qwSqNljg.f['3']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['9']++;return Lang.type(value)==='object';}__cov_tUpnrk9X1lAU31qwSqNljg.s['10']++;HistoryBase.NAME='historyBase';__cov_tUpnrk9X1lAU31qwSqNljg.s['11']++;HistoryBase.SRC_ADD=SRC_ADD;__cov_tUpnrk9X1lAU31qwSqNljg.s['12']++;HistoryBase.SRC_REPLACE=SRC_REPLACE;__cov_tUpnrk9X1lAU31qwSqNljg.s['13']++;HistoryBase.html5=!!((__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][0]++,win.history)&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][1]++,win.history.pushState)&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][2]++,win.history.replaceState)&&((__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][3]++,'onpopstate'in win)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][4]++,Y.UA.gecko>=2))&&((__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][5]++,!Y.UA.android)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['2'][6]++,Y.UA.android>=2.4)));__cov_tUpnrk9X1lAU31qwSqNljg.s['14']++;HistoryBase.nativeHashChange=((__cov_tUpnrk9X1lAU31qwSqNljg.b['3'][0]++,'onhashchange'in win)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['3'][1]++,'onhashchange'in doc))&&((__cov_tUpnrk9X1lAU31qwSqNljg.b['3'][2]++,!docMode)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['3'][3]++,docMode>7));__cov_tUpnrk9X1lAU31qwSqNljg.s['15']++;Y.mix(HistoryBase.prototype,{_init:function(config){__cov_tUpnrk9X1lAU31qwSqNljg.f['4']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['16']++;var initialState;__cov_tUpnrk9X1lAU31qwSqNljg.s['17']++;config=this._config=(__cov_tUpnrk9X1lAU31qwSqNljg.b['4'][0]++,config)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['4'][1]++,{});__cov_tUpnrk9X1lAU31qwSqNljg.s['18']++;this.force=!!config.force;__cov_tUpnrk9X1lAU31qwSqNljg.s['19']++;initialState=this._initialState=(__cov_tUpnrk9X1lAU31qwSqNljg.b['5'][0]++,this._initialState)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['5'][1]++,config.initialState)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['5'][2]++,null);__cov_tUpnrk9X1lAU31qwSqNljg.s['20']++;this.publish(EVT_CHANGE,{broadcast:2,defaultFn:this._defChangeFn});__cov_tUpnrk9X1lAU31qwSqNljg.s['21']++;if(initialState){__cov_tUpnrk9X1lAU31qwSqNljg.b['6'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['22']++;this.replace(initialState);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['6'][1]++;}},add:function(){__cov_tUpnrk9X1lAU31qwSqNljg.f['5']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['23']++;var args=YArray(arguments,0,true);__cov_tUpnrk9X1lAU31qwSqNljg.s['24']++;args.unshift(SRC_ADD);__cov_tUpnrk9X1lAU31qwSqNljg.s['25']++;return this._change.apply(this,args);},addValue:function(key,value,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['6']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['26']++;var state={};__cov_tUpnrk9X1lAU31qwSqNljg.s['27']++;state[key]=value;__cov_tUpnrk9X1lAU31qwSqNljg.s['28']++;return this._change(SRC_ADD,state,options);},get:function(key){__cov_tUpnrk9X1lAU31qwSqNljg.f['7']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['29']++;var state=GlobalEnv._state,isObject=_isSimpleObject(state);__cov_tUpnrk9X1lAU31qwSqNljg.s['30']++;if(key){__cov_tUpnrk9X1lAU31qwSqNljg.b['7'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['31']++;return(__cov_tUpnrk9X1lAU31qwSqNljg.b['9'][0]++,isObject)&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['9'][1]++,Obj.owns(state,key))?(__cov_tUpnrk9X1lAU31qwSqNljg.b['8'][0]++,state[key]):(__cov_tUpnrk9X1lAU31qwSqNljg.b['8'][1]++,undefined);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['7'][1]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['32']++;return isObject?(__cov_tUpnrk9X1lAU31qwSqNljg.b['10'][0]++,Y.mix({},state,true)):(__cov_tUpnrk9X1lAU31qwSqNljg.b['10'][1]++,state);}},replace:function(){__cov_tUpnrk9X1lAU31qwSqNljg.f['8']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['33']++;var args=YArray(arguments,0,true);__cov_tUpnrk9X1lAU31qwSqNljg.s['34']++;args.unshift(SRC_REPLACE);__cov_tUpnrk9X1lAU31qwSqNljg.s['35']++;return this._change.apply(this,args);},replaceValue:function(key,value,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['9']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['36']++;var state={};__cov_tUpnrk9X1lAU31qwSqNljg.s['37']++;state[key]=value;__cov_tUpnrk9X1lAU31qwSqNljg.s['38']++;return this._change(SRC_REPLACE,state,options);},_change:function(src,state,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['10']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['39']++;options=options?(__cov_tUpnrk9X1lAU31qwSqNljg.b['11'][0]++,Y.merge(DEFAULT_OPTIONS,options)):(__cov_tUpnrk9X1lAU31qwSqNljg.b['11'][1]++,DEFAULT_OPTIONS);__cov_tUpnrk9X1lAU31qwSqNljg.s['40']++;if((__cov_tUpnrk9X1lAU31qwSqNljg.b['13'][0]++,options.merge)&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['13'][1]++,_isSimpleObject(state))&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['13'][2]++,_isSimpleObject(GlobalEnv._state))){__cov_tUpnrk9X1lAU31qwSqNljg.b['12'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['41']++;state=Y.merge(GlobalEnv._state,state);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['12'][1]++;}__cov_tUpnrk9X1lAU31qwSqNljg.s['42']++;this._resolveChanges(src,state,options);__cov_tUpnrk9X1lAU31qwSqNljg.s['43']++;return this;},_fireEvents:function(src,changes,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['11']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['44']++;this.fire(EVT_CHANGE,{_options:options,changed:changes.changed,newVal:changes.newState,prevVal:changes.prevState,removed:changes.removed,src:src});__cov_tUpnrk9X1lAU31qwSqNljg.s['45']++;Obj.each(changes.changed,function(value,key){__cov_tUpnrk9X1lAU31qwSqNljg.f['12']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['46']++;this._fireChangeEvent(src,key,value);},this);__cov_tUpnrk9X1lAU31qwSqNljg.s['47']++;Obj.each(changes.removed,function(value,key){__cov_tUpnrk9X1lAU31qwSqNljg.f['13']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['48']++;this._fireRemoveEvent(src,key,value);},this);},_fireChangeEvent:function(src,key,value){__cov_tUpnrk9X1lAU31qwSqNljg.f['14']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['49']++;this.fire(key+'Change',{newVal:value.newVal,prevVal:value.prevVal,src:src});},_fireRemoveEvent:function(src,key,value){__cov_tUpnrk9X1lAU31qwSqNljg.f['15']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['50']++;this.fire(key+'Remove',{prevVal:value,src:src});},_resolveChanges:function(src,newState,options){__cov_tUpnrk9X1lAU31qwSqNljg.f['16']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['51']++;var changed={},isChanged,prevState=GlobalEnv._state,removed={};__cov_tUpnrk9X1lAU31qwSqNljg.s['52']++;(__cov_tUpnrk9X1lAU31qwSqNljg.b['14'][0]++,newState)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['14'][1]++,newState={});__cov_tUpnrk9X1lAU31qwSqNljg.s['53']++;(__cov_tUpnrk9X1lAU31qwSqNljg.b['15'][0]++,options)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['15'][1]++,options={});__cov_tUpnrk9X1lAU31qwSqNljg.s['54']++;if((__cov_tUpnrk9X1lAU31qwSqNljg.b['17'][0]++,_isSimpleObject(newState))&&(__cov_tUpnrk9X1lAU31qwSqNljg.b['17'][1]++,_isSimpleObject(prevState))){__cov_tUpnrk9X1lAU31qwSqNljg.b['16'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['55']++;Obj.each(newState,function(newVal,key){__cov_tUpnrk9X1lAU31qwSqNljg.f['17']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['56']++;var prevVal=prevState[key];__cov_tUpnrk9X1lAU31qwSqNljg.s['57']++;if(newVal!==prevVal){__cov_tUpnrk9X1lAU31qwSqNljg.b['18'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['58']++;changed[key]={newVal:newVal,prevVal:prevVal};__cov_tUpnrk9X1lAU31qwSqNljg.s['59']++;isChanged=true;}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['18'][1]++;}},this);__cov_tUpnrk9X1lAU31qwSqNljg.s['60']++;Obj.each(prevState,function(prevVal,key){__cov_tUpnrk9X1lAU31qwSqNljg.f['18']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['61']++;if((__cov_tUpnrk9X1lAU31qwSqNljg.b['20'][0]++,!Obj.owns(newState,key))||(__cov_tUpnrk9X1lAU31qwSqNljg.b['20'][1]++,newState[key]===null)){__cov_tUpnrk9X1lAU31qwSqNljg.b['19'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['62']++;delete newState[key];__cov_tUpnrk9X1lAU31qwSqNljg.s['63']++;removed[key]=prevVal;__cov_tUpnrk9X1lAU31qwSqNljg.s['64']++;isChanged=true;}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['19'][1]++;}},this);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['16'][1]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['65']++;isChanged=newState!==prevState;}__cov_tUpnrk9X1lAU31qwSqNljg.s['66']++;if((__cov_tUpnrk9X1lAU31qwSqNljg.b['22'][0]++,isChanged)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['22'][1]++,this.force)){__cov_tUpnrk9X1lAU31qwSqNljg.b['21'][0]++;__cov_tUpnrk9X1lAU31qwSqNljg.s['67']++;this._fireEvents(src,{changed:changed,newState:newState,prevState:prevState,removed:removed},options);}else{__cov_tUpnrk9X1lAU31qwSqNljg.b['21'][1]++;}},_storeState:function(src,newState){__cov_tUpnrk9X1lAU31qwSqNljg.f['19']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['68']++;GlobalEnv._state=(__cov_tUpnrk9X1lAU31qwSqNljg.b['23'][0]++,newState)||(__cov_tUpnrk9X1lAU31qwSqNljg.b['23'][1]++,{});},_defChangeFn:function(e){__cov_tUpnrk9X1lAU31qwSqNljg.f['20']++;__cov_tUpnrk9X1lAU31qwSqNljg.s['69']++;this._storeState(e.src,e.newVal,e._options);}},true);__cov_tUpnrk9X1lAU31qwSqNljg.s['70']++;Y.HistoryBase=HistoryBase;},'patched-v3.18.1',{'requires':['event-custom-complex']});