src/cm/media/js/lib/yui/yui_3.10.3/build/loader/loader.js
changeset 525 89ef5ed3c48b
equal deleted inserted replaced
524:322d0feea350 525:89ef5ed3c48b
       
     1 /*
       
     2 YUI 3.10.3 (build 2fb5187)
       
     3 Copyright 2013 Yahoo! Inc. All rights reserved.
       
     4 Licensed under the BSD License.
       
     5 http://yuilibrary.com/license/
       
     6 */
       
     7 
       
     8 YUI.add('loader-base', function (Y, NAME) {
       
     9 
       
    10 /**
       
    11  * The YUI loader core
       
    12  * @module loader
       
    13  * @submodule loader-base
       
    14  */
       
    15 
       
    16 if (!YUI.Env[Y.version]) {
       
    17 
       
    18     (function() {
       
    19         var VERSION = Y.version,
       
    20             BUILD = '/build/',
       
    21             ROOT = VERSION + '/',
       
    22             CDN_BASE = Y.Env.base,
       
    23             GALLERY_VERSION = 'gallery-2013.06.05-22-14',
       
    24             TNT = '2in3',
       
    25             TNT_VERSION = '4',
       
    26             YUI2_VERSION = '2.9.0',
       
    27             COMBO_BASE = CDN_BASE + 'combo?',
       
    28             META = { version: VERSION,
       
    29                               root: ROOT,
       
    30                               base: Y.Env.base,
       
    31                               comboBase: COMBO_BASE,
       
    32                               skin: { defaultSkin: 'sam',
       
    33                                            base: 'assets/skins/',
       
    34                                            path: 'skin.css',
       
    35                                            after: ['cssreset',
       
    36                                                           'cssfonts',
       
    37                                                           'cssgrids',
       
    38                                                           'cssbase',
       
    39                                                           'cssreset-context',
       
    40                                                           'cssfonts-context']},
       
    41                               groups: {},
       
    42                               patterns: {} },
       
    43             groups = META.groups,
       
    44             yui2Update = function(tnt, yui2, config) {
       
    45 
       
    46                 var root = TNT + '.' +
       
    47                         (tnt || TNT_VERSION) + '/' +
       
    48                         (yui2 || YUI2_VERSION) + BUILD,
       
    49                     base = (config && config.base) ? config.base : CDN_BASE,
       
    50                     combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
       
    51 
       
    52                 groups.yui2.base = base + root;
       
    53                 groups.yui2.root = root;
       
    54                 groups.yui2.comboBase = combo;
       
    55             },
       
    56             galleryUpdate = function(tag, config) {
       
    57                 var root = (tag || GALLERY_VERSION) + BUILD,
       
    58                     base = (config && config.base) ? config.base : CDN_BASE,
       
    59                     combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
       
    60 
       
    61                 groups.gallery.base = base + root;
       
    62                 groups.gallery.root = root;
       
    63                 groups.gallery.comboBase = combo;
       
    64             };
       
    65 
       
    66 
       
    67         groups[VERSION] = {};
       
    68 
       
    69         groups.gallery = {
       
    70             ext: false,
       
    71             combine: true,
       
    72             comboBase: COMBO_BASE,
       
    73             update: galleryUpdate,
       
    74             patterns: { 'gallery-': { },
       
    75                         'lang/gallery-': {},
       
    76                         'gallerycss-': { type: 'css' } }
       
    77         };
       
    78 
       
    79         groups.yui2 = {
       
    80             combine: true,
       
    81             ext: false,
       
    82             comboBase: COMBO_BASE,
       
    83             update: yui2Update,
       
    84             patterns: {
       
    85                 'yui2-': {
       
    86                     configFn: function(me) {
       
    87                         if (/-skin|reset|fonts|grids|base/.test(me.name)) {
       
    88                             me.type = 'css';
       
    89                             me.path = me.path.replace(/\.js/, '.css');
       
    90                             // this makes skins in builds earlier than
       
    91                             // 2.6.0 work as long as combine is false
       
    92                             me.path = me.path.replace(/\/yui2-skin/,
       
    93                                              '/assets/skins/sam/yui2-skin');
       
    94                         }
       
    95                     }
       
    96                 }
       
    97             }
       
    98         };
       
    99 
       
   100         galleryUpdate();
       
   101         yui2Update();
       
   102 
       
   103         YUI.Env[VERSION] = META;
       
   104     }());
       
   105 }
       
   106 
       
   107 
       
   108 /*jslint forin: true, maxlen: 350 */
       
   109 
       
   110 /**
       
   111  * Loader dynamically loads script and css files.  It includes the dependency
       
   112  * information for the version of the library in use, and will automatically pull in
       
   113  * dependencies for the modules requested. It can also load the
       
   114  * files from the Yahoo! CDN, and it can utilize the combo service provided on
       
   115  * this network to reduce the number of http connections required to download
       
   116  * YUI files.
       
   117  *
       
   118  * @module loader
       
   119  * @main loader
       
   120  * @submodule loader-base
       
   121  */
       
   122 
       
   123 var NOT_FOUND = {},
       
   124     NO_REQUIREMENTS = [],
       
   125     MAX_URL_LENGTH = 1024,
       
   126     GLOBAL_ENV = YUI.Env,
       
   127     GLOBAL_LOADED = GLOBAL_ENV._loaded,
       
   128     CSS = 'css',
       
   129     JS = 'js',
       
   130     INTL = 'intl',
       
   131     DEFAULT_SKIN = 'sam',
       
   132     VERSION = Y.version,
       
   133     ROOT_LANG = '',
       
   134     YObject = Y.Object,
       
   135     oeach = YObject.each,
       
   136     yArray = Y.Array,
       
   137     _queue = GLOBAL_ENV._loaderQueue,
       
   138     META = GLOBAL_ENV[VERSION],
       
   139     SKIN_PREFIX = 'skin-',
       
   140     L = Y.Lang,
       
   141     ON_PAGE = GLOBAL_ENV.mods,
       
   142     modulekey,
       
   143     _path = function(dir, file, type, nomin) {
       
   144         var path = dir + '/' + file;
       
   145         if (!nomin) {
       
   146             path += '-min';
       
   147         }
       
   148         path += '.' + (type || CSS);
       
   149 
       
   150         return path;
       
   151     };
       
   152 
       
   153 
       
   154     if (!YUI.Env._cssLoaded) {
       
   155         YUI.Env._cssLoaded = {};
       
   156     }
       
   157 
       
   158 
       
   159 /**
       
   160  * The component metadata is stored in Y.Env.meta.
       
   161  * Part of the loader module.
       
   162  * @property meta
       
   163  * @for YUI
       
   164  */
       
   165 Y.Env.meta = META;
       
   166 
       
   167 /**
       
   168  * Loader dynamically loads script and css files.  It includes the dependency
       
   169  * info for the version of the library in use, and will automatically pull in
       
   170  * dependencies for the modules requested. It can load the
       
   171  * files from the Yahoo! CDN, and it can utilize the combo service provided on
       
   172  * this network to reduce the number of http connections required to download
       
   173  * YUI files. You can also specify an external, custom combo service to host
       
   174  * your modules as well.
       
   175 
       
   176         var Y = YUI();
       
   177         var loader = new Y.Loader({
       
   178             filter: 'debug',
       
   179             base: '../../',
       
   180             root: 'build/',
       
   181             combine: true,
       
   182             require: ['node', 'dd', 'console']
       
   183         });
       
   184         var out = loader.resolve(true);
       
   185 
       
   186  * @constructor
       
   187  * @class Loader
       
   188  * @param {Object} config an optional set of configuration options.
       
   189  * @param {String} config.base The base dir which to fetch this module from
       
   190  * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
       
   191  * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
       
   192  * @param {String|Object} config.filter A filter to apply to result urls. <a href="#property_filter">See filter property</a>
       
   193  * @param {Object} config.filters Per-component filter specification.  If specified for a given component, this overrides the filter config.
       
   194  * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
       
   195  * @param {Boolean} [config.async=true] Fetch files in async
       
   196  * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
       
   197  * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
       
   198  * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
       
   199  * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
       
   200  * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
       
   201  * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes.  If not set, there is no timeout
       
   202  * @param {Object} config.context Execution context for all callbacks
       
   203  * @param {Function} config.onSuccess Callback for the 'success' event
       
   204  * @param {Function} config.onFailure Callback for the 'failure' event
       
   205  * @param {Function} config.onCSS Callback for the 'CSSComplete' event.  When loading YUI components with CSS the CSS is loaded first, then the script.  This provides a moment you can tie into to improve the presentation of the page while the script is loading.
       
   206  * @param {Function} config.onTimeout Callback for the 'timeout' event
       
   207  * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
       
   208  * @param {Object} config.modules A list of module definitions.  See <a href="#method_addModule">Loader.addModule</a> for the supported module metadata
       
   209  * @param {Object} config.groups A list of group definitions.  Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`.
       
   210  * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use.  The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers.  These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox.
       
   211  * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use.  Valid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward.
       
   212  */
       
   213 Y.Loader = function(o) {
       
   214 
       
   215     var self = this;
       
   216 
       
   217     //Catch no config passed.
       
   218     o = o || {};
       
   219 
       
   220     modulekey = META.md5;
       
   221 
       
   222     /**
       
   223      * Internal callback to handle multiple internal insert() calls
       
   224      * so that css is inserted prior to js
       
   225      * @property _internalCallback
       
   226      * @private
       
   227      */
       
   228     // self._internalCallback = null;
       
   229 
       
   230     /**
       
   231      * Callback that will be executed when the loader is finished
       
   232      * with an insert
       
   233      * @method onSuccess
       
   234      * @type function
       
   235      */
       
   236     // self.onSuccess = null;
       
   237 
       
   238     /**
       
   239      * Callback that will be executed if there is a failure
       
   240      * @method onFailure
       
   241      * @type function
       
   242      */
       
   243     // self.onFailure = null;
       
   244 
       
   245     /**
       
   246      * Callback for the 'CSSComplete' event.  When loading YUI components
       
   247      * with CSS the CSS is loaded first, then the script.  This provides
       
   248      * a moment you can tie into to improve the presentation of the page
       
   249      * while the script is loading.
       
   250      * @method onCSS
       
   251      * @type function
       
   252      */
       
   253     // self.onCSS = null;
       
   254 
       
   255     /**
       
   256      * Callback executed each time a script or css file is loaded
       
   257      * @method onProgress
       
   258      * @type function
       
   259      */
       
   260     // self.onProgress = null;
       
   261 
       
   262     /**
       
   263      * Callback that will be executed if a timeout occurs
       
   264      * @method onTimeout
       
   265      * @type function
       
   266      */
       
   267     // self.onTimeout = null;
       
   268 
       
   269     /**
       
   270      * The execution context for all callbacks
       
   271      * @property context
       
   272      * @default {YUI} the YUI instance
       
   273      */
       
   274     self.context = Y;
       
   275 
       
   276     /**
       
   277      * Data that is passed to all callbacks
       
   278      * @property data
       
   279      */
       
   280     // self.data = null;
       
   281 
       
   282     /**
       
   283      * Node reference or id where new nodes should be inserted before
       
   284      * @property insertBefore
       
   285      * @type string|HTMLElement
       
   286      */
       
   287     // self.insertBefore = null;
       
   288 
       
   289     /**
       
   290      * The charset attribute for inserted nodes
       
   291      * @property charset
       
   292      * @type string
       
   293      * @deprecated , use cssAttributes or jsAttributes.
       
   294      */
       
   295     // self.charset = null;
       
   296 
       
   297     /**
       
   298      * An object literal containing attributes to add to link nodes
       
   299      * @property cssAttributes
       
   300      * @type object
       
   301      */
       
   302     // self.cssAttributes = null;
       
   303 
       
   304     /**
       
   305      * An object literal containing attributes to add to script nodes
       
   306      * @property jsAttributes
       
   307      * @type object
       
   308      */
       
   309     // self.jsAttributes = null;
       
   310 
       
   311     /**
       
   312      * The base directory.
       
   313      * @property base
       
   314      * @type string
       
   315      * @default http://yui.yahooapis.com/[YUI VERSION]/build/
       
   316      */
       
   317     self.base = Y.Env.meta.base + Y.Env.meta.root;
       
   318 
       
   319     /**
       
   320      * Base path for the combo service
       
   321      * @property comboBase
       
   322      * @type string
       
   323      * @default http://yui.yahooapis.com/combo?
       
   324      */
       
   325     self.comboBase = Y.Env.meta.comboBase;
       
   326 
       
   327     /*
       
   328      * Base path for language packs.
       
   329      */
       
   330     // self.langBase = Y.Env.meta.langBase;
       
   331     // self.lang = "";
       
   332 
       
   333     /**
       
   334      * If configured, the loader will attempt to use the combo
       
   335      * service for YUI resources and configured external resources.
       
   336      * @property combine
       
   337      * @type boolean
       
   338      * @default true if a base dir isn't in the config
       
   339      */
       
   340     self.combine = o.base &&
       
   341         (o.base.indexOf(self.comboBase.substr(0, 20)) > -1);
       
   342 
       
   343     /**
       
   344     * The default seperator to use between files in a combo URL
       
   345     * @property comboSep
       
   346     * @type {String}
       
   347     * @default Ampersand
       
   348     */
       
   349     self.comboSep = '&';
       
   350     /**
       
   351      * Max url length for combo urls.  The default is 1024. This is the URL
       
   352      * limit for the Yahoo! hosted combo servers.  If consuming
       
   353      * a different combo service that has a different URL limit
       
   354      * it is possible to override this default by supplying
       
   355      * the maxURLLength config option.  The config option will
       
   356      * only take effect if lower than the default.
       
   357      *
       
   358      * @property maxURLLength
       
   359      * @type int
       
   360      */
       
   361     self.maxURLLength = MAX_URL_LENGTH;
       
   362 
       
   363     /**
       
   364      * Ignore modules registered on the YUI global
       
   365      * @property ignoreRegistered
       
   366      * @default false
       
   367      */
       
   368     self.ignoreRegistered = o.ignoreRegistered;
       
   369 
       
   370     /**
       
   371      * Root path to prepend to module path for the combo
       
   372      * service
       
   373      * @property root
       
   374      * @type string
       
   375      * @default [YUI VERSION]/build/
       
   376      */
       
   377     self.root = Y.Env.meta.root;
       
   378 
       
   379     /**
       
   380      * Timeout value in milliseconds.  If set, self value will be used by
       
   381      * the get utility.  the timeout event will fire if
       
   382      * a timeout occurs.
       
   383      * @property timeout
       
   384      * @type int
       
   385      */
       
   386     self.timeout = 0;
       
   387 
       
   388     /**
       
   389      * A list of modules that should not be loaded, even if
       
   390      * they turn up in the dependency tree
       
   391      * @property ignore
       
   392      * @type string[]
       
   393      */
       
   394     // self.ignore = null;
       
   395 
       
   396     /**
       
   397      * A list of modules that should always be loaded, even
       
   398      * if they have already been inserted into the page.
       
   399      * @property force
       
   400      * @type string[]
       
   401      */
       
   402     // self.force = null;
       
   403 
       
   404     self.forceMap = {};
       
   405 
       
   406     /**
       
   407      * Should we allow rollups
       
   408      * @property allowRollup
       
   409      * @type boolean
       
   410      * @default false
       
   411      */
       
   412     self.allowRollup = false;
       
   413 
       
   414     /**
       
   415      * A filter to apply to result urls.  This filter will modify the default
       
   416      * path for all modules.  The default path for the YUI library is the
       
   417      * minified version of the files (e.g., event-min.js).  The filter property
       
   418      * can be a predefined filter or a custom filter.  The valid predefined
       
   419      * filters are:
       
   420      * <dl>
       
   421      *  <dt>DEBUG</dt>
       
   422      *  <dd>Selects the debug versions of the library (e.g., event-debug.js).
       
   423      *      This option will automatically include the Logger widget</dd>
       
   424      *  <dt>RAW</dt>
       
   425      *  <dd>Selects the non-minified version of the library (e.g., event.js).
       
   426      *  </dd>
       
   427      * </dl>
       
   428      * You can also define a custom filter, which must be an object literal
       
   429      * containing a search expression and a replace string:
       
   430      *
       
   431      *      myFilter: {
       
   432      *          'searchExp': "-min\\.js",
       
   433      *          'replaceStr': "-debug.js"
       
   434      *      }
       
   435      *
       
   436      * @property filter
       
   437      * @type string| {searchExp: string, replaceStr: string}
       
   438      */
       
   439     // self.filter = null;
       
   440 
       
   441     /**
       
   442      * per-component filter specification.  If specified for a given
       
   443      * component, this overrides the filter config.
       
   444      * @property filters
       
   445      * @type object
       
   446      */
       
   447     self.filters = {};
       
   448 
       
   449     /**
       
   450      * The list of requested modules
       
   451      * @property required
       
   452      * @type {string: boolean}
       
   453      */
       
   454     self.required = {};
       
   455 
       
   456     /**
       
   457      * If a module name is predefined when requested, it is checked againsts
       
   458      * the patterns provided in this property.  If there is a match, the
       
   459      * module is added with the default configuration.
       
   460      *
       
   461      * At the moment only supporting module prefixes, but anticipate
       
   462      * supporting at least regular expressions.
       
   463      * @property patterns
       
   464      * @type Object
       
   465      */
       
   466     // self.patterns = Y.merge(Y.Env.meta.patterns);
       
   467     self.patterns = {};
       
   468 
       
   469     /**
       
   470      * The library metadata
       
   471      * @property moduleInfo
       
   472      */
       
   473     // self.moduleInfo = Y.merge(Y.Env.meta.moduleInfo);
       
   474     self.moduleInfo = {};
       
   475 
       
   476     self.groups = Y.merge(Y.Env.meta.groups);
       
   477 
       
   478     /**
       
   479      * Provides the information used to skin the skinnable components.
       
   480      * The following skin definition would result in 'skin1' and 'skin2'
       
   481      * being loaded for calendar (if calendar was requested), and
       
   482      * 'sam' for all other skinnable components:
       
   483      *
       
   484      *      skin: {
       
   485      *          // The default skin, which is automatically applied if not
       
   486      *          // overriden by a component-specific skin definition.
       
   487      *          // Change this in to apply a different skin globally
       
   488      *          defaultSkin: 'sam',
       
   489      *
       
   490      *          // This is combined with the loader base property to get
       
   491      *          // the default root directory for a skin. ex:
       
   492      *          // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
       
   493      *          base: 'assets/skins/',
       
   494      *
       
   495      *          // Any component-specific overrides can be specified here,
       
   496      *          // making it possible to load different skins for different
       
   497      *          // components.  It is possible to load more than one skin
       
   498      *          // for a given component as well.
       
   499      *          overrides: {
       
   500      *              calendar: ['skin1', 'skin2']
       
   501      *          }
       
   502      *      }
       
   503      * @property skin
       
   504      * @type {Object}
       
   505      */
       
   506     self.skin = Y.merge(Y.Env.meta.skin);
       
   507 
       
   508     /*
       
   509      * Map of conditional modules
       
   510      * @since 3.2.0
       
   511      */
       
   512     self.conditions = {};
       
   513 
       
   514     // map of modules with a hash of modules that meet the requirement
       
   515     // self.provides = {};
       
   516 
       
   517     self.config = o;
       
   518     self._internal = true;
       
   519 
       
   520     self._populateCache();
       
   521 
       
   522     /**
       
   523      * Set when beginning to compute the dependency tree.
       
   524      * Composed of what YUI reports to be loaded combined
       
   525      * with what has been loaded by any instance on the page
       
   526      * with the version number specified in the metadata.
       
   527      * @property loaded
       
   528      * @type {string: boolean}
       
   529      */
       
   530     self.loaded = GLOBAL_LOADED[VERSION];
       
   531 
       
   532 
       
   533     /**
       
   534     * Should Loader fetch scripts in `async`, defaults to `true`
       
   535     * @property async
       
   536     */
       
   537 
       
   538     self.async = true;
       
   539 
       
   540     self._inspectPage();
       
   541 
       
   542     self._internal = false;
       
   543 
       
   544     self._config(o);
       
   545 
       
   546     self.forceMap = (self.force) ? Y.Array.hash(self.force) : {};
       
   547 
       
   548     self.testresults = null;
       
   549 
       
   550     if (Y.config.tests) {
       
   551         self.testresults = Y.config.tests;
       
   552     }
       
   553 
       
   554     /**
       
   555      * List of rollup files found in the library metadata
       
   556      * @property rollups
       
   557      */
       
   558     // self.rollups = null;
       
   559 
       
   560     /**
       
   561      * Whether or not to load optional dependencies for
       
   562      * the requested modules
       
   563      * @property loadOptional
       
   564      * @type boolean
       
   565      * @default false
       
   566      */
       
   567     // self.loadOptional = false;
       
   568 
       
   569     /**
       
   570      * All of the derived dependencies in sorted order, which
       
   571      * will be populated when either calculate() or insert()
       
   572      * is called
       
   573      * @property sorted
       
   574      * @type string[]
       
   575      */
       
   576     self.sorted = [];
       
   577 
       
   578     /*
       
   579      * A list of modules to attach to the YUI instance when complete.
       
   580      * If not supplied, the sorted list of dependencies are applied.
       
   581      * @property attaching
       
   582      */
       
   583     // self.attaching = null;
       
   584 
       
   585     /**
       
   586      * Flag to indicate the dependency tree needs to be recomputed
       
   587      * if insert is called again.
       
   588      * @property dirty
       
   589      * @type boolean
       
   590      * @default true
       
   591      */
       
   592     self.dirty = true;
       
   593 
       
   594     /**
       
   595      * List of modules inserted by the utility
       
   596      * @property inserted
       
   597      * @type {string: boolean}
       
   598      */
       
   599     self.inserted = {};
       
   600 
       
   601     /**
       
   602      * List of skipped modules during insert() because the module
       
   603      * was not defined
       
   604      * @property skipped
       
   605      */
       
   606     self.skipped = {};
       
   607 
       
   608     // Y.on('yui:load', self.loadNext, self);
       
   609 
       
   610     self.tested = {};
       
   611 
       
   612     /*
       
   613      * Cached sorted calculate results
       
   614      * @property results
       
   615      * @since 3.2.0
       
   616      */
       
   617     //self.results = {};
       
   618 
       
   619     if (self.ignoreRegistered) {
       
   620         //Clear inpage already processed modules.
       
   621         self._resetModules();
       
   622     }
       
   623 
       
   624 };
       
   625 
       
   626 Y.Loader.prototype = {
       
   627     /**
       
   628     * Checks the cache for modules and conditions, if they do not exist
       
   629     * process the default metadata and populate the local moduleInfo hash.
       
   630     * @method _populateCache
       
   631     * @private
       
   632     */
       
   633     _populateCache: function() {
       
   634         var self = this,
       
   635             defaults = META.modules,
       
   636             cache = GLOBAL_ENV._renderedMods,
       
   637             i;
       
   638 
       
   639         if (cache && !self.ignoreRegistered) {
       
   640             for (i in cache) {
       
   641                 if (cache.hasOwnProperty(i)) {
       
   642                     self.moduleInfo[i] = Y.merge(cache[i]);
       
   643                 }
       
   644             }
       
   645 
       
   646             cache = GLOBAL_ENV._conditions;
       
   647             for (i in cache) {
       
   648                 if (cache.hasOwnProperty(i)) {
       
   649                     self.conditions[i] = Y.merge(cache[i]);
       
   650                 }
       
   651             }
       
   652 
       
   653         } else {
       
   654             for (i in defaults) {
       
   655                 if (defaults.hasOwnProperty(i)) {
       
   656                     self.addModule(defaults[i], i);
       
   657                 }
       
   658             }
       
   659         }
       
   660 
       
   661     },
       
   662     /**
       
   663     * Reset modules in the module cache to a pre-processed state so additional
       
   664     * computations with a different skin or language will work as expected.
       
   665     * @method _resetModules
       
   666     * @private
       
   667     */
       
   668     _resetModules: function() {
       
   669         var self = this, i, o,
       
   670             mod, name, details;
       
   671         for (i in self.moduleInfo) {
       
   672             if (self.moduleInfo.hasOwnProperty(i)) {
       
   673                 mod = self.moduleInfo[i];
       
   674                 name = mod.name;
       
   675                 details  = (YUI.Env.mods[name] ? YUI.Env.mods[name].details : null);
       
   676 
       
   677                 if (details) {
       
   678                     self.moduleInfo[name]._reset = true;
       
   679                     self.moduleInfo[name].requires = details.requires || [];
       
   680                     self.moduleInfo[name].optional = details.optional || [];
       
   681                     self.moduleInfo[name].supersedes = details.supercedes || [];
       
   682                 }
       
   683 
       
   684                 if (mod.defaults) {
       
   685                     for (o in mod.defaults) {
       
   686                         if (mod.defaults.hasOwnProperty(o)) {
       
   687                             if (mod[o]) {
       
   688                                 mod[o] = mod.defaults[o];
       
   689                             }
       
   690                         }
       
   691                     }
       
   692                 }
       
   693                 delete mod.langCache;
       
   694                 delete mod.skinCache;
       
   695                 if (mod.skinnable) {
       
   696                     self._addSkin(self.skin.defaultSkin, mod.name);
       
   697                 }
       
   698             }
       
   699         }
       
   700     },
       
   701     /**
       
   702     Regex that matches a CSS URL. Used to guess the file type when it's not
       
   703     specified.
       
   704 
       
   705     @property REGEX_CSS
       
   706     @type RegExp
       
   707     @final
       
   708     @protected
       
   709     @since 3.5.0
       
   710     **/
       
   711     REGEX_CSS: /\.css(?:[?;].*)?$/i,
       
   712 
       
   713     /**
       
   714     * Default filters for raw and debug
       
   715     * @property FILTER_DEFS
       
   716     * @type Object
       
   717     * @final
       
   718     * @protected
       
   719     */
       
   720     FILTER_DEFS: {
       
   721         RAW: {
       
   722             'searchExp': '-min\\.js',
       
   723             'replaceStr': '.js'
       
   724         },
       
   725         DEBUG: {
       
   726             'searchExp': '-min\\.js',
       
   727             'replaceStr': '-debug.js'
       
   728         },
       
   729         COVERAGE: {
       
   730             'searchExp': '-min\\.js',
       
   731             'replaceStr': '-coverage.js'
       
   732         }
       
   733     },
       
   734     /*
       
   735     * Check the pages meta-data and cache the result.
       
   736     * @method _inspectPage
       
   737     * @private
       
   738     */
       
   739     _inspectPage: function() {
       
   740         var self = this, v, m, req, mr, i;
       
   741 
       
   742         //Inspect the page for CSS only modules and mark them as loaded.
       
   743         for (i in self.moduleInfo) {
       
   744             if (self.moduleInfo.hasOwnProperty(i)) {
       
   745                 v = self.moduleInfo[i];
       
   746                 if (v.type && v.type === CSS) {
       
   747                     if (self.isCSSLoaded(v.name)) {
       
   748                         self.loaded[i] = true;
       
   749                     }
       
   750                 }
       
   751             }
       
   752         }
       
   753         for (i in ON_PAGE) {
       
   754             if (ON_PAGE.hasOwnProperty(i)) {
       
   755                 v = ON_PAGE[i];
       
   756                 if (v.details) {
       
   757                     m = self.moduleInfo[v.name];
       
   758                     req = v.details.requires;
       
   759                     mr = m && m.requires;
       
   760 
       
   761                    if (m) {
       
   762                        if (!m._inspected && req && mr.length !== req.length) {
       
   763                            // console.log('deleting ' + m.name);
       
   764                            delete m.expanded;
       
   765                        }
       
   766                    } else {
       
   767                        m = self.addModule(v.details, i);
       
   768                    }
       
   769                    m._inspected = true;
       
   770                }
       
   771             }
       
   772         }
       
   773     },
       
   774     /*
       
   775     * returns true if b is not loaded, and is required directly or by means of modules it supersedes.
       
   776     * @private
       
   777     * @method _requires
       
   778     * @param {String} mod1 The first module to compare
       
   779     * @param {String} mod2 The second module to compare
       
   780     */
       
   781    _requires: function(mod1, mod2) {
       
   782 
       
   783         var i, rm, after_map, s,
       
   784             info = this.moduleInfo,
       
   785             m = info[mod1],
       
   786             other = info[mod2];
       
   787 
       
   788         if (!m || !other) {
       
   789             return false;
       
   790         }
       
   791 
       
   792         rm = m.expanded_map;
       
   793         after_map = m.after_map;
       
   794 
       
   795         // check if this module should be sorted after the other
       
   796         // do this first to short circut circular deps
       
   797         if (after_map && (mod2 in after_map)) {
       
   798             return true;
       
   799         }
       
   800 
       
   801         after_map = other.after_map;
       
   802 
       
   803         // and vis-versa
       
   804         if (after_map && (mod1 in after_map)) {
       
   805             return false;
       
   806         }
       
   807 
       
   808         // check if this module requires one the other supersedes
       
   809         s = info[mod2] && info[mod2].supersedes;
       
   810         if (s) {
       
   811             for (i = 0; i < s.length; i++) {
       
   812                 if (this._requires(mod1, s[i])) {
       
   813                     return true;
       
   814                 }
       
   815             }
       
   816         }
       
   817 
       
   818         s = info[mod1] && info[mod1].supersedes;
       
   819         if (s) {
       
   820             for (i = 0; i < s.length; i++) {
       
   821                 if (this._requires(mod2, s[i])) {
       
   822                     return false;
       
   823                 }
       
   824             }
       
   825         }
       
   826 
       
   827         // check if this module requires the other directly
       
   828         // if (r && yArray.indexOf(r, mod2) > -1) {
       
   829         if (rm && (mod2 in rm)) {
       
   830             return true;
       
   831         }
       
   832 
       
   833         // external css files should be sorted below yui css
       
   834         if (m.ext && m.type === CSS && !other.ext && other.type === CSS) {
       
   835             return true;
       
   836         }
       
   837 
       
   838         return false;
       
   839     },
       
   840     /**
       
   841     * Apply a new config to the Loader instance
       
   842     * @method _config
       
   843     * @private
       
   844     * @param {Object} o The new configuration
       
   845     */
       
   846     _config: function(o) {
       
   847         var i, j, val, a, f, group, groupName, self = this,
       
   848             mods = [], mod;
       
   849         // apply config values
       
   850         if (o) {
       
   851             for (i in o) {
       
   852                 if (o.hasOwnProperty(i)) {
       
   853                     val = o[i];
       
   854                     //TODO This should be a case
       
   855                     if (i === 'require') {
       
   856                         self.require(val);
       
   857                     } else if (i === 'skin') {
       
   858                         //If the config.skin is a string, format to the expected object
       
   859                         if (typeof val === 'string') {
       
   860                             self.skin.defaultSkin = o.skin;
       
   861                             val = {
       
   862                                 defaultSkin: val
       
   863                             };
       
   864                         }
       
   865 
       
   866                         Y.mix(self.skin, val, true);
       
   867                     } else if (i === 'groups') {
       
   868                         for (j in val) {
       
   869                             if (val.hasOwnProperty(j)) {
       
   870                                 groupName = j;
       
   871                                 group = val[j];
       
   872                                 self.addGroup(group, groupName);
       
   873                                 if (group.aliases) {
       
   874                                     for (a in group.aliases) {
       
   875                                         if (group.aliases.hasOwnProperty(a)) {
       
   876                                             self.addAlias(group.aliases[a], a);
       
   877                                         }
       
   878                                     }
       
   879                                 }
       
   880                             }
       
   881                         }
       
   882 
       
   883                     } else if (i === 'modules') {
       
   884                         // add a hash of module definitions
       
   885                         for (j in val) {
       
   886                             if (val.hasOwnProperty(j)) {
       
   887                                 self.addModule(val[j], j);
       
   888                             }
       
   889                         }
       
   890                     } else if (i === 'aliases') {
       
   891                         for (j in val) {
       
   892                             if (val.hasOwnProperty(j)) {
       
   893                                 self.addAlias(val[j], j);
       
   894                             }
       
   895                         }
       
   896                     } else if (i === 'gallery') {
       
   897                         if (this.groups.gallery.update) {
       
   898                             this.groups.gallery.update(val, o);
       
   899                         }
       
   900                     } else if (i === 'yui2' || i === '2in3') {
       
   901                         if (this.groups.yui2.update) {
       
   902                             this.groups.yui2.update(o['2in3'], o.yui2, o);
       
   903                         }
       
   904                     } else {
       
   905                         self[i] = val;
       
   906                     }
       
   907                 }
       
   908             }
       
   909         }
       
   910 
       
   911         // fix filter
       
   912         f = self.filter;
       
   913 
       
   914         if (L.isString(f)) {
       
   915             f = f.toUpperCase();
       
   916             self.filterName = f;
       
   917             self.filter = self.FILTER_DEFS[f];
       
   918             if (f === 'DEBUG') {
       
   919                 self.require('yui-log', 'dump');
       
   920             }
       
   921         }
       
   922 
       
   923         if (self.filterName && self.coverage) {
       
   924             if (self.filterName === 'COVERAGE' && L.isArray(self.coverage) && self.coverage.length) {
       
   925                 for (i = 0; i < self.coverage.length; i++) {
       
   926                     mod = self.coverage[i];
       
   927                     if (self.moduleInfo[mod] && self.moduleInfo[mod].use) {
       
   928                         mods = [].concat(mods, self.moduleInfo[mod].use);
       
   929                     } else {
       
   930                         mods.push(mod);
       
   931                     }
       
   932                 }
       
   933                 self.filters = self.filters || {};
       
   934                 Y.Array.each(mods, function(mod) {
       
   935                     self.filters[mod] = self.FILTER_DEFS.COVERAGE;
       
   936                 });
       
   937                 self.filterName = 'RAW';
       
   938                 self.filter = self.FILTER_DEFS[self.filterName];
       
   939             }
       
   940         }
       
   941 
       
   942     },
       
   943 
       
   944     /**
       
   945      * Returns the skin module name for the specified skin name.  If a
       
   946      * module name is supplied, the returned skin module name is
       
   947      * specific to the module passed in.
       
   948      * @method formatSkin
       
   949      * @param {string} skin the name of the skin.
       
   950      * @param {string} mod optional: the name of a module to skin.
       
   951      * @return {string} the full skin module name.
       
   952      */
       
   953     formatSkin: function(skin, mod) {
       
   954         var s = SKIN_PREFIX + skin;
       
   955         if (mod) {
       
   956             s = s + '-' + mod;
       
   957         }
       
   958 
       
   959         return s;
       
   960     },
       
   961 
       
   962     /**
       
   963      * Adds the skin def to the module info
       
   964      * @method _addSkin
       
   965      * @param {string} skin the name of the skin.
       
   966      * @param {string} mod the name of the module.
       
   967      * @param {string} parent parent module if this is a skin of a
       
   968      * submodule or plugin.
       
   969      * @return {string} the module name for the skin.
       
   970      * @private
       
   971      */
       
   972     _addSkin: function(skin, mod, parent) {
       
   973         var mdef, pkg, name, nmod,
       
   974             info = this.moduleInfo,
       
   975             sinf = this.skin,
       
   976             ext = info[mod] && info[mod].ext;
       
   977 
       
   978         // Add a module definition for the module-specific skin css
       
   979         if (mod) {
       
   980             name = this.formatSkin(skin, mod);
       
   981             if (!info[name]) {
       
   982                 mdef = info[mod];
       
   983                 pkg = mdef.pkg || mod;
       
   984                 nmod = {
       
   985                     skin: true,
       
   986                     name: name,
       
   987                     group: mdef.group,
       
   988                     type: 'css',
       
   989                     after: sinf.after,
       
   990                     path: (parent || pkg) + '/' + sinf.base + skin +
       
   991                           '/' + mod + '.css',
       
   992                     ext: ext
       
   993                 };
       
   994                 if (mdef.base) {
       
   995                     nmod.base = mdef.base;
       
   996                 }
       
   997                 if (mdef.configFn) {
       
   998                     nmod.configFn = mdef.configFn;
       
   999                 }
       
  1000                 this.addModule(nmod, name);
       
  1001 
       
  1002             }
       
  1003         }
       
  1004 
       
  1005         return name;
       
  1006     },
       
  1007     /**
       
  1008     * Adds an alias module to the system
       
  1009     * @method addAlias
       
  1010     * @param {Array} use An array of modules that makes up this alias
       
  1011     * @param {String} name The name of the alias
       
  1012     * @example
       
  1013     *       var loader = new Y.Loader({});
       
  1014     *       loader.addAlias([ 'node', 'yql' ], 'davglass');
       
  1015     *       loader.require(['davglass']);
       
  1016     *       var out = loader.resolve(true);
       
  1017     *
       
  1018     *       //out.js will contain Node and YQL modules
       
  1019     */
       
  1020     addAlias: function(use, name) {
       
  1021         YUI.Env.aliases[name] = use;
       
  1022         this.addModule({
       
  1023             name: name,
       
  1024             use: use
       
  1025         });
       
  1026     },
       
  1027     /**
       
  1028      * Add a new module group
       
  1029      * @method addGroup
       
  1030      * @param {Object} config An object containing the group configuration data
       
  1031      * @param {String} config.name required, the group name
       
  1032      * @param {String} config.base The base directory for this module group
       
  1033      * @param {String} config.root The root path to add to each combo resource path
       
  1034      * @param {Boolean} config.combine Should the request be combined
       
  1035      * @param {String} config.comboBase Combo service base path
       
  1036      * @param {Object} config.modules The group of modules
       
  1037      * @param {String} name the group name.
       
  1038      * @example
       
  1039      *      var loader = new Y.Loader({});
       
  1040      *      loader.addGroup({
       
  1041      *          name: 'davglass',
       
  1042      *          combine: true,
       
  1043      *          comboBase: '/combo?',
       
  1044      *          root: '',
       
  1045      *          modules: {
       
  1046      *              //Module List here
       
  1047      *          }
       
  1048      *      }, 'davglass');
       
  1049      */
       
  1050     addGroup: function(o, name) {
       
  1051         var mods = o.modules,
       
  1052             self = this, i, v;
       
  1053 
       
  1054         name = name || o.name;
       
  1055         o.name = name;
       
  1056         self.groups[name] = o;
       
  1057 
       
  1058         if (o.patterns) {
       
  1059             for (i in o.patterns) {
       
  1060                 if (o.patterns.hasOwnProperty(i)) {
       
  1061                     o.patterns[i].group = name;
       
  1062                     self.patterns[i] = o.patterns[i];
       
  1063                 }
       
  1064             }
       
  1065         }
       
  1066 
       
  1067         if (mods) {
       
  1068             for (i in mods) {
       
  1069                 if (mods.hasOwnProperty(i)) {
       
  1070                     v = mods[i];
       
  1071                     if (typeof v === 'string') {
       
  1072                         v = { name: i, fullpath: v };
       
  1073                     }
       
  1074                     v.group = name;
       
  1075                     self.addModule(v, i);
       
  1076                 }
       
  1077             }
       
  1078         }
       
  1079     },
       
  1080 
       
  1081     /**
       
  1082      * Add a new module to the component metadata.
       
  1083      * @method addModule
       
  1084      * @param {Object} config An object containing the module data.
       
  1085      * @param {String} config.name Required, the component name
       
  1086      * @param {String} config.type Required, the component type (js or css)
       
  1087      * @param {String} config.path Required, the path to the script from `base`
       
  1088      * @param {Array} config.requires Array of modules required by this component
       
  1089      * @param {Array} [config.optional] Array of optional modules for this component
       
  1090      * @param {Array} [config.supersedes] Array of the modules this component replaces
       
  1091      * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one
       
  1092      * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array
       
  1093      * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup
       
  1094      * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path`
       
  1095      * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in
       
  1096      * @param {Object} [config.submodules] Hash of submodules
       
  1097      * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration.
       
  1098      * @param {Array} [config.lang] Array of BCP 47 language tags of languages for which this module has localized resource bundles, e.g., `["en-GB", "zh-Hans-CN"]`
       
  1099      * @param {Object} [config.condition] Specifies that the module should be loaded automatically if a condition is met. This is an object with up to four fields:
       
  1100      * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load
       
  1101      * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded.
       
  1102      * @param {String} [config.condition.ua] The UA name of <a href="UA.html">Y.UA</a> object that returns true when the module is to be loaded. e.g., `"ie"`, `"nodejs"`.
       
  1103      * @param {String} [config.condition.when] Specifies the load order of the conditional module
       
  1104      *  with regard to the position of the trigger module.
       
  1105      *  This should be one of three values: `before`, `after`, or `instead`.  The default is `after`.
       
  1106      * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()`
       
  1107      * @param {Function} [config.configFn] A function to exectute when configuring this module
       
  1108      * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config.
       
  1109      * @param {String} [name] The module name, required if not in the module data.
       
  1110      * @return {Object} the module definition or null if the object passed in did not provide all required attributes.
       
  1111      */
       
  1112     addModule: function(o, name) {
       
  1113         name = name || o.name;
       
  1114 
       
  1115         if (typeof o === 'string') {
       
  1116             o = { name: name, fullpath: o };
       
  1117         }
       
  1118 
       
  1119 
       
  1120         var subs, i, l, t, sup, s, smod, plugins, plug,
       
  1121             j, langs, packName, supName, flatSup, flatLang, lang, ret,
       
  1122             overrides, skinname, when, g, p,
       
  1123             conditions = this.conditions, trigger;
       
  1124 
       
  1125         //Only merge this data if the temp flag is set
       
  1126         //from an earlier pass from a pattern or else
       
  1127         //an override module (YUI_config) can not be used to
       
  1128         //replace a default module.
       
  1129         if (this.moduleInfo[name] && this.moduleInfo[name].temp) {
       
  1130             //This catches temp modules loaded via a pattern
       
  1131             // The module will be added twice, once from the pattern and
       
  1132             // Once from the actual add call, this ensures that properties
       
  1133             // that were added to the module the first time around (group: gallery)
       
  1134             // are also added the second time around too.
       
  1135             o = Y.merge(this.moduleInfo[name], o);
       
  1136         }
       
  1137 
       
  1138         o.name = name;
       
  1139 
       
  1140         if (!o || !o.name) {
       
  1141             return null;
       
  1142         }
       
  1143 
       
  1144         if (!o.type) {
       
  1145             //Always assume it's javascript unless the CSS pattern is matched.
       
  1146             o.type = JS;
       
  1147             p = o.path || o.fullpath;
       
  1148             if (p && this.REGEX_CSS.test(p)) {
       
  1149                 o.type = CSS;
       
  1150             }
       
  1151         }
       
  1152 
       
  1153         if (!o.path && !o.fullpath) {
       
  1154             o.path = _path(name, name, o.type);
       
  1155         }
       
  1156         o.supersedes = o.supersedes || o.use;
       
  1157 
       
  1158         o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
       
  1159 
       
  1160         // Handle submodule logic
       
  1161         subs = o.submodules;
       
  1162 
       
  1163         this.moduleInfo[name] = o;
       
  1164 
       
  1165         o.requires = o.requires || [];
       
  1166 
       
  1167         /*
       
  1168         Only allowing the cascade of requires information, since
       
  1169         optional and supersedes are far more fine grained than
       
  1170         a blanket requires is.
       
  1171         */
       
  1172         if (this.requires) {
       
  1173             for (i = 0; i < this.requires.length; i++) {
       
  1174                 o.requires.push(this.requires[i]);
       
  1175             }
       
  1176         }
       
  1177         if (o.group && this.groups && this.groups[o.group]) {
       
  1178             g = this.groups[o.group];
       
  1179             if (g.requires) {
       
  1180                 for (i = 0; i < g.requires.length; i++) {
       
  1181                     o.requires.push(g.requires[i]);
       
  1182                 }
       
  1183             }
       
  1184         }
       
  1185 
       
  1186 
       
  1187         if (!o.defaults) {
       
  1188             o.defaults = {
       
  1189                 requires: o.requires ? [].concat(o.requires) : null,
       
  1190                 supersedes: o.supersedes ? [].concat(o.supersedes) : null,
       
  1191                 optional: o.optional ? [].concat(o.optional) : null
       
  1192             };
       
  1193         }
       
  1194 
       
  1195         if (o.skinnable && o.ext && o.temp) {
       
  1196             skinname = this._addSkin(this.skin.defaultSkin, name);
       
  1197             o.requires.unshift(skinname);
       
  1198         }
       
  1199 
       
  1200         if (o.requires.length) {
       
  1201             o.requires = this.filterRequires(o.requires) || [];
       
  1202         }
       
  1203 
       
  1204         if (!o.langPack && o.lang) {
       
  1205             langs = yArray(o.lang);
       
  1206             for (j = 0; j < langs.length; j++) {
       
  1207                 lang = langs[j];
       
  1208                 packName = this.getLangPackName(lang, name);
       
  1209                 smod = this.moduleInfo[packName];
       
  1210                 if (!smod) {
       
  1211                     smod = this._addLangPack(lang, o, packName);
       
  1212                 }
       
  1213             }
       
  1214         }
       
  1215 
       
  1216 
       
  1217         if (subs) {
       
  1218             sup = o.supersedes || [];
       
  1219             l = 0;
       
  1220 
       
  1221             for (i in subs) {
       
  1222                 if (subs.hasOwnProperty(i)) {
       
  1223                     s = subs[i];
       
  1224 
       
  1225                     s.path = s.path || _path(name, i, o.type);
       
  1226                     s.pkg = name;
       
  1227                     s.group = o.group;
       
  1228 
       
  1229                     if (s.supersedes) {
       
  1230                         sup = sup.concat(s.supersedes);
       
  1231                     }
       
  1232 
       
  1233                     smod = this.addModule(s, i);
       
  1234                     sup.push(i);
       
  1235 
       
  1236                     if (smod.skinnable) {
       
  1237                         o.skinnable = true;
       
  1238                         overrides = this.skin.overrides;
       
  1239                         if (overrides && overrides[i]) {
       
  1240                             for (j = 0; j < overrides[i].length; j++) {
       
  1241                                 skinname = this._addSkin(overrides[i][j],
       
  1242                                          i, name);
       
  1243                                 sup.push(skinname);
       
  1244                             }
       
  1245                         }
       
  1246                         skinname = this._addSkin(this.skin.defaultSkin,
       
  1247                                         i, name);
       
  1248                         sup.push(skinname);
       
  1249                     }
       
  1250 
       
  1251                     // looks like we are expected to work out the metadata
       
  1252                     // for the parent module language packs from what is
       
  1253                     // specified in the child modules.
       
  1254                     if (s.lang && s.lang.length) {
       
  1255 
       
  1256                         langs = yArray(s.lang);
       
  1257                         for (j = 0; j < langs.length; j++) {
       
  1258                             lang = langs[j];
       
  1259                             packName = this.getLangPackName(lang, name);
       
  1260                             supName = this.getLangPackName(lang, i);
       
  1261                             smod = this.moduleInfo[packName];
       
  1262 
       
  1263                             if (!smod) {
       
  1264                                 smod = this._addLangPack(lang, o, packName);
       
  1265                             }
       
  1266 
       
  1267                             flatSup = flatSup || yArray.hash(smod.supersedes);
       
  1268 
       
  1269                             if (!(supName in flatSup)) {
       
  1270                                 smod.supersedes.push(supName);
       
  1271                             }
       
  1272 
       
  1273                             o.lang = o.lang || [];
       
  1274 
       
  1275                             flatLang = flatLang || yArray.hash(o.lang);
       
  1276 
       
  1277                             if (!(lang in flatLang)) {
       
  1278                                 o.lang.push(lang);
       
  1279                             }
       
  1280 
       
  1281 // Add rollup file, need to add to supersedes list too
       
  1282 
       
  1283                             // default packages
       
  1284                             packName = this.getLangPackName(ROOT_LANG, name);
       
  1285                             supName = this.getLangPackName(ROOT_LANG, i);
       
  1286 
       
  1287                             smod = this.moduleInfo[packName];
       
  1288 
       
  1289                             if (!smod) {
       
  1290                                 smod = this._addLangPack(lang, o, packName);
       
  1291                             }
       
  1292 
       
  1293                             if (!(supName in flatSup)) {
       
  1294                                 smod.supersedes.push(supName);
       
  1295                             }
       
  1296 
       
  1297 // Add rollup file, need to add to supersedes list too
       
  1298 
       
  1299                         }
       
  1300                     }
       
  1301 
       
  1302                     l++;
       
  1303                 }
       
  1304             }
       
  1305             //o.supersedes = YObject.keys(yArray.hash(sup));
       
  1306             o.supersedes = yArray.dedupe(sup);
       
  1307             if (this.allowRollup) {
       
  1308                 o.rollup = (l < 4) ? l : Math.min(l - 1, 4);
       
  1309             }
       
  1310         }
       
  1311 
       
  1312         plugins = o.plugins;
       
  1313         if (plugins) {
       
  1314             for (i in plugins) {
       
  1315                 if (plugins.hasOwnProperty(i)) {
       
  1316                     plug = plugins[i];
       
  1317                     plug.pkg = name;
       
  1318                     plug.path = plug.path || _path(name, i, o.type);
       
  1319                     plug.requires = plug.requires || [];
       
  1320                     plug.group = o.group;
       
  1321                     this.addModule(plug, i);
       
  1322                     if (o.skinnable) {
       
  1323                         this._addSkin(this.skin.defaultSkin, i, name);
       
  1324                     }
       
  1325 
       
  1326                 }
       
  1327             }
       
  1328         }
       
  1329 
       
  1330         if (o.condition) {
       
  1331             t = o.condition.trigger;
       
  1332             if (YUI.Env.aliases[t]) {
       
  1333                 t = YUI.Env.aliases[t];
       
  1334             }
       
  1335             if (!Y.Lang.isArray(t)) {
       
  1336                 t = [t];
       
  1337             }
       
  1338 
       
  1339             for (i = 0; i < t.length; i++) {
       
  1340                 trigger = t[i];
       
  1341                 when = o.condition.when;
       
  1342                 conditions[trigger] = conditions[trigger] || {};
       
  1343                 conditions[trigger][name] = o.condition;
       
  1344                 // the 'when' attribute can be 'before', 'after', or 'instead'
       
  1345                 // the default is after.
       
  1346                 if (when && when !== 'after') {
       
  1347                     if (when === 'instead') { // replace the trigger
       
  1348                         o.supersedes = o.supersedes || [];
       
  1349                         o.supersedes.push(trigger);
       
  1350                     }
       
  1351                     // before the trigger
       
  1352                         // the trigger requires the conditional mod,
       
  1353                         // so it should appear before the conditional
       
  1354                         // mod if we do not intersede.
       
  1355                 } else { // after the trigger
       
  1356                     o.after = o.after || [];
       
  1357                     o.after.push(trigger);
       
  1358                 }
       
  1359             }
       
  1360         }
       
  1361 
       
  1362         if (o.supersedes) {
       
  1363             o.supersedes = this.filterRequires(o.supersedes);
       
  1364         }
       
  1365 
       
  1366         if (o.after) {
       
  1367             o.after = this.filterRequires(o.after);
       
  1368             o.after_map = yArray.hash(o.after);
       
  1369         }
       
  1370 
       
  1371         // this.dirty = true;
       
  1372 
       
  1373         if (o.configFn) {
       
  1374             ret = o.configFn(o);
       
  1375             if (ret === false) {
       
  1376                 delete this.moduleInfo[name];
       
  1377                 delete GLOBAL_ENV._renderedMods[name];
       
  1378                 o = null;
       
  1379             }
       
  1380         }
       
  1381         //Add to global cache
       
  1382         if (o) {
       
  1383             if (!GLOBAL_ENV._renderedMods) {
       
  1384                 GLOBAL_ENV._renderedMods = {};
       
  1385             }
       
  1386             GLOBAL_ENV._renderedMods[name] = Y.mix(GLOBAL_ENV._renderedMods[name] || {}, o);
       
  1387             GLOBAL_ENV._conditions = conditions;
       
  1388         }
       
  1389 
       
  1390         return o;
       
  1391     },
       
  1392 
       
  1393     /**
       
  1394      * Add a requirement for one or more module
       
  1395      * @method require
       
  1396      * @param {string[] | string*} what the modules to load.
       
  1397      */
       
  1398     require: function(what) {
       
  1399         var a = (typeof what === 'string') ? yArray(arguments) : what;
       
  1400         this.dirty = true;
       
  1401         this.required = Y.merge(this.required, yArray.hash(this.filterRequires(a)));
       
  1402 
       
  1403         this._explodeRollups();
       
  1404     },
       
  1405     /**
       
  1406     * Grab all the items that were asked for, check to see if the Loader
       
  1407     * meta-data contains a "use" array. If it doesm remove the asked item and replace it with
       
  1408     * the content of the "use".
       
  1409     * This will make asking for: "dd"
       
  1410     * Actually ask for: "dd-ddm-base,dd-ddm,dd-ddm-drop,dd-drag,dd-proxy,dd-constrain,dd-drop,dd-scroll,dd-drop-plugin"
       
  1411     * @private
       
  1412     * @method _explodeRollups
       
  1413     */
       
  1414     _explodeRollups: function() {
       
  1415         var self = this, m, m2, i, a, v, len, len2,
       
  1416         r = self.required;
       
  1417 
       
  1418         if (!self.allowRollup) {
       
  1419             for (i in r) {
       
  1420                 if (r.hasOwnProperty(i)) {
       
  1421                     m = self.getModule(i);
       
  1422                     if (m && m.use) {
       
  1423                         len = m.use.length;
       
  1424                         for (a = 0; a < len; a++) {
       
  1425                             m2 = self.getModule(m.use[a]);
       
  1426                             if (m2 && m2.use) {
       
  1427                                 len2 = m2.use.length;
       
  1428                                 for (v = 0; v < len2; v++) {
       
  1429                                     r[m2.use[v]] = true;
       
  1430                                 }
       
  1431                             } else {
       
  1432                                 r[m.use[a]] = true;
       
  1433                             }
       
  1434                         }
       
  1435                     }
       
  1436                 }
       
  1437             }
       
  1438             self.required = r;
       
  1439         }
       
  1440 
       
  1441     },
       
  1442     /**
       
  1443     * Explodes the required array to remove aliases and replace them with real modules
       
  1444     * @method filterRequires
       
  1445     * @param {Array} r The original requires array
       
  1446     * @return {Array} The new array of exploded requirements
       
  1447     */
       
  1448     filterRequires: function(r) {
       
  1449         if (r) {
       
  1450             if (!Y.Lang.isArray(r)) {
       
  1451                 r = [r];
       
  1452             }
       
  1453             r = Y.Array(r);
       
  1454             var c = [], i, mod, o, m;
       
  1455 
       
  1456             for (i = 0; i < r.length; i++) {
       
  1457                 mod = this.getModule(r[i]);
       
  1458                 if (mod && mod.use) {
       
  1459                     for (o = 0; o < mod.use.length; o++) {
       
  1460                         //Must walk the other modules in case a module is a rollup of rollups (datatype)
       
  1461                         m = this.getModule(mod.use[o]);
       
  1462                         if (m && m.use && (m.name !== mod.name)) {
       
  1463                             c = Y.Array.dedupe([].concat(c, this.filterRequires(m.use)));
       
  1464                         } else {
       
  1465                             c.push(mod.use[o]);
       
  1466                         }
       
  1467                     }
       
  1468                 } else {
       
  1469                     c.push(r[i]);
       
  1470                 }
       
  1471             }
       
  1472             r = c;
       
  1473         }
       
  1474         return r;
       
  1475     },
       
  1476     /**
       
  1477      * Returns an object containing properties for all modules required
       
  1478      * in order to load the requested module
       
  1479      * @method getRequires
       
  1480      * @param {object}  mod The module definition from moduleInfo.
       
  1481      * @return {array} the expanded requirement list.
       
  1482      */
       
  1483     getRequires: function(mod) {
       
  1484 
       
  1485         if (!mod) {
       
  1486             //console.log('returning no reqs for ' + mod.name);
       
  1487             return NO_REQUIREMENTS;
       
  1488         }
       
  1489 
       
  1490         if (mod._parsed) {
       
  1491             //console.log('returning requires for ' + mod.name, mod.requires);
       
  1492             return mod.expanded || NO_REQUIREMENTS;
       
  1493         }
       
  1494 
       
  1495         //TODO add modue cache here out of scope..
       
  1496 
       
  1497         var i, m, j, add, packName, lang, testresults = this.testresults,
       
  1498             name = mod.name, cond,
       
  1499             adddef = ON_PAGE[name] && ON_PAGE[name].details,
       
  1500             d, go, def,
       
  1501             r, old_mod,
       
  1502             o, skinmod, skindef, skinpar, skinname,
       
  1503             intl = mod.lang || mod.intl,
       
  1504             info = this.moduleInfo,
       
  1505             ftests = Y.Features && Y.Features.tests.load,
       
  1506             hash, reparse;
       
  1507 
       
  1508         // console.log(name);
       
  1509 
       
  1510         // pattern match leaves module stub that needs to be filled out
       
  1511         if (mod.temp && adddef) {
       
  1512             old_mod = mod;
       
  1513             mod = this.addModule(adddef, name);
       
  1514             mod.group = old_mod.group;
       
  1515             mod.pkg = old_mod.pkg;
       
  1516             delete mod.expanded;
       
  1517         }
       
  1518 
       
  1519         // console.log('cache: ' + mod.langCache + ' == ' + this.lang);
       
  1520 
       
  1521         //If a skin or a lang is different, reparse..
       
  1522         reparse = !((!this.lang || mod.langCache === this.lang) && (mod.skinCache === this.skin.defaultSkin));
       
  1523 
       
  1524         if (mod.expanded && !reparse) {
       
  1525             return mod.expanded;
       
  1526         }
       
  1527 
       
  1528 
       
  1529         d = [];
       
  1530         hash = {};
       
  1531         r = this.filterRequires(mod.requires);
       
  1532         if (mod.lang) {
       
  1533             //If a module has a lang attribute, auto add the intl requirement.
       
  1534             d.unshift('intl');
       
  1535             r.unshift('intl');
       
  1536             intl = true;
       
  1537         }
       
  1538         o = this.filterRequires(mod.optional);
       
  1539 
       
  1540 
       
  1541         mod._parsed = true;
       
  1542         mod.langCache = this.lang;
       
  1543         mod.skinCache = this.skin.defaultSkin;
       
  1544 
       
  1545         for (i = 0; i < r.length; i++) {
       
  1546             if (!hash[r[i]]) {
       
  1547                 d.push(r[i]);
       
  1548                 hash[r[i]] = true;
       
  1549                 m = this.getModule(r[i]);
       
  1550                 if (m) {
       
  1551                     add = this.getRequires(m);
       
  1552                     intl = intl || (m.expanded_map &&
       
  1553                         (INTL in m.expanded_map));
       
  1554                     for (j = 0; j < add.length; j++) {
       
  1555                         d.push(add[j]);
       
  1556                     }
       
  1557                 }
       
  1558             }
       
  1559         }
       
  1560 
       
  1561         // get the requirements from superseded modules, if any
       
  1562         r = this.filterRequires(mod.supersedes);
       
  1563         if (r) {
       
  1564             for (i = 0; i < r.length; i++) {
       
  1565                 if (!hash[r[i]]) {
       
  1566                     // if this module has submodules, the requirements list is
       
  1567                     // expanded to include the submodules.  This is so we can
       
  1568                     // prevent dups when a submodule is already loaded and the
       
  1569                     // parent is requested.
       
  1570                     if (mod.submodules) {
       
  1571                         d.push(r[i]);
       
  1572                     }
       
  1573 
       
  1574                     hash[r[i]] = true;
       
  1575                     m = this.getModule(r[i]);
       
  1576 
       
  1577                     if (m) {
       
  1578                         add = this.getRequires(m);
       
  1579                         intl = intl || (m.expanded_map &&
       
  1580                             (INTL in m.expanded_map));
       
  1581                         for (j = 0; j < add.length; j++) {
       
  1582                             d.push(add[j]);
       
  1583                         }
       
  1584                     }
       
  1585                 }
       
  1586             }
       
  1587         }
       
  1588 
       
  1589         if (o && this.loadOptional) {
       
  1590             for (i = 0; i < o.length; i++) {
       
  1591                 if (!hash[o[i]]) {
       
  1592                     d.push(o[i]);
       
  1593                     hash[o[i]] = true;
       
  1594                     m = info[o[i]];
       
  1595                     if (m) {
       
  1596                         add = this.getRequires(m);
       
  1597                         intl = intl || (m.expanded_map &&
       
  1598                             (INTL in m.expanded_map));
       
  1599                         for (j = 0; j < add.length; j++) {
       
  1600                             d.push(add[j]);
       
  1601                         }
       
  1602                     }
       
  1603                 }
       
  1604             }
       
  1605         }
       
  1606 
       
  1607         cond = this.conditions[name];
       
  1608 
       
  1609         if (cond) {
       
  1610             //Set the module to not parsed since we have conditionals and this could change the dependency tree.
       
  1611             mod._parsed = false;
       
  1612             if (testresults && ftests) {
       
  1613                 oeach(testresults, function(result, id) {
       
  1614                     var condmod = ftests[id].name;
       
  1615                     if (!hash[condmod] && ftests[id].trigger === name) {
       
  1616                         if (result && ftests[id]) {
       
  1617                             hash[condmod] = true;
       
  1618                             d.push(condmod);
       
  1619                         }
       
  1620                     }
       
  1621                 });
       
  1622             } else {
       
  1623                 for (i in cond) {
       
  1624                     if (cond.hasOwnProperty(i)) {
       
  1625                         if (!hash[i]) {
       
  1626                             def = cond[i];
       
  1627                             //first see if they've specfied a ua check
       
  1628                             //then see if they've got a test fn & if it returns true
       
  1629                             //otherwise just having a condition block is enough
       
  1630                             go = def && ((!def.ua && !def.test) || (def.ua && Y.UA[def.ua]) ||
       
  1631                                         (def.test && def.test(Y, r)));
       
  1632 
       
  1633                             if (go) {
       
  1634                                 hash[i] = true;
       
  1635                                 d.push(i);
       
  1636                                 m = this.getModule(i);
       
  1637                                 if (m) {
       
  1638                                     add = this.getRequires(m);
       
  1639                                     for (j = 0; j < add.length; j++) {
       
  1640                                         d.push(add[j]);
       
  1641                                     }
       
  1642 
       
  1643                                 }
       
  1644                             }
       
  1645                         }
       
  1646                     }
       
  1647                 }
       
  1648             }
       
  1649         }
       
  1650 
       
  1651         // Create skin modules
       
  1652         if (mod.skinnable) {
       
  1653             skindef = this.skin.overrides;
       
  1654             for (i in YUI.Env.aliases) {
       
  1655                 if (YUI.Env.aliases.hasOwnProperty(i)) {
       
  1656                     if (Y.Array.indexOf(YUI.Env.aliases[i], name) > -1) {
       
  1657                         skinpar = i;
       
  1658                     }
       
  1659                 }
       
  1660             }
       
  1661             if (skindef && (skindef[name] || (skinpar && skindef[skinpar]))) {
       
  1662                 skinname = name;
       
  1663                 if (skindef[skinpar]) {
       
  1664                     skinname = skinpar;
       
  1665                 }
       
  1666                 for (i = 0; i < skindef[skinname].length; i++) {
       
  1667                     skinmod = this._addSkin(skindef[skinname][i], name);
       
  1668                     if (!this.isCSSLoaded(skinmod, this._boot)) {
       
  1669                         d.push(skinmod);
       
  1670                     }
       
  1671                 }
       
  1672             } else {
       
  1673                 skinmod = this._addSkin(this.skin.defaultSkin, name);
       
  1674                 if (!this.isCSSLoaded(skinmod, this._boot)) {
       
  1675                     d.push(skinmod);
       
  1676                 }
       
  1677             }
       
  1678         }
       
  1679 
       
  1680         mod._parsed = false;
       
  1681 
       
  1682         if (intl) {
       
  1683 
       
  1684             if (mod.lang && !mod.langPack && Y.Intl) {
       
  1685                 lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang);
       
  1686                 packName = this.getLangPackName(lang, name);
       
  1687                 if (packName) {
       
  1688                     d.unshift(packName);
       
  1689                 }
       
  1690             }
       
  1691             d.unshift(INTL);
       
  1692         }
       
  1693 
       
  1694         mod.expanded_map = yArray.hash(d);
       
  1695 
       
  1696         mod.expanded = YObject.keys(mod.expanded_map);
       
  1697 
       
  1698         return mod.expanded;
       
  1699     },
       
  1700     /**
       
  1701     * Check to see if named css module is already loaded on the page
       
  1702     * @method isCSSLoaded
       
  1703     * @param {String} name The name of the css file
       
  1704     * @return Boolean
       
  1705     */
       
  1706     isCSSLoaded: function(name, skip) {
       
  1707         //TODO - Make this call a batching call with name being an array
       
  1708         if (!name || !YUI.Env.cssStampEl || (!skip && this.ignoreRegistered)) {
       
  1709             return false;
       
  1710         }
       
  1711         var el = YUI.Env.cssStampEl,
       
  1712             ret = false,
       
  1713             mod = YUI.Env._cssLoaded[name],
       
  1714             style = el.currentStyle; //IE
       
  1715 
       
  1716 
       
  1717         if (mod !== undefined) {
       
  1718             return mod;
       
  1719         }
       
  1720 
       
  1721         //Add the classname to the element
       
  1722         el.className = name;
       
  1723 
       
  1724         if (!style) {
       
  1725             style = Y.config.doc.defaultView.getComputedStyle(el, null);
       
  1726         }
       
  1727 
       
  1728         if (style && style.display === 'none') {
       
  1729             ret = true;
       
  1730         }
       
  1731 
       
  1732 
       
  1733         el.className = ''; //Reset the classname to ''
       
  1734 
       
  1735         YUI.Env._cssLoaded[name] = ret;
       
  1736 
       
  1737         return ret;
       
  1738     },
       
  1739 
       
  1740     /**
       
  1741      * Returns a hash of module names the supplied module satisfies.
       
  1742      * @method getProvides
       
  1743      * @param {string} name The name of the module.
       
  1744      * @return {object} what this module provides.
       
  1745      */
       
  1746     getProvides: function(name) {
       
  1747         var m = this.getModule(name), o, s;
       
  1748             // supmap = this.provides;
       
  1749 
       
  1750         if (!m) {
       
  1751             return NOT_FOUND;
       
  1752         }
       
  1753 
       
  1754         if (m && !m.provides) {
       
  1755             o = {};
       
  1756             s = m.supersedes;
       
  1757 
       
  1758             if (s) {
       
  1759                 yArray.each(s, function(v) {
       
  1760                     Y.mix(o, this.getProvides(v));
       
  1761                 }, this);
       
  1762             }
       
  1763 
       
  1764             o[name] = true;
       
  1765             m.provides = o;
       
  1766 
       
  1767         }
       
  1768 
       
  1769         return m.provides;
       
  1770     },
       
  1771 
       
  1772     /**
       
  1773      * Calculates the dependency tree, the result is stored in the sorted
       
  1774      * property.
       
  1775      * @method calculate
       
  1776      * @param {object} o optional options object.
       
  1777      * @param {string} type optional argument to prune modules.
       
  1778      */
       
  1779     calculate: function(o, type) {
       
  1780         if (o || type || this.dirty) {
       
  1781 
       
  1782             if (o) {
       
  1783                 this._config(o);
       
  1784             }
       
  1785 
       
  1786             if (!this._init) {
       
  1787                 this._setup();
       
  1788             }
       
  1789 
       
  1790             this._explode();
       
  1791 
       
  1792             if (this.allowRollup) {
       
  1793                 this._rollup();
       
  1794             } else {
       
  1795                 this._explodeRollups();
       
  1796             }
       
  1797             this._reduce();
       
  1798             this._sort();
       
  1799         }
       
  1800     },
       
  1801     /**
       
  1802     * Creates a "psuedo" package for languages provided in the lang array
       
  1803     * @method _addLangPack
       
  1804     * @private
       
  1805     * @param {String} lang The language to create
       
  1806     * @param {Object} m The module definition to create the language pack around
       
  1807     * @param {String} packName The name of the package (e.g: lang/datatype-date-en-US)
       
  1808     * @return {Object} The module definition
       
  1809     */
       
  1810     _addLangPack: function(lang, m, packName) {
       
  1811         var name = m.name,
       
  1812             packPath, conf,
       
  1813             existing = this.moduleInfo[packName];
       
  1814 
       
  1815         if (!existing) {
       
  1816 
       
  1817             packPath = _path((m.pkg || name), packName, JS, true);
       
  1818 
       
  1819             conf = {
       
  1820                 path: packPath,
       
  1821                 intl: true,
       
  1822                 langPack: true,
       
  1823                 ext: m.ext,
       
  1824                 group: m.group,
       
  1825                 supersedes: []
       
  1826             };
       
  1827             if (m.root) {
       
  1828                 conf.root = m.root;
       
  1829             }
       
  1830             if (m.base) {
       
  1831                 conf.base = m.base;
       
  1832             }
       
  1833 
       
  1834             if (m.configFn) {
       
  1835                 conf.configFn = m.configFn;
       
  1836             }
       
  1837 
       
  1838             this.addModule(conf, packName);
       
  1839 
       
  1840             if (lang) {
       
  1841                 Y.Env.lang = Y.Env.lang || {};
       
  1842                 Y.Env.lang[lang] = Y.Env.lang[lang] || {};
       
  1843                 Y.Env.lang[lang][name] = true;
       
  1844             }
       
  1845         }
       
  1846 
       
  1847         return this.moduleInfo[packName];
       
  1848     },
       
  1849 
       
  1850     /**
       
  1851      * Investigates the current YUI configuration on the page.  By default,
       
  1852      * modules already detected will not be loaded again unless a force
       
  1853      * option is encountered.  Called by calculate()
       
  1854      * @method _setup
       
  1855      * @private
       
  1856      */
       
  1857     _setup: function() {
       
  1858         var info = this.moduleInfo, name, i, j, m, l,
       
  1859             packName;
       
  1860 
       
  1861         for (name in info) {
       
  1862             if (info.hasOwnProperty(name)) {
       
  1863                 m = info[name];
       
  1864                 if (m) {
       
  1865 
       
  1866                     // remove dups
       
  1867                     //m.requires = YObject.keys(yArray.hash(m.requires));
       
  1868                     m.requires = yArray.dedupe(m.requires);
       
  1869 
       
  1870                     // Create lang pack modules
       
  1871                     //if (m.lang && m.lang.length) {
       
  1872                     if (m.lang) {
       
  1873                         // Setup root package if the module has lang defined,
       
  1874                         // it needs to provide a root language pack
       
  1875                         packName = this.getLangPackName(ROOT_LANG, name);
       
  1876                         this._addLangPack(null, m, packName);
       
  1877                     }
       
  1878 
       
  1879                 }
       
  1880             }
       
  1881         }
       
  1882 
       
  1883 
       
  1884         //l = Y.merge(this.inserted);
       
  1885         l = {};
       
  1886 
       
  1887         // available modules
       
  1888         if (!this.ignoreRegistered) {
       
  1889             Y.mix(l, GLOBAL_ENV.mods);
       
  1890         }
       
  1891 
       
  1892         // add the ignore list to the list of loaded packages
       
  1893         if (this.ignore) {
       
  1894             Y.mix(l, yArray.hash(this.ignore));
       
  1895         }
       
  1896 
       
  1897         // expand the list to include superseded modules
       
  1898         for (j in l) {
       
  1899             if (l.hasOwnProperty(j)) {
       
  1900                 Y.mix(l, this.getProvides(j));
       
  1901             }
       
  1902         }
       
  1903 
       
  1904         // remove modules on the force list from the loaded list
       
  1905         if (this.force) {
       
  1906             for (i = 0; i < this.force.length; i++) {
       
  1907                 if (this.force[i] in l) {
       
  1908                     delete l[this.force[i]];
       
  1909                 }
       
  1910             }
       
  1911         }
       
  1912 
       
  1913         Y.mix(this.loaded, l);
       
  1914 
       
  1915         this._init = true;
       
  1916     },
       
  1917 
       
  1918     /**
       
  1919      * Builds a module name for a language pack
       
  1920      * @method getLangPackName
       
  1921      * @param {string} lang the language code.
       
  1922      * @param {string} mname the module to build it for.
       
  1923      * @return {string} the language pack module name.
       
  1924      */
       
  1925     getLangPackName: function(lang, mname) {
       
  1926         return ('lang/' + mname + ((lang) ? '_' + lang : ''));
       
  1927     },
       
  1928     /**
       
  1929      * Inspects the required modules list looking for additional
       
  1930      * dependencies.  Expands the required list to include all
       
  1931      * required modules.  Called by calculate()
       
  1932      * @method _explode
       
  1933      * @private
       
  1934      */
       
  1935     _explode: function() {
       
  1936         //TODO Move done out of scope
       
  1937         var r = this.required, m, reqs, done = {},
       
  1938             self = this, name, expound;
       
  1939 
       
  1940         // the setup phase is over, all modules have been created
       
  1941         self.dirty = false;
       
  1942 
       
  1943         self._explodeRollups();
       
  1944         r = self.required;
       
  1945 
       
  1946         for (name in r) {
       
  1947             if (r.hasOwnProperty(name)) {
       
  1948                 if (!done[name]) {
       
  1949                     done[name] = true;
       
  1950                     m = self.getModule(name);
       
  1951                     if (m) {
       
  1952                         expound = m.expound;
       
  1953 
       
  1954                         if (expound) {
       
  1955                             r[expound] = self.getModule(expound);
       
  1956                             reqs = self.getRequires(r[expound]);
       
  1957                             Y.mix(r, yArray.hash(reqs));
       
  1958                         }
       
  1959 
       
  1960                         reqs = self.getRequires(m);
       
  1961                         Y.mix(r, yArray.hash(reqs));
       
  1962                     }
       
  1963                 }
       
  1964             }
       
  1965         }
       
  1966 
       
  1967     },
       
  1968     /**
       
  1969     * The default method used to test a module against a pattern
       
  1970     * @method _patternTest
       
  1971     * @private
       
  1972     * @param {String} mname The module being tested
       
  1973     * @param {String} pname The pattern to match
       
  1974     */
       
  1975     _patternTest: function(mname, pname) {
       
  1976         return (mname.indexOf(pname) > -1);
       
  1977     },
       
  1978     /**
       
  1979     * Get's the loader meta data for the requested module
       
  1980     * @method getModule
       
  1981     * @param {String} mname The module name to get
       
  1982     * @return {Object} The module metadata
       
  1983     */
       
  1984     getModule: function(mname) {
       
  1985         //TODO: Remove name check - it's a quick hack to fix pattern WIP
       
  1986         if (!mname) {
       
  1987             return null;
       
  1988         }
       
  1989 
       
  1990         var p, found, pname,
       
  1991             m = this.moduleInfo[mname],
       
  1992             patterns = this.patterns;
       
  1993 
       
  1994         // check the patterns library to see if we should automatically add
       
  1995         // the module with defaults
       
  1996         if (!m || (m && m.ext)) {
       
  1997             for (pname in patterns) {
       
  1998                 if (patterns.hasOwnProperty(pname)) {
       
  1999                     p = patterns[pname];
       
  2000 
       
  2001                     //There is no test method, create a default one that tests
       
  2002                     // the pattern against the mod name
       
  2003                     if (!p.test) {
       
  2004                         p.test = this._patternTest;
       
  2005                     }
       
  2006 
       
  2007                     if (p.test(mname, pname)) {
       
  2008                         // use the metadata supplied for the pattern
       
  2009                         // as the module definition.
       
  2010                         found = p;
       
  2011                         break;
       
  2012                     }
       
  2013                 }
       
  2014             }
       
  2015         }
       
  2016 
       
  2017         if (!m) {
       
  2018             if (found) {
       
  2019                 if (p.action) {
       
  2020                     p.action.call(this, mname, pname);
       
  2021                 } else {
       
  2022                     // ext true or false?
       
  2023                     m = this.addModule(Y.merge(found), mname);
       
  2024                     if (found.configFn) {
       
  2025                         m.configFn = found.configFn;
       
  2026                     }
       
  2027                     m.temp = true;
       
  2028                 }
       
  2029             }
       
  2030         } else {
       
  2031             if (found && m && found.configFn && !m.configFn) {
       
  2032                 m.configFn = found.configFn;
       
  2033                 m.configFn(m);
       
  2034             }
       
  2035         }
       
  2036 
       
  2037         return m;
       
  2038     },
       
  2039 
       
  2040     // impl in rollup submodule
       
  2041     _rollup: function() { },
       
  2042 
       
  2043     /**
       
  2044      * Remove superceded modules and loaded modules.  Called by
       
  2045      * calculate() after we have the mega list of all dependencies
       
  2046      * @method _reduce
       
  2047      * @return {object} the reduced dependency hash.
       
  2048      * @private
       
  2049      */
       
  2050     _reduce: function(r) {
       
  2051 
       
  2052         r = r || this.required;
       
  2053 
       
  2054         var i, j, s, m, type = this.loadType,
       
  2055         ignore = this.ignore ? yArray.hash(this.ignore) : false;
       
  2056 
       
  2057         for (i in r) {
       
  2058             if (r.hasOwnProperty(i)) {
       
  2059                 m = this.getModule(i);
       
  2060                 // remove if already loaded
       
  2061                 if (((this.loaded[i] || ON_PAGE[i]) &&
       
  2062                         !this.forceMap[i] && !this.ignoreRegistered) ||
       
  2063                         (type && m && m.type !== type)) {
       
  2064                     delete r[i];
       
  2065                 }
       
  2066                 if (ignore && ignore[i]) {
       
  2067                     delete r[i];
       
  2068                 }
       
  2069                 // remove anything this module supersedes
       
  2070                 s = m && m.supersedes;
       
  2071                 if (s) {
       
  2072                     for (j = 0; j < s.length; j++) {
       
  2073                         if (s[j] in r) {
       
  2074                             delete r[s[j]];
       
  2075                         }
       
  2076                     }
       
  2077                 }
       
  2078             }
       
  2079         }
       
  2080 
       
  2081         return r;
       
  2082     },
       
  2083     /**
       
  2084     * Handles the queue when a module has been loaded for all cases
       
  2085     * @method _finish
       
  2086     * @private
       
  2087     * @param {String} msg The message from Loader
       
  2088     * @param {Boolean} success A boolean denoting success or failure
       
  2089     */
       
  2090     _finish: function(msg, success) {
       
  2091 
       
  2092         _queue.running = false;
       
  2093 
       
  2094         var onEnd = this.onEnd;
       
  2095         if (onEnd) {
       
  2096             onEnd.call(this.context, {
       
  2097                 msg: msg,
       
  2098                 data: this.data,
       
  2099                 success: success
       
  2100             });
       
  2101         }
       
  2102         this._continue();
       
  2103     },
       
  2104     /**
       
  2105     * The default Loader onSuccess handler, calls this.onSuccess with a payload
       
  2106     * @method _onSuccess
       
  2107     * @private
       
  2108     */
       
  2109     _onSuccess: function() {
       
  2110         var self = this, skipped = Y.merge(self.skipped), fn,
       
  2111             failed = [], rreg = self.requireRegistration,
       
  2112             success, msg, i, mod;
       
  2113 
       
  2114         for (i in skipped) {
       
  2115             if (skipped.hasOwnProperty(i)) {
       
  2116                 delete self.inserted[i];
       
  2117             }
       
  2118         }
       
  2119 
       
  2120         self.skipped = {};
       
  2121 
       
  2122         for (i in self.inserted) {
       
  2123             if (self.inserted.hasOwnProperty(i)) {
       
  2124                 mod = self.getModule(i);
       
  2125                 if (mod && rreg && mod.type === JS && !(i in YUI.Env.mods)) {
       
  2126                     failed.push(i);
       
  2127                 } else {
       
  2128                     Y.mix(self.loaded, self.getProvides(i));
       
  2129                 }
       
  2130             }
       
  2131         }
       
  2132 
       
  2133         fn = self.onSuccess;
       
  2134         msg = (failed.length) ? 'notregistered' : 'success';
       
  2135         success = !(failed.length);
       
  2136         if (fn) {
       
  2137             fn.call(self.context, {
       
  2138                 msg: msg,
       
  2139                 data: self.data,
       
  2140                 success: success,
       
  2141                 failed: failed,
       
  2142                 skipped: skipped
       
  2143             });
       
  2144         }
       
  2145         self._finish(msg, success);
       
  2146     },
       
  2147     /**
       
  2148     * The default Loader onProgress handler, calls this.onProgress with a payload
       
  2149     * @method _onProgress
       
  2150     * @private
       
  2151     */
       
  2152     _onProgress: function(e) {
       
  2153         var self = this, i;
       
  2154         //set the internal cache to what just came in.
       
  2155         if (e.data && e.data.length) {
       
  2156             for (i = 0; i < e.data.length; i++) {
       
  2157                 e.data[i] = self.getModule(e.data[i].name);
       
  2158             }
       
  2159         }
       
  2160         if (self.onProgress) {
       
  2161             self.onProgress.call(self.context, {
       
  2162                 name: e.url,
       
  2163                 data: e.data
       
  2164             });
       
  2165         }
       
  2166     },
       
  2167     /**
       
  2168     * The default Loader onFailure handler, calls this.onFailure with a payload
       
  2169     * @method _onFailure
       
  2170     * @private
       
  2171     */
       
  2172     _onFailure: function(o) {
       
  2173         var f = this.onFailure, msg = [], i = 0, len = o.errors.length;
       
  2174 
       
  2175         for (i; i < len; i++) {
       
  2176             msg.push(o.errors[i].error);
       
  2177         }
       
  2178 
       
  2179         msg = msg.join(',');
       
  2180 
       
  2181 
       
  2182         if (f) {
       
  2183             f.call(this.context, {
       
  2184                 msg: msg,
       
  2185                 data: this.data,
       
  2186                 success: false
       
  2187             });
       
  2188         }
       
  2189 
       
  2190         this._finish(msg, false);
       
  2191 
       
  2192     },
       
  2193 
       
  2194     /**
       
  2195     * The default Loader onTimeout handler, calls this.onTimeout with a payload
       
  2196     * @method _onTimeout
       
  2197     * @param {Get.Transaction} transaction The Transaction object from `Y.Get`
       
  2198     * @private
       
  2199     */
       
  2200     _onTimeout: function(transaction) {
       
  2201         var f = this.onTimeout;
       
  2202         if (f) {
       
  2203             f.call(this.context, {
       
  2204                 msg: 'timeout',
       
  2205                 data: this.data,
       
  2206                 success: false,
       
  2207                 transaction: transaction
       
  2208             });
       
  2209         }
       
  2210     },
       
  2211 
       
  2212     /**
       
  2213      * Sorts the dependency tree.  The last step of calculate()
       
  2214      * @method _sort
       
  2215      * @private
       
  2216      */
       
  2217     _sort: function() {
       
  2218 
       
  2219         // create an indexed list
       
  2220         var s = YObject.keys(this.required),
       
  2221             // loaded = this.loaded,
       
  2222             //TODO Move this out of scope
       
  2223             done = {},
       
  2224             p = 0, l, a, b, j, k, moved, doneKey;
       
  2225 
       
  2226         // keep going until we make a pass without moving anything
       
  2227         for (;;) {
       
  2228 
       
  2229             l = s.length;
       
  2230             moved = false;
       
  2231 
       
  2232             // start the loop after items that are already sorted
       
  2233             for (j = p; j < l; j++) {
       
  2234 
       
  2235                 // check the next module on the list to see if its
       
  2236                 // dependencies have been met
       
  2237                 a = s[j];
       
  2238 
       
  2239                 // check everything below current item and move if we
       
  2240                 // find a requirement for the current item
       
  2241                 for (k = j + 1; k < l; k++) {
       
  2242                     doneKey = a + s[k];
       
  2243 
       
  2244                     if (!done[doneKey] && this._requires(a, s[k])) {
       
  2245 
       
  2246                         // extract the dependency so we can move it up
       
  2247                         b = s.splice(k, 1);
       
  2248 
       
  2249                         // insert the dependency above the item that
       
  2250                         // requires it
       
  2251                         s.splice(j, 0, b[0]);
       
  2252 
       
  2253                         // only swap two dependencies once to short circut
       
  2254                         // circular dependencies
       
  2255                         done[doneKey] = true;
       
  2256 
       
  2257                         // keep working
       
  2258                         moved = true;
       
  2259 
       
  2260                         break;
       
  2261                     }
       
  2262                 }
       
  2263 
       
  2264                 // jump out of loop if we moved something
       
  2265                 if (moved) {
       
  2266                     break;
       
  2267                 // this item is sorted, move our pointer and keep going
       
  2268                 } else {
       
  2269                     p++;
       
  2270                 }
       
  2271             }
       
  2272 
       
  2273             // when we make it here and moved is false, we are
       
  2274             // finished sorting
       
  2275             if (!moved) {
       
  2276                 break;
       
  2277             }
       
  2278 
       
  2279         }
       
  2280 
       
  2281         this.sorted = s;
       
  2282     },
       
  2283 
       
  2284     /**
       
  2285     * Handles the actual insertion of script/link tags
       
  2286     * @method _insert
       
  2287     * @private
       
  2288     * @param {Object} source The YUI instance the request came from
       
  2289     * @param {Object} o The metadata to include
       
  2290     * @param {String} type JS or CSS
       
  2291     * @param {Boolean} [skipcalc=false] Do a Loader.calculate on the meta
       
  2292     */
       
  2293     _insert: function(source, o, type, skipcalc) {
       
  2294 
       
  2295 
       
  2296         // restore the state at the time of the request
       
  2297         if (source) {
       
  2298             this._config(source);
       
  2299         }
       
  2300 
       
  2301         // build the dependency list
       
  2302         // don't include type so we can process CSS and script in
       
  2303         // one pass when the type is not specified.
       
  2304 
       
  2305         var modules = this.resolve(!skipcalc),
       
  2306             self = this, comp = 0, actions = 0,
       
  2307             mods = {}, deps, complete;
       
  2308 
       
  2309         self._refetch = [];
       
  2310 
       
  2311         if (type) {
       
  2312             //Filter out the opposite type and reset the array so the checks later work
       
  2313             modules[((type === JS) ? CSS : JS)] = [];
       
  2314         }
       
  2315         if (!self.fetchCSS) {
       
  2316             modules.css = [];
       
  2317         }
       
  2318         if (modules.js.length) {
       
  2319             comp++;
       
  2320         }
       
  2321         if (modules.css.length) {
       
  2322             comp++;
       
  2323         }
       
  2324 
       
  2325         //console.log('Resolved Modules: ', modules);
       
  2326 
       
  2327         complete = function(d) {
       
  2328             actions++;
       
  2329             var errs = {}, i = 0, o = 0, u = '', fn,
       
  2330                 modName, resMods;
       
  2331 
       
  2332             if (d && d.errors) {
       
  2333                 for (i = 0; i < d.errors.length; i++) {
       
  2334                     if (d.errors[i].request) {
       
  2335                         u = d.errors[i].request.url;
       
  2336                     } else {
       
  2337                         u = d.errors[i];
       
  2338                     }
       
  2339                     errs[u] = u;
       
  2340                 }
       
  2341             }
       
  2342 
       
  2343             if (d && d.data && d.data.length && (d.type === 'success')) {
       
  2344                 for (i = 0; i < d.data.length; i++) {
       
  2345                     self.inserted[d.data[i].name] = true;
       
  2346                     //If the external module has a skin or a lang, reprocess it
       
  2347                     if (d.data[i].lang || d.data[i].skinnable) {
       
  2348                         delete self.inserted[d.data[i].name];
       
  2349                         self._refetch.push(d.data[i].name);
       
  2350                     }
       
  2351                 }
       
  2352             }
       
  2353 
       
  2354             if (actions === comp) {
       
  2355                 self._loading = null;
       
  2356                 if (self._refetch.length) {
       
  2357                     //Get the deps for the new meta-data and reprocess
       
  2358                     for (i = 0; i < self._refetch.length; i++) {
       
  2359                         deps = self.getRequires(self.getModule(self._refetch[i]));
       
  2360                         for (o = 0; o < deps.length; o++) {
       
  2361                             if (!self.inserted[deps[o]]) {
       
  2362                                 //We wouldn't be to this point without the module being here
       
  2363                                 mods[deps[o]] = deps[o];
       
  2364                             }
       
  2365                         }
       
  2366                     }
       
  2367                     mods = Y.Object.keys(mods);
       
  2368                     if (mods.length) {
       
  2369                         self.require(mods);
       
  2370                         resMods = self.resolve(true);
       
  2371                         if (resMods.cssMods.length) {
       
  2372                             for (i=0; i <  resMods.cssMods.length; i++) {
       
  2373                                 modName = resMods.cssMods[i].name;
       
  2374                                 delete YUI.Env._cssLoaded[modName];
       
  2375                                 if (self.isCSSLoaded(modName)) {
       
  2376                                     self.inserted[modName] = true;
       
  2377                                     delete self.required[modName];
       
  2378                                 }
       
  2379                             }
       
  2380                             self.sorted = [];
       
  2381                             self._sort();
       
  2382                         }
       
  2383                         d = null; //bail
       
  2384                         self._insert(); //insert the new deps
       
  2385                     }
       
  2386                 }
       
  2387                 if (d && d.fn) {
       
  2388                     fn = d.fn;
       
  2389                     delete d.fn;
       
  2390                     fn.call(self, d);
       
  2391                 }
       
  2392             }
       
  2393         };
       
  2394 
       
  2395         this._loading = true;
       
  2396 
       
  2397         if (!modules.js.length && !modules.css.length) {
       
  2398             actions = -1;
       
  2399             complete({
       
  2400                 fn: self._onSuccess
       
  2401             });
       
  2402             return;
       
  2403         }
       
  2404 
       
  2405 
       
  2406         if (modules.css.length) { //Load CSS first
       
  2407             Y.Get.css(modules.css, {
       
  2408                 data: modules.cssMods,
       
  2409                 attributes: self.cssAttributes,
       
  2410                 insertBefore: self.insertBefore,
       
  2411                 charset: self.charset,
       
  2412                 timeout: self.timeout,
       
  2413                 context: self,
       
  2414                 onProgress: function(e) {
       
  2415                     self._onProgress.call(self, e);
       
  2416                 },
       
  2417                 onTimeout: function(d) {
       
  2418                     self._onTimeout.call(self, d);
       
  2419                 },
       
  2420                 onSuccess: function(d) {
       
  2421                     d.type = 'success';
       
  2422                     d.fn = self._onSuccess;
       
  2423                     complete.call(self, d);
       
  2424                 },
       
  2425                 onFailure: function(d) {
       
  2426                     d.type = 'failure';
       
  2427                     d.fn = self._onFailure;
       
  2428                     complete.call(self, d);
       
  2429                 }
       
  2430             });
       
  2431         }
       
  2432 
       
  2433         if (modules.js.length) {
       
  2434             Y.Get.js(modules.js, {
       
  2435                 data: modules.jsMods,
       
  2436                 insertBefore: self.insertBefore,
       
  2437                 attributes: self.jsAttributes,
       
  2438                 charset: self.charset,
       
  2439                 timeout: self.timeout,
       
  2440                 autopurge: false,
       
  2441                 context: self,
       
  2442                 async: self.async,
       
  2443                 onProgress: function(e) {
       
  2444                     self._onProgress.call(self, e);
       
  2445                 },
       
  2446                 onTimeout: function(d) {
       
  2447                     self._onTimeout.call(self, d);
       
  2448                 },
       
  2449                 onSuccess: function(d) {
       
  2450                     d.type = 'success';
       
  2451                     d.fn = self._onSuccess;
       
  2452                     complete.call(self, d);
       
  2453                 },
       
  2454                 onFailure: function(d) {
       
  2455                     d.type = 'failure';
       
  2456                     d.fn = self._onFailure;
       
  2457                     complete.call(self, d);
       
  2458                 }
       
  2459             });
       
  2460         }
       
  2461     },
       
  2462     /**
       
  2463     * Once a loader operation is completely finished, process any additional queued items.
       
  2464     * @method _continue
       
  2465     * @private
       
  2466     */
       
  2467     _continue: function() {
       
  2468         if (!(_queue.running) && _queue.size() > 0) {
       
  2469             _queue.running = true;
       
  2470             _queue.next()();
       
  2471         }
       
  2472     },
       
  2473 
       
  2474     /**
       
  2475      * inserts the requested modules and their dependencies.
       
  2476      * <code>type</code> can be "js" or "css".  Both script and
       
  2477      * css are inserted if type is not provided.
       
  2478      * @method insert
       
  2479      * @param {object} o optional options object.
       
  2480      * @param {string} type the type of dependency to insert.
       
  2481      */
       
  2482     insert: function(o, type, skipsort) {
       
  2483         var self = this, copy = Y.merge(this);
       
  2484         delete copy.require;
       
  2485         delete copy.dirty;
       
  2486         _queue.add(function() {
       
  2487             self._insert(copy, o, type, skipsort);
       
  2488         });
       
  2489         this._continue();
       
  2490     },
       
  2491 
       
  2492     /**
       
  2493      * Executed every time a module is loaded, and if we are in a load
       
  2494      * cycle, we attempt to load the next script.  Public so that it
       
  2495      * is possible to call this if using a method other than
       
  2496      * Y.register to determine when scripts are fully loaded
       
  2497      * @method loadNext
       
  2498      * @deprecated
       
  2499      * @param {string} mname optional the name of the module that has
       
  2500      * been loaded (which is usually why it is time to load the next
       
  2501      * one).
       
  2502      */
       
  2503     loadNext: function() {
       
  2504         return;
       
  2505     },
       
  2506 
       
  2507     /**
       
  2508      * Apply filter defined for this instance to a url/path
       
  2509      * @method _filter
       
  2510      * @param {string} u the string to filter.
       
  2511      * @param {string} name the name of the module, if we are processing
       
  2512      * a single module as opposed to a combined url.
       
  2513      * @return {string} the filtered string.
       
  2514      * @private
       
  2515      */
       
  2516     _filter: function(u, name, group) {
       
  2517         var f = this.filter,
       
  2518             hasFilter = name && (name in this.filters),
       
  2519             modFilter = hasFilter && this.filters[name],
       
  2520             groupName = group || (this.moduleInfo[name] ? this.moduleInfo[name].group : null);
       
  2521 
       
  2522         if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
       
  2523             modFilter = this.groups[groupName].filter;
       
  2524             hasFilter = true;
       
  2525         }
       
  2526 
       
  2527         if (u) {
       
  2528             if (hasFilter) {
       
  2529                 f = (L.isString(modFilter)) ? this.FILTER_DEFS[modFilter.toUpperCase()] || null : modFilter;
       
  2530             }
       
  2531             if (f) {
       
  2532                 u = u.replace(new RegExp(f.searchExp, 'g'), f.replaceStr);
       
  2533             }
       
  2534         }
       
  2535         return u;
       
  2536     },
       
  2537 
       
  2538     /**
       
  2539      * Generates the full url for a module
       
  2540      * @method _url
       
  2541      * @param {string} path the path fragment.
       
  2542      * @param {String} name The name of the module
       
  2543      * @param {String} [base=self.base] The base url to use
       
  2544      * @return {string} the full url.
       
  2545      * @private
       
  2546      */
       
  2547     _url: function(path, name, base) {
       
  2548         return this._filter((base || this.base || '') + path, name);
       
  2549     },
       
  2550     /**
       
  2551     * Returns an Object hash of file arrays built from `loader.sorted` or from an arbitrary list of sorted modules.
       
  2552     * @method resolve
       
  2553     * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else
       
  2554     * @param {Array} [s=loader.sorted] An override for the loader.sorted array
       
  2555     * @return {Object} Object hash (js and css) of two arrays of file lists
       
  2556     * @example This method can be used as an off-line dep calculator
       
  2557     *
       
  2558     *        var Y = YUI();
       
  2559     *        var loader = new Y.Loader({
       
  2560     *            filter: 'debug',
       
  2561     *            base: '../../',
       
  2562     *            root: 'build/',
       
  2563     *            combine: true,
       
  2564     *            require: ['node', 'dd', 'console']
       
  2565     *        });
       
  2566     *        var out = loader.resolve(true);
       
  2567     *
       
  2568     */
       
  2569     resolve: function(calc, s) {
       
  2570 
       
  2571         var len, i, m, url, group, groupName, j, frag,
       
  2572             comboSource, comboSources, mods, comboBase,
       
  2573             base, urls, u = [], tmpBase, baseLen, resCombos = {},
       
  2574             self = this, comboSep, maxURLLength,
       
  2575             inserted = (self.ignoreRegistered) ? {} : self.inserted,
       
  2576             resolved = { js: [], jsMods: [], css: [], cssMods: [] },
       
  2577             type = self.loadType || 'js', addSingle;
       
  2578 
       
  2579         if (self.skin.overrides || self.skin.defaultSkin !== DEFAULT_SKIN || self.ignoreRegistered) {
       
  2580             self._resetModules();
       
  2581         }
       
  2582 
       
  2583         if (calc) {
       
  2584             self.calculate();
       
  2585         }
       
  2586         s = s || self.sorted;
       
  2587 
       
  2588         addSingle = function(m) {
       
  2589 
       
  2590             if (m) {
       
  2591                 group = (m.group && self.groups[m.group]) || NOT_FOUND;
       
  2592 
       
  2593                 //Always assume it's async
       
  2594                 if (group.async === false) {
       
  2595                     m.async = group.async;
       
  2596                 }
       
  2597 
       
  2598                 url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
       
  2599                       self._url(m.path, s[i], group.base || m.base);
       
  2600 
       
  2601                 if (m.attributes || m.async === false) {
       
  2602                     url = {
       
  2603                         url: url,
       
  2604                         async: m.async
       
  2605                     };
       
  2606                     if (m.attributes) {
       
  2607                         url.attributes = m.attributes;
       
  2608                     }
       
  2609                 }
       
  2610                 resolved[m.type].push(url);
       
  2611                 resolved[m.type + 'Mods'].push(m);
       
  2612             } else {
       
  2613             }
       
  2614 
       
  2615         };
       
  2616 
       
  2617         len = s.length;
       
  2618 
       
  2619         // the default combo base
       
  2620         comboBase = self.comboBase;
       
  2621 
       
  2622         url = comboBase;
       
  2623 
       
  2624         comboSources = {};
       
  2625 
       
  2626         for (i = 0; i < len; i++) {
       
  2627             comboSource = comboBase;
       
  2628             m = self.getModule(s[i]);
       
  2629             groupName = m && m.group;
       
  2630             group = self.groups[groupName];
       
  2631             if (groupName && group) {
       
  2632 
       
  2633                 if (!group.combine || m.fullpath) {
       
  2634                     //This is not a combo module, skip it and load it singly later.
       
  2635                     addSingle(m);
       
  2636                     continue;
       
  2637                 }
       
  2638                 m.combine = true;
       
  2639                 if (group.comboBase) {
       
  2640                     comboSource = group.comboBase;
       
  2641                 }
       
  2642 
       
  2643                 if ("root" in group && L.isValue(group.root)) {
       
  2644                     m.root = group.root;
       
  2645                 }
       
  2646                 m.comboSep = group.comboSep || self.comboSep;
       
  2647                 m.maxURLLength = group.maxURLLength || self.maxURLLength;
       
  2648             } else {
       
  2649                 if (!self.combine) {
       
  2650                     //This is not a combo module, skip it and load it singly later.
       
  2651                     addSingle(m);
       
  2652                     continue;
       
  2653                 }
       
  2654             }
       
  2655 
       
  2656             comboSources[comboSource] = comboSources[comboSource] || [];
       
  2657             comboSources[comboSource].push(m);
       
  2658         }
       
  2659 
       
  2660         for (j in comboSources) {
       
  2661             if (comboSources.hasOwnProperty(j)) {
       
  2662                 resCombos[j] = resCombos[j] || { js: [], jsMods: [], css: [], cssMods: [] };
       
  2663                 url = j;
       
  2664                 mods = comboSources[j];
       
  2665                 len = mods.length;
       
  2666 
       
  2667                 if (len) {
       
  2668                     for (i = 0; i < len; i++) {
       
  2669                         if (inserted[mods[i]]) {
       
  2670                             continue;
       
  2671                         }
       
  2672                         m = mods[i];
       
  2673                         // Do not try to combine non-yui JS unless combo def
       
  2674                         // is found
       
  2675                         if (m && (m.combine || !m.ext)) {
       
  2676                             resCombos[j].comboSep = m.comboSep;
       
  2677                             resCombos[j].group = m.group;
       
  2678                             resCombos[j].maxURLLength = m.maxURLLength;
       
  2679                             frag = ((L.isValue(m.root)) ? m.root : self.root) + (m.path || m.fullpath);
       
  2680                             frag = self._filter(frag, m.name);
       
  2681                             resCombos[j][m.type].push(frag);
       
  2682                             resCombos[j][m.type + 'Mods'].push(m);
       
  2683                         } else {
       
  2684                             //Add them to the next process..
       
  2685                             if (mods[i]) {
       
  2686                                 addSingle(mods[i]);
       
  2687                             }
       
  2688                         }
       
  2689 
       
  2690                     }
       
  2691                 }
       
  2692             }
       
  2693         }
       
  2694 
       
  2695 
       
  2696         for (j in resCombos) {
       
  2697             if (resCombos.hasOwnProperty(j)) {
       
  2698                 base = j;
       
  2699                 comboSep = resCombos[base].comboSep || self.comboSep;
       
  2700                 maxURLLength = resCombos[base].maxURLLength || self.maxURLLength;
       
  2701                 for (type in resCombos[base]) {
       
  2702                     if (type === JS || type === CSS) {
       
  2703                         urls = resCombos[base][type];
       
  2704                         mods = resCombos[base][type + 'Mods'];
       
  2705                         len = urls.length;
       
  2706                         tmpBase = base + urls.join(comboSep);
       
  2707                         baseLen = tmpBase.length;
       
  2708                         if (maxURLLength <= base.length) {
       
  2709                             maxURLLength = MAX_URL_LENGTH;
       
  2710                         }
       
  2711 
       
  2712                         if (len) {
       
  2713                             if (baseLen > maxURLLength) {
       
  2714                                 u = [];
       
  2715                                 for (s = 0; s < len; s++) {
       
  2716                                     u.push(urls[s]);
       
  2717                                     tmpBase = base + u.join(comboSep);
       
  2718 
       
  2719                                     if (tmpBase.length > maxURLLength) {
       
  2720                                         m = u.pop();
       
  2721                                         tmpBase = base + u.join(comboSep);
       
  2722                                         resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
       
  2723                                         u = [];
       
  2724                                         if (m) {
       
  2725                                             u.push(m);
       
  2726                                         }
       
  2727                                     }
       
  2728                                 }
       
  2729                                 if (u.length) {
       
  2730                                     tmpBase = base + u.join(comboSep);
       
  2731                                     resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
       
  2732                                 }
       
  2733                             } else {
       
  2734                                 resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
       
  2735                             }
       
  2736                         }
       
  2737                         resolved[type + 'Mods'] = resolved[type + 'Mods'].concat(mods);
       
  2738                     }
       
  2739                 }
       
  2740             }
       
  2741         }
       
  2742 
       
  2743         resCombos = null;
       
  2744 
       
  2745         return resolved;
       
  2746     },
       
  2747     /**
       
  2748     Shortcut to calculate, resolve and load all modules.
       
  2749 
       
  2750         var loader = new Y.Loader({
       
  2751             ignoreRegistered: true,
       
  2752             modules: {
       
  2753                 mod: {
       
  2754                     path: 'mod.js'
       
  2755                 }
       
  2756             },
       
  2757             requires: [ 'mod' ]
       
  2758         });
       
  2759         loader.load(function() {
       
  2760             console.log('All modules have loaded..');
       
  2761         });
       
  2762 
       
  2763 
       
  2764     @method load
       
  2765     @param {Callback} cb Executed after all load operations are complete
       
  2766     */
       
  2767     load: function(cb) {
       
  2768         if (!cb) {
       
  2769             return;
       
  2770         }
       
  2771         var self = this,
       
  2772             out = self.resolve(true);
       
  2773 
       
  2774         self.data = out;
       
  2775 
       
  2776         self.onEnd = function() {
       
  2777             cb.apply(self.context || self, arguments);
       
  2778         };
       
  2779 
       
  2780         self.insert();
       
  2781     }
       
  2782 };
       
  2783 
       
  2784 
       
  2785 
       
  2786 }, '@VERSION@', {"requires": ["get", "features"]});
       
  2787 YUI.add('loader-rollup', function (Y, NAME) {
       
  2788 
       
  2789 /**
       
  2790  * Optional automatic rollup logic for reducing http connections
       
  2791  * when not using a combo service.
       
  2792  * @module loader
       
  2793  * @submodule rollup
       
  2794  */
       
  2795 
       
  2796 /**
       
  2797  * Look for rollup packages to determine if all of the modules a
       
  2798  * rollup supersedes are required.  If so, include the rollup to
       
  2799  * help reduce the total number of connections required.  Called
       
  2800  * by calculate().  This is an optional feature, and requires the
       
  2801  * appropriate submodule to function.
       
  2802  * @method _rollup
       
  2803  * @for Loader
       
  2804  * @private
       
  2805  */
       
  2806 Y.Loader.prototype._rollup = function() {
       
  2807     var i, j, m, s, r = this.required, roll,
       
  2808         info = this.moduleInfo, rolled, c, smod;
       
  2809 
       
  2810     // find and cache rollup modules
       
  2811     if (this.dirty || !this.rollups) {
       
  2812         this.rollups = {};
       
  2813         for (i in info) {
       
  2814             if (info.hasOwnProperty(i)) {
       
  2815                 m = this.getModule(i);
       
  2816                 // if (m && m.rollup && m.supersedes) {
       
  2817                 if (m && m.rollup) {
       
  2818                     this.rollups[i] = m;
       
  2819                 }
       
  2820             }
       
  2821         }
       
  2822     }
       
  2823 
       
  2824     // make as many passes as needed to pick up rollup rollups
       
  2825     for (;;) {
       
  2826         rolled = false;
       
  2827 
       
  2828         // go through the rollup candidates
       
  2829         for (i in this.rollups) {
       
  2830             if (this.rollups.hasOwnProperty(i)) {
       
  2831                 // there can be only one, unless forced
       
  2832                 if (!r[i] && ((!this.loaded[i]) || this.forceMap[i])) {
       
  2833                     m = this.getModule(i);
       
  2834                     s = m.supersedes || [];
       
  2835                     roll = false;
       
  2836 
       
  2837                     // @TODO remove continue
       
  2838                     if (!m.rollup) {
       
  2839                         continue;
       
  2840                     }
       
  2841 
       
  2842                     c = 0;
       
  2843 
       
  2844                     // check the threshold
       
  2845                     for (j = 0; j < s.length; j++) {
       
  2846                         smod = info[s[j]];
       
  2847 
       
  2848                         // if the superseded module is loaded, we can't
       
  2849                         // load the rollup unless it has been forced.
       
  2850                         if (this.loaded[s[j]] && !this.forceMap[s[j]]) {
       
  2851                             roll = false;
       
  2852                             break;
       
  2853                         // increment the counter if this module is required.
       
  2854                         // if we are beyond the rollup threshold, we will
       
  2855                         // use the rollup module
       
  2856                         } else if (r[s[j]] && m.type === smod.type) {
       
  2857                             c++;
       
  2858                             roll = (c >= m.rollup);
       
  2859                             if (roll) {
       
  2860                                 break;
       
  2861                             }
       
  2862                         }
       
  2863                     }
       
  2864 
       
  2865                     if (roll) {
       
  2866                         // add the rollup
       
  2867                         r[i] = true;
       
  2868                         rolled = true;
       
  2869 
       
  2870                         // expand the rollup's dependencies
       
  2871                         this.getRequires(m);
       
  2872                     }
       
  2873                 }
       
  2874             }
       
  2875         }
       
  2876 
       
  2877         // if we made it here w/o rolling up something, we are done
       
  2878         if (!rolled) {
       
  2879             break;
       
  2880         }
       
  2881     }
       
  2882 };
       
  2883 
       
  2884 
       
  2885 }, '@VERSION@', {"requires": ["loader-base"]});
       
  2886 YUI.add('loader-yui3', function (Y, NAME) {
       
  2887 
       
  2888 /* This file is auto-generated by (yogi loader --yes --mix --start ../) */
       
  2889 
       
  2890 /*jshint maxlen:900, eqeqeq: false */
       
  2891 
       
  2892 /**
       
  2893  * YUI 3 module metadata
       
  2894  * @module loader
       
  2895  * @submodule loader-yui3
       
  2896  */
       
  2897 YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {};
       
  2898 Y.mix(YUI.Env[Y.version].modules, {
       
  2899     "align-plugin": {
       
  2900         "requires": [
       
  2901             "node-screen",
       
  2902             "node-pluginhost"
       
  2903         ]
       
  2904     },
       
  2905     "anim": {
       
  2906         "use": [
       
  2907             "anim-base",
       
  2908             "anim-color",
       
  2909             "anim-curve",
       
  2910             "anim-easing",
       
  2911             "anim-node-plugin",
       
  2912             "anim-scroll",
       
  2913             "anim-xy"
       
  2914         ]
       
  2915     },
       
  2916     "anim-base": {
       
  2917         "requires": [
       
  2918             "base-base",
       
  2919             "node-style"
       
  2920         ]
       
  2921     },
       
  2922     "anim-color": {
       
  2923         "requires": [
       
  2924             "anim-base"
       
  2925         ]
       
  2926     },
       
  2927     "anim-curve": {
       
  2928         "requires": [
       
  2929             "anim-xy"
       
  2930         ]
       
  2931     },
       
  2932     "anim-easing": {
       
  2933         "requires": [
       
  2934             "anim-base"
       
  2935         ]
       
  2936     },
       
  2937     "anim-node-plugin": {
       
  2938         "requires": [
       
  2939             "node-pluginhost",
       
  2940             "anim-base"
       
  2941         ]
       
  2942     },
       
  2943     "anim-scroll": {
       
  2944         "requires": [
       
  2945             "anim-base"
       
  2946         ]
       
  2947     },
       
  2948     "anim-shape": {
       
  2949         "requires": [
       
  2950             "anim-base",
       
  2951             "anim-easing",
       
  2952             "anim-color",
       
  2953             "matrix"
       
  2954         ]
       
  2955     },
       
  2956     "anim-shape-transform": {
       
  2957         "use": [
       
  2958             "anim-shape"
       
  2959         ]
       
  2960     },
       
  2961     "anim-xy": {
       
  2962         "requires": [
       
  2963             "anim-base",
       
  2964             "node-screen"
       
  2965         ]
       
  2966     },
       
  2967     "app": {
       
  2968         "use": [
       
  2969             "app-base",
       
  2970             "app-content",
       
  2971             "app-transitions",
       
  2972             "lazy-model-list",
       
  2973             "model",
       
  2974             "model-list",
       
  2975             "model-sync-rest",
       
  2976             "router",
       
  2977             "view",
       
  2978             "view-node-map"
       
  2979         ]
       
  2980     },
       
  2981     "app-base": {
       
  2982         "requires": [
       
  2983             "classnamemanager",
       
  2984             "pjax-base",
       
  2985             "router",
       
  2986             "view"
       
  2987         ]
       
  2988     },
       
  2989     "app-content": {
       
  2990         "requires": [
       
  2991             "app-base",
       
  2992             "pjax-content"
       
  2993         ]
       
  2994     },
       
  2995     "app-transitions": {
       
  2996         "requires": [
       
  2997             "app-base"
       
  2998         ]
       
  2999     },
       
  3000     "app-transitions-css": {
       
  3001         "type": "css"
       
  3002     },
       
  3003     "app-transitions-native": {
       
  3004         "condition": {
       
  3005             "name": "app-transitions-native",
       
  3006             "test": function (Y) {
       
  3007     var doc  = Y.config.doc,
       
  3008         node = doc ? doc.documentElement : null;
       
  3009 
       
  3010     if (node && node.style) {
       
  3011         return ('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
       
  3012     }
       
  3013 
       
  3014     return false;
       
  3015 },
       
  3016             "trigger": "app-transitions"
       
  3017         },
       
  3018         "requires": [
       
  3019             "app-transitions",
       
  3020             "app-transitions-css",
       
  3021             "parallel",
       
  3022             "transition"
       
  3023         ]
       
  3024     },
       
  3025     "array-extras": {
       
  3026         "requires": [
       
  3027             "yui-base"
       
  3028         ]
       
  3029     },
       
  3030     "array-invoke": {
       
  3031         "requires": [
       
  3032             "yui-base"
       
  3033         ]
       
  3034     },
       
  3035     "arraylist": {
       
  3036         "requires": [
       
  3037             "yui-base"
       
  3038         ]
       
  3039     },
       
  3040     "arraylist-add": {
       
  3041         "requires": [
       
  3042             "arraylist"
       
  3043         ]
       
  3044     },
       
  3045     "arraylist-filter": {
       
  3046         "requires": [
       
  3047             "arraylist"
       
  3048         ]
       
  3049     },
       
  3050     "arraysort": {
       
  3051         "requires": [
       
  3052             "yui-base"
       
  3053         ]
       
  3054     },
       
  3055     "async-queue": {
       
  3056         "requires": [
       
  3057             "event-custom"
       
  3058         ]
       
  3059     },
       
  3060     "attribute": {
       
  3061         "use": [
       
  3062             "attribute-base",
       
  3063             "attribute-complex"
       
  3064         ]
       
  3065     },
       
  3066     "attribute-base": {
       
  3067         "requires": [
       
  3068             "attribute-core",
       
  3069             "attribute-observable",
       
  3070             "attribute-extras"
       
  3071         ]
       
  3072     },
       
  3073     "attribute-complex": {
       
  3074         "requires": [
       
  3075             "attribute-base"
       
  3076         ]
       
  3077     },
       
  3078     "attribute-core": {
       
  3079         "requires": [
       
  3080             "oop"
       
  3081         ]
       
  3082     },
       
  3083     "attribute-events": {
       
  3084         "use": [
       
  3085             "attribute-observable"
       
  3086         ]
       
  3087     },
       
  3088     "attribute-extras": {
       
  3089         "requires": [
       
  3090             "oop"
       
  3091         ]
       
  3092     },
       
  3093     "attribute-observable": {
       
  3094         "requires": [
       
  3095             "event-custom"
       
  3096         ]
       
  3097     },
       
  3098     "autocomplete": {
       
  3099         "use": [
       
  3100             "autocomplete-base",
       
  3101             "autocomplete-sources",
       
  3102             "autocomplete-list",
       
  3103             "autocomplete-plugin"
       
  3104         ]
       
  3105     },
       
  3106     "autocomplete-base": {
       
  3107         "optional": [
       
  3108             "autocomplete-sources"
       
  3109         ],
       
  3110         "requires": [
       
  3111             "array-extras",
       
  3112             "base-build",
       
  3113             "escape",
       
  3114             "event-valuechange",
       
  3115             "node-base"
       
  3116         ]
       
  3117     },
       
  3118     "autocomplete-filters": {
       
  3119         "requires": [
       
  3120             "array-extras",
       
  3121             "text-wordbreak"
       
  3122         ]
       
  3123     },
       
  3124     "autocomplete-filters-accentfold": {
       
  3125         "requires": [
       
  3126             "array-extras",
       
  3127             "text-accentfold",
       
  3128             "text-wordbreak"
       
  3129         ]
       
  3130     },
       
  3131     "autocomplete-highlighters": {
       
  3132         "requires": [
       
  3133             "array-extras",
       
  3134             "highlight-base"
       
  3135         ]
       
  3136     },
       
  3137     "autocomplete-highlighters-accentfold": {
       
  3138         "requires": [
       
  3139             "array-extras",
       
  3140             "highlight-accentfold"
       
  3141         ]
       
  3142     },
       
  3143     "autocomplete-list": {
       
  3144         "after": [
       
  3145             "autocomplete-sources"
       
  3146         ],
       
  3147         "lang": [
       
  3148             "en",
       
  3149             "es",
       
  3150             "it"
       
  3151         ],
       
  3152         "requires": [
       
  3153             "autocomplete-base",
       
  3154             "event-resize",
       
  3155             "node-screen",
       
  3156             "selector-css3",
       
  3157             "shim-plugin",
       
  3158             "widget",
       
  3159             "widget-position",
       
  3160             "widget-position-align"
       
  3161         ],
       
  3162         "skinnable": true
       
  3163     },
       
  3164     "autocomplete-list-keys": {
       
  3165         "condition": {
       
  3166             "name": "autocomplete-list-keys",
       
  3167             "test": function (Y) {
       
  3168     // Only add keyboard support to autocomplete-list if this doesn't appear to
       
  3169     // be an iOS or Android-based mobile device.
       
  3170     //
       
  3171     // There's currently no feasible way to actually detect whether a device has
       
  3172     // a hardware keyboard, so this sniff will have to do. It can easily be
       
  3173     // overridden by manually loading the autocomplete-list-keys module.
       
  3174     //
       
  3175     // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari
       
  3176     // doesn't fire the keyboard events used by AutoCompleteList, so there's
       
  3177     // no point loading the -keys module even when a bluetooth keyboard may be
       
  3178     // available.
       
  3179     return !(Y.UA.ios || Y.UA.android);
       
  3180 },
       
  3181             "trigger": "autocomplete-list"
       
  3182         },
       
  3183         "requires": [
       
  3184             "autocomplete-list",
       
  3185             "base-build"
       
  3186         ]
       
  3187     },
       
  3188     "autocomplete-plugin": {
       
  3189         "requires": [
       
  3190             "autocomplete-list",
       
  3191             "node-pluginhost"
       
  3192         ]
       
  3193     },
       
  3194     "autocomplete-sources": {
       
  3195         "optional": [
       
  3196             "io-base",
       
  3197             "json-parse",
       
  3198             "jsonp",
       
  3199             "yql"
       
  3200         ],
       
  3201         "requires": [
       
  3202             "autocomplete-base"
       
  3203         ]
       
  3204     },
       
  3205     "axes": {
       
  3206         "use": [
       
  3207             "axis-numeric",
       
  3208             "axis-category",
       
  3209             "axis-time",
       
  3210             "axis-stacked"
       
  3211         ]
       
  3212     },
       
  3213     "axes-base": {
       
  3214         "use": [
       
  3215             "axis-numeric-base",
       
  3216             "axis-category-base",
       
  3217             "axis-time-base",
       
  3218             "axis-stacked-base"
       
  3219         ]
       
  3220     },
       
  3221     "axis": {
       
  3222         "requires": [
       
  3223             "dom",
       
  3224             "widget",
       
  3225             "widget-position",
       
  3226             "widget-stack",
       
  3227             "graphics",
       
  3228             "axis-base"
       
  3229         ]
       
  3230     },
       
  3231     "axis-base": {
       
  3232         "requires": [
       
  3233             "classnamemanager",
       
  3234             "datatype-number",
       
  3235             "datatype-date",
       
  3236             "base",
       
  3237             "event-custom"
       
  3238         ]
       
  3239     },
       
  3240     "axis-category": {
       
  3241         "requires": [
       
  3242             "axis",
       
  3243             "axis-category-base"
       
  3244         ]
       
  3245     },
       
  3246     "axis-category-base": {
       
  3247         "requires": [
       
  3248             "axis-base"
       
  3249         ]
       
  3250     },
       
  3251     "axis-numeric": {
       
  3252         "requires": [
       
  3253             "axis",
       
  3254             "axis-numeric-base"
       
  3255         ]
       
  3256     },
       
  3257     "axis-numeric-base": {
       
  3258         "requires": [
       
  3259             "axis-base"
       
  3260         ]
       
  3261     },
       
  3262     "axis-stacked": {
       
  3263         "requires": [
       
  3264             "axis-numeric",
       
  3265             "axis-stacked-base"
       
  3266         ]
       
  3267     },
       
  3268     "axis-stacked-base": {
       
  3269         "requires": [
       
  3270             "axis-numeric-base"
       
  3271         ]
       
  3272     },
       
  3273     "axis-time": {
       
  3274         "requires": [
       
  3275             "axis",
       
  3276             "axis-time-base"
       
  3277         ]
       
  3278     },
       
  3279     "axis-time-base": {
       
  3280         "requires": [
       
  3281             "axis-base"
       
  3282         ]
       
  3283     },
       
  3284     "base": {
       
  3285         "use": [
       
  3286             "base-base",
       
  3287             "base-pluginhost",
       
  3288             "base-build"
       
  3289         ]
       
  3290     },
       
  3291     "base-base": {
       
  3292         "requires": [
       
  3293             "attribute-base",
       
  3294             "base-core",
       
  3295             "base-observable"
       
  3296         ]
       
  3297     },
       
  3298     "base-build": {
       
  3299         "requires": [
       
  3300             "base-base"
       
  3301         ]
       
  3302     },
       
  3303     "base-core": {
       
  3304         "requires": [
       
  3305             "attribute-core"
       
  3306         ]
       
  3307     },
       
  3308     "base-observable": {
       
  3309         "requires": [
       
  3310             "attribute-observable"
       
  3311         ]
       
  3312     },
       
  3313     "base-pluginhost": {
       
  3314         "requires": [
       
  3315             "base-base",
       
  3316             "pluginhost"
       
  3317         ]
       
  3318     },
       
  3319     "button": {
       
  3320         "requires": [
       
  3321             "button-core",
       
  3322             "cssbutton",
       
  3323             "widget"
       
  3324         ]
       
  3325     },
       
  3326     "button-core": {
       
  3327         "requires": [
       
  3328             "attribute-core",
       
  3329             "classnamemanager",
       
  3330             "node-base"
       
  3331         ]
       
  3332     },
       
  3333     "button-group": {
       
  3334         "requires": [
       
  3335             "button-plugin",
       
  3336             "cssbutton",
       
  3337             "widget"
       
  3338         ]
       
  3339     },
       
  3340     "button-plugin": {
       
  3341         "requires": [
       
  3342             "button-core",
       
  3343             "cssbutton",
       
  3344             "node-pluginhost"
       
  3345         ]
       
  3346     },
       
  3347     "cache": {
       
  3348         "use": [
       
  3349             "cache-base",
       
  3350             "cache-offline",
       
  3351             "cache-plugin"
       
  3352         ]
       
  3353     },
       
  3354     "cache-base": {
       
  3355         "requires": [
       
  3356             "base"
       
  3357         ]
       
  3358     },
       
  3359     "cache-offline": {
       
  3360         "requires": [
       
  3361             "cache-base",
       
  3362             "json"
       
  3363         ]
       
  3364     },
       
  3365     "cache-plugin": {
       
  3366         "requires": [
       
  3367             "plugin",
       
  3368             "cache-base"
       
  3369         ]
       
  3370     },
       
  3371     "calendar": {
       
  3372         "lang": [
       
  3373             "de",
       
  3374             "en",
       
  3375             "es",
       
  3376             "es-AR",
       
  3377             "fr",
       
  3378             "it",
       
  3379             "ja",
       
  3380             "nb-NO",
       
  3381             "nl",
       
  3382             "pt-BR",
       
  3383             "ru",
       
  3384             "zh-HANT-TW"
       
  3385         ],
       
  3386         "requires": [
       
  3387             "calendar-base",
       
  3388             "calendarnavigator"
       
  3389         ],
       
  3390         "skinnable": true
       
  3391     },
       
  3392     "calendar-base": {
       
  3393         "lang": [
       
  3394             "de",
       
  3395             "en",
       
  3396             "es",
       
  3397             "es-AR",
       
  3398             "fr",
       
  3399             "it",
       
  3400             "ja",
       
  3401             "nb-NO",
       
  3402             "nl",
       
  3403             "pt-BR",
       
  3404             "ru",
       
  3405             "zh-HANT-TW"
       
  3406         ],
       
  3407         "requires": [
       
  3408             "widget",
       
  3409             "datatype-date",
       
  3410             "datatype-date-math",
       
  3411             "cssgrids"
       
  3412         ],
       
  3413         "skinnable": true
       
  3414     },
       
  3415     "calendarnavigator": {
       
  3416         "requires": [
       
  3417             "plugin",
       
  3418             "classnamemanager",
       
  3419             "datatype-date",
       
  3420             "node"
       
  3421         ],
       
  3422         "skinnable": true
       
  3423     },
       
  3424     "charts": {
       
  3425         "use": [
       
  3426             "charts-base"
       
  3427         ]
       
  3428     },
       
  3429     "charts-base": {
       
  3430         "requires": [
       
  3431             "dom",
       
  3432             "event-mouseenter",
       
  3433             "event-touch",
       
  3434             "graphics-group",
       
  3435             "axes",
       
  3436             "series-pie",
       
  3437             "series-line",
       
  3438             "series-marker",
       
  3439             "series-area",
       
  3440             "series-spline",
       
  3441             "series-column",
       
  3442             "series-bar",
       
  3443             "series-areaspline",
       
  3444             "series-combo",
       
  3445             "series-combospline",
       
  3446             "series-line-stacked",
       
  3447             "series-marker-stacked",
       
  3448             "series-area-stacked",
       
  3449             "series-spline-stacked",
       
  3450             "series-column-stacked",
       
  3451             "series-bar-stacked",
       
  3452             "series-areaspline-stacked",
       
  3453             "series-combo-stacked",
       
  3454             "series-combospline-stacked"
       
  3455         ]
       
  3456     },
       
  3457     "charts-legend": {
       
  3458         "requires": [
       
  3459             "charts-base"
       
  3460         ]
       
  3461     },
       
  3462     "classnamemanager": {
       
  3463         "requires": [
       
  3464             "yui-base"
       
  3465         ]
       
  3466     },
       
  3467     "clickable-rail": {
       
  3468         "requires": [
       
  3469             "slider-base"
       
  3470         ]
       
  3471     },
       
  3472     "collection": {
       
  3473         "use": [
       
  3474             "array-extras",
       
  3475             "arraylist",
       
  3476             "arraylist-add",
       
  3477             "arraylist-filter",
       
  3478             "array-invoke"
       
  3479         ]
       
  3480     },
       
  3481     "color": {
       
  3482         "use": [
       
  3483             "color-base",
       
  3484             "color-hsl",
       
  3485             "color-harmony"
       
  3486         ]
       
  3487     },
       
  3488     "color-base": {
       
  3489         "requires": [
       
  3490             "yui-base"
       
  3491         ]
       
  3492     },
       
  3493     "color-harmony": {
       
  3494         "requires": [
       
  3495             "color-hsl"
       
  3496         ]
       
  3497     },
       
  3498     "color-hsl": {
       
  3499         "requires": [
       
  3500             "color-base"
       
  3501         ]
       
  3502     },
       
  3503     "color-hsv": {
       
  3504         "requires": [
       
  3505             "color-base"
       
  3506         ]
       
  3507     },
       
  3508     "console": {
       
  3509         "lang": [
       
  3510             "en",
       
  3511             "es",
       
  3512             "it",
       
  3513             "ja"
       
  3514         ],
       
  3515         "requires": [
       
  3516             "yui-log",
       
  3517             "widget"
       
  3518         ],
       
  3519         "skinnable": true
       
  3520     },
       
  3521     "console-filters": {
       
  3522         "requires": [
       
  3523             "plugin",
       
  3524             "console"
       
  3525         ],
       
  3526         "skinnable": true
       
  3527     },
       
  3528     "controller": {
       
  3529         "use": [
       
  3530             "router"
       
  3531         ]
       
  3532     },
       
  3533     "cookie": {
       
  3534         "requires": [
       
  3535             "yui-base"
       
  3536         ]
       
  3537     },
       
  3538     "createlink-base": {
       
  3539         "requires": [
       
  3540             "editor-base"
       
  3541         ]
       
  3542     },
       
  3543     "cssbase": {
       
  3544         "after": [
       
  3545             "cssreset",
       
  3546             "cssfonts",
       
  3547             "cssgrids",
       
  3548             "cssreset-context",
       
  3549             "cssfonts-context",
       
  3550             "cssgrids-context"
       
  3551         ],
       
  3552         "type": "css"
       
  3553     },
       
  3554     "cssbase-context": {
       
  3555         "after": [
       
  3556             "cssreset",
       
  3557             "cssfonts",
       
  3558             "cssgrids",
       
  3559             "cssreset-context",
       
  3560             "cssfonts-context",
       
  3561             "cssgrids-context"
       
  3562         ],
       
  3563         "type": "css"
       
  3564     },
       
  3565     "cssbutton": {
       
  3566         "type": "css"
       
  3567     },
       
  3568     "cssfonts": {
       
  3569         "type": "css"
       
  3570     },
       
  3571     "cssfonts-context": {
       
  3572         "type": "css"
       
  3573     },
       
  3574     "cssgrids": {
       
  3575         "optional": [
       
  3576             "cssreset",
       
  3577             "cssfonts"
       
  3578         ],
       
  3579         "type": "css"
       
  3580     },
       
  3581     "cssgrids-base": {
       
  3582         "optional": [
       
  3583             "cssreset",
       
  3584             "cssfonts"
       
  3585         ],
       
  3586         "type": "css"
       
  3587     },
       
  3588     "cssgrids-responsive": {
       
  3589         "optional": [
       
  3590             "cssreset",
       
  3591             "cssfonts"
       
  3592         ],
       
  3593         "requires": [
       
  3594             "cssgrids",
       
  3595             "cssgrids-responsive-base"
       
  3596         ],
       
  3597         "type": "css"
       
  3598     },
       
  3599     "cssgrids-units": {
       
  3600         "optional": [
       
  3601             "cssreset",
       
  3602             "cssfonts"
       
  3603         ],
       
  3604         "requires": [
       
  3605             "cssgrids-base"
       
  3606         ],
       
  3607         "type": "css"
       
  3608     },
       
  3609     "cssnormalize": {
       
  3610         "type": "css"
       
  3611     },
       
  3612     "cssnormalize-context": {
       
  3613         "type": "css"
       
  3614     },
       
  3615     "cssreset": {
       
  3616         "type": "css"
       
  3617     },
       
  3618     "cssreset-context": {
       
  3619         "type": "css"
       
  3620     },
       
  3621     "dataschema": {
       
  3622         "use": [
       
  3623             "dataschema-base",
       
  3624             "dataschema-json",
       
  3625             "dataschema-xml",
       
  3626             "dataschema-array",
       
  3627             "dataschema-text"
       
  3628         ]
       
  3629     },
       
  3630     "dataschema-array": {
       
  3631         "requires": [
       
  3632             "dataschema-base"
       
  3633         ]
       
  3634     },
       
  3635     "dataschema-base": {
       
  3636         "requires": [
       
  3637             "base"
       
  3638         ]
       
  3639     },
       
  3640     "dataschema-json": {
       
  3641         "requires": [
       
  3642             "dataschema-base",
       
  3643             "json"
       
  3644         ]
       
  3645     },
       
  3646     "dataschema-text": {
       
  3647         "requires": [
       
  3648             "dataschema-base"
       
  3649         ]
       
  3650     },
       
  3651     "dataschema-xml": {
       
  3652         "requires": [
       
  3653             "dataschema-base"
       
  3654         ]
       
  3655     },
       
  3656     "datasource": {
       
  3657         "use": [
       
  3658             "datasource-local",
       
  3659             "datasource-io",
       
  3660             "datasource-get",
       
  3661             "datasource-function",
       
  3662             "datasource-cache",
       
  3663             "datasource-jsonschema",
       
  3664             "datasource-xmlschema",
       
  3665             "datasource-arrayschema",
       
  3666             "datasource-textschema",
       
  3667             "datasource-polling"
       
  3668         ]
       
  3669     },
       
  3670     "datasource-arrayschema": {
       
  3671         "requires": [
       
  3672             "datasource-local",
       
  3673             "plugin",
       
  3674             "dataschema-array"
       
  3675         ]
       
  3676     },
       
  3677     "datasource-cache": {
       
  3678         "requires": [
       
  3679             "datasource-local",
       
  3680             "plugin",
       
  3681             "cache-base"
       
  3682         ]
       
  3683     },
       
  3684     "datasource-function": {
       
  3685         "requires": [
       
  3686             "datasource-local"
       
  3687         ]
       
  3688     },
       
  3689     "datasource-get": {
       
  3690         "requires": [
       
  3691             "datasource-local",
       
  3692             "get"
       
  3693         ]
       
  3694     },
       
  3695     "datasource-io": {
       
  3696         "requires": [
       
  3697             "datasource-local",
       
  3698             "io-base"
       
  3699         ]
       
  3700     },
       
  3701     "datasource-jsonschema": {
       
  3702         "requires": [
       
  3703             "datasource-local",
       
  3704             "plugin",
       
  3705             "dataschema-json"
       
  3706         ]
       
  3707     },
       
  3708     "datasource-local": {
       
  3709         "requires": [
       
  3710             "base"
       
  3711         ]
       
  3712     },
       
  3713     "datasource-polling": {
       
  3714         "requires": [
       
  3715             "datasource-local"
       
  3716         ]
       
  3717     },
       
  3718     "datasource-textschema": {
       
  3719         "requires": [
       
  3720             "datasource-local",
       
  3721             "plugin",
       
  3722             "dataschema-text"
       
  3723         ]
       
  3724     },
       
  3725     "datasource-xmlschema": {
       
  3726         "requires": [
       
  3727             "datasource-local",
       
  3728             "plugin",
       
  3729             "datatype-xml",
       
  3730             "dataschema-xml"
       
  3731         ]
       
  3732     },
       
  3733     "datatable": {
       
  3734         "use": [
       
  3735             "datatable-core",
       
  3736             "datatable-table",
       
  3737             "datatable-head",
       
  3738             "datatable-body",
       
  3739             "datatable-base",
       
  3740             "datatable-column-widths",
       
  3741             "datatable-message",
       
  3742             "datatable-mutable",
       
  3743             "datatable-sort",
       
  3744             "datatable-datasource"
       
  3745         ]
       
  3746     },
       
  3747     "datatable-base": {
       
  3748         "requires": [
       
  3749             "datatable-core",
       
  3750             "datatable-table",
       
  3751             "datatable-head",
       
  3752             "datatable-body",
       
  3753             "base-build",
       
  3754             "widget"
       
  3755         ],
       
  3756         "skinnable": true
       
  3757     },
       
  3758     "datatable-body": {
       
  3759         "requires": [
       
  3760             "datatable-core",
       
  3761             "view",
       
  3762             "classnamemanager"
       
  3763         ]
       
  3764     },
       
  3765     "datatable-column-widths": {
       
  3766         "requires": [
       
  3767             "datatable-base"
       
  3768         ]
       
  3769     },
       
  3770     "datatable-core": {
       
  3771         "requires": [
       
  3772             "escape",
       
  3773             "model-list",
       
  3774             "node-event-delegate"
       
  3775         ]
       
  3776     },
       
  3777     "datatable-datasource": {
       
  3778         "requires": [
       
  3779             "datatable-base",
       
  3780             "plugin",
       
  3781             "datasource-local"
       
  3782         ]
       
  3783     },
       
  3784     "datatable-formatters": {
       
  3785         "requires": [
       
  3786             "datatable-body",
       
  3787             "datatype-number-format",
       
  3788             "datatype-date-format",
       
  3789             "escape"
       
  3790         ]
       
  3791     },
       
  3792     "datatable-head": {
       
  3793         "requires": [
       
  3794             "datatable-core",
       
  3795             "view",
       
  3796             "classnamemanager"
       
  3797         ]
       
  3798     },
       
  3799     "datatable-message": {
       
  3800         "lang": [
       
  3801             "en",
       
  3802             "fr",
       
  3803             "es",
       
  3804             "it"
       
  3805         ],
       
  3806         "requires": [
       
  3807             "datatable-base"
       
  3808         ],
       
  3809         "skinnable": true
       
  3810     },
       
  3811     "datatable-mutable": {
       
  3812         "requires": [
       
  3813             "datatable-base"
       
  3814         ]
       
  3815     },
       
  3816     "datatable-scroll": {
       
  3817         "requires": [
       
  3818             "datatable-base",
       
  3819             "datatable-column-widths",
       
  3820             "dom-screen"
       
  3821         ],
       
  3822         "skinnable": true
       
  3823     },
       
  3824     "datatable-sort": {
       
  3825         "lang": [
       
  3826             "en",
       
  3827             "fr",
       
  3828             "es"
       
  3829         ],
       
  3830         "requires": [
       
  3831             "datatable-base"
       
  3832         ],
       
  3833         "skinnable": true
       
  3834     },
       
  3835     "datatable-table": {
       
  3836         "requires": [
       
  3837             "datatable-core",
       
  3838             "datatable-head",
       
  3839             "datatable-body",
       
  3840             "view",
       
  3841             "classnamemanager"
       
  3842         ]
       
  3843     },
       
  3844     "datatype": {
       
  3845         "use": [
       
  3846             "datatype-date",
       
  3847             "datatype-number",
       
  3848             "datatype-xml"
       
  3849         ]
       
  3850     },
       
  3851     "datatype-date": {
       
  3852         "use": [
       
  3853             "datatype-date-parse",
       
  3854             "datatype-date-format",
       
  3855             "datatype-date-math"
       
  3856         ]
       
  3857     },
       
  3858     "datatype-date-format": {
       
  3859         "lang": [
       
  3860             "ar",
       
  3861             "ar-JO",
       
  3862             "ca",
       
  3863             "ca-ES",
       
  3864             "da",
       
  3865             "da-DK",
       
  3866             "de",
       
  3867             "de-AT",
       
  3868             "de-DE",
       
  3869             "el",
       
  3870             "el-GR",
       
  3871             "en",
       
  3872             "en-AU",
       
  3873             "en-CA",
       
  3874             "en-GB",
       
  3875             "en-IE",
       
  3876             "en-IN",
       
  3877             "en-JO",
       
  3878             "en-MY",
       
  3879             "en-NZ",
       
  3880             "en-PH",
       
  3881             "en-SG",
       
  3882             "en-US",
       
  3883             "es",
       
  3884             "es-AR",
       
  3885             "es-BO",
       
  3886             "es-CL",
       
  3887             "es-CO",
       
  3888             "es-EC",
       
  3889             "es-ES",
       
  3890             "es-MX",
       
  3891             "es-PE",
       
  3892             "es-PY",
       
  3893             "es-US",
       
  3894             "es-UY",
       
  3895             "es-VE",
       
  3896             "fi",
       
  3897             "fi-FI",
       
  3898             "fr",
       
  3899             "fr-BE",
       
  3900             "fr-CA",
       
  3901             "fr-FR",
       
  3902             "hi",
       
  3903             "hi-IN",
       
  3904             "id",
       
  3905             "id-ID",
       
  3906             "it",
       
  3907             "it-IT",
       
  3908             "ja",
       
  3909             "ja-JP",
       
  3910             "ko",
       
  3911             "ko-KR",
       
  3912             "ms",
       
  3913             "ms-MY",
       
  3914             "nb",
       
  3915             "nb-NO",
       
  3916             "nl",
       
  3917             "nl-BE",
       
  3918             "nl-NL",
       
  3919             "pl",
       
  3920             "pl-PL",
       
  3921             "pt",
       
  3922             "pt-BR",
       
  3923             "ro",
       
  3924             "ro-RO",
       
  3925             "ru",
       
  3926             "ru-RU",
       
  3927             "sv",
       
  3928             "sv-SE",
       
  3929             "th",
       
  3930             "th-TH",
       
  3931             "tr",
       
  3932             "tr-TR",
       
  3933             "vi",
       
  3934             "vi-VN",
       
  3935             "zh-Hans",
       
  3936             "zh-Hans-CN",
       
  3937             "zh-Hant",
       
  3938             "zh-Hant-HK",
       
  3939             "zh-Hant-TW"
       
  3940         ]
       
  3941     },
       
  3942     "datatype-date-math": {
       
  3943         "requires": [
       
  3944             "yui-base"
       
  3945         ]
       
  3946     },
       
  3947     "datatype-date-parse": {},
       
  3948     "datatype-number": {
       
  3949         "use": [
       
  3950             "datatype-number-parse",
       
  3951             "datatype-number-format"
       
  3952         ]
       
  3953     },
       
  3954     "datatype-number-format": {},
       
  3955     "datatype-number-parse": {},
       
  3956     "datatype-xml": {
       
  3957         "use": [
       
  3958             "datatype-xml-parse",
       
  3959             "datatype-xml-format"
       
  3960         ]
       
  3961     },
       
  3962     "datatype-xml-format": {},
       
  3963     "datatype-xml-parse": {},
       
  3964     "dd": {
       
  3965         "use": [
       
  3966             "dd-ddm-base",
       
  3967             "dd-ddm",
       
  3968             "dd-ddm-drop",
       
  3969             "dd-drag",
       
  3970             "dd-proxy",
       
  3971             "dd-constrain",
       
  3972             "dd-drop",
       
  3973             "dd-scroll",
       
  3974             "dd-delegate"
       
  3975         ]
       
  3976     },
       
  3977     "dd-constrain": {
       
  3978         "requires": [
       
  3979             "dd-drag"
       
  3980         ]
       
  3981     },
       
  3982     "dd-ddm": {
       
  3983         "requires": [
       
  3984             "dd-ddm-base",
       
  3985             "event-resize"
       
  3986         ]
       
  3987     },
       
  3988     "dd-ddm-base": {
       
  3989         "requires": [
       
  3990             "node",
       
  3991             "base",
       
  3992             "yui-throttle",
       
  3993             "classnamemanager"
       
  3994         ]
       
  3995     },
       
  3996     "dd-ddm-drop": {
       
  3997         "requires": [
       
  3998             "dd-ddm"
       
  3999         ]
       
  4000     },
       
  4001     "dd-delegate": {
       
  4002         "requires": [
       
  4003             "dd-drag",
       
  4004             "dd-drop-plugin",
       
  4005             "event-mouseenter"
       
  4006         ]
       
  4007     },
       
  4008     "dd-drag": {
       
  4009         "requires": [
       
  4010             "dd-ddm-base"
       
  4011         ]
       
  4012     },
       
  4013     "dd-drop": {
       
  4014         "requires": [
       
  4015             "dd-drag",
       
  4016             "dd-ddm-drop"
       
  4017         ]
       
  4018     },
       
  4019     "dd-drop-plugin": {
       
  4020         "requires": [
       
  4021             "dd-drop"
       
  4022         ]
       
  4023     },
       
  4024     "dd-gestures": {
       
  4025         "condition": {
       
  4026             "name": "dd-gestures",
       
  4027             "trigger": "dd-drag",
       
  4028             "ua": "touchEnabled"
       
  4029         },
       
  4030         "requires": [
       
  4031             "dd-drag",
       
  4032             "event-synthetic",
       
  4033             "event-gestures"
       
  4034         ]
       
  4035     },
       
  4036     "dd-plugin": {
       
  4037         "optional": [
       
  4038             "dd-constrain",
       
  4039             "dd-proxy"
       
  4040         ],
       
  4041         "requires": [
       
  4042             "dd-drag"
       
  4043         ]
       
  4044     },
       
  4045     "dd-proxy": {
       
  4046         "requires": [
       
  4047             "dd-drag"
       
  4048         ]
       
  4049     },
       
  4050     "dd-scroll": {
       
  4051         "requires": [
       
  4052             "dd-drag"
       
  4053         ]
       
  4054     },
       
  4055     "dial": {
       
  4056         "lang": [
       
  4057             "en",
       
  4058             "es"
       
  4059         ],
       
  4060         "requires": [
       
  4061             "widget",
       
  4062             "dd-drag",
       
  4063             "event-mouseenter",
       
  4064             "event-move",
       
  4065             "event-key",
       
  4066             "transition",
       
  4067             "intl"
       
  4068         ],
       
  4069         "skinnable": true
       
  4070     },
       
  4071     "dom": {
       
  4072         "use": [
       
  4073             "dom-base",
       
  4074             "dom-screen",
       
  4075             "dom-style",
       
  4076             "selector-native",
       
  4077             "selector"
       
  4078         ]
       
  4079     },
       
  4080     "dom-base": {
       
  4081         "requires": [
       
  4082             "dom-core"
       
  4083         ]
       
  4084     },
       
  4085     "dom-core": {
       
  4086         "requires": [
       
  4087             "oop",
       
  4088             "features"
       
  4089         ]
       
  4090     },
       
  4091     "dom-deprecated": {
       
  4092         "requires": [
       
  4093             "dom-base"
       
  4094         ]
       
  4095     },
       
  4096     "dom-screen": {
       
  4097         "requires": [
       
  4098             "dom-base",
       
  4099             "dom-style"
       
  4100         ]
       
  4101     },
       
  4102     "dom-style": {
       
  4103         "requires": [
       
  4104             "dom-base",
       
  4105             "color-base"
       
  4106         ]
       
  4107     },
       
  4108     "dom-style-ie": {
       
  4109         "condition": {
       
  4110             "name": "dom-style-ie",
       
  4111             "test": function (Y) {
       
  4112 
       
  4113     var testFeature = Y.Features.test,
       
  4114         addFeature = Y.Features.add,
       
  4115         WINDOW = Y.config.win,
       
  4116         DOCUMENT = Y.config.doc,
       
  4117         DOCUMENT_ELEMENT = 'documentElement',
       
  4118         ret = false;
       
  4119 
       
  4120     addFeature('style', 'computedStyle', {
       
  4121         test: function() {
       
  4122             return WINDOW && 'getComputedStyle' in WINDOW;
       
  4123         }
       
  4124     });
       
  4125 
       
  4126     addFeature('style', 'opacity', {
       
  4127         test: function() {
       
  4128             return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style;
       
  4129         }
       
  4130     });
       
  4131 
       
  4132     ret =  (!testFeature('style', 'opacity') &&
       
  4133             !testFeature('style', 'computedStyle'));
       
  4134 
       
  4135     return ret;
       
  4136 },
       
  4137             "trigger": "dom-style"
       
  4138         },
       
  4139         "requires": [
       
  4140             "dom-style"
       
  4141         ]
       
  4142     },
       
  4143     "dump": {
       
  4144         "requires": [
       
  4145             "yui-base"
       
  4146         ]
       
  4147     },
       
  4148     "editor": {
       
  4149         "use": [
       
  4150             "frame",
       
  4151             "editor-selection",
       
  4152             "exec-command",
       
  4153             "editor-base",
       
  4154             "editor-para",
       
  4155             "editor-br",
       
  4156             "editor-bidi",
       
  4157             "editor-tab",
       
  4158             "createlink-base"
       
  4159         ]
       
  4160     },
       
  4161     "editor-base": {
       
  4162         "requires": [
       
  4163             "base",
       
  4164             "frame",
       
  4165             "node",
       
  4166             "exec-command",
       
  4167             "editor-selection"
       
  4168         ]
       
  4169     },
       
  4170     "editor-bidi": {
       
  4171         "requires": [
       
  4172             "editor-base"
       
  4173         ]
       
  4174     },
       
  4175     "editor-br": {
       
  4176         "requires": [
       
  4177             "editor-base"
       
  4178         ]
       
  4179     },
       
  4180     "editor-lists": {
       
  4181         "requires": [
       
  4182             "editor-base"
       
  4183         ]
       
  4184     },
       
  4185     "editor-para": {
       
  4186         "requires": [
       
  4187             "editor-para-base"
       
  4188         ]
       
  4189     },
       
  4190     "editor-para-base": {
       
  4191         "requires": [
       
  4192             "editor-base"
       
  4193         ]
       
  4194     },
       
  4195     "editor-para-ie": {
       
  4196         "condition": {
       
  4197             "name": "editor-para-ie",
       
  4198             "trigger": "editor-para",
       
  4199             "ua": "ie",
       
  4200             "when": "instead"
       
  4201         },
       
  4202         "requires": [
       
  4203             "editor-para-base"
       
  4204         ]
       
  4205     },
       
  4206     "editor-selection": {
       
  4207         "requires": [
       
  4208             "node"
       
  4209         ]
       
  4210     },
       
  4211     "editor-tab": {
       
  4212         "requires": [
       
  4213             "editor-base"
       
  4214         ]
       
  4215     },
       
  4216     "escape": {
       
  4217         "requires": [
       
  4218             "yui-base"
       
  4219         ]
       
  4220     },
       
  4221     "event": {
       
  4222         "after": [
       
  4223             "node-base"
       
  4224         ],
       
  4225         "use": [
       
  4226             "event-base",
       
  4227             "event-delegate",
       
  4228             "event-synthetic",
       
  4229             "event-mousewheel",
       
  4230             "event-mouseenter",
       
  4231             "event-key",
       
  4232             "event-focus",
       
  4233             "event-resize",
       
  4234             "event-hover",
       
  4235             "event-outside",
       
  4236             "event-touch",
       
  4237             "event-move",
       
  4238             "event-flick",
       
  4239             "event-valuechange",
       
  4240             "event-tap"
       
  4241         ]
       
  4242     },
       
  4243     "event-base": {
       
  4244         "after": [
       
  4245             "node-base"
       
  4246         ],
       
  4247         "requires": [
       
  4248             "event-custom-base"
       
  4249         ]
       
  4250     },
       
  4251     "event-base-ie": {
       
  4252         "after": [
       
  4253             "event-base"
       
  4254         ],
       
  4255         "condition": {
       
  4256             "name": "event-base-ie",
       
  4257             "test": function(Y) {
       
  4258     var imp = Y.config.doc && Y.config.doc.implementation;
       
  4259     return (imp && (!imp.hasFeature('Events', '2.0')));
       
  4260 },
       
  4261             "trigger": "node-base"
       
  4262         },
       
  4263         "requires": [
       
  4264             "node-base"
       
  4265         ]
       
  4266     },
       
  4267     "event-contextmenu": {
       
  4268         "requires": [
       
  4269             "event-synthetic",
       
  4270             "dom-screen"
       
  4271         ]
       
  4272     },
       
  4273     "event-custom": {
       
  4274         "use": [
       
  4275             "event-custom-base",
       
  4276             "event-custom-complex"
       
  4277         ]
       
  4278     },
       
  4279     "event-custom-base": {
       
  4280         "requires": [
       
  4281             "oop"
       
  4282         ]
       
  4283     },
       
  4284     "event-custom-complex": {
       
  4285         "requires": [
       
  4286             "event-custom-base"
       
  4287         ]
       
  4288     },
       
  4289     "event-delegate": {
       
  4290         "requires": [
       
  4291             "node-base"
       
  4292         ]
       
  4293     },
       
  4294     "event-flick": {
       
  4295         "requires": [
       
  4296             "node-base",
       
  4297             "event-touch",
       
  4298             "event-synthetic"
       
  4299         ]
       
  4300     },
       
  4301     "event-focus": {
       
  4302         "requires": [
       
  4303             "event-synthetic"
       
  4304         ]
       
  4305     },
       
  4306     "event-gestures": {
       
  4307         "use": [
       
  4308             "event-flick",
       
  4309             "event-move"
       
  4310         ]
       
  4311     },
       
  4312     "event-hover": {
       
  4313         "requires": [
       
  4314             "event-mouseenter"
       
  4315         ]
       
  4316     },
       
  4317     "event-key": {
       
  4318         "requires": [
       
  4319             "event-synthetic"
       
  4320         ]
       
  4321     },
       
  4322     "event-mouseenter": {
       
  4323         "requires": [
       
  4324             "event-synthetic"
       
  4325         ]
       
  4326     },
       
  4327     "event-mousewheel": {
       
  4328         "requires": [
       
  4329             "node-base"
       
  4330         ]
       
  4331     },
       
  4332     "event-move": {
       
  4333         "requires": [
       
  4334             "node-base",
       
  4335             "event-touch",
       
  4336             "event-synthetic"
       
  4337         ]
       
  4338     },
       
  4339     "event-outside": {
       
  4340         "requires": [
       
  4341             "event-synthetic"
       
  4342         ]
       
  4343     },
       
  4344     "event-resize": {
       
  4345         "requires": [
       
  4346             "node-base",
       
  4347             "event-synthetic"
       
  4348         ]
       
  4349     },
       
  4350     "event-simulate": {
       
  4351         "requires": [
       
  4352             "event-base"
       
  4353         ]
       
  4354     },
       
  4355     "event-synthetic": {
       
  4356         "requires": [
       
  4357             "node-base",
       
  4358             "event-custom-complex"
       
  4359         ]
       
  4360     },
       
  4361     "event-tap": {
       
  4362         "requires": [
       
  4363             "node-base",
       
  4364             "event-base",
       
  4365             "event-touch",
       
  4366             "event-synthetic"
       
  4367         ]
       
  4368     },
       
  4369     "event-touch": {
       
  4370         "requires": [
       
  4371             "node-base"
       
  4372         ]
       
  4373     },
       
  4374     "event-valuechange": {
       
  4375         "requires": [
       
  4376             "event-focus",
       
  4377             "event-synthetic"
       
  4378         ]
       
  4379     },
       
  4380     "exec-command": {
       
  4381         "requires": [
       
  4382             "frame"
       
  4383         ]
       
  4384     },
       
  4385     "features": {
       
  4386         "requires": [
       
  4387             "yui-base"
       
  4388         ]
       
  4389     },
       
  4390     "file": {
       
  4391         "requires": [
       
  4392             "file-flash",
       
  4393             "file-html5"
       
  4394         ]
       
  4395     },
       
  4396     "file-flash": {
       
  4397         "requires": [
       
  4398             "base"
       
  4399         ]
       
  4400     },
       
  4401     "file-html5": {
       
  4402         "requires": [
       
  4403             "base"
       
  4404         ]
       
  4405     },
       
  4406     "frame": {
       
  4407         "requires": [
       
  4408             "base",
       
  4409             "node",
       
  4410             "selector-css3",
       
  4411             "yui-throttle"
       
  4412         ]
       
  4413     },
       
  4414     "gesture-simulate": {
       
  4415         "requires": [
       
  4416             "async-queue",
       
  4417             "event-simulate",
       
  4418             "node-screen"
       
  4419         ]
       
  4420     },
       
  4421     "get": {
       
  4422         "requires": [
       
  4423             "yui-base"
       
  4424         ]
       
  4425     },
       
  4426     "graphics": {
       
  4427         "requires": [
       
  4428             "node",
       
  4429             "event-custom",
       
  4430             "pluginhost",
       
  4431             "matrix",
       
  4432             "classnamemanager"
       
  4433         ]
       
  4434     },
       
  4435     "graphics-canvas": {
       
  4436         "condition": {
       
  4437             "name": "graphics-canvas",
       
  4438             "test": function(Y) {
       
  4439     var DOCUMENT = Y.config.doc,
       
  4440         useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
       
  4441 		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
       
  4442         svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
       
  4443     return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
       
  4444 },
       
  4445             "trigger": "graphics"
       
  4446         },
       
  4447         "requires": [
       
  4448             "graphics"
       
  4449         ]
       
  4450     },
       
  4451     "graphics-canvas-default": {
       
  4452         "condition": {
       
  4453             "name": "graphics-canvas-default",
       
  4454             "test": function(Y) {
       
  4455     var DOCUMENT = Y.config.doc,
       
  4456         useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas",
       
  4457 		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
       
  4458         svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
       
  4459     return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d"));
       
  4460 },
       
  4461             "trigger": "graphics"
       
  4462         }
       
  4463     },
       
  4464     "graphics-group": {
       
  4465         "requires": [
       
  4466             "graphics"
       
  4467         ]
       
  4468     },
       
  4469     "graphics-svg": {
       
  4470         "condition": {
       
  4471             "name": "graphics-svg",
       
  4472             "test": function(Y) {
       
  4473     var DOCUMENT = Y.config.doc,
       
  4474         useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
       
  4475 		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
       
  4476         svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
       
  4477     
       
  4478     return svg && (useSVG || !canvas);
       
  4479 },
       
  4480             "trigger": "graphics"
       
  4481         },
       
  4482         "requires": [
       
  4483             "graphics"
       
  4484         ]
       
  4485     },
       
  4486     "graphics-svg-default": {
       
  4487         "condition": {
       
  4488             "name": "graphics-svg-default",
       
  4489             "test": function(Y) {
       
  4490     var DOCUMENT = Y.config.doc,
       
  4491         useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas",
       
  4492 		canvas = DOCUMENT && DOCUMENT.createElement("canvas"),
       
  4493         svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"));
       
  4494     
       
  4495     return svg && (useSVG || !canvas);
       
  4496 },
       
  4497             "trigger": "graphics"
       
  4498         }
       
  4499     },
       
  4500     "graphics-vml": {
       
  4501         "condition": {
       
  4502             "name": "graphics-vml",
       
  4503             "test": function(Y) {
       
  4504     var DOCUMENT = Y.config.doc,
       
  4505 		canvas = DOCUMENT && DOCUMENT.createElement("canvas");
       
  4506     return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
       
  4507 },
       
  4508             "trigger": "graphics"
       
  4509         },
       
  4510         "requires": [
       
  4511             "graphics"
       
  4512         ]
       
  4513     },
       
  4514     "graphics-vml-default": {
       
  4515         "condition": {
       
  4516             "name": "graphics-vml-default",
       
  4517             "test": function(Y) {
       
  4518     var DOCUMENT = Y.config.doc,
       
  4519 		canvas = DOCUMENT && DOCUMENT.createElement("canvas");
       
  4520     return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d")));
       
  4521 },
       
  4522             "trigger": "graphics"
       
  4523         }
       
  4524     },
       
  4525     "handlebars": {
       
  4526         "use": [
       
  4527             "handlebars-compiler"
       
  4528         ]
       
  4529     },
       
  4530     "handlebars-base": {
       
  4531         "requires": []
       
  4532     },
       
  4533     "handlebars-compiler": {
       
  4534         "requires": [
       
  4535             "handlebars-base"
       
  4536         ]
       
  4537     },
       
  4538     "highlight": {
       
  4539         "use": [
       
  4540             "highlight-base",
       
  4541             "highlight-accentfold"
       
  4542         ]
       
  4543     },
       
  4544     "highlight-accentfold": {
       
  4545         "requires": [
       
  4546             "highlight-base",
       
  4547             "text-accentfold"
       
  4548         ]
       
  4549     },
       
  4550     "highlight-base": {
       
  4551         "requires": [
       
  4552             "array-extras",
       
  4553             "classnamemanager",
       
  4554             "escape",
       
  4555             "text-wordbreak"
       
  4556         ]
       
  4557     },
       
  4558     "history": {
       
  4559         "use": [
       
  4560             "history-base",
       
  4561             "history-hash",
       
  4562             "history-hash-ie",
       
  4563             "history-html5"
       
  4564         ]
       
  4565     },
       
  4566     "history-base": {
       
  4567         "requires": [
       
  4568             "event-custom-complex"
       
  4569         ]
       
  4570     },
       
  4571     "history-hash": {
       
  4572         "after": [
       
  4573             "history-html5"
       
  4574         ],
       
  4575         "requires": [
       
  4576             "event-synthetic",
       
  4577             "history-base",
       
  4578             "yui-later"
       
  4579         ]
       
  4580     },
       
  4581     "history-hash-ie": {
       
  4582         "condition": {
       
  4583             "name": "history-hash-ie",
       
  4584             "test": function (Y) {
       
  4585     var docMode = Y.config.doc && Y.config.doc.documentMode;
       
  4586 
       
  4587     return Y.UA.ie && (!('onhashchange' in Y.config.win) ||
       
  4588             !docMode || docMode < 8);
       
  4589 },
       
  4590             "trigger": "history-hash"
       
  4591         },
       
  4592         "requires": [
       
  4593             "history-hash",
       
  4594             "node-base"
       
  4595         ]
       
  4596     },
       
  4597     "history-html5": {
       
  4598         "optional": [
       
  4599             "json"
       
  4600         ],
       
  4601         "requires": [
       
  4602             "event-base",
       
  4603             "history-base",
       
  4604             "node-base"
       
  4605         ]
       
  4606     },
       
  4607     "imageloader": {
       
  4608         "requires": [
       
  4609             "base-base",
       
  4610             "node-style",
       
  4611             "node-screen"
       
  4612         ]
       
  4613     },
       
  4614     "intl": {
       
  4615         "requires": [
       
  4616             "intl-base",
       
  4617             "event-custom"
       
  4618         ]
       
  4619     },
       
  4620     "intl-base": {
       
  4621         "requires": [
       
  4622             "yui-base"
       
  4623         ]
       
  4624     },
       
  4625     "io": {
       
  4626         "use": [
       
  4627             "io-base",
       
  4628             "io-xdr",
       
  4629             "io-form",
       
  4630             "io-upload-iframe",
       
  4631             "io-queue"
       
  4632         ]
       
  4633     },
       
  4634     "io-base": {
       
  4635         "requires": [
       
  4636             "event-custom-base",
       
  4637             "querystring-stringify-simple"
       
  4638         ]
       
  4639     },
       
  4640     "io-form": {
       
  4641         "requires": [
       
  4642             "io-base",
       
  4643             "node-base"
       
  4644         ]
       
  4645     },
       
  4646     "io-nodejs": {
       
  4647         "condition": {
       
  4648             "name": "io-nodejs",
       
  4649             "trigger": "io-base",
       
  4650             "ua": "nodejs"
       
  4651         },
       
  4652         "requires": [
       
  4653             "io-base"
       
  4654         ]
       
  4655     },
       
  4656     "io-queue": {
       
  4657         "requires": [
       
  4658             "io-base",
       
  4659             "queue-promote"
       
  4660         ]
       
  4661     },
       
  4662     "io-upload-iframe": {
       
  4663         "requires": [
       
  4664             "io-base",
       
  4665             "node-base"
       
  4666         ]
       
  4667     },
       
  4668     "io-xdr": {
       
  4669         "requires": [
       
  4670             "io-base",
       
  4671             "datatype-xml-parse"
       
  4672         ]
       
  4673     },
       
  4674     "json": {
       
  4675         "use": [
       
  4676             "json-parse",
       
  4677             "json-stringify"
       
  4678         ]
       
  4679     },
       
  4680     "json-parse": {
       
  4681         "requires": [
       
  4682             "yui-base"
       
  4683         ]
       
  4684     },
       
  4685     "json-parse-shim": {
       
  4686         "condition": {
       
  4687             "name": "json-parse-shim",
       
  4688             "test": function (Y) {
       
  4689     var _JSON = Y.config.global.JSON,
       
  4690         Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
       
  4691         nativeSupport = Y.config.useNativeJSONParse !== false && !!Native;
       
  4692 
       
  4693     function workingNative( k, v ) {
       
  4694         return k === "ok" ? true : v;
       
  4695     }
       
  4696     
       
  4697     // Double check basic functionality.  This is mainly to catch early broken
       
  4698     // implementations of the JSON API in Firefox 3.1 beta1 and beta2
       
  4699     if ( nativeSupport ) {
       
  4700         try {
       
  4701             nativeSupport = ( Native.parse( '{"ok":false}', workingNative ) ).ok;
       
  4702         }
       
  4703         catch ( e ) {
       
  4704             nativeSupport = false;
       
  4705         }
       
  4706     }
       
  4707 
       
  4708     return !nativeSupport;
       
  4709 },
       
  4710             "trigger": "json-parse"
       
  4711         },
       
  4712         "requires": [
       
  4713             "json-parse"
       
  4714         ]
       
  4715     },
       
  4716     "json-stringify": {
       
  4717         "requires": [
       
  4718             "yui-base"
       
  4719         ]
       
  4720     },
       
  4721     "json-stringify-shim": {
       
  4722         "condition": {
       
  4723             "name": "json-stringify-shim",
       
  4724             "test": function (Y) {
       
  4725     var _JSON = Y.config.global.JSON,
       
  4726         Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON,
       
  4727         nativeSupport = Y.config.useNativeJSONStringify !== false && !!Native;
       
  4728 
       
  4729     // Double check basic native functionality.  This is primarily to catch broken
       
  4730     // early JSON API implementations in Firefox 3.1 beta1 and beta2.
       
  4731     if ( nativeSupport ) {
       
  4732         try {
       
  4733             nativeSupport = ( '0' === Native.stringify(0) );
       
  4734         } catch ( e ) {
       
  4735             nativeSupport = false;
       
  4736         }
       
  4737     }
       
  4738 
       
  4739 
       
  4740     return !nativeSupport;
       
  4741 },
       
  4742             "trigger": "json-stringify"
       
  4743         },
       
  4744         "requires": [
       
  4745             "json-stringify"
       
  4746         ]
       
  4747     },
       
  4748     "jsonp": {
       
  4749         "requires": [
       
  4750             "get",
       
  4751             "oop"
       
  4752         ]
       
  4753     },
       
  4754     "jsonp-url": {
       
  4755         "requires": [
       
  4756             "jsonp"
       
  4757         ]
       
  4758     },
       
  4759     "lazy-model-list": {
       
  4760         "requires": [
       
  4761             "model-list"
       
  4762         ]
       
  4763     },
       
  4764     "loader": {
       
  4765         "use": [
       
  4766             "loader-base",
       
  4767             "loader-rollup",
       
  4768             "loader-yui3"
       
  4769         ]
       
  4770     },
       
  4771     "loader-base": {
       
  4772         "requires": [
       
  4773             "get",
       
  4774             "features"
       
  4775         ]
       
  4776     },
       
  4777     "loader-rollup": {
       
  4778         "requires": [
       
  4779             "loader-base"
       
  4780         ]
       
  4781     },
       
  4782     "loader-yui3": {
       
  4783         "requires": [
       
  4784             "loader-base"
       
  4785         ]
       
  4786     },
       
  4787     "matrix": {
       
  4788         "requires": [
       
  4789             "yui-base"
       
  4790         ]
       
  4791     },
       
  4792     "model": {
       
  4793         "requires": [
       
  4794             "base-build",
       
  4795             "escape",
       
  4796             "json-parse"
       
  4797         ]
       
  4798     },
       
  4799     "model-list": {
       
  4800         "requires": [
       
  4801             "array-extras",
       
  4802             "array-invoke",
       
  4803             "arraylist",
       
  4804             "base-build",
       
  4805             "escape",
       
  4806             "json-parse",
       
  4807             "model"
       
  4808         ]
       
  4809     },
       
  4810     "model-sync-rest": {
       
  4811         "requires": [
       
  4812             "model",
       
  4813             "io-base",
       
  4814             "json-stringify"
       
  4815         ]
       
  4816     },
       
  4817     "node": {
       
  4818         "use": [
       
  4819             "node-base",
       
  4820             "node-event-delegate",
       
  4821             "node-pluginhost",
       
  4822             "node-screen",
       
  4823             "node-style"
       
  4824         ]
       
  4825     },
       
  4826     "node-base": {
       
  4827         "requires": [
       
  4828             "event-base",
       
  4829             "node-core",
       
  4830             "dom-base"
       
  4831         ]
       
  4832     },
       
  4833     "node-core": {
       
  4834         "requires": [
       
  4835             "dom-core",
       
  4836             "selector"
       
  4837         ]
       
  4838     },
       
  4839     "node-deprecated": {
       
  4840         "requires": [
       
  4841             "node-base"
       
  4842         ]
       
  4843     },
       
  4844     "node-event-delegate": {
       
  4845         "requires": [
       
  4846             "node-base",
       
  4847             "event-delegate"
       
  4848         ]
       
  4849     },
       
  4850     "node-event-html5": {
       
  4851         "requires": [
       
  4852             "node-base"
       
  4853         ]
       
  4854     },
       
  4855     "node-event-simulate": {
       
  4856         "requires": [
       
  4857             "node-base",
       
  4858             "event-simulate",
       
  4859             "gesture-simulate"
       
  4860         ]
       
  4861     },
       
  4862     "node-flick": {
       
  4863         "requires": [
       
  4864             "classnamemanager",
       
  4865             "transition",
       
  4866             "event-flick",
       
  4867             "plugin"
       
  4868         ],
       
  4869         "skinnable": true
       
  4870     },
       
  4871     "node-focusmanager": {
       
  4872         "requires": [
       
  4873             "attribute",
       
  4874             "node",
       
  4875             "plugin",
       
  4876             "node-event-simulate",
       
  4877             "event-key",
       
  4878             "event-focus"
       
  4879         ]
       
  4880     },
       
  4881     "node-load": {
       
  4882         "requires": [
       
  4883             "node-base",
       
  4884             "io-base"
       
  4885         ]
       
  4886     },
       
  4887     "node-menunav": {
       
  4888         "requires": [
       
  4889             "node",
       
  4890             "classnamemanager",
       
  4891             "plugin",
       
  4892             "node-focusmanager"
       
  4893         ],
       
  4894         "skinnable": true
       
  4895     },
       
  4896     "node-pluginhost": {
       
  4897         "requires": [
       
  4898             "node-base",
       
  4899             "pluginhost"
       
  4900         ]
       
  4901     },
       
  4902     "node-screen": {
       
  4903         "requires": [
       
  4904             "dom-screen",
       
  4905             "node-base"
       
  4906         ]
       
  4907     },
       
  4908     "node-scroll-info": {
       
  4909         "requires": [
       
  4910             "base-build",
       
  4911             "dom-screen",
       
  4912             "event-resize",
       
  4913             "node-pluginhost",
       
  4914             "plugin"
       
  4915         ]
       
  4916     },
       
  4917     "node-style": {
       
  4918         "requires": [
       
  4919             "dom-style",
       
  4920             "node-base"
       
  4921         ]
       
  4922     },
       
  4923     "oop": {
       
  4924         "requires": [
       
  4925             "yui-base"
       
  4926         ]
       
  4927     },
       
  4928     "overlay": {
       
  4929         "requires": [
       
  4930             "widget",
       
  4931             "widget-stdmod",
       
  4932             "widget-position",
       
  4933             "widget-position-align",
       
  4934             "widget-stack",
       
  4935             "widget-position-constrain"
       
  4936         ],
       
  4937         "skinnable": true
       
  4938     },
       
  4939     "panel": {
       
  4940         "requires": [
       
  4941             "widget",
       
  4942             "widget-autohide",
       
  4943             "widget-buttons",
       
  4944             "widget-modality",
       
  4945             "widget-position",
       
  4946             "widget-position-align",
       
  4947             "widget-position-constrain",
       
  4948             "widget-stack",
       
  4949             "widget-stdmod"
       
  4950         ],
       
  4951         "skinnable": true
       
  4952     },
       
  4953     "parallel": {
       
  4954         "requires": [
       
  4955             "yui-base"
       
  4956         ]
       
  4957     },
       
  4958     "pjax": {
       
  4959         "requires": [
       
  4960             "pjax-base",
       
  4961             "pjax-content"
       
  4962         ]
       
  4963     },
       
  4964     "pjax-base": {
       
  4965         "requires": [
       
  4966             "classnamemanager",
       
  4967             "node-event-delegate",
       
  4968             "router"
       
  4969         ]
       
  4970     },
       
  4971     "pjax-content": {
       
  4972         "requires": [
       
  4973             "io-base",
       
  4974             "node-base",
       
  4975             "router"
       
  4976         ]
       
  4977     },
       
  4978     "pjax-plugin": {
       
  4979         "requires": [
       
  4980             "node-pluginhost",
       
  4981             "pjax",
       
  4982             "plugin"
       
  4983         ]
       
  4984     },
       
  4985     "plugin": {
       
  4986         "requires": [
       
  4987             "base-base"
       
  4988         ]
       
  4989     },
       
  4990     "pluginhost": {
       
  4991         "use": [
       
  4992             "pluginhost-base",
       
  4993             "pluginhost-config"
       
  4994         ]
       
  4995     },
       
  4996     "pluginhost-base": {
       
  4997         "requires": [
       
  4998             "yui-base"
       
  4999         ]
       
  5000     },
       
  5001     "pluginhost-config": {
       
  5002         "requires": [
       
  5003             "pluginhost-base"
       
  5004         ]
       
  5005     },
       
  5006     "promise": {
       
  5007         "requires": [
       
  5008             "timers"
       
  5009         ]
       
  5010     },
       
  5011     "querystring": {
       
  5012         "use": [
       
  5013             "querystring-parse",
       
  5014             "querystring-stringify"
       
  5015         ]
       
  5016     },
       
  5017     "querystring-parse": {
       
  5018         "requires": [
       
  5019             "yui-base",
       
  5020             "array-extras"
       
  5021         ]
       
  5022     },
       
  5023     "querystring-parse-simple": {
       
  5024         "requires": [
       
  5025             "yui-base"
       
  5026         ]
       
  5027     },
       
  5028     "querystring-stringify": {
       
  5029         "requires": [
       
  5030             "yui-base"
       
  5031         ]
       
  5032     },
       
  5033     "querystring-stringify-simple": {
       
  5034         "requires": [
       
  5035             "yui-base"
       
  5036         ]
       
  5037     },
       
  5038     "queue-promote": {
       
  5039         "requires": [
       
  5040             "yui-base"
       
  5041         ]
       
  5042     },
       
  5043     "range-slider": {
       
  5044         "requires": [
       
  5045             "slider-base",
       
  5046             "slider-value-range",
       
  5047             "clickable-rail"
       
  5048         ]
       
  5049     },
       
  5050     "recordset": {
       
  5051         "use": [
       
  5052             "recordset-base",
       
  5053             "recordset-sort",
       
  5054             "recordset-filter",
       
  5055             "recordset-indexer"
       
  5056         ]
       
  5057     },
       
  5058     "recordset-base": {
       
  5059         "requires": [
       
  5060             "base",
       
  5061             "arraylist"
       
  5062         ]
       
  5063     },
       
  5064     "recordset-filter": {
       
  5065         "requires": [
       
  5066             "recordset-base",
       
  5067             "array-extras",
       
  5068             "plugin"
       
  5069         ]
       
  5070     },
       
  5071     "recordset-indexer": {
       
  5072         "requires": [
       
  5073             "recordset-base",
       
  5074             "plugin"
       
  5075         ]
       
  5076     },
       
  5077     "recordset-sort": {
       
  5078         "requires": [
       
  5079             "arraysort",
       
  5080             "recordset-base",
       
  5081             "plugin"
       
  5082         ]
       
  5083     },
       
  5084     "resize": {
       
  5085         "use": [
       
  5086             "resize-base",
       
  5087             "resize-proxy",
       
  5088             "resize-constrain"
       
  5089         ]
       
  5090     },
       
  5091     "resize-base": {
       
  5092         "requires": [
       
  5093             "base",
       
  5094             "widget",
       
  5095             "event",
       
  5096             "oop",
       
  5097             "dd-drag",
       
  5098             "dd-delegate",
       
  5099             "dd-drop"
       
  5100         ],
       
  5101         "skinnable": true
       
  5102     },
       
  5103     "resize-constrain": {
       
  5104         "requires": [
       
  5105             "plugin",
       
  5106             "resize-base"
       
  5107         ]
       
  5108     },
       
  5109     "resize-plugin": {
       
  5110         "optional": [
       
  5111             "resize-constrain"
       
  5112         ],
       
  5113         "requires": [
       
  5114             "resize-base",
       
  5115             "plugin"
       
  5116         ]
       
  5117     },
       
  5118     "resize-proxy": {
       
  5119         "requires": [
       
  5120             "plugin",
       
  5121             "resize-base"
       
  5122         ]
       
  5123     },
       
  5124     "router": {
       
  5125         "optional": [
       
  5126             "querystring-parse"
       
  5127         ],
       
  5128         "requires": [
       
  5129             "array-extras",
       
  5130             "base-build",
       
  5131             "history"
       
  5132         ]
       
  5133     },
       
  5134     "scrollview": {
       
  5135         "requires": [
       
  5136             "scrollview-base",
       
  5137             "scrollview-scrollbars"
       
  5138         ]
       
  5139     },
       
  5140     "scrollview-base": {
       
  5141         "requires": [
       
  5142             "widget",
       
  5143             "event-gestures",
       
  5144             "event-mousewheel",
       
  5145             "transition"
       
  5146         ],
       
  5147         "skinnable": true
       
  5148     },
       
  5149     "scrollview-base-ie": {
       
  5150         "condition": {
       
  5151             "name": "scrollview-base-ie",
       
  5152             "trigger": "scrollview-base",
       
  5153             "ua": "ie"
       
  5154         },
       
  5155         "requires": [
       
  5156             "scrollview-base"
       
  5157         ]
       
  5158     },
       
  5159     "scrollview-list": {
       
  5160         "requires": [
       
  5161             "plugin",
       
  5162             "classnamemanager"
       
  5163         ],
       
  5164         "skinnable": true
       
  5165     },
       
  5166     "scrollview-paginator": {
       
  5167         "requires": [
       
  5168             "plugin",
       
  5169             "classnamemanager"
       
  5170         ]
       
  5171     },
       
  5172     "scrollview-scrollbars": {
       
  5173         "requires": [
       
  5174             "classnamemanager",
       
  5175             "transition",
       
  5176             "plugin"
       
  5177         ],
       
  5178         "skinnable": true
       
  5179     },
       
  5180     "selector": {
       
  5181         "requires": [
       
  5182             "selector-native"
       
  5183         ]
       
  5184     },
       
  5185     "selector-css2": {
       
  5186         "condition": {
       
  5187             "name": "selector-css2",
       
  5188             "test": function (Y) {
       
  5189     var DOCUMENT = Y.config.doc,
       
  5190         ret = DOCUMENT && !('querySelectorAll' in DOCUMENT);
       
  5191 
       
  5192     return ret;
       
  5193 },
       
  5194             "trigger": "selector"
       
  5195         },
       
  5196         "requires": [
       
  5197             "selector-native"
       
  5198         ]
       
  5199     },
       
  5200     "selector-css3": {
       
  5201         "requires": [
       
  5202             "selector-native",
       
  5203             "selector-css2"
       
  5204         ]
       
  5205     },
       
  5206     "selector-native": {
       
  5207         "requires": [
       
  5208             "dom-base"
       
  5209         ]
       
  5210     },
       
  5211     "series-area": {
       
  5212         "requires": [
       
  5213             "series-cartesian",
       
  5214             "series-fill-util"
       
  5215         ]
       
  5216     },
       
  5217     "series-area-stacked": {
       
  5218         "requires": [
       
  5219             "series-stacked",
       
  5220             "series-area"
       
  5221         ]
       
  5222     },
       
  5223     "series-areaspline": {
       
  5224         "requires": [
       
  5225             "series-area",
       
  5226             "series-curve-util"
       
  5227         ]
       
  5228     },
       
  5229     "series-areaspline-stacked": {
       
  5230         "requires": [
       
  5231             "series-stacked",
       
  5232             "series-areaspline"
       
  5233         ]
       
  5234     },
       
  5235     "series-bar": {
       
  5236         "requires": [
       
  5237             "series-marker",
       
  5238             "series-histogram-base"
       
  5239         ]
       
  5240     },
       
  5241     "series-bar-stacked": {
       
  5242         "requires": [
       
  5243             "series-stacked",
       
  5244             "series-bar"
       
  5245         ]
       
  5246     },
       
  5247     "series-base": {
       
  5248         "requires": [
       
  5249             "graphics",
       
  5250             "axis-base"
       
  5251         ]
       
  5252     },
       
  5253     "series-candlestick": {
       
  5254         "requires": [
       
  5255             "series-range"
       
  5256         ]
       
  5257     },
       
  5258     "series-cartesian": {
       
  5259         "requires": [
       
  5260             "series-base"
       
  5261         ]
       
  5262     },
       
  5263     "series-column": {
       
  5264         "requires": [
       
  5265             "series-marker",
       
  5266             "series-histogram-base"
       
  5267         ]
       
  5268     },
       
  5269     "series-column-stacked": {
       
  5270         "requires": [
       
  5271             "series-stacked",
       
  5272             "series-column"
       
  5273         ]
       
  5274     },
       
  5275     "series-combo": {
       
  5276         "requires": [
       
  5277             "series-cartesian",
       
  5278             "series-line-util",
       
  5279             "series-plot-util",
       
  5280             "series-fill-util"
       
  5281         ]
       
  5282     },
       
  5283     "series-combo-stacked": {
       
  5284         "requires": [
       
  5285             "series-stacked",
       
  5286             "series-combo"
       
  5287         ]
       
  5288     },
       
  5289     "series-combospline": {
       
  5290         "requires": [
       
  5291             "series-combo",
       
  5292             "series-curve-util"
       
  5293         ]
       
  5294     },
       
  5295     "series-combospline-stacked": {
       
  5296         "requires": [
       
  5297             "series-combo-stacked",
       
  5298             "series-curve-util"
       
  5299         ]
       
  5300     },
       
  5301     "series-curve-util": {},
       
  5302     "series-fill-util": {},
       
  5303     "series-histogram-base": {
       
  5304         "requires": [
       
  5305             "series-cartesian",
       
  5306             "series-plot-util"
       
  5307         ]
       
  5308     },
       
  5309     "series-line": {
       
  5310         "requires": [
       
  5311             "series-cartesian",
       
  5312             "series-line-util"
       
  5313         ]
       
  5314     },
       
  5315     "series-line-stacked": {
       
  5316         "requires": [
       
  5317             "series-stacked",
       
  5318             "series-line"
       
  5319         ]
       
  5320     },
       
  5321     "series-line-util": {},
       
  5322     "series-marker": {
       
  5323         "requires": [
       
  5324             "series-cartesian",
       
  5325             "series-plot-util"
       
  5326         ]
       
  5327     },
       
  5328     "series-marker-stacked": {
       
  5329         "requires": [
       
  5330             "series-stacked",
       
  5331             "series-marker"
       
  5332         ]
       
  5333     },
       
  5334     "series-ohlc": {
       
  5335         "requires": [
       
  5336             "series-range"
       
  5337         ]
       
  5338     },
       
  5339     "series-pie": {
       
  5340         "requires": [
       
  5341             "series-base",
       
  5342             "series-plot-util"
       
  5343         ]
       
  5344     },
       
  5345     "series-plot-util": {},
       
  5346     "series-range": {
       
  5347         "requires": [
       
  5348             "series-cartesian"
       
  5349         ]
       
  5350     },
       
  5351     "series-spline": {
       
  5352         "requires": [
       
  5353             "series-line",
       
  5354             "series-curve-util"
       
  5355         ]
       
  5356     },
       
  5357     "series-spline-stacked": {
       
  5358         "requires": [
       
  5359             "series-stacked",
       
  5360             "series-spline"
       
  5361         ]
       
  5362     },
       
  5363     "series-stacked": {
       
  5364         "requires": [
       
  5365             "axis-stacked"
       
  5366         ]
       
  5367     },
       
  5368     "shim-plugin": {
       
  5369         "requires": [
       
  5370             "node-style",
       
  5371             "node-pluginhost"
       
  5372         ]
       
  5373     },
       
  5374     "slider": {
       
  5375         "use": [
       
  5376             "slider-base",
       
  5377             "slider-value-range",
       
  5378             "clickable-rail",
       
  5379             "range-slider"
       
  5380         ]
       
  5381     },
       
  5382     "slider-base": {
       
  5383         "requires": [
       
  5384             "widget",
       
  5385             "dd-constrain",
       
  5386             "event-key"
       
  5387         ],
       
  5388         "skinnable": true
       
  5389     },
       
  5390     "slider-value-range": {
       
  5391         "requires": [
       
  5392             "slider-base"
       
  5393         ]
       
  5394     },
       
  5395     "sortable": {
       
  5396         "requires": [
       
  5397             "dd-delegate",
       
  5398             "dd-drop-plugin",
       
  5399             "dd-proxy"
       
  5400         ]
       
  5401     },
       
  5402     "sortable-scroll": {
       
  5403         "requires": [
       
  5404             "dd-scroll",
       
  5405             "sortable"
       
  5406         ]
       
  5407     },
       
  5408     "stylesheet": {
       
  5409         "requires": [
       
  5410             "yui-base"
       
  5411         ]
       
  5412     },
       
  5413     "substitute": {
       
  5414         "optional": [
       
  5415             "dump"
       
  5416         ],
       
  5417         "requires": [
       
  5418             "yui-base"
       
  5419         ]
       
  5420     },
       
  5421     "swf": {
       
  5422         "requires": [
       
  5423             "event-custom",
       
  5424             "node",
       
  5425             "swfdetect",
       
  5426             "escape"
       
  5427         ]
       
  5428     },
       
  5429     "swfdetect": {
       
  5430         "requires": [
       
  5431             "yui-base"
       
  5432         ]
       
  5433     },
       
  5434     "tabview": {
       
  5435         "requires": [
       
  5436             "widget",
       
  5437             "widget-parent",
       
  5438             "widget-child",
       
  5439             "tabview-base",
       
  5440             "node-pluginhost",
       
  5441             "node-focusmanager"
       
  5442         ],
       
  5443         "skinnable": true
       
  5444     },
       
  5445     "tabview-base": {
       
  5446         "requires": [
       
  5447             "node-event-delegate",
       
  5448             "classnamemanager"
       
  5449         ]
       
  5450     },
       
  5451     "tabview-plugin": {
       
  5452         "requires": [
       
  5453             "tabview-base"
       
  5454         ]
       
  5455     },
       
  5456     "template": {
       
  5457         "use": [
       
  5458             "template-base",
       
  5459             "template-micro"
       
  5460         ]
       
  5461     },
       
  5462     "template-base": {
       
  5463         "requires": [
       
  5464             "yui-base"
       
  5465         ]
       
  5466     },
       
  5467     "template-micro": {
       
  5468         "requires": [
       
  5469             "escape"
       
  5470         ]
       
  5471     },
       
  5472     "test": {
       
  5473         "requires": [
       
  5474             "event-simulate",
       
  5475             "event-custom",
       
  5476             "json-stringify"
       
  5477         ]
       
  5478     },
       
  5479     "test-console": {
       
  5480         "requires": [
       
  5481             "console-filters",
       
  5482             "test",
       
  5483             "array-extras"
       
  5484         ],
       
  5485         "skinnable": true
       
  5486     },
       
  5487     "text": {
       
  5488         "use": [
       
  5489             "text-accentfold",
       
  5490             "text-wordbreak"
       
  5491         ]
       
  5492     },
       
  5493     "text-accentfold": {
       
  5494         "requires": [
       
  5495             "array-extras",
       
  5496             "text-data-accentfold"
       
  5497         ]
       
  5498     },
       
  5499     "text-data-accentfold": {
       
  5500         "requires": [
       
  5501             "yui-base"
       
  5502         ]
       
  5503     },
       
  5504     "text-data-wordbreak": {
       
  5505         "requires": [
       
  5506             "yui-base"
       
  5507         ]
       
  5508     },
       
  5509     "text-wordbreak": {
       
  5510         "requires": [
       
  5511             "array-extras",
       
  5512             "text-data-wordbreak"
       
  5513         ]
       
  5514     },
       
  5515     "timers": {
       
  5516         "requires": [
       
  5517             "yui-base"
       
  5518         ]
       
  5519     },
       
  5520     "transition": {
       
  5521         "requires": [
       
  5522             "node-style"
       
  5523         ]
       
  5524     },
       
  5525     "transition-timer": {
       
  5526         "condition": {
       
  5527             "name": "transition-timer",
       
  5528             "test": function (Y) {
       
  5529     var DOCUMENT = Y.config.doc,
       
  5530         node = (DOCUMENT) ? DOCUMENT.documentElement: null,
       
  5531         ret = true;
       
  5532 
       
  5533     if (node && node.style) {
       
  5534         ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style);
       
  5535     }
       
  5536 
       
  5537     return ret;
       
  5538 },
       
  5539             "trigger": "transition"
       
  5540         },
       
  5541         "requires": [
       
  5542             "transition"
       
  5543         ]
       
  5544     },
       
  5545     "tree": {
       
  5546         "requires": [
       
  5547             "base-build",
       
  5548             "tree-node"
       
  5549         ]
       
  5550     },
       
  5551     "tree-labelable": {
       
  5552         "requires": [
       
  5553             "tree"
       
  5554         ]
       
  5555     },
       
  5556     "tree-lazy": {
       
  5557         "requires": [
       
  5558             "base-pluginhost",
       
  5559             "plugin",
       
  5560             "tree"
       
  5561         ]
       
  5562     },
       
  5563     "tree-node": {},
       
  5564     "tree-openable": {
       
  5565         "requires": [
       
  5566             "tree"
       
  5567         ]
       
  5568     },
       
  5569     "tree-selectable": {
       
  5570         "requires": [
       
  5571             "tree"
       
  5572         ]
       
  5573     },
       
  5574     "tree-sortable": {
       
  5575         "requires": [
       
  5576             "tree"
       
  5577         ]
       
  5578     },
       
  5579     "uploader": {
       
  5580         "requires": [
       
  5581             "uploader-html5",
       
  5582             "uploader-flash"
       
  5583         ]
       
  5584     },
       
  5585     "uploader-flash": {
       
  5586         "requires": [
       
  5587             "swf",
       
  5588             "widget",
       
  5589             "base",
       
  5590             "cssbutton",
       
  5591             "node",
       
  5592             "event-custom",
       
  5593             "file-flash",
       
  5594             "uploader-queue"
       
  5595         ]
       
  5596     },
       
  5597     "uploader-html5": {
       
  5598         "requires": [
       
  5599             "widget",
       
  5600             "node-event-simulate",
       
  5601             "file-html5",
       
  5602             "uploader-queue"
       
  5603         ]
       
  5604     },
       
  5605     "uploader-queue": {
       
  5606         "requires": [
       
  5607             "base"
       
  5608         ]
       
  5609     },
       
  5610     "view": {
       
  5611         "requires": [
       
  5612             "base-build",
       
  5613             "node-event-delegate"
       
  5614         ]
       
  5615     },
       
  5616     "view-node-map": {
       
  5617         "requires": [
       
  5618             "view"
       
  5619         ]
       
  5620     },
       
  5621     "widget": {
       
  5622         "use": [
       
  5623             "widget-base",
       
  5624             "widget-htmlparser",
       
  5625             "widget-skin",
       
  5626             "widget-uievents"
       
  5627         ]
       
  5628     },
       
  5629     "widget-anim": {
       
  5630         "requires": [
       
  5631             "anim-base",
       
  5632             "plugin",
       
  5633             "widget"
       
  5634         ]
       
  5635     },
       
  5636     "widget-autohide": {
       
  5637         "requires": [
       
  5638             "base-build",
       
  5639             "event-key",
       
  5640             "event-outside",
       
  5641             "widget"
       
  5642         ]
       
  5643     },
       
  5644     "widget-base": {
       
  5645         "requires": [
       
  5646             "attribute",
       
  5647             "base-base",
       
  5648             "base-pluginhost",
       
  5649             "classnamemanager",
       
  5650             "event-focus",
       
  5651             "node-base",
       
  5652             "node-style"
       
  5653         ],
       
  5654         "skinnable": true
       
  5655     },
       
  5656     "widget-base-ie": {
       
  5657         "condition": {
       
  5658             "name": "widget-base-ie",
       
  5659             "trigger": "widget-base",
       
  5660             "ua": "ie"
       
  5661         },
       
  5662         "requires": [
       
  5663             "widget-base"
       
  5664         ]
       
  5665     },
       
  5666     "widget-buttons": {
       
  5667         "requires": [
       
  5668             "button-plugin",
       
  5669             "cssbutton",
       
  5670             "widget-stdmod"
       
  5671         ]
       
  5672     },
       
  5673     "widget-child": {
       
  5674         "requires": [
       
  5675             "base-build",
       
  5676             "widget"
       
  5677         ]
       
  5678     },
       
  5679     "widget-htmlparser": {
       
  5680         "requires": [
       
  5681             "widget-base"
       
  5682         ]
       
  5683     },
       
  5684     "widget-locale": {
       
  5685         "requires": [
       
  5686             "widget-base"
       
  5687         ]
       
  5688     },
       
  5689     "widget-modality": {
       
  5690         "requires": [
       
  5691             "base-build",
       
  5692             "event-outside",
       
  5693             "widget"
       
  5694         ],
       
  5695         "skinnable": true
       
  5696     },
       
  5697     "widget-parent": {
       
  5698         "requires": [
       
  5699             "arraylist",
       
  5700             "base-build",
       
  5701             "widget"
       
  5702         ]
       
  5703     },
       
  5704     "widget-position": {
       
  5705         "requires": [
       
  5706             "base-build",
       
  5707             "node-screen",
       
  5708             "widget"
       
  5709         ]
       
  5710     },
       
  5711     "widget-position-align": {
       
  5712         "requires": [
       
  5713             "widget-position"
       
  5714         ]
       
  5715     },
       
  5716     "widget-position-constrain": {
       
  5717         "requires": [
       
  5718             "widget-position"
       
  5719         ]
       
  5720     },
       
  5721     "widget-skin": {
       
  5722         "requires": [
       
  5723             "widget-base"
       
  5724         ]
       
  5725     },
       
  5726     "widget-stack": {
       
  5727         "requires": [
       
  5728             "base-build",
       
  5729             "widget"
       
  5730         ],
       
  5731         "skinnable": true
       
  5732     },
       
  5733     "widget-stdmod": {
       
  5734         "requires": [
       
  5735             "base-build",
       
  5736             "widget"
       
  5737         ]
       
  5738     },
       
  5739     "widget-uievents": {
       
  5740         "requires": [
       
  5741             "node-event-delegate",
       
  5742             "widget-base"
       
  5743         ]
       
  5744     },
       
  5745     "yql": {
       
  5746         "requires": [
       
  5747             "oop"
       
  5748         ]
       
  5749     },
       
  5750     "yql-jsonp": {
       
  5751         "condition": {
       
  5752             "name": "yql-jsonp",
       
  5753             "test": function (Y) {
       
  5754     /* Only load the JSONP module when not in nodejs or winjs
       
  5755     TODO Make the winjs module a CORS module
       
  5756     */
       
  5757     return (!Y.UA.nodejs && !Y.UA.winjs);
       
  5758 },
       
  5759             "trigger": "yql",
       
  5760             "when": "after"
       
  5761         },
       
  5762         "requires": [
       
  5763             "jsonp",
       
  5764             "jsonp-url"
       
  5765         ]
       
  5766     },
       
  5767     "yql-nodejs": {
       
  5768         "condition": {
       
  5769             "name": "yql-nodejs",
       
  5770             "trigger": "yql",
       
  5771             "ua": "nodejs",
       
  5772             "when": "after"
       
  5773         }
       
  5774     },
       
  5775     "yql-winjs": {
       
  5776         "condition": {
       
  5777             "name": "yql-winjs",
       
  5778             "trigger": "yql",
       
  5779             "ua": "winjs",
       
  5780             "when": "after"
       
  5781         }
       
  5782     },
       
  5783     "yui": {},
       
  5784     "yui-base": {},
       
  5785     "yui-later": {
       
  5786         "requires": [
       
  5787             "yui-base"
       
  5788         ]
       
  5789     },
       
  5790     "yui-log": {
       
  5791         "requires": [
       
  5792             "yui-base"
       
  5793         ]
       
  5794     },
       
  5795     "yui-throttle": {
       
  5796         "requires": [
       
  5797             "yui-base"
       
  5798         ]
       
  5799     }
       
  5800 });
       
  5801 YUI.Env[Y.version].md5 = 'd7ced98e3907d3c3c0655a93c6ac6867';
       
  5802 
       
  5803 
       
  5804 }, '@VERSION@', {"requires": ["loader-base"]});
       
  5805 YUI.add('loader', function (Y, NAME) {}, '@VERSION@', {"use": ["loader-base", "loader-rollup", "loader-yui3"]});