|
10 __coverage__['build/widget-parent/widget-parent.js'] = {"path":"build/widget-parent/widget-parent.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0,"108":0,"109":0,"110":0,"111":0,"112":0,"113":0,"114":0,"115":0,"116":0,"117":0,"118":0,"119":0,"120":0,"121":0,"122":0,"123":0,"124":0,"125":0,"126":0,"127":0,"128":0,"129":0,"130":0,"131":0,"132":0,"133":0,"134":0,"135":0,"136":0,"137":0,"138":0,"139":0,"140":0,"141":0,"142":0,"143":0,"144":0,"145":0,"146":0,"147":0,"148":0,"149":0,"150":0,"151":0,"152":0,"153":0,"154":0,"155":0,"156":0,"157":0,"158":0,"159":0,"160":0,"161":0,"162":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,0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0,0],"28":[0,0],"29":[0,0],"30":[0,0],"31":[0,0],"32":[0,0],"33":[0,0],"34":[0,0],"35":[0,0],"36":[0,0],"37":[0,0],"38":[0,0],"39":[0,0],"40":[0,0],"41":[0,0],"42":[0,0],"43":[0,0],"44":[0,0],"45":[0,0],"46":[0,0],"47":[0,0],"48":[0,0],"49":[0,0],"50":[0,0],"51":[0,0],"52":[0,0],"53":[0,0],"54":[0,0],"55":[0,0],"56":[0,0],"57":[0,0],"58":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"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},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":25},"end":{"line":1,"column":44}}},"2":{"name":"Parent","line":29,"loc":{"start":{"line":29,"column":0},"end":{"line":29,"column":24}}},"3":{"name":"(anonymous_3)","line":86,"loc":{"start":{"line":86,"column":49},"end":{"line":86,"column":62}}},"4":{"name":"(anonymous_4)","line":117,"loc":{"start":{"line":117,"column":16},"end":{"line":117,"column":31}}},"5":{"name":"(anonymous_5)","line":156,"loc":{"start":{"line":156,"column":16},"end":{"line":156,"column":33}}},"6":{"name":"(anonymous_6)","line":176,"loc":{"start":{"line":176,"column":16},"end":{"line":176,"column":33}}},"7":{"name":"(anonymous_7)","line":184,"loc":{"start":{"line":184,"column":16},"end":{"line":184,"column":33}}},"8":{"name":"(anonymous_8)","line":214,"loc":{"start":{"line":214,"column":16},"end":{"line":214,"column":27}}},"9":{"name":"(anonymous_9)","line":227,"loc":{"start":{"line":227,"column":24},"end":{"line":227,"column":41}}},"10":{"name":"(anonymous_10)","line":244,"loc":{"start":{"line":244,"column":27},"end":{"line":244,"column":44}}},"11":{"name":"(anonymous_11)","line":281,"loc":{"start":{"line":281,"column":34},"end":{"line":281,"column":51}}},"12":{"name":"(anonymous_12)","line":299,"loc":{"start":{"line":299,"column":32},"end":{"line":299,"column":49}}},"13":{"name":"(anonymous_13)","line":306,"loc":{"start":{"line":306,"column":22},"end":{"line":306,"column":39}}},"14":{"name":"(anonymous_14)","line":329,"loc":{"start":{"line":329,"column":19},"end":{"line":329,"column":36}}},"15":{"name":"(anonymous_15)","line":338,"loc":{"start":{"line":338,"column":22},"end":{"line":338,"column":35}}},"16":{"name":"(anonymous_16)","line":373,"loc":{"start":{"line":373,"column":22},"end":{"line":373,"column":39}}},"17":{"name":"(anonymous_17)","line":415,"loc":{"start":{"line":415,"column":29},"end":{"line":415,"column":46}}},"18":{"name":"(anonymous_18)","line":434,"loc":{"start":{"line":434,"column":18},"end":{"line":434,"column":36}}},"19":{"name":"(anonymous_19)","line":474,"loc":{"start":{"line":474,"column":20},"end":{"line":474,"column":37}}},"20":{"name":"(anonymous_20)","line":513,"loc":{"start":{"line":513,"column":23},"end":{"line":513,"column":40}}},"21":{"name":"(anonymous_21)","line":550,"loc":{"start":{"line":550,"column":10},"end":{"line":550,"column":34}}},"22":{"name":"(anonymous_22)","line":561,"loc":{"start":{"line":561,"column":26},"end":{"line":561,"column":42}}},"23":{"name":"(anonymous_23)","line":618,"loc":{"start":{"line":618,"column":9},"end":{"line":618,"column":21}}},"24":{"name":"(anonymous_24)","line":637,"loc":{"start":{"line":637,"column":12},"end":{"line":637,"column":29}}},"25":{"name":"(anonymous_25)","line":658,"loc":{"start":{"line":658,"column":15},"end":{"line":658,"column":27}}},"26":{"name":"(anonymous_26)","line":663,"loc":{"start":{"line":663,"column":37},"end":{"line":663,"column":49}}},"27":{"name":"(anonymous_27)","line":683,"loc":{"start":{"line":683,"column":17},"end":{"line":683,"column":29}}},"28":{"name":"(anonymous_28)","line":692,"loc":{"start":{"line":692,"column":15},"end":{"line":692,"column":27}}},"29":{"name":"(anonymous_29)","line":701,"loc":{"start":{"line":701,"column":17},"end":{"line":701,"column":29}}},"30":{"name":"(anonymous_30)","line":714,"loc":{"start":{"line":714,"column":17},"end":{"line":714,"column":46}}},"31":{"name":"(anonymous_31)","line":768,"loc":{"start":{"line":768,"column":20},"end":{"line":768,"column":37}}},"32":{"name":"(anonymous_32)","line":772,"loc":{"start":{"line":772,"column":20},"end":{"line":772,"column":37}}},"33":{"name":"(anonymous_33)","line":780,"loc":{"start":{"line":780,"column":23},"end":{"line":780,"column":40}}},"34":{"name":"(anonymous_34)","line":798,"loc":{"start":{"line":798,"column":19},"end":{"line":798,"column":31}}},"35":{"name":"(anonymous_35)","line":812,"loc":{"start":{"line":812,"column":21},"end":{"line":812,"column":33}}},"36":{"name":"(anonymous_36)","line":831,"loc":{"start":{"line":831,"column":18},"end":{"line":831,"column":35}}},"37":{"name":"(anonymous_37)","line":845,"loc":{"start":{"line":845,"column":22},"end":{"line":845,"column":34}}},"38":{"name":"(anonymous_38)","line":857,"loc":{"start":{"line":857,"column":18},"end":{"line":857,"column":35}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":869,"column":66}},"2":{"start":{"line":9,"column":0},"end":{"line":11,"column":33}},"3":{"start":{"line":29,"column":0},"end":{"line":104,"column":1}},"4":{"start":{"line":49,"column":4},"end":{"line":52,"column":7}},"5":{"start":{"line":72,"column":4},"end":{"line":75,"column":7}},"6":{"start":{"line":77,"column":4},"end":{"line":77,"column":21}},"7":{"start":{"line":79,"column":4},"end":{"line":80,"column":15}},"8":{"start":{"line":82,"column":4},"end":{"line":91,"column":5}},"9":{"start":{"line":84,"column":8},"end":{"line":84,"column":35}},"10":{"start":{"line":86,"column":8},"end":{"line":89,"column":11}},"11":{"start":{"line":87,"column":12},"end":{"line":87,"column":32}},"12":{"start":{"line":88,"column":12},"end":{"line":88,"column":28}},"13":{"start":{"line":94,"column":4},"end":{"line":94,"column":52}},"14":{"start":{"line":95,"column":4},"end":{"line":95,"column":48}},"15":{"start":{"line":97,"column":4},"end":{"line":97,"column":62}},"16":{"start":{"line":98,"column":4},"end":{"line":98,"column":66}},"17":{"start":{"line":99,"column":4},"end":{"line":99,"column":76}},"18":{"start":{"line":101,"column":4},"end":{"line":101,"column":75}},"19":{"start":{"line":102,"column":4},"end":{"line":102,"column":64}},"20":{"start":{"line":106,"column":0},"end":{"line":206,"column":2}},"21":{"start":{"line":119,"column":12},"end":{"line":120,"column":66}},"22":{"start":{"line":122,"column":12},"end":{"line":124,"column":13}},"23":{"start":{"line":123,"column":16},"end":{"line":123,"column":42}},"24":{"start":{"line":126,"column":12},"end":{"line":126,"column":29}},"25":{"start":{"line":157,"column":12},"end":{"line":157,"column":40}},"26":{"start":{"line":158,"column":12},"end":{"line":158,"column":73}},"27":{"start":{"line":177,"column":12},"end":{"line":178,"column":53}},"28":{"start":{"line":179,"column":12},"end":{"line":179,"column":29}},"29":{"start":{"line":196,"column":12},"end":{"line":196,"column":34}},"30":{"start":{"line":198,"column":12},"end":{"line":200,"column":13}},"31":{"start":{"line":199,"column":16},"end":{"line":199,"column":54}},"32":{"start":{"line":202,"column":12},"end":{"line":202,"column":29}},"33":{"start":{"line":208,"column":0},"end":{"line":862,"column":2}},"34":{"start":{"line":215,"column":8},"end":{"line":215,"column":32}},"35":{"start":{"line":228,"column":8},"end":{"line":228,"column":33}},"36":{"start":{"line":230,"column":8},"end":{"line":232,"column":9}},"37":{"start":{"line":231,"column":12},"end":{"line":231,"column":27}},"38":{"start":{"line":246,"column":8},"end":{"line":268,"column":9}},"39":{"start":{"line":248,"column":12},"end":{"line":249,"column":32}},"40":{"start":{"line":252,"column":12},"end":{"line":264,"column":13}},"41":{"start":{"line":254,"column":16},"end":{"line":254,"column":32}},"42":{"start":{"line":257,"column":16},"end":{"line":262,"column":17}},"43":{"start":{"line":260,"column":20},"end":{"line":260,"column":36}},"44":{"start":{"line":266,"column":12},"end":{"line":266,"column":61}},"45":{"start":{"line":282,"column":8},"end":{"line":282,"column":40}},"46":{"start":{"line":284,"column":8},"end":{"line":286,"column":9}},"47":{"start":{"line":285,"column":12},"end":{"line":285,"column":58}},"48":{"start":{"line":301,"column":8},"end":{"line":301,"column":33}},"49":{"start":{"line":303,"column":8},"end":{"line":316,"column":9}},"50":{"start":{"line":306,"column":12},"end":{"line":314,"column":21}},"51":{"start":{"line":312,"column":16},"end":{"line":312,"column":60}},"52":{"start":{"line":331,"column":8},"end":{"line":332,"column":21}},"53":{"start":{"line":334,"column":8},"end":{"line":357,"column":9}},"54":{"start":{"line":336,"column":12},"end":{"line":336,"column":26}},"55":{"start":{"line":338,"column":12},"end":{"line":344,"column":15}},"56":{"start":{"line":340,"column":15},"end":{"line":342,"column":16}},"57":{"start":{"line":341,"column":19},"end":{"line":341,"column":36}},"58":{"start":{"line":346,"column":12},"end":{"line":348,"column":13}},"59":{"start":{"line":347,"column":16},"end":{"line":347,"column":37}},"60":{"start":{"line":353,"column":12},"end":{"line":355,"column":13}},"61":{"start":{"line":354,"column":16},"end":{"line":354,"column":34}},"62":{"start":{"line":359,"column":8},"end":{"line":359,"column":25}},"63":{"start":{"line":375,"column":8},"end":{"line":376,"column":22}},"64":{"start":{"line":378,"column":8},"end":{"line":402,"column":9}},"65":{"start":{"line":380,"column":12},"end":{"line":396,"column":13}},"66":{"start":{"line":382,"column":16},"end":{"line":382,"column":50}},"67":{"start":{"line":384,"column":16},"end":{"line":392,"column":17}},"68":{"start":{"line":390,"column":20},"end":{"line":390,"column":78}},"69":{"start":{"line":394,"column":16},"end":{"line":394,"column":46}},"70":{"start":{"line":398,"column":12},"end":{"line":400,"column":13}},"71":{"start":{"line":399,"column":16},"end":{"line":399,"column":61}},"72":{"start":{"line":416,"column":8},"end":{"line":416,"column":77}},"73":{"start":{"line":417,"column":8},"end":{"line":417,"column":56}},"74":{"start":{"line":436,"column":8},"end":{"line":440,"column":26}},"75":{"start":{"line":442,"column":8},"end":{"line":444,"column":9}},"76":{"start":{"line":443,"column":12},"end":{"line":443,"column":63}},"77":{"start":{"line":446,"column":8},"end":{"line":451,"column":9}},"78":{"start":{"line":447,"column":12},"end":{"line":447,"column":31}},"79":{"start":{"line":448,"column":15},"end":{"line":451,"column":9}},"80":{"start":{"line":450,"column":12},"end":{"line":450,"column":40}},"81":{"start":{"line":453,"column":8},"end":{"line":457,"column":9}},"82":{"start":{"line":454,"column":12},"end":{"line":454,"column":46}},"83":{"start":{"line":456,"column":12},"end":{"line":456,"column":113}},"84":{"start":{"line":459,"column":8},"end":{"line":459,"column":21}},"85":{"start":{"line":476,"column":8},"end":{"line":478,"column":35}},"86":{"start":{"line":480,"column":8},"end":{"line":482,"column":9}},"87":{"start":{"line":481,"column":12},"end":{"line":481,"column":27}},"88":{"start":{"line":484,"column":8},"end":{"line":489,"column":9}},"89":{"start":{"line":485,"column":12},"end":{"line":485,"column":45}},"90":{"start":{"line":488,"column":12},"end":{"line":488,"column":33}},"91":{"start":{"line":491,"column":8},"end":{"line":491,"column":35}},"92":{"start":{"line":492,"column":8},"end":{"line":492,"column":30}},"93":{"start":{"line":496,"column":8},"end":{"line":496,"column":41}},"94":{"start":{"line":499,"column":8},"end":{"line":499,"column":75}},"95":{"start":{"line":515,"column":8},"end":{"line":517,"column":35}},"96":{"start":{"line":519,"column":8},"end":{"line":521,"column":9}},"97":{"start":{"line":520,"column":12},"end":{"line":520,"column":25}},"98":{"start":{"line":523,"column":8},"end":{"line":525,"column":9}},"99":{"start":{"line":524,"column":12},"end":{"line":524,"column":37}},"100":{"start":{"line":527,"column":8},"end":{"line":527,"column":34}},"101":{"start":{"line":529,"column":8},"end":{"line":529,"column":33}},"102":{"start":{"line":530,"column":8},"end":{"line":530,"column":47}},"103":{"start":{"line":531,"column":8},"end":{"line":531,"column":35}},"104":{"start":{"line":552,"column":8},"end":{"line":554,"column":22}},"105":{"start":{"line":557,"column":8},"end":{"line":590,"column":9}},"106":{"start":{"line":559,"column":12},"end":{"line":559,"column":26}},"107":{"start":{"line":561,"column":12},"end":{"line":569,"column":21}},"108":{"start":{"line":563,"column":16},"end":{"line":563,"column":51}},"109":{"start":{"line":565,"column":16},"end":{"line":567,"column":17}},"110":{"start":{"line":566,"column":20},"end":{"line":566,"column":42}},"111":{"start":{"line":572,"column":12},"end":{"line":574,"column":13}},"112":{"start":{"line":573,"column":16},"end":{"line":573,"column":37}},"113":{"start":{"line":579,"column":12},"end":{"line":584,"column":13}},"114":{"start":{"line":580,"column":16},"end":{"line":580,"column":31}},"115":{"start":{"line":583,"column":16},"end":{"line":583,"column":50}},"116":{"start":{"line":586,"column":12},"end":{"line":588,"column":13}},"117":{"start":{"line":587,"column":16},"end":{"line":587,"column":35}},"118":{"start":{"line":592,"column":8},"end":{"line":592,"column":25}},"119":{"start":{"line":620,"column":8},"end":{"line":621,"column":76}},"120":{"start":{"line":623,"column":8},"end":{"line":623,"column":43}},"121":{"start":{"line":639,"column":8},"end":{"line":640,"column":22}},"122":{"start":{"line":642,"column":8},"end":{"line":644,"column":9}},"123":{"start":{"line":643,"column":12},"end":{"line":643,"column":30}},"124":{"start":{"line":646,"column":8},"end":{"line":646,"column":25}},"125":{"start":{"line":660,"column":8},"end":{"line":661,"column":18}},"126":{"start":{"line":663,"column":8},"end":{"line":671,"column":17}},"127":{"start":{"line":665,"column":12},"end":{"line":665,"column":35}},"128":{"start":{"line":667,"column":12},"end":{"line":669,"column":13}},"129":{"start":{"line":668,"column":16},"end":{"line":668,"column":36}},"130":{"start":{"line":673,"column":8},"end":{"line":673,"column":42}},"131":{"start":{"line":684,"column":8},"end":{"line":684,"column":40}},"132":{"start":{"line":693,"column":8},"end":{"line":693,"column":32}},"133":{"start":{"line":702,"column":8},"end":{"line":702,"column":32}},"134":{"start":{"line":716,"column":8},"end":{"line":716,"column":33}},"135":{"start":{"line":720,"column":8},"end":{"line":723,"column":24}},"136":{"start":{"line":732,"column":8},"end":{"line":757,"column":9}},"137":{"start":{"line":734,"column":12},"end":{"line":734,"column":54}},"138":{"start":{"line":735,"column":12},"end":{"line":735,"column":48}},"139":{"start":{"line":739,"column":12},"end":{"line":739,"column":48}},"140":{"start":{"line":741,"column":12},"end":{"line":756,"column":13}},"141":{"start":{"line":743,"column":16},"end":{"line":743,"column":58}},"142":{"start":{"line":744,"column":16},"end":{"line":744,"column":51}},"143":{"start":{"line":746,"column":19},"end":{"line":756,"column":13}},"144":{"start":{"line":755,"column":16},"end":{"line":755,"column":48}},"145":{"start":{"line":769,"column":8},"end":{"line":769,"column":42}},"146":{"start":{"line":773,"column":8},"end":{"line":773,"column":32}},"147":{"start":{"line":775,"column":8},"end":{"line":777,"column":9}},"148":{"start":{"line":776,"column":12},"end":{"line":776,"column":61}},"149":{"start":{"line":781,"column":8},"end":{"line":781,"column":32}},"150":{"start":{"line":783,"column":8},"end":{"line":785,"column":9}},"151":{"start":{"line":784,"column":12},"end":{"line":784,"column":39}},"152":{"start":{"line":799,"column":8},"end":{"line":799,"column":52}},"153":{"start":{"line":800,"column":8},"end":{"line":800,"column":58}},"154":{"start":{"line":827,"column":8},"end":{"line":827,"column":73}},"155":{"start":{"line":829,"column":8},"end":{"line":829,"column":43}},"156":{"start":{"line":831,"column":8},"end":{"line":833,"column":11}},"157":{"start":{"line":832,"column":12},"end":{"line":832,"column":35}},"158":{"start":{"line":854,"column":8},"end":{"line":854,"column":37}},"159":{"start":{"line":857,"column":8},"end":{"line":859,"column":11}},"160":{"start":{"line":858,"column":12},"end":{"line":858,"column":28}},"161":{"start":{"line":864,"column":0},"end":{"line":864,"column":31}},"162":{"start":{"line":866,"column":0},"end":{"line":866,"column":24}}},"branchMap":{"1":{"line":82,"type":"if","locations":[{"start":{"line":82,"column":4},"end":{"line":82,"column":4}},{"start":{"line":82,"column":4},"end":{"line":82,"column":4}}]},"2":{"line":82,"type":"binary-expr","locations":[{"start":{"line":82,"column":8},"end":{"line":82,"column":14}},{"start":{"line":82,"column":18},"end":{"line":82,"column":33}}]},"3":{"line":120,"type":"cond-expr","locations":[{"start":{"line":120,"column":53},"end":{"line":120,"column":59}},{"start":{"line":120,"column":62},"end":{"line":120,"column":65}}]},"4":{"line":122,"type":"if","locations":[{"start":{"line":122,"column":12},"end":{"line":122,"column":12}},{"start":{"line":122,"column":12},"end":{"line":122,"column":12}}]},"5":{"line":158,"type":"cond-expr","locations":[{"start":{"line":158,"column":44},"end":{"line":158,"column":64}},{"start":{"line":158,"column":67},"end":{"line":158,"column":72}}]},"6":{"line":158,"type":"binary-expr","locations":[{"start":{"line":158,"column":20},"end":{"line":158,"column":24}},{"start":{"line":158,"column":28},"end":{"line":158,"column":40}}]},"7":{"line":177,"type":"cond-expr","locations":[{"start":{"line":178,"column":21},"end":{"line":178,"column":43}},{"start":{"line":178,"column":47},"end":{"line":178,"column":52}}]},"8":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":12},"end":{"line":198,"column":12}},{"start":{"line":198,"column":12},"end":{"line":198,"column":12}}]},"9":{"line":198,"type":"binary-expr","locations":[{"start":{"line":198,"column":16},"end":{"line":198,"column":27}},{"start":{"line":198,"column":31},"end":{"line":198,"column":52}}]},"10":{"line":230,"type":"if","locations":[{"start":{"line":230,"column":8},"end":{"line":230,"column":8}},{"start":{"line":230,"column":8},"end":{"line":230,"column":8}}]},"11":{"line":246,"type":"if","locations":[{"start":{"line":246,"column":8},"end":{"line":246,"column":8}},{"start":{"line":246,"column":8},"end":{"line":246,"column":8}}]},"12":{"line":246,"type":"binary-expr","locations":[{"start":{"line":246,"column":12},"end":{"line":246,"column":32}},{"start":{"line":246,"column":36},"end":{"line":246,"column":53}}]},"13":{"line":252,"type":"if","locations":[{"start":{"line":252,"column":12},"end":{"line":252,"column":12}},{"start":{"line":252,"column":12},"end":{"line":252,"column":12}}]},"14":{"line":257,"type":"if","locations":[{"start":{"line":257,"column":16},"end":{"line":257,"column":16}},{"start":{"line":257,"column":16},"end":{"line":257,"column":16}}]},"15":{"line":257,"type":"binary-expr","locations":[{"start":{"line":257,"column":20},"end":{"line":257,"column":56}},{"start":{"line":258,"column":21},"end":{"line":258,"column":53}}]},"16":{"line":284,"type":"if","locations":[{"start":{"line":284,"column":8},"end":{"line":284,"column":8}},{"start":{"line":284,"column":8},"end":{"line":284,"column":8}}]},"17":{"line":303,"type":"if","locations":[{"start":{"line":303,"column":8},"end":{"line":303,"column":8}},{"start":{"line":303,"column":8},"end":{"line":303,"column":8}}]},"18":{"line":303,"type":"binary-expr","locations":[{"start":{"line":303,"column":12},"end":{"line":303,"column":32}},{"start":{"line":303,"column":36},"end":{"line":303,"column":53}},{"start":{"line":304,"column":13},"end":{"line":304,"column":24}},{"start":{"line":304,"column":28},"end":{"line":304,"column":39}}]},"19":{"line":334,"type":"if","locations":[{"start":{"line":334,"column":8},"end":{"line":334,"column":8}},{"start":{"line":334,"column":8},"end":{"line":334,"column":8}}]},"20":{"line":334,"type":"binary-expr","locations":[{"start":{"line":334,"column":12},"end":{"line":334,"column":32}},{"start":{"line":334,"column":36},"end":{"line":334,"column":51}}]},"21":{"line":340,"type":"if","locations":[{"start":{"line":340,"column":15},"end":{"line":340,"column":15}},{"start":{"line":340,"column":15},"end":{"line":340,"column":15}}]},"22":{"line":346,"type":"if","locations":[{"start":{"line":346,"column":12},"end":{"line":346,"column":12}},{"start":{"line":346,"column":12},"end":{"line":346,"column":12}}]},"23":{"line":353,"type":"if","locations":[{"start":{"line":353,"column":12},"end":{"line":353,"column":12}},{"start":{"line":353,"column":12},"end":{"line":353,"column":12}}]},"24":{"line":378,"type":"if","locations":[{"start":{"line":378,"column":8},"end":{"line":378,"column":8}},{"start":{"line":378,"column":8},"end":{"line":378,"column":8}}]},"25":{"line":380,"type":"if","locations":[{"start":{"line":380,"column":12},"end":{"line":380,"column":12}},{"start":{"line":380,"column":12},"end":{"line":380,"column":12}}]},"26":{"line":384,"type":"if","locations":[{"start":{"line":384,"column":16},"end":{"line":384,"column":16}},{"start":{"line":384,"column":16},"end":{"line":384,"column":16}}]},"27":{"line":384,"type":"binary-expr","locations":[{"start":{"line":384,"column":20},"end":{"line":384,"column":41}},{"start":{"line":384,"column":45},"end":{"line":384,"column":54}},{"start":{"line":384,"column":58},"end":{"line":384,"column":74}}]},"28":{"line":398,"type":"if","locations":[{"start":{"line":398,"column":12},"end":{"line":398,"column":12}},{"start":{"line":398,"column":12},"end":{"line":398,"column":12}}]},"29":{"line":416,"type":"cond-expr","locations":[{"start":{"line":416,"column":57},"end":{"line":416,"column":69}},{"start":{"line":416,"column":72},"end":{"line":416,"column":76}}]},"30":{"line":437,"type":"binary-expr","locations":[{"start":{"line":437,"column":22},"end":{"line":437,"column":38}},{"start":{"line":437,"column":42},"end":{"line":437,"column":53}}]},"31":{"line":442,"type":"if","locations":[{"start":{"line":442,"column":8},"end":{"line":442,"column":8}},{"start":{"line":442,"column":8},"end":{"line":442,"column":8}}]},"32":{"line":443,"type":"cond-expr","locations":[{"start":{"line":443,"column":42},"end":{"line":443,"column":52}},{"start":{"line":443,"column":55},"end":{"line":443,"column":62}}]},"33":{"line":446,"type":"if","locations":[{"start":{"line":446,"column":8},"end":{"line":446,"column":8}},{"start":{"line":446,"column":8},"end":{"line":446,"column":8}}]},"34":{"line":448,"type":"if","locations":[{"start":{"line":448,"column":15},"end":{"line":448,"column":15}},{"start":{"line":448,"column":15},"end":{"line":448,"column":15}}]},"35":{"line":453,"type":"if","locations":[{"start":{"line":453,"column":8},"end":{"line":453,"column":8}},{"start":{"line":453,"column":8},"end":{"line":453,"column":8}}]},"36":{"line":480,"type":"if","locations":[{"start":{"line":480,"column":8},"end":{"line":480,"column":8}},{"start":{"line":480,"column":8},"end":{"line":480,"column":8}}]},"37":{"line":484,"type":"if","locations":[{"start":{"line":484,"column":8},"end":{"line":484,"column":8}},{"start":{"line":484,"column":8},"end":{"line":484,"column":8}}]},"38":{"line":519,"type":"if","locations":[{"start":{"line":519,"column":8},"end":{"line":519,"column":8}},{"start":{"line":519,"column":8},"end":{"line":519,"column":8}}]},"39":{"line":523,"type":"if","locations":[{"start":{"line":523,"column":8},"end":{"line":523,"column":8}},{"start":{"line":523,"column":8},"end":{"line":523,"column":8}}]},"40":{"line":557,"type":"if","locations":[{"start":{"line":557,"column":8},"end":{"line":557,"column":8}},{"start":{"line":557,"column":8},"end":{"line":557,"column":8}}]},"41":{"line":565,"type":"if","locations":[{"start":{"line":565,"column":16},"end":{"line":565,"column":16}},{"start":{"line":565,"column":16},"end":{"line":565,"column":16}}]},"42":{"line":572,"type":"if","locations":[{"start":{"line":572,"column":12},"end":{"line":572,"column":12}},{"start":{"line":572,"column":12},"end":{"line":572,"column":12}}]},"43":{"line":579,"type":"if","locations":[{"start":{"line":579,"column":12},"end":{"line":579,"column":12}},{"start":{"line":579,"column":12},"end":{"line":579,"column":12}}]},"44":{"line":586,"type":"if","locations":[{"start":{"line":586,"column":12},"end":{"line":586,"column":12}},{"start":{"line":586,"column":12},"end":{"line":586,"column":12}}]},"45":{"line":586,"type":"binary-expr","locations":[{"start":{"line":586,"column":16},"end":{"line":586,"column":22}},{"start":{"line":586,"column":26},"end":{"line":586,"column":80}}]},"46":{"line":621,"type":"cond-expr","locations":[{"start":{"line":621,"column":32},"end":{"line":621,"column":69}},{"start":{"line":621,"column":73},"end":{"line":621,"column":75}}]},"47":{"line":621,"type":"cond-expr","locations":[{"start":{"line":621,"column":54},"end":{"line":621,"column":59}},{"start":{"line":621,"column":62},"end":{"line":621,"column":69}}]},"48":{"line":642,"type":"if","locations":[{"start":{"line":642,"column":8},"end":{"line":642,"column":8}},{"start":{"line":642,"column":8},"end":{"line":642,"column":8}}]},"49":{"line":642,"type":"binary-expr","locations":[{"start":{"line":642,"column":12},"end":{"line":642,"column":17}},{"start":{"line":642,"column":21},"end":{"line":642,"column":77}}]},"50":{"line":667,"type":"if","locations":[{"start":{"line":667,"column":12},"end":{"line":667,"column":12}},{"start":{"line":667,"column":12},"end":{"line":667,"column":12}}]},"51":{"line":732,"type":"if","locations":[{"start":{"line":732,"column":8},"end":{"line":732,"column":8}},{"start":{"line":732,"column":8},"end":{"line":732,"column":8}}]},"52":{"line":732,"type":"binary-expr","locations":[{"start":{"line":732,"column":12},"end":{"line":732,"column":23}},{"start":{"line":732,"column":27},"end":{"line":732,"column":52}}]},"53":{"line":741,"type":"if","locations":[{"start":{"line":741,"column":12},"end":{"line":741,"column":12}},{"start":{"line":741,"column":12},"end":{"line":741,"column":12}}]},"54":{"line":741,"type":"binary-expr","locations":[{"start":{"line":741,"column":16},"end":{"line":741,"column":27}},{"start":{"line":741,"column":31},"end":{"line":741,"column":56}}]},"55":{"line":746,"type":"if","locations":[{"start":{"line":746,"column":19},"end":{"line":746,"column":19}},{"start":{"line":746,"column":19},"end":{"line":746,"column":19}}]},"56":{"line":775,"type":"if","locations":[{"start":{"line":775,"column":8},"end":{"line":775,"column":8}},{"start":{"line":775,"column":8},"end":{"line":775,"column":8}}]},"57":{"line":783,"type":"if","locations":[{"start":{"line":783,"column":8},"end":{"line":783,"column":8}},{"start":{"line":783,"column":8},"end":{"line":783,"column":8}}]},"58":{"line":827,"type":"binary-expr","locations":[{"start":{"line":827,"column":23},"end":{"line":827,"column":46}},{"start":{"line":827,"column":50},"end":{"line":827,"column":72}}]}},"code":["(function () { YUI.add('widget-parent', function (Y, NAME) {","","/**"," * Extension enabling a Widget to be a parent of another Widget."," *"," * @module widget-parent"," */","","var Lang = Y.Lang,"," RENDERED = \"rendered\","," BOUNDING_BOX = \"boundingBox\";","","/**"," * Widget extension providing functionality enabling a Widget to be a "," * parent of another Widget."," *"," * <p>In addition to the set of attributes supported by WidgetParent, the constructor"," * configuration object can also contain a <code>children</code> which can be used"," * to add child widgets to the parent during construction. The <code>children</code>"," * property is an array of either child widget instances or child widget configuration "," * objects, and is sugar for the <a href=\"#method_add\">add</a> method. See the "," * <a href=\"#method_add\">add</a> for details on the structure of the child widget "," * configuration object."," * @class WidgetParent"," * @constructor"," * @uses ArrayList"," * @param {Object} config User configuration object."," */","function Parent(config) {",""," /**"," * Fires when a Widget is add as a child. The event object will have a "," * 'child' property that returns a reference to the child Widget, as well "," * as an 'index' property that returns a reference to the index specified "," * when the add() method was called."," * <p>"," * Subscribers to the \"on\" moment of this event, will be notified "," * before a child is added."," * </p>"," * <p>"," * Subscribers to the \"after\" moment of this event, will be notified"," * after a child is added."," * </p>"," *"," * @event addChild"," * @preventable _defAddChildFn"," * @param {EventFacade} e The Event Facade"," */"," this.publish(\"addChild\", { "," defaultTargetOnly: true,"," defaultFn: this._defAddChildFn "," });","",""," /**"," * Fires when a child Widget is removed. The event object will have a "," * 'child' property that returns a reference to the child Widget, as well "," * as an 'index' property that returns a reference child's ordinal position."," * <p>"," * Subscribers to the \"on\" moment of this event, will be notified "," * before a child is removed."," * </p>"," * <p>"," * Subscribers to the \"after\" moment of this event, will be notified"," * after a child is removed."," * </p>"," *"," * @event removeChild"," * @preventable _defRemoveChildFn"," * @param {EventFacade} e The Event Facade"," */"," this.publish(\"removeChild\", { "," defaultTargetOnly: true,"," defaultFn: this._defRemoveChildFn "," });",""," this._items = [];",""," var children,"," handle;",""," if (config && config.children) {",""," children = config.children;"," "," handle = this.after(\"initializedChange\", function (e) {"," this._add(children);"," handle.detach();"," });",""," }",""," // Widget method overlap"," Y.after(this._renderChildren, this, \"renderUI\");"," Y.after(this._bindUIParent, this, \"bindUI\");",""," this.after(\"selectionChange\", this._afterSelectionChange);"," this.after(\"selectedChange\", this._afterParentSelectedChange);"," this.after(\"activeDescendantChange\", this._afterActiveDescendantChange);",""," this._hDestroyChild = this.after(\"*:destroy\", this._afterDestroyChild);"," this.after(\"*:focusedChange\", this._updateActiveDescendant);","","}","","Parent.ATTRS = {",""," /**"," * @attribute defaultChildType"," * @type {String|Object}"," *"," * @description String representing the default type of the children "," * managed by this Widget. Can also supply default type as a constructor"," * reference."," */"," defaultChildType: {"," setter: function (val) {"," "," var returnVal = Y.Attribute.INVALID_VALUE,"," FnConstructor = Lang.isString(val) ? Y[val] : val;"," "," if (Lang.isFunction(FnConstructor)) {"," returnVal = FnConstructor;"," }"," "," return returnVal;"," }"," },",""," /**"," * @attribute activeDescendant"," * @type Widget"," * @readOnly"," *"," * @description Returns the Widget's currently focused descendant Widget."," */"," activeDescendant: { "," readOnly: true"," },",""," /**"," * @attribute multiple"," * @type Boolean"," * @default false"," * @writeOnce "," *"," * @description Boolean indicating if multiple children can be selected at "," * once. Whether or not multiple selection is enabled is always delegated"," * to the value of the <code>multiple</code> attribute of the root widget"," * in the object hierarchy."," */"," multiple: {"," value: false,"," validator: Lang.isBoolean,"," writeOnce: true,"," getter: function (value) {"," var root = this.get(\"root\");"," return (root && root != this) ? root.get(\"multiple\") : value;"," }"," },","",""," /**"," * @attribute selection"," * @type {ArrayList|Widget}"," * @readOnly "," *"," * @description Returns the currently selected child Widget. If the "," * <code>mulitple</code> attribte is set to <code>true</code> will "," * return an Y.ArrayList instance containing the currently selected "," * children. If no children are selected, will return null."," */"," selection: {"," readOnly: true,"," setter: \"_setSelection\","," getter: function (value) {"," var selection = Lang.isArray(value) ? "," (new Y.ArrayList(value)) : value;"," return selection;"," }"," },",""," selected: {"," setter: function (value) {",""," // Enforces selection behavior on for parent Widgets. Parent's "," // selected attribute can be set to the following:"," // 0 - Not selected"," // 1 - Fully selected (all children are selected). In order for "," // all children to be selected, multiple selection must be "," // enabled. Therefore, you cannot set the \"selected\" attribute "," // on a parent Widget to 1 unless multiple selection is enabled."," // 2 - Partially selected, meaning one ore more (but not all) "," // children are selected.",""," var returnVal = value;",""," if (value === 1 && !this.get(\"multiple\")) {"," returnVal = Y.Attribute.INVALID_VALUE;"," }"," "," return returnVal;"," }"," }","","};","","Parent.prototype = {",""," /**"," * The destructor implementation for Parent widgets. Destroys all children."," * @method destructor"," */"," destructor: function() {"," this._destroyChildren();"," },",""," /**"," * Destroy event listener for each child Widget, responsible for removing "," * the destroyed child Widget from the parent's internal array of children"," * (_items property)."," *"," * @method _afterDestroyChild"," * @protected"," * @param {EventFacade} event The event facade for the attribute change."," */"," _afterDestroyChild: function (event) {"," var child = event.target;",""," if (child.get(\"parent\") == this) {"," child.remove();"," } "," },",""," /**"," * Attribute change listener for the <code>selection</code> "," * attribute, responsible for setting the value of the "," * parent's <code>selected</code> attribute."," *"," * @method _afterSelectionChange"," * @protected"," * @param {EventFacade} event The event facade for the attribute change."," */"," _afterSelectionChange: function (event) {",""," if (event.target == this && event.src != this) {",""," var selection = event.newVal,"," selectedVal = 0; // Not selected","",""," if (selection) {",""," selectedVal = 2; // Assume partially selected, confirm otherwise","",""," if (Y.instanceOf(selection, Y.ArrayList) && "," (selection.size() === this.size())) {",""," selectedVal = 1; // Fully selected",""," }"," "," }",""," this.set(\"selected\", selectedVal, { src: this });"," "," }"," },","",""," /**"," * Attribute change listener for the <code>activeDescendant</code> "," * attribute, responsible for setting the value of the "," * parent's <code>activeDescendant</code> attribute."," *"," * @method _afterActiveDescendantChange"," * @protected"," * @param {EventFacade} event The event facade for the attribute change."," */"," _afterActiveDescendantChange: function (event) {"," var parent = this.get(\"parent\");",""," if (parent) {"," parent._set(\"activeDescendant\", event.newVal);"," }"," },",""," /**"," * Attribute change listener for the <code>selected</code> "," * attribute, responsible for syncing the selected state of all children to "," * match that of their parent Widget."," * "," *"," * @method _afterParentSelectedChange"," * @protected"," * @param {EventFacade} event The event facade for the attribute change."," */"," _afterParentSelectedChange: function (event) {",""," var value = event.newVal;",""," if (this == event.target && event.src != this && "," (value === 0 || value === 1)) {",""," this.each(function (child) {",""," // Specify the source of this change as the parent so that "," // value of the parent's \"selection\" attribute isn't "," // recalculated",""," child.set(\"selected\", value, { src: this });",""," }, this);"," "," }"," "," },","",""," /**"," * Default setter for <code>selection</code> attribute changes."," *"," * @method _setSelection"," * @protected"," * @param child {Widget|Array} Widget or Array of Widget instances. "," * @return {Widget|Array} Widget or Array of Widget instances."," */"," _setSelection: function (child) {",""," var selection = null,"," selected;",""," if (this.get(\"multiple\") && !this.isEmpty()) {",""," selected = [];"," "," this.each(function (v) {",""," if (v.get(\"selected\") > 0) {"," selected.push(v);"," }",""," });",""," if (selected.length > 0) {"," selection = selected;"," }",""," }"," else {",""," if (child.get(\"selected\") > 0) {"," selection = child;"," }",""," }"," "," return selection;"," "," },","",""," /**"," * Attribute change listener for the <code>selected</code> "," * attribute of child Widgets, responsible for setting the value of the "," * parent's <code>selection</code> attribute."," *"," * @method _updateSelection"," * @protected"," * @param {EventFacade} event The event facade for the attribute change."," */"," _updateSelection: function (event) {",""," var child = event.target,"," selection;",""," if (child.get(\"parent\") == this) {",""," if (event.src != \"_updateSelection\") {",""," selection = this.get(\"selection\");",""," if (!this.get(\"multiple\") && selection && event.newVal > 0) {",""," // Deselect the previously selected child."," // Set src equal to the current context to prevent"," // unnecessary re-calculation of the selection.",""," selection.set(\"selected\", 0, { src: \"_updateSelection\" });",""," }",""," this._set(\"selection\", child);",""," }",""," if (event.src == this) {"," this._set(\"selection\", child, { src: this });"," }"," "," }",""," },",""," /**"," * Attribute change listener for the <code>focused</code> "," * attribute of child Widgets, responsible for setting the value of the "," * parent's <code>activeDescendant</code> attribute."," *"," * @method _updateActiveDescendant"," * @protected"," * @param {EventFacade} event The event facade for the attribute change."," */"," _updateActiveDescendant: function (event) {"," var activeDescendant = (event.newVal === true) ? event.target : null;"," this._set(\"activeDescendant\", activeDescendant);"," },",""," /**"," * Creates an instance of a child Widget using the specified configuration."," * By default Widget instances will be created of the type specified "," * by the <code>defaultChildType</code> attribute. Types can be explicitly"," * defined via the <code>childType</code> property of the configuration object"," * literal. The use of the <code>type</code> property has been deprecated, but "," * will still be used as a fallback, if <code>childType</code> is not defined,"," * for backwards compatibility. "," *"," * @method _createChild"," * @protected"," * @param config {Object} Object literal representing the configuration "," * used to create an instance of a Widget."," */"," _createChild: function (config) {",""," var defaultType = this.get(\"defaultChildType\"),"," altType = config.childType || config.type,"," child,"," Fn,"," FnConstructor;",""," if (altType) {"," Fn = Lang.isString(altType) ? Y[altType] : altType;"," }",""," if (Lang.isFunction(Fn)) {"," FnConstructor = Fn;"," } else if (defaultType) {"," // defaultType is normalized to a function in it's setter "," FnConstructor = defaultType;"," }",""," if (FnConstructor) {"," child = new FnConstructor(config);"," } else {"," Y.error(\"Could not create a child instance because its constructor is either undefined or invalid.\");"," }",""," return child;"," "," },",""," /**"," * Default addChild handler"," *"," * @method _defAddChildFn"," * @protected"," * @param event {EventFacade} The Event object"," * @param child {Widget} The Widget instance, or configuration "," * object for the Widget to be added as a child."," * @param index {Number} Number representing the position at "," * which the child will be inserted."," */"," _defAddChildFn: function (event) {",""," var child = event.child,"," index = event.index,"," children = this._items;",""," if (child.get(\"parent\")) {"," child.remove();"," }",""," if (Lang.isNumber(index)) {"," children.splice(index, 0, child);"," }"," else {"," children.push(child);"," }",""," child._set(\"parent\", this);"," child.addTarget(this);",""," // Update index in case it got normalized after addition"," // (e.g. user passed in 10, and there are only 3 items, the actual index would be 3. We don't want to pass 10 around in the event facade)."," event.index = child.get(\"index\");",""," // TO DO: Remove in favor of using event bubbling"," child.after(\"selectedChange\", Y.bind(this._updateSelection, this));"," },","",""," /**"," * Default removeChild handler"," *"," * @method _defRemoveChildFn"," * @protected"," * @param event {EventFacade} The Event object"," * @param child {Widget} The Widget instance to be removed."," * @param index {Number} Number representing the index of the Widget to "," * be removed."," */ "," _defRemoveChildFn: function (event) {",""," var child = event.child,"," index = event.index,"," children = this._items;",""," if (child.get(\"focused\")) {"," child.blur(); // focused is readOnly, so use the public i/f to unset it"," }",""," if (child.get(\"selected\")) {"," child.set(\"selected\", 0);"," }",""," children.splice(index, 1);",""," child.removeTarget(this);"," child._oldParent = child.get(\"parent\");"," child._set(\"parent\", null);"," },",""," /**"," * @method _add"," * @protected"," * @param child {Widget|Object} The Widget instance, or configuration "," * object for the Widget to be added as a child."," * @param child {Array} Array of Widget instances, or configuration "," * objects for the Widgets to be added as a children."," * @param index {Number} (Optional.) Number representing the position at "," * which the child should be inserted."," * @description Adds a Widget as a child. If the specified Widget already"," * has a parent it will be removed from its current parent before"," * being added as a child."," * @return {Widget|Array} Successfully added Widget or Array containing the "," * successfully added Widget instance(s). If no children where added, will "," * will return undefined."," */"," _add: function (child, index) { ",""," var children,"," oChild,"," returnVal;","",""," if (Lang.isArray(child)) {",""," children = [];",""," Y.each(child, function (v, k) {",""," oChild = this._add(v, (index + k));",""," if (oChild) {"," children.push(oChild);"," }"," "," }, this);"," ",""," if (children.length > 0) {"," returnVal = children;"," }",""," }"," else {",""," if (Y.instanceOf(child, Y.Widget)) {"," oChild = child;"," }"," else {"," oChild = this._createChild(child);"," }",""," if (oChild && this.fire(\"addChild\", { child: oChild, index: index })) {"," returnVal = oChild;"," }",""," }",""," return returnVal;",""," },","",""," /**"," * @method add"," * @param child {Widget|Object} The Widget instance, or configuration "," * object for the Widget to be added as a child. The configuration object"," * for the child can include a <code>childType</code> property, which is either"," * a constructor function or a string which names a constructor function on the "," * Y instance (e.g. \"Tab\" would refer to Y.Tab) (<code>childType</code> used to be "," * named <code>type</code>, support for which has been deprecated, but is still"," * maintained for backward compatibility. <code>childType</code> takes precedence"," * over <code>type</code> if both are defined."," * @param child {Array} Array of Widget instances, or configuration "," * objects for the Widgets to be added as a children."," * @param index {Number} (Optional.) Number representing the position at "," * which the child should be inserted."," * @description Adds a Widget as a child. If the specified Widget already"," * has a parent it will be removed from its current parent before"," * being added as a child."," * @return {ArrayList} Y.ArrayList containing the successfully added "," * Widget instance(s). If no children where added, will return an empty "," * Y.ArrayList instance."," */"," add: function () {",""," var added = this._add.apply(this, arguments),"," children = added ? (Lang.isArray(added) ? added : [added]) : [];",""," return (new Y.ArrayList(children));",""," },","",""," /**"," * @method remove"," * @param index {Number} (Optional.) Number representing the index of the "," * child to be removed."," * @description Removes the Widget from its parent. Optionally, can remove"," * a child by specifying its index."," * @return {Widget} Widget instance that was successfully removed, otherwise"," * undefined."," */"," remove: function (index) {",""," var child = this._items[index],"," returnVal;",""," if (child && this.fire(\"removeChild\", { child: child, index: index })) {"," returnVal = child;"," }"," "," return returnVal;",""," },","",""," /**"," * @method removeAll"," * @description Removes all of the children from the Widget."," * @return {ArrayList} Y.ArrayList instance containing Widgets that were "," * successfully removed. If no children where removed, will return an empty "," * Y.ArrayList instance."," */"," removeAll: function () {",""," var removed = [],"," child;",""," Y.each(this._items.concat(), function () {",""," child = this.remove(0);",""," if (child) {"," removed.push(child);"," }",""," }, this);",""," return (new Y.ArrayList(removed));",""," },"," "," /**"," * Selects the child at the given index (zero-based)."," *"," * @method selectChild"," * @param {Number} i the index of the child to be selected"," */"," selectChild: function(i) {"," this.item(i).set('selected', 1);"," },",""," /**"," * Selects all children."," *"," * @method selectAll"," */"," selectAll: function () {"," this.set(\"selected\", 1);"," },",""," /**"," * Deselects all children."," *"," * @method deselectAll"," */"," deselectAll: function () {"," this.set(\"selected\", 0);"," },",""," /**"," * Updates the UI in response to a child being added."," *"," * @method _uiAddChild"," * @protected"," * @param child {Widget} The child Widget instance to render."," * @param parentNode {Object} The Node under which the "," * child Widget is to be rendered."," */ "," _uiAddChild: function (child, parentNode) {",""," child.render(parentNode);",""," // TODO: Ideally this should be in Child's render UI. ",""," var childBB = child.get(\"boundingBox\"),"," siblingBB,"," nextSibling = child.next(false),"," prevSibling;",""," // Insert or Append to last child.",""," // Avoiding index, and using the current sibling "," // state (which should be accurate), means we don't have "," // to worry about decorator elements which may be added "," // to the _childContainer node."," "," if (nextSibling && nextSibling.get(RENDERED)) {",""," siblingBB = nextSibling.get(BOUNDING_BOX);"," siblingBB.insert(childBB, \"before\");",""," } else {",""," prevSibling = child.previous(false);",""," if (prevSibling && prevSibling.get(RENDERED)) {",""," siblingBB = prevSibling.get(BOUNDING_BOX);"," siblingBB.insert(childBB, \"after\");",""," } else if (!parentNode.contains(childBB)) {",""," // Based on pull request from andreas-karlsson"," // https://github.com/yui/yui3/pull/25#issuecomment-2103536",""," // Account for case where a child was rendered independently of the "," // parent-child framework, to a node outside of the parentNode,"," // and there are no siblings.",""," parentNode.appendChild(childBB);"," }"," }",""," },",""," /**"," * Updates the UI in response to a child being removed."," *"," * @method _uiRemoveChild"," * @protected"," * @param child {Widget} The child Widget instance to render."," */ "," _uiRemoveChild: function (child) {"," child.get(\"boundingBox\").remove();"," },",""," _afterAddChild: function (event) {"," var child = event.child;",""," if (child.get(\"parent\") == this) {"," this._uiAddChild(child, this._childrenContainer);"," }"," },",""," _afterRemoveChild: function (event) {"," var child = event.child;",""," if (child._oldParent == this) {"," this._uiRemoveChild(child);"," }"," },",""," /**"," * Sets up DOM and CustomEvent listeners for the parent widget."," * <p>"," * This method in invoked after bindUI is invoked for the Widget class"," * using YUI's aop infrastructure."," * </p>"," *"," * @method _bindUIParent"," * @protected"," */"," _bindUIParent: function () {"," this.after(\"addChild\", this._afterAddChild);"," this.after(\"removeChild\", this._afterRemoveChild);"," },",""," /**"," * Renders all child Widgets for the parent."," * <p>"," * This method in invoked after renderUI is invoked for the Widget class"," * using YUI's aop infrastructure."," * </p>"," * @method _renderChildren"," * @protected"," */"," _renderChildren: function () {",""," /**"," * <p>By default WidgetParent will render it's children to the parent's content box.</p>"," *"," * <p>If the children need to be rendered somewhere else, the _childrenContainer property"," * can be set to the Node which the children should be rendered to. This property should be"," * set before the _renderChildren method is invoked, ideally in your renderUI method, "," * as soon as you create the element to be rendered to.</p>"," *"," * @protected"," * @property _childrenContainer"," * @value The content box"," * @type Node"," */"," var renderTo = this._childrenContainer || this.get(\"contentBox\");",""," this._childrenContainer = renderTo;",""," this.each(function (child) {"," child.render(renderTo);"," });"," },",""," /**"," * Destroys all child Widgets for the parent."," * <p>"," * This method is invoked before the destructor is invoked for the Widget "," * class using YUI's aop infrastructure."," * </p>"," * @method _destroyChildren"," * @protected"," */"," _destroyChildren: function () {",""," // Detach the handler responsible for removing children in "," // response to destroying them since:"," // 1) It is unnecessary/inefficient at this point since we are doing "," // a batch destroy of all children."," // 2) Removing each child will affect our ability to iterate the "," // children since the size of _items will be changing as we "," // iterate."," this._hDestroyChild.detach();",""," // Need to clone the _items array since "," this.each(function (child) {"," child.destroy();"," });"," }"," ","};","","Y.augment(Parent, Y.ArrayList);","","Y.WidgetParent = Parent;","","","}, '3.10.3', {\"requires\": [\"arraylist\", \"base-build\", \"widget\"]});","","}());"]}; |