From b2b73adc1129b6607329b5eeeee7b3ac4269c15e Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Tue, 11 Aug 2015 15:29:09 +0100 Subject: [PATCH] 0.2.8 --- bower.json | 2 +- dist/milo.bundle.js | 5 +- dist/milo.bundle.map | 270 +++++++++++++++++++++---------------------- dist/milo.min.js | 4 +- dist/milo.min.js.map | 2 +- package.json | 2 +- 6 files changed, 143 insertions(+), 142 deletions(-) diff --git a/bower.json b/bower.json index 94a3eb1..dcf23e8 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "milojs", - "version": "0.2.7", + "version": "0.2.8", "homepage": "https://github.com/milojs/milo", "authors": [ "MOL Technical " diff --git a/dist/milo.bundle.js b/dist/milo.bundle.js index e9239b8..9110873 100644 --- a/dist/milo.bundle.js +++ b/dist/milo.bundle.js @@ -19458,5 +19458,6 @@ function makeFindMethod(someMethod, findWhat) { } },{}]},{},[67]) -//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9yaWNoYXJkd2FsdG9uL1dvcmsvQ0MvbWlsby9saWIvYWJzdHJhY3QvZmFjZXQuanMiLCIvVXNlcnMvcmljaGFyZHdhbHRvbi9Xb3JrL0NDL21pbG8vbGliL2Fic3RyYWN0L2ZhY2V0ZWRfb2JqZWN0LmpzIiwiL1VzZXJzL3JpY2hhcmR3YWx0b24vV29yay9DQy9taWxvL2xpYi9hYnN0cmFjdC9yZWdpc3RyeS5qcyIsIi9Vc2Vycy9yaWNoYXJkd2FsdG9uL1dvcmsvQ0MvbWlsby9saWIvYXR0cmlidXRlcy9hX2JpbmQuanMiLCIvVXNlcnMvcmljaGFyZHdhbHRvbi9Xb3JrL0NDL21pbG8vbGliL2F0dHJpYnV0ZXMvYV9jbGFzcy5qcyIsIi9Vc2Vycy9yaWNoYXJkd2FsdG9uL1dvcmsvQ0MvbWlsby9saWIvYXR0cmlidXRlcy9hX2xvYWQuanMi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IHRoaXMub24obWVzc2FnZXMsIHN1YnNjcmliZXIpO1xuXG4gICAgICAgIGlmIChzdWJzY3JpYmVyVHlwZSA9PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgdmFyIGNvbnRleHRUeXBlID0gdHlwZW9mIHN1YnNjcmliZXIuY29udGV4dDtcbiAgICAgICAgICAgIGlmIChjb250ZXh0VHlwZSA9PSAnb2JqZWN0JylcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5vbihtZXNzYWdlcywgc3Vic2NyaWJlcik7XG5cbiAgICAgICAgICAgIGlmIChjb250ZXh0VHlwZSA9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgIGlmIChzdWJzY3JpYmVyLmNvbnRleHQgPT0gdGhpcy5uYW1lIHx8IHN1YnNjcmliZXIuY29udGV4dCA9PSAnZmFjZXQnKVxuICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVyID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3Vic2NyaWJlcjogc3Vic2NyaWJlci5zdWJzY3JpYmVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dDogdGhpc1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHN1YnNjcmliZXIuY29udGV4dCA9PSAnb3duZXInKVxuICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVyID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3Vic2NyaWJlcjogc3Vic2NyaWJlci5zdWJzY3JpYmVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dDogdGhpcy5vd25lclxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1bmtub3duIHN1YnNjcmliZXIgY29udGV4dCBpbiBjb25maWd1cmF0aW9uOiAnICsgc3Vic2NyaWJlci5jb250ZXh0KTtcblxuICAgICAgICA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Db3VudCk7XG4gICAgICAgICAgICAgICAgICAgIGxpc3RGYWNldC5fdXBkYXRlRGF0YVBhdGhzKGxpc3RMZW5ndGgsIGxpc3RGYWNldC5jb3VudCgpKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB2YWx1ZS5mb3JFYWNoKGZ1bmN0aW9uKGNoaWxkVmFsdWUsIGluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIHNldENoaWxkRGF0YS5jYWxsKHRoaXMsIHZhbHVlU2V0LCBjaGlsZFZhbHVlLCBpbmRleCwgJ1skJF0nKTtcbiAgICAgICAgICAgICAgICB9LCB0aGlzKTtcblxuICAgICAgICAgICAgICAgIHZhciBsaXN0Q291bnQgPSBsaXN0RmFjZXQuY291bnQoKVxuICAgICAgICAgICAgICAgICAgICAsIHJlbW92ZUNvdW50ID0gbGlzdENvdW50IC0gdmFsdWUubGVuZ3RoO1xuXG4gICAgICAgICAgICAgICAgd2hpbGUgKHJlbW92ZUNvdW50LS0gPiAwKVxuICAgICAgICAgICAgICAgICAgICBsaXN0RmFjZXQuX3JlbW92ZUl0ZW0odmFsdWUubGVuZ3RoKTtcbiAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgIGxvZ2dlci53YXJuKCdEYXRhOiBzZXR0aW5nIGFycmF5IGRhdGEgd2l0aG91dCBMaXN0IGZhY2V0Jyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YWx1ZVNldCA9IHt9O1xuICAgICAgICAgICAgXy5lYWNoS2V5KHZhbHVlLCBmdW5jdGlvbihjaGlsZFZhbHVlLCBrZXkpIHtcbiAgICAgICAgICAgICAgICBzZXRDaGlsZERhdGEuY2FsbCh0aGlzLCB2YWx1ZVNldCwgY2hpbGRWYWx1ZSwga2V5LCAnLiQkJyk7XG4gICAgICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZVxuICAgICAgICB2YWx1ZVNldCA9IHRoaX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IHRoaXMgaGFjayBzZWVtcyB0byBiZSBubyBsb25nZXIgbmVlZGVkLi4uXG5cbiAgICBpZiAoISBhY2Nlc3NQYXRoKVxuICAgICAgICByZXR1cm4gdGhpcztcblxuICAgIHZhciBwYXJzZWRQYXRoID0gcGF0aFV0aWxzLnBhcnNlQWNjZXNzUGF0aChhY2Nlc3NQYXRoKTtcbiAgICB2YXIgY3VycmVudENvbXBvbmVudCA9IHRoaXMub3duZXI7XG5cbiAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gcGFyc2VkUGF0aC5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgICAgICB2YXIgcGF0aE5vZGUgPSBwYXJzZWRQYXRoW2ldXG4gICAgICAgICAgICAsIG5vZGVLZXkgPSBwYXRoVXRpbHMuZ2V0UGF0aE5vZGVLZXkocGF0aE5vZGUpO1xuICAgICAgICBpZiAocGF0aE5vZGUuc3ludGF4ID09ICdhcnJheScgJiYgY3VycmVudENvbXBvbmVudC5saXN0KSB7XG4gICAgICAgICAgICB2YXIgaXRlbUNvbXBvbmVudCA9IGN1cnJlbnRDb21wb25lbnQubGlzdC5pdGVtKG5vZGVLZXkpO1xuICAgICAgICAgICAgaWYgKCEgaXRlbUNvbXBvbmVudCAmJiBjcmVhdGVJdGVtICE9PSBmYWxzZSkge1xuICAgICAgICAgICAgICAgIGl0ZW1Db21wb25lbnQgPSBjdXJyZW50Q29tcG9uZW50Lmxpc3QuX2FkZEl0ZW0obm9kZUtleSk7XG4gICAgICAgICAgICAgICAgaXRlbUNvbXBvbmVudC5kYXRhLl9wYXRoID0gcGF0aE5vZGUucHJvcGVydHk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjdXJyZW50Q29tcG9uZW50ID0gaXRlbUNvbXBvbmVudDtcbiAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50Q29tcG9uZW50LmNvbnRhaW5lcilcbiAgICAgICAgICAgIGN1cnJlbnRDb21wb25lbnQgPSBjdXJyZW50Q29tcG9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AgICAgICAgICAgICByZXR1cm4gYWxsb3dDb21wcztcbiAgICAgICAgICAgIC8vIGNvbXBvbmVudCBjbGFzc1xuICAgICAgICAgICAgY2FzZSAnc3RyaW5nJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbWV0YSAmJiBtZXRhLmNvbXBDbGFzcyA9PSBhbGxvd0NvbXBzO1xuICAgICAgICAgICAgLy8gdGVzdCBmdW5jdGlvblxuICAgICAgICAgICAgY2FzZSAnZnVuY3Rpb24nOlxuICAgICAgICAgICAgICAgIHJldHVybiBhbGxvd0NvbXBzLmNhbGwodGhpcy5vd25lciwgbWV0YSwgZHQsIG9yaWdpbmFsRHJvcENvbXBvbmVudCk7XG4gICAgICAgICAgICBjYXNlICdvYmplY3QnOlxuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFsbG93Q29tcHMpKVxuICAgICAgICAgICAgICAgICAgICAvLyBsaXN0IG9mIGFsbG93ZWQgY2xhc3Nlc1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWxsb3dDb21wcy5pbmRleE9mKG1ldGEgJiYgbWV0YS5jb21wQ2xhc3MpID49IDA7XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG1hcCBvZiBjbGFzczogYm9vbGVhbnx0ZXN0IGZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgICAgIHZhciB0ZXN0ID0gYWxsb3dDb21wc1ttZXRhICYmIG1ldGEuY29tcENsYXNzXTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICEhIF8ucmVzdWx0KHRlc3QsIHRoaXMub3duZXIsIG1ldGEsIGR0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignSW5jb3JyZWN0IGFsbG93ZWQgY29tcG9uZW50cyBpbiBjb25maWcnKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4g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Jyk7XG4gICAgd3JhcEVsLmlubmVySFRNTCA9IGl0ZW1zSFRNTDtcblxuICAgIG1pbG9CaW5kZXIod3JhcEVsLCB0aGlzLm93bmVyLmNvbnRhaW5lci5zY29wZSk7XG4gICAgdmFyIGNoaWxkcmVuID0gZG9tVXRpbHMuY2hpbGRyZW4od3JhcEVsKTtcblxuICAgIGlmIChjb3VudCAhPSBjaGlsZHJlbi5sZW5ndGgpXG4gICAgICAgIGxvZ2dlci5lcnJvcignbnVtYmVyIG9mIGl0ZW1zIGFkZGVkIGlzIGRpZmZlcmVudCBmcm9tIHJlcXVlc3RlZCcpO1xuXG4gICAgaWYgKGNoaWxkcmVuICYmIGNoaWxkcmVuLmxlbmd0aCkge1xuICAgICAgICB2YXIgbGlzdExlbmd0aCA9IHRoaXMuY291bnQoKTtcbiAgICAgICAgdmFyIHNwbGljZUluZGV4ID0gaW5kZXggPCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB0eXBlb2YgaW5kZXggPT0gJ3VuZGVmaW5lZCcgfHwgaW5kZXggPiBsaXN0TGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbGlzdExlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGluZGV4O1xuXG4gICAgICAgIHZhciBwcmV2Q29tcG9uZW50ID0gc3BsaWNlSW5kZXggPT0gMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHRoaXMuaXRlbVNhbXBsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRoaXMuX2xpc3RJdGVtc1tzcGxpY2VJbmRleCAtIDFdO1xuXG4gICAgICAgIHZhciBmcmFnID0gZG9jdW1lbnQuY3JlYXRlRG9jdW1lbnRGcmFnbWVudCgpXG4gICAgICAgICAgICAsIG5ld0NvbXBvbmVudHMgPSBbXTtcblxuICAgICAgICBjaGlsZHJlbi5mb3JFYWNoKGZ1bmN0aW9uKGVsLCBpKSB7XG4gICAgICAgICAgICB2YXIgY29tcG9uZW50ID0gQ29tcG9uZW50LmdldENvbXBvbmVudChlbCk7XG4gICAgICAgICAgICBpZiAoISBjb21wb25lbnQpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGxvZ2dlci5lcnJvcignTGlzdDogZWxlbWVudCBpbiBuZXcgaXRlbXMgaXMgbm90IGEgY29tcG9uZW50Jyk7XG4gICAgICAgICAgICBuZXdDb21wb25lbnRzLnB1c2goY29tcG9uZW50KTtcbiAgICAgICAgICAgIHRoaXMuX3NldEl0ZW0oc3BsaWNlSW5kZXgrKywgY29tcG9uZW50KTtcbiAgICAgICAgICAgIGZyYWcuYXBwZW5kQ2hpbGQoZWwpO1xuICAgICAgICAgICAgZWwuc3R5bGUuZGlzcGxheSA9ICcnO1xuICAgICAgICB9LCB0aGlzKTtcblxuICAgICAgICBfdXBkYXRlSXRlbXNJbmRleGVzLmNhbGwodGhpcywgc3BsaWNlSW5kZXgpO1xuXG4gICAgICAgIGlmICghcHJldkNvbXBvbmVudC5lbC5wYXJlbnROb2RlKVxuICAgICAgICAgICAgcmV0dXJuIGxvZ2dlci53YXJuKCdsaXN0IGl0ZW0gc2FtcGxlIHdhcyByZW1vdmVkIGZyb20gRE9NLCBwcm9iYWJseSBjYXVzZWQgYnkgd3JvbmcgZGF0YS4gUmVzZXQgbGlzdCBkYXRhIHdpdGggYXJyYXknKTtcblxuICAgICAgICAvLyBBZGQgaXQgdG8gdGhlIERPTVxuICAgICAgICBwcmV2Q29tcG9uZW50LmRvbS5pbnNlcnRBZnRlcihmcmFnKTtcblxuICAgICAgICBfLmRlZmVyTWV0aG9kKG5ld0NvbXBvbmVudHMsICdmb3JFYWNoJywgZnVuY3Rpb24oY29tcCkge1xuICAgICAgICAgICAgY29tcC5icm9hZGNhc3QoJ3N0YXRlcmVhZHknKTtcbiAgICAgICAgfSk7XG4gICAgfVxufVxuXG5cbi8qKlxuICogTGl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wgQ29tcG9uZW50ID0gcmVxdWlyZSgnLi4vY19jbGFzcycpXG4gICAgLCB1bmlxdWVJZCA9IHJlcXVpcmUoJy4uLy4uL3V0aWwvdW5pcXVlX2lkJyk7XG5cbnZhciBUUkVFX1RFTVBMQVRFID0gJzx1bCBjbGFzcz1cIm1sLXVpLWZvbGR0cmVlLWxpc3RcIj5cXFxuICAgICAgICAgICAgICAgICAgICAgICAge3t+IGl0LmRhdGEuaXRlbXMgOml0ZW06aW5kZXggfX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7IHZhciBoYXNTdWJUcmVlID0gaXRlbS5pdGVtcyAmJiBpdGVtLml0ZW1zLmxlbmd0aDsgfX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxsaSB7ez8gaGFzU3ViVHJlZSB9fWNsYXNzPVwibWwtdWktZm9sZHRyZWUtLWhhcy1tdWx0aXBsZVwie3s/fX0+XFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cIm1sLXVpLWZvbGR0cmVlLWl0ZW1cIiBkYXRhLWl0ZW0taWQ9XCJ7ez0gaXQuaXRlbUlEc1tpbmRleF0gfX1cIj5cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3s/IGhhc1N1YlRyZWUgfX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJtbC11aS1mb2xkdHJlZS1idXR0b25cIj48L2Rpdj5cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3s/fX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3s9IGl0Lml0ZW1UZW1wbGF0ZSh7IGl0ZW06IGl0ZW0gfSkgfX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ez8gaGFzU3ViVHJlZSB9fVxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ez0gaXQudHJlZVRlbXBsYXRlKGl0ZW0pIH19XFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3s/fX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbGk+XFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHt7fn19XFxcbiAgICAgICAgICAgICAgICAgICAgPC91bD4nO1xuXG52YXIgREVGQVVMVF9DT01QSUxFRF9JVEVNX1RFTVBMQVRFID0gZG9ULmNvbXBpbGUoJ1xcXG4gICAgICAgICAgICA8c3BhbiBjbGFzcz1cIm1sLXVpLWZvbGR0cmVlLWxhYmVsXCI+XFxcbiAgICAgICAgICAgICAgICB7ez0gaXQuaXRlbS5sYWJlbCB9fVxcXG4gICAgICAgICAgICA8L3NwYW4+JylcbiAgICAsIENPTVBJTEVEX1RSRUVfVEVNUExBVEUgPSBkb1QuY29tcGlsZShUUkVFX1RFTVBMQVRFKTtcblxuXG52YXIgTUxGb2xkVHJlZSA9IENvbXBvbmVudC5jcmVhdGVDb21wb25lbnRDbGFzcygnTUxGb2xkVHJlZScsIHtcbiAgICBjb250YWluZXI6IHVuZGVmaW5lZCxcbiAgICBldmVudHM6IHtcbiAgICAgICAgbWVzc2FnZXM6IHtcbiAgICAgICAgICAgICdjbGljayBkYmxjbGljayc6IHsgc3Vic2NyaWJlcjogb25JdGVtRXZlbnQsIGNvbnRleHQ6ICdvd25lcicgfVxuICAgICAgICB9XG4gICAgfSxcbiAgICBkb206IHtcbiAgICAgICAgY2xzOiAnbWwtdWktZm9sZHRyZWUtbWFpbidcbiAgICB9XG59KTtcblxuY29tcG9uZW50c1JlZ2lzdHJ5LmFkZChNTEZvbGRUcmVlKTtcblxubW9kdWxlLmV4cG9ydHMgPSBNTEZvbGRUcmVlO1xuXG5fLmV4dGVuZFByb3RvKE1MRm9sZFRyZWUsIHtcbiAgICBzZXRJdGVtVGVtcGxhd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ICAgICAgICAgIDxkaXYgY2xhc3M9XCJtb2RhbC1oZWFkZXJcIj5cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7PyBpdC5jbG9zZS5idXR0b24gfX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YnV0dG9uIG1sLWJpbmQ9XCJbZXZlbnRzXTpjbG9zZUJ0blwiIHR5cGU9XCJidXR0b25cIiBjbGFzcz1cImNsb3NlXCI+JnRpbWVzOzwvYnV0dG9uPlxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge3s/fX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxoNCBjbGFzcz1cIm1vZGFsLXRpdGxlXCI+e3s9IGl0LnRpdGxlIH19PC9oND5cXFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxcbiAgICAgICAgICAgICAgICAgICAge3s/fX1cXFxuICAgICAgICAgICAgICAgICAgICB7ez8gaXQuaHRtbCB8fCBpdC50ZXh0IH19XFxcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJtb2RhbC1ib2R5XCIgbWwtYmluZD1cIltjb250YWluZXJdOmRpYWxvZ0JvZHlcIj5cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7PyBpdC5odG1sIH19XFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge3s9IGl0Lmh0bWwgfX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7Pz99fVxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwPnt7PSBpdC50ZXh0IH19PC9wPlxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge3s/fX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxcbiAgICAgICAgICAgICAgICAgICAge3s/fX1cXFxuICAgICAgICAgICAgICAgICAgICB7ez8gaXQuYnV0dG9ucyAmJiBpdC5idXR0b25zLmxlbmd0aCB9fVxcXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwibW9kYWwtZm9vdGVyXCI+XFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7e34gaXQuYnV0dG9ucyA6YnRuIH19XFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCJcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3M9XCJidG4gYnRuLXt7PSBidG4udHlwZSB9fXt7PyBidG4uY2xzIH19IHt7PSBidG4uY2xzIH19e3s/fX1cIlxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtbC1iaW5kPVwiW2V2ZW50c106e3s9IGJ0bi5uYW1lIH19XCI+e3s9IGJ0bi5sYWJlbCB9fTwvYnV0dG9uPlxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge3t+fX1cXFxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XFxcbiAgICAgICAgICAgICAgICAgICAge3s/fX1cXFxuICAgICAgICAgICAgICAgIDwvZGl2PlxcXG4gICAgICAgICAgICA8L2Rpdj4nXG4gICAgfVxufSk7XG5cbmNvbXBvbmVudHNSZWdpc3RyeS5hZGQoTUxEaWFsb2cpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IE1MRGlhbG9nO1xuXG5cbl8uZXh0ZW5kKE1MRGlhbG9nLCB7XG4gICAgY3JlYXRlRGlhbG9nOiBNTERpYWxvZyQkY3JlYXRlRGlhbG9nLFxuICAgIG9wZW5EaWFsb2c6IE1MRGlhbG9nJCRvcGVuRGlhbG9nLFxuICAgIGdldE9wZW5lZERpYWxvZzogTUxEaWFsb2ckJGdldE9wZW5lZERpYWxvZ1xufSk7XG5cblxuXy5leHRlbmRQcm90byhNTERpYWxvZywge1xuICAgIG9wZW5EaWFsb2c6IE1MRGlhbG9nJG9wZW5EaWFsb2csXG4gICAgY2xvc2VEaWFsb2c6IE1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gICAgICAgICAgIGNvbXBvbmVudE1ldGFSZWdleDogL154XFwtYXBwbGljYXRpb25cXC9taWxvXFwvY29tcG9uZW50XFwtbWV0YVxcLyhbYS16MC05XSspXFwvKFthLXowLTldKylcXC8oW2EtejAtOV0qKSQvLFxuICAgICAgICB9XG4gICAgfSxcbiAgICByZXF1ZXN0OiB7XG4gICAgICAgIGpzb25wVGltZW91dDogNjAwMDAsXG4gICAgICAgIGpzb25wQ2FsbGJhY2tQcmVmaXg6ICdfX19taWxvX2NhbGxiYWNrXycsXG4gICAgICAgIG9wdGlvbnNLZXk6ICdfX19taWxvX29wdGlvbnMnLFxuICAgICAgICBkZWZhdWx0czoge1xuICAgICAgICAgICAgdGltZW91dDogNjAwMDBcbiAgICAgICAgfVxuICAgIH0sXG4gICAgd2Vic29ja2V0OiB7XG4gICAgICAgIHJwYzoge1xuICAgICAgICAgICAgdGltZW91dDogMTUwMDAsXG4gICAgICAgICAgICByZXNwb25zZVByZWZpeDogJ3Jlc3BvbnNlXydcbiAgICAgICAgfVxuICAgIH0sXG4gICAgZGVwcmVjYXRpb25XYXJuaW5nOiAnb25jZSdcbn0pO1xuIiwiJ3VzZSBzdHJpY3QnO1xuXG5cbnZhciBtaWxvTWFpbCA9IHJlcXVpcmUoJy4vc2VydmljZXMvbWFpbCcpXG4gICAgLCByZXF1ZXN0ID0gcmVxdWlyZSgnLi91dGlsL3JlcXVlc3QnKVxuICAgICwgbWlsb0NvcmUgPSByZXF1aXJlKCdtaWxvLWNvcmUnKVxuICAgICwgbG9nZ2VyID0gbWlsb0NvcmUudXRpbC5sb2dnZXJcbiAgICAsIF8gPSBtaWxvQ29yZS5wcm90b1xuICAgICwgdXRpbERvbSA9IHJlcXVpcmUoJy4vdXRpbC9kb20nKVxuICAgICwgY29uZmlnID0gcmVxdWlyZSgnLi9jb25maWcnKVxuICAgICwgTG9hZEF0dHJpYnV0ZSA9IHJlcXVpcmUoJy4vYXR0cmlidXRlcy9hX2xvYWQnKTtcblxuXG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BmdW5jdGlvbihieXRlKSB7XG4gICAgICAgIC8vIGNvZXJjZSB0aGUgYnl0ZSB0byBhbiBpbnRcbiAgICAgICAgaWYgKHR5cGVvZiBieXRlID09ICdzdHJpbmcnKSBieXRlID0gYnl0ZS5jaGFyQ29kZUF0KDApXG5cbiAgICAgICAgaWYgKHNraXAgPCAwKSB7IC8vIHdlIGhhdmUgYSBjYXJyeSBmcm9tIHRoZSBwcmV2aW91cyBieXRlXG4gICAgICAgICAgICBiaXRzIHw9IChieXRlID4+ICgtc2tpcCkpXG4gICAgICAgIH0gZWxzZSB7IC8vIG5vIGNhcnJ5XG4gICAgICAgICAgICBiaXRzID0gKGJ5dGUgPDwgc2tpcCkgJiAyNDhcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChza2lwID4gMykge1xuICAgICAgICAgICAgLy8gbm90IGVub3VnaCBkYXRhIHRvIHByb2R1Y2UgYSBjaGFyYWN0ZXIsIGdldCB1cyBhbm90aGVyIG9uZVxuICAgICAgICAgICAgc2tpcCAtPSA4XG4gICAgICAgICAgICByZXR1cm4gMVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHNraXAgPCA0KSB7XG4gICAgICAgICAgICAvLyBwcm9kdWNlIGEgY2hhcmFjdGVyXG4gICAgICAgICAgICB0aGlzLm91dHB1dCArPSBhbHBoYWJldFtiaXRzID4+IDNdXG4gICAgICAgICAgICBza2lwICs9IDVcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiAwXG4gICAgfVxuXG4gICAgLy8gRmx1c2ggYW55IHJlbWFpbmluZyBiaXRzIGxlZnQgaW4gdGhlIHN0cmVhbVxuICAgIHRoaXMuZmluaXNoID0gZnVuY3Rpb24oY2hlY2spIHtcbiAgICAgICAgdmFyIG91dHB1dCA9IHRoaXMub3V0cHV0ICsgKHNraXAgPCAwID8gYWxwaGFiZXRbYml0cyA+PiAzXSA6ICcnKSArIChjaGVjayA/ICckJyA6ICcnKVxuICAgICAgICB0aGlzLm91dHB1dCA9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FxuICAgICAgICAgICAgICAgICAgICBwYXRoOiB0YXJnZXRQYXRoXG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICB0cmFuc2xhdGVEYXRhKHNvdXJjZVBhdGgsIGNoYW5nZSk7XG4gICAgICAgICAgICAgICAgdmFsaWRhdGVEYXRhKHNvdXJjZVBhdGgsIGNoYW5nZSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKCEgY2hhbmdlc1F1ZXVlLmxlbmd0aClcbiAgICAgICAgICAgICAgICBfLmRlZmVyKHBvc3RDaGFuZ2VEYXRhKTtcblxuICAgICAgICAgICAgY2hhbmdlc1F1ZXVlLnB1c2goc2VuZERhdGEpO1xuXG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIHRyYW5zbGF0ZVBhdGgoc291cmNlUGF0aCkge1xuICAgICAgICAgICAgICAgIGlmIChwYXRoVHJhbnNsYXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRyYW5zbGF0ZWRQYXRoID0gcGF0aFRyYW5zbGF0aW9uW3NvdXJjZVBhdGhdO1xuICAgICAgICAgICAgICAgICAgICBpZiAodHJhbnNsYXRlZFBhdGgpIHJldHVybiB0cmFuc2xhdGVkUGF0aDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwYXR0ZXJuVHJhbnNsYXRpb24ubGVuZ3RoKSByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIHZhciBwdCA9IF8uZmluZChwYXR0ZXJuVHJhbnNsYXRpb24sIGZ1bmN0aW9uKHBUcmFuc2xhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBUcmFuc2xhdGlvbi5mcm9tUGF0dGVybi50ZXN0KHNvdXJjZVBhdGgpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwdCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdHJhbnNsYXRlZFBhdGggPSBzb3VyY2VQYXRoLnJlcGxhY2UocHQuZnJvbVN0YXRpY1BhdGgsIHB0LnRvU3RhdGljUGF0aCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICghICgoc3Vic2NyaXB0aW9uUGF0dGVybiBpbnN0YW5jZW9mIFJlZ0V4cFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgc3Vic2NyaXB0aW9uUGF0dGVybi50ZXN0KHNvdXJjZVBhdGgpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfHwgc3Vic2NyaXB0aW9uUGF0dGVybiA9PSBzb3VyY2VQYXRoKSkgcmV0dXJuO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRyYW5zbGF0ZWRQYXRoIHx8IHNvdXJjZVBhdGg7XG4gICAgICAgICAgICB9XG5cblxuICAgICAgICAgICAgZnVuY3Rpb24gdHJhbnNsYXRlRGF0YShzb3VyY2VQYXRoLCBjaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoZGF0YVRyYW5zbGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0cmFuc2xhdGUgPSBkYXRhVHJhbnNsYXRpb25bc291cmNlUGF0aF07XG4gICAgICAgICAgICAgICAgICAgIGlmICh0cmFuc2xhdGUgJiYgdHlwZW9mIHRyYW5zbGF0ZSA9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFuZ2Uub2xkVmFsdWUgPSB0cmFuc2xhdGUoY2hhbmdlLm9sZFZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5nZS5uZXdWYWx1ZSA9IHRyYW5zbGF0ZShjaGFuZ2UubmV3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgXG4gICAgICAgICAgICBmdW5jdGlvbiB2YWxpZGF0ZURhdGEoc291cmNlUGF0aCwgY2hhbmdlKSB7XG4gICAgICAgICAgICAgICAgcHJvcGFnYXRlRGF0YShjaGFuZ2UpO1xuXG4gICAgICAgICAgICAgICAgaWYgKGRhdGFWYWxpZGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciB2YWxpZGF0b3JzID0gZGF0YVZhbGlkYXRpb25bc291cmNlUGF0aF1cbiAgICAgICAgICAgICAgICAgICAgICAgICwgcGFzc2VkQ291bnQgPSAwXG4gICAgICAgICAgICAgICAgICAgICAgICAsIGFscmVhZHlGYWlsZWQgPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAodmFsaWRhdG9ycylcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkYXRvcnMuZm9yRWFjaChjYWxsVmFsaWRhdG9yKTsgICBcbiAgICAgICAgICAgICAgICB9XG5cblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNhbGxWYWxpZGF0b3IodmFsaWRhdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbGlkYXRvcihjaGFuZ2UubmV3VmFsdWUsIGZ1bmN0aW9uKGVyciwgcmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlLnBhdGggPSBzb3VyY2VQYXRoO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEgYWxyZWFkeUZhaWxlZCAmJiAoZXJyIHx8IHJlc3BvbnNlLnZhbGlkKSAmJiArK3Bhc3NlZENvdW50ID09IHZhbGlkYXRvcnMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbURTLnBvc3RNZXNzYWdlKCd2YWxpZGF0ZWQnLCByZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCEgcmVzcG9uc2UudmFsaWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHJlYWR5RmFpbGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tRFMucG9zdE1lc3NhZ2UoJ3ZhbGlkYXRlZCcsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIHByb3BhZ2F0ZURhdGEoY2hhbmdlKSB7XG4gICAgICAgICAgICAgICAgc2VuZERhdGEuY2hhbmdlcy5wdXNoKGNoYW5nZSk7XG4gICAgICAgICAgICB9XG5cblxuICAgICAgICAgICAgZnVuY3Rpb24gcG9zdENoYW5nZURhdGEoKSB7XG4gICAgICAgICAgICAgICAgLy8gcHJldmVudCBlbmRsZXNzIGxvb3Agb2YgdXBkYXRlcyBmb3IgMi13YXkgY29ubmVjdGlvblxuICAgICAgICAgICAgICAgIGlmIChzZWxmW3JldmVyc2VMaW5rXSkgdmFyIGNhbGxiYWNrID0gc3Vic2NyaXB0aW9uU3dpdGNoO1xuXG4gICAgICAgICAgICAgICAgdmFyIHRyYW5zYWN0aW9ucyA9IG1lcmdlVHJhbnNhY3Rpb25zKGNoYW5nZXNRdWV1ZSk7XG4gICAgICAgICAgICAgICAgY2hhbmdlc1F1ZXVlLmxlbmd0aCA9IDA7XG4gICAgICAgICAgICAgICAgdHJhbnNhY3Rpb25zLmZvckVhY2goZnVuY3Rpb24odHJhbnNhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gc2VuZCBkYXRhIGNoYW5nZSBpbnN0cnVjdGlvbiBhcyBtZXNzYWdlXG4gICAgICAgICAgICAgICAgICAgIHRvRFMucG9zdE1lc3NhZ2VTeW5jKCdjaGFuZ2VkYXRhJywgeyBjaGFuZ2VzOiB0cmFuc2FjdGlvbiB9LCBjYWxsYmFjayk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cblxuICAgICAgICAgICAgZnVuY3Rpb24gc3Vic2NyaXB0aW9uU3dpdGNoKGVyciwgY2hhbmdlRmluaXNoZWQpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSByZXR1cm47XG4gICAgICAgICAgICAgICAgdmFyIG9uT2ZmID0gY2hhbmdlRmluaXNoZWQgPyAnb25TeW5jJyA6ICdvZmYnO1xuICAgICAgICAgICAgICAgIHRvRFNbb25PZmZdKCdkYXRhY2hhbmdlcycsIHNlbGZbcmV2ZXJzZUxpbmtdKTtcblxuICAgICAgICAgICAgICAgIHZhciBtZXNzYWdlID0gY2hhbmdlRmluaXNoZWQgPyAnY2hhbmdlY29tcGxldGVkJyA6ICdjaGFuZ2VzdGFydGVkJztcbiAgICAgICAgICAgICAgICBzZWxmLnBvc3RNZXNzYWdlKG1lc3NhZ2UsIHsgc291cmNlOiBmcm9tRFMsIHRhcmdldDogdG9EUyB9KTtcbiAgICAgICAgICAgIH1cblxuXG4gICAgICAgICAgICBmdW5jdGlvbiBtZXJnZVRyYW5zYWN0aW9ucyhiYXRjaGVzKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRyYW5zYWN0aW9ucyA9IFtdXG4gICAgICAgICAgICAgICAgICAgICwgY3VycmVudFRyYW5zYWN0aW9uO1xuXG4gICAgICAgICAgICAgICAgYmF0Y2hlcy5mb3JFYWNoKGZ1bmN0aW9uKGJhdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghIGJhdGNoLnRyYW5zYWN0aW9uKSBjdXJyZW50VHJhbnNhY3Rpb24gPSB1bmRlZmluZWQ7XG4gICAgICAgICAgICAgICAgICAgIGlmICghIGJhdGNoLmNoYW5nZXMubGVuZ3RoKSByZXR1cm47XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGJhdGNoLnRyYW5zYWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VycmVudFRyYW5zYWN0aW9uKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8uYXBwZW5kQ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dGhTeW50YXggPSAnXFxcXC5bQS1aYS16Xy1dW0EtWmEtejAtOV8tXSonXG4gICAgLCBhcnJheVBhdGhTeW50YXggPSAnXFxcXFtbMC05XStcXFxcXSdcbiAgICAsIGludGVycG9sYXRpb25TeW50YXggPSAnXFxcXCRbMS05XVswLTldKidcbiAgICAsIHByb3BlcnR5SW50ZXJwb2xhdGVTeW50YXggPSAnXFxcXC4nICsgaW50ZXJwb2xhdGlvblN5bnRheFxuICAgICwgYXJyYXlJbnRlcnBvbGF0ZVN5bnRheCA9ICdcXFxcWycgKyBpbnRlcnBvbGF0aW9uU3ludGF4ICsgJ1xcXFxdJ1xuXG4gICAgLCBwcm9wZXJ0eVN0YXJTeW50YXggPSAnXFxcXC5cXFxcKidcbiAgICAsIGFycmF5U3RhclN5bnRheCA9ICdcXFxcW1xcXFwqXFxcXF0nXG4gICAgLCBzdGFyU3ludGF4ID0gJ1xcXFwqJ1xuXG4gICAgLCBwYXRoUGFyc2VTeW50YXggPSBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcGVydHlQYXRoU3ludGF4LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFycmF5UGF0aFN5bnRheCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eUludGVycG9sYXRlU3ludGF4LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFycmF5SW50ZXJwb2xhdGVTeW50YXhcbiAgICAgICAgICAgICAgICAgICAgICAgIF0uam9pbignfCcpXG4gICAgLCBwYXRoUGFyc2VQYXR0ZXJuID0gbmV3IFJlZ0V4cChwYXRoUGFyc2VTeW50YXgsICdnJylcblxuICAgICwgcGF0dGVyblBhdGhQYXJzZVN5bnRheCA9ICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRoUGFyc2VTeW50YXgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eVN0YXJTeW50YXgsXG4gIC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KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIGFkZE1lc3NhZ2UodmFsdWUsIGtleSwgcGF0aFN5bnRheCkge1xuICAgICAgICAgICAgdmFyIHBhdGggPSBwYXRoU3ludGF4LnJlcGxhY2UoJyQkJywga2V5KVxuICAgICAgICAgICAgICAgICwgZXhpc3RpbmdNc2cgPSBtZXNzYWdlc0hhc2hbcGF0aF07XG5cbiAgICAgICAgICAgIGlmIChleGlzdGluZ01zZykge1xuICAgICAgICAgICAgICAgIGlmIChleGlzdGluZ01zZy50eXBlID09IG1zZ1R5cGUpXG4gICAgICAgICAgICAgICAgICAgIGxvZ2dlci5lcnJvcignc2V0dGVyIGVycm9yOiBzYW1lIG1lc3NhZ2UgdHlwZSBwb3N0ZWQgb24gdGhlIHNhbWUgcGF0aCcpO1xuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBleGlzdGluZ01zZy50eXBlID0gJ2NoYW5nZWQnO1xuICAgICAgICAgICAgICAgICAgICBleGlzdGluZ01zZ1t2YWx1ZVByb3BdID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgbXNnID0geyBwYXRoOiBwYXRoLCB0eXBlOiBtc2dUeXBlIH07XG4gICAgICAgICAgICAgICAgbXNnW3ZhbHVlUHJvcF0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICBhZGRDaGFuZ2VNZXNzYWdlKG1lc3NhZ2VzLCBtZXNzYWdlc0hhc2gsIG1zZyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh2YWx1ZUlzVHJlZSh2YWx1ZSkpXG4gICAgICAgICAgICAgICAgX2FkZE1lc3NhZ2VzKHBhdGgsIHZhbHVlKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGNsb25lVHJlZSh2YWx1ZSk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J5IHtcbiAgICAgICAgICAgIGlmIChyZXF1aXJlZFBhdHRlcm5zLmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgICAgICAgICBjaGVja1N1YnRyZWUoc3ViVmFsdWUsIHJlcXVpcmVkUGF0dGVybnNba2V5XSk7XG4gICAgICAgICAgICAgICAgZGVsZXRlIHJlcXVpcmVkUGF0dGVybnNba2V5XTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAob3B0aW9uYWxQYXR0ZXJucy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgY2hlY2tTdWJ0cmVlKHN1YlZhbHVlLCBvcHRpb25hbFBhdHRlcm5zW2tleV0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoIXVua25vd25LZXlzQWxsb3dlZClcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IE1hdGNoLkVycm9yKFwiVW5rbm93biBrZXlcIik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgaWYgKGVyciBpbnN0YW5jZW9mIE1hdGNoLkVycm9yKVxuICAgICAgICAgICAgICAgIGVyci5wYXRoID0gX3ByZXBlbmRQYXRoKGtleSwgZXJyLnBhdGgpO1xuICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICB9XG4gICAgfSwgdGhpcywgdHJ1ZSk7XG5cbiAgICBfLmVhY2hLZXkocmVxdWlyZWRQYXR0ZXJucywgZnVuY3Rpb24odmFsdWUsIGtleSkge1xuICAgICAgICB0aHJvdyBuZXcgTWF0Y2guRXJyb3IoXCJNaXNzaW5nIGtleSAnXCIgKyBrZXkgKyBcIidcIik7XG4gICAgfSwgdGhpcywgdHJ1ZSk7XG59O1xuXG5cbnZhciBfanNLZXl3b3JkcyA9IFtcImRvXCIsIFwiaWZcIiwgXCJpblwiLCBcImZvclwiLCBcImxldFwiLCBcIm5ld1wiLCBc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jZSh3YWl0LCBpbW1lZGlhdGUpIHtcbiAgICB2YXIgZnVuYyA9IHRoaXM7IC8vIGZpcnN0IHBhcmFtZXRlciBvZiBfLmRlYm91bmNlXG4gICAgdmFyIHRpbWVvdXQsIGFyZ3MsIGNvbnRleHQsIHRpbWVzdGFtcCwgcmVzdWx0O1xuICAgIHJldHVybiBmdW5jdGlvbigpIHtcbiAgICAgICAgY29udGV4dCA9IHRoaXM7IC8vIHN0b3JlIG9yaWdpbmFsIGNvbnRleHRcbiAgICAgICAgYXJncyA9IGFyZ3VtZW50cztcbiAgICAgICAgdGltZXN0YW1wID0gRGF0ZS5ub3coKTtcbiAgICAgICAgdmFyIGNhbGxOb3cgPSBpbW1lZGlhdGUgJiYgISB0aW1lb3V0O1xuICAgICAgICBpZiAoISB0aW1lb3V0KVxuICAgICAgICAgICAgdGltZW91dCA9IHNldFRpbWVvdXQobGF0ZXIsIHdhaXQpO1xuICAgICAgICBpZiAoY2FsbE5vdylcbiAgICAgICAgICAgIHJlc3VsdCA9IGZ1bmMuYXBwbHkoY29udGV4dCwgYXJncyk7XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG5cbiAgICAgICAgZnVuY3Rpb24gbGF0ZXIoKSB7XG4gICAgICAgICAgICB2YXIgbGFzdCA9IERhdGUubm93KCkgLSB0aW1lc3RhbXA7XG4gICAgICAgICAgICBpZiAobGFzdCA8IHdhaXQpXG4gICAgICAgICAgICAgICAgdGltZW91dCA9IHNldFRpbWVvdXQobGF0ZXIsIHdhaXQgLSBsYXN0KTtcbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHRpbWVvdXQgPSBudWxsO1xuICAgICAgICAgICAgICAgIGlmICghIGltbWVkaWF0ZSlcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gZnVuYy5hcHBseShjb250ZXh0LCBhcmdzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG59XG5cblxuLyoqXG4gKiBSZXR1cm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T09IG9iaikgcmV0dXJuIHRoaXMgIT09IDAgfHwgMS90aGlzID09IDEvb2JqOyAvLyAwIGFuZCAtMCBhcmUgY29uc2lkZXJlZCBub3QgZXF1YWwsIGFsdGhvdWdoIDAgPT09IC0wIGlzIHRydWVcbiAgICBpZiAodGhpcyA9PSBudWxsIHx8IG9iaiA9PSBudWxsKSByZXR1cm4gZmFsc2U7XG4gICAgdmFyIGNsYXNzTmFtZSA9IHRoaXMuY29uc3RydWN0b3IubmFtZTtcbiAgICBpZiAoY2xhc3NOYW1lICE9IG9iai5jb25zdHJ1Y3Rvci5uYW1lKSByZXR1cm4gZmFsc2U7XG4gICAgc3dpdGNoIChjbGFzc05hbWUpIHtcbiAgICAgICAgY2FzZSAnU3RyaW5nJzpcbiAgICAgICAgICAgIHJldHVybiB0aGlzID09IFN0cmluZyhvYmopO1xuICAgICAgICBjYXNlICdOdW1iZXInOlxuICAgICAgICAgICAgcmV0dXJuIHRoaXMgIT0gK3RoaXMgPyBvYmogIT0gK29iaiA6ICh0aGlzID09IDAgPyAxL3RoaXMgPT0gMS9vYmogOiB0aGlzID09ICtvYmopO1xuICAgICAgICBjYXNlICdEYXRlJzpcbiAgICAgICAgY2FzZSAnQm9vbGVhbic6XG4gICAgICAgICAgICByZXR1cm4gK3RoaXMgPT0gK29iajtcbiAgICAgICAgY2FzZSAnUmVnRXhwJzpcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnNvdXJjZSA9PSBvYmouc291cmNlXG4gICAgICAgICAgICAgICAgICAgICYmIHRoaXMuZ2xvYmFsID09IG9iai5nbG9iYWxcbiAgICAgICAgICAgICAgICAgICAgJiYgdGhpcy5tdWx0aWxpbmUgPT0gb2JqLm11bHRpbGluZVxuICAgICAgICAgICAgICAgICAgICAmJiB0aGlzLmlnbm9yZUNhc2UgPT0gb2JqLmlnbm9yZUNhc2U7XG4gICAgfVxuICAgIGlmICh0eXBlb2YgdGhpcyAhPSAnb2JqZWN0JyB8fCB0eXBlb2Ygb2Jq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vciBpbmRleCBhbmQgbm90IGZvdW5kLCByZXR1cm4gLTFcbiAgICAgICAgZWxzZSBpZiAoYXJnSW5kZXggJiYgc29tZU1ldGhvZCA9PSBBcnJheS5wcm90b3R5cGUuc29tZSlcbiAgICAgICAgICAgIHJldHVybiAtMTtcblxuICAgICAgICBmdW5jdGlvbiB0ZXN0SXRlbSh2YWx1ZSwgaW5kZXgsIHNlbGYpIHtcbiAgICAgICAgICAgIHZhciB0ZXN0ID0gY2FsbGJhY2suY2FsbCh0aGlzLCB2YWx1ZSwgaW5kZXgsIHNlbGYpO1xuICAgICAgICAgICAgaWYgKHRlc3QpIHtcbiAgICAgICAgICAgICAgICBmb3VuZFZhbHVlT3JJbmRleCA9IGFyZ3VtZW50c1thcmdJbmRleF1cbiAgICAgICAgICAgICAgICByZXR1cm4gdGVzdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cbiJdfQ== -; \ No newline at end of file + +; +//# sourceMappingURL=milo.bundle.map \ No newline at end of file diff --git a/dist/milo.bundle.map b/dist/milo.bundle.map index dac6d35..92a48df 100644 --- a/dist/milo.bundle.map +++ b/dist/milo.bundle.map @@ -1,142 +1,142 @@ { "version": 3, "sources": [ - "/Users/richardwalton/Work/CC/milo/lib/abstract/facet.js", - "/Users/richardwalton/Work/CC/milo/lib/abstract/faceted_object.js", - "/Users/richardwalton/Work/CC/milo/lib/abstract/registry.js", - "/Users/richardwalton/Work/CC/milo/lib/attributes/a_bind.js", - "/Users/richardwalton/Work/CC/milo/lib/attributes/a_class.js", - "/Users/richardwalton/Work/CC/milo/lib/attributes/a_load.js", - "/Users/richardwalton/Work/CC/milo/lib/attributes/index.js", - "/Users/richardwalton/Work/CC/milo/lib/binder.js", - "/Users/richardwalton/Work/CC/milo/lib/classes.js", - "/Users/richardwalton/Work/CC/milo/lib/command/actions_history.js", - "/Users/richardwalton/Work/CC/milo/lib/command/cmd_registry.js", - "/Users/richardwalton/Work/CC/milo/lib/command/index.js", - "/Users/richardwalton/Work/CC/milo/lib/command/transaction.js", - "/Users/richardwalton/Work/CC/milo/lib/command/transaction_history.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_class.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facet.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Container.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Css.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Data.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Dom.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Drag.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Drop.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Events.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Frame.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Item.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/List.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/ModelFacet.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Options.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Template.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/Transfer.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_facets/cf_registry.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_info.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_registry.js", - "/Users/richardwalton/Work/CC/milo/lib/components/c_utils.js", - "/Users/richardwalton/Work/CC/milo/lib/components/classes/View.js", - "/Users/richardwalton/Work/CC/milo/lib/components/msg_api/data.js", - "/Users/richardwalton/Work/CC/milo/lib/components/msg_api/de_data.js", - "/Users/richardwalton/Work/CC/milo/lib/components/msg_api/drop.js", - "/Users/richardwalton/Work/CC/milo/lib/components/msg_src/dom_events.js", - "/Users/richardwalton/Work/CC/milo/lib/components/msg_src/frame.js", - "/Users/richardwalton/Work/CC/milo/lib/components/scope.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Button.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Combo.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/ComboList.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Date.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/DropTarget.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/FoldTree.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Group.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Hyperlink.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Image.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Input.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/InputList.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/List.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/ListItem.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/RadioGroup.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Select.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/SuperCombo.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Text.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Textarea.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Time.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/Wrapper.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/bootstrap/Alert.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/bootstrap/Dialog.js", - "/Users/richardwalton/Work/CC/milo/lib/components/ui/bootstrap/Dropdown.js", - "/Users/richardwalton/Work/CC/milo/lib/config.js", - "/Users/richardwalton/Work/CC/milo/lib/loader.js", - "/Users/richardwalton/Work/CC/milo/lib/milo.js", - "/Users/richardwalton/Work/CC/milo/lib/registry.js", - "/Users/richardwalton/Work/CC/milo/lib/services/de_constrs.js", - "/Users/richardwalton/Work/CC/milo/lib/services/dom_source.js", - "/Users/richardwalton/Work/CC/milo/lib/services/mail/index.js", - "/Users/richardwalton/Work/CC/milo/lib/services/mail/mail_api.js", - "/Users/richardwalton/Work/CC/milo/lib/services/mail/mail_source.js", - "/Users/richardwalton/Work/CC/milo/lib/services/window.js", - "/Users/richardwalton/Work/CC/milo/lib/use_components.js", - "/Users/richardwalton/Work/CC/milo/lib/use_facets.js", - "/Users/richardwalton/Work/CC/milo/lib/util/component_name.js", - "/Users/richardwalton/Work/CC/milo/lib/util/create_component_class.js", - "/Users/richardwalton/Work/CC/milo/lib/util/create_facet_class.js", - "/Users/richardwalton/Work/CC/milo/lib/util/deprecate.js", - "/Users/richardwalton/Work/CC/milo/lib/util/dom.js", - "/Users/richardwalton/Work/CC/milo/lib/util/dom_listeners.js", - "/Users/richardwalton/Work/CC/milo/lib/util/domready.js", - "/Users/richardwalton/Work/CC/milo/lib/util/dragdrop.js", - "/Users/richardwalton/Work/CC/milo/lib/util/error.js", - "/Users/richardwalton/Work/CC/milo/lib/util/fragment.js", - "/Users/richardwalton/Work/CC/milo/lib/util/index.js", - "/Users/richardwalton/Work/CC/milo/lib/util/json_parse.js", - "/Users/richardwalton/Work/CC/milo/lib/util/request.js", - "/Users/richardwalton/Work/CC/milo/lib/util/selection/index.js", - "/Users/richardwalton/Work/CC/milo/lib/util/storage/index.js", - "/Users/richardwalton/Work/CC/milo/lib/util/storage/model.js", - "/Users/richardwalton/Work/CC/milo/lib/util/storage/msg_src.js", - "/Users/richardwalton/Work/CC/milo/lib/util/unique_id.js", - "/Users/richardwalton/Work/CC/milo/lib/util/websocket/index.js", - "/Users/richardwalton/Work/CC/milo/lib/util/websocket/msg_api.js", - "/Users/richardwalton/Work/CC/milo/lib/util/websocket/msg_src.js", - "/Users/richardwalton/Work/CC/milo/node_modules/base32/lib/base32.js", - "/Users/richardwalton/Work/CC/milo/node_modules/browserify/node_modules/browser-builtins/builtin/fs.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/abstract/mixin.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/classes.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/config.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/messenger/index.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/messenger/m_api.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/messenger/m_api_rx.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/messenger/m_source.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/messenger/msngr_source.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/milo-core.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/minder.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/model/change_data.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/model/connector.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/model/index.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/model/m_msg_api.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/model/m_path.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/model/model_utils.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/model/path_msg_api.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/model/path_utils.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/model/synthesize/index.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/util/check.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/util/index.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/util/logger.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/lib/util/logger_class.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/dot/doT.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/dot/index.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_array.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_function.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_number.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_object.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_prototype.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_string.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_util.js", - "/Users/richardwalton/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/utils.js" + "/Users/evgenypoberezkin/Work/CC/milo/lib/abstract/facet.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/abstract/faceted_object.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/abstract/registry.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/attributes/a_bind.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/attributes/a_class.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/attributes/a_load.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/attributes/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/binder.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/classes.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/command/actions_history.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/command/cmd_registry.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/command/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/command/transaction.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/command/transaction_history.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_class.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facet.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Container.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Css.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Data.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Dom.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Drag.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Drop.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Events.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Frame.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Item.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/List.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/ModelFacet.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Options.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Template.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/Transfer.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_facets/cf_registry.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_info.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_registry.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/c_utils.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/classes/View.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/msg_api/data.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/msg_api/de_data.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/msg_api/drop.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/msg_src/dom_events.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/msg_src/frame.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/scope.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Button.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Combo.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/ComboList.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Date.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/DropTarget.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/FoldTree.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Group.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Hyperlink.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Image.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Input.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/InputList.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/List.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/ListItem.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/RadioGroup.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Select.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/SuperCombo.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Text.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Textarea.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Time.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/Wrapper.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/bootstrap/Alert.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/bootstrap/Dialog.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/components/ui/bootstrap/Dropdown.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/config.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/loader.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/milo.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/registry.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/services/de_constrs.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/services/dom_source.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/services/mail/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/services/mail/mail_api.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/services/mail/mail_source.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/services/window.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/use_components.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/use_facets.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/component_name.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/create_component_class.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/create_facet_class.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/deprecate.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/dom.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/dom_listeners.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/domready.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/dragdrop.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/error.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/fragment.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/json_parse.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/request.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/selection/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/storage/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/storage/model.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/storage/msg_src.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/unique_id.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/websocket/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/websocket/msg_api.js", + "/Users/evgenypoberezkin/Work/CC/milo/lib/util/websocket/msg_src.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/base32/lib/base32.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/browserify/node_modules/browser-builtins/builtin/fs.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/abstract/mixin.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/classes.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/config.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/messenger/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/messenger/m_api.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/messenger/m_api_rx.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/messenger/m_source.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/messenger/msngr_source.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/milo-core.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/minder.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/model/change_data.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/model/connector.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/model/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/model/m_msg_api.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/model/m_path.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/model/model_utils.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/model/path_msg_api.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/model/path_utils.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/model/synthesize/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/util/check.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/util/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/util/logger.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/lib/util/logger_class.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/dot/doT.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/dot/index.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_array.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_function.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_number.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_object.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_prototype.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_string.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_util.js", + "/Users/evgenypoberezkin/Work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/utils.js" ], "names": [], - "mappings": ";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACx5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACloBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", + "mappings": ";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACx5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACloBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnMA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA", "file": "generated.js", "sourceRoot": "", "sourcesContent": [ @@ -157,7 +157,7 @@ "'use strict';\n\n\nvar FacetedObject = require('../abstract/faceted_object')\n , facetsRegistry = require('./c_facets/cf_registry')\n , ComponentFacet = facetsRegistry.get('ComponentFacet')\n , componentUtils = require('./c_utils')\n , miloCore = require('milo-core')\n , Messenger = miloCore.Messenger\n , _ = miloCore.proto\n , check = miloCore.util.check\n , Match = check.Match\n , config = require('../config')\n , miloComponentName = require('../util/component_name')\n , logger = miloCore.util.logger\n , domUtils = require('../util/dom')\n , BindAttribute = require('../attributes/a_bind')\n , Scope = require('./scope')\n , DOMStorage = require('../util/storage');\n\nvar _makeComponentConditionFunc = componentUtils._makeComponentConditionFunc;\n\n\n/**\n * `milo.Component`\n * Base Component class. Subclass of [FacetedObject](../abstract/faceted_object.js.html), but none of this class methods should be directly used with component.\n * Its constructor passes its parameters, including its [scope](./scope.js.html), DOM element and name to [`init`](#init) method.\n * The constructor of Component class rarely needs to be used directly, as [milo.binder](../binder.js.html) creates components when it scans DOM tree.\n * [`Component.createComponentClass`](#createComponentClass) should be used to create a subclass of Component class with configured facets.\n *\n *\n * ####Component instance properties####\n *\n * - el - DOM element that component is attached to. If the second component is attached to the same DOM element, the warning will be logged to console. To get component reference from DOM element use [Component.getComponent](./c_utils.js.html#getComponent) class method. To inspect component via element in browser check `___milo_component` property of element (property name be changed using `milo.config`).\n * - scope - parent scope object, an instance of [Scope](./scope.js.html) class. To get parent component use [getScopeParent](#Component$getScopeParent) instance method of component. The actual path to get parent of conponent is `component.scope._hostObject.owner`, where `_hostObject` refers to [Container](c_facets/Container.js.html) facet of parent component and `owner` to the parent itself. The children of component are accessible via the scope of its container facet: `component.container.scope`. The scope hierarchy can be the same or different as the DOM hierarchy - DOM children of the component will be on the same scope as component if it does not have `Container` facet and in the scope of its Container facet if it has it. See [Scope](./scope.js.html).\n * - name - the name of component, should be unique for the scope where component belongs. To find component in scope the component's name should be used as property of scope object. See [Scope](./scope.js.html).\n * - facets - map of references of all component's facets (facet names are lowercase in this map). All facets can be accessed directly as properties of component, this property can be used to iterate facets (it is used in this way in [allFacets](#Component$allFacets) component's instance method that allows to call method with the same name on all facets).\n * - extraFacets - an array of names of facets that are added to component and do not form the part of component's class.\n * - _messenger - the reference to component's [messenger](../messenger/index.js.html). Rarely needs to be used directly as all commonly used methods of mesenger are available directly on component.\n *\n *\n * ####Component events####\n *\n * - 'childrenbound' - synchronously dispatched when children of DOM element which compnent is connected to are connected to components. The event is dispatched when component is created with `milo.binder` (as is almost always the case, as all Component class methods that create/copy components use `milo.binder` internally - component constructor and Component.create methods are not used in framework outside of `milo.binder` and rarely if ever need to be used in aplication).\n * - 'addedtoscope' - synchronously dispatched when component is added to scope.\n * - 'stateready' - aynchronously dispatched when component (together with its scope children) is created with [Component.createFromState](#Component$$createFromState) (or `createFromDataTransfer`) method. Can be dispatched by application if the component's state is set with some other mechanism. This event is not used in `milo`, it can be used in application in particular subclasses of component.\n * - 'getstatestarted' - emitted synchronously just before getState executes so components and facets can clean up their state for serialization. \n * - 'getstatecompleted' - emitted asynchronously after getState executes so components and facets can restore their state after serialization.\n *\n *\n * ####Component \"lifecycle\"####\n *\n * 1. Component constructor is called. Component's constructor simply calls constructor of [FacetedObject](../abstract/faceted_object.js.html) that is a superclass of Component. Subclasses of Component should not implement their own constructor, they can optionally implement `init` method, but most components do not need to do it.\n * 2. constructors and `init` methods of all facets are called in sequence. Same as components, facet do not implement their constructors, they can optionally implement `init` and `start` methods (see below). Inside `init` method there should be only general initialization code without any dependency on component itself (it is not ready yet) and other facets (as there is no specific facets creation order). If facet implements `init` method it MUST call inherited init with `ComponentFacet.prototype.init.apply(this, arguments)`.\n * 3. `init` method of component is called. At this point all facets are created but facets still can be not ready as they can have initialization code in `start` method. If component subclass implements `init` method it MUST call inherited method with `.prototype.init.apply(this, arguments)`, where is Component or another superclass the component is a subclass of.\n * 4. `check` method of all facets is called. This method adds facets that are not part of the component declaration (being part of the class or explicitely listed in bind attribute) but are required by facets that the compnent already has. Subclasses of [ComponentFacet](./c_facet.js.html) do not need to implement this method.\n * 5. `start` method of all facets is called. This method is usually implemented by ComponentFacet subclasses and it can have any initialization code that depends on component or on other facets that are the dependencies of a facet. Inherited `start` method should be called int he same way as written above.\n * 6. `start` method of component is called. This component method can be implemented by subclasses if they need to have some initialization code that depends on some facets and requires that these facets are fully inialized. Often such code also depends on component's scope children as well so this code should be inside `'childrenbound'` event subscriber.\n * 7. 'addedtoscope' event is dispatched when component is added to its parent's scope or to top level scope created by `milo.binder`.\n * 8. component's children are created (steps 1-6 above are followed for each child).\n * 9. 'childrenbound' event is dispatched when all component's children are created and added to their scope (see event description below).\n * 10. 'stateready' event is dispatched for component and all its children when component is create from state (see event description below).\n * 11. at this point component is in the \"interactive\" state when it and its facets will only respond to messages/events that they subscribed to during initialization.\n *\n *\n * @param {Scope} scope scope to which component will belong. It is usually a top level scope object returned by `milo.binder` or `scope` property of Container facet.\n * @param {Element} element DOM element that component is attached to\n * @param {String} name component name, should be unique in the scope of component\n * @param {ComponentInfo} componentInfo instance of ComponentInfo class that can be used to create a copy of component\n * TODO try removing it\n * @return {Component}\n */\nvar Component = _.createSubclass(FacetedObject, 'Component', true);\n\nmodule.exports = Component;\n\n_registerWithDomStorage('Component');\n\n\n/**\n * ####Component class methods####\n *\n * - [createComponentClass](#Component$$createComponentClass)\n * - [create](#Component$$create)\n * - [copy](#Component$$copy)\n * - [createOnElement](#Component$$createOnElement)\n * - [isComponent](c_utils.js.html#isComponent)\n * - [getComponent](c_utils.js.html#getComponent)\n * - [getContainingComponent](c_utils.js.html#getContainingComponent)\n * - [createFromState](#Component$$createFromState)\n * - [createFromDataTransfer](#Component$$createFromDataTransfer)\n */\n_.extend(Component, {\n createComponentClass: Component$$createComponentClass,\n create: Component$$create,\n copy: Component$$copy,\n createOnElement: Component$$createOnElement,\n isComponent: componentUtils.isComponent,\n getComponent: componentUtils.getComponent,\n getContainingComponent: componentUtils.getContainingComponent,\n createFromState: Component$$createFromState,\n createFromDataTransfer: Component$$createFromDataTransfer\n});\ndelete Component.createFacetedClass;\n\n\n/**\n * ####Component instance methods####\n *\n * - [init](#Component$init)\n * - [createElement](#Component$createElement)\n * - [hasFacet](#Component$hasFacet)\n * - [addFacet](#Component$addFacet)\n * - [allFacets](#Component$allFacets)\n * - [rename](#Component$rename)\n * - [remove](#Component$remove)\n * - [getState](#Component$getState)\n * - [getTransferState](#Component$getTransferState)\n * - [setState](#Component$setState)\n * - [getScopeParent](#Component$getScopeParent)\n * - [getTopScopeParent](#Component$getTopScopeParent)\n * - [getScopeParentWithClass](#Component$getScopeParentWithClass)\n * - [getTopScopeParentWithClass](#Component$getTopScopeParentWithClass)\n * - [walkScopeTree](#Component$walkScopeTree)\n * - [broadcast](#Component$broadcast)\n * - [destroy](#Component$destroy)\n * - [isDestroyed](#Component$isDestroyed)\n *\n *\n * #####[Messenger](../messenger/index.js.html) methods available on component#####\n *\n * - [on](../messenger/index.js.html#Messenger$on) - single subscribe\n * - [off](../messenger/index.js.html#Messenger$off) - single unsubscribe\n * - [onMessages](../messenger/index.js.html#Messenger$onMessages) - multiple subscribe\n * - [offMessages](../messenger/index.js.html#Messenger$offMessages) - multiple unsubscribe\n * - [postMessage](../messenger/index.js.html#Messenger$postMessage) - post message on component\n * - [getSubscribers](../messenger/index.js.html#Messenger$getSubscribers) - get subscribers for a given message\n */\n_.extendProto(Component, {\n init: Component$init,\n start: Component$start,\n createElement: Component$createElement,\n hasFacet: Component$hasFacet,\n addFacet: Component$addFacet,\n allFacets: Component$allFacets,\n rename: Component$rename,\n remove: Component$remove,\n insertInto: Component$insertInto,\n\n getState: Component$getState,\n getTransferState: Component$getTransferState,\n _getState: Component$_getState,\n setState: Component$setState,\n \n getScopeParent: Component$getScopeParent,\n getTopScopeParent: Component$getTopScopeParent,\n getScopeParentWithClass: Component$getScopeParentWithClass,\n getTopScopeParentWithClass: Component$getTopScopeParentWithClass,\n\n setScopeParentFromDOM: Component$setScopeParentFromDOM,\n\n walkScopeTree: Component$walkScopeTree,\n\n treePathOf: Component$treePathOf,\n getComponentAtTreePath: Component$getComponentAtTreePath,\n insertAtTreePath: Component$insertAtTreePath,\n\n broadcast: Component$broadcast,\n destroy: Component$destroy,\n isDestroyed: Component$isDestroyed\n});\n\n\n/**\n * Expose Messenger methods on Component prototype\n */\nvar MESSENGER_PROPERTY = '_messenger';\nMessenger.useWith(Component, MESSENGER_PROPERTY, Messenger.defaultMethods);\n\n\nvar COMPONENT_DATA_TYPE_PREFIX = 'x-application/milo-component';\nvar COMPONENT_DATA_TYPE_REGEX = /x-application\\/milo-component\\/([a-z_$][0-9a-z_$]*)(?:\\/())/i;\n\n/**\n * Component class method\n * Creates a subclass of component from the map of configured facets.\n * This method wraps and replaces [`createFacetedClass`](../abstract/faceted_object.js.html#createFacetedClass) class method of FacetedObject.\n * Unlike createFacetedClass, this method take facet classes from registry by their name, so only map of facets configuration needs to be passed. All facets classes should be subclasses of [ComponentFacet](./c_facet.js.html)\n *\n * @param {String} name class name\n * @param {Object[Object] | Array[String]} facetsConfig map of facets configuration.\n * If some facet does not require configuration, `undefined` should be passed as the configuration for the facet.\n * If no facet requires configuration, the array of facets names can be passed.\n * @return {Subclass(Component)}\n */\nfunction Component$$createComponentClass(name, facetsConfig) {\n // convert array of facet names to map of empty facets configurations\n if (Array.isArray(facetsConfig)) {\n var configMap = {};\n facetsConfig.forEach(function(fct) {\n var fctName = _.firstLowerCase(fct);\n configMap[fctName] = {};\n });\n facetsConfig = configMap;\n }\n\n // construct map of facets classes from facetRegistry\n var facetsClasses;\n if (typeof facetsConfig == 'object' && _.keys(facetsConfig).length) {\n facetsClasses = {};\n _.eachKey(facetsConfig, function(fctConfig, fct) {\n var fctName = _.firstLowerCase(fct);\n var fctClassName = _.firstUpperCase(fct);\n facetsClasses[fctName] = facetsRegistry.get(fctClassName);\n });\n }\n\n // create subclass of Component using method of FacetedObject\n var ComponentClass = FacetedObject.createFacetedClass.call(this, name, facetsClasses, facetsConfig);\n \n _registerWithDomStorage(name);\n\n return ComponentClass;\n}\n\n\nfunction _registerWithDomStorage(className) {\n DOMStorage.registerDataType(className, Component_domStorageSerializer, Component_domStorageParser);\n}\n\n\nfunction Component_domStorageSerializer(component) {\n var state = component.getState();\n return JSON.stringify(state); \n}\n\n\nfunction Component_domStorageParser(compStr, compClassName) {\n var state = _.jsonParse(compStr);\n if (state)\n return Component.createFromState(state);\n}\n\n\n/**\n * Component class method\n * Creates component from [ComponentInfo](./c_info.js.html) (used by [milo.binder](../binder.js.html) and to copy component)\n * Component of any registered class (see [componentsRegistry](./c_registry.js.html)) with any additional registered facets (see [facetsRegistry](./c_facets/cf_registry.js.html)) can be created using this method.\n *\n * @param {ComponentInfo} info\n * @param {Boolean} throwOnErrors If set to false, then errors will only be logged to console. True by default.\n @ @return {Component}\n */\nfunction Component$$create(info, throwOnErrors) {\n var ComponentClass = info.ComponentClass;\n\n if (typeof ComponentClass != 'function') {\n var message = 'create: component class should be function, \"' + typeof ComponentClass + '\" passed'; \n if (throwOnErrors === false) {\n logger.error('Component', message, ';using base Component class instead');\n ComponentClass = Component;\n } else\n throw new Error(message);\n }\n\n var aComponent = new ComponentClass(info.scope, info.el, info.name, info);\n\n if (info.extraFacetsClasses)\n _.eachKey(info.extraFacetsClasses, function(FacetClass) {\n if (! aComponent.hasFacet(FacetClass))\n aComponent.addFacet(FacetClass, undefined, undefined, throwOnErrors);\n });\n\n return aComponent;\n}\n\n\n/**\n * Component class method\n * Create a copy of component, including a copy of DOM element. Returns a copy of `component` (of the same class) with new DOM element (not inserted into page).\n * Component is added to the same scope as the original component.\n *\n * @param {Component} component an instance of Component class or subclass\n * @param {Boolean} deepCopy optional `true` to make deep copy of DOM element, otherwise only element without children is copied\n * @return {Component}\n */\nfunction Component$$copy(component, deepCopy) {\n check(component, Component);\n check(deepCopy, Match.Optional(Boolean));\n\n if (deepCopy && !component.container) \n throw new Error('Cannot deep copy component without container facet');\n\n // copy DOM element, using Dom facet if it is available\n var newEl = component.dom \n ? component.dom.copy(deepCopy)\n : component.el.cloneNode(deepCopy);\n\n var ComponentClass = component.constructor;\n\n // create component of the same class on the element\n var aComponent = ComponentClass.createOnElement(newEl, undefined, component.scope, component.extraFacets);\n var state = component._getState(deepCopy || false);\n aComponent.setState(state);\n _.deferMethod(aComponent, 'broadcast', 'stateready');\n return aComponent;\n}\n\n\n/**\n * Component class method\n * Creates an instance of component atached to element. All subclasses of component inherit this method.\n * Returns the component of the class this method is used with (thecontext of the method call).\n *\n * @param {Element} el optional element to attach component to. If element is not passed, it will be created\n * @param {String} innerHTML optional inner html to insert in element before binding.\n * @param {Scope} rootScope optional scope to put component in. If not passed, component will be attached to the scope that contains the element. If such scope does not exist, new scope will be created.\n * @param {Array[String]} extraFacets list of extra facet to add to component\n * @return {Subclass(Component)}\n */\nfunction Component$$createOnElement(el, innerHTML, rootScope, extraFacets) {\n check(innerHTML, Match.Optional(String));\n check(rootScope, Match.Optional(Scope));\n check(extraFacets, Match.Optional([String]));\n\n // \"this\" refers to the class of component here, as this is a class method\n if (el && innerHTML) el.innerHTML = innerHTML;\n el = el || _createComponentElement.call(this, innerHTML);\n rootScope = rootScope || _findOrCreateComponentRootScope(el);\n var aComponent = _addAttributeAndBindComponent.call(this, el, rootScope, extraFacets);\n aComponent.broadcast('stateready');\n return aComponent;\n}\n\nfunction _createComponentElement(innerHTML) {\n // \"this\" refers to the class of component here, as this is a class method\n var Dom = facetsRegistry.get('Dom')\n , domFacetConfig = this.getFacetConfig('dom')\n , templateFacetConfig = this.getFacetConfig('template')\n , template = templateFacetConfig && templateFacetConfig.template;\n\n var elConfig = {\n domConfig: domFacetConfig,\n template: template,\n content: innerHTML\n };\n\n return Dom.createElement(elConfig);\n}\n\nfunction _findOrCreateComponentRootScope(el) {\n var parent = Component.getContainingComponent(el, false, 'Container');\n return parent ? parent.container.scope : new Scope(el);\n}\n\nfunction _addAttributeAndBindComponent(el, rootScope, extraFacets) {\n // add bind attribute to element\n var attr = new BindAttribute(el);\n // \"this\" refers to the class of component here, as this is a class method\n attr.compClass = this.name;\n attr.compFacets = extraFacets;\n attr.decorate();\n\n // should be required here to resolve circular dependency\n var miloBinder = require('../binder');\n miloBinder(el, rootScope);\n\n return rootScope[attr.compName];\n}\n\n/**\n * Component class method\n * Creates component from component state, that includes information about its class, extra facets, facets data and all scope children.\n * This is used to save/load, copy/paste and drag/drop component\n *\n * @param {Object} state state from which component will be created\n * @param {Scope} rootScope scope to which component will be added\n * @param {Boolean} newUniqueName optional `true` to create component with the name different from the original one. `False` by default.\n * @param {Boolean} throwOnErrors If set to false, then errors will only be logged to console. True by default.\n * @return {Component} component\n */\nfunction Component$$createFromState(state, rootScope, newUniqueName, throwOnErrors) {\n check(state, Match.ObjectIncluding({\n compName: Match.Optional(String),\n compClass: Match.Optional(String),\n extraFacets: Match.Optional([String]),\n facetsStates: Match.Optional(Object),\n outerHTML: String\n }));\n\n var miloBinder = require('../binder');\n\n // create wrapper element optionally renaming component\n var wrapEl = _createComponentWrapElement(state, newUniqueName);\n\n // instantiate all components from HTML\n var scope = miloBinder(wrapEl, undefined, undefined, throwOnErrors);\n\n // as there should only be one component, call to _any will return it\n var component = scope._any();\n\n // set component's scope\n if (rootScope) {\n component.scope = rootScope;\n rootScope._add(component);\n }\n\n // restore component state\n component.setState(state);\n _.deferMethod(component, 'broadcast', 'stateready');\n\n return component; \n}\n\n\n// used by Component$$createFromState\nfunction _createComponentWrapElement(state, newUniqueName) {\n var wrapEl = document.createElement('div');\n wrapEl.innerHTML = state.outerHTML;\n\n var children = domUtils.children(wrapEl);\n if (children.length != 1)\n throw new Error('cannot create component: incorrect HTML, elements number: ' + children.length + ' (should be 1)');\n var compEl = children[0];\n var attr = new BindAttribute(compEl);\n attr.compName = newUniqueName ? miloComponentName() : state.compName;\n attr.compClass = state.compClass;\n attr.compFacets = state.extraFacets;\n attr.decorate();\n\n return wrapEl;\n}\n\n/**\n * Creates a component from a DataTransfer object (if possible)\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer\n * @param {DataTransfer} dataTransfer Data transfer\n */\nfunction Component$$createFromDataTransfer(dataTransfer) {\n var dataType = _.find(dataTransfer.types, function (type) {\n return COMPONENT_DATA_TYPE_REGEX.test(type);\n });\n if (!dataType) return;\n\n var state = _.jsonParse(dataTransfer.getData(dataType));\n if (!state) return;\n\n return Component.createFromState(state, undefined, true);\n}\n\n\n/**\n * Component instance method.\n * Initializes component. Automatically called by inherited constructor of FacetedObject.\n * Subclasses should call inherited init methods:\n * ```\n * Component.prototype.init.apply(this, arguments)\n * ```\n *\n * @param {Scope} scope scope to which component will belong. It is usually a top level scope object returned by `milo.binder` or `scope` property of Container facet.\n * @param {Element} element DOM element that component is attached to\n * @param {String} name component name, should be unique in the scope of component\n * @param {ComponentInfo} componentInfo instance of ComponentInfo class that can be used to create a copy of component\n * TODO try removing it\n */\nfunction Component$init(scope, element, name, componentInfo) {\n // create DOM element if it wasn't passed to Constructor\n this.el = element || this.createElement();\n\n // store reference to component on DOM element\n if (this.el) {\n // check that element does not have a component already atached\n var elComp = this.el[config.componentRef];\n if (elComp)\n logger.warn('component ' + name + ' attached to element that already has component ' + elComp.name);\n\n this.el[config.componentRef] = this;\n }\n\n _.defineProperties(this, {\n componentInfo: componentInfo,\n extraFacets: []\n }, _.ENUM);\n\n this.name = name;\n this.scope = scope;\n\n // create component messenger\n var messenger = new Messenger(this);\n _.defineProperty(this, MESSENGER_PROPERTY, messenger);\n\n // check all facets dependencies (required facets)\n this.allFacets('check');\n\n // start all facets\n this.allFacets('start');\n\n // call start method if it's defined in subclass\n if (this.start) this.start();\n}\n\n\n/**\n * This is a stub to avoid confusion whether the method of superclass should be called in subclasses\n * The start method of subclass instance is called once all the facets are created, initialized and started (see above)\n */\nfunction Component$start() {}\n\n\n/**\n * Component instance method.\n * Initializes the element which this component is bound to\n *\n * This method is called when a component is instantiated outside the DOM and\n * will generate a new element for the component.\n * \n * @return {Element}\n */\nfunction Component$createElement() {\n if (typeof document == 'undefined')\n return;\n\n this.el = this.dom\n ? this.dom.createElement()\n : document.createElement('DIV');\n\n return this.el;\n}\n\n\n/**\n * Component instance method\n * Returns true if component has facet\n *\n * @param {Function|String} facetNameOrClass\n * @return {Boolean}\n */\nfunction Component$hasFacet(facetNameOrClass) {\n var facetName = _.firstLowerCase(typeof facetNameOrClass == 'function'\n ? facetNameOrClass.name\n : facetNameOrClass);\n\n var facet = this[facetName];\n if (! facet instanceof ComponentFacet)\n logger.warn('expected facet', facetName, 'but this property name is used for something else');\n\n return !! facet;\n}\n\n\n/**\n * Component instance method.\n * Adds facet with given name or class to the instance of Component (or its subclass).\n * \n * @param {String|Subclass(Component)} facetNameOrClass name of facet class or the class itself. If name is passed, the class will be retireved from facetsRegistry\n * @param {Object} facetConfig optional facet configuration\n * @param {String} facetName optional facet name. Allows to add facet under a name different from the class name supplied.\n * @param {Boolean} throwOnErrors If set to false, then errors will only be logged to console. True by default.\n */\nfunction Component$addFacet(facetNameOrClass, facetConfig, facetName, throwOnErrors) {\n check(facetNameOrClass, Match.OneOf(String, Match.Subclass(ComponentFacet)));\n check(facetConfig, Match.Optional(Object));\n check(facetName, Match.Optional(String));\n\n var FacetClass;\n // if only name passed, retrieve facet class from registry\n if (typeof facetNameOrClass == 'string') {\n var facetClassName = _.firstUpperCase(facetNameOrClass);\n FacetClass = facetsRegistry.get(facetClassName);\n } else \n FacetClass = facetNameOrClass;\n\n if (!facetName)\n facetName = _.firstLowerCase(FacetClass.name);\n\n this.extraFacets.push(facetName);\n\n // add facet using method of FacetedObject\n var newFacet = FacetedObject.prototype.addFacet.call(this, FacetClass, facetConfig, facetName, throwOnErrors);\n\n // check depenedencies and start facet\n if (newFacet.check) newFacet.check();\n if (newFacet.start) newFacet.start();\n}\n\n\n/**\n * Component instance method.\n * Envoke given method with optional parameters on all facets.\n * Returns the map of values returned by all facets. If the facet doesn't have the method it is simply not called and the value in the map will be undefined.\n *\n * @param {String} method method name to envoke on the facet\n * @return {Object}\n */\nfunction Component$allFacets(method) { // ,... arguments\n var args = _.slice(arguments, 1);\n\n return _.mapKeys(this.facets, function(facet, fctName) {\n if (facet && typeof facet[method] == 'function')\n return facet[method].apply(facet, args);\n });\n}\n\n\n/**\n * Component instance method.\n * \n * @param {[String]} name optional new name of component, \n * @param {[Boolean]} renameInScope optional false to not rename ComponentInfo object in its scope, true by default\n */\nfunction Component$rename(name, renameInScope) {\n name = name || miloComponentName();\n this.componentInfo.rename(name, false);\n Scope.rename(this, name, renameInScope);\n}\n\n\n/**\n * Component instance method.\n * Removes component from its scope.\n *\n * @param {Boolean} preserveScopeProperty true not to delete scope property of component\n * @param {Boolean} quiet optional true to suppress the warning message if the component is not in scope\n */\nfunction Component$remove(preserveScopeProperty, quiet) {\n if (this.scope) {\n this.scope._remove(this.name, quiet);\n if (! preserveScopeProperty)\n delete this.scope;\n }\n}\n\n\n/**\n * Component instance method.\n * Inserts the component into the DOM and attempts to adjust the scope tree accordingly.\n * @param {HTMLElement} parentEl The element into which the component should be inserted.\n * @param {HTMLElement} referenceEl (optional) The reference element it should be inserted before.\n */\nfunction Component$insertInto(parentEl, referenceEl) {\n parentEl.insertBefore(this.el, referenceEl);\n this.setScopeParentFromDOM();\n}\n\n\n/**\n * Component instance method\n * Retrieves all component state, including information about its class, extra facets, facets data and all scope children.\n * This information is used to save/load, copy/paste and drag/drop component \n * Returns component state\n *\n * @this {Component} component which state will be saved\n * @return {Object}\n */\nfunction Component$getState() {\n this.broadcast('getstatestarted', { rootComponent: this }, undefined, true);\n var state = this._getState(true);\n state.outerHTML = this.el.outerHTML;\n _.deferMethod(this, 'broadcast', 'getstatecompleted', { rootComponent: this }, undefined, true);\n return state;\n}\n\n\n/**\n * Component instance method\n * Retrieves all component state, including information about its class, extra facets, facets data and all scope children.\n * This information is used to save/load, copy/paste and drag/drop component \n * If component has [Transfer](./c_facets/Transfer.js.html) facet on it, this method retrieves state from this facet\n * Returns component state\n *\n * @this {Component} component which state will be saved\n * @param {Object} options can be used by subclasses. \n * @return {Object}\n */\nfunction Component$getTransferState(options) {\n return this.transfer\n ? this.transfer.getState(options)\n : this.getState(options);\n}\n\n\n/**\n * Component instance method\n * Returns the state of component\n * Used by class method `Component.getState` and by [Container](./c_facets/Container.js.html) facet.\n *\n * @private\n * @param {Boolean} deepState false to get shallow state from all facets (true by default)\n * @return {Object}\n */\nfunction Component$_getState(deepState){\n\n var facetsStates = this.allFacets('getState', deepState === false ? false : true);\n facetsStates = _.filterKeys(facetsStates, function(fctState) {\n return !! fctState;\n });\n\n return {\n compName: this.name,\n compClass: this.constructor.name,\n extraFacets: this.extraFacets,\n facetsStates: facetsStates\n };\n}\n\n\n/**\n * Component instance method\n * Sets the state of component.\n * Used by class method `Component.createFromState` and by [Container](./c_facets/Container.js.html) facet.\n *\n * @private\n * @param {Object} state state to set the component\n */\nfunction Component$setState(state) {\n if (state.facetsStates)\n _.eachKey(state.facetsStates, function(fctState, fctName) {\n var facet = this[fctName];\n if (facet && typeof facet.setState == 'function')\n facet.setState(fctState);\n }, this);\n}\n\n\n/**\n * Component instance method.\n * Returns the scope parent of a component.\n * If `conditionOrFacet` parameter is not specified, an immediate parent will be returned, otherwise the closest ancestor with a specified facet or passing condition test.\n *\n * @param {Function|String} conditionOrFacet optional condition that component should pass (or facet name it should contain)\n * @return {Component|undefined}\n */\nfunction Component$getScopeParent(conditionOrFacet) {\n return _callGetScopeParent.call(this, _getScopeParent, conditionOrFacet);\n}\n\nfunction _callGetScopeParent(_getScopeParentFunc, conditionOrFacet) {\n check(conditionOrFacet, Match.Optional(Match.OneOf(Function, String)));\n var conditionFunc = componentUtils._makeComponentConditionFunc(conditionOrFacet);\n return _getScopeParentFunc.call(this, conditionFunc); \n}\n\nfunction _getScopeParent(conditionFunc) {\n var parent;\n try { parent = this.scope._hostObject.owner; } catch(e) {}\n\n // Where there is no parent, this function will return undefined\n // The parent component is checked recursively\n if (parent) {\n if (! conditionFunc || conditionFunc(parent) )\n return parent;\n else\n return _getScopeParent.call(parent, conditionFunc);\n }\n}\n\n\n/**\n * Component instance method\n * Returns scope parent with a given class, with same class if not specified\n *\n * @param {[Function]} ComponentClass component class that the parent should have, same class by default\n * @return {Component}\n */\nfunction Component$getScopeParentWithClass(ComponentClass) {\n ComponentClass = ComponentClass || this.constructor;\n return _getScopeParent.call(this, function(comp) {\n return comp instanceof ComponentClass;\n });\n}\n\n\n/**\n * Component instance method.\n * Returns the topmost scope parent of a component.\n * If `conditionOrFacet` parameter is not specified, the topmost scope parent will be returned, otherwise the topmost ancestor with a specified facet or passing condition test.\n *\n * @param {Function|String} conditionOrFacet optional condition that component should pass (or facet name it should contain)\n * @return {Component|undefined}\n */\nfunction Component$getTopScopeParent(conditionOrFacet) {\n return _callGetScopeParent.call(this, _getTopScopeParent, conditionOrFacet);\n}\n\nfunction _getTopScopeParent(conditionFunc) {\n var topParent\n , parent = this;\n do {\n parent = _getScopeParent.call(parent, conditionFunc);\n if (parent)\n topParent = parent;\n } while (parent);\n\n return topParent;\n}\n\n\n/**\n * Component instance method\n * Returns scope parent with a given class, with same class if not specified\n *\n * @param {[Function]} ComponentClass component class that the parent should have, same class by default\n * @return {Component}\n */\nfunction Component$getTopScopeParentWithClass(ComponentClass) {\n ComponentClass = ComponentClass || this.constructor;\n return _getTopScopeParent.call(this, function(comp) {\n return comp instanceof ComponentClass;\n });\n}\n\n\n/**\n * Component instance method\n * Finds scope parent of component using DOM tree (unlike getScopeParent that simply goes up the scope tree).\n * While getScopeParent is faster it may fail if scope chain is not setup yet (e.g., when component has been just inserted).\n * The scope property of component will be changed to point to scope object of container facet of that parent.\n * Returned scope parent of the component will be undefined (as well as component's scope property) if no parent in the DOM tree has container facet.\n * TODO Method will not bind DOM children correctly if component has no container facet.\n *\n * @return {Component}\n */\nfunction Component$setScopeParentFromDOM() {\n var parentEl = this.el.parentNode;\n\n var parent, foundParent;\n while (parentEl && ! foundParent) {\n parent = Component.getComponent(parentEl);\n foundParent = parent && parent.container;\n parentEl = parentEl.parentNode;\n }\n\n this.remove(); // remove component from its current scope (if it is defined)\n if (foundParent) {\n this.rename(undefined, false);\n parent.container.scope._add(this);\n return parent;\n } \n}\n\n\n/**\n * Walks component tree, calling provided callback on each component\n *\n * @param callback\n * @param thisArg\n */\nfunction Component$walkScopeTree(callback, thisArg) {\n callback.call(thisArg, this);\n if (!this.container) return;\n this.container.scope._each(function(component) {\n component.walkScopeTree(callback, thisArg);\n });\n}\n\n\nfunction Component$treePathOf(component) {\n return domUtils.treePathOf(this.el, component.el);\n}\n\n\nfunction Component$getComponentAtTreePath(treePath, nearest) {\n var node = domUtils.getNodeAtTreePath(this.el, treePath, nearest);\n return Component.getComponent(node);\n}\n\n\nfunction Component$insertAtTreePath(treePath, component, nearest) {\n var wasInserted = domUtils.insertAtTreePath(this.el, treePath, component.el);\n if (wasInserted) component.setScopeParentFromDOM();\n return wasInserted;\n}\n\n\n/**\n * Broadcast message to component and to all its scope children\n *\n * @param {String|RegExp} msg message to be sent\n * @param {[Any]} data optional message data\n * @param {[Function]} callback optional callback\n * @param {[Boolean]} synchronously if it should use postMessageSync\n */\nfunction Component$broadcast(msg, data, callback, synchronously) {\n var postMethod = synchronously ? 'postMessageSync' : 'postMessage';\n this.walkScopeTree(function(component) {\n component[postMethod](msg, data, callback);\n });\n}\n\n\n/**\n * Destroy component: removes component from DOM, removes it from scope, deletes all references to DOM nodes and unsubscribes from all messages both component and all facets\n */\nfunction Component$destroy(quiet) {\n if (this._destroyed) {\n if (!quiet) logger.warn('Component destroy: component is already destroyed');\n return;\n }\n this.remove(false, quiet);\n this.allFacets('destroy');\n this[MESSENGER_PROPERTY].destroy();\n if (this.el) {\n domUtils.detachComponent(this.el);\n domUtils.removeElement(this.el);\n delete this.el;\n }\n this.componentInfo.destroy();\n this._destroyed = true;\n}\n\n\n/**\n * Returns true if component was destroyed\n *\n * @return {Boolean}\n */\nfunction Component$isDestroyed() {\n return this._destroyed;\n}\n", "'use strict';\n\n/**\n * `milo.Component.Facet`\n *\n * The class fot the facet of component. When a component is created, it\n * creates all its facets.\n *\n * See Facets section on information about available facets and on\n * how to create new facets classes.\n *\n * - Component - basic compponent class\n * - ComponentFacet - basic\n */\n\nvar Facet = require('../abstract/facet')\n , miloCore = require('milo-core')\n , Messenger = miloCore.Messenger\n , componentUtils = require('./c_utils')\n , _ = miloCore.proto;\n\nvar ComponentFacet = _.createSubclass(Facet, 'ComponentFacet');\n\nmodule.exports = ComponentFacet;\n\n\n/**\n * postDomParent\n *\n * If facet has DOM parent facet (see `domParent` method), posts the message to this facet.\n *\n * @param {String} messageType\n * @param {Object} messageData\n */\nvar postDomParent = _.partial(_postParent, domParent);\n\n/**\n * postScopeParent\n *\n * If facet has scope parent facet (see `scopeParent` method), posts the message to this facet.\n *\n * @param {String} messageType\n * @param {Object} messageData\n */\nvar postScopeParent = _.partial(_postParent, scopeParent);\n\n\n_.extendProto(ComponentFacet, {\n init: ComponentFacet$init,\n start: ComponentFacet$start,\n check: ComponentFacet$check,\n destroy: ComponentFacet$destroy,\n onConfigMessages: ComponentFacet$onConfigMessages,\n domParent: domParent,\n postDomParent: postDomParent,\n scopeParent: scopeParent,\n postScopeParent: postScopeParent,\n getMessageSource: getMessageSource,\n dispatchSourceMessage: dispatchSourceMessage,\n _createMessenger: _createMessenger,\n _setMessageSource: _setMessageSource,\n _createMessageSource: _createMessageSource,\n _createMessageSourceWithAPI: _createMessageSourceWithAPI\n});\n\n_.extend(ComponentFacet, {\n requiresFacet: requiresFacet\n});\n\n\n/**\n * Expose Messenger methods on Facet prototype\n */\nvar MESSENGER_PROPERTY = '_messenger';\nMessenger.useWith(ComponentFacet, MESSENGER_PROPERTY, Messenger.defaultMethods);\n\n\n// initComponentFacet\nfunction ComponentFacet$init() {\n this._createMessenger();\n}\n\n\n// some subclasses (e.g. ModelFacet) overrride this method and do not create their own messenger\nfunction _createMessenger(){\n _.defineProperty(this, MESSENGER_PROPERTY, new Messenger(this));\n}\n\n\n// startComponentFacet\nfunction ComponentFacet$start() {\n if (this.config.messages)\n this.onConfigMessages(this.config.messages);\n}\n\n\nfunction ComponentFacet$onConfigMessages(messageSubscribers) {\n var notYetRegisteredMap = _.mapKeys(messageSubscribers, function(subscriber, messages) {\n var subscriberType = typeof subscriber;\n if (subscriberType == 'function')\n return this.on(messages, subscriber);\n\n if (subscriberType == 'object') {\n var contextType = typeof subscriber.context;\n if (contextType == 'object')\n return this.on(messages, subscriber);\n\n if (contextType == 'string') {\n if (subscriber.context == this.name || subscriber.context == 'facet')\n subscriber = {\n subscriber: subscriber.subscriber,\n context: this\n };\n else if (subscriber.context == 'owner')\n subscriber = {\n subscriber: subscriber.subscriber,\n context: this.owner\n };\n else\n throw new Error('unknown subscriber context in configuration: ' + subscriber.context);\n\n return this.on(messages, subscriber);\n }\n\n throw new Error('unknown subscriber context type in configuration: ' + contextType);\n }\n\n throw new Error('unknown subscriber type in configuration: ' + subscriberType);\n }, this);\n\n return notYetRegisteredMap;\n}\n\n\n// checkDependencies\nfunction ComponentFacet$check() {\n if (this.require) {\n this.require.forEach(function(reqFacet) {\n if (! this.owner.hasFacet(reqFacet))\n this.owner.addFacet(reqFacet);\n }, this);\n }\n}\n\n\n// destroys facet\nfunction ComponentFacet$destroy() {\n if (this[MESSENGER_PROPERTY]) this[MESSENGER_PROPERTY].destroy();\n this._destroyed = true;\n}\n\n\n/**\n * domParent\n *\n * @return {ComponentFacet} reference to the facet of the same class of the closest parent DOM element, that has a component with the same facet class attached to it. If such element doesn't exist method will return undefined.\n */\nfunction domParent() {\n var parentComponent = componentUtils.getContainingComponent(this.owner.el, false, this.name);\n return parentComponent && parentComponent[this.name];\n}\n\n\n/**\n * scopeParent\n *\n * @return {ComponentFacet} reference to the facet of the same class as `this` facet of the closest scope parent (i.e., the component that has the scope of the current component in its container facet).\n */\nfunction scopeParent() {\n var parentComponent = this.owner.getScopeParent(this.name);\n return parentComponent && parentComponent[this.name];\n}\n\n\nfunction _postParent(getParentMethod, messageType, messageData) {\n var parentFacet = getParentMethod.call(this);\n if (parentFacet)\n parentFacet.postMessage(messageType, messageData);\n}\n\n\nfunction _setMessageSource(messageSource) {\n this[MESSENGER_PROPERTY]._setMessageSource(messageSource);\n}\n\n\nfunction getMessageSource() {\n return this[MESSENGER_PROPERTY].getMessageSource();\n}\n\n\nfunction dispatchSourceMessage(message, data) {\n return this.getMessageSource().dispatchMessage(message, data);\n}\n\n\nfunction _createMessageSource(MessageSourceClass, options) {\n var messageSource = new MessageSourceClass(this, undefined, undefined, this.owner, options);\n this._setMessageSource(messageSource)\n\n _.defineProperty(this, '_messageSource', messageSource);\n}\n\n\nfunction _createMessageSourceWithAPI(MessageSourceClass, messengerAPIOrClass, options) {\n var messageSource = new MessageSourceClass(this, undefined, messengerAPIOrClass, this.owner, options);\n this._setMessageSource(messageSource)\n\n _.defineProperty(this, '_messageSource', messageSource);\n}\n\n\nfunction requiresFacet(facetName) {\n // 'this' refers to the Facet Class\n var facetRequire = this.prototype.require;\n\n return facetRequire && (facetRequire.indexOf(_.firstUpperCase(facetName)) >= 0\n || facetRequire.indexOf(_.firstLowerCase(facetName)) >= 0);\n}\n", "'use strict';\n\n\nvar ComponentFacet = require('../c_facet')\n , miloBinder = require('../../binder')\n , Scope = require('../scope')\n , miloCore = require('milo-core')\n , _ = miloCore.proto\n , logger = miloCore.util.logger\n , facetsRegistry = require('./cf_registry')\n , domUtils = require('../../util/dom');\n\n\n/**\n * `milo.registry.facets.get('Container')`\n * A special component facet that makes component create its own inner scope.\n * When [milo.binder](../../binder.js.html) binds DOM tree and creates components, if components are inside component WITH Container facet, they are put on the `scope` of it (component.container.scope - see [Scope](../scope.js.html)), otherwise they are put on the same scope even though they may be deeper in DOM tree.\n * It allows creating namespaces avoiding components names conflicts, at the same time creating more shallow components tree than the DOM tree.\n * To create components for elements inside the current component use:\n * ```\n * component.container.binder();\n * ```\n * See [milo.binder](../../binder.js.html)\n */\nvar Container = _.createSubclass(ComponentFacet, 'Container');\n\n\n/**\n * ####Container facet instance methods####\n *\n * - [binder](#Container$binder) - create components from DOM inside the current one\n */\n_.extendProto(Container, {\n start: Container$start,\n path: Container$path,\n getState: Container$getState,\n setState: Container$setState,\n binder: Container$binder,\n destroy: Container$destroy,\n unwrap: Container$unwrap,\n\n append: Container$append,\n insertBefore: Container$insertBefore,\n remove: Container$remove\n});\n\nfacetsRegistry.add(Container);\n\nmodule.exports = Container;\n\n\n/**\n * Container instance method.\n * Scans DOM, creates components and adds to scope children of component element.\n */\nfunction Container$binder() {\n return miloBinder(this.owner.el, this.scope, false);\n}\n\n\n/**\n * Container instance method.\n * Setup empty scope object on start\n */\nfunction Container$start() {\n ComponentFacet.prototype.start.apply(this, arguments);\n this.scope = new Scope(this.owner.el, this);\n}\n\n\nvar allowedNamePattern = /^[A-Za-z][A-Za-z0-9\\_\\$]*$/;\n/**\n * Container instance method.\n * Safely traverses component scope\n * Returns component in scope for a given path\n * If path is invalid the method will throw, if there is no component at a given path or some of the components along the path does not have Container facet the method will return undefined, \n * \n * @param {String} path path of child component in scope, each name should be prefixed with '.', e.g.: '.child.subchild'\n * @return {Component}\n */\nfunction Container$path(path) {\n path = path.split('.');\n var len = path.length;\n if (path[0] || len < 2) throwInvalidPath();\n var comp = this.owner;\n for (var i = 1; i < len; i++) {\n var name = path[i];\n if (!allowedNamePattern.test(name)) throwInvalidPath();\n if (!comp.container) return;\n comp = comp.container.scope[name];\n if (!comp) return;\n }\n return comp;\n\n function throwInvalidPath() {\n throw new Error('path ' + path + ' is invalid');\n }\n}\n\n\n/**\n * Container instance method\n * Called by `Component.prototype.getState` to get facet's state\n * Returns the state of components in the scope\n *\n * @param {Boolean} deepCopy true by default\n * @return {Object}\n */\nfunction Container$getState(deepCopy) {\n var state = { scope: {} };\n if (deepCopy !== false)\n this.scope._each(function(component, compName) {\n state.scope[compName] = component._getState();\n });\n return state;\n}\n\n\n/**\n * Container instance method\n * Called by `Component.prototype.setState` to set facet's state\n * Sets the state of components in the scope\n *\n * @param {Object} data data to set on facet's model\n */\nfunction Container$setState(state) {\n _.eachKey(state.scope, function(compData, compName) {\n var component = this.scope[compName];\n if (component)\n component.setState(compData);\n else\n logger.warn('component \"' + compName + '\" does not exist on scope');\n }, this);\n}\n\nfunction Container$destroy() {\n this.scope._each(function(component) {\n component.destroy();\n });\n this.scope._detachElement();\n ComponentFacet.prototype.destroy.apply(this, arguments);\n}\n\n\n/**\n * Container instance method\n * Moves all of the contents of the owner into the parent scope\n * \n * @param {Boolean} renameChildren pass false to not rename scope children (default is true)\n * @param {Boolean} destroy If not false, the component will be destroyed at the end (default is true).\n */\nfunction Container$unwrap(renameChildren, destroy) {\n domUtils.unwrapElement(this.owner.el);\n this.scope && this.scope._each(function (child) {\n child.remove();\n if (renameChildren !== false) child.rename(undefined, false);\n this.owner.scope && this.owner.scope._add(child);\n }, this);\n if (destroy !== false) this.owner.destroy();\n}\n\n\n/**\n * Container instance method\n * Append component to DOM and to scope\n * @param {Component} comp component that will be appended\n */\nfunction Container$append(comp) {\n this.scope._add(comp);\n this.owner.el.appendChild(comp.el);\n}\n\n\n/**\n * Container instance method\n * Insert component to DOM and to scope before another component\n * @param {Component} comp component that will be inserted\n * @param {Component} sibling component before which component will be appended\n */\nfunction Container$insertBefore(comp, sibling) {\n this.scope._add(comp);\n this.el.insertBefore(comp.el, sibling && sibling.el);\n}\n\nfunction Container$remove(comp) {\n this.scope._remove(comp);\n this.owner.el.removeChild(comp.el);\n}\n", - "'use strict';\n\nvar miloCore = require('milo-core')\n , _ = miloCore.proto\n , modelUtils = miloCore.Model._utils\n , createFacetClass = require('../../util/create_facet_class');\n\n/**\n * Css Facet facilitates the binding of model values to the css classes being applied to the element owned by a milo\n * component.\n *\n * Facet configuration looks like:\n *\n * ```\n * css: {\n * classes: {\n * '.someModelProp': 'some-css-class', // Apply css class if the value of '.someModelProp' is truthy\n * '.someOtherModelProp': {\n * 'value-1': 'some-css-class', // Apply if the value of '.someOtherModelProp' == 'value-1'\n * 'value-2: 'some-other-css-class' // etc\n * },\n * '.anotherModelProp': function getCssClass(modelValue) { return ... } // Apply result of function\n * '.oneMoreModelProp': 'my-$-class' // Template value of '.oneMoreModelProp' (By replacing $ character)\n * }\n * }\n * ```\n *\n * To bind a data source to the facet, use milo binder:\n *\n * ```\n * milo.binder(someDataSource, '->>', myComponent.css);\n * ```\n *\n * Or else, set data directly on the facet like so:\n *\n * ```\n * component.css.set({\n * '.someModelProp': 'milo',\n * '.someOtherModelProp': 'is-cool'\n * });\n */\nvar CssFacet = module.exports = createFacetClass({\n className: 'Css',\n methods: {\n start: CssFacet$start,\n set: CssFacet$set,\n del: CssFacet$del,\n path: CssFacet$path,\n update: CssFacet$update\n }\n});\n\n// Config data type to update function\nvar updateHandlers = {\n string: updateSimple,\n object: updateByObject,\n function: updateByFunction\n}\n\nfunction CssFacet$start() {\n CssFacet.super.start.apply(this, arguments);\n\n modelUtils.path.wrapMessengerMethods.call(this);\n\n this.onSync('changedata', modelUtils.changeDataHandler); // Listen for changes to data source\n this.activeModelPaths = {}; // Key-Value object: Css classes (key) set by what model paths (value)\n}\n\nfunction CssFacet$set(data) {\n var self = this;\n\n _.eachKey(data, function(value, prop) {\n var modelPath = prop.charAt(0) !== '.' ? '.' + prop : prop;\n\n self.update(modelPath, value);\n });\n}\n\nfunction CssFacet$del() {\n _.eachKey(this.activeModelPaths, function(modelPaths, cssClass) {\n modelPaths.clear();\n\n self.el.classList.remove(cssClass);\n });\n}\n\nfunction CssFacet$path(modelPath) {\n return this.config.classes && this.config.classes[modelPath] ? new Path(this, modelPath) : this;\n}\n\nfunction CssFacet$update(modelPath, value) {\n var cssConfig = this.config.classes[modelPath];\n\n if (cssConfig) {\n var handler = updateHandlers[typeof cssConfig];\n\n handler.call(this, modelPath, cssConfig, value);\n\n this.postMessageSync('changed', {\n modelPath: modelPath,\n modelValue: value\n });\n }\n}\n\nfunction updateSimple(modelPath, cssClass, data) {\n var classList = this.owner.el.classList;\n\n // Remove any css class set via this model path\n _.eachKey(this.activeModelPaths, function(modelPaths, cssClass) {\n if (modelPaths.has(modelPath)) {\n modelPaths.delete(modelPath);\n\n if(modelPaths.size == 0) { // Only remove the class if no other model path is applying it\n classList.remove(cssClass);\n }\n }\n });\n\n // Apply new css class (cssClass / data can be null if this is a remove only operation)\n if (cssClass && data) {\n cssClass = data ? cssClass.replace(/\\$/g, data) : cssClass; // Process any template characters ($) in class name\n\n var modelPaths = this.activeModelPaths[cssClass] || (this.activeModelPaths[cssClass] = new Set());\n\n modelPaths.add(modelPath);\n classList.add(cssClass);\n }\n}\n\nfunction updateByObject(modelPath, cssClasses, value) {\n // Apply new css class\n var cssClass = cssClasses[value];\n\n updateSimple.call(this, modelPath, cssClass, value);\n}\n\nfunction updateByFunction(modelPath, getCssClassFn, data) {\n var cssClass = getCssClassFn.call(this, data);\n\n updateSimple.call(this, modelPath, cssClass, true);\n}\n\n// Path class\n\nfunction Path(cssFacet, modelPath) {\n this.cssFacet = cssFacet;\n this.modelPath = modelPath;\n}\n\nPath.prototype.set = function(value) {\n this.cssFacet.update(this.modelPath, value);\n}\n\nPath.prototype.del = function() {\n this.set(null);\n}\n", + "'use strict';\n\nvar miloCore = require('milo-core')\n , _ = miloCore.proto\n , modelUtils = miloCore.Model._utils\n , createFacetClass = require('../../util/create_facet_class');\n\n/**\n * Css Facet facilitates the binding of model values to the css classes being applied to the element owned by a milo\n * component.\n *\n * Facet configuration looks like:\n *\n * ```\n * css: {\n * classes: {\n * '.someModelProp': 'some-css-class', // Apply css class if the value of '.someModelProp' is truthy\n * '.someOtherModelProp': {\n * 'value-1': 'some-css-class', // Apply if the value of '.someOtherModelProp' == 'value-1'\n * 'value-2: 'some-other-css-class' // etc\n * },\n * '.anotherModelProp': function getCssClass(modelValue) { return ... } // Apply result of function\n * '.oneMoreModelProp': 'my-$-class' // Template value of '.oneMoreModelProp' (By replacing $ character)\n * }\n * }\n * ```\n *\n * To bind a data source to the facet, use milo binder:\n *\n * ```\n * milo.binder(someDataSource, '->>', myComponent.css);\n * ```\n *\n * Or else, set data directly on the facet like so:\n *\n * ```\n * component.css.set({\n * '.someModelProp': 'milo',\n * '.someOtherModelProp': 'is-cool'\n * });\n */\nvar CssFacet = module.exports = createFacetClass({\n className: 'Css',\n methods: {\n start: CssFacet$start,\n set: CssFacet$set,\n del: CssFacet$del,\n path: CssFacet$path,\n update: CssFacet$update\n }\n});\n\n// Config data type to update function\nvar updateHandlers = {\n string: updateSimple,\n object: updateByObject,\n function: updateByFunction\n}\n\nfunction CssFacet$start() {\n CssFacet.super.start.apply(this, arguments);\n\n modelUtils.path.wrapMessengerMethods.call(this);\n\n this.onSync('changedata', modelUtils.changeDataHandler); // Listen for changes to data source\n this.activeModelPaths = {}; // Key-Value object: Css classes (key) set by what model paths (value)\n}\n\nfunction CssFacet$set(data) {\n var self = this;\n\n _.eachKey(data, function(value, prop) {\n var modelPath = prop.charAt(0) !== '.' ? '.' + prop : prop;\n\n self.update(modelPath, value);\n });\n}\n\nfunction CssFacet$del() {\n var self = this;\n \n _.eachKey(this.activeModelPaths, function(modelPaths, cssClass) {\n modelPaths.clear();\n\n self.el.classList.remove(cssClass);\n });\n}\n\nfunction CssFacet$path(modelPath) {\n return this.config.classes && this.config.classes[modelPath] ? new Path(this, modelPath) : this;\n}\n\nfunction CssFacet$update(modelPath, value) {\n var cssConfig = this.config.classes[modelPath];\n\n if (cssConfig) {\n var handler = updateHandlers[typeof cssConfig];\n\n handler.call(this, modelPath, cssConfig, value);\n\n this.postMessageSync('changed', {\n modelPath: modelPath,\n modelValue: value\n });\n }\n}\n\nfunction updateSimple(modelPath, cssClass, data) {\n var classList = this.owner.el.classList;\n\n // Remove any css class set via this model path\n _.eachKey(this.activeModelPaths, function(modelPaths, cssClass) {\n if (modelPaths.has(modelPath)) {\n modelPaths.delete(modelPath);\n\n if(modelPaths.size == 0) { // Only remove the class if no other model path is applying it\n classList.remove(cssClass);\n }\n }\n });\n\n // Apply new css class (cssClass / data can be null if this is a remove only operation)\n if (cssClass && data) {\n cssClass = data ? cssClass.replace(/\\$/g, data) : cssClass; // Process any template characters ($) in class name\n\n var modelPaths = this.activeModelPaths[cssClass] || (this.activeModelPaths[cssClass] = new Set());\n\n modelPaths.add(modelPath);\n classList.add(cssClass);\n }\n}\n\nfunction updateByObject(modelPath, cssClasses, value) {\n // Apply new css class\n var cssClass = cssClasses[value];\n\n updateSimple.call(this, modelPath, cssClass, value);\n}\n\nfunction updateByFunction(modelPath, getCssClassFn, data) {\n var cssClass = getCssClassFn.call(this, data);\n\n updateSimple.call(this, modelPath, cssClass, true);\n}\n\n// Path class\n\nfunction Path(cssFacet, modelPath) {\n this.cssFacet = cssFacet;\n this.modelPath = modelPath;\n}\n\nPath.prototype.set = function(value) {\n this.cssFacet.update(this.modelPath, value);\n}\n\nPath.prototype.del = function() {\n this.set(null);\n}\n", "'use strict';\n\nvar miloCore = require('milo-core')\n , Mixin = miloCore.classes.Mixin\n , ComponentFacet = require('../c_facet')\n , facetsRegistry = require('./cf_registry')\n\n , Messenger = miloCore.Messenger\n , DOMEventsSource = require('../msg_src/dom_events')\n , DataMsgAPI = require('../msg_api/data')\n , getElementDataAccess = require('../msg_api/de_data')\n , Model = miloCore.Model\n , pathUtils = Model._utils.path\n , modelUtils = Model._utils.model\n , changeDataHandler = Model._utils.changeDataHandler\n , getTransactionFlag = changeDataHandler.getTransactionFlag\n , setTransactionFlag = changeDataHandler.setTransactionFlag\n , postTransactionFinished = changeDataHandler.postTransactionFinished\n\n , _ = miloCore.proto\n , logger = miloCore.util.logger;\n\n\n/**\n * `milo.registry.facets.get('Data')`\n * Facet to give access to DOM data\n */\nvar Data = _.createSubclass(ComponentFacet, 'Data');\n\n\n/**\n * Data facet instance methods\n *\n * - [start](#Data$start) - start Data facet\n * - [get](#Data$get) - get DOM data from DOM tree\n * - [set](#Data$set) - set DOM data to DOM tree\n * - [path](#Data$path) - get reference to Data facet by path\n */\n_.extendProto(Data, {\n start: Data$start,\n getState: Data$getState,\n setState: Data$setState,\n\n get: Data$get,\n set: Data$set,\n del: Data$del,\n splice: Data$splice,\n len: Data$len,\n path: Data$path,\n getPath: Data$getPath,\n getKey: Data$getKey,\n\n _get: Data$_get,\n _set: Data$_set,\n _del: Data$_del,\n _splice: Data$_splice,\n _len: Data$_len,\n\n _setScalarValue: Data$_setScalarValue,\n _getScalarValue: Data$_getScalarValue,\n _bubbleUpDataChange: Data$_bubbleUpDataChange,\n _queueDataChange: Data$_queueDataChange,\n _postDataChanges: Data$_postDataChanges,\n _prepareMessageSource: _prepareMessageSource\n});\n\nfacetsRegistry.add(Data);\n\nmodule.exports = Data;\n\n\n/**\n * ModelPath methods added to Data prototype\n */\n['push', 'pop', 'unshift', 'shift'].forEach(function(methodName) {\n var method = Model.Path.prototype[methodName];\n _.defineProperty(Data.prototype, methodName, method);\n});\n\n\n\n// these methods will be wrapped to support \"*\" pattern subscriptions\nvar proxyDataSourceMethods = {\n // value: 'value',\n trigger: 'trigger'\n };\n\n\n/**\n * Data facet instance method\n * Starts Data facet\n * Called by component after component is initialized.\n */\nfunction Data$start() {\n // change messenger methods to work with \"*\" subscriptions (like Model class)\n pathUtils.wrapMessengerMethods.call(this);\n\n ComponentFacet.prototype.start.apply(this, arguments);\n\n // get/set methods to set data of element\n this.elData = getElementDataAccess(this.owner.el);\n\n this._dataChangesQueue = [];\n\n this._prepareMessageSource();\n\n // store facet data path\n this._path = '.' + this.owner.name;\n\n // current value\n this._value = this.get();\n\n // prepare internal and external messengers\n // this._prepareMessengers();\n\n // subscribe to DOM event and accessors' messages\n this.onSync('', onOwnDataChange);\n\n // message to mark the end of batch on the current level\n this.onSync('datachangesfinished', onDataChangesFinished);\n\n // changes in scope children with Data facet\n this.onSync('childdata', onChildData);\n\n // to enable reactive connections\n this.onSync('changedata', changeDataHandler);\n}\n\n\n/**\n * Data facet instance method\n * Create and connect internal and external messengers of Data facet.\n * External messenger's methods are proxied on the Data facet and they allows \"*\" subscriptions.\n */\n// function _prepareMessengers() {\n // Data facet will post all its changes on internal messenger\n // var internalMessenger = new Messenger(this);\n\n // message source to connect internal messenger to external\n // var internalMessengerSource = new MessengerMessageSource(this, undefined, new ModelMsgAPI, internalMessenger);\n\n // external messenger to which all model users will subscribe,\n // that will allow \"*\" subscriptions and support \"changedata\" message api.\n // var externalMessenger = new Messenger(this, Messenger.defaultMethods, internalMessengerSource);\n\n// _.defineProperties(this, {\n// _messenger: externalMessenger,\n// _internalMessenger: internalMessenger\n// });\n// }\n\n\n/**\n * Data facet instance method\n * Initializes DOMEventsSource and connects it to Data facet messenger\n *\n * @private\n */\nfunction _prepareMessageSource() {\n var dataAPI = new DataMsgAPI(this.owner)\n , dataEventsSource = new DOMEventsSource(this, proxyDataSourceMethods, dataAPI, this.owner);\n this._setMessageSource(dataEventsSource);\n\n _.defineProperty(this, '_dataEventsSource', dataEventsSource);\n\n // make value method of DataMsgAPI available on Data facet\n // this is a private method, get() should be used to get data.\n Mixin.prototype._createProxyMethod.call(dataAPI, 'value', 'value', this);\n}\n\n\n/**\n * Subscriber to data change event\n *\n * @private\n * @param {String} msgType in this instance will be ''\n * @param {Object} data data change information\n */\nfunction onOwnDataChange(msgType, data) {\n this._bubbleUpDataChange(data);\n this._queueDataChange(data);\n if (data.path === '') {\n var inTransaction = getTransactionFlag(data);\n this.postMessage('datachangesfinished', { transaction: inTransaction });\n }\n}\n\n\n/**\n * Data facet instance method\n * Sends data `message` to DOM parent\n *\n * @private\n * @param {Object} msgData data change message\n */\nfunction Data$_bubbleUpDataChange(msgData) {\n var parentData = this.scopeParent();\n\n if (parentData) {\n var parentMsg = _.clone(msgData);\n parentMsg.path = (this._path || ('.' + this.owner.name)) + parentMsg.path;\n parentData.postMessage('childdata', parentMsg || msgData);\n }\n}\n\n\n/**\n * Data facet instance method\n * Queues data messages to be dispatched to connector\n *\n * @private\n * @param {Object} change data change description\n */\nfunction Data$_queueDataChange(change) {\n this._dataChangesQueue.push(change);\n}\n\n\n/**\n * Subscriber to datachangesfinished event.\n * Calls the method to post changes batch and bubbles up the message\n *\n * @param {[type]} msg [description]\n * @param {[type]} data [description]\n */\nfunction onDataChangesFinished(msg, data) {\n this._postDataChanges(data.inTransaction);\n var parentData = this.scopeParent();\n if (parentData) parentData.postMessage('datachangesfinished', data);\n}\n\n\n/**\n * Dispatches all changes collected in the batch\n * Used for data propagation - connector subscribes to this message\n *\n * @private\n */\nfunction Data$_postDataChanges(inTransaction) {\n var queue = this._dataChangesQueue.reverse();\n this.postMessageSync('datachanges', {\n changes: queue,\n transaction: inTransaction\n });\n this._dataChangesQueue = []; // it can't be .length = 0, as the actual array may still be used\n}\n\n\n/**\n * Subscriber to data change event in child Data facet\n *\n * @private\n * @param {String} msgType\n * @param {Obejct} data data change information\n */\nfunction onChildData(msgType, data) {\n this.postMessage(data.path, data);\n this._bubbleUpDataChange(data);\n this._queueDataChange(data);\n}\n\n\n/**\n * Data facet instance method\n * Sets data in DOM hierarchy recursively.\n * Returns the object with the data actually set (can be different, if components matching some properties are missing).\n *\n * @param {Object|String|Number} value value to be set. If the value if scalar, it will be set on component's element, if the value is object - on DOM tree inside component\n * @return {Object|String|Number}\n */\nfunction Data$set(value) {\n var inTransaction = getTransactionFlag(Data$set);\n\n try {\n return executeHook.call(this, 'set', arguments);\n } catch (e) {\n if (e != noHook) throw e;\n }\n\n setTransactionFlag(this._set, inTransaction);\n\n var oldValue = this._value\n , newValue = this._set(value);\n\n // this message triggers onOwnDataChange, as well as actuall DOM change\n // so the parent gets notified\n var msg = { path: '', type: 'changed',\n newValue: newValue, oldValue: oldValue };\n setTransactionFlag(msg, inTransaction);\n this.postMessage('', msg);\n\n return newValue;\n}\n\n\nfunction Data$_set(value) {\n var inTransaction = getTransactionFlag(Data$_set);\n\n var valueSet;\n if (value != null && typeof value == 'object') {\n if (Array.isArray(value)) {\n valueSet = [];\n\n var listFacet = this.owner.list;\n if (listFacet){\n var listLength = listFacet.count()\n , newItemsCount = value.length - listLength;\n if (newItemsCount >= 3) {\n listFacet._addItems(newItemsCount);\n listFacet._updateDataPaths(listLength, listFacet.count());\n }\n\n value.forEach(function(childValue, index) {\n setChildData.call(this, valueSet, childValue, index, '[$$]');\n }, this);\n\n var listCount = listFacet.count()\n , removeCount = listCount - value.length;\n\n while (removeCount-- > 0)\n listFacet._removeItem(value.length);\n } else\n logger.warn('Data: setting array data without List facet');\n } else {\n valueSet = {};\n _.eachKey(value, function(childValue, key) {\n setChildData.call(this, valueSet, childValue, key, '.$$');\n }, this);\n }\n } else\n valueSet = this._setScalarValue(value);\n\n this._value = valueSet;\n\n return valueSet;\n\n\n function setChildData(valueSet, childValue, key, pathSyntax) {\n var childPath = pathSyntax.replace('$$', key);\n var childDataFacet = this.path(childPath, typeof childValue != 'undefined');\n if (childDataFacet) {\n setTransactionFlag(childDataFacet.set, inTransaction);\n valueSet[key] = childDataFacet.set(childValue);\n }\n }\n}\n\n\n/**\n * Data facet instance method\n * Deletes component from view and scope, only in case it has Item facet on it\n */\nfunction Data$del() {\n var inTransaction = getTransactionFlag(Data$del);\n\n try {\n var result = executeHook.call(this, 'del');\n postTransactionFinished.call(this, inTransaction);\n return result;\n } catch (e) {\n if (e != noHook) throw e;\n }\n\n var oldValue = this._value;\n\n setTransactionFlag(this._del, inTransaction);\n this._del();\n\n // this message triggers onOwnDataChange, as well as actuall DOM change\n // so the parent gets notified\n var msg = { path: '', type: 'deleted', oldValue: oldValue };\n setTransactionFlag(msg, inTransaction);\n this.postMessage('', msg);\n}\n\n\nfunction Data$_del() {\n var inTransaction = getTransactionFlag(Data$_del);\n setTransactionFlag(this._set, inTransaction);\n this._set();\n}\n\n\n/**\n * Data facet instance method\n * Sets scalar value to DOM element\n *\n * @private\n * @param {String|Number} value value to set to DOM element\n */\nfunction Data$_setScalarValue(value) {\n return this.elData.set(this.owner.el, value);\n}\n\n\n/**\n * Data facet instance method\n * Get structured data from DOM hierarchy recursively\n * Returns DOM data\n *\n * @param {Boolean} deepGet true by default\n * @return {Object}\n */\nfunction Data$get(deepGet) {\n try {\n return executeHook.call(this, 'get', arguments);\n } catch (e) {\n if (e != noHook) throw e;\n }\n\n return this._get(deepGet);\n}\n\nfunction Data$_get(deepGet) {\n if (deepGet === false) // a hack to enable getting shallow state\n return;\n\n var comp = this.owner\n , scopeData;\n\n if (comp.list) {\n scopeData = [];\n comp.list.each(function(listItem, index) {\n scopeData[index] = listItem.data.get();\n });\n\n if (comp.container)\n comp.container.scope._each(function(scopeItem, name) {\n if (! comp.list.contains(scopeItem) && scopeItem.data)\n scopeData[name] = scopeItem.data.get();\n });\n } else if (comp.container) {\n scopeData = {};\n comp.container.scope._each(function(scopeItem, name) {\n if (scopeItem.data)\n scopeData[name] = scopeItem.data.get();\n });\n } else\n scopeData = this._getScalarValue();\n\n this._value = scopeData;\n\n return scopeData;\n}\n\n\n/**\n * Data facet instance method\n * Gets scalar data from DOM element\n *\n * @private\n */\nfunction Data$_getScalarValue() {\n return this.elData.get(this.owner.el);\n}\n\n\n/**\n * Data facet instance method\n * Splices List items. Requires List facet to be present on component. Works in the same way as array splice.\n * Returns data retrieved from removed items\n *\n * @param {Integer} spliceIndex index to delete/insert at\n * @param {Integer} spliceHowMany number of items to delete\n * @param {List} arguments optional items to insert\n * @return {Array}\n */\nfunction Data$splice(spliceIndex, spliceHowMany) { //, ... arguments\n var inTransaction = getTransactionFlag(Data$splice);\n var result;\n\n try {\n var result = executeHook.call(this, 'splice', arguments);\n postTransactionFinished.call(this, inTransaction);\n return result;\n } catch (e) {\n if (e != noHook) throw e;\n }\n\n setTransactionFlag(this._splice, inTransaction);\n result = this._splice.apply(this, arguments);\n\n if (!result) return;\n\n var msg = { path: '', type: 'splice',\n index: result.spliceIndex,\n removed: result.removed,\n addedCount: result.addedCount,\n newValue: this._value };\n setTransactionFlag(msg, inTransaction);\n this.postMessage('', msg);\n\n return result.removed;\n}\n\n\nvar noHook = {};\nfunction executeHook(methodName, args) {\n var hook = this.config[methodName];\n switch (typeof hook) {\n case 'function':\n return hook.apply(this.owner, args);\n\n case 'string':\n return this.owner[hook].apply(this.owner, args);\n\n default:\n throw noHook;\n }\n}\n\n\nfunction Data$_splice(spliceIndex, spliceHowMany) { //, ... arguments\n var inTransaction = getTransactionFlag(Data$_splice);\n\n var listFacet = this.owner.list;\n if (! listFacet)\n return logger.warn('Data: cannot use splice method without List facet');\n\n var removed = [];\n\n var listLength = listFacet.count();\n arguments[0] = spliceIndex =\n modelUtils.normalizeSpliceIndex(spliceIndex, listLength);\n\n if (spliceHowMany > 0 && listLength > 0) {\n for (var i = spliceIndex; i < spliceIndex + spliceHowMany; i++) {\n var item = listFacet.item(spliceIndex);\n if (item) {\n var itemData = item.data.get();\n listFacet._removeItem(spliceIndex);\n } else\n logger.warn('Data: no item for index', i);\n\n removed.push(itemData);\n }\n\n listFacet._updateDataPaths(spliceIndex, listFacet.count());\n }\n\n var added = [];\n\n var argsLen = arguments.length\n , addItems = argsLen > 2\n , addedCount = argsLen - 2;\n if (addItems) {\n listFacet._addItems(addedCount, spliceIndex);\n for (var i = 2, j = spliceIndex; i < argsLen; i++, j++) {\n var item = listFacet.item(j);\n if (item) {\n setTransactionFlag(item.data.set, inTransaction);\n var itemData = item.data.set(arguments[i]);\n } else\n logger.warn('Data: no item for index', j);\n\n added.push(itemData);\n }\n\n // change paths of items that were added and items after them\n listFacet._updateDataPaths(spliceIndex, listFacet.count());\n }\n\n // if (Array.isArray(this._value)) {\n // _.prependArray(added, [spliceIndex, spliceHowMany]);\n // Array.prototype.splice.apply(this._value, added);\n // } else\n this._value = this.get();\n\n return {\n spliceIndex: spliceIndex,\n removed: removed,\n addedCount: addItems ? addedCount : 0\n };\n}\n\n\nfunction Data$len() {\n try {\n return executeHook.call(this, 'len');\n } catch (e) {\n if (e != noHook) throw e;\n }\n \n return this._len();\n}\n\n\nfunction Data$_len() {\n if (this.owner.list) return this.owner.list.count();\n else logger.error('Data: len called without list facet');\n}\n\n\n/**\n * Data facet instance method\n * Returns data facet of a child component (by scopes) corresponding to the path\n * @param {String} accessPath data access path\n */\nfunction Data$path(accessPath, createItem) {\n // createItem = true; // this hack seems to be no longer needed...\n\n if (! accessPath)\n return this;\n\n var parsedPath = pathUtils.parseAccessPath(accessPath);\n var currentComponent = this.owner;\n\n for (var i = 0, len = parsedPath.length; i < len; i++) {\n var pathNode = parsedPath[i]\n , nodeKey = pathUtils.getPathNodeKey(pathNode);\n if (pathNode.syntax == 'array' && currentComponent.list) {\n var itemComponent = currentComponent.list.item(nodeKey);\n if (! itemComponent && createItem !== false) {\n itemComponent = currentComponent.list._addItem(nodeKey);\n itemComponent.data._path = pathNode.property;\n }\n currentComponent = itemComponent;\n } else if (currentComponent.container)\n currentComponent = currentComponent.container.scope[nodeKey];\n\n var currentDataFacet = currentComponent && currentComponent.data;\n if (! currentDataFacet)\n break;\n }\n\n return currentDataFacet;\n}\n\n\n/**\n * Data facet instance method\n * Returns path to access this data facet from parent (using path method)\n *\n * @return {String}\n */\nfunction Data$getPath() {\n return this._path;\n}\n\n\n/**\n * Data facet instance method\n * Returns key to access the value related to this data facet on the value related to parent data facet.\n * If component has List facet, returns index\n *\n * @return {String|Integer}\n */\nfunction Data$getKey() {\n var path = this._path;\n return path[0] == '['\n ? +path.slice(1, -1) // remove \"[\" and \"]\"\n : path.slice(1) // remove leading \".\"\n}\n\n\n/**\n * Data facet instance method\n * Called by `Component.prototype.getState` to get facet's state\n * Returns DOM data\n *\n * @param {Boolean} deepState, true by default\n * @return {Object}\n */\nfunction Data$getState(deepState) {\n return { state: this.get(deepState) };\n}\n\n\n/**\n * Data facet instance method\n * Called by `Component.prototype.setState` to set facet's state\n * Simply sets model data\n *\n * @param {Object} state data to set on facet's model\n */\nfunction Data$setState(state) {\n return this.set(state.state);\n}\n", "'use strict';\n\n\nvar ComponentFacet = require('../c_facet')\n , facetsRegistry = require('./cf_registry') \n , miloCore = require('milo-core')\n , _ = miloCore.proto\n , check = miloCore.util.check\n , Match = check.Match\n , doT = miloCore.util.doT\n , binder = require('../../binder')\n , BindAttribute = require('../../attributes/a_bind')\n , domUtils = require('../../util/dom')\n , config = require('../../config');\n\n\n/**\n * `milo.registry.facets.get('Dom')`\n * Facet with component related dom utils\n */\nvar Dom = _.createSubclass(ComponentFacet, 'Dom');\n\n_.extend(Dom, {\n createElement: Dom$$createElement\n});\n\n\n/**\n * Facet class method\n * Creates an element from a passed configuation object\n * \n * @param {Object} config with the properties `domConfig`, `content`, `template`\n * @return {Element} an html element \n */\nfunction Dom$$createElement(config) {\n var domConfig = config.domConfig || {}\n , tagName = domConfig.tagName || 'div'\n , newEl = document.createElement(tagName)\n , content = config.content\n , template = config.template;\n\n // TODO it will be called again when/if component is instantiated\n // Should be someproperty on element to indicate it's been called?\n _applyConfigToElement(newEl, domConfig);\n\n if (typeof content == 'string') {\n if (template)\n newEl.innerHTML = doT.template(template)({content: content});\n else\n newEl.innerHTML = content;\n }\n return newEl;\n}\n\n\nfunction _applyConfigToElement(el, config) {\n var cssClasses = config && config.cls\n , configAttributes = config && config.attributes;\n\n if (configAttributes)\n _.eachKey(configAttributes, function(attrValue, attrName) {\n el.setAttribute(attrName, attrValue);\n });\n\n if (cssClasses)\n _attachCssClasses(el, 'add', cssClasses);\n}\n\n\n_.extendProto(Dom, {\n start: start,\n\n show: show,\n hide: hide,\n toggle: toggle,\n detach: detach,\n remove: remove,\n append: append,\n prepend: prepend,\n appendChildren: appendChildren,\n prependChildren: prependChildren,\n insertAfter: insertAfter,\n insertBefore: insertBefore,\n appendToScopeParent: appendToScopeParent,\n children: Dom$children,\n setStyle: setStyle,\n setStyles: setStyles,\n copy: copy,\n createElement: createElement,\n\n addCssClasses: _.partial(_manageCssClasses, 'add'),\n removeCssClasses: _.partial(_manageCssClasses, 'remove'),\n toggleCssClasses: _.partial(_manageCssClasses, 'toggle'),\n\n find: find,\n hasTextBeforeSelection: hasTextBeforeSelection,\n hasTextAfterSelection: hasTextAfterSelection,\n});\n\nfacetsRegistry.add(Dom);\n\nmodule.exports = Dom;\n\n\n// start Dom facet\nfunction start() {\n var el = this.owner.el;\n _applyConfigToElement(el, this.config);\n var currentStyle = window.getComputedStyle(el)\n this._visible = currentStyle && currentStyle.display != 'none';\n}\n\n// show HTML element of component\nfunction show() {\n this.toggle(true);\n}\n\n// hide HTML element of component\nfunction hide() {\n this.toggle(false);\n}\n\n// show/hide\nfunction toggle(doShow) {\n doShow = typeof doShow == 'undefined'\n ? ! this._visible\n : !! doShow;\n\n this._visible = doShow;\n var el = this.owner.el;\n\n el.style.display = doShow ? 'block' : 'none';\n\n return doShow;\n}\n\n\nfunction _manageCssClasses(methodName, cssClasses, enforce) {\n _attachCssClasses(this.owner.el, methodName, cssClasses, enforce);\n}\n\n\nfunction _attachCssClasses(el, methodName, cssClasses, enforce) {\n var classList = el.classList\n , doToggle = methodName == 'toggle';\n\n if (Array.isArray(cssClasses))\n cssClasses.forEach(callMethod);\n else if (typeof cssClasses == 'string')\n callMethod(cssClasses);\n else\n throw new Error('unknown type of CSS classes parameter');\n\n function callMethod(cssCls) {\n doToggle\n // Only pass 'enforce' if a value has been provided (The 'toggle' function of the classList will treat undefined === false resulting in only allowing classes to be removed)\n ? enforce === undefined ? classList[methodName](cssCls) : classList[methodName](cssCls, enforce)\n : classList[methodName](cssCls);\n }\n}\n\n\nfunction detach() {\n if (this.owner.el) \n domUtils.detachComponent(this.owner.el);\n}\n\n\nfunction setStyle(property, value) {\n if (!this.owner.el) {\n throw new Error(\"Cannot call setStyle on owner with no element: \" + this.owner.constructor.name);\n }\n this.owner.el.style[property] = value;\n}\n\nfunction setStyles(properties) {\n for (var property in properties)\n this.owner.el.style[property] = properties[property];\n}\n\n\n// create a copy of DOM element using facet config if set\nfunction copy(isDeep) {\n return this.owner.el && this.owner.el.cloneNode(isDeep);\n}\n\n\nfunction createElement() {\n var newEl = Dom.createElement(this.config);\n return newEl;\n}\n\n\n// remove HTML element of component\nfunction remove() {\n domUtils.removeElement(this.owner.el);\n}\n\n// append inside HTML element of component\nfunction append(el) {\n this.owner.el.appendChild(el);\n}\n\n// prepend inside HTML element of component\nfunction prepend(el) {\n var thisEl = this.owner.el\n , firstChild = thisEl.firstChild;\n if (firstChild)\n thisEl.insertBefore(el, firstChild);\n else\n thisEl.appendChild(el);\n}\n\n// appends children of element inside this component's element\nfunction appendChildren(el) {\n while(el.childNodes.length)\n this.append(el.childNodes[0]);\n}\n\n// prepends children of element inside this component's element\nfunction prependChildren(el) {\n while(el.childNodes.length)\n this.prepend(el.childNodes[el.childNodes.length - 1]);\n}\n\nfunction insertAfter(el) {\n var thisEl = this.owner.el\n , parent = thisEl.parentNode; \n parent.insertBefore(el, thisEl.nextSibling);\n}\n\nfunction insertBefore(el) {\n var thisEl = this.owner.el\n , parent = thisEl.parentNode;\n parent.insertBefore(el, thisEl);\n}\n\n\n// appends component's element to scope parent. If it was alredy in DOM it will be moved\nfunction appendToScopeParent() {\n var parent = this.owner.getScopeParent();\n if (parent) parent.el.appendChild(this.owner.el);\n}\n\n\n/**\n * Dom facet instance method\n * Returns the list of child elements of the component element\n *\n * @return {Array[Element]}\n */\nfunction Dom$children() {\n return domUtils.children(this.owner.el);\n}\n\n\nvar findDirections = {\n 'up': 'previousNode',\n 'down': 'nextNode'\n};\n\n// Finds component passing optional iterator's test\n// in the same scope as the current component (this)\n// by traversing DOM tree upwards (direction = \"up\")\n// or downwards (direction = \"down\")\nfunction find(direction, iterator) {\n if (! findDirections.hasOwnProperty(direction))\n throw new Error('incorrect find direction: ' + direction);\n\n var el = this.owner.el\n , scope = this.owner.scope\n , treeWalker = document.createTreeWalker(scope._rootEl, NodeFilter.SHOW_ELEMENT);\n\n treeWalker.currentNode = el;\n var nextNode = treeWalker[findDirections[direction]]()\n , componentsNames = Object.keys(scope)\n , found = false;\n\n while (nextNode) {\n var attr = new BindAttribute(nextNode);\n if (attr.node) {\n attr.parse().validate();\n if (scope.hasOwnProperty(attr.compName)) {\n var component = scope[attr.compName];\n if (! iterator || iterator(component)) {\n found = true;\n break;\n }\n }\n }\n treeWalker.currentNode = nextNode;\n nextNode = treeWalker[findDirections[direction]]();\n }\n\n if (found) return component;\n}\n\n\n// returns true if the element has text before selection\nfunction hasTextBeforeSelection() {\n var selection = window.getSelection();\n if (! selection.isCollapsed) return true;\n \n var text = selection.focusNode && selection.focusNode.textContent;\n var startPos = text && text.charAt(0) == ' ' ? 1 : 0;\n if (selection.anchorOffset != startPos) return true;\n\n // walk up the DOM tree to check if there are text nodes before cursor\n var treeWalker = document.createTreeWalker(this.owner.el, NodeFilter.SHOW_TEXT);\n treeWalker.currentNode = selection.anchorNode;\n var prevNode = treeWalker.previousNode();\n\n var isText = prevNode ? !prevNode.nodeValue.trim() == '' : false;\n\n return isText;\n}\n\n\nfunction hasTextAfterSelection() {\n var selection = window.getSelection();\n if (! selection.isCollapsed) return true;\n\n var text = selection.focusNode && selection.focusNode.textContent;\n var startPos = text && text.charAt(text.length-1) == ' ' ? selection.anchorNode.length-1 : selection.anchorNode.length;\n if (selection.anchorOffset < startPos) return true;\n\n // walk up the DOM tree to check if there are text nodes after cursor\n var treeWalker = document.createTreeWalker(this.owner.el, NodeFilter.SHOW_TEXT);\n treeWalker.currentNode = selection.anchorNode;\n var nextNode = treeWalker.nextNode();\n \n //To capture when treewalker gives us an empty text node (unknown reason)\n var isText = nextNode ? !nextNode.nodeValue.trim() == '' : false;\n\n return isText;\n}\n", "'use strict';\n\n// \n// ###drag facet\n\nvar ComponentFacet = require('../c_facet')\n , facetsRegistry = require('./cf_registry')\n , DOMEventsSource = require('../msg_src/dom_events')\n , Component = require('../c_class')\n , DragDrop = require('../../util/dragdrop')\n , miloCore = require('milo-core')\n , _ = miloCore.proto\n , logger = miloCore.util.logger;\n\n\n/**\n * `milo.registry.facets.get('Drag')`\n * Facet for components that can be dragged\n * Drag facet supports the following configuration parameters:\n *\n * - meta: object with properties\n * - params: object of key-value pairs that will be passed in metadata data type (can also be function or method name that returns this object). See config.dragDrop.dataTypes.componentMetaTemplate\n * - data: data that will be stored in the above meta data type (or function)\n * - allowedEffects: string (or function) as specified here: https://developer.mozilla.org/en-US/docs/DragDrop/Drag_Operations#dragstart\n * - dragImage:\n * - url: path to image to display when dragging, instead of the owner element\n * - x: x offset for the image\n * - y: y offset for the image\n * - dragCls: CSS class to apply to the component being dragged\n * - dataTypes: map of additional data types the component will supply to data transfer object, key is data type, value is a function that returns it, component will be passed as the context to this function\n *\n * If function is specified in any parameter it will be called with the component as the context\n */\nvar Drag = _.createSubclass(ComponentFacet, 'Drag');\n\n_.extendProto(Drag, {\n init: Drag$init,\n start: Drag$start,\n setHandle: Drag$setHandle\n});\n\nfacetsRegistry.add(Drag);\n\nmodule.exports = Drag;\n\n\nfunction Drag$init() {\n ComponentFacet.prototype.init.apply(this, arguments);\n\n this._createMessageSourceWithAPI(DOMEventsSource);\n this._dragData = {};\n\n var dataTypeInfo = this.config._dataTypeInfo || '';\n this._dataTypeInfo = typeof dataTypeInfo == 'function'\n ? dataTypeInfo\n : function() { return dataTypeInfo; };\n}\n\n\n/**\n * Drag facet instance method\n * Sets the drag handle element of component. This element has to be dragged for the component to be dragged.\n *\n * @param {Element} handleEl\n */\nfunction Drag$setHandle(handleEl) {\n if (! this.owner.el.contains(handleEl))\n return logger.warn('drag handle should be inside element to be dragged')\n this._dragHandle = handleEl;\n}\n\n\nfunction Drag$start() {\n ComponentFacet.prototype.start.apply(this, arguments);\n _addDragAttribute.call(this);\n _createDragImage.call(this);\n _toggleDragCls.call(this, false);\n\n this.onMessages({\n 'mousedown': onMouseDown,\n 'mouseenter mouseleave mousemove': onMouseMovement,\n 'dragstart': onDragStart,\n 'drag': onDragging,\n 'dragend': onDragEnd\n });\n\n this.owner.onMessages({\n 'getstatestarted':\n { subscriber: _removeDragAttribute, context: this },\n 'getstatecompleted':\n { subscriber: _addDragAttribute, context: this }\n });\n}\n\n\n/**\n * Adds draggable attribute to component's element\n *\n * @private\n */\nfunction _addDragAttribute() {\n if (this.owner.el)\n this.owner.el.setAttribute('draggable', true);\n}\n\n\nfunction _removeDragAttribute() {\n if (this.owner.el)\n this.owner.el.removeAttribute('draggable');\n}\n\n\nfunction _createDragImage() {\n var dragImage = this.config.dragImage;\n if (dragImage) {\n this._dragElement = new Image();\n this._dragElement.src = dragImage.url;\n }\n}\n\n\nfunction onMouseDown(eventType, event) {\n this.__mouseDownTarget = event.target;\n if (targetInDragHandle.call(this)) {\n window.getSelection().empty();\n event.stopPropagation();\n }\n}\n\n\nfunction onMouseMovement(eventType, event) {\n var shouldBeDraggable = targetInDragHandle.call(this);\n this.owner.el.setAttribute('draggable', shouldBeDraggable);\n if (document.body.getAttribute('data-dragEnableEvent') != 'false')\n event.stopPropagation();\n}\n\n\nfunction onDragStart(eventType, event) {\n event.stopPropagation();\n\n if (this.config.off || ! targetInDragHandle.call(this)) {\n event.preventDefault();\n return;\n }\n\n var dragImage = this.config.dragImage;\n if (dragImage)\n event.dataTransfer.setDragImage(this._dragElement, dragImage.x || 0, dragImage.y || 0);\n\n var owner = this.owner;\n var dt = new DragDrop(event);\n\n this._dragData = dt.setComponentState(owner);\n setMeta.call(this);\n setAdditionalDataTypes.call(this);\n _setAllowedEffects.call(this, dt);\n\n _toggleDragCls.call(this, true);\n\n DragDrop.service.postMessageSync('dragdropstarted', {\n eventType: 'dragstart',\n dragDrop: dt,\n dragFacet: this\n });\n\n function setMeta() {\n var params = getMetaData.call(this, 'params')\n , data = getMetaData.call(this, 'data');\n\n this._dragMetaDataType = dt.setComponentMeta(owner, params, data);\n this._dragMetaData = data;\n }\n\n function getMetaData(property) {\n try { var func = this.config.meta[property]; } catch(e) {}\n if (typeof func == 'string') func = owner[func];\n return _.result(func, owner);\n }\n\n function setAdditionalDataTypes() {\n if (this.config.dataTypes) {\n this._dataTypesData = _.mapKeys(this.config.dataTypes, function (getDataFunc, dataType) {\n var data = getDataFunc.call(this.owner, dataType);\n if (typeof data == 'object') data = JSON.stringify(data);\n if (data) dt.setData(dataType, data);\n return data;\n }, this);\n }\n }\n}\n\n\nfunction onDragging(eventType, event) {\n if (_dragIsDisabled.call(this, event)) return;\n\n var dt = new DragDrop(event);\n dt.setComponentState(this.owner, this._dragData);\n dt.setData(this._dragMetaDataType, this._dragMetaData);\n if (this._dataTypesData) {\n _.eachKey(this._dataTypesData, function(data, dataType) {\n if (data) dt.setData(dataType, data);\n });\n }\n\n _setAllowedEffects.call(this, dt);\n}\n\n\nfunction onDragEnd(eventType, event) {\n if (_dragIsDisabled.call(this, event)) return;\n event.stopPropagation();\n\n _toggleDragCls.call(this, false);\n\n var dt = new DragDrop(event);\n DragDrop.service.postMessageSync('completedragdrop', {\n eventType: 'dragend',\n dragDrop: dt,\n dragFacet: this\n });\n}\n\n\nfunction _toggleDragCls(showHide) {\n if (this.config.dragCls)\n this.owner.el.classList.toggle(this.config.dragCls, showHide);\n}\n\n\nfunction _setAllowedEffects(DragDrop) {\n var effects = _.result(this.config.allowedEffects, this.owner);\n DragDrop.setAllowedEffects(effects);\n}\n\n\nfunction targetInDragHandle() {\n return ! this._dragHandle || this._dragHandle.contains(this.__mouseDownTarget);\n}\n\n\nfunction _dragIsDisabled(event) {\n if (this.config.off) {\n event.preventDefault();\n return true;\n }\n return false;\n}\n", diff --git a/dist/milo.min.js b/dist/milo.min.js index 79c27fe..68d5ecf 100644 --- a/dist/milo.min.js +++ b/dist/milo.min.js @@ -1,5 +1,5 @@ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gthis._maxLength){var b=this.actions.shift();b.destroy()}return this.position=this.actions.length,this.position-1}function f(){this.actions.length&&(this.position--,this.actions.length--)}function g(){for(var a=this.position;a=0||b.indexOf(w.firstLowerCase(a))>=0)}var s=a("../abstract/facet"),t=a("milo-core"),u=t.Messenger,v=a("./c_utils"),w=t.proto,x=w.createSubclass(s,"ComponentFacet");b.exports=x;var y=w.partial(l,j),z=w.partial(l,k);w.extendProto(x,{init:d,start:f,check:h,destroy:i,onConfigMessages:g,domParent:j,postDomParent:y,scopeParent:k,postScopeParent:z,getMessageSource:n,dispatchSourceMessage:o,_createMessenger:e,_setMessageSource:m,_createMessageSource:p,_createMessageSourceWithAPI:q}),w.extend(x,{requiresFacet:r});var A="_messenger";u.useWith(x,A,u.defaultMethods)},{"../abstract/facet":1,"./c_utils":34,"milo-core":108}],17:[function(a,b,c){"use strict";function d(){return o(this.owner.el,this.scope,!1)}function e(){n.prototype.start.apply(this,arguments),this.scope=new p(this.owner.el,this)}function f(a){function b(){throw new Error("path "+a+" is invalid")}a=a.split(".");var c=a.length;(a[0]||2>c)&&b();for(var d=this.owner,e=1;c>e;e++){var f=a[e];if(w.test(f)||b(),!d.container)return;if(d=d.container.scope[f],!d)return}return d}function g(a){var b={scope:{}};return a!==!1&&this.scope._each(function(a,c){b.scope[c]=a._getState()}),b}function h(a){r.eachKey(a.scope,function(a,b){var c=this.scope[b];c?c.setState(a):s.warn('component "'+b+'" does not exist on scope')},this)}function i(){this.scope._each(function(a){a.destroy()}),this.scope._detachElement(),n.prototype.destroy.apply(this,arguments)}function j(a,b){u.unwrapElement(this.owner.el),this.scope&&this.scope._each(function(b){b.remove(),a!==!1&&b.rename(void 0,!1),this.owner.scope&&this.owner.scope._add(b)},this),b!==!1&&this.owner.destroy()}function k(a){this.scope._add(a),this.owner.el.appendChild(a.el)}function l(a,b){this.scope._add(a),this.el.insertBefore(a.el,b&&b.el)}function m(a){this.scope._remove(a),this.owner.el.removeChild(a.el)}var n=a("../c_facet"),o=a("../../binder"),p=a("../scope"),q=a("milo-core"),r=q.proto,s=q.util.logger,t=a("./cf_registry"),u=a("../../util/dom"),v=r.createSubclass(n,"Container");r.extendProto(v,{start:e,path:f,getState:g,setState:h,binder:d,destroy:i,unwrap:j,append:k,insertBefore:l,remove:m}),t.add(v),b.exports=v;var w=/^[A-Za-z][A-Za-z0-9\_\$]*$/},{"../../binder":8,"../../util/dom":81,"../c_facet":16,"../scope":41,"./cf_registry":31,"milo-core":108}],18:[function(a,b,c){"use strict";function d(){q["super"].start.apply(this,arguments),o.path.wrapMessengerMethods.call(this),this.onSync("changedata",o.changeDataHandler),this.activeModelPaths={}}function e(a){var b=this;n.eachKey(a,function(a,c){var d="."!==c.charAt(0)?"."+c:c;b.update(d,a)})}function f(){n.eachKey(this.activeModelPaths,function(a,b){a.clear(),self.el.classList.remove(b)})}function g(a){return this.config.classes&&this.config.classes[a]?new l(this,a):this}function h(a,b){var c=this.config.classes[a];if(c){var d=r[typeof c];d.call(this,a,c,b),this.postMessageSync("changed",{modelPath:a,modelValue:b})}}function i(a,b,c){var d=this.owner.el.classList;if(n.eachKey(this.activeModelPaths,function(b,c){b.has(a)&&(b["delete"](a),0==b.size&&d.remove(c))}),b&&c){b=c?b.replace(/\$/g,c):b;var e=this.activeModelPaths[b]||(this.activeModelPaths[b]=new Set);e.add(a),d.add(b)}}function j(a,b,c){var d=b[c];i.call(this,a,d,c)}function k(a,b,c){var d=b.call(this,c);i.call(this,a,d,!0)}function l(a,b){this.cssFacet=a,this.modelPath=b}var m=a("milo-core"),n=m.proto,o=m.Model._utils,p=a("../../util/create_facet_class"),q=b.exports=p({className:"Css",methods:{start:d,set:e,del:f,path:g,update:h}}),r={string:i,object:j,"function":k};l.prototype.set=function(a){this.cssFacet.update(this.modelPath,a)},l.prototype.del=function(){this.set(null)}},{"../../util/create_facet_class":79,"milo-core":108}],19:[function(a,b,c){"use strict";function d(){L.wrapMessengerMethods.call(this),F.prototype.start.apply(this,arguments),this.elData=J(this.owner.el),this._dataChangesQueue=[],this._prepareMessageSource(),this._path="."+this.owner.name,this._value=this.get(),this.onSync("",f),this.onSync("datachangesfinished",i),this.onSync("childdata",k),this.onSync("changedata",N)}function e(){var a=new I(this.owner),b=new H(this,U,a,this.owner);this._setMessageSource(b),R.defineProperty(this,"_dataEventsSource",b),E.prototype._createProxyMethod.call(a,"value","value",this)}function f(a,b){if(this._bubbleUpDataChange(b),this._queueDataChange(b),""===b.path){var c=O(b);this.postMessage("datachangesfinished",{transaction:c})}}function g(a){var b=this.scopeParent();if(b){var c=R.clone(a);c.path=(this._path||"."+this.owner.name)+c.path,b.postMessage("childdata",c||a)}}function h(a){this._dataChangesQueue.push(a)}function i(a,b){this._postDataChanges(b.inTransaction);var c=this.scopeParent();c&&c.postMessage("datachangesfinished",b)}function j(a){var b=this._dataChangesQueue.reverse();this.postMessageSync("datachanges",{changes:b,transaction:a}),this._dataChangesQueue=[]}function k(a,b){this.postMessage(b.path,b),this._bubbleUpDataChange(b),this._queueDataChange(b)}function l(a){var b=O(l);try{return u.call(this,"set",arguments)}catch(c){if(c!=V)throw c}P(this._set,b);var d=this._value,e=this._set(a),f={path:"",type:"changed",newValue:e,oldValue:d};return P(f,b),this.postMessage("",f),e}function m(a){function b(a,b,c,e){var f=e.replace("$$",c),g=this.path(f,"undefined"!=typeof b);g&&(P(g.set,d),a[c]=g.set(b))}var c,d=O(m);if(null!=a&&"object"==typeof a)if(Array.isArray(a)){c=[];var e=this.owner.list;if(e){var f=e.count(),g=a.length-f;g>=3&&(e._addItems(g),e._updateDataPaths(f,e.count())),a.forEach(function(a,d){b.call(this,c,a,d,"[$$]")},this);for(var h=e.count(),i=h-a.length;i-->0;)e._removeItem(a.length)}else S.warn("Data: setting array data without List facet")}else c={},R.eachKey(a,function(a,d){b.call(this,c,a,d,".$$")},this);else c=this._setScalarValue(a);return this._value=c,c}function n(){var a=O(n);try{var b=u.call(this,"del");return Q.call(this,a),b}catch(c){if(c!=V)throw c}var d=this._value;P(this._del,a),this._del();var e={path:"",type:"deleted",oldValue:d};P(e,a),this.postMessage("",e)}function o(){var a=O(o);P(this._set,a),this._set()}function p(a){return this.elData.set(this.owner.el,a)}function q(a){try{return u.call(this,"get",arguments)}catch(b){if(b!=V)throw b}return this._get(a)}function r(a){if(a!==!1){var b,c=this.owner;return c.list?(b=[],c.list.each(function(a,c){b[c]=a.data.get()}),c.container&&c.container.scope._each(function(a,d){!c.list.contains(a)&&a.data&&(b[d]=a.data.get())})):c.container?(b={},c.container.scope._each(function(a,c){a.data&&(b[c]=a.data.get())})):b=this._getScalarValue(),this._value=b,b}}function s(){return this.elData.get(this.owner.el)}function t(a,b){var c,d=O(t);try{var c=u.call(this,"splice",arguments);return Q.call(this,d),c}catch(e){if(e!=V)throw e}if(P(this._splice,d),c=this._splice.apply(this,arguments)){var f={path:"",type:"splice",index:c.spliceIndex,removed:c.removed,addedCount:c.addedCount,newValue:this._value};return P(f,d),this.postMessage("",f),c.removed}}function u(a,b){var c=this.config[a];switch(typeof c){case"function":return c.apply(this.owner,b);case"string":return this.owner[c].apply(this.owner,b);default:throw V}}function v(a,b){var c=O(v),d=this.owner.list;if(!d)return S.warn("Data: cannot use splice method without List facet");var e=[],f=d.count();if(arguments[0]=a=M.normalizeSpliceIndex(a,f),b>0&&f>0){for(var g=a;a+b>g;g++){var h=d.item(a);if(h){var i=h.data.get();d._removeItem(a)}else S.warn("Data: no item for index",g);e.push(i)}d._updateDataPaths(a,d.count())}var j=[],k=arguments.length,l=k>2,m=k-2;if(l){d._addItems(m,a);for(var g=2,n=a;k>g;g++,n++){var h=d.item(n);if(h){P(h.data.set,c);var i=h.data.set(arguments[g])}else S.warn("Data: no item for index",n);j.push(i)}d._updateDataPaths(a,d.count())}return this._value=this.get(),{spliceIndex:a,removed:e,addedCount:l?m:0}}function w(){try{return u.call(this,"len")}catch(a){if(a!=V)throw a}return this._len()}function x(){return this.owner.list?this.owner.list.count():void S.error("Data: len called without list facet")}function y(a,b){if(!a)return this;for(var c=L.parseAccessPath(a),d=this.owner,e=0,f=c.length;f>e;e++){var g=c[e],h=L.getPathNodeKey(g);if("array"==g.syntax&&d.list){var i=d.list.item(h);i||b===!1||(i=d.list._addItem(h),i.data._path=g.property),d=i}else d.container&&(d=d.container.scope[h]);var j=d&&d.data;if(!j)break}return j}function z(){return this._path}function A(){var a=this._path;return"["==a[0]?+a.slice(1,-1):a.slice(1)}function B(a){return{ -state:this.get(a)}}function C(a){return this.set(a.state)}var D=a("milo-core"),E=D.classes.Mixin,F=a("../c_facet"),G=a("./cf_registry"),H=(D.Messenger,a("../msg_src/dom_events")),I=a("../msg_api/data"),J=a("../msg_api/de_data"),K=D.Model,L=K._utils.path,M=K._utils.model,N=K._utils.changeDataHandler,O=N.getTransactionFlag,P=N.setTransactionFlag,Q=N.postTransactionFinished,R=D.proto,S=D.util.logger,T=R.createSubclass(F,"Data");R.extendProto(T,{start:d,getState:B,setState:C,get:q,set:l,del:n,splice:t,len:w,path:y,getPath:z,getKey:A,_get:r,_set:m,_del:o,_splice:v,_len:x,_setScalarValue:p,_getScalarValue:s,_bubbleUpDataChange:g,_queueDataChange:h,_postDataChanges:j,_prepareMessageSource:e}),G.add(T),b.exports=T,["push","pop","unshift","shift"].forEach(function(a){var b=K.Path.prototype[a];R.defineProperty(T.prototype,a,b)});var U={trigger:"trigger"},V={}},{"../c_facet":16,"../msg_api/data":36,"../msg_api/de_data":37,"../msg_src/dom_events":39,"./cf_registry":31,"milo-core":108}],20:[function(a,b,c){"use strict";function d(a){var b=a.domConfig||{},c=b.tagName||"div",d=document.createElement(c),f=a.content,g=a.template;return e(d,b),"string"==typeof f&&(g?d.innerHTML=H.template(g)({content:f}):d.innerHTML=f),d}function e(a,b){var c=b&&b.cls,d=b&&b.attributes;d&&F.eachKey(d,function(b,c){a.setAttribute(c,b)}),c&&k(a,"add",c)}function f(){var a=this.owner.el;e(a,this.config);var b=window.getComputedStyle(a);this._visible=b&&"none"!=b.display}function g(){this.toggle(!0)}function h(){this.toggle(!1)}function i(a){a="undefined"==typeof a?!this._visible:!!a,this._visible=a;var b=this.owner.el;return b.style.display=a?"block":"none",a}function j(a,b,c){k(this.owner.el,a,b,c)}function k(a,b,c,d){function e(a){g?void 0===d?f[b](a):f[b](a,d):f[b](a)}var f=a.classList,g="toggle"==b;if(Array.isArray(c))c.forEach(e);else{if("string"!=typeof c)throw new Error("unknown type of CSS classes parameter");e(c)}}function l(){this.owner.el&&J.detachComponent(this.owner.el)}function m(a,b){if(!this.owner.el)throw new Error("Cannot call setStyle on owner with no element: "+this.owner.constructor.name);this.owner.el.style[a]=b}function n(a){for(var b in a)this.owner.el.style[b]=a[b]}function o(a){return this.owner.el&&this.owner.el.cloneNode(a)}function p(){var a=K.createElement(this.config);return a}function q(){J.removeElement(this.owner.el)}function r(a){this.owner.el.appendChild(a)}function s(a){var b=this.owner.el,c=b.firstChild;c?b.insertBefore(a,c):b.appendChild(a)}function t(a){for(;a.childNodes.length;)this.append(a.childNodes[0])}function u(a){for(;a.childNodes.length;)this.prepend(a.childNodes[a.childNodes.length-1])}function v(a){var b=this.owner.el,c=b.parentNode;c.insertBefore(a,b.nextSibling)}function w(a){var b=this.owner.el,c=b.parentNode;c.insertBefore(a,b)}function x(){var a=this.owner.getScopeParent();a&&a.el.appendChild(this.owner.el)}function y(){return J.children(this.owner.el)}function z(a,b){if(!L.hasOwnProperty(a))throw new Error("incorrect find direction: "+a);var c=this.owner.el,d=this.owner.scope,e=document.createTreeWalker(d._rootEl,NodeFilter.SHOW_ELEMENT);e.currentNode=c;for(var f=e[L[a]](),g=(Object.keys(d),!1);f;){var h=new I(f);if(h.node&&(h.parse().validate(),d.hasOwnProperty(h.compName))){var i=d[h.compName];if(!b||b(i)){g=!0;break}}e.currentNode=f,f=e[L[a]]()}return g?i:void 0}function A(){var a=window.getSelection();if(!a.isCollapsed)return!0;var b=a.focusNode&&a.focusNode.textContent,c=b&&" "==b.charAt(0)?1:0;if(a.anchorOffset!=c)return!0;var d=document.createTreeWalker(this.owner.el,NodeFilter.SHOW_TEXT);d.currentNode=a.anchorNode;var e=d.previousNode(),f=e?""==!e.nodeValue.trim():!1;return f}function B(){var a=window.getSelection();if(!a.isCollapsed)return!0;var b=a.focusNode&&a.focusNode.textContent,c=b&&" "==b.charAt(b.length-1)?a.anchorNode.length-1:a.anchorNode.length;if(a.anchorOffset=0;var f=d[e&&e.compClass];return!!p.result(f,this.owner,e,a);default:throw new Error("Incorrect allowed components in config")}}else{var g=c&&c.dataTypes;switch(typeof g){case"undefined":return!1;case"string":return a.types.indexOf(g)>=0}}}var k=a("../c_facet"),l=a("./cf_registry"),m=a("../msg_src/dom_events"),n=a("../msg_api/drop"),o=a("../../util/dragdrop"),p=a("milo-core").proto,q=p.createSubclass(k,"Drop");p.extendProto(q,{init:d,start:e}),l.add(q),b.exports=q;var r=p.throttle(i,50)},{"../../util/dragdrop":84,"../c_facet":16,"../msg_api/drop":38,"../msg_src/dom_events":39,"./cf_registry":31,"milo-core":108}],23:[function(a,b,c){"use strict";function d(){e.prototype.init.apply(this,arguments);var a=new h(this,void 0,void 0,this.owner);this._setMessageSource(a),i.defineProperty(this,k,a)}var e=a("../c_facet"),f=a("./cf_registry"),g=a("milo-core"),h=(g.Messenger,a("../msg_src/dom_events")),i=g.proto,j=i.createSubclass(e,"Events");i.extendProto(j,{init:d}),f.add(j),b.exports=j;var k="_domEventsSource";h.useWith(j,k,["trigger"])},{"../c_facet":16,"../msg_src/dom_events":39,"./cf_registry":31,"milo-core":108}],24:[function(a,b,c){"use strict";function d(){l.prototype.init.apply(this,arguments);var a=new o(this,void 0,void 0,this.owner);this._setMessageSource(a),p.defineProperty(this,t,a)}function e(){function a(a){b.postMessage("domready",a)}l.prototype.start.apply(this,arguments);var b=this;milo(a)}function f(){l.prototype.destroy.apply(this,arguments)}function g(){return this.owner.el.contentWindow}function h(){var a=this.getWindow().document.readyState;return"loading"!=a?a:!1}function i(){var a=this.getWindow().milo;return this.isReady()&&a&&a.milo_version}function j(a){if("function"==typeof a){var b=this;this.whenMiloReady(function(){b.getWindow().milo(a)})}var c=this.getWindow();return c&&c.milo}function k(a,b){return function(c){function d(){c.apply(e,f)}var e=this,f=p.slice(arguments,1);a.call(this)?d():this.on(b,d)}}var l=a("../c_facet"),m=a("./cf_registry"),n=a("milo-core"),o=(n.Messenger,a("../msg_src/frame")),p=(a("../../services/de_constrs"),n.proto),q=p.createSubclass(l,"Frame"),r=k(h,"domready"),s=k(i,"message:miloready");p.extendProto(q,{init:d,start:e,destroy:f,getWindow:g,isReady:h,whenReady:r,isMiloReady:i,whenMiloReady:s,milo:j}),m.add(q),b.exports=q;var t="_messageSource";o.useWith(q,t,["trigger"])},{"../../services/de_constrs":69,"../c_facet":16,"../msg_src/frame":40,"./cf_registry":31,"milo-core":108}],25:[function(a,b,c){"use strict";function d(){return{state:{index:this.getIndex()}}}function e(a){this.setIndex(a.state.index)}function f(){return this.index}function g(a){this.index=a}function h(){this.list.removeItem(this.index)}function i(){this.list.extractItem(this.index)}var j=a("../c_facet"),k=a("./cf_registry"),l=a("milo-core"),m=(l.Model,l.proto),n=(a("../../services/mail"),m.createSubclass(j,"Item"));m.extendProto(n,{getState:d,setState:e,getIndex:f,setIndex:g,removeItem:h,extractItem:i,require:["Container","Dom","Data"]}),k.add(n),b.exports=n},{"../../services/mail":71,"../c_facet":16,"./cf_registry":31,"milo-core":108}],26:[function(a,b,c){"use strict";function d(){A.prototype.init.apply(this,arguments);E.defineProperties(this,{_listItems:[],_listItemsHash:{}}),E.defineProperty(this,"itemSample",null,E.WRIT)}function e(){this.owner.on("childrenbound",f)}function f(){var a=this.dom.children(),b=this.list._listItems,c=this.list._listItemsHash;if(a&&a.forEach(function(a){var d=B.getComponent(a);d&&d.item&&(b.push(d),c[d.name]=d,d.item.list=this.list)},this),b.length){var d=b[0];b.splice(0,1),delete c[d.name],b.forEach(function(a,b){a.item.setIndex(b)})}if(!d)throw new Error("No child component has Item facet");this.list.itemSample=d,d.dom.hide(),d.remove(!0),d.dom.removeCssClasses(N),d.walkScopeTree(function(a){delete a.el[M.componentRef]}),this.list._createCacheTemplate()}function g(){if(!this.itemSample)return!1;var a=this.itemSample,b=a.el.cloneNode(!0),c=a.componentInfo.attr;E.clone(c);c.compName="{{= it.componentName() }}",c.el=b,c.decorate();var d="{{ var i = it.count; while(i--) { }}"+b.outerHTML+"{{ } }}";this.itemsTemplate=H.compile(d)}function h(a){return this._listItems[a]}function i(){return this._listItems.length}function k(a,b){this._listItems.splice(a,0,b),this._listItemsHash[b.name]=b,b.item.list=this,b.item.setIndex(+a)}function l(a){return this._listItemsHash[a.name]==a}function m(a,b){return a=isNaN(+a)?this.count():+a,this.owner.data.splice(a,0,b||{}),this.item(a)}function n(a){if(this.item(a))throw Error("attempt to create item with ID of existing item");var b=B.copy(this.itemSample,!0),c=this._itemPreviousComponent(a);return c.el.parentNode?(c.dom.insertAfter(b.el),this._setItem(a,b),b.el.style.display="",o.call(this,a+1),b):G.warn("list item sample was removed from DOM, probably caused by wrong data. Reset list data with array")}function o(a,b){a=a||0,b=b||this.count();for(var c=a;b>c;c++){var d=this._listItems[c];d?d.item.setIndex(c):G.warn("List: no item at position",c)}}function p(a,b){var c=E.slice(arguments,2);c.lengtha)throw new Error("can't add negative number of items");if(0!=a){var c=this.itemsTemplate({componentName:L,count:a}),d=document.createElement("div");d.innerHTML=c,F(d,this.owner.container.scope);var e=K.children(d);if(a!=e.length&&G.error("number of items added is different from requested"),e&&e.length){var f=this.count(),g=0>b?0:"undefined"==typeof b||b>f?f:b,h=0==g?this.itemSample:this._listItems[g-1],i=document.createDocumentFragment(),j=[];if(e.forEach(function(a,b){var c=B.getComponent(a);return c?(j.push(c),this._setItem(g++,c),i.appendChild(a),void(a.style.display="")):G.error("List: element in new items is not a component")},this),o.call(this,g),!h.el.parentNode)return G.warn("list item sample was removed from DOM, probably caused by wrong data. Reset list data with array");h.dom.insertAfter(i),E.deferMethod(j,"forEach",function(a){a.broadcast("stateready")})}}}function r(a){return this.owner.data.splice(a,1)}function s(a){var b=this._removeItem(a,!1);return this._updateDataPaths(a,this.count()),b}function t(a,b){var c=this.item(a);return c?(this._listItems[a]=void 0,delete this._listItemsHash[c.name],b!==!1?c.destroy():(c.remove(),c.dom.remove()),this._listItems.splice(a,1),o.call(this,a),c):G.warn("attempt to remove list item with id that does not exist")}function u(a,b){var c=this.item(a);c.dom.insertAfter(b.el),this._removeItem(a),this._setItem(a,b)}function v(a){for(;a>=0&&!this._listItems[a];)a--;return a>=0?this._listItems[a]:this.itemSample}function w(a,b){for(var c=a;b>c;c++){var d=this.item(c);d?d.data._path="["+c+"]":G.warn("Data: no item for index",j)}}function x(a,b){this._listItems.forEach(function(b,c){b?a.apply(this,arguments):G.warn("List$each: item",c,"is undefined")},b||this)}function y(a,b){return this._listItems.map(function(b,c){return b?a.apply(this,arguments):void G.warn("List$map: item",c,"is undefined")},b||this)}function z(){this.itemSample&&this.itemSample.destroy(!0),A.prototype.destroy.apply(this,arguments)}var A=a("../c_facet"),B=a("../c_class"),C=a("./cf_registry"),D=a("milo-core"),E=D.proto,F=(a("../../services/mail"),a("../../binder")),G=D.util.logger,H=D.util.doT,I=D.util.check,J=I.Match,K=a("../../util/dom"),L=a("../../util/component_name"),M=a("../../config"),N="ml-list-item-sample",O=E.createSubclass(A,"List");E.extendProto(O,{init:d,start:e,destroy:z,require:["Container","Dom","Data"],_itemPreviousComponent:v,item:h,count:i,contains:l,addItem:m,addItems:p,replaceItem:u,removeItem:r,extractItem:s,each:x,map:y,_setItem:k,_removeItem:t,_addItem:n,_addItems:q,_createCacheTemplate:g,_updateDataPaths:w}),C.add(O),b.exports=O},{"../../binder":8,"../../config":65,"../../services/mail":71,"../../util/component_name":77,"../../util/dom":81,"../c_class":15,"../c_facet":16,"./cf_registry":31,"milo-core":108}],27:[function(a,b,c){"use strict";function d(){this.m=new l(this.config.data,this),i.prototype.init.apply(this,arguments)}function e(){var a=this.m.get();return"object"==typeof a&&(a=m.deepClone(a)),{state:a}}function f(a){return this.m.set(a.state)}function g(){this._messenger=this.m._messenger}function h(){this.m.destroy(),i.prototype.destroy.apply(this,arguments)}var i=a("../c_facet"),j=a("./cf_registry"),k=a("milo-core"),l=k.Model,m=(k.classes.Mixin,k.proto),n=m.createSubclass(i,"Model");m.extendProto(n,{init:d,getState:e,setState:f,_createMessenger:g,destroy:h}),j.add(n),b.exports=n,l.useWith(n,"m")},{"../c_facet":16,"./cf_registry":31,"milo-core":108}],28:[function(a,b,c){"use strict";function d(){this.m=new j(this.config.options,this),g.prototype.init.apply(this,arguments),this.m.proxyMethods(this)}function e(){this._messenger=this.m._messenger}function f(){this.m.destroy(),g.prototype.destroy.apply(this,arguments)}var g=a("../c_facet"),h=a("./cf_registry"),i=a("milo-core"),j=i.Model,k=i.proto,l=k.createSubclass(g,"Options");k.extendProto(l,{init:d,destroy:f,_createMessenger:e}),h.add(l),b.exports=l},{"../c_facet":16,"./cf_registry":31,"milo-core":108}],29:[function(a,b,c){"use strict";function d(){j.prototype.init.apply(this,arguments);var a=this.config.interpolate===!1?void 0:this.config.compile||milo.config.template.compile;this.set(this.config.template||"",a,this.config.compileOptions)}function e(){j.prototype.start.apply(this,arguments),this.config.autoRender&&(this.render(),this.config.autoBinder&&this.binder())}function f(){return this._template}function g(a,b,c){return n(a,p.OneOf(String,Function)),n(b,p.Optional(Function)),"function"==typeof a?this._template=a:(this._templateStr=a,b?this._compile=b:b=this._compile,b&&(this._template=b(a,c))),this}function h(a){return this.owner.el.innerHTML=this._template?this._template(a):this._templateStr,this}function i(){return this.owner.container?this.owner.container.binder():void o.error("TemplateFacet: Binder called without container facet.")}var j=a("../c_facet"),k=a("./cf_registry"),l=a("milo-core"),m=l.proto,n=l.util.check,o=l.util.logger,p=n.Match,q=(a("../../binder"),m.createSubclass(j,"Template"));m.extendProto(q,{init:d,start:e,set:g,getCompiled:f,render:h,binder:i}),k.add(q),b.exports=q},{"../../binder":8,"../c_facet":16,"./cf_registry":31,"milo-core":108}],30:[function(a,b,c){"use strict";function d(){k.prototype.init.apply(this,arguments),this._activeState="",this._defaultKey="",this._state={}}function e(){return this._state[this._activeState]||this._state[this._defaultKey]}function f(a){this._state[""]=a,this.setActiveState("")}function g(a){this._activeState=a}function h(a,b,c){if(!a)throw new Error("Transfer$setStateWithKey: no key");c?this._defaultKey=a:this._defaultKey=this._defaultKey||a,this._state[a]=b,this.setActiveState(a)}function i(a){return"string"==typeof a&&this._state[a]}function j(){var a=this.getState();return{compName:a&&a.compName,compClass:a&&a.compClass}}var k=a("../c_facet"),l=a("./cf_registry"),m=a("milo-core").proto,n=m.createSubclass(k,"Transfer");m.extendProto(n,{init:d,getState:e,setState:f,setActiveState:g,setStateWithKey:h,getStateWithKey:i,getComponentMeta:j}),l.add(n),b.exports=n},{"../c_facet":16,"./cf_registry":31,"milo-core":108}],31:[function(a,b,c){"use strict";var d=a("../../abstract/registry"),e=a("../c_facet"),f=new d(e);f.add(e),b.exports=f},{"../../abstract/registry":3,"../c_facet":16}],32:[function(a,b,c){"use strict";function d(a,b,c,d){c.parse().validate(),this.scope=a,this.el=b,this.attr=c,this.name=c.compName,this.ComponentClass=g(c,d),this.extraFacetsClasses=h(this.ComponentClass,c,d),this.ComponentClass&&j(this.ComponentClass,this.extraFacetsClasses)&&(this.container={})}function e(){delete this.el,this.attr.destroy()}function f(a,b){a=a||m(),n.rename(this,a,b),this.attr.compName=a,this.attr.decorate()}function g(a,b){var c=k.get(a.compClass);return c||i(b,"class "+a.compClass+" is not registered"),c}function h(a,b,c){var d=b.compFacets,e={};return Array.isArray(d)&&d.forEach(function(d){d=q.firstUpperCase(d),a.hasFacet(d)&&i(c,"class "+a.name+" already has facet "+d),e[d]&&i(c,"component "+b.compName+" already has facet "+d);var f=l.get(d);e[d]=f}),e}function i(a,b){if(a!==!1)throw new Error(b);p.error("ComponentInfo binder error:",b)}function j(a,b){function c(){return a.prototype.facetsClasses&&q.someKey(a.prototype.facetsClasses,d)}function d(a){return a.requiresFacet("container")}return a.hasFacet("container")||"Container"in b||q.someKey(b,d)||c()}var k=a("./c_registry"),l=a("./c_facets/cf_registry"),m=a("../util/component_name"),n=a("./scope"),o=a("milo-core"),p=o.util.logger,q=o.proto;b.exports=d,q.extendProto(d,{destroy:e,rename:f})},{"../util/component_name":77,"./c_facets/cf_registry":31,"./c_registry":33,"./scope":41,"milo-core":108}],33:[function(a,b,c){"use strict";var d=a("../abstract/registry"),e=a("./c_class"),f=new d(e);f.add(e),b.exports=f},{"../abstract/registry":3,"./c_class":15}],34:[function(a,b,c){"use strict";function d(a){return a.hasOwnProperty(i.componentRef)}function e(a){return a&&a[i.componentRef]}function f(a,b,c){k(b,l.Optional(Boolean)),k(c,l.Optional(l.OneOf(Function,String)));var d=g(c);return h(a,b,d)}function g(a){if("function"==typeof a)return a;if("string"==typeof a){var b=m.firstLowerCase(a);return function(a){return a.hasFacet(b)}}}function h(a,b,c){if(b!==!1){var d=e(a);if(d&&(!c||c(d)))return d}return a.parentNode?h(a.parentNode,!0,c):void 0}var i=a("../config"),j=a("milo-core"),k=j.util.check,l=k.Match,m=j.proto;b.exports={isComponent:d,getComponent:e,getContainingComponent:f,_makeComponentConditionFunc:g}},{"../config":65,"milo-core":108}],35:[function(a,b,c){"use strict";var d=a("../c_class"),e=a("../c_registry"),f=d.createComponentClass("View",["container"]);e.add(f),b.exports=f},{"../c_class":15,"../c_registry":33}],36:[function(a,b,c){"use strict";function d(a){k.prototype.init.apply(this,arguments),this.component=a,this.elData=i(a.el)}function e(){var a=this.component.data.config.get,b="function"==typeof a?a.call(this.component):this.elData.get(this.component.el);return this.component.data._value=b,b}function f(a){var b=this.component.data.config.event,c=b||this.elData.event(this.component.el);return""==a&&c?c:void 0}function g(a,b,c){return c.newValue!=c.oldValue}function h(a,b,c){var d=this.component.data._value,e=this.value(),f={path:"",type:"changed",oldValue:d,newValue:e};return f}var i=a("./de_data"),j=a("milo-core"),k=j.classes.MessengerAPI,l=j.proto,m=j.util.check,n=(m.Match,l.createSubclass(k,"DataMsgAPI",!0));l.extendProto(n,{init:d,translateToSourceMessage:f,filterSourceMessage:g,createInternalData:h,value:e}),b.exports=n},{"./de_data":37,"milo-core":108}],37:[function(a,b,c){"use strict";function d(a){var b=i[a.type];return b?b.property:i.byDefault.property}function e(a){var b=i[a.type];return b?b.event:i.byDefault.event}var f=a("milo-core").proto,g=function(a){var b=a.tagName.toLowerCase(),c=h[b];return c||h.byDefault};b.exports=g;var h={byDefault:{property:"innerHTML"},div:{property:"innerHTML"},span:{property:"innerHTML",event:"input"},p:{property:"innerHTML",event:"input"},input:{property:d,event:e},textarea:{property:"value",event:"input"},select:{property:"value",event:"change"},img:{property:"src"},caption:{property:"innerHTML",event:"input"},thead:{property:"innerHTML",event:"input"},tbody:{property:"innerHTML",event:"input"},tfoot:{property:"innerHTML",event:"input"}};f.eachKey(h,function(a){var b=a.property,c=a.event;"function"!=typeof b&&(a.property=function(){return b});var d=a.property;"function"!=typeof c&&(a.event=function(){return c}),a.get||(a.get=function(a){return a[d(a)]}),a.set||(a.set=function(a,b){return a[d(a)]="undefined"==typeof b?"":b})});var i={byDefault:{property:"value",event:"input"},checkbox:{property:"checked",event:"change"},radio:{property:"checked",event:"change"},text:{property:"value",event:"input"}}},{"milo-core":108}],38:[function(a,b,c){"use strict";function d(a){return i.hasOwnProperty(a)?i[a]:a}function e(){delete this._currentTarget,delete this._inside}function f(a,b,c){var d=!0;return"dragenter"==a&&"dragin"==b?(this._currentTarget=c.target,d=!this._inside,this._inside=!0):"dragleave"==a&&"dragout"==b?(d=this._currentTarget==c.target,d&&e.call(this)):"drop"==a&&e.call(this),d}var g=a("milo-core").classes.MessengerAPI,h=_.createSubclass(g,"DropMsgAPI",!0);_.extendProto(h,{translateToSourceMessage:d,filterSourceMessage:f}),b.exports=h;var i={dragin:"dragenter",dragout:"dragleave"}},{"milo-core":108}],39:[function(a,b,c){"use strict";function d(a,b,c,d){l(d,j),this.component=d,i.prototype.init.apply(this,arguments)}function e(){i.prototype.destroy.apply(this,arguments),delete this.component}function f(){return this.component.el}var g=a("../../services/dom_source"),h=a("milo-core"),i=h.classes.MessageSource,j=a("../c_class"),k=h.proto,l=h.util.check,m=(l.Match,k.createSubclass(g,"DOMEventsSource",!0));k.extendProto(m,{init:d,destroy:e,emitter:f}),b.exports=m},{"../../services/dom_source":70,"../c_class":15,"milo-core":108}],40:[function(a,b,c){"use strict";function d(a,b,c,d){if(n(d,j),this.component=d,"iframe"!=d.el.tagName.toLowerCase())throw new Error("component for FrameMessageSource can only be attached to iframe element");l.prototype.init.apply(this,arguments)}function e(){return this.component.el.contentWindow}function f(a){var b=this.frameWindow();b?b.addEventListener("message",this,!1):o.warn("FrameMessageSource: frame window is undefined")}function g(a){var b=this.frameWindow();b?b.removeEventListener("message",this,!1):o.warn("FrameMessageSource: frame window is undefined")}function h(a,b){b=b||{},b.type=a,this.frameWindow().postMessage(b,"*")}function i(a){this.dispatchMessage(a.data.type,a)}var j=a("../c_class"),k=a("milo-core"),l=k.classes.MessageSource,m=k.proto,n=k.util.check,o=k.util.logger,p=(n.Match,m.createSubclass(l,"FrameMessageSource",!0));m.extendProto(p,{init:d,addSourceSubscriber:f,removeSourceSubscriber:g,trigger:h,frameWindow:e,handleEvent:i}),b.exports=p},{"../c_class":15,"milo-core":108}],41:[function(a,b,c){"use strict";function d(a,b){v.defineProperties(this,{_rootEl:a,_hostObject:b},v.WRIT)}function e(a,b){if("string"==typeof b?a.name=b:b=a.name,this.hasOwnProperty(b))throw new Error("duplicate object name: "+b);m(b),g.call(this,a,b)}function f(a,b){"string"==typeof b?a.name=b:b=a.name;var c=this.hasOwnProperty(b);c?y.error("Scope: duplicate object name: "+b):(c=!z.test(b),c&&y.error("Scope: name should start from letter, this name is not allowed: "+b)),c&&(b=w(),a.name=b),g.call(this,a,b)}function g(a,b){this[b]=a,a.scope=this,"function"==typeof a.postMessage&&a.postMessage("addedtoscope")}function h(a){x(a,d),a._each(e,this)}function i(a,b){b._add(a),this._remove(a.name),a.scope=b}function j(a){a._each(function(b){this._add(b,b.name),a._remove(b.name)},this)}function k(a,b){v.eachKey(this,a,b||this,!0)}function l(a,b){return v.filterKeys(this,a,b||this,!0)}function m(a){if(!z.test(a))throw new Error("name should start from letter, this name is not allowed: "+a)}function n(){return Object.keys(this).length}function o(){var a=Object.keys(this)[0];return a&&this[a]}function p(a,b){if(!(a in this))return void(b||y.warn("removing object that is not in scope"));var c=this[a];delete this[a],"function"==typeof c.postMessage&&c.postMessage("removedfromscope")}function q(){this._each(function(a,b){delete this[b].scope,delete this[b]},this)}function r(){this._rootEl=null}function s(a){return this.hasOwnProperty(a.name)}function t(a,b,c){a.scope&&c!==!1?(a.scope._remove(a.name),a.scope._add(a,b)):a.name=b}var u=a("milo-core"),v=u.proto,w=a("../util/component_name"),x=u.util.check,y=(x.Match,u.util.logger);v.extendProto(d,{_add:e,_safeAdd:f,_copy:h,_each:k,_move:i,_merge:j,_length:n,_any:o,_remove:p,_clean:q,_detachElement:r,_has:s,_filter:l}),v.extend(d,{rename:t}),b.exports=d;var z=/^[A-Za-z][A-Za-z0-9\_\$]*$/},{"../util/component_name":77,"milo-core":108}],42:[function(a,b,c){"use strict";function d(a){this.el.disabled=a}function e(){return!!this.el.disabled}var f=a("../c_class"),g=a("../c_registry"),h=a("milo-core").proto,i=f.createComponentClass("MLButton",{events:void 0,dom:{cls:"ml-ui-button"}});g.add(i),b.exports=i,h.extendProto(i,{disable:d,isDisabled:e})},{"../c_class":15,"../c_registry":33,"milo-core":108}],43:[function(a,b,c){"use strict";function d(){l.prototype.init.apply(this,arguments),this.on("childrenbound",e)}function e(){n.defineProperties(this,{_comboInput:this.container.scope.input,_comboList:this.container.scope.datalist}),this._comboList.template.set(p),this._comboInput.data.on("input",{subscriber:j,context:this})}function f(){return this._comboInput?this._comboInput.data.get():void 0}function g(a){return i.call(this,"set",a)}function h(){return i.call(this,"del",value)}function i(a,b){if(this._comboInput){var c=this._comboInput.data[a](b);return j.call(this),c}}function j(){this.data.dispatchSourceMessage(o)}function k(a,b){this._comboList.template.render({comboOptions:this.model.get()})}var l=a("../c_class"),m=a("../c_registry"),n=a("milo-core").proto,o="mlcombochange",p='{{~ it.comboOptions :option }} {{~}}',q=l.createComponentClass("MLCombo",{events:void 0,data:{get:f,set:g,del:h,splice:void 0,event:o},model:{messages:{"***":{subscriber:k,context:"owner"}}},dom:{cls:"ml-ui-datalist"},container:void 0});m.add(q),b.exports=q,n.extendProto(q,{init:d})},{"../c_class":15,"../c_registry":33,"milo-core":108}],44:[function(a,b,c){"use strict";function d(){t.prototype.init.apply(this,arguments),this.model.set([]),this.once("childrenbound",k)}function e(a){v(a,w.Optional(Function)),this._dataValidation=a}function f(a){this._combo.setOptions(a)}function g(){this._combo.clearComboInput()}function h(a){this._combo.toggleAddButton(a)}function i(a){this._combo.setAddItemPrompt(a)}function j(){t.prototype.destroy.apply(this,arguments),this._connector&&milo.minder.destroyConnector(this._connector),this._connector=null}function k(){this.template.render().binder(),l.call(this)}function l(){x.defineProperties(this,{_combo:this.container.scope.combo,_list:this.container.scope.list}),this._connector=milo.minder(this._list.model,"<<<->>>",this.model),this._combo.data.on("",{subscriber:m,context:this}),this._combo.on("additem",{subscriber:s,context:this})}function m(a,b){b.newValue&&n.call(this,a,b)&&this._list.model.push(b.newValue),this._combo.data.del(),this._combo.data._value=""}function n(a,b){return this._dataValidation?this._dataValidation(a,b,this._list.model.get()):!0}function o(a,b){this.data.dispatchSourceMessage(y); +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gthis._maxLength){var b=this.actions.shift();b.destroy()}return this.position=this.actions.length,this.position-1}function f(){this.actions.length&&(this.position--,this.actions.length--)}function g(){for(var a=this.position;a=0||b.indexOf(w.firstLowerCase(a))>=0)}var s=a("../abstract/facet"),t=a("milo-core"),u=t.Messenger,v=a("./c_utils"),w=t.proto,x=w.createSubclass(s,"ComponentFacet");b.exports=x;var y=w.partial(l,j),z=w.partial(l,k);w.extendProto(x,{init:d,start:f,check:h,destroy:i,onConfigMessages:g,domParent:j,postDomParent:y,scopeParent:k,postScopeParent:z,getMessageSource:n,dispatchSourceMessage:o,_createMessenger:e,_setMessageSource:m,_createMessageSource:p,_createMessageSourceWithAPI:q}),w.extend(x,{requiresFacet:r});var A="_messenger";u.useWith(x,A,u.defaultMethods)},{"../abstract/facet":1,"./c_utils":34,"milo-core":108}],17:[function(a,b,c){"use strict";function d(){return o(this.owner.el,this.scope,!1)}function e(){n.prototype.start.apply(this,arguments),this.scope=new p(this.owner.el,this)}function f(a){function b(){throw new Error("path "+a+" is invalid")}a=a.split(".");var c=a.length;(a[0]||2>c)&&b();for(var d=this.owner,e=1;c>e;e++){var f=a[e];if(w.test(f)||b(),!d.container)return;if(d=d.container.scope[f],!d)return}return d}function g(a){var b={scope:{}};return a!==!1&&this.scope._each(function(a,c){b.scope[c]=a._getState()}),b}function h(a){r.eachKey(a.scope,function(a,b){var c=this.scope[b];c?c.setState(a):s.warn('component "'+b+'" does not exist on scope')},this)}function i(){this.scope._each(function(a){a.destroy()}),this.scope._detachElement(),n.prototype.destroy.apply(this,arguments)}function j(a,b){u.unwrapElement(this.owner.el),this.scope&&this.scope._each(function(b){b.remove(),a!==!1&&b.rename(void 0,!1),this.owner.scope&&this.owner.scope._add(b)},this),b!==!1&&this.owner.destroy()}function k(a){this.scope._add(a),this.owner.el.appendChild(a.el)}function l(a,b){this.scope._add(a),this.el.insertBefore(a.el,b&&b.el)}function m(a){this.scope._remove(a),this.owner.el.removeChild(a.el)}var n=a("../c_facet"),o=a("../../binder"),p=a("../scope"),q=a("milo-core"),r=q.proto,s=q.util.logger,t=a("./cf_registry"),u=a("../../util/dom"),v=r.createSubclass(n,"Container");r.extendProto(v,{start:e,path:f,getState:g,setState:h,binder:d,destroy:i,unwrap:j,append:k,insertBefore:l,remove:m}),t.add(v),b.exports=v;var w=/^[A-Za-z][A-Za-z0-9\_\$]*$/},{"../../binder":8,"../../util/dom":81,"../c_facet":16,"../scope":41,"./cf_registry":31,"milo-core":108}],18:[function(a,b,c){"use strict";function d(){q["super"].start.apply(this,arguments),o.path.wrapMessengerMethods.call(this),this.onSync("changedata",o.changeDataHandler),this.activeModelPaths={}}function e(a){var b=this;n.eachKey(a,function(a,c){var d="."!==c.charAt(0)?"."+c:c;b.update(d,a)})}function f(){var a=this;n.eachKey(this.activeModelPaths,function(b,c){b.clear(),a.el.classList.remove(c)})}function g(a){return this.config.classes&&this.config.classes[a]?new l(this,a):this}function h(a,b){var c=this.config.classes[a];if(c){var d=r[typeof c];d.call(this,a,c,b),this.postMessageSync("changed",{modelPath:a,modelValue:b})}}function i(a,b,c){var d=this.owner.el.classList;if(n.eachKey(this.activeModelPaths,function(b,c){b.has(a)&&(b["delete"](a),0==b.size&&d.remove(c))}),b&&c){b=c?b.replace(/\$/g,c):b;var e=this.activeModelPaths[b]||(this.activeModelPaths[b]=new Set);e.add(a),d.add(b)}}function j(a,b,c){var d=b[c];i.call(this,a,d,c)}function k(a,b,c){var d=b.call(this,c);i.call(this,a,d,!0)}function l(a,b){this.cssFacet=a,this.modelPath=b}var m=a("milo-core"),n=m.proto,o=m.Model._utils,p=a("../../util/create_facet_class"),q=b.exports=p({className:"Css",methods:{start:d,set:e,del:f,path:g,update:h}}),r={string:i,object:j,"function":k};l.prototype.set=function(a){this.cssFacet.update(this.modelPath,a)},l.prototype.del=function(){this.set(null)}},{"../../util/create_facet_class":79,"milo-core":108}],19:[function(a,b,c){"use strict";function d(){L.wrapMessengerMethods.call(this),F.prototype.start.apply(this,arguments),this.elData=J(this.owner.el),this._dataChangesQueue=[],this._prepareMessageSource(),this._path="."+this.owner.name,this._value=this.get(),this.onSync("",f),this.onSync("datachangesfinished",i),this.onSync("childdata",k),this.onSync("changedata",N)}function e(){var a=new I(this.owner),b=new H(this,U,a,this.owner);this._setMessageSource(b),R.defineProperty(this,"_dataEventsSource",b),E.prototype._createProxyMethod.call(a,"value","value",this)}function f(a,b){if(this._bubbleUpDataChange(b),this._queueDataChange(b),""===b.path){var c=O(b);this.postMessage("datachangesfinished",{transaction:c})}}function g(a){var b=this.scopeParent();if(b){var c=R.clone(a);c.path=(this._path||"."+this.owner.name)+c.path,b.postMessage("childdata",c||a)}}function h(a){this._dataChangesQueue.push(a)}function i(a,b){this._postDataChanges(b.inTransaction);var c=this.scopeParent();c&&c.postMessage("datachangesfinished",b)}function j(a){var b=this._dataChangesQueue.reverse();this.postMessageSync("datachanges",{changes:b,transaction:a}),this._dataChangesQueue=[]}function k(a,b){this.postMessage(b.path,b),this._bubbleUpDataChange(b),this._queueDataChange(b)}function l(a){var b=O(l);try{return u.call(this,"set",arguments)}catch(c){if(c!=V)throw c}P(this._set,b);var d=this._value,e=this._set(a),f={path:"",type:"changed",newValue:e,oldValue:d};return P(f,b),this.postMessage("",f),e}function m(a){function b(a,b,c,e){var f=e.replace("$$",c),g=this.path(f,"undefined"!=typeof b);g&&(P(g.set,d),a[c]=g.set(b))}var c,d=O(m);if(null!=a&&"object"==typeof a)if(Array.isArray(a)){c=[];var e=this.owner.list;if(e){var f=e.count(),g=a.length-f;g>=3&&(e._addItems(g),e._updateDataPaths(f,e.count())),a.forEach(function(a,d){b.call(this,c,a,d,"[$$]")},this);for(var h=e.count(),i=h-a.length;i-->0;)e._removeItem(a.length)}else S.warn("Data: setting array data without List facet")}else c={},R.eachKey(a,function(a,d){b.call(this,c,a,d,".$$")},this);else c=this._setScalarValue(a);return this._value=c,c}function n(){var a=O(n);try{var b=u.call(this,"del");return Q.call(this,a),b}catch(c){if(c!=V)throw c}var d=this._value;P(this._del,a),this._del();var e={path:"",type:"deleted",oldValue:d};P(e,a),this.postMessage("",e)}function o(){var a=O(o);P(this._set,a),this._set()}function p(a){return this.elData.set(this.owner.el,a)}function q(a){try{return u.call(this,"get",arguments)}catch(b){if(b!=V)throw b}return this._get(a)}function r(a){if(a!==!1){var b,c=this.owner;return c.list?(b=[],c.list.each(function(a,c){b[c]=a.data.get()}),c.container&&c.container.scope._each(function(a,d){!c.list.contains(a)&&a.data&&(b[d]=a.data.get())})):c.container?(b={},c.container.scope._each(function(a,c){a.data&&(b[c]=a.data.get())})):b=this._getScalarValue(),this._value=b,b}}function s(){return this.elData.get(this.owner.el)}function t(a,b){var c,d=O(t);try{var c=u.call(this,"splice",arguments);return Q.call(this,d),c}catch(e){if(e!=V)throw e}if(P(this._splice,d),c=this._splice.apply(this,arguments)){var f={path:"",type:"splice",index:c.spliceIndex,removed:c.removed,addedCount:c.addedCount,newValue:this._value};return P(f,d),this.postMessage("",f),c.removed}}function u(a,b){var c=this.config[a];switch(typeof c){case"function":return c.apply(this.owner,b);case"string":return this.owner[c].apply(this.owner,b);default:throw V}}function v(a,b){var c=O(v),d=this.owner.list;if(!d)return S.warn("Data: cannot use splice method without List facet");var e=[],f=d.count();if(arguments[0]=a=M.normalizeSpliceIndex(a,f),b>0&&f>0){for(var g=a;a+b>g;g++){var h=d.item(a);if(h){var i=h.data.get();d._removeItem(a)}else S.warn("Data: no item for index",g);e.push(i)}d._updateDataPaths(a,d.count())}var j=[],k=arguments.length,l=k>2,m=k-2;if(l){d._addItems(m,a);for(var g=2,n=a;k>g;g++,n++){var h=d.item(n);if(h){P(h.data.set,c);var i=h.data.set(arguments[g])}else S.warn("Data: no item for index",n);j.push(i)}d._updateDataPaths(a,d.count())}return this._value=this.get(),{spliceIndex:a,removed:e,addedCount:l?m:0}}function w(){try{return u.call(this,"len")}catch(a){if(a!=V)throw a}return this._len()}function x(){return this.owner.list?this.owner.list.count():void S.error("Data: len called without list facet")}function y(a,b){if(!a)return this;for(var c=L.parseAccessPath(a),d=this.owner,e=0,f=c.length;f>e;e++){var g=c[e],h=L.getPathNodeKey(g);if("array"==g.syntax&&d.list){var i=d.list.item(h);i||b===!1||(i=d.list._addItem(h),i.data._path=g.property),d=i}else d.container&&(d=d.container.scope[h]);var j=d&&d.data;if(!j)break}return j}function z(){return this._path}function A(){var a=this._path;return"["==a[0]?+a.slice(1,-1):a.slice(1)}function B(a){ +return{state:this.get(a)}}function C(a){return this.set(a.state)}var D=a("milo-core"),E=D.classes.Mixin,F=a("../c_facet"),G=a("./cf_registry"),H=(D.Messenger,a("../msg_src/dom_events")),I=a("../msg_api/data"),J=a("../msg_api/de_data"),K=D.Model,L=K._utils.path,M=K._utils.model,N=K._utils.changeDataHandler,O=N.getTransactionFlag,P=N.setTransactionFlag,Q=N.postTransactionFinished,R=D.proto,S=D.util.logger,T=R.createSubclass(F,"Data");R.extendProto(T,{start:d,getState:B,setState:C,get:q,set:l,del:n,splice:t,len:w,path:y,getPath:z,getKey:A,_get:r,_set:m,_del:o,_splice:v,_len:x,_setScalarValue:p,_getScalarValue:s,_bubbleUpDataChange:g,_queueDataChange:h,_postDataChanges:j,_prepareMessageSource:e}),G.add(T),b.exports=T,["push","pop","unshift","shift"].forEach(function(a){var b=K.Path.prototype[a];R.defineProperty(T.prototype,a,b)});var U={trigger:"trigger"},V={}},{"../c_facet":16,"../msg_api/data":36,"../msg_api/de_data":37,"../msg_src/dom_events":39,"./cf_registry":31,"milo-core":108}],20:[function(a,b,c){"use strict";function d(a){var b=a.domConfig||{},c=b.tagName||"div",d=document.createElement(c),f=a.content,g=a.template;return e(d,b),"string"==typeof f&&(g?d.innerHTML=H.template(g)({content:f}):d.innerHTML=f),d}function e(a,b){var c=b&&b.cls,d=b&&b.attributes;d&&F.eachKey(d,function(b,c){a.setAttribute(c,b)}),c&&k(a,"add",c)}function f(){var a=this.owner.el;e(a,this.config);var b=window.getComputedStyle(a);this._visible=b&&"none"!=b.display}function g(){this.toggle(!0)}function h(){this.toggle(!1)}function i(a){a="undefined"==typeof a?!this._visible:!!a,this._visible=a;var b=this.owner.el;return b.style.display=a?"block":"none",a}function j(a,b,c){k(this.owner.el,a,b,c)}function k(a,b,c,d){function e(a){g?void 0===d?f[b](a):f[b](a,d):f[b](a)}var f=a.classList,g="toggle"==b;if(Array.isArray(c))c.forEach(e);else{if("string"!=typeof c)throw new Error("unknown type of CSS classes parameter");e(c)}}function l(){this.owner.el&&J.detachComponent(this.owner.el)}function m(a,b){if(!this.owner.el)throw new Error("Cannot call setStyle on owner with no element: "+this.owner.constructor.name);this.owner.el.style[a]=b}function n(a){for(var b in a)this.owner.el.style[b]=a[b]}function o(a){return this.owner.el&&this.owner.el.cloneNode(a)}function p(){var a=K.createElement(this.config);return a}function q(){J.removeElement(this.owner.el)}function r(a){this.owner.el.appendChild(a)}function s(a){var b=this.owner.el,c=b.firstChild;c?b.insertBefore(a,c):b.appendChild(a)}function t(a){for(;a.childNodes.length;)this.append(a.childNodes[0])}function u(a){for(;a.childNodes.length;)this.prepend(a.childNodes[a.childNodes.length-1])}function v(a){var b=this.owner.el,c=b.parentNode;c.insertBefore(a,b.nextSibling)}function w(a){var b=this.owner.el,c=b.parentNode;c.insertBefore(a,b)}function x(){var a=this.owner.getScopeParent();a&&a.el.appendChild(this.owner.el)}function y(){return J.children(this.owner.el)}function z(a,b){if(!L.hasOwnProperty(a))throw new Error("incorrect find direction: "+a);var c=this.owner.el,d=this.owner.scope,e=document.createTreeWalker(d._rootEl,NodeFilter.SHOW_ELEMENT);e.currentNode=c;for(var f=e[L[a]](),g=(Object.keys(d),!1);f;){var h=new I(f);if(h.node&&(h.parse().validate(),d.hasOwnProperty(h.compName))){var i=d[h.compName];if(!b||b(i)){g=!0;break}}e.currentNode=f,f=e[L[a]]()}return g?i:void 0}function A(){var a=window.getSelection();if(!a.isCollapsed)return!0;var b=a.focusNode&&a.focusNode.textContent,c=b&&" "==b.charAt(0)?1:0;if(a.anchorOffset!=c)return!0;var d=document.createTreeWalker(this.owner.el,NodeFilter.SHOW_TEXT);d.currentNode=a.anchorNode;var e=d.previousNode(),f=e?""==!e.nodeValue.trim():!1;return f}function B(){var a=window.getSelection();if(!a.isCollapsed)return!0;var b=a.focusNode&&a.focusNode.textContent,c=b&&" "==b.charAt(b.length-1)?a.anchorNode.length-1:a.anchorNode.length;if(a.anchorOffset=0;var f=d[e&&e.compClass];return!!p.result(f,this.owner,e,a);default:throw new Error("Incorrect allowed components in config")}}else{var g=c&&c.dataTypes;switch(typeof g){case"undefined":return!1;case"string":return a.types.indexOf(g)>=0}}}var k=a("../c_facet"),l=a("./cf_registry"),m=a("../msg_src/dom_events"),n=a("../msg_api/drop"),o=a("../../util/dragdrop"),p=a("milo-core").proto,q=p.createSubclass(k,"Drop");p.extendProto(q,{init:d,start:e}),l.add(q),b.exports=q;var r=p.throttle(i,50)},{"../../util/dragdrop":84,"../c_facet":16,"../msg_api/drop":38,"../msg_src/dom_events":39,"./cf_registry":31,"milo-core":108}],23:[function(a,b,c){"use strict";function d(){e.prototype.init.apply(this,arguments);var a=new h(this,void 0,void 0,this.owner);this._setMessageSource(a),i.defineProperty(this,k,a)}var e=a("../c_facet"),f=a("./cf_registry"),g=a("milo-core"),h=(g.Messenger,a("../msg_src/dom_events")),i=g.proto,j=i.createSubclass(e,"Events");i.extendProto(j,{init:d}),f.add(j),b.exports=j;var k="_domEventsSource";h.useWith(j,k,["trigger"])},{"../c_facet":16,"../msg_src/dom_events":39,"./cf_registry":31,"milo-core":108}],24:[function(a,b,c){"use strict";function d(){l.prototype.init.apply(this,arguments);var a=new o(this,void 0,void 0,this.owner);this._setMessageSource(a),p.defineProperty(this,t,a)}function e(){function a(a){b.postMessage("domready",a)}l.prototype.start.apply(this,arguments);var b=this;milo(a)}function f(){l.prototype.destroy.apply(this,arguments)}function g(){return this.owner.el.contentWindow}function h(){var a=this.getWindow().document.readyState;return"loading"!=a?a:!1}function i(){var a=this.getWindow().milo;return this.isReady()&&a&&a.milo_version}function j(a){if("function"==typeof a){var b=this;this.whenMiloReady(function(){b.getWindow().milo(a)})}var c=this.getWindow();return c&&c.milo}function k(a,b){return function(c){function d(){c.apply(e,f)}var e=this,f=p.slice(arguments,1);a.call(this)?d():this.on(b,d)}}var l=a("../c_facet"),m=a("./cf_registry"),n=a("milo-core"),o=(n.Messenger,a("../msg_src/frame")),p=(a("../../services/de_constrs"),n.proto),q=p.createSubclass(l,"Frame"),r=k(h,"domready"),s=k(i,"message:miloready");p.extendProto(q,{init:d,start:e,destroy:f,getWindow:g,isReady:h,whenReady:r,isMiloReady:i,whenMiloReady:s,milo:j}),m.add(q),b.exports=q;var t="_messageSource";o.useWith(q,t,["trigger"])},{"../../services/de_constrs":69,"../c_facet":16,"../msg_src/frame":40,"./cf_registry":31,"milo-core":108}],25:[function(a,b,c){"use strict";function d(){return{state:{index:this.getIndex()}}}function e(a){this.setIndex(a.state.index)}function f(){return this.index}function g(a){this.index=a}function h(){this.list.removeItem(this.index)}function i(){this.list.extractItem(this.index)}var j=a("../c_facet"),k=a("./cf_registry"),l=a("milo-core"),m=(l.Model,l.proto),n=(a("../../services/mail"),m.createSubclass(j,"Item"));m.extendProto(n,{getState:d,setState:e,getIndex:f,setIndex:g,removeItem:h,extractItem:i,require:["Container","Dom","Data"]}),k.add(n),b.exports=n},{"../../services/mail":71,"../c_facet":16,"./cf_registry":31,"milo-core":108}],26:[function(a,b,c){"use strict";function d(){A.prototype.init.apply(this,arguments);E.defineProperties(this,{_listItems:[],_listItemsHash:{}}),E.defineProperty(this,"itemSample",null,E.WRIT)}function e(){this.owner.on("childrenbound",f)}function f(){var a=this.dom.children(),b=this.list._listItems,c=this.list._listItemsHash;if(a&&a.forEach(function(a){var d=B.getComponent(a);d&&d.item&&(b.push(d),c[d.name]=d,d.item.list=this.list)},this),b.length){var d=b[0];b.splice(0,1),delete c[d.name],b.forEach(function(a,b){a.item.setIndex(b)})}if(!d)throw new Error("No child component has Item facet");this.list.itemSample=d,d.dom.hide(),d.remove(!0),d.dom.removeCssClasses(N),d.walkScopeTree(function(a){delete a.el[M.componentRef]}),this.list._createCacheTemplate()}function g(){if(!this.itemSample)return!1;var a=this.itemSample,b=a.el.cloneNode(!0),c=a.componentInfo.attr;E.clone(c);c.compName="{{= it.componentName() }}",c.el=b,c.decorate();var d="{{ var i = it.count; while(i--) { }}"+b.outerHTML+"{{ } }}";this.itemsTemplate=H.compile(d)}function h(a){return this._listItems[a]}function i(){return this._listItems.length}function k(a,b){this._listItems.splice(a,0,b),this._listItemsHash[b.name]=b,b.item.list=this,b.item.setIndex(+a)}function l(a){return this._listItemsHash[a.name]==a}function m(a,b){return a=isNaN(+a)?this.count():+a,this.owner.data.splice(a,0,b||{}),this.item(a)}function n(a){if(this.item(a))throw Error("attempt to create item with ID of existing item");var b=B.copy(this.itemSample,!0),c=this._itemPreviousComponent(a);return c.el.parentNode?(c.dom.insertAfter(b.el),this._setItem(a,b),b.el.style.display="",o.call(this,a+1),b):G.warn("list item sample was removed from DOM, probably caused by wrong data. Reset list data with array")}function o(a,b){a=a||0,b=b||this.count();for(var c=a;b>c;c++){var d=this._listItems[c];d?d.item.setIndex(c):G.warn("List: no item at position",c)}}function p(a,b){var c=E.slice(arguments,2);c.lengtha)throw new Error("can't add negative number of items");if(0!=a){var c=this.itemsTemplate({componentName:L,count:a}),d=document.createElement("div");d.innerHTML=c,F(d,this.owner.container.scope);var e=K.children(d);if(a!=e.length&&G.error("number of items added is different from requested"),e&&e.length){var f=this.count(),g=0>b?0:"undefined"==typeof b||b>f?f:b,h=0==g?this.itemSample:this._listItems[g-1],i=document.createDocumentFragment(),j=[];if(e.forEach(function(a,b){var c=B.getComponent(a);return c?(j.push(c),this._setItem(g++,c),i.appendChild(a),void(a.style.display="")):G.error("List: element in new items is not a component")},this),o.call(this,g),!h.el.parentNode)return G.warn("list item sample was removed from DOM, probably caused by wrong data. Reset list data with array");h.dom.insertAfter(i),E.deferMethod(j,"forEach",function(a){a.broadcast("stateready")})}}}function r(a){return this.owner.data.splice(a,1)}function s(a){var b=this._removeItem(a,!1);return this._updateDataPaths(a,this.count()),b}function t(a,b){var c=this.item(a);return c?(this._listItems[a]=void 0,delete this._listItemsHash[c.name],b!==!1?c.destroy():(c.remove(),c.dom.remove()),this._listItems.splice(a,1),o.call(this,a),c):G.warn("attempt to remove list item with id that does not exist")}function u(a,b){var c=this.item(a);c.dom.insertAfter(b.el),this._removeItem(a),this._setItem(a,b)}function v(a){for(;a>=0&&!this._listItems[a];)a--;return a>=0?this._listItems[a]:this.itemSample}function w(a,b){for(var c=a;b>c;c++){var d=this.item(c);d?d.data._path="["+c+"]":G.warn("Data: no item for index",j)}}function x(a,b){this._listItems.forEach(function(b,c){b?a.apply(this,arguments):G.warn("List$each: item",c,"is undefined")},b||this)}function y(a,b){return this._listItems.map(function(b,c){return b?a.apply(this,arguments):void G.warn("List$map: item",c,"is undefined")},b||this)}function z(){this.itemSample&&this.itemSample.destroy(!0),A.prototype.destroy.apply(this,arguments)}var A=a("../c_facet"),B=a("../c_class"),C=a("./cf_registry"),D=a("milo-core"),E=D.proto,F=(a("../../services/mail"),a("../../binder")),G=D.util.logger,H=D.util.doT,I=D.util.check,J=I.Match,K=a("../../util/dom"),L=a("../../util/component_name"),M=a("../../config"),N="ml-list-item-sample",O=E.createSubclass(A,"List");E.extendProto(O,{init:d,start:e,destroy:z,require:["Container","Dom","Data"],_itemPreviousComponent:v,item:h,count:i,contains:l,addItem:m,addItems:p,replaceItem:u,removeItem:r,extractItem:s,each:x,map:y,_setItem:k,_removeItem:t,_addItem:n,_addItems:q,_createCacheTemplate:g,_updateDataPaths:w}),C.add(O),b.exports=O},{"../../binder":8,"../../config":65,"../../services/mail":71,"../../util/component_name":77,"../../util/dom":81,"../c_class":15,"../c_facet":16,"./cf_registry":31,"milo-core":108}],27:[function(a,b,c){"use strict";function d(){this.m=new l(this.config.data,this),i.prototype.init.apply(this,arguments)}function e(){var a=this.m.get();return"object"==typeof a&&(a=m.deepClone(a)),{state:a}}function f(a){return this.m.set(a.state)}function g(){this._messenger=this.m._messenger}function h(){this.m.destroy(),i.prototype.destroy.apply(this,arguments)}var i=a("../c_facet"),j=a("./cf_registry"),k=a("milo-core"),l=k.Model,m=(k.classes.Mixin,k.proto),n=m.createSubclass(i,"Model");m.extendProto(n,{init:d,getState:e,setState:f,_createMessenger:g,destroy:h}),j.add(n),b.exports=n,l.useWith(n,"m")},{"../c_facet":16,"./cf_registry":31,"milo-core":108}],28:[function(a,b,c){"use strict";function d(){this.m=new j(this.config.options,this),g.prototype.init.apply(this,arguments),this.m.proxyMethods(this)}function e(){this._messenger=this.m._messenger}function f(){this.m.destroy(),g.prototype.destroy.apply(this,arguments)}var g=a("../c_facet"),h=a("./cf_registry"),i=a("milo-core"),j=i.Model,k=i.proto,l=k.createSubclass(g,"Options");k.extendProto(l,{init:d,destroy:f,_createMessenger:e}),h.add(l),b.exports=l},{"../c_facet":16,"./cf_registry":31,"milo-core":108}],29:[function(a,b,c){"use strict";function d(){j.prototype.init.apply(this,arguments);var a=this.config.interpolate===!1?void 0:this.config.compile||milo.config.template.compile;this.set(this.config.template||"",a,this.config.compileOptions)}function e(){j.prototype.start.apply(this,arguments),this.config.autoRender&&(this.render(),this.config.autoBinder&&this.binder())}function f(){return this._template}function g(a,b,c){return n(a,p.OneOf(String,Function)),n(b,p.Optional(Function)),"function"==typeof a?this._template=a:(this._templateStr=a,b?this._compile=b:b=this._compile,b&&(this._template=b(a,c))),this}function h(a){return this.owner.el.innerHTML=this._template?this._template(a):this._templateStr,this}function i(){return this.owner.container?this.owner.container.binder():void o.error("TemplateFacet: Binder called without container facet.")}var j=a("../c_facet"),k=a("./cf_registry"),l=a("milo-core"),m=l.proto,n=l.util.check,o=l.util.logger,p=n.Match,q=(a("../../binder"),m.createSubclass(j,"Template"));m.extendProto(q,{init:d,start:e,set:g,getCompiled:f,render:h,binder:i}),k.add(q),b.exports=q},{"../../binder":8,"../c_facet":16,"./cf_registry":31,"milo-core":108}],30:[function(a,b,c){"use strict";function d(){k.prototype.init.apply(this,arguments),this._activeState="",this._defaultKey="",this._state={}}function e(){return this._state[this._activeState]||this._state[this._defaultKey]}function f(a){this._state[""]=a,this.setActiveState("")}function g(a){this._activeState=a}function h(a,b,c){if(!a)throw new Error("Transfer$setStateWithKey: no key");c?this._defaultKey=a:this._defaultKey=this._defaultKey||a,this._state[a]=b,this.setActiveState(a)}function i(a){return"string"==typeof a&&this._state[a]}function j(){var a=this.getState();return{compName:a&&a.compName,compClass:a&&a.compClass}}var k=a("../c_facet"),l=a("./cf_registry"),m=a("milo-core").proto,n=m.createSubclass(k,"Transfer");m.extendProto(n,{init:d,getState:e,setState:f,setActiveState:g,setStateWithKey:h,getStateWithKey:i,getComponentMeta:j}),l.add(n),b.exports=n},{"../c_facet":16,"./cf_registry":31,"milo-core":108}],31:[function(a,b,c){"use strict";var d=a("../../abstract/registry"),e=a("../c_facet"),f=new d(e);f.add(e),b.exports=f},{"../../abstract/registry":3,"../c_facet":16}],32:[function(a,b,c){"use strict";function d(a,b,c,d){c.parse().validate(),this.scope=a,this.el=b,this.attr=c,this.name=c.compName,this.ComponentClass=g(c,d),this.extraFacetsClasses=h(this.ComponentClass,c,d),this.ComponentClass&&j(this.ComponentClass,this.extraFacetsClasses)&&(this.container={})}function e(){delete this.el,this.attr.destroy()}function f(a,b){a=a||m(),n.rename(this,a,b),this.attr.compName=a,this.attr.decorate()}function g(a,b){var c=k.get(a.compClass);return c||i(b,"class "+a.compClass+" is not registered"),c}function h(a,b,c){var d=b.compFacets,e={};return Array.isArray(d)&&d.forEach(function(d){d=q.firstUpperCase(d),a.hasFacet(d)&&i(c,"class "+a.name+" already has facet "+d),e[d]&&i(c,"component "+b.compName+" already has facet "+d);var f=l.get(d);e[d]=f}),e}function i(a,b){if(a!==!1)throw new Error(b);p.error("ComponentInfo binder error:",b)}function j(a,b){function c(){return a.prototype.facetsClasses&&q.someKey(a.prototype.facetsClasses,d)}function d(a){return a.requiresFacet("container")}return a.hasFacet("container")||"Container"in b||q.someKey(b,d)||c()}var k=a("./c_registry"),l=a("./c_facets/cf_registry"),m=a("../util/component_name"),n=a("./scope"),o=a("milo-core"),p=o.util.logger,q=o.proto;b.exports=d,q.extendProto(d,{destroy:e,rename:f})},{"../util/component_name":77,"./c_facets/cf_registry":31,"./c_registry":33,"./scope":41,"milo-core":108}],33:[function(a,b,c){"use strict";var d=a("../abstract/registry"),e=a("./c_class"),f=new d(e);f.add(e),b.exports=f},{"../abstract/registry":3,"./c_class":15}],34:[function(a,b,c){"use strict";function d(a){return a.hasOwnProperty(i.componentRef)}function e(a){return a&&a[i.componentRef]}function f(a,b,c){k(b,l.Optional(Boolean)),k(c,l.Optional(l.OneOf(Function,String)));var d=g(c);return h(a,b,d)}function g(a){if("function"==typeof a)return a;if("string"==typeof a){var b=m.firstLowerCase(a);return function(a){return a.hasFacet(b)}}}function h(a,b,c){if(b!==!1){var d=e(a);if(d&&(!c||c(d)))return d}return a.parentNode?h(a.parentNode,!0,c):void 0}var i=a("../config"),j=a("milo-core"),k=j.util.check,l=k.Match,m=j.proto;b.exports={isComponent:d,getComponent:e,getContainingComponent:f,_makeComponentConditionFunc:g}},{"../config":65,"milo-core":108}],35:[function(a,b,c){"use strict";var d=a("../c_class"),e=a("../c_registry"),f=d.createComponentClass("View",["container"]);e.add(f),b.exports=f},{"../c_class":15,"../c_registry":33}],36:[function(a,b,c){"use strict";function d(a){k.prototype.init.apply(this,arguments),this.component=a,this.elData=i(a.el)}function e(){var a=this.component.data.config.get,b="function"==typeof a?a.call(this.component):this.elData.get(this.component.el);return this.component.data._value=b,b}function f(a){var b=this.component.data.config.event,c=b||this.elData.event(this.component.el);return""==a&&c?c:void 0}function g(a,b,c){return c.newValue!=c.oldValue}function h(a,b,c){var d=this.component.data._value,e=this.value(),f={path:"",type:"changed",oldValue:d,newValue:e};return f}var i=a("./de_data"),j=a("milo-core"),k=j.classes.MessengerAPI,l=j.proto,m=j.util.check,n=(m.Match,l.createSubclass(k,"DataMsgAPI",!0));l.extendProto(n,{init:d,translateToSourceMessage:f,filterSourceMessage:g,createInternalData:h,value:e}),b.exports=n},{"./de_data":37,"milo-core":108}],37:[function(a,b,c){"use strict";function d(a){var b=i[a.type];return b?b.property:i.byDefault.property}function e(a){var b=i[a.type];return b?b.event:i.byDefault.event}var f=a("milo-core").proto,g=function(a){var b=a.tagName.toLowerCase(),c=h[b];return c||h.byDefault};b.exports=g;var h={byDefault:{property:"innerHTML"},div:{property:"innerHTML"},span:{property:"innerHTML",event:"input"},p:{property:"innerHTML",event:"input"},input:{property:d,event:e},textarea:{property:"value",event:"input"},select:{property:"value",event:"change"},img:{property:"src"},caption:{property:"innerHTML",event:"input"},thead:{property:"innerHTML",event:"input"},tbody:{property:"innerHTML",event:"input"},tfoot:{property:"innerHTML",event:"input"}};f.eachKey(h,function(a){var b=a.property,c=a.event;"function"!=typeof b&&(a.property=function(){return b});var d=a.property;"function"!=typeof c&&(a.event=function(){return c}),a.get||(a.get=function(a){return a[d(a)]}),a.set||(a.set=function(a,b){return a[d(a)]="undefined"==typeof b?"":b})});var i={byDefault:{property:"value",event:"input"},checkbox:{property:"checked",event:"change"},radio:{property:"checked",event:"change"},text:{property:"value",event:"input"}}},{"milo-core":108}],38:[function(a,b,c){"use strict";function d(a){return i.hasOwnProperty(a)?i[a]:a}function e(){delete this._currentTarget,delete this._inside}function f(a,b,c){var d=!0;return"dragenter"==a&&"dragin"==b?(this._currentTarget=c.target,d=!this._inside,this._inside=!0):"dragleave"==a&&"dragout"==b?(d=this._currentTarget==c.target,d&&e.call(this)):"drop"==a&&e.call(this),d}var g=a("milo-core").classes.MessengerAPI,h=_.createSubclass(g,"DropMsgAPI",!0);_.extendProto(h,{translateToSourceMessage:d,filterSourceMessage:f}),b.exports=h;var i={dragin:"dragenter",dragout:"dragleave"}},{"milo-core":108}],39:[function(a,b,c){"use strict";function d(a,b,c,d){l(d,j),this.component=d,i.prototype.init.apply(this,arguments)}function e(){i.prototype.destroy.apply(this,arguments),delete this.component}function f(){return this.component.el}var g=a("../../services/dom_source"),h=a("milo-core"),i=h.classes.MessageSource,j=a("../c_class"),k=h.proto,l=h.util.check,m=(l.Match,k.createSubclass(g,"DOMEventsSource",!0));k.extendProto(m,{init:d,destroy:e,emitter:f}),b.exports=m},{"../../services/dom_source":70,"../c_class":15,"milo-core":108}],40:[function(a,b,c){"use strict";function d(a,b,c,d){if(n(d,j),this.component=d,"iframe"!=d.el.tagName.toLowerCase())throw new Error("component for FrameMessageSource can only be attached to iframe element");l.prototype.init.apply(this,arguments)}function e(){return this.component.el.contentWindow}function f(a){var b=this.frameWindow();b?b.addEventListener("message",this,!1):o.warn("FrameMessageSource: frame window is undefined")}function g(a){var b=this.frameWindow();b?b.removeEventListener("message",this,!1):o.warn("FrameMessageSource: frame window is undefined")}function h(a,b){b=b||{},b.type=a,this.frameWindow().postMessage(b,"*")}function i(a){this.dispatchMessage(a.data.type,a)}var j=a("../c_class"),k=a("milo-core"),l=k.classes.MessageSource,m=k.proto,n=k.util.check,o=k.util.logger,p=(n.Match,m.createSubclass(l,"FrameMessageSource",!0));m.extendProto(p,{init:d,addSourceSubscriber:f,removeSourceSubscriber:g,trigger:h,frameWindow:e,handleEvent:i}),b.exports=p},{"../c_class":15,"milo-core":108}],41:[function(a,b,c){"use strict";function d(a,b){v.defineProperties(this,{_rootEl:a,_hostObject:b},v.WRIT)}function e(a,b){if("string"==typeof b?a.name=b:b=a.name,this.hasOwnProperty(b))throw new Error("duplicate object name: "+b);m(b),g.call(this,a,b)}function f(a,b){"string"==typeof b?a.name=b:b=a.name;var c=this.hasOwnProperty(b);c?y.error("Scope: duplicate object name: "+b):(c=!z.test(b),c&&y.error("Scope: name should start from letter, this name is not allowed: "+b)),c&&(b=w(),a.name=b),g.call(this,a,b)}function g(a,b){this[b]=a,a.scope=this,"function"==typeof a.postMessage&&a.postMessage("addedtoscope")}function h(a){x(a,d),a._each(e,this)}function i(a,b){b._add(a),this._remove(a.name),a.scope=b}function j(a){a._each(function(b){this._add(b,b.name),a._remove(b.name)},this)}function k(a,b){v.eachKey(this,a,b||this,!0)}function l(a,b){return v.filterKeys(this,a,b||this,!0)}function m(a){if(!z.test(a))throw new Error("name should start from letter, this name is not allowed: "+a)}function n(){return Object.keys(this).length}function o(){var a=Object.keys(this)[0];return a&&this[a]}function p(a,b){if(!(a in this))return void(b||y.warn("removing object that is not in scope"));var c=this[a];delete this[a],"function"==typeof c.postMessage&&c.postMessage("removedfromscope")}function q(){this._each(function(a,b){delete this[b].scope,delete this[b]},this)}function r(){this._rootEl=null}function s(a){return this.hasOwnProperty(a.name)}function t(a,b,c){a.scope&&c!==!1?(a.scope._remove(a.name),a.scope._add(a,b)):a.name=b}var u=a("milo-core"),v=u.proto,w=a("../util/component_name"),x=u.util.check,y=(x.Match,u.util.logger);v.extendProto(d,{_add:e,_safeAdd:f,_copy:h,_each:k,_move:i,_merge:j,_length:n,_any:o,_remove:p,_clean:q,_detachElement:r,_has:s,_filter:l}),v.extend(d,{rename:t}),b.exports=d;var z=/^[A-Za-z][A-Za-z0-9\_\$]*$/},{"../util/component_name":77,"milo-core":108}],42:[function(a,b,c){"use strict";function d(a){this.el.disabled=a}function e(){return!!this.el.disabled}var f=a("../c_class"),g=a("../c_registry"),h=a("milo-core").proto,i=f.createComponentClass("MLButton",{events:void 0,dom:{cls:"ml-ui-button"}});g.add(i),b.exports=i,h.extendProto(i,{disable:d,isDisabled:e})},{"../c_class":15,"../c_registry":33,"milo-core":108}],43:[function(a,b,c){"use strict";function d(){l.prototype.init.apply(this,arguments),this.on("childrenbound",e)}function e(){n.defineProperties(this,{_comboInput:this.container.scope.input,_comboList:this.container.scope.datalist}),this._comboList.template.set(p),this._comboInput.data.on("input",{subscriber:j,context:this})}function f(){return this._comboInput?this._comboInput.data.get():void 0}function g(a){return i.call(this,"set",a)}function h(){return i.call(this,"del",value)}function i(a,b){if(this._comboInput){var c=this._comboInput.data[a](b);return j.call(this),c}}function j(){this.data.dispatchSourceMessage(o)}function k(a,b){this._comboList.template.render({comboOptions:this.model.get()})}var l=a("../c_class"),m=a("../c_registry"),n=a("milo-core").proto,o="mlcombochange",p='{{~ it.comboOptions :option }} {{~}}',q=l.createComponentClass("MLCombo",{events:void 0,data:{get:f,set:g,del:h,splice:void 0,event:o},model:{messages:{"***":{subscriber:k,context:"owner"}}},dom:{cls:"ml-ui-datalist"},container:void 0});m.add(q),b.exports=q,n.extendProto(q,{init:d})},{"../c_class":15,"../c_registry":33,"milo-core":108}],44:[function(a,b,c){"use strict";function d(){t.prototype.init.apply(this,arguments),this.model.set([]),this.once("childrenbound",k)}function e(a){v(a,w.Optional(Function)),this._dataValidation=a}function f(a){this._combo.setOptions(a)}function g(){this._combo.clearComboInput()}function h(a){this._combo.toggleAddButton(a)}function i(a){this._combo.setAddItemPrompt(a)}function j(){t.prototype.destroy.apply(this,arguments),this._connector&&milo.minder.destroyConnector(this._connector),this._connector=null}function k(){this.template.render().binder(),l.call(this)}function l(){x.defineProperties(this,{_combo:this.container.scope.combo,_list:this.container.scope.list}),this._connector=milo.minder(this._list.model,"<<<->>>",this.model),this._combo.data.on("",{subscriber:m,context:this}),this._combo.on("additem",{subscriber:s,context:this})}function m(a,b){b.newValue&&n.call(this,a,b)&&this._list.model.push(b.newValue),this._combo.data.del(),this._combo.data._value=""}function n(a,b){return this._dataValidation?this._dataValidation(a,b,this._list.model.get()):!0}function o(a,b){this.data.dispatchSourceMessage(y); }function p(){var a=this.model.get();return"object"==typeof a?x.clone(a):a}function q(a){this.model.set(a)}function r(){return this.model.set([])}function s(a,b){this.postMessage("additem",b),this.events.postMessage("milo_combolistadditem",b)}var t=a("../c_class"),u=a("../c_registry"),v=a("milo-core").util.check,w=v.Match,x=a("milo-core").proto,y="mlcombolistchange",z=t.createComponentClass("MLComboList",{dom:{cls:"ml-ui-combo-list"},data:{get:p,set:q,del:r,event:y},events:void 0,container:void 0,model:{messages:{"***":{subscriber:o,context:"owner"}}},template:{template:'
'}});u.add(z),b.exports=z,x.extendProto(z,{init:d,setOptions:f,setDataValidation:e,toggleAddButton:h,destroy:j,setAddItemPrompt:i,clearComboInput:g})},{"../c_class":15,"../c_registry":33,"milo-core":108}],45:[function(a,b,c){"use strict";function d(){return o.date(this.el.min)}function e(a){var b=o.toDate(a);this.el.min=b?l(b):""}function f(){return o.date(this.el.max)}function g(a){var b=o.toDate(a);this.el.max=b?l(b):""}function h(){return o.toDate(this.el.value)}function i(a){var b=o.toDate(a);this.el.value=b?l(b):"",k.call(this)}function j(){this.el.value="",k.call(this)}function k(){this.data.dispatchSourceMessage("input")}function l(a){function b(a){return 10>a?"0"+a:a}var c=[a.getFullYear(),b(a.getMonth()+1),b(a.getDate())],d=c.join("-");return d}var m=a("../c_class"),n=a("../c_registry"),o=a("milo-core").proto,p=m.createComponentClass("MLDate",{events:void 0,data:{get:h,set:i,del:j},dom:{cls:"ml-ui-date"}});o.extendProto(p,{getMin:d,setMin:e,getMax:f,setMax:g}),n.add(p),b.exports=p},{"../c_class":15,"../c_registry":33,"milo-core":108}],46:[function(a,b,c){"use strict";var d=a("../c_class"),e=a("../c_registry"),f=d.createComponentClass("MLDropTarget",["drop"]);e.add(f),b.exports=f},{"../c_class":15,"../c_registry":33}],47:[function(a,b,c){"use strict";function d(a,b){b?a.classList.add("ml-ui-foldtree--unfold",b):a.classList.toggle("ml-ui-foldtree--unfold")}function e(a,b){var c=b.getAttribute("data-item-id"),d=this._itemsMap[c];this.postMessage("mlfoldtree_"+a,{item:d,el:b})}function f(a,b){var c=b.target;if(c.classList.contains("ml-ui-foldtree-button"))d(c.parentNode.parentNode);else{if(!c.classList.contains("ml-ui-foldtree-label"))return;e.call(this,a,c.parentNode)}b.stopPropagation()}function g(a){this._itemTemplate=k.compile(a)}function h(a){function b(a){if(a.items)var d=_.map(a.items,function(a){var b=a.id||n();if(c._itemsMap[b])throw new Error("MLFoldTree: item has duplicate ID:"+b);return c._itemsMap[b]=a,b});return q({itemIDs:d,data:a,itemTemplate:c._itemTemplate||p,treeTemplate:b})}var c=this;this._data=a,c._itemsMap={},this.el.innerHTML=b(a)}function i(a,b){b=b||"ml-ui-foldtree-active";var c=this.el.querySelectorAll("div.ml-ui-foldtree-item");if(_.forEach(c,function(a){a.classList.remove(b)}),a){var d=this.el.querySelector('div.ml-ui-foldtree-item[data-item-id="'+a+'"]');d.classList.add(b)}}function j(a,b){var c=this.el.querySelector('div.ml-ui-foldtree-item[data-item-id="'+a+'"]');d(c.parentNode,b)}var k=a("milo-core").util.doT,l=a("../c_registry"),m=a("../c_class"),n=a("../../util/unique_id"),o='
    {{~ it.data.items :item:index }} {{ var hasSubTree = item.items && item.items.length; }}
  • {{? hasSubTree }}
    {{?}} {{= it.itemTemplate({ item: item }) }}
    {{? hasSubTree }} {{= it.treeTemplate(item) }} {{?}}
  • {{~}}
',p=k.compile(' {{= it.item.label }} '),q=k.compile(o),r=m.createComponentClass("MLFoldTree",{container:void 0,events:{messages:{"click dblclick":{subscriber:f,context:"owner"}}},dom:{cls:"ml-ui-foldtree-main"}});l.add(r),b.exports=r,_.extendProto(r,{setItemTemplate:g,renderTree:h,setActiveItem:i,toggleItem:j})},{"../../util/unique_id":94,"../c_class":15,"../c_registry":33,"milo-core":108}],48:[function(a,b,c){"use strict";var d=a("../c_class"),e=a("../c_registry"),f=d.createComponentClass("MLGroup",{container:void 0,data:void 0,events:void 0,dom:{cls:"ml-ui-group"}});e.add(f),b.exports=f},{"../c_class":15,"../c_registry":33}],49:[function(a,b,c){"use strict";var d=a("../c_class"),e=a("../c_registry"),f=d.createComponentClass("MLHyperlink",{events:void 0,data:void 0,dom:{cls:"ml-ui-hyperlink"}});e.add(f),b.exports=f},{"../c_class":15,"../c_registry":33}],50:[function(a,b,c){"use strict";function d(){j.prototype.init.apply(this,arguments)}function e(a){return this.model.set(a),a}function f(){var a=this.model.get();return a&&"object"==typeof a?l.clone(a):a}function g(){this.model.del()}function h(){this.data.dispatchSourceMessage(m)}function i(a,b){this.el.src=b.newValue,h.call(this)}var j=a("../c_class"),k=a("../c_registry"),l=a("milo-core").proto,m="mlimagechange",n=j.createComponentClass("MLImage",{data:{set:e,get:f,del:g,splice:void 0,event:m},model:{messages:{".src":{subscriber:i,context:"owner"}}},events:void 0,container:void 0,dom:{tagName:"img",cls:"ml-ui-image"}});k.add(n),b.exports=n,l.extendProto(n,{init:d})},{"../c_class":15,"../c_registry":33,"milo-core":108}],51:[function(a,b,c){"use strict";function d(a){this.el.disabled=a}function e(){return!!this.el.disabled}function f(a){this.el.setAttribute("maxlength",a)}var g=a("../c_class"),h=a("../c_registry"),i=a("milo-core").proto,j=g.createComponentClass("MLInput",{data:void 0,events:void 0,dom:{cls:"ml-ui-input"}});h.add(j),b.exports=j,i.extendProto(j,{disable:d,isDisabled:e,setMaxLength:f})},{"../c_class":15,"../c_registry":33,"milo-core":108}],52:[function(a,b,c){"use strict";function d(){q.prototype.init.apply(this,arguments),this.once("childrenbound",e),this.model.set([])}function e(){i.call(this)}function f(a){this._input.el.setAttribute("placeHolder",a)}function g(a){u=a||u}function h(){q.prototype.destroy.apply(this,arguments),this._connector&&milo.minder.destroyConnector(this._connector),this._connector=null}function i(){this.template.render().binder(),j.call(this)}function j(){s.defineProperties(this,{_input:this.container.scope.input,_button:this.container.scope.button,_list:this.container.scope.list}),this._connector=milo.minder(this._list.model,"<<<->>>",this.model),this._button.events.on("click",{subscriber:k,context:this})}function k(a){var b=this._input.data.get(0);this._input.data&&u(b,function(a,b){this._list.model.push({label:a,value:b})}.bind(this)),this._input.data.del()}function l(a,b){this.data.dispatchSourceMessage(t)}function m(){var a=this.model.get();return a?s.clone(a):void 0}function n(a){this.model.set(a)}function o(){return this.model.set([])}function p(){this.model.splice.apply(this.model,arguments)}var q=a("../c_class"),r=a("../c_registry"),s=a("milo-core").proto,t="mlinputlistchange",u=function(a,b){b(a)},v=q.createComponentClass("MLInputList",{dom:{cls:"ml-ui-input-list"},data:{get:m,set:n,del:o,splice:p,event:t},events:void 0,container:void 0,model:{messages:{"***":{subscriber:l,context:"owner"}}},template:{template:'
'}});r.add(v),b.exports=v,s.extendProto(v,{init:d,setAsync:g,setPlaceHolder:f,destroy:h})},{"../c_class":15,"../c_registry":33,"milo-core":108}],53:[function(a,b,c){"use strict";function d(){i.prototype.init.apply(this,arguments),this.on("childrenbound",h)}function e(){this._connector&&milo.minder.destroyConnector(this._connector),this._connector=null,i.prototype.destroy.apply(this,arguments)}function f(a){this.model.splice(a,1)}function g(a,b){var c=this.model.splice(a,1);return this.model.splice(b,0,c[0])}function h(){this.model.set([]),this._connector=milo.minder(this.model,"<<<-",this.data).deferChangeMode("<<<->>>")}var i=a("../c_class"),j=a("../c_registry"),k=a("milo-core").proto,l=i.createComponentClass("MLList",{dom:{cls:"ml-ui-list"},data:void 0,events:void 0,model:void 0,list:void 0});j.add(l),b.exports=l,k.extendProto(l,{init:d,destroy:e,removeItem:f,moveItem:g})},{"../c_class":15,"../c_registry":33,"milo-core":108}],54:[function(a,b,c){"use strict";function d(){u.prototype.init.apply(this,arguments),this.on("childrenbound",e)}function e(){var a=this.container.scope.deleteBtn;a&&a.events.on("click",{subscriber:this.removeItem,context:this})}function f(){try{var a=this.item.list.owner}catch(b){}a&&a.removeItem(this.item.index)}function g(a){var b=this.item.list.owner;b&&b.moveItem(this.item.index,a)}function h(a){return a.params&&a.params.index&&"MLListItem"==a.compClass&&i.call(this)}function i(a){a=a||v.service.getCurrentDragSource();try{var b=a.item.list}catch(c){}return b==this.item.list}function j(){return this.isDropAllowed.apply(this,arguments)}function k(a,b){n.call(this);var c,d=new v(b),e=d.getComponentMeta(),f=d.getComponentState(),g=this.item.list.owner,h=e.params&&e.params.index,j=v.getDropPositionY(b,this.el),k="below"==j,l="above"==j;if(i.call(this)){if(f.compName==this.name)return;var m,o=f.facetsStates.item.state.index,p=o {{~}}'}});n.add(t),b.exports=t,p.extendProto(t,{init:d,destroy:l,setRenderOptions:e})},{"../../util/unique_id":94,"../c_class":15,"../c_registry":33,"milo-core":108}],56:[function(a,b,c){"use strict";function d(a){var b={context:this,subscriber:f};this.model.off("**",b),this.model.set(a),this.model.on("**",b),f.call(this)}function e(a){this.el.disabled=a}function f(a,b){this.template.render({selectOptions:this.model.get()})}var g=a("../c_class"),h=a("../c_registry"),i=a("milo-core").proto,j=g.createComponentClass("MLSelect",{dom:{cls:"ml-ui-select"},data:void 0,events:void 0,model:{messages:{"**":{subscriber:f,context:"owner"}}},template:{template:'{{~ it.selectOptions :option }} {{~}}'}});h.add(j),b.exports=j,i.extendProto(j,{setOptions:d,disable:e})},{"../c_class":15,"../c_registry":33,"milo-core":108}],57:[function(a,b,c){"use strict";function d(){M.prototype.init.apply(this,arguments),this.once("childrenbound",e),P.defineProperties(this,{_optionsData:[],_filteredOptionsData:[]},P.WRIT)}function e(){this.template.render().binder(),f.call(this)}function f(){var a=this.container.scope;P.defineProperties(this,{_comboInput:a.input,_comboList:a.list,_comboOptions:a.options,_comboBefore:a.before,_comboAfter:a.after,_comboAddItemDiv:a.addItemDiv,_comboAddPrompt:a.addPrompt,_comboAddBtn:a.addBtn,_optionTemplate:Q.compile(U)}),P.defineProperties(this,{_startIndex:0,_endIndex:V,_hidden:!1,_elementHeight:X,_total:0,_optionsHeight:200,_lastScrollPos:0,_currentValue:null,_selected:null,_isAddButtonShown:!1},P.WRIT),this.dom.setStyles({position:"relative"}),r(this._comboList,this._comboOptions,this),s(this._comboInput,this),t(this._comboAddBtn,this),this.events.on("keydown",{subscriber:A,context:this})}function g(a){this._hidden=!a,this._comboList.dom.toggle(a)}function h(){var a=this.el.getBoundingClientRect(),b=Math.max(this.el.ownerDocument.documentElement.clientHeight,window.innerHeight||0),c="",d=a.bottom+this._optionsHeight-b;if(d>0){var e=this._optionsHeight-a.top;d>e&&(c=-this._optionsHeight+"px")}this._comboList.dom.setStyles({top:c}),this._hidden=!1,this.el.classList.add(S),this._comboList.dom.toggle(!0)}function i(){this._hidden=!0,this.el.classList.remove(S),this._comboList.dom.toggle(!1)}function j(a,b){this._comboAddItemDiv.dom.toggle(a),b&&b.preserveState&&(this.__showAddOnClick=this._isAddButtonShown),this._isAddButtonShown=a}function k(a){this._addItemPrompt=a,this._comboAddPrompt.el.innerHTML=a,this.toggleAddButton(!1)}function l(a){this._comboInput.el.placeholder=a}function m(a){this._optionsData=a,this.setFilteredOptions(a)}function n(a){this._optionsURL=a.url,this._formatOptionsURL=a.formatOptions||function(a){return a}}function o(a){var b=this._optionsURL,c=this._comboInput.data.get();a=a||P.noop,milo.util.request.post(b,{name:c},function(b,d){if(b)return R.error('Can not search for "'+c+'"'),a(new Error("Request error"));var e=P.jsonParse(d);e?a(null,e):a(new Error("Data error"))})}function p(a){return a?(this._filteredOptionsData=a,this._total=a.length,void this.update()):R.error("setFilteredOptions: parameter is undefined")}function q(){var a=this._hidden,b=this._filteredOptionsData.slice(this._startIndex,this._endIndex);this._comboOptions.template.render({comboOptions:b}),this._elementHeight=this._elementHeight||X,a&&this.hideOptions();var c=this._startIndex*this._elementHeight,d=(this._total-this._endIndex)*this._elementHeight;this._comboBefore.el.style.height=c+"px",this._comboAfter.el.style.height=d>0?d+"px":"0px"}function r(a,b,c){c.toggleAddButton(!1),b.template.set(U),a.dom.setStyles({overflow:"scroll",height:c._optionsHeight+"px",width:"100%",position:"absolute",zIndex:10}),c.hideOptions(),a.events.onMessages({click:{subscriber:I,context:c},scroll:{subscriber:J,context:c}})}function s(a,b){a.events.once("focus",function(){a.data.on("",{subscriber:x,context:b}),a.events.on("click",{subscriber:F,context:b}),a.events.on("keydown",{subscriber:G,context:b})})}function t(a,b){a.events.on("click",{subscriber:H,context:b})}function u(){return this._currentValue}function v(a){this._currentValue=a,this._comboInput.data.set(a&&a.label),P.deferMethod(this,"hideOptions")}function w(){this._currentValue=null,this._comboInput.data.set("")}function x(a,b){var c=b.newValue&&b.newValue.trim();if(this._optionsURL){var d=this;o.call(this,function(a,b){if(!a&&b)try{var e=b.data.map(d._formatOptionsURL);d.setOptions(e),z.call(d,c,d._optionsData)}catch(f){R.error("Data error",f)}})}else{var e=y.call(this,c);z.call(this,c,e)}}function y(a){return this._optionsData.filter(function(b){if(delete b.selected,b.label){var c=b.label.toLowerCase();return 0==c.trim().toLowerCase().indexOf(a.toLowerCase())}})}function z(a,b){function c(b){return b.label.toLowerCase()===a.toLowerCase()}a?(b.length&&P.find(b,c)?this.toggleAddButton(!1,{preserveState:!0}):this._addItemPrompt&&this.toggleAddButton(this._optionsData.length>1||this._optionsURL),b.length?(this.showOptions(),b[0].selected=!0,this._selected=b[0]):this.hideOptions()):this.toggleAddButton(!1,{preserveState:!0}),this.setFilteredOptions(b),this._comboList.el.scrollTop=0}function A(a,b){var c=Z[b.keyCode];c&&B.call(this,c)}function B(a){var b=this.el.querySelectorAll(".selected")[0],c=this._comboList.el.scrollTop,d=b?b.offsetTop:0,e=d-c;if(b){var f=K.call(this,b),g=this._filteredOptionsData[f],h=this._filteredOptionsData[f+a];h&&(delete g.selected,h.selected=!0,this._selected=h,this.update())}else this._filteredOptionsData[0]&&(this._filteredOptionsData[0].selected=!0,this.update());e>this._optionsHeight-2*this._elementHeight&&1===a&&(this._comboList.el.scrollTop+=this._elementHeight*a*5),ethis._lastScrollPos?"down":"up",e=this._comboOptions.el.lastElementChild,f=this._comboOptions.el.firstElementChild,g=e?e.offsetTop:0,h=f?f.offsetTop:0,i=g-c-this._optionsHeight+this._elementHeight,j=c-h,k=Math.floor(j/this._elementHeight),l=Math.floor(i/this._elementHeight),m=Math.floor(c/this._elementHeight)-W;("down"==d&&W>l||"up"==d&&W>k)&&(this._startIndex=m>0?m:0,this._endIndex=m+V,this._elementHeight=e.style.height,this.update()),this._lastScrollPos=c}function K(a){return Number(a.getAttribute("data-value"))+this._startIndex}function L(){delete this._selected.selected,this.hideOptions(),this.toggleAddButton(!1),this._comboInput.data.off("",{subscriber:x,context:this}),this.data.set(this._selected),this.data.dispatchSourceMessage(T),this._comboInput.data.on("",{subscriber:x,context:this}),this._selected=null,this.setFilteredOptions(this._optionsData)}var M=a("../c_class"),N=a("../c_registry"),O=a("milo-core"),P=O.proto,Q=O.util.doT,R=O.util.logger,S="ml-ui-supercombo-open",T="mlsupercombochange",U='{{~ it.comboOptions :option:index }}
{{= option.label }}
{{~}}',V=100,W=25,X=20,Y=M.createComponentClass("MLSuperCombo",{events:{messages:{mouseleave:{subscriber:D,context:"owner"},mouseover:{subscriber:C,context:"owner"}}},data:{get:u,set:v,del:w,splice:void 0,event:T},dom:{cls:"ml-ui-supercombo"},template:{template:'
'},container:void 0});N.add(Y),b.exports=Y,P.extendProto(Y,{init:d,showOptions:h,hideOptions:i,toggleOptions:g,setOptions:m,initOptionsURL:n,setFilteredOptions:p,update:q,toggleAddButton:j,setAddItemPrompt:k,setPlaceholder:l,clearComboInput:w});var Z={40:1,38:-1}},{"../c_class":15,"../c_registry":33,"milo-core":108}],58:[function(a,b,c){"use strict";var d=a("../c_class"),e=a("../c_registry"),f=d.createComponentClass("MLText",{data:void 0,events:void 0,dom:{cls:"ml-ui-text"}});e.add(f),b.exports=f},{"../c_class":15,"../c_registry":33}],59:[function(a,b,c){"use strict";function d(a){return this._autoresize?n.warn("MLTextarea startAutoresize: autoresize is already on"):(this._autoresize=!0,this._autoresizeOptions=a,f.call(this),void e.call(this,"on"))}function e(a){this.events[a]("click",{subscriber:f,context:this}),this.data[a]("",{subscriber:f,context:this})}function f(){this.el.style.height=0;var a=this.el.scrollHeight,b=this._autoresizeOptions.minHeight,c=this._autoresizeOptions.maxHeight;a=a>=c?c:b>=a?b:a,this.el.style.height=a+"px"}function g(){return this._autoresize?(this._autoresize=!1,void e.call(this,"off")):n.warn("MLTextarea stopAutoresize: autoresize is not on")}function h(){return this._autoresize}function i(a){this.el.disabled=a}var j=a("../c_class"),k=a("../c_registry"),l=a("milo-core"),m=l.proto,n=l.util.logger,o=j.createComponentClass("MLTextarea",{data:void 0,events:void 0,dom:{cls:"ml-ui-textarea"}});k.add(o),b.exports=o;m.extendProto(o,{startAutoresize:d,stopAutoresize:g,isAutoresized:h,disable:i})},{"../c_class":15,"../c_registry":33,"milo-core":108}],60:[function(a,b,c){"use strict";function d(){var a=this.el.value,b=a.match(k);if(b){var c=b[1],d=b[2];if(!(c>23||d>59)){var e=new Date(1970,0,1,c,d);return i.toDate(e)}}}function e(a){function b(a){return 10>a?"0"+a:a}var c=i.toDate(a);if(!c)return void(this.el.value="");var d=l.replace("hh",b(c.getHours())).replace("mm",b(c.getMinutes()));return this.el.value=d,d}function f(){this.el.value=""}var g=a("../c_class"),h=a("../c_registry"),i=a("milo-core").proto,j=g.createComponentClass("MLTime",{events:void 0,data:{get:d,set:e,del:f},dom:{cls:"ml-ui-time"}});h.add(j),b.exports=j;var k=/^([0-9]{1,2})(?:\:|\.)([0-9]{1,2})$/,l="hh:mm"},{"../c_class":15,"../c_registry":33,"milo-core":108}],61:[function(a,b,c){"use strict";var d=a("../c_class"),e=a("../c_registry"),f=d.createComponentClass("MLWrapper",{container:void 0,data:void 0,events:void 0,dom:{cls:"ml-ui-wrapper"}});e.add(f),b.exports=f},{"../c_class":15,"../c_registry":33}],62:[function(a,b,c){"use strict";function d(a){n(a,{message:String,type:o.Optional(String),close:o.Optional(Boolean),timeout:o.Optional(Number)});var b=r.createOnElement();a=g(a);var c=q[a.type];b.dom.addCssClasses(c),b._alert={options:a,visible:!1},b.template.render(a).binder();var d=b.container.scope;if(a.close&&d.closeBtn.events.on("click",{subscriber:f,context:b}),a.timeout){setTimeout(function(){b._alert.visible&&b.closeAlert()},a.timeout)}return b}function e(a){var b=r.createAlert(a);return b.openAlert(),b}function f(a,b){this.closeAlert()}function g(a){return a=p.clone(a),a.close="undefined"==typeof a.close||a.close===!0,a.timeout=Math.floor(a.timeout),a.type=a.type||"info",a}function h(){j.call(this,!0)}function i(){j.call(this,!1),this.destroy()}function j(a){a="undefined"==typeof a?!this._alert.visible:!!a;var b=a?"add":"remove",c=a?"appendChild":"removeChild";this._alert.visible=a,document.body[c](this.el),this.dom.toggle(a),this.el.setAttribute("aria-hidden",!a),this.el.classList[b]("in"),this.el[a?"focus":"blur"]()}var k=a("../../c_class"),l=a("../../c_registry"),m=(a("../../../util/component_name"),a("milo-core")),n=(m.util.logger,m.util.check),o=n.Match,p=m.proto,q={success:"alert-success",warning:"alert-warning",info:"alert-info",danger:"alert-danger",fixed:"alert-fixed"},r=k.createComponentClass("MLAlert",{container:void 0,events:void 0,dom:{cls:["ml-bs-alert","alert","fade"],attributes:{role:"alert","aria-hidden":"true"}},template:{template:' {{? it.close }} {{?}} {{= it.message}}'}});l.add(r),b.exports=r,p.extend(r,{createAlert:d,openAlert:e}),p.extendProto(r,{openAlert:h,closeAlert:i})},{"../../../util/component_name":77,"../../c_class":15,"../../c_registry":33,"milo-core":108}],63:[function(a,b,c){"use strict";function d(a,b){w(a,{title:x.Optional(String),html:x.Optional(String),text:x.Optional(String),close:x.Optional(x.OneOf(Boolean,{backdrop:x.Optional(Boolean),keyboard:x.Optional(Boolean),button:x.Optional(Boolean)})),buttons:x.Optional([{name:x.Optional(String),type:String,label:String,close:x.Optional(Boolean),result:x.Optional(String),data:x.Optional(x.Any),cls:x.Optional(String)}]),cssClass:x.Optional(String)});var c=B.createOnElement();a=j(a),c._dialog={options:a,visible:!1},c.template.render(a).binder();var d=c.container.scope;return a.close.backdrop&&c.events.on("click",{subscriber:g,context:c}),a.title&&a.close.button&&d.closeBtn.events.on("click",{subscriber:h,context:c}),a.buttons.forEach(function(a){var b={subscriber:y.partial(e,a),context:c};d[a.name].events.on("click",b)}),b&&b(c),c}function e(a){a.close!==!1&&l.call(this,!1);var b=y.result(a.data,this,a);f.call(this,a.result,b)}function f(a,b){var c=this._dialog.subscriber;"function"==typeof c?c.call(this,a,b):c.subscriber.call(c.context,a,b)}function g(a,b){b.target==this.el&&this.closeDialog("dismissed")}function h(){this.closeDialog("closed")}function i(a){E&&E._dialog.options.close.keyboard&&27==a.keyCode&&E.closeDialog("dismissed")}function j(a){return a=y.clone(a),a.buttons=y.clone(a.buttons||z),a.buttons.forEach(function(a){a.name=a.name||t()}),a.close="undefined"==typeof a.close||a.close===!0?y.object(A,!0):"object"==typeof a.close?y.mapToObject(A,function(b){return a.close[b]!==!1}):y.object(A,!1),a}function k(a,b,c){var d=B.createDialog(a,c);return d.openDialog(b),d}function l(a){a="undefined"==typeof a?!this._dialog.visible:!!a;var b=a?"add":"remove",c=a?"appendChild":"removeChild";this._dialog.visible=a,a&&!C&&m(),document.body[c](this.el),D&&document.body[c](D),this.dom.toggle(a),this.el.setAttribute("aria-hidden",!a),document.body.classList[b]("modal-open"),this.el.classList[b]("in"),E=a?this:void 0,this.el[a?"focus":"blur"]()}function m(){D=document.createElement("div"),D.className="modal-backdrop fade in",document.addEventListener("keydown",i),C=!0}function n(a){return w(a,x.OneOf(Function,{subscriber:Function,context:x.Any})),E?v.warn("MLDialog openDialog: can't open dialog, another dialog is already open"):(this._dialog.subscriber=a,void l.call(this,!0))}function o(a,b){return E?(a=a||"closed",l.call(this,!1),void f.call(this,a,b)):v.warn("MLDialog closeDialog: can't close dialog, no dialog open")}function p(){return E}function q(){document.removeEventListener("keydown",i),r.prototype.destroy.apply(this,arguments)}var r=a("../../c_class"),s=a("../../c_registry"),t=a("../../../util/component_name"),u=a("milo-core"),v=u.util.logger,w=u.util.check,x=w.Match,y=u.proto,z=[{type:"default",label:"OK",result:"OK"}],A=["backdrop","keyboard","button"],B=r.createComponentClass("MLDialog",{container:void 0,events:void 0,dom:{cls:["ml-bs-dialog","modal","fade"],attributes:{role:"dialog","aria-hidden":"true"}},template:{template:' '}});s.add(B),b.exports=B,y.extend(B,{createDialog:d,openDialog:k,getOpenedDialog:p}),y.extendProto(B,{openDialog:n,closeDialog:o,destroy:q});var C,D,E},{"../../../util/component_name":77,"../../c_class":15,"../../c_registry":33,"milo-core":108}],64:[function(a,b,c){"use strict";function d(){function a(a){var c=a.target,d=a.relatedTarget,f=i._dropdown.listeners;e(c)&&f.remove(c.contentWindow.document,"click",b),e(d)&&f.add(d.contentWindow.document,"click",b)}function b(a){i.el.contains(a.target)||i.hideMenu()}var c=this.el.querySelector("."+p),d=this.el.querySelector("."+q); if(!c||!d)return n.error("MLDropdown:",p,"or",q,"isn't found");var f=window.document,g=this.toggleMenu.bind(this,void 0),h=new o;this._dropdown={menu:d,visible:!1,listeners:h},this.hideMenu();var i=this;h.add(c,"click",g),h.add(f,"mouseout",a),h.add(f,"click",b)}function e(a){return a&&"IFRAME"==a.tagName}function f(){this._dropdown.listeners.removeAll(),delete this._dropdown,j.prototype.destroy.apply(this,arguments)}function g(){this.toggleMenu(!0)}function h(){this.toggleMenu(!1)}function i(a){a="undefined"==typeof a?!this._dropdown.visible:!!a,this._dropdown.visible=a;var b=this._dropdown.menu;b.style.display=a?"block":"none"}var j=a("../../c_class"),k=a("../../c_registry"),l=a("milo-core"),m=l.proto,n=l.util.logger,o=a("../../../util/dom_listeners"),p="dropdown-toggle",q="dropdown-menu",r=j.createComponentClass("MLDropdown",{events:void 0,dom:{cls:["ml-bs-dropdown","dropdown"]}});k.add(r),b.exports=r,m.extendProto(r,{start:d,destroy:f,toggleMenu:i,showMenu:g,hideMenu:h})},{"../../../util/dom_listeners":82,"../../c_class":15,"../../c_registry":33,"milo-core":108}],65:[function(a,b,c){"use strict";var d=a("milo-core"),e=(d.proto,d.util.doT),f=b.exports=d.config;f({attrs:{bind:"ml-bind",load:"ml-load"},componentRef:"___milo_component",componentPrefix:"milo_",template:{compile:e.compile},domStorage:{typeSuffix:":___milo_data_type",prefixSeparator:"/",root:"",messageKey:"___milo_message/",messageTimestamp:"___milo_timestamp",quotaExceeded:{throwError:!0,message:!1}},dragDrop:{dataTypes:{component:"x-application/milo/component",componentMetaTemplate:"x-application/milo/component-meta/%class/%name/%params",componentMetaRegex:/^x\-application\/milo\/component\-meta\/([a-z0-9]+)\/([a-z0-9]+)\/([a-z0-9]*)$/}},request:{jsonpTimeout:6e4,jsonpCallbackPrefix:"___milo_callback_",optionsKey:"___milo_options",defaults:{timeout:6e4}},websocket:{rpc:{timeout:15e3,responsePrefix:"response_"}},deprecationWarning:"once"})},{"milo-core":108}],66:[function(a,b,c){"use strict";function d(a,b,c){milo(function(){e(a,b,c)})}function e(a,b,c){"function"==typeof a&&(c=a,a=void 0,b=!1),"function"==typeof b&&(c=b,b=!1),a=a||document.body,h.postMessage("loader",{state:"started"}),f(a,b,function(a){h.postMessage("loader",{state:"finished",views:a}),c(a)})}function f(a,b,c){var d=a.getAttribute(m.attrs.load)?[a]:a.querySelectorAll("["+m.attrs.load+"]"),e={},f=d.length,h=0;k.forEach(d,function(a){g(a,b,function(b){e[a.id]=b||a,h++,h==f&&c(e)})})}function g(a,b,c){if(l.children(a).length)throw new Error("can't load html into element that is not empty");var d=new n(a);d.parse().validate(),i.get(d.loadUrl,function(e,f){return e?(e.message=e.message||"can't load file "+d.loadUrl,void c(e)):(a.innerHTML=f,b&&n.remove(a),void c(null))})}var h=a("./services/mail"),i=a("./util/request"),j=a("milo-core"),k=(j.util.logger,j.proto),l=a("./util/dom"),m=a("./config"),n=a("./attributes/a_load");b.exports=d},{"./attributes/a_load":6,"./config":65,"./services/mail":71,"./util/dom":81,"./util/request":89,"milo-core":108}],67:[function(a,b,c){"use strict";function d(a){d.util.domReady(a)}function e(){f.destroy(),d.mail.destroy(),d.window.destroy(),d.util.destroy()}var f=a("milo-core"),g=f.proto;a("./use_facets"),a("./use_components"),g.extend(d,{Messenger:f.Messenger,Model:f.Model,minder:f.minder,loader:a("./loader"),binder:a("./binder"),mail:a("./services/mail"),window:a("./services/window"),config:a("./config"),util:a("./util"),classes:a("./classes"),attributes:a("./attributes"),ComponentFacet:a("./components/c_facet"),Component:a("./components/c_class"),Command:a("./command"),registry:a("./registry"),milo_version:"0.2.6",createComponentClass:a("./util/create_component_class"),createFacetClass:a("./util/create_facet_class"),destroy:e}),"object"==typeof b&&b.exports&&(b.exports=d),"object"==typeof window&&(window.milo=d,d.mail.trigger("miloready"))},{"./attributes":7,"./binder":8,"./classes":9,"./command":12,"./components/c_class":15,"./components/c_facet":16,"./config":65,"./loader":66,"./registry":68,"./services/mail":71,"./services/window":74,"./use_components":75,"./use_facets":76,"./util":87,"./util/create_component_class":78,"./util/create_facet_class":79,"milo-core":108}],68:[function(a,b,c){"use strict";b.exports={facets:a("./components/c_facets/cf_registry"),components:a("./components/c_registry"),commands:a("./command/cmd_registry")}},{"./command/cmd_registry":11,"./components/c_facets/cf_registry":31,"./components/c_registry":33}],69:[function(a,b,c){"use strict";var d=a("milo-core").proto,e={ClipboardEvent:["copy","cut","paste","beforecopy","beforecut","beforepaste"],Event:["input","readystatechange"],FocusEvent:["focus","blur","focusin","focusout"],KeyboardEvent:["keydown","keypress","keyup"],MouseEvent:["click","contextmenu","dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","mouseout","mouseover","show"],TouchEvent:["touchstart","touchend","touchmove","touchenter","touchleave","touchcancel"]};if("undefined"!=typeof window)var f=window;else f={},d.eachKey(e,function(a,b){var c=d.makeFunction(b,"type","properties","this.type = type; _.extend(this, properties);");f[b]=c});var g={};d.eachKey(e,function(a,b){a.forEach(function(a){if(Object.hasOwnProperty(g,a))throw new Error("duplicate event type "+a);g[a]=f[b]})}),b.exports=g},{"milo-core":108}],70:[function(a,b,c){"use strict";function d(a,b,c,d){this.eventEmitter=d,l.prototype.init.apply(this,arguments)}function e(){l.prototype.destroy.apply(this,arguments),delete this.eventEmitter}function f(){return this.eventEmitter}function g(a,b){if(b&&"string"==typeof b){var c=r.test(b);c&&(b=b.replace(r,"")),this.emitter()[a](b,this,c)}}function h(a){var b;"undefined"!=typeof window&&(b=a.eventPhase==window.Event.CAPTURING_PHASE);var c=a.type+(b?s:"");this.dispatchMessage(c,a)}function i(a,b){this.messenger.postMessageSync(a,b)}function j(a,b){o(a,String),o(b,p.Optional(Object)),a=a.replace(r,"");var c=m[a];if("function"!=typeof c)throw new Error("unsupported event type");"undefined"!=typeof b&&(b.type=a);var d=new c(a,b),e=this.emitter().dispatchEvent(d);return e}var k=a("milo-core"),l=k.classes.MessageSource,m=(a("../components/c_class"),a("./de_constrs")),n=k.proto,o=k.util.check,p=o.Match,q=n.createSubclass(l,"DOMEmitterSource",!0);n.extendProto(q,{init:d,destroy:e,addSourceSubscriber:n.partial(g,"addEventListener"),removeSourceSubscriber:n.partial(g,"removeEventListener"),postMessage:i,trigger:j,emitter:f,handleEvent:h}),b.exports=q;var r=/__capture$/,s="__capture"},{"../components/c_class":15,"./de_constrs":69,"milo-core":108}],71:[function(a,b,c){"use strict";var d=a("milo-core"),e=d.Messenger,f=a("./mail_api"),g=a("./mail_source"),h=(d.proto,new e),i=new g(h,{trigger:"trigger"},new f);h._setMessageSource(i),b.exports=h},{"./mail_api":72,"./mail_source":73,"milo-core":108}],72:[function(a,b,c){"use strict";function d(a){return"domready"==a?"readystatechange":k.test(a)?"message":void 0}function e(a,b,c){return"readystatechange"==a?!0:"message"==a?l+c.data.type==b:void 0}var f=a("milo-core"),g=f.classes.MessengerAPI,h=f.proto,i=f.util.check,j=(i.Match,h.createSubclass(g,"MailMsgAPI",!0));h.extendProto(j,{translateToSourceMessage:d,filterSourceMessage:e}),b.exports=j;var k=/^message\:/,l="message:"},{"milo-core":108}],73:[function(a,b,c){"use strict";function d(a){if(f(a))if("loading"==document.readyState)document.addEventListener("readystatechange",this,!1);else{var b=m.readystatechange,c=new b("readystatechange",{target:document});this.dispatchMessage("readystatechange",c)}else this._windowSubscriberMethod("addEventListener",a)}function e(a){f(a)?document.removeEventListener("readystatechange",this,!1):this._windowSubscriberMethod("removeEventListener",a)}function f(a){return"readystatechange"==a&&"object"==typeof document}function g(a){return"message"==a&&"object"==typeof window}function h(a,b){g(b)&&window[a]("message",this,!1)}function i(a){this.dispatchMessage(a.type,a)}function j(a,b){b=b||{},b.type="message:"+a,"object"==typeof window&&window.postMessage(b,"*")}var k=a("milo-core"),l=k.classes.MessageSource,m=a("../de_constrs"),n=k.proto,o=k.util.check,p=(o.Match,n.createSubclass(l,"MailMessageSource",!0));n.extendProto(p,{addSourceSubscriber:d,removeSourceSubscriber:e,trigger:j,_windowSubscriberMethod:h,handleEvent:i}),b.exports=p},{"../de_constrs":69,"milo-core":108}],74:[function(a,b,c){"use strict";function d(){return window.top==window.self||window.__karma__}var e=a("milo-core"),f=e.Messenger,g=a("./dom_source"),h=e.proto,i=new f,j=new g(i,{trigger:"trigger"},void 0,window);i._setMessageSource(j),b.exports=i,h.extend(i,{isTop:d})},{"./dom_source":70,"milo-core":108}],75:[function(a,b,c){"use strict";a("./components/classes/View"),a("./components/ui/Group"),a("./components/ui/Wrapper"),a("./components/ui/Text"),a("./components/ui/Select"),a("./components/ui/Input"),a("./components/ui/InputList"),a("./components/ui/Textarea"),a("./components/ui/RadioGroup"),a("./components/ui/Button"),a("./components/ui/Hyperlink"),a("./components/ui/List"),a("./components/ui/ListItem"),a("./components/ui/Time"),a("./components/ui/Date"),a("./components/ui/Combo"),a("./components/ui/SuperCombo"),a("./components/ui/ComboList"),a("./components/ui/Image"),a("./components/ui/DropTarget"),a("./components/ui/FoldTree"),a("./components/ui/bootstrap/Dropdown")},{"./components/classes/View":35,"./components/ui/Button":42,"./components/ui/Combo":43,"./components/ui/ComboList":44,"./components/ui/Date":45,"./components/ui/DropTarget":46,"./components/ui/FoldTree":47,"./components/ui/Group":48,"./components/ui/Hyperlink":49,"./components/ui/Image":50,"./components/ui/Input":51,"./components/ui/InputList":52,"./components/ui/List":53,"./components/ui/ListItem":54,"./components/ui/RadioGroup":55,"./components/ui/Select":56,"./components/ui/SuperCombo":57,"./components/ui/Text":58,"./components/ui/Textarea":59,"./components/ui/Time":60,"./components/ui/Wrapper":61,"./components/ui/bootstrap/Dropdown":64}],76:[function(a,b,c){"use strict";a("./components/c_facets/Css"),a("./components/c_facets/Dom"),a("./components/c_facets/Data"),a("./components/c_facets/Frame"),a("./components/c_facets/Events"),a("./components/c_facets/Options"),a("./components/c_facets/Template"),a("./components/c_facets/Container"),a("./components/c_facets/ModelFacet"),a("./components/c_facets/Drag"),a("./components/c_facets/Drop"),a("./components/c_facets/List"),a("./components/c_facets/Item"),a("./components/c_facets/Transfer")},{"./components/c_facets/Container":17,"./components/c_facets/Css":18,"./components/c_facets/Data":19,"./components/c_facets/Dom":20,"./components/c_facets/Drag":21,"./components/c_facets/Drop":22,"./components/c_facets/Events":23,"./components/c_facets/Frame":24,"./components/c_facets/Item":25,"./components/c_facets/List":26,"./components/c_facets/ModelFacet":27,"./components/c_facets/Options":28,"./components/c_facets/Template":29,"./components/c_facets/Transfer":30}],77:[function(a,b,c){"use strict";function d(){return g+e()}var e=a("./unique_id"),f=a("../config"),g=f.componentPrefix;b.exports=d},{"../config":65,"./unique_id":94}],78:[function(a,b,c){"use strict";function d(a){g(a,{superClassName:h.Optional(String),className:String,facets:h.Optional(Object),methods:h.Optional(h.ObjectHash(Function)),staticMethods:h.Optional(h.ObjectHash(Function))});var b=i.get(a.superClassName||"Component"),c=b.createComponentClass(a.className,a.facets);if(a.methods&&f.extendProto(c,a.methods),a.staticMethods){if(void 0!==a.staticMethods["super"])throw"'super' is a reserved keyword";f.extend(c,a.staticMethods)}return c["super"]=b.prototype,i.add(c),c}var e=a("milo-core"),f=e.proto,g=e.util.check,h=g.Match,i=a("../components/c_registry");b.exports=d},{"../components/c_registry":33,"milo-core":108}],79:[function(a,b,c){"use strict";function d(a){g(a,{className:String,superClassName:h.Optional(String),methods:h.Optional(h.ObjectHash(Function))});var b=a.superClassName?j.get(a.superClassName):i,c=f.createSubclass(b,a.className);return a.methods&&f.extendProto(c,a.methods),c["super"]=b.prototype,j.add(c),c}var e=a("milo-core"),f=e.proto,g=e.util.check,h=g.Match,i=a("../components/c_facet"),j=a("../components/c_facets/cf_registry");b.exports=d},{"../components/c_facet":16,"../components/c_facets/cf_registry":31,"milo-core":108}],80:[function(a,b,c){"use strict";var d=a("milo-core"),e=d.proto,f=d.util.logger,g=a("../config");b.exports=function h(a,b){function c(){return!g.deprecationWarning||d&&"always"!=g.deprecationWarning||(f.error(b||"Function "+a.name+" is DEPRECATED"),d=!0),a.apply(this,arguments)}var d;switch(typeof a){case"object":return e.mapKeys(a,function(a){return h(a,b)});case"function":for(var i in a)c[i]=h(a[i],b);return c;default:return a}}},{"../config":65,"milo-core":108}],81:[function(a,b,c){"use strict";function d(a){return e(a.childNodes,Node.ELEMENT_NODE)}function e(a,b){return O.filter(a,function(a){return a.nodeType==b})}function f(a){for(;a;){if(a.nodeType==Node.ELEMENT_NODE)return a;a=a.parentNode}return null}function g(a){var b=a.ownerDocument;if(!b)return P.error("selectElementContents: element has no document");var c=b.createRange();c.selectNodeContents(a);var d=G(a),e=d.getSelection();e.removeAllRanges(),e.addRange(c)}function h(a){var b=q(a),c=r(a);b&&c&&l(b,0,c,c.textContent.length)}function i(a,b){var c=a.ownerDocument;if(!c)return P.error("setCaretPosition: element has no document");var d=c.createRange();d.setStart(a,b);var e=G(a),f=e.getSelection();f.removeAllRanges(),f.addRange(d)}function j(a){return k(a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset)}function k(a,b,c,d){var e=a.compareDocumentPosition(c);return e&Node.DOCUMENT_POSITION_FOLLOWING?1:e&Node.DOCUMENT_POSITION_PRECEDING?-1:a==c?d>b?1:b>d?-1:0:void 0}function l(a,b,c,d){var e=a.ownerDocument;if(!e)return P("setCaretPosition: element has no document");var f,g,h=-1==k(a,b,c,d),i=e.createRange(),j=G(a),l=j.getSelection();h?(i.setStart(c,d),i.setEnd(a,b),i.collapse(!1)):(i.setStart(a,b),i.setEnd(c,d)),f=i.commonAncestorContainer==Node.ELEMENT_NODE?i.commonAncestorContainer:i.commonAncestorContainer.parentElement,f.isContentEditable||(g=f.contentEditable,f.contentEditable="true"),l.removeAllRanges(),l.addRange(i),h&&l.extend(c,d),g&&(f.contentEditable=g)}function m(a){a=a||window;var b=a.getSelection();b.removeAllRanges()}function n(a,b){var c,d;for(c=a.offsetTop,d=a.offsetLeft,a=a.offsetParent;a;)c+=a.offsetTop+o(a,"Height",b),d+=a.offsetLeft+o(a,"Width",b),a=a.offsetParent;return{topOffset:c,leftOffset:d}}function o(a,b,c){if(c){var d="Height"==b?"top":"left",e=window.getComputedStyle(a),f=parseInt(e.getPropertyValue("border-"+d+"-width"),10);if(f)return f}return 0}function p(a){var b=a.parentNode;b&&(b.removeChild(a),b.normalize())}function q(a){if(a.nodeType==Node.TEXT_NODE)return a;var b=F(a,NodeFilter.SHOW_TEXT);return b.firstChild()}function r(a){if(a.nodeType==Node.TEXT_NODE)return a;var b=F(a,NodeFilter.SHOW_TEXT);return b.lastChild()}function s(a){var b=a.parentNode;if(b){var c=document.createDocumentFragment(),d=O.slice(a.childNodes);d.forEach(c.appendChild,c),b.replaceChild(c,a),b.normalize()}}function t(a,b){var c=b.parentNode;c&&(c.insertBefore(a,b),a.appendChild(b))}function u(a){return w(a,"trimRight")}function v(a){return w(a,"trimLeft")}function w(a,b){var c=a.length;return a.textContent=a.textContent[b](),c!==a.length}function x(a){delete a[M.componentRef]}function y(a){var b=document.createElement("DIV");return b.innerHTML=a,b.textContent||""}function z(a,b,c,d){for(var e=document.createTreeWalker(a,b);e.nextNode();){var f=c.call(d||a,e.currentNode);if(f===!1)break}}function A(a,b){function c(a){return a.contains(b)}if(a&&a.contains(b)){for(var d=[],e=a;e!=b;){var f=O.findIndex(e.childNodes,c);d.push(f),e=e.childNodes[f]}return d}}function B(a,b,c){if(b){var d=b.length;if(0===d)return a;for(var e=a,f=0;d>f;f++){var g=e.childNodes;if(!g){c||(e=void 0);break}var h=b[f],i=g[h];if(!i){e=c?g[g.length-1]:void 0;break}e=i}return e}}function C(a,b,c,d){var e=c.nodeType==Node.TEXT_NODE;if(a.contains(c)&&p(c),0!=b.length){var f=B(a,b.slice(0,-1),d),g=f.childNodes;if(!g){if(!d)return;f=f.parentNode,g=f.childNodes}var h=b[b.length-1],i=g[h];return i?(f.insertBefore(c,i),e&&f.normalize(),!0):0!==g.length||0!==h&&!d?(i=g[h-1],i||d?(f.appendChild(c),e&&f.normalize(),!0):void 0):(f.appendChild(c),e&&f.normalize(),!0)}}function D(a,b){var c,d=0;if(!Array.isArray(a)&&Array.isArray(b))return P.error("isTreePathBefore: One or both paths are not valid treepath arrays.");for(d;db[d]){c=!1;break}}return"undefined"==typeof c&&a.length\&]/gim,function(a){return"&#"+a.charCodeAt(0)+";"})}function F(a,b){return b=b||NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,document.createTreeWalker(a,b)}function G(a){var b=a.ownerDocument;return b&&(b.defaultView||b.parentWindow)}function H(a,b){function c(b){var c=document.createRange(),d=!1;return c.selectNode(b),-1!=c.compareBoundaryPoints(window.Range.START_TO_START,a)&&1!=c.compareBoundaryPoints(window.Range.END_TO_END,a)&&(d=!0),c.detach(),d}for(var d,e=a.commonAncestorContainer,f=e.ownerDocument,g=f.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT);d=g.nextNode();)c(d)&&b(d)}function I(a){var b=G(a.startContainer),c=b.milo.Component,d=[];return H(a,function(a){if(a.nodeType!=Node.TEXT_NODE){var b=c.getComponent(a);b&&d.push(b)}}),d}function J(a){var b=I(a);b.forEach(function(a){a.destroy(!0)}),a.deleteContents()}function K(a,b){return 0==a.compareBoundaryPoints(window.Range.START_TO_START,b)&&0==a.compareBoundaryPoints(window.Range.END_TO_END,b)}function L(a,b){var c=document.createElement("div");c.setAttribute("style","width: 1px; height: 1px; position:fixed; left:"+a+"px; top:"+b+"px; background-color:red; z-index: 100"),setTimeout(function(){document.body.appendChild(c)},200)}var M=a("../config"),N=a("milo-core"),O=N.proto,P=N.util.logger,Q={children:d,filterNodeListByType:e,containingElement:f,selectElementContents:g,selectElementText:h,getElementOffset:n,setCaretPosition:i,getSelectionDirection:j,setSelection:l,clearSelection:m,removeElement:p,unwrapElement:s,wrapInElement:t,detachComponent:x,firstTextNode:q,lastTextNode:r,trimNodeRight:u,trimNodeLeft:v,stripHtml:y,htmlEntities:E,walkTree:z,createTreeWalker:F,treePathOf:A,getNodeAtTreePath:B,insertAtTreePath:C,isTreePathBefore:D,getNodeWindow:G,getComponentsFromRange:I,deleteRangeWithComponents:J,forEachNodesInRange:H,areRangesEqual:K,addDebugPoint:L};b.exports=Q},{"../config":65,"milo-core":108}],82:[function(a,b,c){"use strict";function d(){this.listeners=[]}function e(a,b,c){this.listeners.push({target:a,eventType:b,handler:c}),a.addEventListener(b,c)}function f(a,b,c){var d={target:a,eventType:b,handler:c},e=i.findIndex(this.listeners,i.partial(i.isEqual,d));e>-1&&(this.listeners.splice(e,1),h(d))}function g(){this.listeners.forEach(h),this.listeners=[]}function h(a){a.target.removeEventListener(a.eventType,a.handler)}var i=a("milo-core").proto;b.exports=d,i.extendProto(d,{add:e,remove:f,removeAll:g})},{"milo-core":108}],83:[function(a,b,c){"use strict";function d(a){function b(){a.apply(c,d)}var c=this,d=g.slice(arguments,1);f.call(this)?b():(i||(document.addEventListener("readystatechange",e),i=!0),h.push(b))}function e(){document.removeEventListener("readystatechange",e),h.forEach(function(a){a()})}function f(){var a=document.readyState;return"loading"==a?!1:a}var g=a("milo-core").proto;b.exports=d;var h=[],i=!1;g.extend(d,{isReady:f})},{"milo-core":108}],84:[function(a,b,c){"use strict";function d(a){this.event=a,this.dataTransfer=a.dataTransfer,this.types=a.dataTransfer.types}function e(){return E.dataTypes.component}function f(a,b){var c=g(a,b),d=c.clientY>c.targetTop+c.targetHeight/2;return d?"below":"above"}function g(a,b){try{var c=b.getBoundingClientRect(),d=c.width,e=c.height,f=c.top,g=c.left}catch(h){}return{clientX:a.clientX,clientY:a.clientY,targetWidth:d,targetHeight:e,targetTop:f,targetLeft:g}}function h(){return G.indexOf(this.types,d.componentDataType())>=0}function i(){var a=d.componentDataType(),b=this.dataTransfer.getData(a),c=G.jsonParse(b);return c}function j(a,b){if(!b){var c=a.getTransferState({requestedBy:"drag"});b=JSON.stringify(c)}var e=d.componentDataType();return b&&this.dataTransfer.setData(e,b),this.dataTransfer.setData("text/html",a.el.outerHTML),b}function k(a,b,c){var d=m(a),e=JSON.stringify(b||{}),f=E.dataTypes.componentMetaTemplate.replace("%class",l(d.compClass||"")).replace("%name",l(d.compName||"")).replace("%params",l(e||""));return c&&"object"==typeof c&&(c=JSON.stringify(c)),this.dataTransfer.setData(f,c||""),f}function l(a){return H.encode(a).toLowerCase()}function m(a){return a.transfer?a.transfer.getComponentMeta():{compClass:a.constructor.name,compName:a.name}}function n(){var a,b=G.find(this.types,function(b){return a=b.match(F),!!a});if(b){for(var c=1;4>c;c++)a[c]=H.decode(a[c]);return{compClass:a[1],compName:a[2],params:JSON.parse(a[3]),metaDataType:b,metaData:G.jsonParse(this.dataTransfer.getData(b))||this.dataTransfer.getData(b)}}}function o(){return this.dataTransfer.effectAllowed}function p(a){this.dataTransfer.effectAllowed=a}function q(){return this.dataTransfer.dropEffect}function r(a){this.dataTransfer.dropEffect=a}function s(a){var b=this.getAllowedEffects(),c="copy"==a,d="move"==a,e="link"==a,f=c||e||d;switch(b){case"copy":case"move":case"link":return b==a;case"copyLink":return c||e;case"copyMove":return c||d;case"linkMove":return e||d;case"all":case"uninitialized":return f;case"none":return!1}}function t(a){return this.dataTransfer.getData(a)}function u(a,b){this.dataTransfer.setData(a,b)}function v(a){this.dataTransfer.clearData(a)}function w(a,b){I=b.dragDrop,J=b.dragFacet}function x(a,b){J&&J.postMessageSync("dragdropcompleted",b),I=void 0,J=void 0}function y(a,b){I&&K.postMessageSync("dragdropcompleted",b)}function z(){return I}function A(){return J&&J.owner}function B(){K.offAll()}var C=(a("../components/c_class"),a("milo-core")),D=C.Messenger,E=a("../config").dragDrop,F=E.dataTypes.componentMetaRegex,G=C.proto,H=a("base32");b.exports=d,G.extend(d,{componentDataType:e,getDropPositionY:f}),G.extendProto(d,{isComponent:h,getComponentState:i,setComponentState:j,getComponentMeta:n,setComponentMeta:k,getAllowedEffects:o,setAllowedEffects:p,getDropEffect:q,setDropEffect:r,isEffectAllowed:s,getData:t,setData:u,clearData:v});var I,J,K=new D;G.extend(d,{service:K,destroy:B}),K.onMessages({dragdropstarted:w,dragdropcompleted:x,completedragdrop:y}),G.extend(K,{getCurrentDragDrop:z,getCurrentDragSource:A})},{"../components/c_class":15,"../config":65,base32:98,"milo-core":108}],85:[function(a,b,c){"use strict";function d(a){var b=f.makeFunction(a,"message",'this.name = "'+a+'"; this.message = message || "There was an error";');return f.makeSubclass(b,Error),b}function e(){throw new h.AbstractClass("calling the method of an absctract class")}var f=a("milo-core").proto,g=["AbstractClass","Mixin","Messenger","Component","Attribute","Binder","Loader","MailMessageSource","Facet","Scope","Model","DomFacet","EditableFacet","List","Connector","Registry","FrameMessageSource","Drop","Angular","StorageMessageSource"],h={toBeImplemented:e,createClass:d};g.forEach(function(a){h[a]=d(a+"Error")}),b.exports=h},{"milo-core":108}],86:[function(a,b,c){"use strict";function d(a,b,c){var d=g(a);if(!d)return void t.error("fragment.getState: range has no common container");var e=a.cloneContents(),j=f(e,c);h(d,j),b&&i(j);var k=j.getState();return u.deferMethod(j,"destroy"),k}function e(a,b,c){try{var d=g(a);if(!d)return void c(new Error("fragment.getState: range has no common container"));"function"==typeof b&&(c=b,b=!1);var e=a.cloneContents(),j=f(e);h(d,j),u.defer(function(){j.broadcast("stateready"),u.defer(function(){b&&i(j);var a=j.getState();j.destroy(),c(null,a)})})}catch(k){c(k)}}function f(a,b){var c=document.createElement("div"),d=new p(c);u.extend(d,{compClass:b||"Component",compFacets:b?[]:["container"],compName:"wrapper"}),d.decorate(),c.appendChild(a);var e=q(c);return e.wrapper}function g(a){var b=r.containingElement(a.commonAncestorContainer);return o.getContainingComponent(b,!0,"container")}function h(a,b){var c=a.container.scope;b.container.scope._each(function(a,b){var d=c[b];if(!d)return t.error("fragment.getState: conponent",b,"not found in range");var e=d._getState(!0);a.setState(e)})}function i(a){a.container.scope._each(function(a){a.rename()})}function j(a){var b=l(a);return a=k(b)}function k(a){var b=document.createRange();return a.siblings?(b.setStartBefore(a.start),b.setEndAfter(a.end)):b.selectNode(a.start),b}function l(a){var b=a.commonAncestorContainer,c=a.startContainer,d=a.endContainer;if(c==d)return c!=b&&t.error("deleteSelectionCommand logical error: start==end, but container is different"),{siblings:!1,start:c};if(c==b||d==b)return{siblings:!1,start:b};var e=m(b,c),f=m(b,d);return e&&f?e==f?(t.error("deleteSelectionCommand logical error: same siblings"),{siblings:!1,start:e}):{siblings:!0,start:e,end:f}:void 0}function m(a,b){return u.find(a.childNodes,function(a){return a.contains(b)})}function n(a){return function(b,c){var d={siblings:c.siblings,start:a(b,c.start)};return d.siblings&&(d.end=a(b,c.end)),d}}var o=a("../components/c_class"),p=a("../attributes/a_bind"),q=a("../binder"),r=a("./dom"),s=a("milo-core"),t=s.util.logger,u=(s.util.check,s.proto),v=n(r.treePathOf),w=n(r.getNodeAtTreePath);b.exports={getState:d,getStateAsync:e,expandRangeToSiblings:j,getRangeSiblings:l,createRangeFromSiblings:k,createRangeFromNodes:k,createRangePaths:v,createRangeNodes:w}},{"../attributes/a_bind":4,"../binder":8,"../components/c_class":15,"./dom":81,"milo-core":108}],87:[function(a,b,c){"use strict";function d(){g.request.destroy(),g.dragDrop.destroy()}var e=a("milo-core"),f=a("./deprecate"),g={logger:e.util.logger,request:a("./request"),websocket:a("./websocket"),check:e.util.check,error:f(a("./error"),"milo.util.error is DEPRECATED and will be REMOVED soon!"),count:f(a("./unique_id"),"milo.util.count is DEPRECATED! Use milo.util.uniqueId instead"),uniqueId:a("./unique_id"),componentName:a("./component_name"),dom:a("./dom"),domListeners:a("./dom_listeners"),selection:a("./selection"),fragment:a("./fragment"),jsonParse:f(a("./json_parse"),"milo.util.jsonParse is DEPRECATED! Use _.jsonParse instead"),storage:a("./storage"),domReady:a("./domready"),dragDrop:a("./dragdrop"),dialog:f(a("../components/ui/bootstrap/Dialog"),"milo.util.dialog is DEPRECATED! Use milo.registry.components.get('MLDialog') instead"),alert:f(a("../components/ui/bootstrap/Alert"),"milo.util.alert is DEPRECATED! Use milo.registry.components.get('MLAlert') instead"),deprecate:f,doT:e.util.doT,destroy:d};b.exports=g},{"../components/ui/bootstrap/Alert":62,"../components/ui/bootstrap/Dialog":63,"./component_name":77,"./deprecate":80,"./dom":81,"./dom_listeners":82,"./domready":83,"./dragdrop":84,"./error":85,"./fragment":86,"./json_parse":88,"./request":89,"./selection":90,"./storage":91,"./unique_id":94,"./websocket":95,"milo-core":108}],88:[function(a,b,c){"use strict";function d(a){try{return JSON.parse(a)}catch(b){}}b.exports=d},{}],89:[function(a,b,c){"use strict";function d(a){return function(){var b=Promise.prototype[a].apply(this,arguments);return g(b,this._request),b}}function e(a,b,c){function d(a){i(g,c,j,a.type)}b.url=a,b.contentType=b.contentType||"application/json;charset=UTF-8",A&&e.postMessageSync("request",{options:b});var g=new XMLHttpRequest;g.open(b.method,b.url,!0),g.setRequestHeader("Content-Type",b.contentType),h(g,b.headers),g.timeout=b.timeout||u.request.defaults.timeout,g.onreadystatechange=g.ontimeout=g.onabort=d;var j=f(g);return g.send(JSON.stringify(b.data)),g[u.request.optionsKey]=b,b.trackCompletion!==!1&&x.push(g),j.promise}function f(a){var b,c,d=new Promise(function(a,d){b=a,c=d});return g(d,a),d["catch"](s.noop),{promise:d,resolve:b,reject:c}}function g(a,b){return a._request=b,a.then=y,a["catch"]=z,a}function h(a,b){b&&s.eachKey(b,function(b,c){a.setRequestHeader(c,b)})}function i(a,b,c,d){function f(b){A&&e.postMessage(b,{status:status,response:a.responseText})}if(4==a.readyState&&(a.status||"readystatechange"!=d)){s.spliceItem(x,a);var g;try{if(a.status>=200&&a.status<400){try{f("success"),b&&b(null,a.responseText,a)}catch(h){g=h}c.resolve(a.responseText)}else{var i=a.status||d;try{f("error"),f("error"+i),b&&b(i,a.responseText,a)}catch(h){g=h}c.reject({reason:i,response:a.responseText})}}catch(h){g=g||h}if(a.onreadystatechange=a.ontimeout=a.onabort=void 0,x.length||f("requestscompleted"),g){var j=new Error("Exception: "+g);throw v.error(g.stack),j}}}function j(){A=new w(e,["on","once","onSync","off","onMessages","offMessages","postMessage","postMessageSync"])}function k(a,b){return e(a,{method:"GET"},b)}function l(a,b,c){return e(a,{method:"POST",data:b},c)}function m(a,b){var c=e(a,{method:"GET"}),d=c.then(JSON.parse);return b&&d.then(function(a){b(null,a)},function(a){b(a.reason,a.response)}),d}function n(a,b){function c(a,c){s.spliceItem(x,window[k]);try{g(a?"error":"success",a,c),a&&(v.error("No JSONP response or timeout"),g("errorjsonptimeout",a)),b&&b(a,c)}catch(e){var f=e}if(a?i.reject(a):i.resolve(c),d(),x.length||g("requestscompleted"),f)throw f}function d(){clearTimeout(m),j.removeChild(h),delete window[k]}function g(a,b,c){A&&e.postMessage(a,{status:b,response:c})}var h=document.createElement("script"),i=f(h),j=window.document.head,k=u.request.jsonpCallbackPrefix+t(),l=s.extend({url:a},B);A&&e.postMessageSync("request",{options:l}),s.isEqual(s.omitKeys(l,"url"),B)||v.warn("Ignored not allowed request options change in JSONP request - only URL can be changed");var m=setTimeout(function(){var a=new Error("No JSONP response or no callback in response");c(a)},u.request.jsonpTimeout);return window[k]=s.partial(c,null),x.push(window[k]),h.type="text/javascript",h.src=l.url+(-1==l.url.indexOf("?")?"?":"&")+"callback="+k,j.appendChild(h),i.promise}function o(a,b,c,d){function g(a){d&&(j.upload.onprogress=void 0),i(j,c,k,a.type)}"string"==typeof a&&(a={method:"POST",url:a}),a.method=a.method||"POST",a.file=!0,A&&e.postMessageSync("request",{options:a});var j=new XMLHttpRequest;d&&(j.upload.onprogress=d),j.open(a.method,a.url,!0),h(j,a.headers),j.timeout=a.timeout||u.request.defaults.timeout,j.onreadystatechange=j.ontimeout=j.onabort=g;var k=f(j);if(a.binary)j.send(b);else{var l=new FormData;l.append("file",b),j.send(l)}return j[u.request.optionsKey]=a,a.trackCompletion!==!1&&x.push(j),k.promise}function p(){A&&A.destroy(),e._destroyed=!0}function q(a,b){a=s.once(a),b&&s.delay(a,b,"timeout"),x.length?A.once("requestscompleted",a):s.defer(a)}var r=a("milo-core"),s=r.proto,t=a("./unique_id"),u=a("../config"),v=r.util.logger,w=r.Messenger;b.exports=e;var x=[],y=d("then"),z=d("catch");s.extend(e,{get:k,post:l,json:m,jsonp:n,file:o,useMessenger:j,destroy:p,whenRequestsCompleted:q});var A,B={method:"GET",jsonp:!0}},{"../config":65,"./unique_id":94,"milo-core":108}],90:[function(a,b,c){"use strict";function d(a){return!this instanceof d?new d(a):(this.window=a||window,void this.init())}function e(){this.selection=this.window.getSelection(),this.selection.rangeCount&&(this.range=this.selection.getRangeAt(0)),this.isCollapsed=this.selection.isCollapsed}function f(){return this.range?(this._text||(this._text=this.range.toString()),this._text):void 0}function g(){return this.range?(this._textNodes||(this._textNodes=i.call(this)),this._textNodes):void 0}function h(){this.selection.removeAllRanges()}function i(){var a=[];if(this.isCollapsed)return a;for(var b=this.range.startContainer,c=this.range.endContainer,d=this.range.commonAncestorContainer,e=this.window.document.createTreeWalker(d,NodeFilter.SHOW_TEXT),f=e.currentNode=b;f&&(!g||c.contains(f));){a.push(f); var g=g||c.contains(f);f=e.nextNode()}return a}function j(a,b){return this.range?("undefined"==typeof this[a]&&(this[a]=A(this.range[b])),this[a]):void 0}function k(a,b){return this.range?("undefined"==typeof this[a]&&(this[a]=G.getContainingComponent(this[b]())),this[a]):void 0}function l(){if(this._containedComponents)return this._containedComponents;var a=this._containedComponents=[];return this.isCollapsed||!this.range?a:C(this.range)}function m(a,b){if(!this.isCollapsed&&this.range){var c=this.containedComponents();c.forEach(a,b)}}function n(a){if(!this.isCollapsed&&this.range){var b=this._getPostDeleteSelectionPoint(a);D(this.range),this._selectAfterDelete(b),b.node.parentNode.normalize()}}function o(a){var b=this.range.startContainer,c=this.range.startOffset;return a&&this.range.startContainer!=this.range.endContainer&&(b=this.range.endContainer,c=0),{node:b,offset:c}}function p(a){var b=a.node,c=a.offset;if(b){b.nodeType==Node.TEXT_NODE&&(b.textContent=b.textContent.trimRight()),b.nodeValue||(b.nodeValue=" ");var d=c>b.length?b.length:c;B(b,d)}}function q(){return this.range}function r(a){var b=this.range,c=a.ownerDocument,e=c.defaultView||c.parentWindow;return b?d.createStateObject(a,b.startContainer,b.startOffset,b.endContainer,b.endOffset):{window:e}}function s(a,b,c,d,e){d=d||b,e=e||c;var f=a.ownerDocument,g=f.defaultView||f.parentWindow;return{window:g,rootEl:a,start:t(a,b,c),end:t(a,d,e)}}function t(a,b,c){var d=z.treePathOf(a,b);return d||F.error("Selection point is outside of root element"),{treePath:d,offset:c}}function u(a){var b=a.window.milo.util.dom;if(!(a.rootEl&&a.start&&a.end))return b.clearSelection(a.window),new d(a.window);var c=v(a.rootEl,a.start),e=v(a.rootEl,a.end);try{return b.setSelection(c,a.start.offset,e,a.end.offset),new d(a.window)}catch(f){F.error("Text selection: can't create selection",f,f.message)}}function v(a,b){var c=z.getNodeAtTreePath(a,b.treePath);return c||F.error("TextSelection createFromState: no node at treePath"),c}function w(a,b){var c,e=a.startContainer.ownerDocument.defaultView,f=e.getSelection();return f.removeAllRanges(),b?(c=a.cloneRange(),c.collapse(!1),f.addRange(c),f.extend(a.startContainer,a.startOffset)):f.addRange(a),new d(e)}function x(){var a,b,c=this.range.commonAncestorContainer.ownerDocument,d=this.range.cloneRange();return d.endContainer.nodeType!==Node.TEXT_NODE&&(a=c.createTreeWalker(c.body,NodeFilter.SHOW_TEXT),a.currentNode=d.endContainer,b=a.previousNode(),d.setEnd(b,b.length)),d}function y(){return z.getSelectionDirection(this.selection)}var z=a("../dom"),A=z.containingElement,B=z.setCaretPosition,C=z.getComponentsFromRange,D=z.deleteRangeWithComponents,E=a("milo-core"),F=E.util.logger,G=a("../../components/c_class"),H=E.proto;b.exports=d;var I=H.partial(j,"_startElement","startContainer"),J=H.partial(j,"_endElement","endContainer"),K=H.partial(j,"_containingElement","commonAncestorContainer"),L=H.partial(k,"_startComponent","startElement"),M=H.partial(k,"_endComponent","endElement"),N=H.partial(k,"_containingComponent","containingElement");H.extendProto(d,{init:e,text:f,textNodes:g,clear:h,startElement:I,endElement:J,containingElement:K,startComponent:L,endComponent:M,containingComponent:N,containedComponents:l,eachContainedComponent:m,del:n,_getPostDeleteSelectionPoint:o,_selectAfterDelete:p,getRange:q,getState:r,getNormalizedRange:x,getDirection:y}),H.extend(d,{createFromRange:w,createFromState:u,createStateObject:s})},{"../../components/c_class":15,"../dom":81,"milo-core":108}],91:[function(a,b,c){"use strict";function d(a,b,c){"undefined"!=typeof window&&(c=c||window,a=C.domStorage.root+(a?a+C.domStorage.prefixSeparator:""),D.defineProperties(this,{keyPrefix:a,sessionOnly:!!b,window:c,_storage:b?c.sessionStorage:c.localStorage,_typeSuffix:C.domStorage.typeSuffix,_keys:{}},D.WRIT))}function e(a){if("object"==typeof a)D.eachKey(a,function(a,b){this.setItem(b,a)},this);else{var b=arguments.length;if(b%2)throw new DomStorageError("DOMStorage: set should have even number of arguments or object");for(var c=0;b>c;c++){var d=arguments[c],e=arguments[++c];this.setItem(d,e)}}}function f(){var a={};return D.deepForEach(arguments,function(b){a[b]=this.getItem(b)},this),a}function g(){D.deepForEach(arguments,function(a){this.removeItem(a)},this)}function h(a){var b=this._storageKey(a);return null!=this._storage.getItem(b)}function i(a){var b=this._storageKey(a),c=p.call(this,b),d=this._storage.getItem(b),e=v(d,c);return e}function j(a,b){var c=this._storageKey(a),d=q.call(this,c,b),e=u(b,d);try{this._storage.setItem(c,e)}catch(f){if("QuotaExceededError"!=f.name)throw f;var g=C.domStorage.quotaExceeded;if(g.message&&milo.mail.postMessage("quotaexceedederror",b),g.throwError)throw f}this._keys[a]=!0,I[this.sessionOnly]._keys[c]=!0}function k(a){var b=this._storageKey(a);this._storage.removeItem(b),r.call(this,b),delete this._keys[a],delete I[this.sessionOnly]._keys[b]}function l(){var a=Object.keys(this._keys),b=a.filter(function(a){return this.hasItem(a)?!0:void delete this._keys[a]},this);return b}function m(){return this.get(this.getAllKeys())}function n(a){return this.keyPrefix+a}function o(a){return a.indexOf(this._typeSuffix)>=0?void 0:D.unPrefix(a,this.keyPrefix)}function p(a){return a=s.call(this,a),this._storage.getItem(a)}function q(a,b){var c=t(b);return a=s.call(this,a),this._storage.setItem(a,c),c}function r(a){a=s.call(this,a),this._storage.removeItem(a)}function s(a){return a+this._typeSuffix}function t(a){var b=typeof a,c=a&&a.constructor.name,d=J[c];return d||("object"!=b?b:null==a?"null":a.constructor.name)}function u(a,b){b=b||t(a);var c=K[b];return c?c(a,b):a&&a.toString==Object.prototype.toString?JSON.stringify(a):""+a}function v(a,b){var c=L[b];return c?c(a,b):a}function w(a,b,c,d){b&&(K[a]=b),c&&(L[a]=c),J[a]=d||a}function x(){var a=new B(this),b=new A(this,void 0,a);D.defineProperties(this,{_messenger:b,_messageSource:a},D.WRIT)}function y(){this._storage=void 0,this.window=void 0,this._messenger&&this._messenger.destroy(),this._destroyed=!0}var z=a("milo-core"),A=z.Messenger,B=a("./msg_src"),C=a("../../config"),D=z.proto,E=z.util.check;E.Match;a("./model"),b.exports=d;var F={"true":{},"false":{}};D.extendProto(d,{get:f,set:e,remove:g,hasItem:h,getItem:i,setItem:j,removeItem:k,_storageKey:n,_domStorageKey:o,getAllKeys:l,getAllItems:m,createMessenger:x,destroy:y}),A.useWith(d,"_messenger",A.defaultMethods),B.useWith(d,"_messageSource",["trigger"]);var G=new d("",!0),H=new d("",!1),I={"true":G,"false":H};D.extend(d,{registerDataType:w,local:H,session:G,storage:I,_storedKeys:F});var J={},K={Array:JSON.stringify},L={Object:D.jsonParse,Array:D.jsonParse,Date:function(a){return new Date(a)},"boolean":function(a){return"true"==a},number:Number,"function":D.toFunction,RegExp:D.toRegExp}},{"../../config":65,"./model":92,"./msg_src":93,"milo-core":108}],92:[function(a,b,c){"use strict";function d(){var b=a("./index");b.registerDataType("Model",e,f),b.registerDataType("ModelPath",e,f,"Model")}function e(a){var b=a.get();return JSON.stringify(b)}function f(a){var b=i.jsonParse(a);return new h(b)}var g=a("milo-core"),h=g.Model,i=g.proto;h.registerWithDOMStorage=d},{"./index":91,"milo-core":108}],93:[function(a,b,c){"use strict";function d(a,b,c){if("DOMStorage"!=a.constructor.name)throw new Error("hostObject should be an instance of DOMStorage");this.storage=a,this.messageKey=m.domStorage.messageKey,this.window=a.window,k.prototype.init.apply(this,arguments)}function e(a){this.window.addEventListener("storage",this,!1)}function f(a){this.window.removeEventListener("storage",this,!1)}function g(a,b){this.messenger.postMessageSync(a,b)}function h(a,b){var c=this.messageKey+a;b=b||{},b[m.domStorage.messageTimestamp]=n(),l.deferMethod(this.storage,"setItem",c,b)}function i(a){if(a.storageArea==this.storage._storage){var b=this.storage._domStorageKey(a.key);if(b){var c=l.unPrefix(b,this.messageKey);if(c){var d=this.storage.getItem(b);d&&this.dispatchMessage(c,d)}}}}var j=a("milo-core"),k=j.classes.MessageSource,l=j.proto,m=a("../../config"),n=a("../../util/unique_id"),o=l.createSubclass(k,"StorageMessageSource",!0);l.extendProto(o,{init:d,addSourceSubscriber:e,removeSourceSubscriber:f,postMessage:g,trigger:h,handleEvent:i}),b.exports=o},{"../../config":65,"../../util/unique_id":94,"milo-core":108}],94:[function(a,b,c){"use strict";function d(){var a=Date.now();return g=""+a,e==a?(f=""===f?0:f+1,g+="_"+f):(e=a,f=""),g}var e=Date.now(),f="",g=""+e;d.get=function(){return g},b.exports=d},{}],95:[function(a,b,c){"use strict";function d(){var a=new e,b=new f(a,{send:"trigger",connect:"connect"},new g);return a._setMessageSource(b),a}var e=a("milo-core").Messenger,f=a("./msg_src"),g=a("./msg_api");b.exports=d},{"./msg_api":96,"./msg_src":97,"milo-core":108}],96:[function(a,b,c){"use strict";function d(a){return l.indexOf(a)>=0?a:"message"}function e(a,b,c){if(l.indexOf(b)>=0)return!0;if("message"==a){var d=c&&c.type;return d==b}}function f(a,b,c){var d="message"==a?i.jsonParse(c.data)||c.data:c;return d}var g=a("milo-core"),h=g.classes.MessengerAPI,i=g.proto,j=g.util.check,k=(j.Match,i.createSubclass(h,"WSMsgAPI",!0));i.extendProto(k,{translateToSourceMessage:d,filterSourceMessage:e,createInternalData:f}),b.exports=k;var l=["open","close","error","message"]},{"milo-core":108}],97:[function(a,b,c){"use strict";function d(a){this._options=a=a||{};var b=a.host||window.location.host.replace(/:.*/,""),c=a.port||"8080";this._ws&&(this._ws.onopen=this.ws.onmessage=this.ws.onclose=this.ws.onerror=void 0,this._ws.close()),this._ws=new WebSocket("ws://"+b+":"+c)}function e(a){g.call(this,"addEventListener",a)}function f(a){g.call(this,"removeEventListener",a)}function g(a,b){return this._ws?void this._ws[a](b,this):m.error("websocket is not created")}function h(a){this.dispatchMessage(a.type,a)}function i(a,b,c){function d(){f("off",b.callbackCorrId),c(new Error("websocket rpc: timeout"))}function e(a,b){if(clearInterval(h),"object"==typeof b){var d=b.error?new Error(b.error):null;c(d,b.data)}else c(new Error("websocket rpc: invalid response data"),b)}function f(a,b){g.messenger[a](o.websocket.rpc.responsePrefix+b,e)}if(!this._ws)return m.error("websocket is not created");b=b||{},b.type=a;var g=this;if(c){b.callbackCorrId=n();var h=l.delay(d,o.websocket.rpc.timeout);f("once",b.callbackCorrId)}this._ws.send(JSON.stringify(b))}var j=a("milo-core"),k=j.classes.MessageSource,l=j.proto,m=j.util.logger,n=a("../../util/unique_id"),o=a("../../config"),p=j.util.check,q=(p.Match,l.createSubclass(k,"WSMessageSource",!0));l.extendProto(q,{addSourceSubscriber:e,removeSourceSubscriber:f,handleEvent:h,connect:d,trigger:i}),b.exports=q},{"../../config":65,"../../util/unique_id":94,"milo-core":108}],98:[function(a,b,c){!function(){function a(){var a=0,b=0;this.output="",this.readByte=function(c){return"string"==typeof c&&(c=c.charCodeAt(0)),0>a?b|=c>>-a:b=c<3?(a-=8,1):(4>a&&(this.output+=f[b>>3],a+=5),0)},this.finish=function(c){var d=this.output+(0>a?f[b>>3]:"")+(c?"$":"");return this.output="",d}}function c(){var a=0,b=0;this.output="",this.readChar=function(c){"string"!=typeof c&&"number"==typeof c&&(c=String.fromCharCode(c)),c=c.toLowerCase();var d=h()[c];"undefined"!=typeof d&&(d<<=3,b|=d>>>a,a+=5,a>=8&&(this.output+=String.fromCharCode(b),a-=8,b=a>0?d<<5-a&255:0))},this.finish=function(b){var c=this.output+(0>a?f[bits>>3]:"")+(b?"$":"");return this.output="",c}}function d(b){var c=new a,d=c.update(b,!0);return d}function e(a){var b=new c,d=b.update(a,!0);return d}var f="0123456789abcdefghjkmnpqrtuvwxyz",g={o:0,i:1,l:1,s:5},h=function(){for(var a={},b=0;b=h){var i=a.__messages;this.off(i,a)}else h>1&&a.options.dispatchTimes--;g?a.subscriber.call(a.context,b,c,d):N(function(){a.subscriber.call(a.context,b,c,d)},0)}function D(a){N=a}function E(a,b){L(a,M.OneOf(String,RegExp));var c=this._chooseSubscribersHash(a),d=c[a]?[].concat(c[a]):[];return b!==!1&&"string"==typeof a&&K.eachKey(this._patternMessageSubscribers,function(b){var c=b.pattern;b&&b.length&&c.test(a)&&K.appendArray(d,b)}),d.length?d:void 0}function F(a){return a instanceof RegExp?this._patternMessageSubscribers:this._messageSubscribers}function G(a){L(a,J),K.defineProperty(this,"_messageSource",a),a.messenger=this}function H(){return this._messageSource}var I=a("../abstract/mixin"),J=a("./m_source"),K=a("mol-proto"),L=a("../util/check"),M=L.Match,N=setTimeout,O=K.createSubclass(I,"Messenger"),P=O.messagesSplitRegExp=/\s*(?:\,|\s)\s*/;K.extendProto(O,{init:d,destroy:f,on:g,once:h,onceSync:i,onSync:j,onAsync:k,onMessage:g,off:r,offMessage:r,onMessages:q,offMessages:v,offAll:w,postMessage:y,postMessageSync:z,getSubscribers:E,getMessageSource:H,_chooseSubscribersHash:F,_registerSubscriber:o,_removeSubscriber:t,_removeAllSubscribers:u,_callPatternSubscribers:A,_callSubscribers:B,_callSubscriber:C,_setMessageSource:G}),O.defaultMethods={on:"on",onSync:"onSync",once:"once",onceSync:"onceSync",off:"off",onMessages:"onMessages",offMessages:"offMessages",postMessage:"postMessage",postMessageSync:"postMessageSync",getSubscribers:"getSubscribers"},O.useSetTimeout=D,b.exports=O,O.subscriptions=[]},{"../abstract/mixin":100,"../util/check":119,"./m_source":106,"mol-proto":125}],104:[function(a,b,c){"use strict";function d(){this.init&&this.init.apply(this,arguments)}function e(){m.defineProperty(this,"_internalMessages",{})}function f(){}function g(a){var b,c=this.translateToSourceMessage(a);if("undefined"!=typeof c)return this._internalMessages.hasOwnProperty(c)?(b=this._internalMessages[c],void(-1==b.indexOf(a)?b.push(a):n.warn("Duplicate addInternalMessage call for internal message "+a))):(b=this._internalMessages[c]=[],b.push(a),c)}function h(a){function b(){n.warn("notification received: un-subscribe from internal message "+a+" without previous subscription notification")}var c=this.translateToSourceMessage(a);if("undefined"!=typeof c){var d=this._internalMessages[c];if(d&&d.length){var e=d.indexOf(a);if(e>=0){if(d.splice(e,1),0==d.length)return delete this._internalMessages[c],c}else b()}else b()}}function i(a){return this._internalMessages[a]}function j(a){return a}function k(a,b,c){return c}function l(a,b,c){return!0}var m=a("mol-proto"),n=a("../util/logger");b.exports=d,m.extendProto(d,{init:e,destroy:f,addInternalMessage:g,removeInternalMessage:h,getInternalMessages:i,translateToSourceMessage:j,createInternalData:k,filterSourceMessage:l})},{"../util/logger":121,"mol-proto":125}],105:[function(a,b,c){"use strict";function d(){h.prototype.init.apply(this,arguments),i.defineProperties(this,{_patternInternalMessages:{}}),this._catchAllSubscribed=!1}function e(a){var b=h.prototype.addInternalMessage.apply(this,arguments);if(b&&b instanceof RegExp){if(this._internalMessages[b].pattern=b,this._patternInternalMessages[b]=this._internalMessages[b],this._catchAllSubscribed)return;return this._catchAllSubscribed=!0,/.*/}return b}function f(a){var b=h.prototype.removeInternalMessage.apply(this,arguments);if(b&&b instanceof RegExp){delete this._patternInternalMessages[b];var c=!Object.keys(this._patternInternalMessages).length;if(c)return this._catchAllSubscribed=!1,/.*/}return b}function g(a){var b=h.prototype.getInternalMessages.apply(this,arguments);if("string"==typeof a){b=b||[];var c=i.object(b,!0);i.eachKey(this._patternInternalMessages,function(d){var e=d.pattern;e.test(a)&&d.forEach(function(a){c[a]||(b.push(a),c[a]=!0)})})}return b}var h=a("./m_api"),i=a("mol-proto"),j=i.createSubclass(h,"MessengerRegexpAPI");b.exports=j,i.extendProto(j,{init:d,addInternalMessage:e,removeInternalMessage:f,getInternalMessages:g})},{"./m_api":104,"mol-proto":125}],106:[function(a,b,c){"use strict";function d(a,b,c){this._prepareMessengerAPI(c)}function e(){this.messengerAPI&&this.messengerAPI.destroy()}function f(a){o.defineProperty(this,"messenger",a)}function g(a){p(a,q.Optional(n)),a||(a=new n),o.defineProperty(this,"messengerAPI",a)}function h(a){var b=this.messengerAPI.addInternalMessage(a);"undefined"!=typeof b&&this.addSourceSubscriber(b)}function i(a){var b=this.messengerAPI.removeInternalMessage(a);"undefined"!=typeof b&&this.removeSourceSubscriber(b)}function j(a,b){var c=this.messengerAPI,d=c.getInternalMessages(a);d&&d.forEach(function(d){var e=c.createInternalData(a,d,b),f=c.filterSourceMessage(a,d,e);f&&this.postMessage(d,e)},this)}function k(a,b){this.messenger.postMessage(a,b)}function l(){throw new Error("calling the method of an absctract class")}var m=a("../abstract/mixin"),n=a("./m_api"),o=(a("../util/logger"),a("mol-proto")),p=a("../util/check"),q=p.Match,r=o.createSubclass(m,"MessageSource",!0);b.exports=r,o.extendProto(r,{init:d,destroy:e,setMessenger:f,onSubscriberAdded:h,onSubscriberRemoved:i,dispatchMessage:j,postMessage:k,_prepareMessengerAPI:g,trigger:l,addSourceSubscriber:l,removeSourceSubscriber:l})},{"../abstract/mixin":100,"../util/check":119,"../util/logger":121,"./m_api":104,"mol-proto":125}],107:[function(a,b,c){"use strict";function d(a,b,c,d){h.prototype.init.apply(this,arguments),this.sourceMessenger=d}function e(a){this.sourceMessenger.onSync(a,{context:this,subscriber:this.dispatchMessage})}function f(a){this.sourceMessenger.off(a,{context:this,subscriber:this.dispatchMessage})}function g(a,b){this.messenger.postMessageSync(a,b)}var h=a("./m_source"),i=a("mol-proto"),j=(a("../util/check"),i.createSubclass(h,"MessengerMessageSource"));b.exports=j,i.extendProto(j,{init:d,addSourceSubscriber:e,removeSourceSubscriber:f,postMessage:g})},{"../util/check":119,"./m_source":106,"mol-proto":125}],108:[function(a,b,c){"use strict";function d(){f.minder.destroy()}var e=a("mol-proto"),f={minder:a("./minder"),config:a("./config"),util:a("./util"),classes:a("./classes"),Messenger:a("./messenger"),Model:a("./model"),destroy:d,proto:e};"object"==typeof b&&b.exports&&(b.exports=f),"object"==typeof window&&(window.milo=f)},{"./classes":101,"./config":102,"./messenger":103,"./minder":109,"./model":112,"./util":120,"mol-proto":125}],109:[function(a,b,c){"use strict";function d(a,b,c,d){if(Array.isArray(a)){var f=a,g=f.map(function(a){return new q(a[0],a[1],a[2],a[3])});return g.forEach(e),g}var h=new q(a,b,c,d);return e(h),h}function e(a){a.___minder_id=v.push(a)-1,a.on(/.*/,f),d.postMessage("added",{connector:a}),d.postMessage("turnedon",{connector:a})}function f(a,b){var b=b?s.clone(b):{};s.extend(b,{id:this.___minder_id,connector:this}),d.postMessage(a,b),w.length||x||(s.defer(g),x=!0),w.push({msg:a,data:b})}function g(){w.length?(w.length=0,s.defer(g),d.postMessage("propagationticked")):(x=!1,d.postMessage("propagationcompleted"))}function h(){return x}function i(a){function b(){x?d.once("propagationcompleted",b):a()}x?d.once("propagationcompleted",b):s.defer(b)}function j(a){return"undefined"==typeof a?v:v.filter(function(b){return b.isOn===a})}function k(a){a.destroy();var b=v.indexOf(a);b>=0?delete v[b]:t.warn("minder: connector destroyed that is not registered in minder")}function l(a,b){var c=d.getConnectors(a),e=c.map(function(a){var b={leftSource:m(a.ds1),rightSource:m(a.ds2),mode:a.mode,isOn:a.isOn};return a.options&&(b.options=a.options),b});return b&&(e=e.filter(function(a){return n(a.leftSource,b)||n(a.rightSource,b)})),e}function m(a){var b=[];return"function"==typeof a&&(a._model&&a._accessPath&&(b.unshift(a._accessPath),a=a._model),b.unshift(a),a=a._hostObject),"object"==typeof a&&(b.unshift(a),a.owner&&b.unshift(a.owner)),b}function n(a,b){return a.some(function(a){var c=a.constructor&&a.constructor.name;return o(c,b)||o(a.name,b)||o(a,b)})}function o(a,b){return a&&"string"==typeof a&&a.indexOf(b)>=0}function p(){function a(a){a&&!a._destroyed&&a.destroy()}v.forEach(function(b){a(b.ds1),a(b.ds2),b.destroy()}),u.destroy(),d._destroyed=!0}var q=a("./model/connector"),r=a("./messenger"),s=a("mol-proto"),t=a("./util/logger");b.exports=d;var u=new r(d,r.defaultMethods),v=[],w=[],x=!1;s.extend(d,{getConnectors:j,getExpandedConnections:l,isPropagating:h,whenPropagationCompleted:i,destroyConnector:k,destroy:p})},{"./messenger":103,"./model/connector":111,"./util/logger":121,"mol-proto":125}],110:[function(a,b,c){"use strict";function d(a,b){s.defineProperty(a,"__inChangeTransaction",b,s.CONF|s.WRIT)}function e(a){var b=a.__inChangeTransaction;return delete a.__inChangeTransaction,b}function f(a,b){var c=e(a);return d(b,c),c}function g(){this.postMessageSync("datachanges",{transaction:!1,changes:[]})}function h(a,b,c){i.call(this,b.changes,c)}function i(a,b){j.call(this,b,!1),m.call(this,l(k(a))),j.call(this,b,!0)}function j(a,b){a&&a(null,b),this.postMessage(b?"changecompleted":"changestarted")}function k(a){var b=a[0].source,c=!0;if(a.length>1)for(var d=1,e=a.length;e>d;d++)a[d].source!=b&&(p.error("changedata: changes from different sources in the same transaction, sources:",a[d].source.name,b.name),c=!1,b=a[d].source);return a}function l(a){function b(a){("splice"==a.type?c:d)(a)}function c(a){var b=r.parseAccessPath(a.path),c=i.some(function(a){return b.length"]});var l=d.dataValidation;l&&p.extend(this,{dataValidation1:l["<-"],dataValidation2:l["->"]})}this.turnOn()}function e(a){function b(){throw new Error("invalid Connector mode: "+a)}var c=a.match(r);c||b();var d=c[1].length,e=c[2].length;d&&e&&d!=e&&b(),d||e||b(),p.extend(this,{mode:a,depth1:d,depth2:e})}function f(a){return this.turnOff(),e.call(this,a),this.turnOn(),this}function g(a){return p.deferMethod(this,"changeMode",a),this}function h(a){var b={};return p.eachKey(a,function(a,c){b[a]=c}),b}function i(a){function b(a,b){throw new Error("Invalid pattern translation: "+a+", "+b)}function c(a,b){return a.replace(/[\.\[]?\*.*$/,"")}var d=[];return p.eachKey(a,function(e,f){var g=f.indexOf("*"),h=e.indexOf("*");g>=0&&h>=0?(f.slice(g)!=e.slice(h)&&b(f,e),delete a[f],d.push({fromPattern:o.createRegexPath(f),fromStaticPath:c(f,g),toPattern:o.createRegexPath(e),toStaticPath:c(e,h)})):(g>=0||h>=0)&&b(f,e)}),d}function j(a){return a.map(function(a){return{fromPattern:a.toPattern,fromStaticPath:a.toStaticPath,toPattern:a.fromPattern,toStaticPath:a.fromStaticPath}})}function k(){function a(a,b,e,f,g,h,i,j){function k(k,l){function m(a){if(g){var b=g[a];if(b)return b;if(!h.length)return;var d=p.find(h,function(b){return b.fromPattern.test(a)});if(!d)return;var b=a.replace(d.fromStaticPath,d.toStaticPath)}else if(!(c instanceof RegExp&&c.test(a)||c==a))return;return b||a}function n(a,b){if(i){var c=i[a];c&&"function"==typeof c&&(b.oldValue=c(b.oldValue),b.newValue=c(b.newValue))}}function o(a,c){function d(d){d(c.newValue,function(c,d){d.path=a,g||!c&&!d.valid||++f!=e.length?d.valid||(g=!0,b.postMessage("validated",d)):b.postMessage("validated",d)})}if(q(c),j){var e=j[a],f=0,g=!1;e&&e.forEach(d)}}function q(a){u.changes.push(a)}function r(){if(d[a])var b=s;var c=t(f);f.length=0,c.forEach(function(a){e.postMessageSync("changedata",{changes:a},b)})}function s(c,f){if(!c){var g=f?"onSync":"off";e[g]("datachanges",d[a]);var h=f?"changecompleted":"changestarted";d.postMessage(h,{source:b,target:e})}}function t(a){var b,c=[];return a.forEach(function(a){a.transaction||(b=void 0),a.changes.length&&(a.transaction?b?p.appendArray(b,a.changes):(b=p.clone(a.changes),c.push(b)):c.push(a.changes))}),c}var u={changes:[],transaction:l.transaction};l.changes.forEach(function(a){var c=a.path,d=m(c);if("undefined"!=typeof d){var a=p.clone(a);p.extend(a,{source:b,path:d}),n(c,a),o(c,a)}}),f.length||p.defer(r),f.push(u)}return b.onSync("datachanges",k),k}if(this.isOn)return q.warn("data sources are already connected");var b=this._subscriptionPath=new Array(this.depth1||this.depth2).join("*"),c=o.createRegexPath(b),d=this;this.depth1&&(this._link1=a("_link2",this.ds2,this.ds1,this._changesQueue1,this.pathTranslation1,this.patternTranslation1,this.dataTranslation1,this.dataValidation1)),this.depth2&&(this._link2=a("_link1",this.ds1,this.ds2,this._changesQueue2,this.pathTranslation2,this.patternTranslation2,this.dataTranslation2,this.dataValidation2)),this.isOn=!0,this.postMessage("turnedon")}function l(){function a(a,c,d){b[c]&&(a.off("datachanges",b[c]),delete b[c])}if(!this.isOn)return q.warn("data sources are already disconnected");var b=this;a(this.ds1,"_link2",this.pathTranslation2), diff --git a/dist/milo.min.js.map b/dist/milo.min.js.map index 4385eb6..b66c1cf 100644 --- a/dist/milo.min.js.map +++ b/dist/milo.min.js.map @@ -1 +1 @@ -{"version":3,"file":"dist/milo.min.js","sources":["dist/milo.bundle.js"],"names":["e","t","n","r","s","o","u","a","require","i","Error","f","exports","call","length",1,"module","Facet","owner","config","this","name","_","firstLowerCase","constructor","init","apply","arguments","proto","extendProto","milo-core",2,"FacetedObject","instantiateFacet","FacetClass","facetName","fctConfig","facetsConfig","facets","facetsDescriptors","enumerable","value","facetsClasses","eachKey","Object","defineProperties","defineProperty","FacetedObject$addFacet","facetConfig","throwOnErrors","check","Function","Match","Optional","String","protoFacets","prototype","message","logger","error","newFacet","ENUM","FacetedObject$$hasFacet","FacetedObject$$getFacetConfig","hasFacet","FacetedObject$$createFacetedClass","addInheritedFacets","superClass","facetsInfo","facetsInfoName","inheritedFacetsInfo","clone","extend","ObjectHash","Subclass","fctName","hasOwnProperty","FacetedClass","createSubclass","miloCore","util","createFacetedClass","getFacetConfig","addFacet","./facet",3,"ClassRegistry","FoundationClass","setClass","__registeredClasses","add","aClass","IdentifierString","get","remove","nameOrClass","OneOf","clean",4,"attrName","attrs","bind","parse","node","bindTo","match","ATTRIBUTE_REGEXP","compClass","compFacets","split","FACETS_SPLIT_REGEXP","undefined","compName","validate","render","milo","componentName","ATTRIBUTE_TEMPLATE","replace","join","BindAttribute$$setInfo","el","componentClass","componentFacets","attr","BindAttribute","decorate","Attribute","setInfo","../config","./a_class",5,"attributes","Attribute$$remove","deep","removeAttribute","selector","children","querySelectorAll","forEach","childEl","Attribute$remove","Attribute$destroy","Attribute$get","getAttribute","Attribute$set","setAttribute","Attribute$decorate","set","toBeImplemented","destroy",6,"load","loadUrl","LoadAttribute",7,"./a_bind","./a_load",8,"binder","scopeEl","rootScope","bindRootElement","createBinderScope","scope","info","ComponentInfo","Component","create","twoPass","scanScope","scan","hostObject","Scope","_rootEl","addMethod","_each","compInfo","aComponent","container","scopeObjectFactory","createScopeForElement","postChildrenBoundMessage","elComp","getComponent","postMessageSync","scopedObject","isContainer","childNodes","innerScope","_hostObject","createScopeForChildren","containerEl","utilDom","document","body","componentsRegistry","./attributes/a_bind","./components/c_facets/cf_registry","./components/c_info","./components/c_registry","./components/scope","./services/mail","./util/dom",9,"coreClasses","classes","Mixin","MessageSource","MessengerMessageSource","MessengerAPI","DOMEventsSource","Transaction","TransactionHistory","./abstract/facet","./abstract/faceted_object","./abstract/registry","./command/transaction","./command/transaction_history","./components/msg_src/dom_events",10,"ActionsHistory","maxLength","_maxLength","Infinity","actions","position","ActionsHistory$store","command","_truncateToCurrentPosition","push","act","shift","ActionsHistory$deleteLast","ActionsHistory$undo","cb","undo","ActionsHistory$redo","redo","ActionsHistory$undoAll","ActionsHistory$redoAll","ActionsHistory$undoAllAsync","deferMethod","defer","ActionsHistory$redoAllAsync","ActionsHistory$each","funcOrMethod","thisArg","func","ActionsHistory$eachReverse","reverse","each","ActionsHistory$getLastAction","ActionsHistory$getDescription","map","getDescription","store","deleteLast","undoAll","redoAll","undoAllAsync","redoAllAsync","eachReverse","getLastAction",11,"Command","commandsRegistry","../abstract/registry","./index",12,"Command$init","args","slice","Command$execute","result","Command$setUndo","undoCommand","UNDO_COMMAND","warn","Command$getUndo","Command$undo","undoCmd","getUndo","execute","Command$setArguments","toArray","Command$getArguments","Command$changeArguments","Command$addArguments","appendArray","Command$$create","newApply","Command$$createWithUndo","Command$destroy","Command$setComment","comment","Command$getDescription","setUndo","setArguments","addArguments","getArguments","changeArguments","setComment","createWithUndo",13,"commands","Transaction$execute","Transaction$undo","Transaction$redo","Transaction$destroy","Transaction$storeCommand","Transaction$merge","transaction","cmd","Transaction$setComment","Transaction$getDescription","storeCommand","merge","./actions_history",14,"transactions","currentBatch","currentTransaction","SCHEDULED","TransactionHistory$storeCommand","appendTransaction","_postTransactionMessage","_storeTransaction","TransactionHistory$deleteLastTransaction","_addBatchToTransaction","_storeCurrentTransaction","TransactionHistory$endTransaction","TransactionHistory$storeTransaction","endTransaction","msg","_messenger","postMessage","TransactionHistory$undo","TransactionHistory$redo","TransactionHistory$inTransaction","TransactionHistory$getDescription","TransactionHistory$useMessenger","Messenger","defaultMethods","TransactionHistory$destroy","storeTransaction","deleteLastTransaction","inTransaction","useMessenger","./transaction",15,"Component$$createComponentClass","Array","isArray","configMap","fct","keys","fctClassName","firstUpperCase","facetsRegistry","ComponentClass","_registerWithDomStorage","className","DOMStorage","registerDataType","Component_domStorageSerializer","Component_domStorageParser","component","state","getState","JSON","stringify","compStr","compClassName","jsonParse","createFromState","Component$$create","extraFacetsClasses","Component$$copy","deepCopy","Boolean","newEl","dom","copy","cloneNode","createOnElement","extraFacets","_getState","setState","Component$$createOnElement","innerHTML","_createComponentElement","_findOrCreateComponentRootScope","_addAttributeAndBindComponent","broadcast","Dom","domFacetConfig","templateFacetConfig","template","elConfig","domConfig","content","createElement","parent","getContainingComponent","miloBinder","Component$$createFromState","newUniqueName","ObjectIncluding","facetsStates","outerHTML","wrapEl","_createComponentWrapElement","_any","_add","domUtils","compEl","miloComponentName","Component$$createFromDataTransfer","dataTransfer","dataType","find","types","type","COMPONENT_DATA_TYPE_REGEX","test","getData","Component$init","element","componentInfo","componentRef","messenger","MESSENGER_PROPERTY","allFacets","start","Component$start","Component$createElement","Component$hasFacet","facetNameOrClass","facet","ComponentFacet","Component$addFacet","facetClassName","Component$allFacets","method","mapKeys","Component$rename","renameInScope","rename","Component$remove","preserveScopeProperty","quiet","_remove","Component$insertInto","parentEl","referenceEl","insertBefore","setScopeParentFromDOM","Component$getState","rootComponent","Component$getTransferState","options","transfer","Component$_getState","deepState","filterKeys","fctState","Component$setState","Component$getScopeParent","conditionOrFacet","_callGetScopeParent","_getScopeParent","_getScopeParentFunc","conditionFunc","componentUtils","_makeComponentConditionFunc","Component$getScopeParentWithClass","comp","Component$getTopScopeParent","_getTopScopeParent","topParent","Component$getTopScopeParentWithClass","Component$setScopeParentFromDOM","foundParent","parentNode","Component$walkScopeTree","callback","walkScopeTree","Component$treePathOf","treePathOf","Component$getComponentAtTreePath","treePath","nearest","getNodeAtTreePath","Component$insertAtTreePath","wasInserted","insertAtTreePath","Component$broadcast","data","synchronously","postMethod","Component$destroy","_destroyed","detachComponent","removeElement","Component$isDestroyed","createComponentClass","isComponent","createFromDataTransfer","insertInto","getTransferState","getScopeParent","getTopScopeParent","getScopeParentWithClass","getTopScopeParentWithClass","getComponentAtTreePath","isDestroyed","useWith","../abstract/faceted_object","../attributes/a_bind","../binder","../util/component_name","../util/dom","../util/storage","./c_facets/cf_registry","./c_utils","./scope",16,"ComponentFacet$init","_createMessenger","ComponentFacet$start","messages","onConfigMessages","ComponentFacet$onConfigMessages","messageSubscribers","notYetRegisteredMap","subscriber","subscriberType","on","contextType","context","ComponentFacet$check","reqFacet","ComponentFacet$destroy","domParent","parentComponent","scopeParent","_postParent","getParentMethod","messageType","messageData","parentFacet","_setMessageSource","messageSource","getMessageSource","dispatchSourceMessage","dispatchMessage","_createMessageSource","MessageSourceClass","_createMessageSourceWithAPI","messengerAPIOrClass","requiresFacet","facetRequire","indexOf","postDomParent","partial","postScopeParent","../abstract/facet",17,"Container$binder","Container$start","Container$path","path","throwInvalidPath","len","allowedNamePattern","Container$getState","Container$setState","compData","Container$destroy","_detachElement","Container$unwrap","renameChildren","unwrapElement","child","Container$append","appendChild","Container$insertBefore","sibling","Container$remove","removeChild","Container","unwrap","append","../../binder","../../util/dom","../c_facet","../scope","./cf_registry",18,"CssFacet$start","CssFacet","modelUtils","wrapMessengerMethods","onSync","changeDataHandler","activeModelPaths","CssFacet$set","self","prop","modelPath","charAt","update","CssFacet$del","modelPaths","cssClass","clear","classList","CssFacet$path","Path","CssFacet$update","cssConfig","handler","updateHandlers","modelValue","updateSimple","has","size","Set","updateByObject","cssClasses","updateByFunction","getCssClassFn","cssFacet","Model","_utils","createFacetClass","methods","del","string","object","function","../../util/create_facet_class",19,"Data$start","pathUtils","elData","getElementDataAccess","_dataChangesQueue","_prepareMessageSource","_path","_value","onOwnDataChange","onDataChangesFinished","onChildData","dataAPI","DataMsgAPI","dataEventsSource","proxyDataSourceMethods","_createProxyMethod","msgType","_bubbleUpDataChange","_queueDataChange","getTransactionFlag","Data$_bubbleUpDataChange","msgData","parentData","parentMsg","Data$_queueDataChange","change","_postDataChanges","Data$_postDataChanges","queue","changes","Data$set","executeHook","noHook","setTransactionFlag","_set","oldValue","newValue","Data$_set","setChildData","valueSet","childValue","key","pathSyntax","childPath","childDataFacet","listFacet","list","listLength","count","newItemsCount","_addItems","_updateDataPaths","index","listCount","removeCount","_removeItem","_setScalarValue","Data$del","postTransactionFinished","_del","Data$_del","Data$_setScalarValue","Data$get","deepGet","_get","Data$_get","scopeData","listItem","scopeItem","contains","_getScalarValue","Data$_getScalarValue","Data$splice","spliceIndex","spliceHowMany","_splice","removed","addedCount","methodName","hook","Data$_splice","normalizeSpliceIndex","item","itemData","added","argsLen","addItems","j","Data$len","_len","Data$_len","Data$path","accessPath","createItem","parsedPath","parseAccessPath","currentComponent","pathNode","nodeKey","getPathNodeKey","syntax","itemComponent","_addItem","property","currentDataFacet","Data$getPath","Data$getKey","Data$getState","Data$setState","model","Data","splice","getPath","getKey","trigger","../msg_api/data","../msg_api/de_data","../msg_src/dom_events",20,"Dom$$createElement","tagName","_applyConfigToElement","doT","cls","configAttributes","attrValue","_attachCssClasses","currentStyle","window","getComputedStyle","_visible","display","show","toggle","hide","doShow","style","_manageCssClasses","enforce","callMethod","cssCls","doToggle","detach","setStyle","setStyles","properties","isDeep","prepend","thisEl","firstChild","appendChildren","prependChildren","insertAfter","nextSibling","appendToScopeParent","Dom$children","direction","iterator","findDirections","treeWalker","createTreeWalker","NodeFilter","SHOW_ELEMENT","currentNode","nextNode","found","hasTextBeforeSelection","selection","getSelection","isCollapsed","text","focusNode","textContent","startPos","anchorOffset","SHOW_TEXT","anchorNode","prevNode","previousNode","isText","nodeValue","trim","hasTextAfterSelection","addCssClasses","removeCssClasses","toggleCssClasses","up","down","../../attributes/a_bind","../../config",21,"Drag$init","_dragData","dataTypeInfo","_dataTypeInfo","Drag$setHandle","handleEl","_dragHandle","Drag$start","_addDragAttribute","_createDragImage","_toggleDragCls","onMessages","mousedown","onMouseDown","mouseenter mouseleave mousemove","onMouseMovement","dragstart","onDragStart","drag","onDragging","dragend","onDragEnd","getstatestarted","_removeDragAttribute","getstatecompleted","dragImage","_dragElement","Image","src","url","eventType","event","__mouseDownTarget","target","targetInDragHandle","empty","stopPropagation","shouldBeDraggable","setMeta","params","getMetaData","_dragMetaDataType","dt","setComponentMeta","_dragMetaData","meta","setAdditionalDataTypes","dataTypes","_dataTypesData","getDataFunc","setData","off","preventDefault","setDragImage","x","y","DragDrop","setComponentState","_setAllowedEffects","service","dragDrop","dragFacet","_dragIsDisabled","showHide","dragCls","effects","allowedEffects","setAllowedEffects","Drag","setHandle","../../util/dragdrop","../c_class",22,"Drop$init","DropMsgAPI","Drop$start","dragenter dragover","drop","onDrop","dragenter dragover dragleave drop dragin dragout","postToService","_handleDropDependency","setDropEffect","dropFacet","_handleDropDependencyNothrottle","originalDropComponent","allow","parentAllowed","checkParent","_isDropAllowed","allowComps","components","getComponentMeta","Drop","throttle","../msg_api/drop",23,"Events$init","domEventsSource","MSG_SOURCE_KEY","Events",24,"Frame$init","FrameMessageSource","Frame$start","postDomReady","Frame$destroy","Frame$getWindow","contentWindow","Frame$isReady","readyState","getWindow","Frame$isMiloReady","frameMilo","isReady","milo_version","Frame$milo","whenMiloReady","win","_makeWhenReadyFunc","isReadyFunc","callFunc","Frame","Frame$whenReady","Frame$whenMiloReady","whenReady","isMiloReady","../../services/de_constrs","../msg_src/frame",25,"ItemFacet$getState","getIndex","ItemFacet$setState","setIndex","ItemFacet$getIndex","ItemFacet$setIndex","ItemFacet$removeItem","removeItem","ItemFacet$extractItem","extractItem","ItemFacet","../../services/mail",26,"List$init","_listItems","_listItemsHash","WRIT","List$start","onChildrenBound","items","itemsHash","foundItem","itemSample","LIST_SAMPLE_CSS_CLASS","miloConfig","_createCacheTemplate","List$_createCacheTemplate","itemElCopy","itemsTemplateStr","itemsTemplate","compile","List$item","List$count","List$_setItem","List$contains","List$addItem","isNaN","List$_addItem","prevComponent","_itemPreviousComponent","_setItem","_updateItemsIndexes","fromIndex","toIndex","List$addItems","itemsData","concat","repeat","spliceArgs","dataFacet","List$_addItems","Integer","itemsHTML","frag","createDocumentFragment","newComponents","List$removeItem","List$extractItem","itemComp","List$_removeItem","doDestroyItem","List$replaceItem","newItem","oldItem","List$_updateDataPaths","List$each","List$map","List$destroy","List","addItem","replaceItem","../../util/component_name",27,"ModelFacet$init","m","ModelFacet$getState","deepClone","ModelFacet$setState","ModelFacet$_createMessenger","ModelFacet$destroy","ModelFacet",28,"Options$init","proxyMethods","Options$_createMessenger","Options$destroy","Options",29,"Template$init","interpolate","compileOptions","Template$start","autoRender","autoBinder","Template$getCompiled","_template","Template$set","templateStr","_templateStr","_compile","Template$render","Template$binder","Template","getCompiled",30,"Transfer$init","_activeState","_defaultKey","_state","Transfer$getState","Transfer$setState","setActiveState","Transfer$setActiveState","Transfer$setStateWithKey","isDefaultKey","Transfer$getStateWithKey","Transfer$getComponentMeta","Transfer","setStateWithKey","getStateWithKey",31,"../../abstract/registry",32,"getComponentClass","getComponentExtraFacets","hasContainerFacet","ComponentInfo$destroy","ComponentInfo$rename","reportBinderError","classHasFacetThatRequiresContainer","someKey","facetRequiresContainer","./c_registry",33,"./c_class",34,"returnCurrent","_getContainingComponent",35,"View","../c_registry",36,"DataMsgAPI$init","DataMsgAPI$value","componentGetter","translateToSourceMessage","componentEvent","filterSourceMessage","sourceMessage","createInternalData","internalData","./de_data",37,"inputDataProperty","inputType","inputElementTypes","byDefault","inputChangeEvent","toLowerCase","domElementsDataAccess","div","span","p","input","textarea","select","img","caption","thead","tbody","tfoot","tagInfo","propFunc","checkbox","radio",38,"dropEventsMap","resetFilterVars","_currentTarget","_inside","ok","dragin","dragout",39,"DOMEventsSource$destroy","emitter","DOMEmitterSource","../../services/dom_source",40,"frameWindow","addSourceSubscriber","addEventListener","removeSourceSubscriber","removeEventListener","handleEvent",41,"rootEl","Scope$_add","checkName","__add","Scope$_safeAdd","shouldRename","Scope$_copy","aScope","Scope$_move","otherScope","Scope$_merge","Scope$_each","Scope$_filter","Scope$_length","Scope$_any","Scope$_remove","Scope$_clean","Scope$_detachElement","Scope$_has","Scope$$rename","obj","_safeAdd","_copy","_move","_merge","_length","_clean","_has","_filter",42,"MLButton$disable","disable","disabled","MLButton$isDisabled","MLButton","events","isDisabled",43,"MLCombo$init","_comboInput","_comboList","datalist","DATALIST_TEMPLATE","dispatchChangeMessage","MLCombo_get","MLCombo_set","changeComboData","MLCombo_del","COMBO_CHANGE_MESSAGE","onOptionsChange","comboOptions","MLCombo","***",44,"MLComboList$init","once","MLComboList$setDataValidation","dataValidation","_dataValidation","MLComboList$setOptions","arr","_combo","setOptions","MLComboList$clearComboInput","clearComboInput","MLComboList$toggleAddButton","toggleAddButton","MLComboList$setAddItemPrompt","prompt","setAddItemPrompt","MLComboList$destroy","_connector","minder","destroyConnector","componentSetup","combo","_list","onComboChange","onAddItem","runDataValidation","onItemsChange","COMBO_LIST_CHANGE_MESSAGE","MLComboList_get","MLComboList_set","MLComboList_del","MLComboList","setDataValidation",45,"MLDate$getMin","date","min","MLDate$setMin","toDate","toISO8601Format","MLDate$getMax","max","MLDate$setMax","MLDate_get","MLDate_set","dispatchInputMessage","MLDate_del","pad","dateArr","getFullYear","getMonth","getDate","dateStr","MLDate","getMin","setMin","getMax","setMax",46,"MLDropTarget",47,"foldUnfold","opened","itemMessage","id","_itemsMap","onItemEvent","MLFoldTree$setItemTemplate","_itemTemplate","MLFoldTree$renderTree","_renderTree","itemsIDs","uniqueId","COMPILED_TREE_TEMPLATE","itemIDs","itemTemplate","DEFAULT_COMPILED_ITEM_TEMPLATE","treeTemplate","_data","MLFoldTree$setActiveItem","querySelector","MLFoldTree$toggleItem","TREE_TEMPLATE","MLFoldTree","click dblclick","setItemTemplate","renderTree","setActiveItem","toggleItem","../../util/unique_id",48,"MLGroup",49,"MLHyperlink",50,"MLImage$init","MLImage_set","MLImage_get","MLImage_del","IMAGE_CHANGE_MESSAGE","onModelChange","MLImage",".src",51,"MLInput$disable","MLInput$isDisabled","MLInput$setMaxLength","MLInput","setMaxLength",52,"MLInputList$init","MLInputList$setPlaceHolder","placeHolder","_input","MLInputList$setAsync","newHandler","asyncHandler","MLInputList$destroy","_button","button","onClick","label","INPUT_LIST_CHANGE_MESSAGE","MLInputList_get","MLInputList_set","MLInputList_del","MLInputList_splice","MLInputList","setAsync","setPlaceHolder",53,"MLList$init","MLList$destroy","MLList$removeItem","MLList$moveItem","from","to","splicedData","deferChangeMode","MLList","moveItem",54,"MLListItem$init","deleteBtn","MLListItem$removeItem","listOwner","MLListItem$moveItem","MLListItem$isDropAllowed","draggingFromSameList","getCurrentDragSource","sourceList","isComponentAllowed","isDropAllowed","onItemDrop","onDragOut","targetIndex","getComponentState","dropPosition","getDropPositionY","isBelow","isAbove","isSamePosition","stateIndex","isMoveDown","onDragDropCompleted","onDragHover","dropTarget","droppedInAnotherList","MLListItem$getMetaData","MLListItem_get","MLListItem_set","_sendChangeMessage","MLListItem_del","LISTITEM_CHANGE_MESSAGE","MLListItem","dragenter","dragover","dragleave",55,"MLRadioGroup$init","CONF","ELEMENT_NAME_PROPERTY","ELEMENT_NAME_PREFIX","_renderOptions","MLRadioGroup$setRenderOptions","MLRadioGroup_set","setResult","_radioList","checked","MLRadioGroup_get","MLRadioGroup_del","onGroupClick","RADIO_CHANGE_MESSAGE","radioOptions","elementName","radioEls","MLRadioGroup$destroy","MLRadioGroup","click","setRenderOptions",56,"MLSelect$setOptions","modelChangeListener","MLSelect$disable","selectOptions","MLSelect","**",57,"MLSuperCombo$init","_optionsData","_filteredOptionsData","_comboOptions","_comboBefore","before","_comboAfter","after","_comboAddItemDiv","addItemDiv","_comboAddPrompt","addPrompt","_comboAddBtn","addBtn","_optionTemplate","OPTIONS_TEMPLATE","_startIndex","_endIndex","MAX_RENDERED","_hidden","_elementHeight","DEFAULT_ELEMENT_HEIGHT","_total","_optionsHeight","_lastScrollPos","_currentValue","_selected","_isAddButtonShown","setupComboList","setupComboInput","setupComboBtn","changeSelected","MLSuperCombo$toggleOptions","MLSuperCombo$showOptions","bounds","getBoundingClientRect","pageHeight","Math","ownerDocument","documentElement","clientHeight","innerHeight","listTopStyle","bottomOverlap","bottom","topOverlap","top","COMBO_OPEN","MLSuperCombo$hideOptions","MLSuperCombo$toggleAddButton","preserveState","__showAddOnClick","MLSuperCombo$setAddItemPrompt","_addItemPrompt","MLSuperCombo$setPlaceholder","placeholder","MLSuperCombo$setOptions","setFilteredOptions","MLSuperCombo$initOptionsURL","_optionsURL","_formatOptionsURL","formatOptions","_getOptionsURL","queryString","noop","request","post","err","response","responseData","MLSuperCombo$setFilteredOptions","MLSuperCombo$update","wasHidden","arrToShow","hideOptions","beforeHeight","afterHeight","height","overflow","width","zIndex","onListClick","scroll","onListScroll","onDataChange","onInputClick","onEnterKey","btn","onAddBtn","MLSuperCombo_get","MLSuperCombo_set","MLSuperCombo_del","_updateOptionsAndAddButton","filteredData","_filterData","filter","option","selected","filteredArr","isExactMatch","showOptions","scrollTop","directionMap","keyCode","_changeSelected","scrollPos","selectedPos","offsetTop","relativePos","_getDataValueFromElement","thisItem","adjItem","onMouseOver","_mouseIsOver","onMouseLeave","_mouseOutTimer","clearInterval","setTimeout","_onMouseLeave","_setData","lastElementChild","lastChild","firstElementChild","lastElPosition","firstElPosition","distFromLastEl","distFromFirstEl","elsFromStart","floor","elsToTheEnd","totalElementsBefore","BUFFER","Number","MLSuperCombo","mouseleave","mouseover","toggleOptions","initOptionsURL","setPlaceholder",58,"MLText",59,"MLTextarea$startAutoresize","_autoresize","_autoresizeOptions","_adjustAreaHeight","_manageSubscriptions","onOff","newHeight","scrollHeight","minHeight","maxHeight","MLTextarea$stopAutoresize","MLTextarea$isAutoresized","MLTextarea$disable","MLTextarea","startAutoresize","stopAutoresize","isAutoresized",60,"MLTime_get","timeStr","TIME_REGEX","hours","mins","time","Date","MLTime_set","TIME_TEMPLATE","getHours","getMinutes","MLTime_del","MLTime",61,"MLWrapper",62,"MLAlert$$createAlert","close","timeout","alert","MLAlert","_prepareOptions","alertCls","ALERT_CSS_CLASSES","_alert","visible","alertScope","closeBtn","_onCloseBtnClick","closeAlert","MLAlert$$openAlert","createAlert","openAlert","MLAlert$openAlert","_toggleAlert","MLAlert$closeAlert","addRemove","appendRemove","success","warning","danger","fixed","role","aria-hidden","../../../util/component_name","../../c_class","../../c_registry",63,"MLDialog$$createDialog","initialize","title","html","backdrop","keyboard","buttons","Any","dialog","MLDialog","_dialog","dialogScope","_onBackdropClick","buttonSubscriber","_dialogButtonClick","_toggleDialog","_dispatchResult","closeDialog","_onKeyDown","openedDialog","DEFAULT_BUTTONS","CLOSE_OPTIONS","mapToObject","opt","MLDialog$$openDialog","createDialog","openDialog","dialogsInitialized","_initializeDialogs","backdropEl","MLDialog$openDialog","MLDialog$closeDialog","MLDialog$$getOpenedDialog","MLDialog$destroy","getOpenedDialog",64,"MLDropdown$start","onDocOut","relatedTarget","listeners","_dropdown","isIframe","hideMenu","toggleEl","TOGGLE_CSS_CLASS","menuEl","MENU_CSS_CLASS","doc","clickHandler","toggleMenu","DOMListeners","menu","MLDropdown$destroy","removeAll","MLDropdown$showMenu","MLDropdown$hideMenu","MLDropdown$toggleMenu","MLDropdown","showMenu","../../../util/dom_listeners",65,"componentPrefix","domStorage","typeSuffix","prefixSeparator","root","messageKey","messageTimestamp","quotaExceeded","throwError","componentMetaTemplate","componentMetaRegex","jsonpTimeout","jsonpCallbackPrefix","optionsKey","defaults","websocket","rpc","responsePrefix","deprecationWarning",66,"loader","_loader","miloMail","_loadViewsInElement","views","loadElements","totalCount","loadedCount","loadView","./attributes/a_load","./config","./util/request",67,"domReady","mail","registry","./attributes","./binder","./classes","./command","./components/c_class","./components/c_facet","./loader","./registry","./services/window","./use_components","./use_facets","./util","./util/create_component_class","./util/create_facet_class",68,"./command/cmd_registry",69,"eventTypes","ClipboardEvent","Event","FocusEvent","KeyboardEvent","MouseEvent","TouchEvent","global","eTypes","eventConstructorName","eventConstructor","makeFunction","domEventsConstructors",70,"eventEmitter","DOMEmitterSource$destroy","sourceSubscriberMethod","capture","useCapturePattern","isCapturePhase","eventPhase","CAPTURING_PHASE","useCapturePostfix","DOMEmitterSource$postMessage","EventConstructor","domEvent","notCancelled","dispatchEvent","../components/c_class","./de_constrs",71,"MailMsgAPI","MailMessageSource","mailMsgSource","./mail_api","./mail_source",72,"windowMessageRegExp","windowMessagePrefix",73,"isReadyStateChange","readystatechange","_windowSubscriberMethod","isWindowMessage","../de_constrs",74,"windowService_isTop","__karma__","windowService","domEmitterSource","isTop","./dom_source",75,"./components/classes/View","./components/ui/Button","./components/ui/Combo","./components/ui/ComboList","./components/ui/Date","./components/ui/DropTarget","./components/ui/FoldTree","./components/ui/Group","./components/ui/Hyperlink","./components/ui/Image","./components/ui/Input","./components/ui/InputList","./components/ui/List","./components/ui/ListItem","./components/ui/RadioGroup","./components/ui/Select","./components/ui/SuperCombo","./components/ui/Text","./components/ui/Textarea","./components/ui/Time","./components/ui/Wrapper","./components/ui/bootstrap/Dropdown",76,"./components/c_facets/Container","./components/c_facets/Css","./components/c_facets/Data","./components/c_facets/Dom","./components/c_facets/Drag","./components/c_facets/Drop","./components/c_facets/Events","./components/c_facets/Frame","./components/c_facets/Item","./components/c_facets/List","./components/c_facets/ModelFacet","./components/c_facets/Options","./components/c_facets/Template","./components/c_facets/Transfer",77,"prefix","./unique_id",78,"superClassName","staticMethods","SuperClass","componentRegistry","../components/c_registry",79,"facetRegistry","FacetBaseClass","../components/c_facet","../components/c_facets/cf_registry",80,"deprecate","fn","deprecated","warned",81,"filterNodeListByType","Node","ELEMENT_NODE","nodeList","nodeType","containingElement","selectElementContents","range","createRange","selectNodeContents","getNodeWindow","sel","removeAllRanges","addRange","selectElementText","fromNode","firstTextNode","toNode","lastTextNode","setSelection","setCaretPosition","pos","setStart","getSelectionDirection","_getDirection","focusOffset","startOffset","endOffset","docPosition","compareDocumentPosition","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","originalContentEditable","backward","setEnd","collapse","commonAncestorContainer","parentElement","isContentEditable","contentEditable","clearSelection","getElementOffset","includeBorder","yPos","xPos","offsetLeft","offsetParent","getBorder","topOffset","leftOffset","side","styles","sideValue","parseInt","getPropertyValue","normalize","TEXT_NODE","replaceChild","wrapInElement","wrapIntoEl","trimNodeRight","_trimNode","trimNodeLeft","stripHtml","str","walkTree","tw","containsEl","nodeIndex","findIndex","childIndex","toNormalize","isTreePathBefore","path1","path2","isBefore","htmlEntities","charCodeAt","whatToShow","defaultView","parentWindow","forEachNodesInRange","isNodeInsideRange","nodeRange","isInside","selectNode","compareBoundaryPoints","Range","START_TO_START","END_TO_END","rangeContainer","getComponentsFromRange","startContainer","deleteRangeWithComponents","deleteContents","areRangesEqual","range1","range2","addDebugPoint","dbEl",82,"DOMListeners$add","DOMListeners$remove","listener","idx","isEqual","_removeListener","DOMListeners$removeAll","l",83,"domReadySubscribed","onDomReady","domReadyFuncs",84,"DragDrop$$componentDataType","dragDropConfig","DragDrop$$getDropPositionY","dP","getDropPosition","clientY","targetTop","targetHeight","clientRect","targetWidth","targetLeft","left","clientX","DragDrop$isComponent","componentDataType","DragDrop$getComponentState","stateStr","DragDrop$setComponentState","requestedBy","DragDrop$setComponentMeta","_componentMeta","paramsStr","_encode","base32","encode","DragDrop$getComponentMeta","metaDataType","dType","decode","metaData","DragDrop$getAllowedEffects","effectAllowed","DragDrop$setAllowedEffects","DragDrop$getDropEffect","dropEffect","DragDrop$setDropEffect","effect","DragDrop$isEffectAllowed","getAllowedEffects","isCopy","isMove","isLink","isAllowed","DragDrop$getData","DragDrop$setData","dataStr","DragDrop$clearData","clearData","onDragDropStarted","_currentDragDrop","_currentDragFacet","onCompleteDragDrop","dragDropService","getCurrentDragDrop","DragDrop_destroy","offAll","getDropEffect","isEffectAllowed","dragdropstarted","dragdropcompleted","completedragdrop",85,"error$createClass","errorClassName","ErrorClass","makeSubclass","error$toBeImplemented","AbstractClass","errorClassNames","createClass",86,"fragment_getState","wrapperClassName","_getRangeContainer","cloneContents","wrapper","_wrapFragmentInContainer","_transferStates","_renameChildren","wrapperState","fragment_getStateAsync","fromComp","toComp","fromScope","toChildComp","fromChildComp","expandRangeToSiblings","siblings","getRangeSiblings","createRangeFromSiblings","nodes","setStartBefore","setEndAfter","end","containerNode","startNode","endNode","endContainer","startSibling","_findContainingChild","endSibling","selNode","_createNodesAndPathsFunc","fromObj","toObj","createRangePaths","createRangeNodes","getStateAsync","createRangeFromNodes","./dom",87,"util_destroy","domListeners","fragment","storage","../components/ui/bootstrap/Alert","../components/ui/bootstrap/Dialog","./component_name","./deprecate","./dom_listeners","./domready","./dragdrop","./error","./fragment","./json_parse","./request","./selection","./storage","./websocket",88,89,"createPromiseOverride","functionName","promise","Promise","keepRequestObject","_request","opts","onReady","_onReady","req","xPromise","contentType","XMLHttpRequest","open","setRequestHeader","setRequestHeaders","headers","onreadystatechange","ontimeout","onabort","_createXPromise","send","trackCompletion","_pendingRequests","resolvePromise","rejectPromise","resolve","reject","then","promiseThen","promiseCatch","status","responseText","spliceItem","errorReason","reason","errObj","stack","request$useMessenger","request$get","request$post","request$json","jsonPromise","errData","request$jsonp","_onResult","uniqueCallback","cleanUp","clearTimeout","head","script","jsonpOptions","omitKeys","request$file","fileData","progress","upload","onprogress","file","binary","formData","FormData","request$destroy","whenRequestsCompleted","delay","json","jsonp",90,"TextSelection","TextSelection$init","rangeCount","getRangeAt","TextSelection$text","_text","toString","TextSelection$textNodes","_textNodes","_getTextNodes","TextSelection$clear","textNodes","selStart","selEnd","inEnd","_getElement","thisPropName","rangePropName","_getComponent","elMethodName","TextSelection$containedComponents","_containedComponents","TextSelection$eachContainedComponent","containedComponents","TextSelection$del","selectEndContainer","selPoint","_getPostDeleteSelectionPoint","_selectAfterDelete","selOffset","offset","trimRight","TextSelection$getRange","TextSelection$getState","createStateObject","TextSelection$$createStateObject","_getSelectionPointState","TextSelection$$createFromState","_selectionNodeFromState","pointState","TextSelection$$createFromRange","endRange","cloneRange","TextSelection$$getNormalizedRange","newRange","TextSelection$$getDirection","TextSelection$startElement","TextSelection$endElement","TextSelection$containingElement","TextSelection$startComponent","TextSelection$endComponent","TextSelection$containingComponent","startElement","endElement","startComponent","endComponent","containingComponent","eachContainedComponent","getRange","getNormalizedRange","getDirection","createFromRange","../../components/c_class","../dom",91,"keyPrefix","sessionOnly","_storage","sessionStorage","localStorage","_typeSuffix","_keys","DOMStorage$set","setItem","DomStorageError","DOMStorage$get","deepForEach","getItem","DOMStorage$remove","DOMStorage$hasItem","pKey","_storageKey","DOMStorage$getItem","_getKeyDataType","valueStr","_parseData","DOMStorage$setItem","_setKeyDataType","_serializeData","cfg","_domStorage","DOMStorage$removeItem","_removeKeyDataType","DOMStorage$getAllKeys","storedKeys","keysInStorage","hasItem","DOMStorage$getAllItems","getAllKeys","DOMStorage$_storageKey","DOMStorage$_domStorageKey","storageKey","unPrefix","_dataTypeKey","_getValueType","valueType","valuesDataTypes","serializer","dataSerializers","parser","dataParsers","DOMStorage$$registerDataType","storeAsDataType","DOMStorage$createMessenger","storageMessageSource","StorageMessageSource","_messageSource","DOMStorage$destroy","_storedKeys","true","false","_domStorageKey","getAllItems","createMessenger","_sessionStorage","_localStorage","local","session","valStr","boolean","number","toFunction","RegExp","toRegExp","./model","./msg_src",92,"Model$$registerWithDOMStorage","Model_domStorageSerializer","Model_domStorageParser","registerWithDOMStorage",93,"StorageMessageSource$addSourceSubscriber","StorageMessageSource$removeSourceSubscriber","StorageMessageSource$postMessage","StorageMessageSource$trigger","storageArea",94,"uniqueCount","newTimestamp","now","uniqueID","timestamp",95,"wsMessenger","wsMsgSource","WSMessageSource","connect","WSMsgAPI","./msg_api",96,"SOCKET_MESSAGES",97,"WSMessageSource$connect","_options","host","location","port","_ws","onopen","ws","onmessage","onclose","onerror","WebSocket","_wsSubscriberMethod","WSMessageSource$handleEvent","WSMessageSource$trigger","onTimeout","toggleRpcSubscription","callbackCorrId","onResponse","interval","corrId",98,"Encoder","skip","bits","output","readByte","byte","alphabet","finish","Decoder","readChar","char","fromCharCode","val","lookup","encoder","decoder","alias","table","flush",99,100,"_createProxyMethods","proxyMethodName","mixinMethodName","boundMethod","Mixin_setInstanceKey","hostClass","instanceKey","mixin","instancePropertiesMap","instanceKeys","Mixin_addMethod","hostMethodName","wrappedMethod","_wrapMixinMethod","mixinInstance","_getMixinInstance","mixinProp","Mixin$$useWith","mixinMethods","../util/check","mol-proto",101,"MessengerRegexpAPI","./abstract/mixin","./messenger/m_api","./messenger/m_api_rx","./messenger/m_source","./messenger/msngr_source",102,"deepExtend","debug",103,"_initializeSubscribers","_messageSubscribers","_patternMessageSubscribers","Messenger$destroy","Messenger$on","_Messenger_onWithOptions","Messenger$once","dispatchTimes","Messenger$onceSync","sync","Messenger$onSync","Messenger$onAsync","_Messenger_on","_eachMessage","messagesSplitRegExp","subscribersHash","_chooseSubscribersHash","changed","subscriptionChanged","_registerSubscriber","pattern","onSubscriberAdded","noSubscribers","msgSubscribers","notYetRegistered","_indexOfSubscriber","subscr","Messenger$off","_Messenger_off","_removeSubscriber","subscriberIndex","_removeAllSubscribers","onSubscriberRemoved","offMessages","subscriberRemovedMap","Messenger$offAll","_offAllSubscribers","subscribers","_synchronous","_callSubscribers","_callPatternSubscribers","calledMsgSubscribers","patternSubscribers","_callSubscriber","syncSubscriber","synchro","__messages","_setTimeout","useSetTimeout","setTimeoutFunc","getSubscribers","includePatternSubscribers","onceSync","onAsync","onMessage","offMessage","subscriptions","../abstract/mixin","./m_source",104,"MessengerAPI$destroy","addInternalMessage","internalMsgs","_internalMessages","removeInternalMessage","unexpectedNotificationWarning","messageIndex","getInternalMessages","sourceData","../util/logger",105,"_patternInternalMessages","_catchAllSubscribed","noPatternInternalMessages","internalMessages","internalMessagesHash","patternMessages","sourcePattern","./m_api",106,"messengerAPI","_prepareMessengerAPI","MessageSource$destroy","setMessenger","newSourceMessage","removedSourceMessage","api","shouldDispatch",107,"sourceMessenger","MessengerMessageSource$postMessage",108,"./messenger","./minder",109,"ds1","mode","ds2","connDescriptions","connectors","descr","Connector","_addConnector","cnct","___minder_id","_connectors","onConnectorMessage","connector","_receivedMessages","_isPropagating","_idleCheck","minder_isPropagating","minder_whenPropagationCompleted","executeCallback","minder_getConnectors","isOn","minder_destroyConnector","minder_getExpandedConnections","searchStr","getConnectors","connections","connection","leftSource","_getExpandedSource","rightSource","cnctn","_sourceMatchesString","ds","source","_model","_accessPath","unshift","matchStr","some","srcNode","_stringMatch","substr","minder_destroy","destroyDS","getExpandedConnections","isPropagating","whenPropagationCompleted","./model/connector","./util/logger",110,"flag","__inChangeTransaction","passTransactionFlag","fromFunc","toFunc","processChanges","notify","processTransaction","prepareTransaction","validateTransaction","changeFinished","sameSource","checkChange","checkSplice","checkMethod","parentPathChanged","pathsToChange","parentPath","_pathIsParentOf","todo","exitLoop","pathsToSplice","hadSplice","parentPathSpliced","every","processChange","executeSplice","executeMethod","howMany","CHANGE_TYPE_TO_METHOD_MAP","deleted","./path_utils",111,"setupMode","_changesQueue1","_changesQueue2","pathTranslation","patternTranslation","getPatternTranslations","pathTranslation1","reverseTranslationRules","pathTranslation2","patternTranslation1","reversePatternTranslationRules","patternTranslation2","dataTranslation","dataTranslation1","dataTranslation2","dataValidation1","dataValidation2","turnOn","modeParseError","parsedMode","modePattern","depth1","depth2","Connector$changeMode","turnOff","Connector$deferChangeMode","rules","reverseRules","path2_value","path1_key","_throwInvalidTranslation","_getStaticPath","starIndex","starIndex1","starIndex2","fromPattern","createRegexPath","fromStaticPath","toPattern","toStaticPath","pt","Connector$turnOn","linkDataSource","reverseLink","fromDS","toDS","changesQueue","onData","batch","translatePath","sourcePath","translatedPath","pTranslation","subscriptionPattern","translateData","translate","validateData","callValidator","validator","alreadyFailed","valid","passedCount","validators","propagateData","sendData","postChangeData","subscriptionSwitch","mergeTransactions","batches","targetPath","subscriptionPath","_subscriptionPath","_link1","_link2","Connector$turnOff","unlinkDataSource","linkName","Connector$destroy","changeMode","../messenger",112,"Model$path","__proto__","reactive","_prepareMessengers","Model$get","ModelPath","proxyMessenger","modelHostObject","Model$$useWith","modelMethodsToProxy","internalMessenger","internalMessengerSource","ModelMsgAPI","externalMessenger","_getHostObject","Model$destroy","_internalMessenger","synthesize","modelMethods","../messenger/msngr_source","./change_data","./m_msg_api","./m_path","./model_utils","./synthesize",113,"../messenger/m_api_rx",114,"ModelPath$path","_args","interpolateAccessPath","_prepareMessenger","freeze","reduce","accessPathStr","currNode","thisPathArgsCount","newPath","ModelPath$len","ModelPath$push","newLength","ModelPath$pop","ModelPath$unshift","ModelPath$shift","mPathAPI","ModelPathMsgAPI","modelMessageSource","mPathMessenger","_getDefinition","_createFromDefinition","definition","ModelPath$destroy","pop","./path_msg_api",115,116,"rootPath","internalChanges","truncateChangePath","fullPath","../messenger/m_api",117,"nodeParsePattern","pathParsePattern","unparsed","nodeStr","pathNodeTypes","patternPathParsePattern","regexStr","patternsStarted","regex","nodeRegex","interpolated","startIndex","methodsNames","wrappedMethods","origMethod","regexPath","propertyPathSyntax","arrayPathSyntax","interpolationSyntax","propertyInterpolateSyntax","arrayInterpolateSyntax","propertyStarSyntax","arrayStarSyntax","starSyntax","pathParseSyntax","patternPathParseSyntax",".","[","*",".*","[*]",118,"_synthesizePathMethods","synthesizers","synthszr","_synthesize","synthesizer","addChangeMessage","messagesHash","addTreeChangesMessages","oldIsTree","valueIsTree","newIsTree","addMessages","valueProp","_addMessages","addMessage","existingMsg","cloneTree","valueIsNormalObject","protectValue","addBatchIdsToMessage","batchId","msgId","__batch_id","__msg_id","methodCode","eval","ModelError","fs","templates","include_defines","include_create_tree","include_traverse_tree","dotDef","modelAccessPrefix","modelPostMessageCode","modelPostBatchCode","modelDotDef","dotSettings","templateSettings","strip","tmpl","modelSynthesizers","synthesizePathMethods","memoize","../../util/logger","../change_data","../model_utils","../path_utils","dot",119,"choices","Where","condition","Superclass","matchSuperclassToo","matchSuperclass","checkSubtree","typeofChecks","_jsKeywords","valueElement","_prependPath","unknownKeysAllowed","keyPattern","emptyHash","requiredPatterns","optionalPatterns","subPattern","subValue","base","TypeError",120,"./check","./logger",121,"Logger","level","./logger_class",122,"maxLevelLength","colored","color","levels","colors","DEFAULT_OPTIONS","throwLevel","enabled","logPrefix","log","console","logPrefixColor",123,"resolveDefs","c","block","def","define","code","assign","substring","defineParams","param","v","arg","use","useParams","d","rw","__exp","unescape","_globals","version","evaluate","conditional","iterate","varname","selfcontained","doNotSkipEncoded","encodeHTMLSource","encodeHTMLRules","&","<",">","\"","'","/","matchHTML","amd","startend","startencode","needhtmlencode","indv","cse","sid","elsecase","vname","iname","_encodeHTML",124,"InstallDots","__path","__destination","destination","__global","__rendermodule","rendermodule","__settings","__includes","addexports","ret","readdata","readFileSync","process","compileAll","compileToFile","modulename","lastIndexOf","defs","settings","compileoptions","defaultcompiled","compiled","writeFileSync","compilePath","k","defFolder","sources","readdirSync","./doT",125,"Proto","wrapped","unwrapProto","utils","prototypeMethods","objectMethods","arrayMethods","functionMethods","stringMethods","numberMethods","utilMethods","__","_constants","protoFuncs","makeProtoFunction","protoInstanceMethods","makeProtoInstanceMethod","underscore","./proto_array","./proto_function","./proto_number","./proto_object","./proto_prototype","./proto_string","./proto_util","./utils",126,"arrayToAppend","prependArray","arrayToPrepend","values","valuesIsArray","unique","itemIndex","filtered","it","itemIndexOf","_deepForEach","nativeArrayMethodsNames","nativeArrayMethods","makeFindMethod",127,"arg1","arg2","funcBody","partialRight","hashFunc","limit","cache","keysList","wait","_delay","deferTicks","ticks","deferFunc","delayMethod","funcOrMethodName","_delayMethod","delayed","passArgs","deferred","debounce","immediate","later","last","callNow","previous","leading","remaining","trailing","memo","ran","waitFor","maxTimeout","timedOutFunc","checkInterval","testCondition","setInterval","not",128,"isNumeric","parseFloat","isFinite",129,"onlyEnumerable","descriptors","getOwnPropertyDescriptor","clonedObject","propertyName","decriptorFlags","_getDescriptor","descriptor","constants","ENUMERABLE","configurable","CONFIGURABLE","writable","WRITABLE","propertyValues","preserveStructure","_extendTree","selfNode","objNode","objTraversed","loop","hasProp","isSelfObj","isNormalObject","isValueObj","allKeys","getOwnPropertyNames","keyOf","searchElement","allKeysOf","mapProperty","reduceKeys","initialValue","filterProperty","testProperty","_passed","everyKey","_didNotPass","pickKeys","ArrayProto","multiline","ignoreCase","isNot","findValue","findKey",130,"propDescriptors","applyConstructor","thisClass","subclass","constructorCode",131,"toUpperCase","rx","regexpStringPattern","getTime","toQueryString","qs","encodeURIComponent","fromQueryString","pairs","results","decodeURIComponent","pair","splitPair","hashCode","hash","format","formatRegexp",132,"times","tap","identity","compareProperty","b",133,"someMethod","findWhat","argIndex","testItem","foundValueOrIndex"],"mappings":"CAAC,QAAUA,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATC,UAAqBA,OAAQ,KAAIF,GAAGC,E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,EAAOJ,SACfo3F,wBAAyBA,EACzBF,kBAAmBA,EACnB0B,eAAgBA,GAqBP,GAAI94F,iBA+BN","sourceRoot":"/"} \ No newline at end of file +{"version":3,"file":"dist/milo.min.js","sources":["dist/milo.bundle.js"],"names":["e","t","n","r","s","o","u","a","require","i","Error","f","exports","call","length",1,"module","Facet","owner","config","this","name","_","firstLowerCase","constructor","init","apply","arguments","proto","extendProto","milo-core",2,"FacetedObject","instantiateFacet","FacetClass","facetName","fctConfig","facetsConfig","facets","facetsDescriptors","enumerable","value","facetsClasses","eachKey","Object","defineProperties","defineProperty","FacetedObject$addFacet","facetConfig","throwOnErrors","check","Function","Match","Optional","String","protoFacets","prototype","message","logger","error","newFacet","ENUM","FacetedObject$$hasFacet","FacetedObject$$getFacetConfig","hasFacet","FacetedObject$$createFacetedClass","addInheritedFacets","superClass","facetsInfo","facetsInfoName","inheritedFacetsInfo","clone","extend","ObjectHash","Subclass","fctName","hasOwnProperty","FacetedClass","createSubclass","miloCore","util","createFacetedClass","getFacetConfig","addFacet","./facet",3,"ClassRegistry","FoundationClass","setClass","__registeredClasses","add","aClass","IdentifierString","get","remove","nameOrClass","OneOf","clean",4,"attrName","attrs","bind","parse","node","bindTo","match","ATTRIBUTE_REGEXP","compClass","compFacets","split","FACETS_SPLIT_REGEXP","undefined","compName","validate","render","milo","componentName","ATTRIBUTE_TEMPLATE","replace","join","BindAttribute$$setInfo","el","componentClass","componentFacets","attr","BindAttribute","decorate","Attribute","setInfo","../config","./a_class",5,"attributes","Attribute$$remove","deep","removeAttribute","selector","children","querySelectorAll","forEach","childEl","Attribute$remove","Attribute$destroy","Attribute$get","getAttribute","Attribute$set","setAttribute","Attribute$decorate","set","toBeImplemented","destroy",6,"load","loadUrl","LoadAttribute",7,"./a_bind","./a_load",8,"binder","scopeEl","rootScope","bindRootElement","createBinderScope","scope","info","ComponentInfo","Component","create","twoPass","scanScope","scan","hostObject","Scope","_rootEl","addMethod","_each","compInfo","aComponent","container","scopeObjectFactory","createScopeForElement","postChildrenBoundMessage","elComp","getComponent","postMessageSync","scopedObject","isContainer","childNodes","innerScope","_hostObject","createScopeForChildren","containerEl","utilDom","document","body","componentsRegistry","./attributes/a_bind","./components/c_facets/cf_registry","./components/c_info","./components/c_registry","./components/scope","./services/mail","./util/dom",9,"coreClasses","classes","Mixin","MessageSource","MessengerMessageSource","MessengerAPI","DOMEventsSource","Transaction","TransactionHistory","./abstract/facet","./abstract/faceted_object","./abstract/registry","./command/transaction","./command/transaction_history","./components/msg_src/dom_events",10,"ActionsHistory","maxLength","_maxLength","Infinity","actions","position","ActionsHistory$store","command","_truncateToCurrentPosition","push","act","shift","ActionsHistory$deleteLast","ActionsHistory$undo","cb","undo","ActionsHistory$redo","redo","ActionsHistory$undoAll","ActionsHistory$redoAll","ActionsHistory$undoAllAsync","deferMethod","defer","ActionsHistory$redoAllAsync","ActionsHistory$each","funcOrMethod","thisArg","func","ActionsHistory$eachReverse","reverse","each","ActionsHistory$getLastAction","ActionsHistory$getDescription","map","getDescription","store","deleteLast","undoAll","redoAll","undoAllAsync","redoAllAsync","eachReverse","getLastAction",11,"Command","commandsRegistry","../abstract/registry","./index",12,"Command$init","args","slice","Command$execute","result","Command$setUndo","undoCommand","UNDO_COMMAND","warn","Command$getUndo","Command$undo","undoCmd","getUndo","execute","Command$setArguments","toArray","Command$getArguments","Command$changeArguments","Command$addArguments","appendArray","Command$$create","newApply","Command$$createWithUndo","Command$destroy","Command$setComment","comment","Command$getDescription","setUndo","setArguments","addArguments","getArguments","changeArguments","setComment","createWithUndo",13,"commands","Transaction$execute","Transaction$undo","Transaction$redo","Transaction$destroy","Transaction$storeCommand","Transaction$merge","transaction","cmd","Transaction$setComment","Transaction$getDescription","storeCommand","merge","./actions_history",14,"transactions","currentBatch","currentTransaction","SCHEDULED","TransactionHistory$storeCommand","appendTransaction","_postTransactionMessage","_storeTransaction","TransactionHistory$deleteLastTransaction","_addBatchToTransaction","_storeCurrentTransaction","TransactionHistory$endTransaction","TransactionHistory$storeTransaction","endTransaction","msg","_messenger","postMessage","TransactionHistory$undo","TransactionHistory$redo","TransactionHistory$inTransaction","TransactionHistory$getDescription","TransactionHistory$useMessenger","Messenger","defaultMethods","TransactionHistory$destroy","storeTransaction","deleteLastTransaction","inTransaction","useMessenger","./transaction",15,"Component$$createComponentClass","Array","isArray","configMap","fct","keys","fctClassName","firstUpperCase","facetsRegistry","ComponentClass","_registerWithDomStorage","className","DOMStorage","registerDataType","Component_domStorageSerializer","Component_domStorageParser","component","state","getState","JSON","stringify","compStr","compClassName","jsonParse","createFromState","Component$$create","extraFacetsClasses","Component$$copy","deepCopy","Boolean","newEl","dom","copy","cloneNode","createOnElement","extraFacets","_getState","setState","Component$$createOnElement","innerHTML","_createComponentElement","_findOrCreateComponentRootScope","_addAttributeAndBindComponent","broadcast","Dom","domFacetConfig","templateFacetConfig","template","elConfig","domConfig","content","createElement","parent","getContainingComponent","miloBinder","Component$$createFromState","newUniqueName","ObjectIncluding","facetsStates","outerHTML","wrapEl","_createComponentWrapElement","_any","_add","domUtils","compEl","miloComponentName","Component$$createFromDataTransfer","dataTransfer","dataType","find","types","type","COMPONENT_DATA_TYPE_REGEX","test","getData","Component$init","element","componentInfo","componentRef","messenger","MESSENGER_PROPERTY","allFacets","start","Component$start","Component$createElement","Component$hasFacet","facetNameOrClass","facet","ComponentFacet","Component$addFacet","facetClassName","Component$allFacets","method","mapKeys","Component$rename","renameInScope","rename","Component$remove","preserveScopeProperty","quiet","_remove","Component$insertInto","parentEl","referenceEl","insertBefore","setScopeParentFromDOM","Component$getState","rootComponent","Component$getTransferState","options","transfer","Component$_getState","deepState","filterKeys","fctState","Component$setState","Component$getScopeParent","conditionOrFacet","_callGetScopeParent","_getScopeParent","_getScopeParentFunc","conditionFunc","componentUtils","_makeComponentConditionFunc","Component$getScopeParentWithClass","comp","Component$getTopScopeParent","_getTopScopeParent","topParent","Component$getTopScopeParentWithClass","Component$setScopeParentFromDOM","foundParent","parentNode","Component$walkScopeTree","callback","walkScopeTree","Component$treePathOf","treePathOf","Component$getComponentAtTreePath","treePath","nearest","getNodeAtTreePath","Component$insertAtTreePath","wasInserted","insertAtTreePath","Component$broadcast","data","synchronously","postMethod","Component$destroy","_destroyed","detachComponent","removeElement","Component$isDestroyed","createComponentClass","isComponent","createFromDataTransfer","insertInto","getTransferState","getScopeParent","getTopScopeParent","getScopeParentWithClass","getTopScopeParentWithClass","getComponentAtTreePath","isDestroyed","useWith","../abstract/faceted_object","../attributes/a_bind","../binder","../util/component_name","../util/dom","../util/storage","./c_facets/cf_registry","./c_utils","./scope",16,"ComponentFacet$init","_createMessenger","ComponentFacet$start","messages","onConfigMessages","ComponentFacet$onConfigMessages","messageSubscribers","notYetRegisteredMap","subscriber","subscriberType","on","contextType","context","ComponentFacet$check","reqFacet","ComponentFacet$destroy","domParent","parentComponent","scopeParent","_postParent","getParentMethod","messageType","messageData","parentFacet","_setMessageSource","messageSource","getMessageSource","dispatchSourceMessage","dispatchMessage","_createMessageSource","MessageSourceClass","_createMessageSourceWithAPI","messengerAPIOrClass","requiresFacet","facetRequire","indexOf","postDomParent","partial","postScopeParent","../abstract/facet",17,"Container$binder","Container$start","Container$path","path","throwInvalidPath","len","allowedNamePattern","Container$getState","Container$setState","compData","Container$destroy","_detachElement","Container$unwrap","renameChildren","unwrapElement","child","Container$append","appendChild","Container$insertBefore","sibling","Container$remove","removeChild","Container","unwrap","append","../../binder","../../util/dom","../c_facet","../scope","./cf_registry",18,"CssFacet$start","CssFacet","modelUtils","wrapMessengerMethods","onSync","changeDataHandler","activeModelPaths","CssFacet$set","self","prop","modelPath","charAt","update","CssFacet$del","modelPaths","cssClass","clear","classList","CssFacet$path","Path","CssFacet$update","cssConfig","handler","updateHandlers","modelValue","updateSimple","has","size","Set","updateByObject","cssClasses","updateByFunction","getCssClassFn","cssFacet","Model","_utils","createFacetClass","methods","del","string","object","function","../../util/create_facet_class",19,"Data$start","pathUtils","elData","getElementDataAccess","_dataChangesQueue","_prepareMessageSource","_path","_value","onOwnDataChange","onDataChangesFinished","onChildData","dataAPI","DataMsgAPI","dataEventsSource","proxyDataSourceMethods","_createProxyMethod","msgType","_bubbleUpDataChange","_queueDataChange","getTransactionFlag","Data$_bubbleUpDataChange","msgData","parentData","parentMsg","Data$_queueDataChange","change","_postDataChanges","Data$_postDataChanges","queue","changes","Data$set","executeHook","noHook","setTransactionFlag","_set","oldValue","newValue","Data$_set","setChildData","valueSet","childValue","key","pathSyntax","childPath","childDataFacet","listFacet","list","listLength","count","newItemsCount","_addItems","_updateDataPaths","index","listCount","removeCount","_removeItem","_setScalarValue","Data$del","postTransactionFinished","_del","Data$_del","Data$_setScalarValue","Data$get","deepGet","_get","Data$_get","scopeData","listItem","scopeItem","contains","_getScalarValue","Data$_getScalarValue","Data$splice","spliceIndex","spliceHowMany","_splice","removed","addedCount","methodName","hook","Data$_splice","normalizeSpliceIndex","item","itemData","added","argsLen","addItems","j","Data$len","_len","Data$_len","Data$path","accessPath","createItem","parsedPath","parseAccessPath","currentComponent","pathNode","nodeKey","getPathNodeKey","syntax","itemComponent","_addItem","property","currentDataFacet","Data$getPath","Data$getKey","Data$getState","Data$setState","model","Data","splice","getPath","getKey","trigger","../msg_api/data","../msg_api/de_data","../msg_src/dom_events",20,"Dom$$createElement","tagName","_applyConfigToElement","doT","cls","configAttributes","attrValue","_attachCssClasses","currentStyle","window","getComputedStyle","_visible","display","show","toggle","hide","doShow","style","_manageCssClasses","enforce","callMethod","cssCls","doToggle","detach","setStyle","setStyles","properties","isDeep","prepend","thisEl","firstChild","appendChildren","prependChildren","insertAfter","nextSibling","appendToScopeParent","Dom$children","direction","iterator","findDirections","treeWalker","createTreeWalker","NodeFilter","SHOW_ELEMENT","currentNode","nextNode","found","hasTextBeforeSelection","selection","getSelection","isCollapsed","text","focusNode","textContent","startPos","anchorOffset","SHOW_TEXT","anchorNode","prevNode","previousNode","isText","nodeValue","trim","hasTextAfterSelection","addCssClasses","removeCssClasses","toggleCssClasses","up","down","../../attributes/a_bind","../../config",21,"Drag$init","_dragData","dataTypeInfo","_dataTypeInfo","Drag$setHandle","handleEl","_dragHandle","Drag$start","_addDragAttribute","_createDragImage","_toggleDragCls","onMessages","mousedown","onMouseDown","mouseenter mouseleave mousemove","onMouseMovement","dragstart","onDragStart","drag","onDragging","dragend","onDragEnd","getstatestarted","_removeDragAttribute","getstatecompleted","dragImage","_dragElement","Image","src","url","eventType","event","__mouseDownTarget","target","targetInDragHandle","empty","stopPropagation","shouldBeDraggable","setMeta","params","getMetaData","_dragMetaDataType","dt","setComponentMeta","_dragMetaData","meta","setAdditionalDataTypes","dataTypes","_dataTypesData","getDataFunc","setData","off","preventDefault","setDragImage","x","y","DragDrop","setComponentState","_setAllowedEffects","service","dragDrop","dragFacet","_dragIsDisabled","showHide","dragCls","effects","allowedEffects","setAllowedEffects","Drag","setHandle","../../util/dragdrop","../c_class",22,"Drop$init","DropMsgAPI","Drop$start","dragenter dragover","drop","onDrop","dragenter dragover dragleave drop dragin dragout","postToService","_handleDropDependency","setDropEffect","dropFacet","_handleDropDependencyNothrottle","originalDropComponent","allow","parentAllowed","checkParent","_isDropAllowed","allowComps","components","getComponentMeta","Drop","throttle","../msg_api/drop",23,"Events$init","domEventsSource","MSG_SOURCE_KEY","Events",24,"Frame$init","FrameMessageSource","Frame$start","postDomReady","Frame$destroy","Frame$getWindow","contentWindow","Frame$isReady","readyState","getWindow","Frame$isMiloReady","frameMilo","isReady","milo_version","Frame$milo","whenMiloReady","win","_makeWhenReadyFunc","isReadyFunc","callFunc","Frame","Frame$whenReady","Frame$whenMiloReady","whenReady","isMiloReady","../../services/de_constrs","../msg_src/frame",25,"ItemFacet$getState","getIndex","ItemFacet$setState","setIndex","ItemFacet$getIndex","ItemFacet$setIndex","ItemFacet$removeItem","removeItem","ItemFacet$extractItem","extractItem","ItemFacet","../../services/mail",26,"List$init","_listItems","_listItemsHash","WRIT","List$start","onChildrenBound","items","itemsHash","foundItem","itemSample","LIST_SAMPLE_CSS_CLASS","miloConfig","_createCacheTemplate","List$_createCacheTemplate","itemElCopy","itemsTemplateStr","itemsTemplate","compile","List$item","List$count","List$_setItem","List$contains","List$addItem","isNaN","List$_addItem","prevComponent","_itemPreviousComponent","_setItem","_updateItemsIndexes","fromIndex","toIndex","List$addItems","itemsData","concat","repeat","spliceArgs","dataFacet","List$_addItems","Integer","itemsHTML","frag","createDocumentFragment","newComponents","List$removeItem","List$extractItem","itemComp","List$_removeItem","doDestroyItem","List$replaceItem","newItem","oldItem","List$_updateDataPaths","List$each","List$map","List$destroy","List","addItem","replaceItem","../../util/component_name",27,"ModelFacet$init","m","ModelFacet$getState","deepClone","ModelFacet$setState","ModelFacet$_createMessenger","ModelFacet$destroy","ModelFacet",28,"Options$init","proxyMethods","Options$_createMessenger","Options$destroy","Options",29,"Template$init","interpolate","compileOptions","Template$start","autoRender","autoBinder","Template$getCompiled","_template","Template$set","templateStr","_templateStr","_compile","Template$render","Template$binder","Template","getCompiled",30,"Transfer$init","_activeState","_defaultKey","_state","Transfer$getState","Transfer$setState","setActiveState","Transfer$setActiveState","Transfer$setStateWithKey","isDefaultKey","Transfer$getStateWithKey","Transfer$getComponentMeta","Transfer","setStateWithKey","getStateWithKey",31,"../../abstract/registry",32,"getComponentClass","getComponentExtraFacets","hasContainerFacet","ComponentInfo$destroy","ComponentInfo$rename","reportBinderError","classHasFacetThatRequiresContainer","someKey","facetRequiresContainer","./c_registry",33,"./c_class",34,"returnCurrent","_getContainingComponent",35,"View","../c_registry",36,"DataMsgAPI$init","DataMsgAPI$value","componentGetter","translateToSourceMessage","componentEvent","filterSourceMessage","sourceMessage","createInternalData","internalData","./de_data",37,"inputDataProperty","inputType","inputElementTypes","byDefault","inputChangeEvent","toLowerCase","domElementsDataAccess","div","span","p","input","textarea","select","img","caption","thead","tbody","tfoot","tagInfo","propFunc","checkbox","radio",38,"dropEventsMap","resetFilterVars","_currentTarget","_inside","ok","dragin","dragout",39,"DOMEventsSource$destroy","emitter","DOMEmitterSource","../../services/dom_source",40,"frameWindow","addSourceSubscriber","addEventListener","removeSourceSubscriber","removeEventListener","handleEvent",41,"rootEl","Scope$_add","checkName","__add","Scope$_safeAdd","shouldRename","Scope$_copy","aScope","Scope$_move","otherScope","Scope$_merge","Scope$_each","Scope$_filter","Scope$_length","Scope$_any","Scope$_remove","Scope$_clean","Scope$_detachElement","Scope$_has","Scope$$rename","obj","_safeAdd","_copy","_move","_merge","_length","_clean","_has","_filter",42,"MLButton$disable","disable","disabled","MLButton$isDisabled","MLButton","events","isDisabled",43,"MLCombo$init","_comboInput","_comboList","datalist","DATALIST_TEMPLATE","dispatchChangeMessage","MLCombo_get","MLCombo_set","changeComboData","MLCombo_del","COMBO_CHANGE_MESSAGE","onOptionsChange","comboOptions","MLCombo","***",44,"MLComboList$init","once","MLComboList$setDataValidation","dataValidation","_dataValidation","MLComboList$setOptions","arr","_combo","setOptions","MLComboList$clearComboInput","clearComboInput","MLComboList$toggleAddButton","toggleAddButton","MLComboList$setAddItemPrompt","prompt","setAddItemPrompt","MLComboList$destroy","_connector","minder","destroyConnector","componentSetup","combo","_list","onComboChange","onAddItem","runDataValidation","onItemsChange","COMBO_LIST_CHANGE_MESSAGE","MLComboList_get","MLComboList_set","MLComboList_del","MLComboList","setDataValidation",45,"MLDate$getMin","date","min","MLDate$setMin","toDate","toISO8601Format","MLDate$getMax","max","MLDate$setMax","MLDate_get","MLDate_set","dispatchInputMessage","MLDate_del","pad","dateArr","getFullYear","getMonth","getDate","dateStr","MLDate","getMin","setMin","getMax","setMax",46,"MLDropTarget",47,"foldUnfold","opened","itemMessage","id","_itemsMap","onItemEvent","MLFoldTree$setItemTemplate","_itemTemplate","MLFoldTree$renderTree","_renderTree","itemsIDs","uniqueId","COMPILED_TREE_TEMPLATE","itemIDs","itemTemplate","DEFAULT_COMPILED_ITEM_TEMPLATE","treeTemplate","_data","MLFoldTree$setActiveItem","querySelector","MLFoldTree$toggleItem","TREE_TEMPLATE","MLFoldTree","click dblclick","setItemTemplate","renderTree","setActiveItem","toggleItem","../../util/unique_id",48,"MLGroup",49,"MLHyperlink",50,"MLImage$init","MLImage_set","MLImage_get","MLImage_del","IMAGE_CHANGE_MESSAGE","onModelChange","MLImage",".src",51,"MLInput$disable","MLInput$isDisabled","MLInput$setMaxLength","MLInput","setMaxLength",52,"MLInputList$init","MLInputList$setPlaceHolder","placeHolder","_input","MLInputList$setAsync","newHandler","asyncHandler","MLInputList$destroy","_button","button","onClick","label","INPUT_LIST_CHANGE_MESSAGE","MLInputList_get","MLInputList_set","MLInputList_del","MLInputList_splice","MLInputList","setAsync","setPlaceHolder",53,"MLList$init","MLList$destroy","MLList$removeItem","MLList$moveItem","from","to","splicedData","deferChangeMode","MLList","moveItem",54,"MLListItem$init","deleteBtn","MLListItem$removeItem","listOwner","MLListItem$moveItem","MLListItem$isDropAllowed","draggingFromSameList","getCurrentDragSource","sourceList","isComponentAllowed","isDropAllowed","onItemDrop","onDragOut","targetIndex","getComponentState","dropPosition","getDropPositionY","isBelow","isAbove","isSamePosition","stateIndex","isMoveDown","onDragDropCompleted","onDragHover","dropTarget","droppedInAnotherList","MLListItem$getMetaData","MLListItem_get","MLListItem_set","_sendChangeMessage","MLListItem_del","LISTITEM_CHANGE_MESSAGE","MLListItem","dragenter","dragover","dragleave",55,"MLRadioGroup$init","CONF","ELEMENT_NAME_PROPERTY","ELEMENT_NAME_PREFIX","_renderOptions","MLRadioGroup$setRenderOptions","MLRadioGroup_set","setResult","_radioList","checked","MLRadioGroup_get","MLRadioGroup_del","onGroupClick","RADIO_CHANGE_MESSAGE","radioOptions","elementName","radioEls","MLRadioGroup$destroy","MLRadioGroup","click","setRenderOptions",56,"MLSelect$setOptions","modelChangeListener","MLSelect$disable","selectOptions","MLSelect","**",57,"MLSuperCombo$init","_optionsData","_filteredOptionsData","_comboOptions","_comboBefore","before","_comboAfter","after","_comboAddItemDiv","addItemDiv","_comboAddPrompt","addPrompt","_comboAddBtn","addBtn","_optionTemplate","OPTIONS_TEMPLATE","_startIndex","_endIndex","MAX_RENDERED","_hidden","_elementHeight","DEFAULT_ELEMENT_HEIGHT","_total","_optionsHeight","_lastScrollPos","_currentValue","_selected","_isAddButtonShown","setupComboList","setupComboInput","setupComboBtn","changeSelected","MLSuperCombo$toggleOptions","MLSuperCombo$showOptions","bounds","getBoundingClientRect","pageHeight","Math","ownerDocument","documentElement","clientHeight","innerHeight","listTopStyle","bottomOverlap","bottom","topOverlap","top","COMBO_OPEN","MLSuperCombo$hideOptions","MLSuperCombo$toggleAddButton","preserveState","__showAddOnClick","MLSuperCombo$setAddItemPrompt","_addItemPrompt","MLSuperCombo$setPlaceholder","placeholder","MLSuperCombo$setOptions","setFilteredOptions","MLSuperCombo$initOptionsURL","_optionsURL","_formatOptionsURL","formatOptions","_getOptionsURL","queryString","noop","request","post","err","response","responseData","MLSuperCombo$setFilteredOptions","MLSuperCombo$update","wasHidden","arrToShow","hideOptions","beforeHeight","afterHeight","height","overflow","width","zIndex","onListClick","scroll","onListScroll","onDataChange","onInputClick","onEnterKey","btn","onAddBtn","MLSuperCombo_get","MLSuperCombo_set","MLSuperCombo_del","_updateOptionsAndAddButton","filteredData","_filterData","filter","option","selected","filteredArr","isExactMatch","showOptions","scrollTop","directionMap","keyCode","_changeSelected","scrollPos","selectedPos","offsetTop","relativePos","_getDataValueFromElement","thisItem","adjItem","onMouseOver","_mouseIsOver","onMouseLeave","_mouseOutTimer","clearInterval","setTimeout","_onMouseLeave","_setData","lastElementChild","lastChild","firstElementChild","lastElPosition","firstElPosition","distFromLastEl","distFromFirstEl","elsFromStart","floor","elsToTheEnd","totalElementsBefore","BUFFER","Number","MLSuperCombo","mouseleave","mouseover","toggleOptions","initOptionsURL","setPlaceholder",58,"MLText",59,"MLTextarea$startAutoresize","_autoresize","_autoresizeOptions","_adjustAreaHeight","_manageSubscriptions","onOff","newHeight","scrollHeight","minHeight","maxHeight","MLTextarea$stopAutoresize","MLTextarea$isAutoresized","MLTextarea$disable","MLTextarea","startAutoresize","stopAutoresize","isAutoresized",60,"MLTime_get","timeStr","TIME_REGEX","hours","mins","time","Date","MLTime_set","TIME_TEMPLATE","getHours","getMinutes","MLTime_del","MLTime",61,"MLWrapper",62,"MLAlert$$createAlert","close","timeout","alert","MLAlert","_prepareOptions","alertCls","ALERT_CSS_CLASSES","_alert","visible","alertScope","closeBtn","_onCloseBtnClick","closeAlert","MLAlert$$openAlert","createAlert","openAlert","MLAlert$openAlert","_toggleAlert","MLAlert$closeAlert","addRemove","appendRemove","success","warning","danger","fixed","role","aria-hidden","../../../util/component_name","../../c_class","../../c_registry",63,"MLDialog$$createDialog","initialize","title","html","backdrop","keyboard","buttons","Any","dialog","MLDialog","_dialog","dialogScope","_onBackdropClick","buttonSubscriber","_dialogButtonClick","_toggleDialog","_dispatchResult","closeDialog","_onKeyDown","openedDialog","DEFAULT_BUTTONS","CLOSE_OPTIONS","mapToObject","opt","MLDialog$$openDialog","createDialog","openDialog","dialogsInitialized","_initializeDialogs","backdropEl","MLDialog$openDialog","MLDialog$closeDialog","MLDialog$$getOpenedDialog","MLDialog$destroy","getOpenedDialog",64,"MLDropdown$start","onDocOut","relatedTarget","listeners","_dropdown","isIframe","hideMenu","toggleEl","TOGGLE_CSS_CLASS","menuEl","MENU_CSS_CLASS","doc","clickHandler","toggleMenu","DOMListeners","menu","MLDropdown$destroy","removeAll","MLDropdown$showMenu","MLDropdown$hideMenu","MLDropdown$toggleMenu","MLDropdown","showMenu","../../../util/dom_listeners",65,"componentPrefix","domStorage","typeSuffix","prefixSeparator","root","messageKey","messageTimestamp","quotaExceeded","throwError","componentMetaTemplate","componentMetaRegex","jsonpTimeout","jsonpCallbackPrefix","optionsKey","defaults","websocket","rpc","responsePrefix","deprecationWarning",66,"loader","_loader","miloMail","_loadViewsInElement","views","loadElements","totalCount","loadedCount","loadView","./attributes/a_load","./config","./util/request",67,"domReady","mail","registry","./attributes","./binder","./classes","./command","./components/c_class","./components/c_facet","./loader","./registry","./services/window","./use_components","./use_facets","./util","./util/create_component_class","./util/create_facet_class",68,"./command/cmd_registry",69,"eventTypes","ClipboardEvent","Event","FocusEvent","KeyboardEvent","MouseEvent","TouchEvent","global","eTypes","eventConstructorName","eventConstructor","makeFunction","domEventsConstructors",70,"eventEmitter","DOMEmitterSource$destroy","sourceSubscriberMethod","capture","useCapturePattern","isCapturePhase","eventPhase","CAPTURING_PHASE","useCapturePostfix","DOMEmitterSource$postMessage","EventConstructor","domEvent","notCancelled","dispatchEvent","../components/c_class","./de_constrs",71,"MailMsgAPI","MailMessageSource","mailMsgSource","./mail_api","./mail_source",72,"windowMessageRegExp","windowMessagePrefix",73,"isReadyStateChange","readystatechange","_windowSubscriberMethod","isWindowMessage","../de_constrs",74,"windowService_isTop","__karma__","windowService","domEmitterSource","isTop","./dom_source",75,"./components/classes/View","./components/ui/Button","./components/ui/Combo","./components/ui/ComboList","./components/ui/Date","./components/ui/DropTarget","./components/ui/FoldTree","./components/ui/Group","./components/ui/Hyperlink","./components/ui/Image","./components/ui/Input","./components/ui/InputList","./components/ui/List","./components/ui/ListItem","./components/ui/RadioGroup","./components/ui/Select","./components/ui/SuperCombo","./components/ui/Text","./components/ui/Textarea","./components/ui/Time","./components/ui/Wrapper","./components/ui/bootstrap/Dropdown",76,"./components/c_facets/Container","./components/c_facets/Css","./components/c_facets/Data","./components/c_facets/Dom","./components/c_facets/Drag","./components/c_facets/Drop","./components/c_facets/Events","./components/c_facets/Frame","./components/c_facets/Item","./components/c_facets/List","./components/c_facets/ModelFacet","./components/c_facets/Options","./components/c_facets/Template","./components/c_facets/Transfer",77,"prefix","./unique_id",78,"superClassName","staticMethods","SuperClass","componentRegistry","../components/c_registry",79,"facetRegistry","FacetBaseClass","../components/c_facet","../components/c_facets/cf_registry",80,"deprecate","fn","deprecated","warned",81,"filterNodeListByType","Node","ELEMENT_NODE","nodeList","nodeType","containingElement","selectElementContents","range","createRange","selectNodeContents","getNodeWindow","sel","removeAllRanges","addRange","selectElementText","fromNode","firstTextNode","toNode","lastTextNode","setSelection","setCaretPosition","pos","setStart","getSelectionDirection","_getDirection","focusOffset","startOffset","endOffset","docPosition","compareDocumentPosition","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","originalContentEditable","backward","setEnd","collapse","commonAncestorContainer","parentElement","isContentEditable","contentEditable","clearSelection","getElementOffset","includeBorder","yPos","xPos","offsetLeft","offsetParent","getBorder","topOffset","leftOffset","side","styles","sideValue","parseInt","getPropertyValue","normalize","TEXT_NODE","replaceChild","wrapInElement","wrapIntoEl","trimNodeRight","_trimNode","trimNodeLeft","stripHtml","str","walkTree","tw","containsEl","nodeIndex","findIndex","childIndex","toNormalize","isTreePathBefore","path1","path2","isBefore","htmlEntities","charCodeAt","whatToShow","defaultView","parentWindow","forEachNodesInRange","isNodeInsideRange","nodeRange","isInside","selectNode","compareBoundaryPoints","Range","START_TO_START","END_TO_END","rangeContainer","getComponentsFromRange","startContainer","deleteRangeWithComponents","deleteContents","areRangesEqual","range1","range2","addDebugPoint","dbEl",82,"DOMListeners$add","DOMListeners$remove","listener","idx","isEqual","_removeListener","DOMListeners$removeAll","l",83,"domReadySubscribed","onDomReady","domReadyFuncs",84,"DragDrop$$componentDataType","dragDropConfig","DragDrop$$getDropPositionY","dP","getDropPosition","clientY","targetTop","targetHeight","clientRect","targetWidth","targetLeft","left","clientX","DragDrop$isComponent","componentDataType","DragDrop$getComponentState","stateStr","DragDrop$setComponentState","requestedBy","DragDrop$setComponentMeta","_componentMeta","paramsStr","_encode","base32","encode","DragDrop$getComponentMeta","metaDataType","dType","decode","metaData","DragDrop$getAllowedEffects","effectAllowed","DragDrop$setAllowedEffects","DragDrop$getDropEffect","dropEffect","DragDrop$setDropEffect","effect","DragDrop$isEffectAllowed","getAllowedEffects","isCopy","isMove","isLink","isAllowed","DragDrop$getData","DragDrop$setData","dataStr","DragDrop$clearData","clearData","onDragDropStarted","_currentDragDrop","_currentDragFacet","onCompleteDragDrop","dragDropService","getCurrentDragDrop","DragDrop_destroy","offAll","getDropEffect","isEffectAllowed","dragdropstarted","dragdropcompleted","completedragdrop",85,"error$createClass","errorClassName","ErrorClass","makeSubclass","error$toBeImplemented","AbstractClass","errorClassNames","createClass",86,"fragment_getState","wrapperClassName","_getRangeContainer","cloneContents","wrapper","_wrapFragmentInContainer","_transferStates","_renameChildren","wrapperState","fragment_getStateAsync","fromComp","toComp","fromScope","toChildComp","fromChildComp","expandRangeToSiblings","siblings","getRangeSiblings","createRangeFromSiblings","nodes","setStartBefore","setEndAfter","end","containerNode","startNode","endNode","endContainer","startSibling","_findContainingChild","endSibling","selNode","_createNodesAndPathsFunc","fromObj","toObj","createRangePaths","createRangeNodes","getStateAsync","createRangeFromNodes","./dom",87,"util_destroy","domListeners","fragment","storage","../components/ui/bootstrap/Alert","../components/ui/bootstrap/Dialog","./component_name","./deprecate","./dom_listeners","./domready","./dragdrop","./error","./fragment","./json_parse","./request","./selection","./storage","./websocket",88,89,"createPromiseOverride","functionName","promise","Promise","keepRequestObject","_request","opts","onReady","_onReady","req","xPromise","contentType","XMLHttpRequest","open","setRequestHeader","setRequestHeaders","headers","onreadystatechange","ontimeout","onabort","_createXPromise","send","trackCompletion","_pendingRequests","resolvePromise","rejectPromise","resolve","reject","then","promiseThen","promiseCatch","status","responseText","spliceItem","errorReason","reason","errObj","stack","request$useMessenger","request$get","request$post","request$json","jsonPromise","errData","request$jsonp","_onResult","uniqueCallback","cleanUp","clearTimeout","head","script","jsonpOptions","omitKeys","request$file","fileData","progress","upload","onprogress","file","binary","formData","FormData","request$destroy","whenRequestsCompleted","delay","json","jsonp",90,"TextSelection","TextSelection$init","rangeCount","getRangeAt","TextSelection$text","_text","toString","TextSelection$textNodes","_textNodes","_getTextNodes","TextSelection$clear","textNodes","selStart","selEnd","inEnd","_getElement","thisPropName","rangePropName","_getComponent","elMethodName","TextSelection$containedComponents","_containedComponents","TextSelection$eachContainedComponent","containedComponents","TextSelection$del","selectEndContainer","selPoint","_getPostDeleteSelectionPoint","_selectAfterDelete","selOffset","offset","trimRight","TextSelection$getRange","TextSelection$getState","createStateObject","TextSelection$$createStateObject","_getSelectionPointState","TextSelection$$createFromState","_selectionNodeFromState","pointState","TextSelection$$createFromRange","endRange","cloneRange","TextSelection$$getNormalizedRange","newRange","TextSelection$$getDirection","TextSelection$startElement","TextSelection$endElement","TextSelection$containingElement","TextSelection$startComponent","TextSelection$endComponent","TextSelection$containingComponent","startElement","endElement","startComponent","endComponent","containingComponent","eachContainedComponent","getRange","getNormalizedRange","getDirection","createFromRange","../../components/c_class","../dom",91,"keyPrefix","sessionOnly","_storage","sessionStorage","localStorage","_typeSuffix","_keys","DOMStorage$set","setItem","DomStorageError","DOMStorage$get","deepForEach","getItem","DOMStorage$remove","DOMStorage$hasItem","pKey","_storageKey","DOMStorage$getItem","_getKeyDataType","valueStr","_parseData","DOMStorage$setItem","_setKeyDataType","_serializeData","cfg","_domStorage","DOMStorage$removeItem","_removeKeyDataType","DOMStorage$getAllKeys","storedKeys","keysInStorage","hasItem","DOMStorage$getAllItems","getAllKeys","DOMStorage$_storageKey","DOMStorage$_domStorageKey","storageKey","unPrefix","_dataTypeKey","_getValueType","valueType","valuesDataTypes","serializer","dataSerializers","parser","dataParsers","DOMStorage$$registerDataType","storeAsDataType","DOMStorage$createMessenger","storageMessageSource","StorageMessageSource","_messageSource","DOMStorage$destroy","_storedKeys","true","false","_domStorageKey","getAllItems","createMessenger","_sessionStorage","_localStorage","local","session","valStr","boolean","number","toFunction","RegExp","toRegExp","./model","./msg_src",92,"Model$$registerWithDOMStorage","Model_domStorageSerializer","Model_domStorageParser","registerWithDOMStorage",93,"StorageMessageSource$addSourceSubscriber","StorageMessageSource$removeSourceSubscriber","StorageMessageSource$postMessage","StorageMessageSource$trigger","storageArea",94,"uniqueCount","newTimestamp","now","uniqueID","timestamp",95,"wsMessenger","wsMsgSource","WSMessageSource","connect","WSMsgAPI","./msg_api",96,"SOCKET_MESSAGES",97,"WSMessageSource$connect","_options","host","location","port","_ws","onopen","ws","onmessage","onclose","onerror","WebSocket","_wsSubscriberMethod","WSMessageSource$handleEvent","WSMessageSource$trigger","onTimeout","toggleRpcSubscription","callbackCorrId","onResponse","interval","corrId",98,"Encoder","skip","bits","output","readByte","byte","alphabet","finish","Decoder","readChar","char","fromCharCode","val","lookup","encoder","decoder","alias","table","flush",99,100,"_createProxyMethods","proxyMethodName","mixinMethodName","boundMethod","Mixin_setInstanceKey","hostClass","instanceKey","mixin","instancePropertiesMap","instanceKeys","Mixin_addMethod","hostMethodName","wrappedMethod","_wrapMixinMethod","mixinInstance","_getMixinInstance","mixinProp","Mixin$$useWith","mixinMethods","../util/check","mol-proto",101,"MessengerRegexpAPI","./abstract/mixin","./messenger/m_api","./messenger/m_api_rx","./messenger/m_source","./messenger/msngr_source",102,"deepExtend","debug",103,"_initializeSubscribers","_messageSubscribers","_patternMessageSubscribers","Messenger$destroy","Messenger$on","_Messenger_onWithOptions","Messenger$once","dispatchTimes","Messenger$onceSync","sync","Messenger$onSync","Messenger$onAsync","_Messenger_on","_eachMessage","messagesSplitRegExp","subscribersHash","_chooseSubscribersHash","changed","subscriptionChanged","_registerSubscriber","pattern","onSubscriberAdded","noSubscribers","msgSubscribers","notYetRegistered","_indexOfSubscriber","subscr","Messenger$off","_Messenger_off","_removeSubscriber","subscriberIndex","_removeAllSubscribers","onSubscriberRemoved","offMessages","subscriberRemovedMap","Messenger$offAll","_offAllSubscribers","subscribers","_synchronous","_callSubscribers","_callPatternSubscribers","calledMsgSubscribers","patternSubscribers","_callSubscriber","syncSubscriber","synchro","__messages","_setTimeout","useSetTimeout","setTimeoutFunc","getSubscribers","includePatternSubscribers","onceSync","onAsync","onMessage","offMessage","subscriptions","../abstract/mixin","./m_source",104,"MessengerAPI$destroy","addInternalMessage","internalMsgs","_internalMessages","removeInternalMessage","unexpectedNotificationWarning","messageIndex","getInternalMessages","sourceData","../util/logger",105,"_patternInternalMessages","_catchAllSubscribed","noPatternInternalMessages","internalMessages","internalMessagesHash","patternMessages","sourcePattern","./m_api",106,"messengerAPI","_prepareMessengerAPI","MessageSource$destroy","setMessenger","newSourceMessage","removedSourceMessage","api","shouldDispatch",107,"sourceMessenger","MessengerMessageSource$postMessage",108,"./messenger","./minder",109,"ds1","mode","ds2","connDescriptions","connectors","descr","Connector","_addConnector","cnct","___minder_id","_connectors","onConnectorMessage","connector","_receivedMessages","_isPropagating","_idleCheck","minder_isPropagating","minder_whenPropagationCompleted","executeCallback","minder_getConnectors","isOn","minder_destroyConnector","minder_getExpandedConnections","searchStr","getConnectors","connections","connection","leftSource","_getExpandedSource","rightSource","cnctn","_sourceMatchesString","ds","source","_model","_accessPath","unshift","matchStr","some","srcNode","_stringMatch","substr","minder_destroy","destroyDS","getExpandedConnections","isPropagating","whenPropagationCompleted","./model/connector","./util/logger",110,"flag","__inChangeTransaction","passTransactionFlag","fromFunc","toFunc","processChanges","notify","processTransaction","prepareTransaction","validateTransaction","changeFinished","sameSource","checkChange","checkSplice","checkMethod","parentPathChanged","pathsToChange","parentPath","_pathIsParentOf","todo","exitLoop","pathsToSplice","hadSplice","parentPathSpliced","every","processChange","executeSplice","executeMethod","howMany","CHANGE_TYPE_TO_METHOD_MAP","deleted","./path_utils",111,"setupMode","_changesQueue1","_changesQueue2","pathTranslation","patternTranslation","getPatternTranslations","pathTranslation1","reverseTranslationRules","pathTranslation2","patternTranslation1","reversePatternTranslationRules","patternTranslation2","dataTranslation","dataTranslation1","dataTranslation2","dataValidation1","dataValidation2","turnOn","modeParseError","parsedMode","modePattern","depth1","depth2","Connector$changeMode","turnOff","Connector$deferChangeMode","rules","reverseRules","path2_value","path1_key","_throwInvalidTranslation","_getStaticPath","starIndex","starIndex1","starIndex2","fromPattern","createRegexPath","fromStaticPath","toPattern","toStaticPath","pt","Connector$turnOn","linkDataSource","reverseLink","fromDS","toDS","changesQueue","onData","batch","translatePath","sourcePath","translatedPath","pTranslation","subscriptionPattern","translateData","translate","validateData","callValidator","validator","alreadyFailed","valid","passedCount","validators","propagateData","sendData","postChangeData","subscriptionSwitch","mergeTransactions","batches","targetPath","subscriptionPath","_subscriptionPath","_link1","_link2","Connector$turnOff","unlinkDataSource","linkName","Connector$destroy","changeMode","../messenger",112,"Model$path","__proto__","reactive","_prepareMessengers","Model$get","ModelPath","proxyMessenger","modelHostObject","Model$$useWith","modelMethodsToProxy","internalMessenger","internalMessengerSource","ModelMsgAPI","externalMessenger","_getHostObject","Model$destroy","_internalMessenger","synthesize","modelMethods","../messenger/msngr_source","./change_data","./m_msg_api","./m_path","./model_utils","./synthesize",113,"../messenger/m_api_rx",114,"ModelPath$path","_args","interpolateAccessPath","_prepareMessenger","freeze","reduce","accessPathStr","currNode","thisPathArgsCount","newPath","ModelPath$len","ModelPath$push","newLength","ModelPath$pop","ModelPath$unshift","ModelPath$shift","mPathAPI","ModelPathMsgAPI","modelMessageSource","mPathMessenger","_getDefinition","_createFromDefinition","definition","ModelPath$destroy","pop","./path_msg_api",115,116,"rootPath","internalChanges","truncateChangePath","fullPath","../messenger/m_api",117,"nodeParsePattern","pathParsePattern","unparsed","nodeStr","pathNodeTypes","patternPathParsePattern","regexStr","patternsStarted","regex","nodeRegex","interpolated","startIndex","methodsNames","wrappedMethods","origMethod","regexPath","propertyPathSyntax","arrayPathSyntax","interpolationSyntax","propertyInterpolateSyntax","arrayInterpolateSyntax","propertyStarSyntax","arrayStarSyntax","starSyntax","pathParseSyntax","patternPathParseSyntax",".","[","*",".*","[*]",118,"_synthesizePathMethods","synthesizers","synthszr","_synthesize","synthesizer","addChangeMessage","messagesHash","addTreeChangesMessages","oldIsTree","valueIsTree","newIsTree","addMessages","valueProp","_addMessages","addMessage","existingMsg","cloneTree","valueIsNormalObject","protectValue","addBatchIdsToMessage","batchId","msgId","__batch_id","__msg_id","methodCode","eval","ModelError","fs","templates","include_defines","include_create_tree","include_traverse_tree","dotDef","modelAccessPrefix","modelPostMessageCode","modelPostBatchCode","modelDotDef","dotSettings","templateSettings","strip","tmpl","modelSynthesizers","synthesizePathMethods","memoize","../../util/logger","../change_data","../model_utils","../path_utils","dot",119,"choices","Where","condition","Superclass","matchSuperclassToo","matchSuperclass","checkSubtree","typeofChecks","_jsKeywords","valueElement","_prependPath","unknownKeysAllowed","keyPattern","emptyHash","requiredPatterns","optionalPatterns","subPattern","subValue","base","TypeError",120,"./check","./logger",121,"Logger","level","./logger_class",122,"maxLevelLength","colored","color","levels","colors","DEFAULT_OPTIONS","throwLevel","enabled","logPrefix","log","console","logPrefixColor",123,"resolveDefs","c","block","def","define","code","assign","substring","defineParams","param","v","arg","use","useParams","d","rw","__exp","unescape","_globals","version","evaluate","conditional","iterate","varname","selfcontained","doNotSkipEncoded","encodeHTMLSource","encodeHTMLRules","&","<",">","\"","'","/","matchHTML","amd","startend","startencode","needhtmlencode","indv","cse","sid","elsecase","vname","iname","_encodeHTML",124,"InstallDots","__path","__destination","destination","__global","__rendermodule","rendermodule","__settings","__includes","addexports","ret","readdata","readFileSync","process","compileAll","compileToFile","modulename","lastIndexOf","defs","settings","compileoptions","defaultcompiled","compiled","writeFileSync","compilePath","k","defFolder","sources","readdirSync","./doT",125,"Proto","wrapped","unwrapProto","utils","prototypeMethods","objectMethods","arrayMethods","functionMethods","stringMethods","numberMethods","utilMethods","__","_constants","protoFuncs","makeProtoFunction","protoInstanceMethods","makeProtoInstanceMethod","underscore","./proto_array","./proto_function","./proto_number","./proto_object","./proto_prototype","./proto_string","./proto_util","./utils",126,"arrayToAppend","prependArray","arrayToPrepend","values","valuesIsArray","unique","itemIndex","filtered","it","itemIndexOf","_deepForEach","nativeArrayMethodsNames","nativeArrayMethods","makeFindMethod",127,"arg1","arg2","funcBody","partialRight","hashFunc","limit","cache","keysList","wait","_delay","deferTicks","ticks","deferFunc","delayMethod","funcOrMethodName","_delayMethod","delayed","passArgs","deferred","debounce","immediate","later","last","callNow","previous","leading","remaining","trailing","memo","ran","waitFor","maxTimeout","timedOutFunc","checkInterval","testCondition","setInterval","not",128,"isNumeric","parseFloat","isFinite",129,"onlyEnumerable","descriptors","getOwnPropertyDescriptor","clonedObject","propertyName","decriptorFlags","_getDescriptor","descriptor","constants","ENUMERABLE","configurable","CONFIGURABLE","writable","WRITABLE","propertyValues","preserveStructure","_extendTree","selfNode","objNode","objTraversed","loop","hasProp","isSelfObj","isNormalObject","isValueObj","allKeys","getOwnPropertyNames","keyOf","searchElement","allKeysOf","mapProperty","reduceKeys","initialValue","filterProperty","testProperty","_passed","everyKey","_didNotPass","pickKeys","ArrayProto","multiline","ignoreCase","isNot","findValue","findKey",130,"propDescriptors","applyConstructor","thisClass","subclass","constructorCode",131,"toUpperCase","rx","regexpStringPattern","getTime","toQueryString","qs","encodeURIComponent","fromQueryString","pairs","results","decodeURIComponent","pair","splitPair","hashCode","hash","format","formatRegexp",132,"times","tap","identity","compareProperty","b",133,"someMethod","findWhat","argIndex","testItem","foundValueOrIndex"],"mappings":"CAAC,QAAUA,GAAEC,EAAEC,EAAEC,GAAG,QAASC,GAAEC,EAAEC,GAAG,IAAIJ,EAAEG,GAAG,CAAC,IAAIJ,EAAEI,GAAG,CAAC,GAAIE,GAAkB,kBAATC,UAAqBA,OAAQ,KAAIF,GAAGC,EAAE,MAAOA,GAAEF,GAAE,EAAI,IAAGI,EAAE,MAAOA,GAAEJ,GAAE,EAAI,MAAM,IAAIK,OAAM,uBAAuBL,EAAE,KAAK,GAAIM,GAAET,EAAEG,IAAIO,WAAYX,GAAEI,GAAG,GAAGQ,KAAKF,EAAEC,QAAQ,SAASZ,GAAG,GAAIE,GAAED,EAAEI,GAAG,GAAGL,EAAG,OAAOI,GAAEF,EAAEA,EAAEF,IAAIW,EAAEA,EAAEC,QAAQZ,EAAEC,EAAEC,EAAEC,GAAG,MAAOD,GAAEG,GAAGO,QAAkD,IAAI,GAA1CH,GAAkB,kBAATD,UAAqBA,QAAgBH,EAAE,EAAEA,EAAEF,EAAEW,OAAOT,IAAID,EAAED,EAAEE,GAAI,OAAOD,KAAKW,GAAG,SAASP,EAAQQ,EAAOJ,GACtb,YAeA,SAASK,GAAMC,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,EACVkyE,gBAAiBA,EACjB9jD,KAAMA,QA+GJgkD,KAAK,SAASvgG,EAAQQ,EAAOJ,GACnC,YASA,SAASo3F,GAAwBp8E,GAC7B,MAAO,YAEH,MADAxa,MAAK4kB,KAAOpK,EAAOla,MAAMN,KAAK4kB,KAAMrkB,WAC7BP,MAKf,QAAS02F,GAAkBl8E,GACvB,MAAO,YAGH,MAAOA,GAAO/a,KAAKa,MAAMka,EAAQja,YAczC,QAAS63F,GAAewH,EAAYC,GAChC,GAAIC,GAAuB,SAAZD,EAAsB,EAAI,CAEzC,OAAO,UAA0B3iF,EAAU/O,EAAS6sF,GAShD,QAAS+E,GAAS1+F,EAAO+oB,EAAOxF,GAC5B,GAAIvL,GAAO6D,EAASzd,KAAKO,KAAMqB,EAAO+oB,EAAOxF,EAC7C,OAAIvL,IACA2mF,EAAoBz/F,UAAUu/F,GACvBzmF,GAFX,OAVJ,GAAI2mF,GACA3uE,EAAQuuE,EAAWngG,KAAKO,KAAM+/F,EAAU5xF,EAAS6sF,EACrD,OAAI3pE,GACO2uE,EAEFF,GAAYF,GAAchrF,MAAMxS,UAAUm7E,KACxC,GADN,QA1CD39E,EAAOJ,SACfo3F,wBAAyBA,EACzBF,kBAAmBA,EACnB0B,eAAgBA,GAqBP,GAAI94F,iBA+BN","sourceRoot":"/"} \ No newline at end of file diff --git a/package.json b/package.json index 4136d45..2c95c89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "milojs", - "version": "0.2.7", + "version": "0.2.8", "description": "Browser/nodejs reactive programming and data driven DOM manipulation with modular components.", "keywords": [ "framework",