10 __coverage__['build/align-plugin/align-plugin.js'] = {"path":"build/align-plugin/align-plugin.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":24},"end":{"line":1,"column":43}}},"2":{"name":"Align","line":20,"loc":{"start":{"line":20,"column":4},"end":{"line":20,"column":27}}},"3":{"name":"(anonymous_3)","line":58,"loc":{"start":{"line":58,"column":12},"end":{"line":58,"column":63}}},"4":{"name":"(anonymous_4)","line":103,"loc":{"start":{"line":103,"column":14},"end":{"line":103,"column":25}}},"5":{"name":"(anonymous_5)","line":108,"loc":{"start":{"line":108,"column":17},"end":{"line":108,"column":31}}},"6":{"name":"(anonymous_6)","line":118,"loc":{"start":{"line":118,"column":19},"end":{"line":118,"column":30}}},"7":{"name":"(anonymous_7)","line":120,"loc":{"start":{"line":120,"column":23},"end":{"line":120,"column":34}}},"8":{"name":"(anonymous_8)","line":133,"loc":{"start":{"line":133,"column":16},"end":{"line":133,"column":41}}},"9":{"name":"(anonymous_9)","line":143,"loc":{"start":{"line":143,"column":17},"end":{"line":143,"column":28}}},"10":{"name":"(anonymous_10)","line":152,"loc":{"start":{"line":152,"column":13},"end":{"line":152,"column":31}}},"11":{"name":"(anonymous_11)","line":156,"loc":{"start":{"line":156,"column":13},"end":{"line":156,"column":31}}},"12":{"name":"(anonymous_12)","line":160,"loc":{"start":{"line":160,"column":13},"end":{"line":160,"column":31}}},"13":{"name":"(anonymous_13)","line":164,"loc":{"start":{"line":164,"column":13},"end":{"line":164,"column":31}}},"14":{"name":"(anonymous_14)","line":168,"loc":{"start":{"line":168,"column":13},"end":{"line":168,"column":38}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":193,"column":63}},"2":{"start":{"line":9,"column":4},"end":{"line":11,"column":30}},"3":{"start":{"line":20,"column":4},"end":{"line":24,"column":5}},"4":{"start":{"line":21,"column":8},"end":{"line":23,"column":9}},"5":{"start":{"line":22,"column":12},"end":{"line":22,"column":37}},"6":{"start":{"line":26,"column":4},"end":{"line":149,"column":6}},"7":{"start":{"line":60,"column":12},"end":{"line":60,"column":48}},"8":{"start":{"line":62,"column":12},"end":{"line":64,"column":13}},"9":{"start":{"line":63,"column":16},"end":{"line":63,"column":53}},"10":{"start":{"line":66,"column":12},"end":{"line":99,"column":13}},"11":{"start":{"line":67,"column":16},"end":{"line":77,"column":89}},"12":{"start":{"line":79,"column":16},"end":{"line":81,"column":17}},"13":{"start":{"line":80,"column":20},"end":{"line":80,"column":59}},"14":{"start":{"line":82,"column":16},"end":{"line":84,"column":17}},"15":{"start":{"line":83,"column":20},"end":{"line":83,"column":59}},"16":{"start":{"line":86,"column":16},"end":{"line":88,"column":17}},"17":{"start":{"line":87,"column":20},"end":{"line":87,"column":53}},"18":{"start":{"line":89,"column":16},"end":{"line":91,"column":17}},"19":{"start":{"line":90,"column":20},"end":{"line":90,"column":53}},"20":{"start":{"line":93,"column":16},"end":{"line":95,"column":17}},"21":{"start":{"line":94,"column":20},"end":{"line":94,"column":35}},"22":{"start":{"line":97,"column":16},"end":{"line":97,"column":43}},"23":{"start":{"line":100,"column":12},"end":{"line":100,"column":24}},"24":{"start":{"line":104,"column":12},"end":{"line":104,"column":48}},"25":{"start":{"line":105,"column":12},"end":{"line":105,"column":24}},"26":{"start":{"line":109,"column":12},"end":{"line":109,"column":38}},"27":{"start":{"line":110,"column":12},"end":{"line":114,"column":13}},"28":{"start":{"line":111,"column":16},"end":{"line":111,"column":76}},"29":{"start":{"line":112,"column":19},"end":{"line":114,"column":13}},"30":{"start":{"line":113,"column":16},"end":{"line":113,"column":32}},"31":{"start":{"line":119,"column":12},"end":{"line":119,"column":28}},"32":{"start":{"line":120,"column":12},"end":{"line":122,"column":15}},"33":{"start":{"line":121,"column":16},"end":{"line":121,"column":28}},"34":{"start":{"line":134,"column":12},"end":{"line":134,"column":48}},"35":{"start":{"line":135,"column":12},"end":{"line":135,"column":24}},"36":{"start":{"line":144,"column":12},"end":{"line":144,"column":38}},"37":{"start":{"line":145,"column":12},"end":{"line":147,"column":13}},"38":{"start":{"line":146,"column":16},"end":{"line":146,"column":32}},"39":{"start":{"line":151,"column":4},"end":{"line":181,"column":6}},"40":{"start":{"line":153,"column":12},"end":{"line":153,"column":22}},"41":{"start":{"line":157,"column":12},"end":{"line":157,"column":43}},"42":{"start":{"line":161,"column":12},"end":{"line":161,"column":43}},"43":{"start":{"line":165,"column":12},"end":{"line":165,"column":22}},"44":{"start":{"line":169,"column":12},"end":{"line":170,"column":25}},"45":{"start":{"line":172,"column":12},"end":{"line":177,"column":13}},"46":{"start":{"line":173,"column":16},"end":{"line":173,"column":63}},"47":{"start":{"line":175,"column":16},"end":{"line":175,"column":47}},"48":{"start":{"line":176,"column":16},"end":{"line":176,"column":59}},"49":{"start":{"line":179,"column":13},"end":{"line":179,"column":24}},"50":{"start":{"line":183,"column":4},"end":{"line":183,"column":25}},"51":{"start":{"line":184,"column":4},"end":{"line":184,"column":23}},"52":{"start":{"line":186,"column":4},"end":{"line":186,"column":40}},"53":{"start":{"line":188,"column":4},"end":{"line":188,"column":26}},"54":{"start":{"line":189,"column":4},"end":{"line":189,"column":27}}},"branchMap":{"1":{"line":21,"type":"if","locations":[{"start":{"line":21,"column":8},"end":{"line":21,"column":8}},{"start":{"line":21,"column":8},"end":{"line":21,"column":8}}]},"2":{"line":62,"type":"if","locations":[{"start":{"line":62,"column":12},"end":{"line":62,"column":12}},{"start":{"line":62,"column":12},"end":{"line":62,"column":12}}]},"3":{"line":66,"type":"if","locations":[{"start":{"line":66,"column":12},"end":{"line":66,"column":12}},{"start":{"line":66,"column":12},"end":{"line":66,"column":12}}]},"4":{"line":74,"type":"cond-expr","locations":[{"start":{"line":74,"column":46},"end":{"line":74,"column":75}},{"start":{"line":74,"column":77},"end":{"line":74,"column":81}}]},"5":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":72},"end":{"line":75,"column":101}},{"start":{"line":75,"column":104},"end":{"line":75,"column":108}}]},"6":{"line":75,"type":"binary-expr","locations":[{"start":{"line":75,"column":33},"end":{"line":75,"column":44}},{"start":{"line":75,"column":48},"end":{"line":75,"column":68}}]},"7":{"line":76,"type":"cond-expr","locations":[{"start":{"line":76,"column":38},"end":{"line":76,"column":61}},{"start":{"line":76,"column":64},"end":{"line":76,"column":68}}]},"8":{"line":77,"type":"cond-expr","locations":[{"start":{"line":77,"column":58},"end":{"line":77,"column":81}},{"start":{"line":77,"column":84},"end":{"line":77,"column":88}}]},"9":{"line":77,"type":"binary-expr","locations":[{"start":{"line":77,"column":31},"end":{"line":77,"column":36}},{"start":{"line":77,"column":40},"end":{"line":77,"column":54}}]},"10":{"line":79,"type":"if","locations":[{"start":{"line":79,"column":16},"end":{"line":79,"column":16}},{"start":{"line":79,"column":16},"end":{"line":79,"column":16}}]},"11":{"line":82,"type":"if","locations":[{"start":{"line":82,"column":16},"end":{"line":82,"column":16}},{"start":{"line":82,"column":16},"end":{"line":82,"column":16}}]},"12":{"line":86,"type":"if","locations":[{"start":{"line":86,"column":16},"end":{"line":86,"column":16}},{"start":{"line":86,"column":16},"end":{"line":86,"column":16}}]},"13":{"line":89,"type":"if","locations":[{"start":{"line":89,"column":16},"end":{"line":89,"column":16}},{"start":{"line":89,"column":16},"end":{"line":89,"column":16}}]},"14":{"line":93,"type":"if","locations":[{"start":{"line":93,"column":16},"end":{"line":93,"column":16}},{"start":{"line":93,"column":16},"end":{"line":93,"column":16}}]},"15":{"line":93,"type":"binary-expr","locations":[{"start":{"line":93,"column":20},"end":{"line":93,"column":22}},{"start":{"line":93,"column":26},"end":{"line":93,"column":30}}]},"16":{"line":110,"type":"if","locations":[{"start":{"line":110,"column":12},"end":{"line":110,"column":12}},{"start":{"line":110,"column":12},"end":{"line":110,"column":12}}]},"17":{"line":110,"type":"binary-expr","locations":[{"start":{"line":110,"column":16},"end":{"line":110,"column":19}},{"start":{"line":110,"column":23},"end":{"line":110,"column":30}}]},"18":{"line":112,"type":"if","locations":[{"start":{"line":112,"column":19},"end":{"line":112,"column":19}},{"start":{"line":112,"column":19},"end":{"line":112,"column":19}}]},"19":{"line":112,"type":"binary-expr","locations":[{"start":{"line":112,"column":23},"end":{"line":112,"column":27}},{"start":{"line":112,"column":31},"end":{"line":112,"column":37}}]},"20":{"line":145,"type":"if","locations":[{"start":{"line":145,"column":12},"end":{"line":145,"column":12}},{"start":{"line":145,"column":12},"end":{"line":145,"column":12}}]},"21":{"line":169,"type":"cond-expr","locations":[{"start":{"line":169,"column":65},"end":{"line":169,"column":66}},{"start":{"line":169,"column":69},"end":{"line":169,"column":70}}]},"22":{"line":169,"type":"binary-expr","locations":[{"start":{"line":169,"column":24},"end":{"line":169,"column":40}},{"start":{"line":169,"column":44},"end":{"line":169,"column":60}}]},"23":{"line":172,"type":"if","locations":[{"start":{"line":172,"column":12},"end":{"line":172,"column":12}},{"start":{"line":172,"column":12},"end":{"line":172,"column":12}}]},"24":{"line":176,"type":"cond-expr","locations":[{"start":{"line":176,"column":31},"end":{"line":176,"column":43}},{"start":{"line":176,"column":46},"end":{"line":176,"column":58}}]}},"code":["(function () { YUI.add('align-plugin', function (Y, NAME) {",""," /**"," * Provides advanced positioning support for Node via a Plugin"," * for centering and alignment."," * @module align-plugin"," */",""," var OFFSET_WIDTH = 'offsetWidth',"," OFFSET_HEIGHT = 'offsetHeight',"," undefined = undefined;",""," /**"," * Node plugin which can be used to align a node with another node,"," * region, or the viewport."," *"," * @class Plugin.Align"," * @param {Object} User configuration object"," */"," function Align(config) {"," if (config.host) {"," this._host = config.host;"," }"," }",""," Align.prototype = {"," /**"," * Aligns node with a point on another node or region."," * Possible alignment points are:"," * <dl>"," * <dt>tl</dt>"," * <dd>top left</dd>"," * <dt>tr</dt>"," * <dd>top right</dd>"," * <dt>bl</dt>"," * <dd>bottom left</dd>"," * <dt>br</dt>"," * <dd>bottom right</dd>"," * <dt>tc</dt>"," * <dd>top center</dd>"," * <dt>bc</dt>"," * <dd>bottom center</dd>"," * <dt>rc</dt>"," * <dd>right center</dd>"," * <dt>lc</dt>"," * <dd>left center</dd>"," * <dt>cc</dt>"," * <dd>center center</dd>"," * </dl>"," * @method to"," * @param region {String || Node || HTMLElement || Object} The node or"," * region to align with. Defaults to the viewport region."," * @param regionPoint {String} The point of the region to align with."," * @param point {String} The point of the node aligned to the region."," * @param resize {Boolean} Whether or not the node should re-align when"," * the window is resized. Defaults to false."," */"," to: function(region, regionPoint, point, syncOnResize) {"," // cache original args for syncing"," this._syncArgs = Y.Array(arguments);",""," if (region.top === undefined) {"," region = Y.one(region).get('region');"," }",""," if (region) {"," var xy = [region.left, region.top],"," offxy = [region.width, region.height],"," points = Align.points,"," node = this._host,"," NULL = null,"," size = node.getAttrs([OFFSET_HEIGHT, OFFSET_WIDTH]),"," nodeoff = [0 - size[OFFSET_WIDTH], 0 - size[OFFSET_HEIGHT]], // reverse offsets"," regionFn0 = regionPoint ? points[regionPoint.charAt(0)]: NULL,"," regionFn1 = (regionPoint && regionPoint !== 'cc') ? points[regionPoint.charAt(1)] : NULL,"," nodeFn0 = point ? points[point.charAt(0)] : NULL,"," nodeFn1 = (point && point !== 'cc') ? points[point.charAt(1)] : NULL;",""," if (regionFn0) {"," xy = regionFn0(xy, offxy, regionPoint);"," }"," if (regionFn1) {"," xy = regionFn1(xy, offxy, regionPoint);"," }",""," if (nodeFn0) {"," xy = nodeFn0(xy, nodeoff, point);"," }"," if (nodeFn1) {"," xy = nodeFn1(xy, nodeoff, point);"," }",""," if (xy && node) {"," node.setXY(xy);"," }",""," this._resize(syncOnResize);",""," }"," return this;"," },",""," sync: function() {"," this.to.apply(this, this._syncArgs);"," return this;"," },",""," _resize: function(add) {"," var handle = this._handle;"," if (add && !handle) {"," this._handle = Y.on('resize', this._onresize, window, this);"," } else if (!add && handle) {"," handle.detach();"," }",""," },",""," _onresize: function() {"," var self = this;"," setTimeout(function() { // for performance"," self.sync();"," });"," },",""," /**"," * Aligns the center of a node to the center of another node or region."," * @method center"," * @param region {Node || HTMLElement || Object} optional The node or"," * region to align with. Defaults to the viewport region."," * the window is resized. If centering to viewport, this defaults"," * to true, otherwise default is false."," */"," center: function(region, resize) {"," this.to(region, 'cc', 'cc', resize);"," return this;"," },",""," /**"," * Removes the resize handler, if any. This is called automatically"," * when unplugged from the host node."," * @method destroy"," */"," destroy: function() {"," var handle = this._handle;"," if (handle) {"," handle.detach();"," }"," }"," };",""," Align.points = {"," 't': function(xy, off) {"," return xy;"," },",""," 'r': function(xy, off) {"," return [xy[0] + off[0], xy[1]];"," },",""," 'b': function(xy, off) {"," return [xy[0], xy[1] + off[1]];"," },",""," 'l': function(xy, off) {"," return xy;"," },",""," 'c': function(xy, off, point) {"," var axis = (point[0] === 't' || point[0] === 'b') ? 0 : 1,"," ret, val;",""," if (point === 'cc') {"," ret = [xy[0] + off[0] / 2, xy[1] + off[1] / 2];"," } else {"," val = xy[axis] + off[axis] / 2;"," ret = (axis) ? [xy[0], val] : [val, xy[1]];"," }",""," return ret;"," }"," };",""," Align.NAME = 'Align';"," Align.NS = 'align';",""," Align.prototype.constructor = Align;",""," Y.namespace('Plugin');"," Y.Plugin.Align = Align;","","","","}, '3.13.0', {\"requires\": [\"node-screen\", \"node-pluginhost\"]});","","}());"]};