From c7a682b3cd1e7f31ff2bc9508794279a89def753 Mon Sep 17 00:00:00 2001 From: Jason Green Date: Wed, 26 Aug 2015 12:51:56 +0100 Subject: [PATCH] isDestroyed now returns boolean always --- dist/milo.bundle.js | 11 +- dist/milo.bundle.map | 224 +++++++++++++++++++------------------- dist/milo.min.js | 14 ++- dist/milo.min.js.map | 2 +- lib/components/c_class.js | 2 +- 5 files changed, 128 insertions(+), 125 deletions(-) diff --git a/dist/milo.bundle.js b/dist/milo.bundle.js index 4858726..6b9fe0c 100644 --- a/dist/milo.bundle.js +++ b/dist/milo.bundle.js @@ -2439,7 +2439,7 @@ function Component$destroy(quiet) { * @return {Boolean} */ function Component$isDestroyed() { - return this._destroyed; + return !!this._destroyed; } },{"../abstract/faceted_object":2,"../attributes/a_bind":4,"../binder":8,"../config":42,"../util/component_name":53,"../util/dom":57,"../util/storage":67,"./c_facets/cf_registry":31,"./c_utils":34,"./scope":41,"milo-core":84}],16:[function(require,module,exports){ @@ -7223,6 +7223,7 @@ function createFacetClass(config) { check(config, { className: String, superClassName: Match.Optional(String), + require: Match.Optional(Array), methods: Match.Optional(Match.ObjectHash(Function)) }); @@ -7230,6 +7231,7 @@ function createFacetClass(config) { var FacetClass = _.createSubclass(SuperClass, config.className); if (config.methods) _.extendProto(FacetClass, config.methods); + if (config.require) FacetClass.require = config.require; FacetClass.super = SuperClass.prototype; facetRegistry.add(FacetClass); @@ -16486,7 +16488,7 @@ var formatRegexp = /\$[0-9]+|\$\$/g; function format() { // , ... arguments var str = this; var args = arguments; - return str.replace(formatRegexp, function(item) { + return str.replace(formatRegexp, function (item) { if (item == '$$') return '$'; item = item.slice(1); return args[item - 1]; @@ -16684,6 +16686,5 @@ function makeFindMethod(someMethod, findWhat) { } },{}]},{},[44]) - -; -//# sourceMappingURL=milo.bundle.map \ No newline at end of file +//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9qYXNvbmlhbmdyZWVu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ID0gbmV3IFNjb3BlKHNjYW5TY29wZS5fcm9vdEVsLCBob3N0T2JqZWN0KVxuICAgICAgICAsIGFkZE1ldGhvZCA9IHRocm93T25FcnJvcnMgPT09IGZhbHNlID8gJ19zYWZlQWRkJyA6ICdfYWRkJztcblxuICAgIHNjYW5TY29wZS5fZWFjaChmdW5jdGlvbihjb21wSW5mbykge1xuICAgICAgICAvLyBzZXQgY29ycmVjdCBjb21wb25lbnQncyBzY29wZVxuICAgICAgICB2YXIgaW5mbyA9IF8uY2xvbmUoY29tcEluZm8pXG4gICAgICAgIGluZm8uc2NvcGUgPSBzY29wZTtcblxuICAgICAgICAvLyBjcmVhdGUgY29tcG9uZW50XG4gICAgICAgIHZhciBhQ29tcG9uZW50ID0gQ29tcG9uZW50LmNyZWF0ZShpbmZvLCB0aHJvd09uRXJyb3JzKTtcblxuICAgICAgICBzY29wZVthZGRNZXRob2RdKGFDb21wb25lbnQsIGFDb21wb25lbnQubmFtZSk7XG4gICAgICAgIGlmIChhQ29tcG9uZW50LmNvbnRhaW5lcilcbiAgICAgICAgICAgIGFDb21wb25lbnQuY29udGFpbmVyLnNjb3BlID0gY3JlYXRlKGNvbXBJbmZvLmNvbnRhaW5lci5zY29wZSwgYUNvbXBvbmVudC5jb250YWluZXIsIHRocm93T25FcnJvcnMpO1xuICAgIH0pO1xuXG4gICAgcmV0dXJuIHNjb3BlO1xufVxuXG4vKipcbiAqIGBjcmVhdGVCaW5kZXJTY29wZWBcbiAqIEBwYXJhbSAge0VsZW1lbnR9IHNjb3BlRWwgICAgICAgICAgICAgc2NvcGVFbCByb290IGVsZW1lbnQgaW5zaWRlIHdoaWNoIERPTSB3aWxsIGJlIHNjYW5uZWQgYW5kIGJvdW5kIChkb2N1bWVudC5ib2R5IGJ5IGRlZmF1bHQpLlxuICogQHBhcmFtICB7RnVuY3Rpb259IHNjb3BlT2JqZWN0RmFjdG9yeSBTZWUgW2JpbmRlcl0oI21pbG8uYmluZGVyKVxuICogQHBhcmFtICB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ICAgICAgc3Vic2NyaWJlcjogc3Vic2NyaWJlci5zdWJzY3JpYmVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dDogdGhpc1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHN1YnNjcmliZXIuY29udGV4dCA9PSAnb3duZXInKVxuICAgICAgICAgICAgICAgICAgICBzdWJzY3JpYmVyID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3Vic2NyaWJlcjogc3Vic2NyaWJlci5zdWJzY3JpYmVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGV4dDogdGhpcy5vd25lclxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1bmtub3duIHN1YnNjcmliZXIgY29udGV4dCBpbiBjb25maWd1cmF0aW9uOiAnICsgc3Vic2NyaWJlci5jb250ZXh0KTtcblxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLm9uKG1lc3NhZ2VzLCBzdWJzY3JpYmVyKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCd1bmtub3duIHN1YnNjcmliZXIgY29udGV4dCB0eXBlIGluIGNvbmZpZ3VyYXRpb246ICcgKyBjb250ZXh0VHlwZSk7XG4gICAgICAgIH1cblxuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ3Vua25vd24gc3Vic2NyaWJlciB0eXBlIGluIGNvbmZpZ3VyYXRpb246ICcgKyBzdWJzY3JpYmVyVHlwZSk7XG4gICAgfSwgdGhpcyk7XG5cbiAgICByZXR1cm4gbm90WWV0UmVnaXN0ZXJlZE1hcDtcbn1cblxuXG4vLyBjaGVja0RlcGVuZGVuY2llc1xuZnVuY3Rpb24gQ29tcG9uZW50RmFjZXQkY2hlY2soKSB7XG4gICAgaWYgKHRoaXMucmVxdWlyZSkge1xuIC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FnKERhdGEkX3NldCk7XG5cbiAgICB2YXIgdmFsdWVTZXQ7XG4gICAgaWYgKHZhbHVlICE9IG51bGwgJiYgdHlwZW9mIHZhbHVlID09ICdvYmplY3QnKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgdmFsdWVTZXQgPSBbXTtcblxuICAgICAgICAgICAgdmFyIGxpc3RGYWNldCA9IHRoaXMub3duZXIubGlzdDtcbiAgICAgICAgICAgIGlmIChsaXN0RmFjZXQpe1xuICAgICAgICAgICAgICAgIHZhciBsaXN0TGVuZ3RoID0gbGlzdEZhY2V0LmNvdW50KClcbiAgICAgICAgICAgICAgICAgICAgLCBuZXdJdGVtc0NvdW50ID0gdmFsdWUubGVuZ3RoIC0gbGlzdExlbmd0aDtcbiAgICAgICAgICAgICAgICBpZiAobmV3SXRlbXNDb3VudCA+PSAzKSB7XG4gICAgICAgICAgICAgICAgICAgIGxpc3RGYWNldC5fYWRkSXRlbXMobmV3SXRlbXNDb3VudCk7XG4gICAgICAgICAgICAgICAgICAgIGxpc3RGYWNldC5fdXBkYXRlRGF0YVBhdGhzKGxpc3RMZW5ndGgsIGxpc3RGYWNldC5jb3VudCgpKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB2YWx1ZS5mb3JFYWNoKGZ1bmN0aW9uKGNoaWxkVmFsdWUsIGluZGV4KSB7XG4gICAgICAgICAgICAgICAgICAgIHNldENoaWxkRGF0YS5jYWxsKHRoaXMsIHZhbHVlU2V0LCBjaGlsZFZhbHVlLCBpbmRleCwgJ1skJF0nKTtcbiAgICAgICAgICAgICAgICB9LCB0aGlzKTtcblxuICAgICAgICAgICAgICAgIHZhciBsaXN0Q291bnQgPSBsaXN0RmFjZXQuY291bnQoKVxuICAgICAgICAgICAgICAgICAgICAsIHJlbW92ZUNvdW50ID0gbGlzdENvdW50IC0gdmFsdWUubGVuZ3RoO1xuXG4gICAgICAgICAgICAgICAgd2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rKSB0aHJvdyBlO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzLl9nZXQoZGVlcEdldCk7XG59XG5cbmZ1bmN0aW9uIERhdGEkX2dldChkZWVwR2V0KSB7XG4gICAgaWYgKGRlZXBHZXQgPT09IGZhbHNlKSAvLyBhIGhhY2sgdG8gZW5hYmxlIGdldHRpbmcgc2hhbGxvdyBzdGF0ZVxuICAgICAgICByZXR1cm47XG5cbiAgICB2YXIgY29tcCA9IHRoaXMub3duZXJcbiAgICAgICAgLCBzY29wZURhdGE7XG5cbiAgICBpZiAoY29tcC5saXN0KSB7XG4gICAgICAgIHNjb3BlRGF0YSA9IFtdO1xuICAgICAgICBjb21wLmxpc3QuZWFjaChmdW5jdGlvbihsaXN0SXRlbSwgaW5kZXgpIHtcbiAgICAgICAgICAgIHNjb3BlRGF0YVtpbmRleF0gPSBsaXN0SXRlbS5kYXRhLmdldCgpO1xuICAgICAgICB9KTtcblxuICAgICAgICBpZiAoY29tcC5jb250YWluZXIpXG4gICAgICAgICAgICBjb21wLmNvbnRhaW5lci5zY29wZS5fZWFjaChmdW5jdGlvbihzY29wZUl0ZW0sIG5hbWUpIHtcbiAgICAgICAgICAgICAgICBpZiAoISBjb21wLmxpc3QuY29udGFpbnMoc2NvcGVJdGVtKSAmJiBzY29wZUl0ZW0uZGF0YSlcbiAgICAgICAgICAgICAgICAgICAgc2NvcGVEYXRhW25hbWVdID0gc2NvcGVJdGVtLmRhdGEuZ2V0KCk7XG4gICAgICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKGNvbXAuY29udGFpbmVyKSB7XG4gICAgICAgIHNjb3BlRGF0YSA9IHt9O1xuICAgICAgICBjb21wLmNvbnRhaW5lci5zY29wZS5fZWFjaChmdW5jdGlvbihzY29wZUl0ZW0sIG5hbWUpIHtcbiAgICAgICAgICAgIGlmIChzY29wZUl0ZW0uZGF0YSlcbiAgICAgICAgICAgICAgICBzY29wZURhdGFbbmFtZV0gPSBzY29wZUl0ZW0uZGF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XRpb24gKHNlZSBhYm92ZSlcbiAqIFxuICogQHBhcmFtIHtEcmFnRHJvcH0gZHRcbiAqIEByZXR1cm4ge0Jvb2xlYW59XG4gKi9cbmZ1bmN0aW9uIF9pc0Ryb3BBbGxvd2VkKGR0LCBvcmlnaW5hbERyb3BDb21wb25lbnQpIHtcbiAgICB2YXIgYWxsb3cgPSB0aGlzLmNvbmZpZy5hbGxvdztcblxuICAgIGlmIChkdC5pc0NvbXBvbmVudCgpKSB7XG4gICAgICAgIHZhciBhbGxvd0NvbXBzID0gYWxsb3cgJiYgYWxsb3cuY29tcG9uZW50c1xuICAgICAgICAgICAgLCBtZXRhID0gZHQuZ2V0Q29tcG9uZW50TWV0YSgpO1xuXG4gICAgICAgIHN3aXRjaCAodHlwZW9mIGFsbG93Q29tcHMpIHtcbiAgICAgICAgICAgIGNhc2UgJ3VuZGVmaW5lZCc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICBjYXNlICdib29sZWFuJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gYWxsb3dDb21wcztcbiAgICAgICAgICAgIC8vIGNvbXBvbmVudCBjbGFzc1xuICAgICAgICAgICAgY2FzZSAnc3RyaW5nJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gbWV0YSAmJiBtZXRhLmNvbXBDbGFzcyA9PSBhbGxvd0NvbXBzO1xuICAgICAgICAgICAgLy8gdGVzdCBmdW5jdGlvblxuICAgICAgICAgICAgY2FzZSAnZnVuY3Rpb24nOlxuICAgICAgICAgICAgICAgIHJldHVybiBhbGxvd0NvbXBzLmNhbGwodGhpcy5vd25lciwgbWV0YSwgZHQsIG9yaWdpbmFsRHJvcENvbXBvbmVudCk7XG4gICAgICAgICAgICBjYXNlICdvYmplY3QnOlxuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGFsbG93Q29tcHMpKVxuICAgICAgICAgICAgICAgICAgICAvLyBsaXN0IG9mIGFsbG93ZWQgY2xhc3Nlc1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWxsb3dDb21wcy5pbmRleE9mKG1ldGEgJiYgbWV0YS5jb21wQ2xhc3MpID49IDA7XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG1hcCBvZiBjbGFzczogYm9vbGVhbnx0ZXN0IGZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgICAgIHZhciB0ZXN0ID0gYWxsb3dDb21wc1ttZXRhICYmIG1ldGEuY29tcENsYXNzXTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICEhIF8ucmVzdWx0KHRlc3QsIHRoaXMub3duZXIsIG1ldGEsIGR0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignSW5jb3JyZWN0IGFsbG93ZWQgY29tcG9uZW50cyBpbiBjb25maWcnKTtcbiAgICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBkYXRhVHlwZXMgPSBhbGxvdyAmJiBhbGxvdy5kYXRhVHlwZXNcbiAgICAgICAgc3dpdGNoICh0eXBlb2YgZGF0YVR5cGVzKSB7XG4gICAgICAgICAgICBjYXNlICd1bmRlZmluZWQnOlxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIGNhc2UgJ3N0cmluZyc6XG4gICAgICAgICAgICAgICAgcmV0dXJuIGR0LnR5cGVzLmluZGV4T2YoZGF0YVR5cGVzKSA+PSAwO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLy8gVE9ETyB0ZXN0IGZvciBvdGhlciBkYXRhIHR5cGVzXG59XG4iLCIndXNlIHN0cmljdCc7XG5cbnZhciBDb21wb25lbnRGYWNldCA9IHJlcXVpcmUoJy4uL2NfZmFjZXQnKVxuICAgICwgZmFjZXRzUmVnaXN0cnkgPSByZXF1aXJlKCcuL2NmX3JlZ2lzdHJ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AwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB0eXBlb2YgaW5kZXggPT0gJ3VuZGVmaW5lZCcgfHwgaW5kZXggPiBsaXN0TGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbGlzdExlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGluZGV4O1xuXG4gICAgICAgIHZhciBwcmV2Q29tcG9uZW50ID0gc3BsaWNlSW5kZXggPT0gMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHRoaXMuaXRlbVNhbXBsZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRoaXMuX2xpc3RJdGVtc1tzcGxpY2VJbmRleCAtIDFdO1xuXG4gICAgICAgIHZhciBmcmFnID0gZG9jdW1lbnQuY3JlYXRlRG9jdW1lbnRGcmFnbWVudCgpXG4gICAgICAgICAgICAsIG5ld0NvbXBvbmVudHMgPSBbXTtcblxuICAgICAgICBjaGlsZHJlbi5mb3JFYWNoKGZ1bmN0aW9uKGVsLCBpKSB7XG4gICAgICAgICAgICB2YXIgY29tcG9uZW50ID0gQ29tcG9uZW50LmdldENvbXBvbmVudChlbCk7XG4gICAgICAgICAgICBpZiAoISBjb21wb25lbnQpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGxvZ2dlci5lcnJvcignTGlzdDogZWxlbWVudCBpbiBuZXcgaXRlbXMgaXMgbm90IGEgY29tcG9uZW50Jyk7XG4gICAgICAgICAgICBuZXdDb21wb25lbnRzLnB1c2goY29tcG9uZW50KTtcbiAgICAgICAgICAgIHRoaXMuX3NldEl0ZW0oc3BsaWNlSW5kZXgrKywgY29tcG9uZW50KTtcbiAgICAgICAgICAgIGZyYWcuYXBwZW5kQ2hpbGQoZWwpO1xuICAgICAgICAgICAgZWwuc3R5bGUuZGlzcGxheSA9ICcnO1xuICAgICAgICB9LCB0aGlzKTtcblxuICAgICAgICBfdXBkYXRlSXRlbXNJbmRleGV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QmluZGVyRXJyb3IodGhyb3dPbkVycm9ycywgJ2NsYXNzICcgKyBDb21wb25lbnRDbGFzcy5uYW1lXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgJyBhbHJlYWR5IGhhcyBmYWNldCAnICsgZmN0TmFtZSk7XG4gICAgICAgICAgICBpZiAoZXh0cmFGYWNldHNDbGFzc2VzW2ZjdE5hbWVdKVxuICAgICAgICAgICAgICAgIHJlcG9ydEJpbmRlckVycm9yKHRocm93T25FcnJvcnMsICdjb21wb25lbnQgJyArIGF0dHIuY29tcE5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAnIGFscmVhZHkgaGFzIGZhY2V0ICcgKyBmY3ROYW1lKTtcbiAgICAgICAgICAgIHZhciBGYWNldENsYXNzID0gZmFjZXRzUmVnaXN0cnkuZ2V0KGZjdE5hbWUpO1xuICAgICAgICAgICAgZXh0cmFGYWNldHNDbGFzc2VzW2ZjdE5hbWVdID0gRmFjZXRDbGFzcztcbiAgICAgICAgfSk7XG5cbiAgICByZXR1cm4gZXh0cmFGYWNldHNDbGFzc2VzO1xufVxuXG5cbmZ1bmN0aW9uIHJlcG9ydEJpbmRlckVycm9yKHRocm93T25FcnJvcnMsIG1lc3NhZ2UpIHtcbiAgICBpZiAodGhyb3dPbkVycm9ycyA9PT0gZmFsc2UpXG4gICAgICAgIGxvZ2dlci5lcnJvcignQ29tcG9uZW50SW5mbyBiaW5kZXIgZXJyb3I6JywgbWVzc2FnZSk7XG4gICAgZWxzZVxuICAgICAgICB0aHJvdyBuZXcgRXJyb3IobWVzc2FnZSk7XG59O1xuXG5cbmZ1bmN0aW9uIGhhc0NvbnRhaW5lckZhY2V0KENvbXBvbmVudENsYXNzLCBleHRyYUZhY2V0c0NsYXNzZXMpIHtcbiAgICByZXR1cm4gKENvbXBvbmVudENsYXNzLmhhc0ZhY2V0KCdjb250YWluZXInKVxuICAgICAgICB8fCAnQ29udGFpbmVyJyBpb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mlnKHtcbiAgICBhdHRyczoge1xuICAgICAgICBiaW5kOiAnbWwtYmluZCcsXG4gICAgICAgIGxvYWQ6ICdtbC1sb2FkJ1xuICAgIH0sXG4gICAgY29tcG9uZW50UmVmOiAnX19fbWlsb19jb21wb25lbnQnLFxuICAgIGNvbXBvbmVudFByZWZpeDogJ21pbG9fJyxcbiAgICB0ZW1wbGF0ZToge1xuICAgICAgICBjb21waWxlOiBkb1QuY29tcGlsZVxuICAgIH0sXG4gICAgZG9tU3RvcmFnZToge1xuICAgICAgICB0eXBlU3VmZml4OiAnOl9fX21pbG9fZGF0YV90eXBlJyxcbiAgICAgICAgcHJlZml4U2VwYXJhdG9yOiAnLycsXG4gICAgICAgIHJvb3Q6ICcnLFxuICAgICAgICBtZXNzYWdlS2V5OiAnX19fbWlsb19tZXNzYWdlLycsXG4gICAgICAgIG1lc3NhZ2VUaW1lc3RhbXA6ICdfX19taWxvX3RpbWVzdGFtcCcsXG4gICAgICAgIHF1b3RhRXhjZWVkZWQ6IHtcbiAgICAgICAgICAgIHRocm93RXJyb3I6IHRydWUsXG4gICAgICAgICAgICBtZXNzYWdlOiBmYWxzZVxuICAgICAgICB9XG4gICAgfSxcbiAgICBkcmFnRHJvcDoge1xuICAgICAgICBkYXRhVHlwZXM6IHtcbiAgICAgICAgICAgIGNvbXBvbmVudDogJ3gtYXBwbGljYXRpb24vbWlsby9jb21wb25lbnQnLFxuICAgICAgICAgICAgY29tcG9uZW50TWV0YVRlbXBsYXRlOiAneC1hcHBsaWNhdGlvbi9taWxvL2NvbXBvbmVudC1tZXRhLyVjbGFzcy8lbmFtZS8lcGFyYW1zJyxcbiAgICAgICAgICAgIGNvbXBvbmVudE1ldGFSZWdleDogL154XFwtYXBwbGljYXRpb25cXC9taWxvXFwvY29tcG9uZW50XFwtbWV0YVxcLyhbYS16MC05XSspXFwvKFthLXowLTldKylcXC8oW2EtejAtOV0qKSQvLFxuICAgICAgICB9XG4gICAgfSxcbiAgICByZXF1ZXN0OiB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XN0SGVhZGVyKGtleSwgdmFsdWUpO1xuICAgICAgICB9KTtcbn1cblxuZnVuY3Rpb24gX29uUmVhZHkocmVxLCBjYWxsYmFjaywgeFByb21pc2UsIGV2ZW50VHlwZSkge1xuICAgIGlmIChyZXEucmVhZHlTdGF0ZSAhPSA0KSByZXR1cm47XG4gICAgaWYgKCFyZXEuc3RhdHVzICYmIGV2ZW50VHlwZSA9PSAncmVhZHlzdGF0ZWNoYW5nZScpIHJldHVybjtcblxuICAgIF8uc3BsaWNlSXRlbShfcGVuZGluZ1JlcXVlc3RzLCByZXEpO1xuXG4gICAgdmFyIGVycm9yO1xuICAgIHRyeSB7XG4gICAgICAgIGlmICggcmVxLnN0YXR1cyA+PSAyMDAgJiYgcmVxLnN0YXR1cyA8IDQwMCApIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcG9zdE1lc3NhZ2UoJ3N1Y2Nlc3MnKTtcbiAgICAgICAgICAgICAgICBjYWxsYmFjayAmJiBjYWxsYmFjayhudWxsLCByZXEucmVzcG9uc2VUZXh0LCByZXEpO1xuICAgICAgICAgICAgfSBjYXRjaChlKSB7IGVycm9yID0gZTsgfVxuICAgICAgICAgICAgeFByb21pc2UucmVzb2x2ZShyZXEucmVzcG9uc2VUZXh0KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHZhciBlcnJvclJlYXNvbiA9IHJlcS5zdGF0dXMgfHwgZXZlbnRUeXBlO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBwb3N0TWVzc2FnZSgnZXJyb3InKTtcbiAgICAgICAgICAgICAgICBwb3N0TWVzc2FnZSgnZXJyb3InICsgZXJyb3JSZWFzb24pO1xuICAgICAgICAgICAgICAgIGNhbGxiYWNrICYmIGNhbGxiYWNrKGVycm9yUmVhc29uLCByZXEucmVzcG9uc2VUZXh0LCByZXEpO1xuICAgICAgICAgICAgfSBjYXRjaChlKSB7IGVycm9yID0g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W5kZWZpbmVkJykge1xuICAgICAgICAgICAgLy8gY2hhcmFjdGVyIGRvZXMgbm90IGV4aXN0IGluIG91ciBsb29rdXAgdGFibGVcbiAgICAgICAgICAgIHJldHVybiAvLyBza2lwIHNpbGVudGx5LiBBbiBhbHRlcm5hdGl2ZSB3b3VsZCBiZTpcbiAgICAgICAgICAgIC8vIHRocm93IEVycm9yKCdDb3VsZCBub3QgZmluZCBjaGFyYWN0ZXIgXCInICsgY2hhciArICdcIiBpbiBsb29rdXAgdGFibGUuJylcbiAgICAgICAgfVxuICAgICAgICB2YWwgPDw9IDMgLy8gbW92ZSB0byB0aGUgaGlnaCBiaXRzXG4gICAgICAgIGJ5dGUgfD0gdmFsID4+PiBza2lwXG4gICAgICAgIHNraXAgKz0gNVxuICAgICAgICBpZiAoc2tpcCA+PSA4KSB7XG4gICAgICAgICAgICAvLyB3ZSBoYXZlIGVub3VnaCB0byBwcmVkdWNlIG91dHB1dFxuICAgICAgICAgICAgdGhpcy5vdXRwdXQgKz0gU3RyaW5nLmZyb21DaGFyQ29kZShieXRlKVxuICAgICAgICAgICAgc2tpcCAtPSA4XG4gICAgICAgICAgICBpZiAoc2tpcCA+IDApIGJ5dGUgPSAodmFsIDw8ICg1IC0gc2tpcCkpICYgMjU1XG4gICAgICAgICAgICBlbHNlIGJ5dGUgPSAwXG4gICAgICAgIH1cblxuICAgIH1cblxuICAgIHRoaXMuZmluaXNoID0gZnVuY3Rpb24oY2hlY2spIHtcbiAgICAgICAgdmFyIG91dHB1dCA9IHRoaXMub3V0cHV0ICsgKHNraXAgPCAwID8gYWxwaGFiZXRbYml0cyA+PiAzXSA6ICcnKSArIChjaGVjayA/ICckJyA6ICcnKVxuICAgICAgICB0aGlzLm91dHB1dCA9ICcnXG4gICAgICAgIHJldHVybiBvdXRwdXRcbiAgICB9XG59XG5cbkRlY29kZXIucHJvdG90eXBlLnVwZGF0ZSA9IGZ1bmN0aW9uKGlucHV0LCBmbHVzaCkge1xuICAgIGZvciAodm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JzSGFzaFttZXNzYWdlXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gW10uY29uY2F0KHN1YnNjcmliZXJzSGFzaFttZXNzYWdlXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFtdO1xuXG4gICAgLy8gcGF0dGVybiBzdWJzY3JpYmVycyBhcmUgaW5jdWRlZCBieSBkZWZhdWx0XG4gICAgaWYgKGluY2x1ZGVQYXR0ZXJuU3Vic2NyaWJlcnMgIT09IGZhbHNlICYmIHR5cGVvZiBtZXNzYWdlID09ICdzdHJpbmcnKSB7XG4gICAgICAgIF8uZWFjaEtleSh0aGlzLl9wYXR0ZXJuTWVzc2FnZVN1YnNjcmliZXJzLFxuICAgICAgICAgICAgZnVuY3Rpb24ocGF0dGVyblN1YnNjcmliZXJzKSB7XG4gICAgICAgICAgICAgICAgdmFyIHBhdHRlcm4gPSBwYXR0ZXJuU3Vic2NyaWJlcnMucGF0dGVybjtcbiAgICAgICAgICAgICAgICBpZiAocGF0dGVyblN1YnNjcmliZXJzICYmIHBhdHRlcm5TdWJzY3JpYmVycy5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICYmIHBhdHRlcm4udGVzdChtZXNzYWdlKSlcbiAgICAgICAgICAgICAgICAgICAgXy5hcHBlbmRBcnJheShtc2dTdWJzY3JpYmVycywgcGF0dGVyblN1YnNjcmliZXJzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICAvLyByZXR1cm4gdW5kZWZpbmVkIGlmIHRoZXJlIGFyZSBubyBzdWJzY3JpYmVyc1xuICAgIHJldHVybiBtc2dTdWJzY3JpYmVycy5sZW5ndGhcbiAgICAgICAgICAgICAgICA/IG1zZ1N1YnNjcmliZXJzXG4gICAgICAgICAgICAgICAgOiB1bmRlZmluZWQ7XG59XG5cblxuLyoqXG4gKiBcIlByaXZhdGVcIiBNZXNzZW5nZXIgaW5zdGFuY2UgbWV0aG9kXG4gKiBSZXR1cm5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9cbmZ1bmN0aW9uIHJlbW92ZUludGVybmFsTWVzc2FnZShtZXNzYWdlKSB7XG4gICAgdmFyIHNvdXJjZU1lc3NhZ2UgPSB0aGlzLnRyYW5zbGF0ZVRvU291cmNlTWVzc2FnZShtZXNzYWdlKTtcblxuICAgIGlmICh0eXBlb2Ygc291cmNlTWVzc2FnZSA9PSAndW5kZWZpbmVkJykgcmV0dXJuO1xuXG4gICAgdmFyIGludGVybmFsTXNncyA9IHRoaXMuX2ludGVybmFsTWVzc2FnZXNbc291cmNlTWVzc2FnZV07XG5cbiAgICBpZiAoaW50ZXJuYWxNc2dzICYmIGludGVybmFsTXNncy5sZW5ndGgpIHtcbiAgICAgICAgdmFyIG1lc3NhZ2VJbmRleCA9IGludGVybmFsTXNncy5pbmRleE9mKG1lc3NhZ2UpO1xuICAgICAgICBpZiAobWVzc2FnZUluZGV4ID49IDApIHtcbiAgICAgICAgICAgIGludGVybmFsTXNncy5zcGxpY2UobWVzc2FnZUluZGV4LCAxKTtcbiAgICAgICAgICAgIGlmIChpbnRlcm5hbE1zZ3MubGVuZ3RoID09IDApIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5faW50ZXJuYWxNZXNzYWdlc1tzb3VyY2VNZXNzYWdlXTtcbiAgICAgICAgICAgICAgICByZXR1cm4gc291cmNlTWVzc2FnZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICB1bmV4cGVjdGVkTm90aWZpY2F0aW9uV2FybmluZygpO1xuICAgIH0gZWxzZVxuICAgICAgICB1bmV4cGVjdGVkTm90aWZpY2F0aW9uV2FybmluZygpO1xuXG5cbiAgICBmdW5jdGlvbiB1bmV4cGVjdGVkTm90aWZpY2F0aW9uV2FybmluZygpIHtcbiAgICAgICAgcmVxdWlyZSgnLi4vdXRpbC9sb2dnZXInKS53YXJuKCdub3RpZmljYXRpb24gcmVjZWl2ZWQ6IHVuLXN1YnNjcmliZSBmcm9tIGludGVybmFsIG1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4gICAgICAgICAgICAgICAgcGF0aFRyYW5zbGF0aW9uMTogcmV2ZXJzZVRyYW5zbGF0aW9uUnVsZXMocGF0aFRyYW5zbGF0aW9uKSxcbiAgICAgICAgICAgICAgICBwYXRoVHJhbnNsYXRpb24yOiBwYXRoVHJhbnNsYXRpb24sXG4gICAgICAgICAgICAgICAgcGF0dGVyblRyYW5zbGF0aW9uMTogcmV2ZXJzZVBhdHRlcm5UcmFuc2xhdGlvblJ1bGVzKHBhdHRlcm5UcmFuc2xhdGlvbiksXG4gICAgICAgICAgICAgICAgcGF0dGVyblRyYW5zbGF0aW9uMjogcGF0dGVyblRyYW5zbGF0aW9uXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBkYXRhVHJhbnNsYXRpb24gPSBvcHRpb25zLmRhdGFUcmFuc2xhdGlvbjtcbiAgICAgICAgaWYgKGRhdGFUcmFuc2xhdGlvbikge1xuICAgICAgICAgICAgXy5leHRlbmQodGhpcywge1xuICAgICAgICAgICAgICAgIGRhdGFUcmFuc2xhdGlvbjE6IGRhdGFUcmFuc2xhdGlvblsnPC0nXSxcbiAgICAgICAgICAgICAgICBkYXRhVHJhbnNsYXRpb24yOiBkYXRhVHJhbnNsYXRpb25bJy0+J11cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGRhdGFWYWxpZGF0aW9uID0gb3B0aW9ucy5kYXRhVmFsaWRhdGlvbjtcbiAgICAgICAgaWYgKGRhdGFWYWxpZGF0aW9uKSB7XG4gICAgICAgICAgICBfLmV4dGVuZCh0aGlzLCB7XG4gICAgICAgICAgICAgICAgZGF0YVZhbGlkYXRpb24xOiBkYXRhVmFsaWRhdGlvblsnPC0nXSxcbiAgICAgICAgICAgICAgICBkYXRhVmFsaWRhdGlvbjI6IGRhdGFWYWxpZGF0aW9uWyctPiddXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMudHVybk9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2gudHJhbnNhY3Rpb25cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYmF0Y2guY2hhbmdlcy5mb3JFYWNoKGZ1bmN0aW9uKGNoYW5nZSkge1xuICAgICAgICAgICAgICAgIHZhciBzb3VyY2VQYXRoID0gY2hhbmdlLnBhdGhcbiAgICAgICAgICAgICAgICAgICAgLCB0YXJnZXRQYXRoID0gdHJhbnNsYXRlUGF0aChzb3VyY2VQYXRoKTtcblxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdGFyZ2V0UGF0aCA9PSAndW5kZWZpbmVkJykgcmV0dXJuO1xuXG4gICAgICAgICAgICAgICAgdmFyIGNoYW5nZSA9IF8uY2xvbmUoY2hhbmdlKTtcbiAgICAgICAgICAgICAgICBfLmV4dGVuZChjaGFuZ2UsIHtcbiAgICAgICAgICAgICAgICAgICAgc291cmNlOiBmcm9tRFMsXG4gICAgICAgICAgICAgICAgICAgIHBhdGg6IHRhcmdldFBhdGhcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIHRyYW5zbGF0ZURhdGEoc291cmNlUGF0aCwgY2hhbmdlKTtcbiAgICAgICAgICAgICAgICB2YWxpZGF0ZURhdGEoc291cmNlUGF0aCwgY2hhbmdlKTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBpZiAoISBjaGFuZ2VzUXVldWUubGVuZ3RoKVxuICAgICAgICAgICAgICAgIF8uZGVmZXIocG9zdENoYW5nZURhdGEpO1xuXG4gICAgICAgICAgICBjaGFuZ2VzUXVldWUucHVzaChzZW5kRGF0YSk7XG5cblxuICAgICAgICAgICAgZnVuY3Rpb24gdHJhbnNsYXRlUGF0aChzb3VyY2VQYXRoKSB7XG4gICAgICAgICAgICAgICAgaWYgKHBhdGhUcmFuc2xhdGlvbikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdHJhbnNsYXRlZFBhdGggPSBwYXRoVHJhbnNsYXRpb25bc291cmNlUGF0aF07XG4gICAgICAgICAgICAgICAgICAgIGlmICh0cmFuc2xhdGVkUGF0aCkgcmV0dXJuIHRyYW5zbGF0ZWRQYXRoO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXBhdHRlcm5UcmFuc2xhdGlvbi5sZW5ndGgpIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHB0ID0gXy5maW5kKHBhdHRlcm5UcmFuc2xhdGlvbiwgZnVuY3Rpb24ocFRyYW5zbGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcFRyYW5zbGF0aW9uLmZyb21QYXR0ZXJuLnRlc3Qoc291cmNlUGF0aCk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXB0KSByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIHZhciB0cmFuc2xhdGVkUGF0aCA9IHNvdXJjZVBhdGgucmVwbGFjZShwdC5mcm9tU3RhdGljUGF0aCwgcHQudG9TdGF0aWNQYXRoKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCEgKChzdWJzY3JpcHRpb25QYXR0ZXJuIGluc3RhbmNlb2YgUmVnRXhwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmJiBzdWJzY3JpcHRpb25QYXR0ZXJuLnRlc3Qoc291cmNlUGF0aCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCBzdWJzY3JpcHRpb25QYXR0ZXJuID09IHNvdXJjZVBhdGgpKSByZXR1cm47XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNsYXRlZFBhdGggfHwgc291cmNlUGF0aDtcbiAgICAgICAgICAgIH1cblxuXG4gICAgICAgICAgICBmdW5jdGlvbiB0cmFuc2xhdGVEYXRhKHNvdXJjZVBhdGgsIGNoYW5nZSkge1xuICAgICAgICAgICAgICAgIGlmIChkYXRhVHJhbnNsYXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRyYW5zbGF0ZSA9IGRhdGFUcmFuc2xhdGlvbltzb3VyY2VQYXRoXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRyYW5zbGF0ZSAmJiB0eXBlb2YgdHJhbnNsYXRlID09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5nZS5vbGRWYWx1ZSA9IHRyYW5zbGF0ZShjaGFuZ2Uub2xkVmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hhbmdlLm5ld1ZhbHVlID0gdHJhbnNsYXRlKGNoYW5nZS5uZXdWYWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICBcbiAgICAgICAgICAgIGZ1bmN0aW9uIHZhbGlkYXRlRGF0YShzb3VyY2VQYXRoLCBjaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICBwcm9wYWdhdGVEYXRhKGNoYW5nZSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoZGF0YVZhbGlkYXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHZhbGlkYXRvcnMgPSBkYXRhVmFsaWRhdGlvbltzb3VyY2VQYXRoXVxuICAgICAgICAgICAgICAgICAgICAgICAgLCBwYXNzZWRDb3VudCA9IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICwgYWxyZWFkeUZhaWxlZCA9IGZhbHNlO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWxpZGF0b3JzKVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWRhdG9ycy5mb3JFYWNoKGNhbGxWYWxpZGF0b3IpOyAgIFxuICAgICAgICAgICAgICAgIH1cblxuXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gY2FsbFZhbGlkYXRvcih2YWxpZGF0b3IpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsaWRhdG9yKGNoYW5nZS5uZXdWYWx1ZSwgZnVuY3Rpb24oZXJyLCByZXNwb25zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UucGF0aCA9IHNvdXJjZVBhdGg7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoISBhbHJlYWR5RmFpbGVkICYmIChlcnIgfHwgcmVzcG9uc2UudmFsaWQpICYmICsrcGFzc2VkQ291bnQgPT0gdmFsaWRhdG9ycy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tRFMucG9zdE1lc3NhZ2UoJ3ZhbGlkYXRlZCcsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoISByZXNwb25zZS52YWxpZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFscmVhZHlGYWlsZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb21EUy5wb3N0TWVzc2FnZSgndmFsaWRhdGVkJywgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cblxuICAgICAgICAgICAgZnVuY3Rpb24gcHJvcGFnYXRlRGF0YShjaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICBzZW5kRGF0YS5jaGFuZ2VzLnB1c2goY2hhbmdlKTtcbiAgICAgICAgICAgIH1cblxuXG4gICAgICAgICAgICBmdW5jdGlvbiBwb3N0Q2hhbmdlRGF0YSgpIHtcbiAgICAgICAgICAgICAgICAvLyBwcmV2ZW50IGVuZGxlc3MgbG9vcCBvZiB1cGRhdGVzIGZvciAyLXdheSBjb25uZWN0aW9uXG4gICAgICAgICAgICAgICAgaWYgKHNlbGZbcmV2ZXJzZUxpbmtdKSB2YXIgY2FsbGJhY2sgPSBzdWJzY3JpcHRpb25Td2l0Y2g7XG5cbiAgICAgICAgICAgICAgICB2YXIgdHJhb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JhbnNhY3Rpb25zID0gW11cbiAgICAgICAgICAgICAgICAgICAgLCBjdXJyZW50VHJhbnNhY3Rpb247XG5cbiAgICAgICAgICAgICAgICBiYXRjaGVzLmZvckVhY2goZnVuY3Rpb24oYmF0Y2gpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEgYmF0Y2gudHJhbnNhY3Rpb24pIGN1cnJlbnRUcmFuc2FjdGlvbiA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEgYmF0Y2guY2hhbmdlcy5sZW5ndGgpIHJldHVybjtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoYmF0Y2gudHJhbnNhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50VHJhbnNhY3Rpb24pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXy5hcHBlbmRBcnJheShjdXJyZW50VHJhbnNhY3Rpb24sIGJhdGNoLmNoYW5nZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFRyYW5zYWN0aW9uID0gXy5jbG9uZShiYXRjaC5jaGFuZ2VzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2FjdGlvbnMucHVzaChjdXJyZW50VHJhbnNhY3Rpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zYWN0aW9ucy5wdXNoKGJhdGNoLmNoYW5nZXMpO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRyYW5zYWN0aW9ucztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cblxuXG4vKipcbiAqIHR1cm5PZmZcbiAqIE1ldGhvZCBvZiBDb25uZWN0b3IgdGhhdCBkaXNhYmxlcyB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ICAgICAgICBwcm9wZXJ0eVBhdGhTeW50YXgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyYXlQYXRoU3ludGF4LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnR5SW50ZXJwb2xhdGVTeW50YXgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyYXlJbnRlcnBvbGF0ZVN5bnRheFxuICAgICAgICAgICAgICAgICAgICAgICAgXS5qb2luKCd8JylcbiAgICAsIHBhdGhQYXJzZVBhdHRlcm4gPSBuZXcgUmVnRXhwKHBhdGhQYXJzZVN5bnRheCwgJ2cnKVxuXG4gICAgLCBwYXR0ZXJuUGF0aFBhcnNlU3ludGF4ID0gIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhQYXJzZVN5bnRheCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BlcnR5U3RhclN5bnRheCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFycmF5U3RhclN5bnRheCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJTeW50YXhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXS5qb2luKCd8JylcbiAgICAsIHBhdHRlcm5QYXRoUGFyc2VQYXR0ZXJuID0gbmV3IFJlZ0V4cChwYXR0ZXJuUGF0aFBhcnNlU3ludGF4LCAnZycpXG5cbiAgICAvLywgdGFyZ2V0UGF0aFBhcnNlUGF0dGVybiA9IC9cXC5bQS1aYS16XVtBLVphLXowLTlfXSp8XFxbWzAtOV0rXFxdfFxcLlxcJFsxLTldWzAtOV0qfFxcW1xcJFsxLTldWzAtOV0qXFxdfFxcJFsxLTldWzAtOV0vZ1xuICAgICwgcGF0aE5vZGVUeXBlcyA9IHtcbiAgICAgICAgJy4nOiB7IHN5bnRheDogJ29iamVjdCcsIGVtcHR5OiAne30nIH0sXG4gICAgICAgICdbJzogeyB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VHJlZTonc3BsaWNlJyB9fVxcblxcbiAgICAgICAge3s/IG5leHROb2RlIH19XFxuICAgICAgICAgICAge3tcXG4gICAgICAgICAgICAgICAgdmFyIGN1cnJOb2RlID0gbmV4dE5vZGU7XFxuICAgICAgICAgICAgICAgIHZhciBjdXJyUHJvcCA9IGN1cnJOb2RlLnByb3BlcnR5O1xcbiAgICAgICAgICAgICAgICB2YXIgZW1wdHlQcm9wID0gJ1tdJztcXG4gICAgICAgICAgICB9fVxcblxcbiAgICAgICAgICAgIHt7IyBkZWYuY3JlYXRlVHJlZVN0ZXAgfX1cXG4gICAgICAgIHt7P319XFxuXFxuICAgIH0gZWxzZSBpZiAoc3BsaWNlSG93TWFueSA+IDApIHtcXG4gICAgICAgIHt7IC8qIGlmIGl0ZW1zIGFyZSBub3QgaW5zZXJ0ZWQsIG9ubHkgdHJhdmVyc2UgbW9kZWwgdHJlZSBpZiBpdGVtcyBhcmUgZGVsZXRlZCBmcm9tIGFycmF5ICovIH19XFxuICAgICAgICB7ez8gaXQucGFyc2VkUGF0aC5sZW5ndGggfX1cXG4gICAgICAgICAgICB7eyMgZGVmLnRyYXZlcnNlVHJlZSB9fVxcblxcbiAgICAgICAgICAgIHt7XFxuICAgICAgICAgICAgICAgIHZhciBjdXJyTm9kZSA9IGl0LnBhcnNlZFBhdGhbY291bnRdO1xcbiAgICAgICAgICAgICAgICB2YXIgY3VyclByb3AgPSBjdXJyTm9kZS5wcm9wZXJ0eTsgICAgICAgXFxuICAgICAgICAgICAgfX1cXG5cXG4gICAgICAgICAgICB7eyAvKiBleHRyYSBicmFjZSBjbG9zZXMgJ2Vsc2UnIGluIGRlZi50cmF2ZXJzZVRyZWVTdGVwICovIH19XFxuICAgICAgICAgICAge3sjIGRlZi50cmF2ZXJzZVRyZWVTdGVwIH19IH1cXG4gICAgICAgIHt7P319XFxuICAgIH1cXG5cXG4gICAge3sgLyogc3BsaWNlIGl0ZW1zICovIH19XFxuICAgIGlmIChhZGRJdGVtcyB8f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7XG4gICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShvYmopKSB7XG4gICAgICAgICAgICAgICAgdmFyIHBhdGhTeW50YXggPSByb290UGF0aCArICdbJCRdJztcbiAgICAgICAgICAgICAgICBvYmouZm9yRWFjaChmdW5jdGlvbih2YWx1ZSwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgYWRkTWVzc2FnZSh2YWx1ZSwgaW5kZXgsIHBhdGhTeW50YXgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgcGF0aFN5bnRheCA9IHJvb3RQYXRoICsgJy4kJCc7XG4gICAgICAgICAgICAgICAgXy5lYWNoS2V5KG9iaiwgZnVuY3Rpb24odmFsdWUsIGtleSkge1xuICAgICAgICAgICAgICAgICAgICBhZGRNZXNzYWdlKHZhbHVlLCBrZXksIHBhdGhTeW50YXgpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gYWRkTWVzc2FnZSh2YWx1ZSwga2V5LCBwYXRoU3ludGF4KSB7XG4gICAgICAgICAgICB2YXIgcGF0aCA9IHBhdGhTeW50YXgucmVwbGFjZSgnJCQnLCBrZXkpXG4gICAgICAgICAgICAgICAgLCBleGlzdGluZ01zZyA9IG1lc3NhZ2VzSGFzaFtwYXRoXTtcblxuICAgICAgICAgICAgaWYgKGV4aXN0aW5nTXNnKSB7XG4gICAgICAgICAgICAgICAgaWYgKGV4aXN0aW5nTXNnLnR5cGUgPT0gbXNnVHlwZSlcbiAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLmVycm9yKCdzZXR0ZXIgZXJyb3I6IHNhbWUgbWVzc2FnZSB0eXBlIHBvc3RlZCBvbiB0aGUgc2FtZSBwYXRoJyk7XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGV4aXN0aW5nTX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ICAgICAgICAgICAgICAgICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkocGF0dGVybikpO1xuICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkodmFsdWUpKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgTWF0Y2guRXJyb3IoXCJFeHBlY3RlZCBhcnJheSwgZ290IFwiICsgSlNPTi5zdHJpbmdpZnkodmFsdWUpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhbHVlLmZvckVhY2goZnVuY3Rpb24gKHZhbHVlRWxlbWVudCwgaW5kZXgpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgY2hlY2tTdWJ0cmVlKHZhbHVlRWxlbWVudCwgcGF0dGVyblswXSk7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXJyIGluc3RhbmNlb2YgTWF0Y2guRXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyLnBhdGggPSBfcHJlcGVuZFBhdGgoaW5kZXgsIGVyci5wYXRoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIC8vIEFyYml0cmFyeSB2YWxpZGF0aW9uIGNoZWNrcy4gVGhlIGNvbmRpdGlvbiBjYW4gcmV0dXJuIGZhbHNlIG9yIHRocm93IGFcbiAgICAvLyBNYXRjaC5FcnJvciAoaWUsIGl0IGNhbiBpbnRlcm5hbGx5IHVzZSBjaGVjaygpKSB0byBmYWlsLlxuICAgIGlmIChwYXR0ZXJuIGluc3RhbmNlb2YgV2hlcmUpIHtcbiAgICAgICAgaWYgKHBhdHRlcm4uY29uZGl0aW9uKHZhbHVlKSlcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgLy8gWFhYIHRoaXMgZXJyb3IgaXMgdGVycmlibGVcbiAgICAgICAgdGhyb3cgbmV3IE1hdGNoLkVycm9yKFwiRmFpbGVkIE1hdGNoLldoZXJlIHZhbGlkYXRpb25cIik7XG4gICAgfVxuXG5cbiAgICBpZiAocGF0dGVybiBpbnN0YW5jZW9mIE9wdGlvbmFsKVxuICAgICAgICBwYXR0ZXJuID0gTWF0Y2guT25lT2YodW5kZWZpbmVkLCBwYXR0ZXJuLnBhdHRlcm4pO1xuXG4gICAgaWYgKHBhdHRlcm4gaW5zdGFuY2VvZiBPbmVPZikge1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHBhdHRlcm4uY2hvaWNlcy5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjaGVja1N1YnRyZWUodmFsdWUsIHBhdHRlcm4uY2hvaWNlc1tpXSk7XG4gICAgICAgICAgICAgICAgLy8gTm8gZXJyb3I/IFlheSwgcmV0dXJuLlxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgIC8vIE90aGVyIGVycm9ycyBzaG91bGQgYmUgdGhyb3duLiBNYXRjaCBlcnJvcnMganVzdCBtZWFuIHRyeSBhbm90aGVyXG4gICAgICAgICAgICAgICAgLy8gY2hvaWNlLlxuICAgICAgICAgICAgICAgIGlmICghKGVyciBpbnN0YW5jZW9mIE1hdGNoLkVycm9yKSlcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgZXJyO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIFhYWCB0aGlzIGVycm9yIGlzIHRlcnJpYmxlXG4gICAgICAgIHRocm93IG5ldyBNYXRjaC5FcnJvcihcIkZhaWxlZCBNYXRjaC5PbmVPZiBvciBNYXRjaC5PcHRpb25hbCB2YWxpZGF0aW9uXCIpO1xuICAgIH1cblxuICAgIC8vIEEgZnVuY3Rpb24gdGhhdCBpc24ndCBzb21ldGhpbmcgd2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AgICAgdGhyb3cgbmV3IE1hdGNoLkVycm9yKFwiRXhwZWN0ZWQgb2JqZWN0LCBnb3QgbnVsbFwiKTtcblxuICAgIHZhciByZXF1aXJlZFBhdHRlcm5zID0ge307XG4gICAgdmFyIG9wdGlvbmFsUGF0dGVybnMgPSB7fTtcblxuICAgIF8uZWFjaEtleShwYXR0ZXJuLCBmdW5jdGlvbihzdWJQYXR0ZXJuLCBrZXkpIHtcbiAgICAgICAgaWYgKHBhdHRlcm5ba2V5XSBpbnN0YW5jZW9mIE9wdGlvbmFsKVxuICAgICAgICAgICAgb3B0aW9uYWxQYXR0ZXJuc1trZXldID0gcGF0dGVybltrZXldLnBhdHRlcm47XG4gICAgICAgIGVsc2VcbiAgICAgICAgICAgIHJlcXVpcmVkUGF0dGVybnNba2V5XSA9IHBhdHRlcm5ba2V5XTtcbiAgICB9LCB0aGlzLCB0cnVlKTtcblxuICAgIF8uZWFjaEtleSh2YWx1ZSwgZnVuY3Rpb24oc3ViVmFsdWUsIGtleSkge1xuICAgICAgICB2YXIgc3ViVmFsdWUgPSB2YWx1ZVtrZXldO1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgaWYgKHJlcXVpcmVkUGF0dGVybnMuaGFzT3duUHJvcGVydHkoa2V5KSkge1xuICAgICAgICAgICAgICAgIGNoZWNrU3VidHJlZShzdWJWYWx1ZSwgcmVxdWlyZWRQYXR0ZXJuc1trZXldKTtcbiAgICAgICAgICAgICAgICBkZWxldGUgcmVxdWlyZWRQYXR0ZXJuc1trZXldO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChvcHRpb25hbFBhdHRlcm5zLmhhc093blByb3BlcnR5KGtleSkpIHtcbiAgICAgICAgICAgICAgICBjaGVja1N1YnRyZWUoc3ViVmFsdWUsIG9wdGlvbmFsUGF0dGVybnNba2V5XSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmICghdW5rbm93bktleXNBbGxvd2VkKVxuICAgICAgICAgICAgIC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B7XG4gICAgICAgIHZhciBmb3VuZFZhbHVlT3JJbmRleDtcbiAgICAgICAgdmFyIGZvdW5kID0gc29tZU1ldGhvZC5jYWxsKHRoaXMsIHRlc3RJdGVtLCB0aGlzQXJnLCBvbmx5RW51bWVyYWJsZSk7XG4gICAgICAgIGlmIChmb3VuZClcbiAgICAgICAgICAgIHJldHVybiBmb3VuZFZhbHVlT3JJbmRleDtcbiAgICAgICAgLy8gaWYgbG9va2luZyBmb3IgaW5kZXggYW5kIG5vdCBmb3VuZCwgcmV0dXJuIC0xXG4gICAgICAgIGVsc2UgaWYgKGFyZ0luZGV4ICYmIHNvbWVNZXRob2QgPT0gQXJyYXkucHJvdG90eXBlLnNvbWUpXG4gICAgICAgICAgICByZXR1cm4gLTE7XG5cbiAgICAgICAgZnVuY3Rpb24gdGVzdEl0ZW0odmFsdWUsIGluZGV4LCBzZWxmKSB7XG4gICAgICAgICAgICB2YXIgdGVzdCA9IGNhbGxiYWNrLmNhbGwodGhpcywgdmFsdWUsIGluZGV4LCBzZWxmKTtcbiAgICAgICAgICAgIGlmICh0ZXN0KSB7XG4gICAgICAgICAgICAgICAgZm91bmRWYWx1ZU9ySW5kZXggPSBhcmd1bWVudHNbYXJnSW5kZXhdXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRlc3Q7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0= +; \ No newline at end of file diff --git a/dist/milo.bundle.map b/dist/milo.bundle.map index 9393c8b..c0caa71 100644 --- a/dist/milo.bundle.map +++ b/dist/milo.bundle.map @@ -1,118 +1,118 @@ { "version": 3, "sources": [ - "/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/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_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" + "/Users/jasoniangreen/work/CC/milo/lib/abstract/facet.js", + "/Users/jasoniangreen/work/CC/milo/lib/abstract/faceted_object.js", + "/Users/jasoniangreen/work/CC/milo/lib/abstract/registry.js", + "/Users/jasoniangreen/work/CC/milo/lib/attributes/a_bind.js", + "/Users/jasoniangreen/work/CC/milo/lib/attributes/a_class.js", + "/Users/jasoniangreen/work/CC/milo/lib/attributes/a_load.js", + "/Users/jasoniangreen/work/CC/milo/lib/attributes/index.js", + "/Users/jasoniangreen/work/CC/milo/lib/binder.js", + "/Users/jasoniangreen/work/CC/milo/lib/classes.js", + "/Users/jasoniangreen/work/CC/milo/lib/command/actions_history.js", + "/Users/jasoniangreen/work/CC/milo/lib/command/cmd_registry.js", + "/Users/jasoniangreen/work/CC/milo/lib/command/index.js", + "/Users/jasoniangreen/work/CC/milo/lib/command/transaction.js", + "/Users/jasoniangreen/work/CC/milo/lib/command/transaction_history.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_class.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facet.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Container.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Css.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Data.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Dom.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Drag.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Drop.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Events.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Frame.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Item.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/List.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/ModelFacet.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Options.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Template.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/Transfer.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_facets/cf_registry.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_info.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_registry.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/c_utils.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/classes/View.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/msg_api/data.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/msg_api/de_data.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/msg_api/drop.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/msg_src/dom_events.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/msg_src/frame.js", + "/Users/jasoniangreen/work/CC/milo/lib/components/scope.js", + "/Users/jasoniangreen/work/CC/milo/lib/config.js", + "/Users/jasoniangreen/work/CC/milo/lib/loader.js", + "/Users/jasoniangreen/work/CC/milo/lib/milo.js", + "/Users/jasoniangreen/work/CC/milo/lib/registry.js", + "/Users/jasoniangreen/work/CC/milo/lib/services/de_constrs.js", + "/Users/jasoniangreen/work/CC/milo/lib/services/dom_source.js", + "/Users/jasoniangreen/work/CC/milo/lib/services/mail/index.js", + "/Users/jasoniangreen/work/CC/milo/lib/services/mail/mail_api.js", + "/Users/jasoniangreen/work/CC/milo/lib/services/mail/mail_source.js", + "/Users/jasoniangreen/work/CC/milo/lib/services/window.js", + "/Users/jasoniangreen/work/CC/milo/lib/use_facets.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/component_name.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/create_component_class.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/create_facet_class.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/deprecate.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/dom.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/dom_listeners.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/domready.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/dragdrop.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/error.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/fragment.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/index.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/json_parse.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/request.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/selection/index.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/storage/index.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/storage/model.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/storage/msg_src.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/unique_id.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/websocket/index.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/websocket/msg_api.js", + "/Users/jasoniangreen/work/CC/milo/lib/util/websocket/msg_src.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/base32/lib/base32.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/browserify/node_modules/browser-builtins/builtin/fs.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/abstract/mixin.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/classes.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/config.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/messenger/index.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/messenger/m_api.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/messenger/m_api_rx.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/messenger/m_source.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/messenger/msngr_source.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/milo-core.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/minder.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/model/change_data.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/model/connector.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/model/index.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/model/m_msg_api.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/model/m_path.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/model/model_utils.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/model/path_msg_api.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/model/path_utils.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/model/synthesize/index.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/util/check.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/util/index.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/util/logger.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/lib/util/logger_class.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/dot/doT.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/dot/index.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_array.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_function.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_number.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_object.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_prototype.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_string.js", + "/Users/jasoniangreen/work/CC/milo/node_modules/milo-core/node_modules/mol-proto/lib/proto_util.js", + "/Users/jasoniangreen/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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACxFA;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;;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;;ACrCA;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;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;ACxFA;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;;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;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;;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;;ACrCA;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;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;AC7KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;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;;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": [ @@ -170,7 +170,7 @@ "'use strict';\n\nrequire('./components/c_facets/Css');\nrequire('./components/c_facets/Dom');\nrequire('./components/c_facets/Data');\nrequire('./components/c_facets/Frame');\nrequire('./components/c_facets/Events');\nrequire('./components/c_facets/Options');\nrequire('./components/c_facets/Template');\nrequire('./components/c_facets/Container');\nrequire('./components/c_facets/ModelFacet');\nrequire('./components/c_facets/Drag');\nrequire('./components/c_facets/Drop');\nrequire('./components/c_facets/List');\nrequire('./components/c_facets/Item');\nrequire('./components/c_facets/Transfer');\n", "'use strict';\n\nvar uniqueId = require('./unique_id')\n , config = require('../config')\n , prefix = config.componentPrefix;\n\n\nmodule.exports = componentName;\n\n\nfunction componentName() {\n return prefix + uniqueId();\n}\n", "'use strict';\n\nvar miloCore = require('milo-core')\n , _ = miloCore.proto\n , check = miloCore.util.check\n , Match = check.Match\n , componentRegistry = require('../components/c_registry');\n\n\nmodule.exports = createComponentClass;\n\n/**\n * Utility function which creates and registers new milo component. The component created will have\n * a reference to the super class used in its creation (Accessable using .super).\n *\n * @param {string} config.className - The name of the new component\n * @param {string} ['Component'] config.superClassName - The name of an existing component to be used as the new component's super class\n * @param {object=} config.facets - Facet configuration (Hash of facet name {string} to config {object})\n * @param {object=} config.methods - Methods of the new component (Hash of function name {string} to function {function})\n * @param {object=} config.staticMethods - Static methods of the new component (Hash of function name {string} to function {function})\n */\nfunction createComponentClass(config) {\n check(config, {\n superClassName: Match.Optional(String),\n className: String,\n facets: Match.Optional(Object),\n methods: Match.Optional(Match.ObjectHash(Function)),\n staticMethods: Match.Optional(Match.ObjectHash(Function)),\n });\n var SuperClass = componentRegistry.get(config.superClassName || 'Component');\n var ComponentClass = SuperClass.createComponentClass(config.className, config.facets);\n\n if (config.methods) _.extendProto(ComponentClass, config.methods);\n\n if (config.staticMethods) {\n if (config.staticMethods.super !== undefined) throw '\\'super\\' is a reserved keyword';\n _.extend(ComponentClass, config.staticMethods);\n }\n\n ComponentClass.super = SuperClass.prototype;\n componentRegistry.add(ComponentClass);\n return ComponentClass;\n}\n", - "'use strict';\n\nvar miloCore = require('milo-core')\n , _ = miloCore.proto\n , check = miloCore.util.check\n , Match = check.Match\n , FacetBaseClass = require('../components/c_facet')\n , facetRegistry = require('../components/c_facets/cf_registry');\n\nmodule.exports = createFacetClass;\n\nfunction createFacetClass(config) {\n check(config, {\n className: String,\n superClassName: Match.Optional(String),\n methods: Match.Optional(Match.ObjectHash(Function))\n });\n\n var SuperClass = config.superClassName ? facetRegistry.get(config.superClassName) : FacetBaseClass;\n var FacetClass = _.createSubclass(SuperClass, config.className);\n\n if (config.methods) _.extendProto(FacetClass, config.methods);\n\n FacetClass.super = SuperClass.prototype;\n facetRegistry.add(FacetClass);\n return FacetClass;\n}", + "'use strict';\n\nvar miloCore = require('milo-core')\n , _ = miloCore.proto\n , check = miloCore.util.check\n , Match = check.Match\n , FacetBaseClass = require('../components/c_facet')\n , facetRegistry = require('../components/c_facets/cf_registry');\n\nmodule.exports = createFacetClass;\n\nfunction createFacetClass(config) {\n check(config, {\n className: String,\n superClassName: Match.Optional(String),\n require: Match.Optional(Array),\n methods: Match.Optional(Match.ObjectHash(Function))\n });\n\n var SuperClass = config.superClassName ? facetRegistry.get(config.superClassName) : FacetBaseClass;\n var FacetClass = _.createSubclass(SuperClass, config.className);\n\n if (config.methods) _.extendProto(FacetClass, config.methods);\n if (config.require) FacetClass.require = config.require;\n\n FacetClass.super = SuperClass.prototype;\n facetRegistry.add(FacetClass);\n return FacetClass;\n}", "'use strict';\n\n\nvar miloCore = require('milo-core')\n , _ = miloCore.proto\n , logger = miloCore.util.logger\n , config = require('../config');\n\n\nmodule.exports = function deprecate(fn, message) {\n var warned;\n switch (typeof fn) {\n case 'object':\n return _.mapKeys(fn, function(f) { return deprecate(f, message); });\n case 'function':\n for (var prop in fn)\n deprecated[prop] = deprecate(fn[prop], message);\n return deprecated;\n default:\n return fn;\n }\n\n\n function deprecated() {\n if (config.deprecationWarning\n && (!warned || config.deprecationWarning == 'always')) {\n logger.error(message || 'Function ' + fn.name + ' is DEPRECATED');\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n};\n", "'use strict';\n\n\nvar config = require('../config')\n , miloCore = require('milo-core')\n , _ = miloCore.proto\n , logger = miloCore.util.logger;\n\nvar domUtils = {\n children: children,\n filterNodeListByType: filterNodeListByType,\n containingElement: containingElement,\n selectElementContents: selectElementContents,\n selectElementText: selectElementText,\n getElementOffset: getElementOffset,\n setCaretPosition: setCaretPosition,\n getSelectionDirection: getSelectionDirection,\n setSelection: setSelection,\n clearSelection: clearSelection,\n removeElement: removeElement,\n unwrapElement: unwrapElement,\n wrapInElement: wrapInElement,\n detachComponent: detachComponent,\n firstTextNode: firstTextNode,\n lastTextNode: lastTextNode,\n trimNodeRight: trimNodeRight,\n trimNodeLeft: trimNodeLeft,\n stripHtml: stripHtml,\n htmlEntities: htmlEntities,\n walkTree: walkTree,\n createTreeWalker: createTreeWalker,\n\n treePathOf: treePathOf,\n getNodeAtTreePath: getNodeAtTreePath,\n insertAtTreePath: insertAtTreePath,\n isTreePathBefore: isTreePathBefore,\n\n getNodeWindow: getNodeWindow,\n\n getComponentsFromRange: getComponentsFromRange,\n deleteRangeWithComponents: deleteRangeWithComponents,\n forEachNodesInRange: forEachNodesInRange,\n areRangesEqual: areRangesEqual,\n\n addDebugPoint: addDebugPoint\n};\n\nmodule.exports = domUtils;\n\n\n/**\n * Returns the list of element children of DOM element\n *\n * @param {Element} el element to return the children of (only DOM elements)\n * @return {Array[Element]}\n */\n function children(el) {\n return filterNodeListByType(el.childNodes, Node.ELEMENT_NODE);\n }\n\n\n/**\n * Filters the list of nodes by type\n *\n * @param {NodeList} nodeList the list of nodes, for example childNodes property of DOM element\n * @param {Integer} nodeType an integer constant [defined by DOM API](https://developer.mozilla.org/en-US/docs/Web/API/Node.nodeType), e.g. `Node.ELEMENT_NODE` or `Node.TEXT_NODE`\n * @return {Array[Node]}\n */\nfunction filterNodeListByType(nodeList, nodeType) {\n return _.filter(nodeList, function (node) {\n return node.nodeType == nodeType;\n });\n}\n\n\n/**\n * Find nearest parent element for node.\n * If node is an element, it will be returned.\n *\n * @param {Node} node\n * @return {Element|null}\n */\nfunction containingElement(node) {\n while (node) {\n if (node.nodeType == Node.ELEMENT_NODE)\n return node;\n node = node.parentNode;\n }\n return null;\n}\n\n\n/**\n * Selects inner contents of DOM element\n *\n * @param {Element} el DOM element\n */\nfunction selectElementContents(el) {\n var doc = el.ownerDocument;\n if (! doc) return logger.error('selectElementContents: element has no document');\n var range = doc.createRange();\n range.selectNodeContents(el);\n var win = getNodeWindow(el)\n , sel = win.getSelection();\n sel.removeAllRanges();\n sel.addRange(range);\n}\n\n\n/**\n * Selects text inside element\n * @param {Element} el\n */\nfunction selectElementText(el) {\n var fromNode = firstTextNode(el)\n , toNode = lastTextNode(el);\n\n if (fromNode && toNode)\n setSelection(fromNode, 0, toNode, toNode.textContent.length);\n}\n\n\n/**\n * Sets the caret position to the position in the node\n *\n * @param {Node} node DOM node\n * @param {Number} pos caret position\n */\nfunction setCaretPosition(node, pos) {\n var doc = node.ownerDocument;\n if (! doc) return logger.error('setCaretPosition: element has no document');\n var range = doc.createRange();\n range.setStart(node, pos);\n var win = getNodeWindow(node)\n , sel = win.getSelection();\n sel.removeAllRanges();\n sel.addRange(range);\n}\n\n/**\n * get the direction of a selection\n *\n * 1 forward, -1 backward, 0 no direction, undefined one of the node is detached or in a different frame\n *\n * @param {sel} a selection object\n * @return {-1|0|1|undefined}\n */\nfunction getSelectionDirection(sel){\n return _getDirection(sel.anchorNode, sel.anchorOffset, sel.focusNode, sel.focusOffset);\n}\n\nfunction _getDirection(fromNode, startOffset, toNode, endOffset){\n var docPosition = fromNode.compareDocumentPosition(toNode);\n if (docPosition & Node.DOCUMENT_POSITION_FOLLOWING){\n return 1;\n }\n else if (docPosition & Node.DOCUMENT_POSITION_PRECEDING){\n return -1;\n }\n else if (fromNode == toNode){\n if (startOffset < endOffset){\n return 1;\n }\n else if (startOffset > endOffset){\n return -1;\n }\n else {\n return 0;\n }\n }\n}\n\n/**\n * Selects a range in a document\n *\n * @param {Node} fromNode DOM node to start selection in\n * @param {Number} startOffset\n * @param {Node} toNode DOM node to end selection in\n * @param {Number} endOffset\n */\nfunction setSelection(fromNode, startOffset, toNode, endOffset) {\n var doc = fromNode.ownerDocument;\n if (! doc) return logger('setCaretPosition: element has no document');\n var backward = _getDirection(fromNode, startOffset, toNode, endOffset) == -1;\n var range = doc.createRange();\n var container, originalContentEditable;\n // does not work in non contentEditable items\n\n var win = getNodeWindow(fromNode)\n , sel = win.getSelection();\n\n\n if (backward){\n range.setStart(toNode, endOffset);\n range.setEnd(fromNode, startOffset);\n range.collapse(false);\n }\n else {\n range.setStart(fromNode, startOffset);\n range.setEnd(toNode, endOffset);\n }\n\n container = range.commonAncestorContainer == Node.ELEMENT_NODE ?\n range.commonAncestorContainer :\n range.commonAncestorContainer.parentElement;\n\n if (!container.isContentEditable){\n originalContentEditable = container.contentEditable; // false or inherit\n container.contentEditable = \"true\";\n }\n\n sel.removeAllRanges();\n sel.addRange(range);\n\n if (backward){\n sel.extend(toNode, endOffset);\n }\n\n if (originalContentEditable){\n // restoring contentEditable\n container.contentEditable = originalContentEditable;\n }\n}\n\n/**\n * Clears selection in a given window\n * @param {Window} win\n */\nfunction clearSelection(win) {\n win = win || window;\n var sel = win.getSelection();\n sel.removeAllRanges();\n}\n\n\n/**\n * Calculates an element's total top and left offset from the document edge.\n *\n * @param {Element} el the element for which position needs to be returned\n * @param {includeBorder} if is to include the border width\n * @return {Object} vector object with properties topOffset and leftOffset\n */\nfunction getElementOffset(el, includeBorder) {\n var yPos, xPos;\n\n yPos = el.offsetTop;\n xPos = el.offsetLeft;\n el = el.offsetParent;\n\n while (el) {\n yPos += el.offsetTop + getBorder(el, 'Height', includeBorder);\n xPos += el.offsetLeft + getBorder(el, 'Width', includeBorder);\n el = el.offsetParent;\n }\n\n return { topOffset: yPos, leftOffset: xPos };\n}\n\n\nfunction getBorder(el, type, includeBorder) {\n if (includeBorder) {\n var side = (type == 'Height') ? 'top' : 'left',\n styles = window.getComputedStyle(el),\n sideValue = parseInt(styles.getPropertyValue('border-' + side + '-width'), 10);\n\n if (sideValue) return sideValue;\n }\n return 0;\n}\n\n\n/**\n * Removes element from the document\n *\n * @param {Element} el the element to be removed\n */\nfunction removeElement(el) {\n var parent = el.parentNode;\n if (parent){\n parent.removeChild(el);\n parent.normalize();\n }\n}\n\n\n/**\n * Returns the first child text node of an element\n *\n * @param {Element|Node} node the node to be searched, if the node is text node we return the node.\n * @return {TextNode}\n */\nfunction firstTextNode(node) {\n if (node.nodeType == Node.TEXT_NODE) return node;\n var treeWalker = createTreeWalker(node, NodeFilter.SHOW_TEXT);\n return treeWalker.firstChild();\n}\n\n\n/**\n * Returns the last child text node of an element\n *\n * @param {Element|Node} node the node to be searched, if the node is text node we return the node.\n * @return {TextNode}\n */\nfunction lastTextNode(node) {\n if (node.nodeType == Node.TEXT_NODE) return node;\n var treeWalker = createTreeWalker(node, NodeFilter.SHOW_TEXT);\n return treeWalker.lastChild();\n}\n\n\n/**\n * Removes element from the document putting its children in its place\n *\n * @param {Element} el the element to be \"unwrapped\"\n */\nfunction unwrapElement(el) {\n var parent = el.parentNode;\n\n if (parent) {\n var frag = document.createDocumentFragment();\n // must be copied to avoid iterating a mutating list of childNodes\n var children = _.slice(el.childNodes);\n children.forEach(frag.appendChild, frag);\n parent.replaceChild(frag, el);\n parent.normalize();\n }\n}\n\n\n/**\n * Wraps an element in another element\n *\n * @param {Element} wrapIntoEl\n * @param {Element} el\n */\nfunction wrapInElement(wrapIntoEl, el) {\n var parent = el.parentNode;\n\n if (parent) {\n parent.insertBefore(wrapIntoEl, el);\n wrapIntoEl.appendChild(el);\n }\n}\n\n\n/**\n * Trims a text node of trailing spaces, and returns true if a trim was performed.\n *\n * @param {TextNode} node\n * @return {Boolean}\n */\nfunction trimNodeRight(node) {\n return _trimNode(node, 'trimRight');\n}\n\n\n/**\n * Trims a text node of leading spaces, and returns true if a trim was performed.\n *\n * @param {TextNode} node\n * @return {Boolean}\n */\nfunction trimNodeLeft(node) {\n return _trimNode(node, 'trimLeft');\n}\n\n\nfunction _trimNode(node, methodName) {\n var len = node.length;\n node.textContent = node.textContent[methodName]();\n return len !== node.length;\n}\n\n\n/**\n * Removes the reference to component from element\n *\n * @param {Element} el\n */\nfunction detachComponent(el) {\n delete el[config.componentRef];\n}\n\n\n/**\n * Retrieves the content of a html string\n * @param {String} str Any string\n * @return {String} returns the string cleaned of any html content.\n */\nfunction stripHtml(str) {\n var div = document.createElement('DIV');\n div.innerHTML = str;\n return div.textContent || '';\n}\n\n\n/**\n * Convenience wrapper for native TreeWalker that automatically walks the tree and calls an iterator function.\n * This will not iterate the root element.\n * @param {HTMLElement} root The containing root element to be walked. Will not be iterated.\n * @param {NodeFiler} filter A NodeFilter constant, see https://developer.mozilla.org/en/docs/Web/API/TreeWalker\n * @param {Function} iterator A function to be called on each node. Returning 'false' will break.\n * @param {Object} context An optional context to passed, defaults to root.\n */\nfunction walkTree(root, filter, iterator, context) {\n var tw = document.createTreeWalker(root, filter);\n while(tw.nextNode()) {\n var result = iterator.call(context || root, tw.currentNode);\n if (result === false) break;\n }\n}\n\n\n/**\n * Returns array of child indexes of element path inside root element in DOM tree using breadth first tree traversal.\n * Returns undefined if the element is not inside root element, 0 if the root element itself is passed.\n *\n * @param {Element} rootEl element to search\n * @param {Element} el element to find the index of\n * @return {Array[Number]}\n */\nfunction treePathOf(rootEl, el) {\n if (! (rootEl && rootEl.contains(el))) return;\n\n var treePath = []\n , node = rootEl;\n\n while (node != el) {\n var nodeIndex = _.findIndex(node.childNodes, containsEl);\n treePath.push(nodeIndex);\n node = node.childNodes[nodeIndex];\n }\n\n return treePath;\n\n function containsEl(child) {\n return child.contains(el);\n }\n}\n\n\n/**\n * Returns element at given tree path\n *\n * @param {Element} rootEl\n * @param {Array[Number]} treePath\n * @param {Boolean} nearest return nearest possible node if exact node does not exist\n * @return {Node}\n */\nfunction getNodeAtTreePath(rootEl, treePath, nearest) {\n if (!treePath) return;\n\n var len = treePath.length;\n if (len === 0) return rootEl;\n\n var node = rootEl;\n\n for (var i = 0; i < len; i++) {\n var children = node.childNodes;\n if (! children) {\n if (! nearest) node = undefined;\n break;\n }\n var childIndex = treePath[i]\n , child = children[childIndex];\n if (! child) {\n node = nearest\n ? children[children.length - 1]\n : undefined;\n break;\n }\n node = child;\n }\n\n return node;\n}\n\n\n/**\n * Inserts an element inside root at a given path in tree (that has the same meaning as the index returned by `treePathOf` function). If element is already in the root's tree, it will be removed first and then moved to the passed treeIndex\n * Insertion at index 0 is not possible and will return undefined as it would mean replacing the root element.\n *\n * @param {Element} rootEl element into which to insert\n * @param {Number} treeIndex index in DOM tree inside root element (see treePathOf)\n * @param {Element} el element to be inserted\n * @return {Boolean} true if was successfully inserted\n */\nfunction insertAtTreePath(rootEl, treePath, el, nearest) {\n var toNormalize = el.nodeType == Node.TEXT_NODE;\n if (rootEl.contains(el))\n removeElement(el); // can't use removeChild as rootEl here is not an immediate parent\n\n if (treePath.length == 0) return;\n\n var parent = getNodeAtTreePath(rootEl, treePath.slice(0, -1), nearest)\n , children = parent.childNodes;\n\n if (! children) {\n if (nearest) {\n parent = parent.parentNode;\n children = parent.childNodes;\n } else return;\n }\n\n var childIndex = treePath[treePath.length - 1]\n , child = children[childIndex];\n\n if (child) {\n parent.insertBefore(el, child);\n if (toNormalize) parent.normalize();\n return true;\n } else if (children.length === 0 && (childIndex === 0 || nearest)) {\n parent.appendChild(el);\n if (toNormalize) parent.normalize();\n return true;\n } else {\n child = children[childIndex - 1];\n if (child || nearest) {\n parent.appendChild(el);\n if (toNormalize) parent.normalize();\n return true;\n }\n }\n}\n\n\n/**\n * Returns `true` if the first tree path points to a node which is before the other in the document order.\n * @param {Array} path1 A treepath array\n * @param {Array} path2 A treepath array\n * @return {Boolean}\n */\nfunction isTreePathBefore(path1, path2) {\n var i = 0\n , isBefore;\n if (!Array.isArray(path1) && Array.isArray(path2))\n return logger.error('isTreePathBefore: One or both paths are not valid treepath arrays.');\n\n for (i; i < path1.length; i++) {\n if (path1[i] < path2[i]) {\n isBefore = true;\n break;\n } else if (path1[i] > path2[i]) {\n isBefore = false;\n break;\n }\n }\n\n if (typeof isBefore == 'undefined')\n if (path1.length < path2.length)\n logger.warn('isTreePathBefore: One node is inside another');\n\n return isBefore || false;\n}\n\n\n/**\n * Converts non latin characters to HTML entity codes.\n * @param {String} str the string to convert\n * @return {String} the string with html entities\n */\nfunction htmlEntities(str) {\n return str.replace(/[\\u00A0-\\u99999<>\\&]/gim, function(i) {\n return '&#'+i.charCodeAt(0)+';';\n });\n}\n\n\nfunction createTreeWalker(el, whatToShow) {\n whatToShow = whatToShow || (NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT);\n return document.createTreeWalker(el, whatToShow);\n}\n\n\n/**\n * Returns the reference to the window the node is in\n *\n * @param {Node} node\n * @return {Window}\n */\nfunction getNodeWindow(node) {\n var doc = node.ownerDocument;\n return doc && (doc.defaultView || doc.parentWindow);\n}\n\n\n\n/**\n * do something for each nodes contained in a range\n *\n * @param {range} a range\n * @param {cb} a function taking a node as argument\n\n */\nfunction forEachNodesInRange(range, cb){\n var rangeContainer = range.commonAncestorContainer\n , doc = rangeContainer.ownerDocument;\n\n function isNodeInsideRange(node){\n var nodeRange = document.createRange();\n var isInside = false;\n nodeRange.selectNode(node);\n\n if (nodeRange.compareBoundaryPoints(window.Range.START_TO_START, range) != -1\n && nodeRange.compareBoundaryPoints(window.Range.END_TO_END, range) != 1){\n isInside = true;\n }\n nodeRange.detach();\n return isInside;\n }\n\n var treeWalker = doc.createTreeWalker(rangeContainer,\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT);\n\n var currentNode;\n while (currentNode = treeWalker.nextNode()){ // should be assignment\n if (isNodeInsideRange(currentNode)){\n cb(currentNode);\n }\n }\n}\n\n/**\n * get all components contained in a range\n *\n * @param {range} a DOM range.\n */\nfunction getComponentsFromRange(range) {\n var win = getNodeWindow(range.startContainer)\n , Component = win.milo.Component;\n\n var components = [];\n forEachNodesInRange(range, function (node){\n if (node.nodeType != Node.TEXT_NODE) {\n var comp = Component.getComponent(node);\n if (comp)\n components.push(comp);\n }\n });\n\n return components;\n}\n\n/**\n * delete a range\n *\n * @param {range} delete a DOM range and all the components inside\n */\nfunction deleteRangeWithComponents(range) {\n var components = getComponentsFromRange(range);\n\n components.forEach(function(comp) {\n comp.destroy(true);\n });\n\n range.deleteContents();\n}\n\n/**\n * check if two ranges are equivalent\n *\n * @param {range} range1\n * @param {range} range2\n * @return {Boolean} are the two ranges equivalent\n */\nfunction areRangesEqual(range1, range2){\n return range1.compareBoundaryPoints(window.Range.START_TO_START, range2) == 0 && range1.compareBoundaryPoints(window.Range.END_TO_END, range2) == 0;\n}\n\n\n/**\n * Adds a single pixel div to the body at a given x and y position. Useful for debugging position specific code.\n * @param {Number} x\n * @param {Number} y\n */\nfunction addDebugPoint(x, y) {\n var dbEl = document.createElement('div');\n dbEl.setAttribute('style', 'width: 1px; height: 1px; position:fixed; left:'+x+'px; top:'+y+'px; background-color:red; z-index: 100');\n setTimeout(function() {document.body.appendChild(dbEl);}, 200);\n}\n", "'use strict';\n\n\nvar _ = require('milo-core').proto;\n\n\nmodule.exports = DOMListeners;\n\n\nfunction DOMListeners() {\n this.listeners = [];\n}\n\n\n_.extendProto(DOMListeners, {\n add: DOMListeners$add,\n remove: DOMListeners$remove,\n removeAll: DOMListeners$removeAll\n});\n\n\nfunction DOMListeners$add(target, eventType, handler) {\n this.listeners.push({\n target: target,\n eventType: eventType,\n handler: handler\n });\n target.addEventListener(eventType, handler);\n}\n\n\nfunction DOMListeners$remove(target, eventType, handler) {\n var listener = {\n target: target,\n eventType: eventType,\n handler: handler\n };\n var idx = _.findIndex(this.listeners, _.partial(_.isEqual, listener));\n\n if (idx > -1) {\n this.listeners.splice(idx, 1);\n _removeListener(listener);\n }\n}\n\n\nfunction DOMListeners$removeAll() {\n this.listeners.forEach(_removeListener);\n this.listeners = [];\n}\n\n\nfunction _removeListener(l) {\n l.target.removeEventListener(l.eventType, l.handler);\n}\n", @@ -222,7 +222,7 @@ "'use strict';\n\n/**\n * - [isNumeric](#isNumeric)\n */\nvar numberMethods = module.exports = {\n isNumeric: isNumeric\n};\n\n\n/**\n * Function to test if a value is numeric\n *\n * @param {Any} self value to be tested\n * @return {Boolean} true if it is a numeric value\n */\nfunction isNumeric() {\n return !isNaN(parseFloat(this)) && isFinite(this);\n};\n", "'use strict';\n\n\nvar utils = require('./utils');\n\n\n/**\n * - [extend](#extend)\n * - [clone](#clone)\n * - [defineProperty](#defineProperty)\n * - [defineProperties](#defineProperties)\n * - [deepExtend](#deepExtend)\n * - [deepClone](#deepClone)\n * - [keys](#keys)\n * - [allKeys](#allKeys)\n * - [values](#values)\n * - [keyOf](#keyOf)\n * - [allKeysOf](#allKeysOf)\n * - [eachKey](#eachKey)\n * - [mapKeys](#mapKeys)\n * - [reduceKeys](#reduceKeys)\n * - [filterKeys](#filterKeys)\n * - [someKey](#someKey)\n * - [everyKey](#everyKey)\n * - [findValue](#findValue)\n * - [findKey](#findKey)\n * - [pickKeys](#pickKeys)\n * - [omitKeys](#omitKeys)\n * - [isEqual](#isEqual)\n * - [isNot](#isNot)\n *\n * All these methods can be [chained](proto.js.html#Proto)\n */\nvar objectMethods = module.exports = {\n extend: extend,\n clone: clone,\n defineProperty: defineProperty,\n defineProperties: defineProperties,\n deepExtend: deepExtend,\n deepClone: deepClone,\n keys: keys,\n allKeys: allKeys,\n values: values,\n keyOf: keyOf,\n allKeysOf: allKeysOf,\n eachKey: eachKey,\n mapKeys: mapKeys,\n reduceKeys: reduceKeys,\n filterKeys: filterKeys,\n someKey: someKey,\n everyKey: everyKey,\n pickKeys: pickKeys,\n omitKeys: omitKeys,\n isEqual: isEqual,\n isNot: isNot\n};\n\n\n/**\n * ####Property descriptor constants####\n * The sum of these constants can be used as last parameter of defineProperty and defineProperties to determine types of properties.\n */\nvar constants = {\n ENUMERABLE: 1,\n ENUM: 1,\n CONFIGURABLE: 2,\n CONF: 2,\n WRITABLE: 4,\n WRIT: 4\n};\n\ndefineProperty.call(objectMethods, '_constants', constants);\n\n\n/**\n * Analogue of ES6 [Array __find__ method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).\n * Returns the value of object property that passes callback test.\n *\n * @param {Object} self object to search in\n * @param {Function} callback should return `true` for item to pass the test, passed `value`, `key` and `self` as parameters\n * @param {Object} thisArg optional context (`this`) of callback call\n * @param {Boolean} onlyEnumerable An optional `true` to iterate enumerable properties only.\n * @return {Any}\n */\nobjectMethods.findValue = utils.makeFindMethod(someKey, 'value');\n\n\n/**\n * Analogue of ES6 [Array __findIndex__ method](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).\n * Returns the key of object property that passes callback test. Returns `undefined` if not found (unlike `findIndex`, that returns -1 in this case).\n *\n * @param {Object} self object to search in\n * @param {Function} callback should return `true` for item to pass the test, passed `value`, `key` and `self` as parameters\n * @param {Object} thisArg optional context (`this`) of callback call\n * @param {Boolean} onlyEnumerable An optional `true` to iterate enumerable properties only.\n * @return {Integer}\n */\nobjectMethods.findKey = utils.makeFindMethod(someKey, 'key');\n\n\n/**\n * Extends object `self` with the properties of the object `obj` copying all own properties (not those inherited via prototype chain), including non-enumerable properties (unless `onlyEnumerable` is truthy).\n * Created properties will have the same descriptors as the propertis of `obj`.\n * Returns `self` to allow chaining with other functions.\n * Can be used with functions, to copy class methods, e.g.\n *\n * @param {Object} self An object to be extended\n * @param {Object} obj An object which properties will be copied to self\n * @param {Boolean} onlyEnumerable Optional flag to prevent copying non-enumerable properties, `false` by default\n * @return {Object}\n */\nfunction extend(obj, onlyEnumerable) {\n var descriptors = {};\n\n eachKey.call(obj, function(value, prop) {\n descriptors[prop] = Object.getOwnPropertyDescriptor(obj, prop);\n }, this, onlyEnumerable);\n\n Object.defineProperties(this, descriptors);\n\n return this;\n}\n\n\n/**\n * Makes a shallow clone of object `obj` creating an instance of the same class; the properties will have the same descriptors.\n * To clone an array use\n * ```\n * var clonedArray = [].concat(arr);\n * ```\n * This function should not be used to clone an array, because it is inefficient.\n *\n * @param {Object} self An object to be cloned\n * @return {Object}\n */\nfunction clone() {\n if (Array.isArray(this)) return this.slice();\n if (this instanceof Date) return new Date(this);\n if (this instanceof RegExp) return new RegExp(this);\n var clonedObject = Object.create(this.constructor.prototype);\n extend.call(clonedObject, this);\n return clonedObject;\n}\n\n\n/**\n * Syntax sugar to shorten usage of `Object.defineProperty`.\n * The simplest usage (to add non-enumerable, non-configurable, non-writable property):\n * ```\n * _.defineProperty(obj, 'key', value);\n * ```\n *\n * To define some other properties use sum of the flags `_.ENUMERABLE` (or `_.ENUM`), `_.CONFIGURABLE` (or `_.CONF`) and `_.WRITABLE` (or `_.WRIT`):\n * ```\n * _.defineProperty(obj, 'key', value, _.ENUM + _.WRIT);\n * ```\n * Returns `self`.\n *\n * @param {Object} self An object to add a property to\n * @param {String} propertyName the name of the property that will be added\n * @param {Any} value the value of added property\n * @param {Integer} decriptorFlags bit mask of property descriptor properties composed from `_.ENUMERABLE` (or `_.ENUM`), `_.CONFIGURABLE` (or `_.CONF`) and `_.WRITABLE` (or `_.WRIT`)\n * @return {Object}\n */\nfunction defineProperty(propertyName, value, decriptorFlags) {\n Object.defineProperty(this, propertyName,\n _getDescriptor(value, decriptorFlags));\n return this;\n}\n\n\nfunction _getDescriptor(value, decriptorFlags) {\n var descriptor = { value: value };\n if (decriptorFlags)\n extend.call(descriptor, {\n enumerable: !! (decriptorFlags & constants.ENUMERABLE),\n configurable: !! (decriptorFlags & constants.CONFIGURABLE),\n writable: !! (decriptorFlags & constants.WRITABLE)\n });\n\n return descriptor;\n}\n\n\n/**\n * Syntax sugar to shorten usage of `Object.defineProperties`.\n * The simplest usage (to add non-enumerable, non-configurable, non-writable properties):\n * ```\n * _.defineProperties(obj, {\n * key1: value1,\n * key2: value2\n * });\n * ```\n * To define some other properties use sum of the flags `_.ENUMERABLE` (or `_.ENUM`), `_.CONFIGURABLE` (or `_.CONF`) and `_.WRITABLE` (or `_.WRIT`):\n * ```\n * _.defineProperties(obj, {\n * key1: value1,\n * key2: value2\n * }, _.ENUM + _.WRIT);\n * ```\n * Returns `self`.\n *\n * @param {Object} self An object to add a property to\n * @param {Object} propertyValues A map of keys and values of properties thatwill be added. The descriptors of properties will be defined by the following parameters.\n * @param {Integer} decriptorFlags bit mask of property descriptor properties composed from `_.ENUMERABLE` (or `_.ENUM`), `_.CONFIGURABLE` (or `_.CONF`) and `_.WRITABLE` (or `_.WRIT`)\n * @return {Object}\n */\nfunction defineProperties(propertyValues, decriptorFlags) {\n var descriptors = mapKeys.call(propertyValues, function(value) {\n return _getDescriptor(value, decriptorFlags);\n }, true);\n Object.defineProperties(this, descriptors);\n return this;\n}\n\n\n/**\n * Extends object `self` with properties of `obj` to any depth, without overwrtiting existing object properties of `self` with object properties of `obj`.\n * Scalar properties of `obj` will overwrite properties of `self`. Scalar porperties of `self` will also be overwritten.\n * Correctly works with recursive objects.\n * Usage:\n * ```\n * var obj = {\n * inner: {\n * a: 1\n * }\n * };\n *\n * _.deepExtend(obj, {\n * inner: {\n * b: 2\n * }\n * });\n *\n * assert.deepEqual(obj, {\n * inner: {\n * a: 1,\n * b: 2\n * }\n * }); // assert passes\n * ```\n * Returns `self`.\n *\n * @param {Object} self An object to be extended\n * @param {Object} obj An object with properties to copy to\n * @param {Boolean} onlyEnumerable Optional `true` to use only enumerable properties\n * @param {Boolean} preserveStructure if true will throw at the attempt to overwrite object with scalar value (including Date and Regex) and vice versa\n * @return {Object}\n */\nfunction deepExtend(obj, onlyEnumerable, preserveStructure) {\n return _extendTree(this, obj, onlyEnumerable, preserveStructure, []);\n}\n\n\nfunction _extendTree(selfNode, objNode, onlyEnumerable, preserveStructure, objTraversed) {\n if (objTraversed.indexOf(objNode) >= 0) return; // node already traversed, obj has recursion\n\n // store node to recognise recursion\n objTraversed.push(objNode);\n\n var loop = Array.isArray(objNode) ? Array.prototype.forEach : eachKey;\n\n loop.call(objNode, function(value, prop) {\n var hasProp = selfNode.hasOwnProperty(prop)\n , isSelfObj = isNormalObject(selfNode[prop])\n , isValueObj = isNormalObject(value);\n\n if (preserveStructure && hasProp && isSelfObj != isValueObj)\n throw new Error('deepExtend');\n\n if (isValueObj) {\n if (!hasProp || !isSelfObj)\n selfNode[prop] = (Array.isArray(value)) ? [] : {};\n\n _extendTree(selfNode[prop], value, onlyEnumerable, preserveStructure, objTraversed);\n } else {\n var descriptor = Object.getOwnPropertyDescriptor(objNode, prop);\n Object.defineProperty(selfNode, prop, descriptor);\n }\n }, this, onlyEnumerable);\n\n return selfNode;\n}\n\n\nfunction isNormalObject(value) {\n return typeof value == 'object' && value != null\n && !(value instanceof RegExp) && !(value instanceof Date)\n}\n\n\n/**\n * Clones all object tree. Class of original object is not preserved. Returns `self`\n *\n * @param {Object} self An object to be extended\n * @param {Boolean} onlyEnumerable Optional `true` to use only enumerable properties\n * @return {Object}\n */\nfunction deepClone(onlyEnumerable) {\n if (this instanceof Date) return new Date(this);\n if (this instanceof RegExp) return new RegExp(this);\n var clonedObject = Array.isArray(this) ? [] : {};\n deepExtend.call(clonedObject, this, onlyEnumerable);\n return clonedObject;\n}\n\n\n/**\n * Returns array of enumerable properties of the object\n *\n * @param {Object} self object to return keys of\n * @return {Array}\n */\nfunction keys() {\n return Object.keys(this);\n}\n\n\n/**\n * Returns array of values of the object's keys\n *\n * @param {Object} self object to return values from\n * @return {Array}\n */\nfunction values(onlyEnumerable) {\n var properties = onlyEnumerable\n ? Object.keys(this)\n : allKeys.call(this);\n\n return properties.map(function(prop) {\n return this[prop];\n }, this);\n}\n\n\n/**\n * Returns array of all property names of an object `self` (including non-enumerbale).\n * To get only enumerable properties, use `Object.keys()`.\n *\n * @param {Object} self An object to get all properties of.\n * @return {Array}\n */\n function allKeys() {\n return Object.getOwnPropertyNames(this);\n }\n\n\n/**\n * An analogue of `indexOf` method of Array prototype.\n * Returns the `key` of `searchElement` in the object `self`.\n * As object keys are unsorted, if there are several keys that hold `searchElement` any of them can be returned. Use `allKeysOf` to return all keys.\n * All own properties are searched (not those inherited via prototype chain), including non-enumerable properties (unless `onlyEnumerable` is truthy).\n *\n * @param {Object} self An object to search a value in\n * @param {Any} searchElement An element that will be searched. An exact equality is tested, so `0` is not the same as `'0'`.\n * @param {Boolean} onlyEnumerable An optional true to search among enumerable properties only.\n * @return {String}\n */\nfunction keyOf(searchElement, onlyEnumerable) {\n var properties = onlyEnumerable\n ? Object.keys(this)\n : allKeys.call(this);\n\n for (var i = 0; i < properties.length; i++)\n if (searchElement === this[properties[i]])\n return properties[i];\n\n return undefined;\n}\n\n\n/**\n * Works similarly to the previous function, but returns the array of keys holding `searchElement` as their value.\n *\n * @param {Object} self An object to search a value in\n * @param {Any} searchElement An element that will be searched. An exact equality is tested, so `0` is not the same as `'0'`.\n * @param {Boolean} onlyEnumerable An optional true to search among enumerable properties only.\n * @return {Array[String]}\n */\nfunction allKeysOf(searchElement, onlyEnumerable) {\n var properties = onlyEnumerable\n ? Object.keys(this)\n : allKeys.call(this);\n\n var keys = properties.filter(function(prop) {\n return searchElement === this[prop];\n }, this);\n\n return keys;\n}\n\n\n/**\n * An analogue of [forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) method of Array prototype.\n * Iterates all own properties of `self` (or only enumerable own properties if `onlyEnumerable` is truthy) calling callback for each key.\n * This method should not be used with arrays, it will include `length` property in iteration.\n * To iterate array-like objects (e.g., `arguments` pseudo-array) use:\n * ```\n * _.forEach(arguments, callback, thisArg);\n * ```\n * Function returns `self` to allow [chaining](proto.js.html)\n *\n * @param {Object} self An object which properties will be iterated\n * @param {Function} callback Callback is passed `value`, `key` and `self`, its return value is not used.\n * @param {Object} thisArg An optional context of iteration (the valueof `this`), will be undefined if this parameter is not passed.\n * @param {Boolean} onlyEnumerable An optional `true` to iterate enumerable properties only.\n */\nfunction eachKey(callback, thisArg, onlyEnumerable) {\n var properties = onlyEnumerable\n ? Object.keys(this)\n : allKeys.call(this);\n\n properties.forEach(function(prop) {\n callback.call(thisArg, this[prop], prop, this);\n }, this);\n\n return this;\n}\n\n\n/**\n * An analogue of [map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) method of Array prototype.\n * Returns the object that is the result of the application of callback to values in all own properties of `self` (or only enumerable own properties if `onlyEnumerable` is truthy).\n * The returned object will be the instance of the same class as `self`.\n * Property descriptors of the returned object will have the same `enumerable`, `configurable` and `writable` settings as the properties of `self`.\n * This method should not be used with arrays, it will include `length` property in iteration.\n * To map array-like objects use:\n * ```\n * var result = _.map(arguments, callback, thisArg);\n * ```\n *\n * @param {Object} self An object which properties will be iterated\n * @param {Function} callback Callback is passed `value`, `key` and `self` and should return value that will be included in the map.\n * @param {Object} thisArg An optional context of iteration (the valueof `this`), will be undefined if this parameter is not passed.\n * @param {Boolean} onlyEnumerable An optional `true` to iterate enumerable properties only.\n * @return {Object}\n */\nfunction mapKeys(callback, thisArg, onlyEnumerable) {\n var descriptors = {};\n eachKey.call(this, mapProperty, thisArg, onlyEnumerable);\n return Object.create(this.constructor.prototype, descriptors);\n\n function mapProperty(value, key, self) {\n descriptors[key] = Object.getOwnPropertyDescriptor(self, key);\n descriptors[key].value = callback.call(this, value, key, self);\n }\n}\n\n\n/**\n * An analogue of [reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) method of Array prototype.\n * This method reduces the object to a single value. Iteration order is impossible to control with object.\n * This method should not be used with arrays, it will include `length` property in iteration.\n * To reduce array-like objects use:\n * ```\n * var result = _.reduce(arguments, callback, initialValue, thisArg);\n * ```\n *\n * @param {Object} self An object which properties will be iterated\n * @param {Function} callback Callback is passed `previousValue`, `value`, `key` and `self` and should return value that will be used as the `previousValue` for the next `callback` call.\n * @param {Any} initialValue The initial value passed to callback as the first parameter on the first call.\n * @param {Object} thisArg An optional context of iteration (the valueof `this`), will be undefined if this parameter is not passed.\n * @param {Boolean} onlyEnumerable An optional `true` to iterate enumerable properties only.\n * @return {Any}\n */\nfunction reduceKeys(callback, initialValue, thisArg, onlyEnumerable) {\n var properties = onlyEnumerable\n ? Object.keys(this)\n : allKeys.call(this);\n\n var memo = initialValue;\n\n properties.forEach(function(prop) {\n memo = callback.call(thisArg, memo, this[prop], prop, this);\n }, this);\n\n return memo;\n}\n\n\n/**\n * An analogue of [filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) method of Array prototype.\n * Returns the new object with keys for which callback returns true.\n * Property descriptors of the returned object will have the same `enumerable`, `configurable` and `writable` settings as the properties of `self`.\n * To filter array-like objects use:\n * ```\n * var result = _.filter(arguments, callback, thisArg);\n * ```\n *\n * @param {Object} self An object which properties will be iterated\n * @param {Function} callback Callback is passed `value`, `key` and `self`. If it returns truthy value, the key/value will be included in the resulting object.\n * @param {Object} thisArg An optional context of iteration (the valueof `this`), will be undefined if this parameter is not passed.\n * @param {Boolean} onlyEnumerable An optional `true` to iterate enumerable properties only.\n * @return {Object}\n */\nfunction filterKeys(callback, thisArg, onlyEnumerable) {\n var descriptors = {};\n eachKey.call(this, filterProperty, thisArg, onlyEnumerable);\n return Object.create(this.constructor.prototype, descriptors);;\n\n function filterProperty(value, key, self) {\n if (callback.call(this, value, key, self))\n descriptors[key] = Object.getOwnPropertyDescriptor(self, key);\n }\n}\n\n\nvar _passed = {}\n , _didNotPass = {};\n\n/**\n * An analogue of [some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some) method of Array prototype.\n *\n * @param {Object} self An object which properties will be iterated\n * @param {Function} callback Callback is passed `value`, `key` and `self`. If it returns truthy value, the function immeaditely returns `true`.\n * @param {Object} thisArg An optional context of iteration (the valueof `this`), will be undefined if this parameter is not passed.\n * @param {Boolean} onlyEnumerable An optional `true` to iterate enumerable properties only.\n * @return {Boolean}\n */\nfunction someKey(callback, thisArg, onlyEnumerable) {\n try {\n eachKey.call(this, testProperty, thisArg, onlyEnumerable);\n } catch (test) {\n if (test === _passed) return true;\n else throw test;\n }\n return false;\n\n function testProperty(value, key, self) {\n if (callback.call(this, value, key, self))\n throw _passed;\n }\n}\n\n\n/**\n * An analogue of [every](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every) method of Array prototype.\n *\n * @param {Object} self An object which properties will be iterated\n * @param {Function} callback Callback is passed `value`, `key` and `self`. If it returns falsy value, the function immeaditely returns `false`.\n * @param {Object} thisArg An optional context of iteration (the valueof `this`), will be undefined if this parameter is not passed.\n * @param {Boolean} onlyEnumerable An optional `true` to iterate enumerable properties only.\n * @return {Boolean}\n */\nfunction everyKey(callback, thisArg, onlyEnumerable) {\n try {\n eachKey.call(this, testProperty, thisArg, onlyEnumerable);\n } catch (test) {\n if (test === _didNotPass) return false;\n else throw test;\n }\n return true;\n\n function testProperty(value, key, self) {\n if (! callback.call(this, value, key, self))\n throw _didNotPass;\n }\n}\n\n\nvar ArrayProto = Array.prototype\n , concat = ArrayProto.concat;\n/**\n * Returns object of the same class with only specified keys, that are passed as string parameters or array(s) of keys.\n *\n * @param {Object} self an object to pick keys from\n * @param {List[String|Array]} arguments list of keys (or array(s) of keys)\n * @return {Object}\n */\nfunction pickKeys() { // , ... keys\n var keys = concat.apply(ArrayProto, arguments)\n , obj = Object.create(this.constructor.prototype);\n keys.forEach(function(key) {\n if (this.hasOwnProperty(key))\n obj[key] = this[key];\n }, this);\n return obj;\n}\n\n\n/**\n * Returns object of the same class without specified keys, that are passed as string parameters or array(s) of keys.\n *\n * @param {Object} self an object to omit keys in\n * @param {List[String|Array]} arguments list of keys (or array(s) of keys)\n * @return {Object}\n */\nfunction omitKeys() { // , ... keys\n var keys = concat.apply(ArrayProto, arguments)\n , obj = clone.call(this);\n keys.forEach(function(key){\n delete obj[key];\n }, this);\n return obj;\n}\n\n\n/**\n * Performs deep equality test of the object. Does not work with recursive objects\n * @param {Any} self object to compare\n * @param {Any} obj object to compare\n * @return {Boolean}\n */\nfunction isEqual(obj) {\n if (this === obj) return this !== 0 || 1/this == 1/obj; // 0 and -0 are considered not equal, although 0 === -0 is true\n if (this == null || obj == null) return false;\n var className = this.constructor.name;\n if (className != obj.constructor.name) return false;\n switch (className) {\n case 'String':\n return this == String(obj);\n case 'Number':\n return this != +this ? obj != +obj : (this == 0 ? 1/this == 1/obj : this == +obj);\n case 'Date':\n case 'Boolean':\n return +this == +obj;\n case 'RegExp':\n return this.source == obj.source\n && this.global == obj.global\n && this.multiline == obj.multiline\n && this.ignoreCase == obj.ignoreCase;\n }\n if (typeof this != 'object' || typeof obj != 'object') return false;\n\n if (Array.isArray(this))\n return this.length == obj.length\n && this.every(function(item, index) {\n return isEqual.call(item, obj[index]);\n });\n else {\n return allKeys.call(this).length == allKeys.call(obj).length\n && everyKey.call(this, function(value, key) {\n return isEqual.call(value, obj[key]);\n });\n }\n}\n\n\n/**\n * The opposite of isEqual\n * @param {Any} self object to compare\n * @param {Any} obj object to compare\n * @return {Boolean}\n */\nfunction isNot(obj) {\n return !isEqual.call(this, obj);\n}\n", "'use strict';\n\n/**\n * - [extendProto](#extendProto)\n * - [createSubclass](#createSubclass)\n * - [makeSubclass](#makeSubclass)\n * - [newApply](#newApply)\n *\n * These methods can be [chained](proto.js.html#Proto)\n */\nvar prototypeMethods = module.exports = {\n extendProto: extendProto,\n createSubclass: createSubclass,\n makeSubclass: makeSubclass,\n newApply: newApply\n};\n\n\nvar __ = require('./proto_object');\n\n__.extend.call(__, require('./proto_function'));\n\n\n/**\n * Adds non-enumerable, non-configurable and non-writable properties to the prototype of constructor function.\n * Usage:\n * ```\n * function MyClass() {}\n * _.extendProto(MyClass, {\n * method1: function() {},\n * method2: function() {}\n * });\n * ```\n * To extend class via object:\n * ```\n * _.extendProto(obj.constructor, methods);\n * ```\n * Returns passed constructor, so functions _.extendProto, [_.extend](object.js.html#extend) and _.makeSubclass can be [chained](proto.js.html). \n *\n * @param {Function} self constructor function\n * @param {Object} methods a map of functions, keys will be instance methods (properties of the constructor prototype)\n * @return {Function}\n */\nfunction extendProto(methods) {\n var propDescriptors = {};\n\n __.eachKey.call(methods, function(method, name) {\n propDescriptors[name] = {\n enumerable: false,\n configurable: false,\n writable: false,\n value: method\n };\n });\n\n Object.defineProperties(this.prototype, propDescriptors);\n return this;\n}\n\n\n/**\n * Makes a subclass of class `thisClass`.\n * The returned function will have specified `name` if supplied.\n * The constructor of superclass will be called in subclass constructor by default unless `applyConstructor === false` (not just falsy).\n * Copies `thisClass` class methods to created subclass. For them to work correctly they should use `this` to refer to the class rather than explicit superclass name.\n *\n * @param {Function} thisClass A class to make subclass of\n * @param {String} name Optional name of subclass constructor function\n * @param {Boolean} applyConstructor Optional false value (not falsy) to prevent call of inherited constructor in the constructor of subclass\n * @return {Function}\n */\nfunction createSubclass(name, applyConstructor) {\n var thisClass = this;\n var subclass;\n\n // name is optional\n name = name || '';\n\n // apply superclass constructor\n var constructorCode = applyConstructor === false\n ? ''\n : 'thisClass.apply(this, arguments);';\n\n eval('subclass = function ' + name + '(){ ' + constructorCode + ' }');\n\n makeSubclass.call(subclass, thisClass);\n\n // copy class methods\n // - for them to work correctly they should not explictly use superclass name\n // and use \"this\" instead\n __.deepExtend.call(subclass, thisClass, true);\n\n return subclass;\n}\n\n\n/**\n * Sets up prototype chain to change `thisClass` (a constructor function) so that it becomes a subclass of `Superclass`.\n * Returns `thisClass` so it can be [chained](proto.js.html) with _.extendProto and [_.extend](object.js.html#extend).\n *\n * @param {Function} thisClass A class that will become a subclass of Superclass\n * @param {Function} Superclass A class that will become a superclass of thisClass\n * @return {Function}\n */\nfunction makeSubclass(Superclass) {\n // prototype chain\n this.prototype = Object.create(Superclass.prototype);\n \n // subclass identity\n extendProto.call(this, {\n constructor: this\n });\n return this;\n}\n\n\n/**\n * Calls constructor `this` with arguments passed as array\n * \n * @param {Function} thisClass A class constructor that will be called\n * @return {Array|Array-like} args Array of arguments that will be passed to constructor\n */\nfunction newApply(args) {\n if (! Array.isArray(args))\n args = Array.prototype.slice.call(args);\n // \"null\" is context to pass to class constructor, first parameter of bind\n var args = [null].concat(args);\n return new (Function.prototype.bind.apply(this, args));\n}\n", - "'use strict';\n\n\nvar __ = require('./proto_object');\n\n\n/**\n * - [firstUpperCase](#firstUpperCase)\n * - [firstLowerCase](#firstLowerCase)\n * - [toRegExp](#toRegExp)\n * - [toFunction](#toFunction)\n * - [toDate](#toDate)\n * - [toQueryString](#toQueryString)\n * - [fromQueryString](#fromQueryString)\n * - [jsonParse](#jsonParse)\n * - [hashCode](#hashCode)\n * - [unPrefix](#unPrefix)\n * - [format](#format)\n */\n var stringMethods = module.exports = {\n firstUpperCase: firstUpperCase,\n firstLowerCase: firstLowerCase,\n toRegExp: toRegExp,\n toFunction: toFunction,\n toDate: toDate,\n toQueryString: toQueryString,\n fromQueryString: fromQueryString,\n jsonParse: jsonParse,\n hashCode: hashCode,\n unPrefix: unPrefix,\n format: format\n};\n\n\n/**\n * Returns string with the first character changed to upper case.\n *\n * @param {String} self A string that will have its first character replaced\n */\nfunction firstUpperCase() {\n return this ? this[0].toUpperCase() + this.slice(1) : this;\n}\n\n\n/**\n * Returns string with the first character changed to lower case.\n *\n * @param {String} self A string that will have its first character replaced\n */\nfunction firstLowerCase() {\n return this ? this[0].toLowerCase() + this.slice(1) : this;\n}\n\n\n/**\n * Converts string created by `toString` method of RegExp back to RegExp\n *\n * @param {String} self string containing regular expression including enclosing \"/\" symbols and flags\n * @return {RegExp}\n */\nfunction toRegExp() {\n var rx = this.match(regexpStringPattern);\n if (rx) return new RegExp(rx[1], rx[2]);\n}\nvar regexpStringPattern = /^\\/(.*)\\/([gimy]*)$/;\n\n\n/**\n * Converts string created by `toString` method of function back to function\n *\n * @param {String} self string containing full function code\n * @return {Function}\n */\nfunction toFunction() {\n var func;\n var code = 'func = ' + this + ';';\n try {\n eval(code);\n return func;\n } catch(e) {\n return;\n }\n}\n\n\n/**\n * Converts string to date in a safe way so that the resiult is undefined if date is invalid\n *\n * @param {String|Date} self string or date object to convert to VALID date\n * @return {[type]} [description]\n */\nfunction toDate() {\n if (! this) return;\n try {\n var date = new Date(this);\n } catch (e) {}\n if (date && date.getTime && !isNaN(date.getTime()))\n return date;\n}\n\n\n/**\n * Convert params object to a url style query string (without \"?\")\n * \n * @param {Object} self The object hash to be converted\n * @param {Function} encode optional function used to encode data, encodeURIComponent is used if not specified\n * @return {String} the resulting query string\n */\nfunction toQueryString(encode) {\n var qs = ''\n , params = this || {}\n , encode = encode || encodeURIComponent;\n\n __.eachKey.call(params, function(value, key) {\n qs += key + '=' + encode(value) + '&';\n });\n \n return qs.slice(0, -1);\n}\n\n\n/**\n * Convert url style query string (without \"?\") into object hash\n * \n * @param {String} self The string to be converted\n * @param {Function} decode optional decode function, decodeURIComponent will be used if not supplied\n * @return {Object} The resulting object hash\n */\nfunction fromQueryString(decode) {\n var pairs = this.split('&')\n , results = {}\n , decode = decode || decodeURIComponent;\n\n pairs.forEach(function(pair) {\n var splitPair = pair.split('=');\n if (splitPair.length < 2) return;\n var key = splitPair[0]\n , value = decode(splitPair[1] || '');\n if (!key) return;\n results[key] = value;\n });\n\n return results;\n}\n\n\n/**\n * Safe JSON.parse, returns undefined if JSON.parse throws an exception\n *\n * @param {String} self JSON string representation of object\n * @return {Object|undefined}\n */\nfunction jsonParse() {\n try {\n return JSON.parse(this);\n } catch (e) {}\n}\n\n\n/**\n * Dan Bernstein's algorythm to create hash from string\n *\n * @param {String} self string to convert to hash\n * @return {Number}\n */\nfunction hashCode() {\n var hash = 5381\n , str = this\n , len = str.length;\n for (var i = 0; i < len; i++) {\n var char = str.charCodeAt(i);\n hash = ((hash << 5) + hash) + char; /* hash * 33 + c */\n }\n return hash;\n}\n\n\n/**\n * Removes given prefix from the string. If string does not begin from the prefix, returns undefined\n * \n * @param {String} self\n * @return {String}\n */\nfunction unPrefix(str) {\n if (this.indexOf(str) == 0)\n return this.replace(str, '');\n}\n\n\n/**\n * Regex used to identify format vars\n * @type {RegExp}\n */\nvar formatRegexp = /\\$[0-9]+|\\$\\$/g;\n\n/**\n * String formatting utility to swap out tokens for variables.\n * @param {String} this The string to be formatted \n * @param {Array} args The values to be formatted\n * @return {String} The formatted string\n */\nfunction format() { // , ... arguments\n var str = this;\n var args = arguments;\n return str.replace(formatRegexp, function(item) {\n if (item == '$$') return '$';\n item = item.slice(1);\n return args[item - 1];\n });\n};\n", + "'use strict';\n\n\nvar __ = require('./proto_object');\n\n\n/**\n * - [firstUpperCase](#firstUpperCase)\n * - [firstLowerCase](#firstLowerCase)\n * - [toRegExp](#toRegExp)\n * - [toFunction](#toFunction)\n * - [toDate](#toDate)\n * - [toQueryString](#toQueryString)\n * - [fromQueryString](#fromQueryString)\n * - [jsonParse](#jsonParse)\n * - [hashCode](#hashCode)\n * - [unPrefix](#unPrefix)\n * - [format](#format)\n */\n var stringMethods = module.exports = {\n firstUpperCase: firstUpperCase,\n firstLowerCase: firstLowerCase,\n toRegExp: toRegExp,\n toFunction: toFunction,\n toDate: toDate,\n toQueryString: toQueryString,\n fromQueryString: fromQueryString,\n jsonParse: jsonParse,\n hashCode: hashCode,\n unPrefix: unPrefix,\n format: format\n};\n\n\n/**\n * Returns string with the first character changed to upper case.\n *\n * @param {String} self A string that will have its first character replaced\n */\nfunction firstUpperCase() {\n return this ? this[0].toUpperCase() + this.slice(1) : this;\n}\n\n\n/**\n * Returns string with the first character changed to lower case.\n *\n * @param {String} self A string that will have its first character replaced\n */\nfunction firstLowerCase() {\n return this ? this[0].toLowerCase() + this.slice(1) : this;\n}\n\n\n/**\n * Converts string created by `toString` method of RegExp back to RegExp\n *\n * @param {String} self string containing regular expression including enclosing \"/\" symbols and flags\n * @return {RegExp}\n */\nfunction toRegExp() {\n var rx = this.match(regexpStringPattern);\n if (rx) return new RegExp(rx[1], rx[2]);\n}\nvar regexpStringPattern = /^\\/(.*)\\/([gimy]*)$/;\n\n\n/**\n * Converts string created by `toString` method of function back to function\n *\n * @param {String} self string containing full function code\n * @return {Function}\n */\nfunction toFunction() {\n var func;\n var code = 'func = ' + this + ';';\n try {\n eval(code);\n return func;\n } catch(e) {\n return;\n }\n}\n\n\n/**\n * Converts string to date in a safe way so that the resiult is undefined if date is invalid\n *\n * @param {String|Date} self string or date object to convert to VALID date\n * @return {[type]} [description]\n */\nfunction toDate() {\n if (! this) return;\n try {\n var date = new Date(this);\n } catch (e) {}\n if (date && date.getTime && !isNaN(date.getTime()))\n return date;\n}\n\n\n/**\n * Convert params object to a url style query string (without \"?\")\n * \n * @param {Object} self The object hash to be converted\n * @param {Function} encode optional function used to encode data, encodeURIComponent is used if not specified\n * @return {String} the resulting query string\n */\nfunction toQueryString(encode) {\n var qs = ''\n , params = this || {}\n , encode = encode || encodeURIComponent;\n\n __.eachKey.call(params, function(value, key) {\n qs += key + '=' + encode(value) + '&';\n });\n \n return qs.slice(0, -1);\n}\n\n\n/**\n * Convert url style query string (without \"?\") into object hash\n * \n * @param {String} self The string to be converted\n * @param {Function} decode optional decode function, decodeURIComponent will be used if not supplied\n * @return {Object} The resulting object hash\n */\nfunction fromQueryString(decode) {\n var pairs = this.split('&')\n , results = {}\n , decode = decode || decodeURIComponent;\n\n pairs.forEach(function(pair) {\n var splitPair = pair.split('=');\n if (splitPair.length < 2) return;\n var key = splitPair[0]\n , value = decode(splitPair[1] || '');\n if (!key) return;\n results[key] = value;\n });\n\n return results;\n}\n\n\n/**\n * Safe JSON.parse, returns undefined if JSON.parse throws an exception\n *\n * @param {String} self JSON string representation of object\n * @return {Object|undefined}\n */\nfunction jsonParse() {\n try {\n return JSON.parse(this);\n } catch (e) {}\n}\n\n\n/**\n * Dan Bernstein's algorythm to create hash from string\n *\n * @param {String} self string to convert to hash\n * @return {Number}\n */\nfunction hashCode() {\n var hash = 5381\n , str = this\n , len = str.length;\n for (var i = 0; i < len; i++) {\n var char = str.charCodeAt(i);\n hash = ((hash << 5) + hash) + char; /* hash * 33 + c */\n }\n return hash;\n}\n\n\n/**\n * Removes given prefix from the string. If string does not begin from the prefix, returns undefined\n * \n * @param {String} self\n * @return {String}\n */\nfunction unPrefix(str) {\n if (this.indexOf(str) == 0)\n return this.replace(str, '');\n}\n\n\n/**\n * Regex used to identify format vars\n * @type {RegExp}\n */\nvar formatRegexp = /\\$[0-9]+|\\$\\$/g;\n\n/**\n * String formatting utility to swap out tokens for variables.\n * @param {String} this The string to be formatted \n * @param {Array} args The values to be formatted\n * @return {String} The formatted string\n */\nfunction format() { // , ... arguments\n var str = this;\n var args = arguments;\n return str.replace(formatRegexp, function (item) {\n if (item == '$$') return '$';\n item = item.slice(1);\n return args[item - 1];\n });\n};\n", "'use strict';\n\n/**\n * - [times](#times)\n * - [repeat](#repeat)\n * - [tap](#tap)\n * - [result](#result)\n * - [identity](#identity)\n * - [property](#property)\n * - [compareProperty](#compareProperty)\n * - [noop](#noop)\n */\nvar utilMethods = module.exports = {\n times: times,\n repeat: repeat,\n tap: tap,\n result: result,\n identity: identity,\n property: property,\n compareProperty: compareProperty,\n noop: noop\n};\n\n\n/**\n * Calls `callback` `self` times with `thisArg` as context. Callback is passed iteration index from 0 to `self-1`\n * \n * @param {Integer} self\n * @param {Function} callback\n * @param {Any} thisArg\n * @return {Array}\n */\nfunction times(callback, thisArg) {\n var arr = Array(Math.max(0, this));\n for (var i = 0; i < this; i++)\n arr[i] = callback.call(thisArg, i);\n return arr;\n}\n\n\n/**\n * Returns array with the first argument repeated `times` times\n * @param {Any} self\n * @param {Integer} times\n * @return {Array[Any]}\n */\nfunction repeat(times) {\n var arr = Array(Math.max(0, times));;\n for (var i = 0; i < times; i++)\n arr[i] = this;\n return arr;\n}\n\n\n/**\n * Function to tap into chained methods and to inspect intermediary result\n *\n * @param {Any} self value that's passed between chained methods\n * @param {Function} func function that will be called with the value (both as context and as the first parameter)\n * @return {Any}\n */\nfunction tap(func) {\n func.call(this, this);\n return this;\n};\n\n\n/**\n * Calls function `self` (first parameter of _.result) with given context and arguments\n * \n * @param {Function|Any} self\n * @param {Any} thisArg context\n * @param {List} arguments extra arguments\n * @return {Any}\n */\nfunction result(thisArg) { //, arguments\n var args = Array.prototype.slice.call(arguments, 1);\n return typeof this == 'function'\n ? this.apply(thisArg, args)\n : this;\n}\n\n\n/**\n * Returns self. Useful for using as an iterator if the actual value needs to be returned. Unlike in underscore and lodash, this function is NOT used as default iterator.\n *\n * @param {Any} self \n * @return {Any}\n */\nfunction identity() {\n return this;\n}\n\n\n/**\n * Returns function that picks the property from the object\n *\n * @param {String} self\n * @return {Function}\n */\nfunction property() {\n var key = this;\n return function(obj) {\n return obj[key];\n };\n}\n\n\n/**\n * Returns function that can be used in array sort to sort by a given property\n *\n * @param {String} self\n * @return {Function}\n */\nfunction compareProperty() {\n var key = this;\n return function(a, b) {\n return a[key] < b[key]\n ? -1\n : a[key] > b[key]\n ? 1\n : 0;\n };\n}\n\n\n/**\n * Function that does nothing\n */\nfunction noop() {}\n", "'use strict';\n\nvar utils = module.exports = {\n makeProtoInstanceMethod: makeProtoInstanceMethod,\n makeProtoFunction: makeProtoFunction,\n makeFindMethod: makeFindMethod\n}\n\n\nfunction makeProtoInstanceMethod(method) {\n return function() {\n this.self = method.apply(this.self, arguments);\n return this;\n };\n}\n\n\nfunction makeProtoFunction(method) {\n return function() {\n // when the method is executed, the value of \"this\" will be arguments[0],\n // other arguments starting from #1 will passed to method as parameters.\n return method.call.apply(method, arguments);\n };\n}\n\n\nvar _error = new Error;\n\n/**\n * Returns `find` or `findIndex` method, depending on parameter\n *\n * @param {Function} eachMethod - method to use for iteration (forEach for array or eachKey for object)\n * @param {String} findWhat 'value' - returns find method of Array (implemented in ES6) or findValue method of Object, anything else = returns findIndex/findKey methods.\n * @return {Function}\n */\nfunction makeFindMethod(someMethod, findWhat) {\n var argIndex = findWhat == 'value' ? 0 : 1;\n\n return function findValueOrIndex(callback, thisArg, onlyEnumerable) {\n var foundValueOrIndex;\n var found = someMethod.call(this, testItem, thisArg, onlyEnumerable);\n if (found)\n return foundValueOrIndex;\n // if looking for index and not found, return -1\n else if (argIndex && someMethod == Array.prototype.some)\n return -1;\n\n function testItem(value, index, self) {\n var test = callback.call(this, value, index, self);\n if (test) {\n foundValueOrIndex = arguments[argIndex]\n return test;\n }\n }\n }\n}\n" ] diff --git a/dist/milo.min.js b/dist/milo.min.js index 3d39c48..02676a7 100644 --- a/dist/milo.min.js +++ b/dist/milo.min.js @@ -1,7 +1,9 @@ -!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":84}],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":57,"../c_facet":16,"../scope":41,"./cf_registry":31,"milo-core":84}],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":55,"milo-core":84}],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":84}],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":60,"../c_facet":16,"../msg_api/drop":38,"../msg_src/dom_events":39,"./cf_registry":31,"milo-core":84}],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":84}],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":46,"../c_facet":16,"../msg_src/frame":40,"./cf_registry":31,"milo-core":84}],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":48,"../c_facet":16,"./cf_registry":31,"milo-core":84}],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":42,"../../services/mail":48,"../../util/component_name":53,"../../util/dom":57,"../c_class":15,"../c_facet":16,"./cf_registry":31,"milo-core":84}],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":84}],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":84}],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":84}],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":84}],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":53,"./c_facets/cf_registry":31,"./c_registry":33,"./scope":41,"milo-core":84}],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":42,"milo-core":84}],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":84}],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":84}],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":84}],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":47,"../c_class":15,"milo-core":84}],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":84}],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":53,"milo-core":84}],42:[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":84}],43:[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":42,"./services/mail":48,"./util/dom":57,"./util/request":65,"milo-core":84}],44:[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("./components/classes/View"),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,"./components/classes/View":35,"./config":42,"./loader":43,"./registry":45,"./services/mail":48,"./services/window":51,"./use_facets":52,"./util":63,"./util/create_component_class":54,"./util/create_facet_class":55,"milo-core":84}],45:[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}],46:[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":84}],47:[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":46,"milo-core":84}],48:[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":49,"./mail_source":50,"milo-core":84}],49:[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":84}],50:[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":46,"milo-core":84}],51:[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":47,"milo-core":84}],52:[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}],53:[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":42,"./unique_id":70}],54:[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":84}],55:[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":84}],56:[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":42,"milo-core":84}],57:[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":42,"milo-core":84}],58:[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":84}],59:[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":84}],60:[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":42,base32:74,"milo-core":84}],61:[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":84}],62:[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":57,"milo-core":84}],63:[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"),deprecate:f,doT:e.util.doT,destroy:d};b.exports=g},{"./component_name":53,"./deprecate":56,"./dom":57,"./dom_listeners":58,"./domready":59,"./dragdrop":60,"./error":61,"./fragment":62,"./json_parse":64,"./request":65,"./selection":66,"./storage":67,"./unique_id":70,"./websocket":71,"milo-core":84}],64:[function(a,b,c){"use strict";function d(a){try{return JSON.parse(a)}catch(b){}}b.exports=d},{}],65:[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":42,"./unique_id":70,"milo-core":84}],66:[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":57,"milo-core":84}],67:[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":42,"./model":68,"./msg_src":69,"milo-core":84}],68:[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":67,"milo-core":84}],69:[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":42,"../../util/unique_id":70,"milo-core":84}],70:[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},{}],71:[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":72,"./msg_src":73,"milo-core":84}],72:[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":84}],73:[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":42,"../../util/unique_id":70,"milo-core":84}],74:[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":76,"../util/check":95,"./m_source":82,"mol-proto":101}],80:[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(b){var c,d=this.translateToSourceMessage(b);if("undefined"!=typeof d)return this._internalMessages.hasOwnProperty(d)?(c=this._internalMessages[d],void(-1==c.indexOf(b)?c.push(b):a("../util/logger").warn("Duplicate addInternalMessage call for internal message "+b))):(c=this._internalMessages[d]=[],c.push(b),d)}function h(b){function c(){a("../util/logger").warn("notification received: un-subscribe from internal message "+b+" without previous subscription notification")}var d=this.translateToSourceMessage(b);if("undefined"!=typeof d){var e=this._internalMessages[d];if(e&&e.length){var f=e.indexOf(b);if(f>=0){if(e.splice(f,1),0==e.length)return delete this._internalMessages[d],d}else c()}else c()}}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");b.exports=d,m.extendProto(d,{init:e,destroy:f,addInternalMessage:g,removeInternalMessage:h,getInternalMessages:i,translateToSourceMessage:j,createInternalData:k,filterSourceMessage:l})},{"../util/logger":97,"mol-proto":101}],81:[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":80,"mol-proto":101}],82:[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("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":76,"../util/check":95,"./m_api":80,"mol-proto":101}],83:[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":95,"./m_source":82,"mol-proto":101}],84:[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":77,"./config":78,"./messenger":79,"./minder":85,"./model":88,"./util":96,"mol-proto":101}],85:[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":79,"./model/connector":87,"./util/logger":97,"mol-proto":101}],86:[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),a(this.ds2,"_link1",this.pathTranslation1),this.isOn=!1,this.postMessage("turnedoff")}function m(){this.turnOff(),this.postMessage("destroyed"),this._messenger.destroy(),delete this.ds1,delete this.ds2,this._destroyed=!0}var n=a("../messenger"),o=a("./path_utils"),p=a("mol-proto"),q=a("../util/logger");b.exports=d;var r=/^(\<*)\-+(\>*)$/;p.extendProto(d,{turnOn:k,turnOff:l,destroy:m,changeMode:f,deferChangeMode:g})},{"../messenger":79,"../util/logger":97,"./path_utils":93,"mol-proto":101}],88:[function(a,b,c){"use strict";function d(a,b,c){var e=function(a){return f.apply(e,arguments)};return e.__proto__=d.prototype,e._hostObject=b,e._options=c||{},e._options.reactive!==!1&&(e._prepareMessengers(),e.onSync("changedata",q)),a&&(e._data=a),e}function e(){return this._data}function f(a){return a?(v.splice(arguments,0,0,null,this),new(Function.prototype.bind.apply(m,arguments))):this}function g(a){a=a||this._hostObject,u.prototype._createProxyMethods.call(this[x],r.defaultMethods,a)}function h(a,b,c){c=c||y,u.useWith.call(d,a,b,c)}function i(a){a=a||this._hostObject,u.prototype._createProxyMethods.call(this,y,a)}function j(){var a=new r(this,void 0,void 0),b=new s(this,void 0,new t,a),c=new r(this,void 0,b);v.defineProperty(this,x,c),v.defineProperty(this,"_internalMessenger",a)}function k(){return this._hostObject}function l(){this[x].destroy(),this._internalMessenger.destroy(),this._destroyed=!0}var m=a("./m_path"),n=a("./synthesize"),o=a("./path_utils"),p=a("./model_utils"),q=a("./change_data"),r=a("../messenger"),s=a("../messenger/msngr_source"),t=a("./m_msg_api"),u=a("../abstract/mixin"),v=a("mol-proto"),w=a("../util/check");w.Match,a("../util/logger");b.exports=d,d.prototype.__proto__=d.__proto__,v.extendProto(d,{path:f,get:e,proxyMessenger:g,proxyMethods:i,_prepareMessengers:j,_getHostObject:k,destroy:l}),v.extendProto(d,n.modelMethods),v.extend(d,{Path:m,useWith:h,_utils:{path:o,model:p,changeDataHandler:q}});var x="_messenger";r.useWith(d,x,r.defaultMethods),["len","push","pop","unshift","shift"].forEach(function(a){var b=m.prototype[a];v.defineProperty(d.prototype,a,b)});var y=["path","get","set","del","splice","len","push","pop","unshift","shift"]},{"../abstract/mixin":76,"../messenger":79,"../messenger/msngr_source":83,"../util/check":95,"../util/logger":97,"./change_data":86,"./m_msg_api":89,"./m_path":90,"./model_utils":91,"./path_utils":93,"./synthesize":94,"mol-proto":101}],89:[function(a,b,c){"use strict";function d(a){return a instanceof RegExp?a:f.createRegexPath(a)}var e=a("../messenger/m_api_rx"),f=a("./path_utils"),g=a("mol-proto"),h=g.createSubclass(e,"ModelMsgAPI");b.exports=h,g.extendProto(h,{translateToSourceMessage:d})},{"../messenger/m_api_rx":81,"./path_utils":93,"mol-proto":101}],90:[function(a,b,c){"use strict";function d(a,b){w(b,String);var c=function(a){return f.apply(c,arguments)};c.__proto__=d.prototype,v.defineProperties(c,{_model:a,_path:b,_args:v.slice(arguments,1),_options:a._options});var g=q.parseAccessPath(b);v.defineProperty(c,"_accessPath",e(g,c._args)),c._options.reactive!==!1&&(c._prepareMessenger(),c.onSync("changedata",r));var h=p(b,g);return v.defineProperties(c,h),Object.freeze(c),c}function e(a,b){return a.reduce(function(a,c,d){var e=c.interpolate;return a+(e?"array"==c.syntax?"["+b[e]+"]":"."+b[e]:c.property)},"")}function f(a){if(!a)return this;var b=this._args.length-1;b>0&&(a=a.replace(/\$[1-9][0-9]*/g,function(a){return"$"+(+a.slice(1)+b)}));var c=this._path+a,e=[this._model,c].concat(this._args.slice(1)).concat(v.slice(arguments,1));return v.newApply(d,e)}function g(){return this.path(".length").get()||0}function h(){var a=this.len(),b=a+arguments.length;return v.splice(arguments,0,0,a,0),this.splice.apply(this,arguments),b}function i(){return this.splice(this.len()-1,1)[0]}function j(){var a=this.len();return a+=arguments.length,v.splice(arguments,0,0,0,0),this.splice.apply(this,arguments),a}function k(){return this.splice(0,1)[0]}function l(){var a=new t(this._accessPath),b=new u(this,void 0,a,this._model),c=new s(this,void 0,b);v.defineProperty(this,x,c)}function m(){return{model:this._model,path:this._path,args:this._args}}function n(a){w(a,{model:Function,path:String,args:Array});var b=a.model;return b.apply(b,a.args)}function o(){this[x].destroy()}var p=a("./synthesize"),q=a("./path_utils"),r=a("./change_data"),s=a("../messenger"),t=a("./path_msg_api"),u=a("../messenger/msngr_source"),v=a("mol-proto"),w=a("../util/check");w.Match;b.exports=d,d.prototype.__proto__=d.__proto__,v.extendProto(d,{path:f,len:g,push:h,pop:i,unshift:j,shift:k,_prepareMessenger:l,_getDefinition:m,destroy:o}),v.extend(d,{_createFromDefinition:n});var x="_messenger";s.useWith(d,x,s.defaultMethods)},{"../messenger":79,"../messenger/msngr_source":83,"../util/check":95,"./change_data":86,"./path_msg_api":92,"./path_utils":93,"./synthesize":94,"mol-proto":101}],91:[function(a,b,c){"use strict";function d(a,b){return a>b?b:a>=0?a:a+b>0?a+b:0}var e={normalizeSpliceIndex:d};b.exports=e},{}],92:[function(a,b,c){"use strict";function d(a){h.prototype.init.apply(this,arguments),this.rootPath=a}function e(a){return a instanceof RegExp?a:"datachanges"==a?a:this.rootPath+a}function f(a,b,c){if("datachanges"==b){var d=c.changes.map(g,this).filter(function(a){return a}),e={changes:d,transaction:c.transaction};return e}var e=g.call(this,c);return e}function g(a){var b=a.path,c=i.unPrefix(b,this.rootPath);if("string"==typeof c){var a=i.clone(a);return a.fullPath=b,a.path=c,a}}var h=a("../messenger/m_api"),i=(a("./path_utils"),a("../util/logger"),a("mol-proto")),j=i.createSubclass(h,"ModelPathMsgAPI"); -b.exports=j,i.extendProto(j,{init:d,translateToSourceMessage:e,createInternalData:f})},{"../messenger/m_api":80,"../util/logger":97,"./path_utils":93,"mol-proto":101}],93:[function(a,b,c){"use strict";function d(a,b){b=b||u;var c=[];if(!a)return c;var d=a.replace(b,function(a){var b={property:a};return j.extend(b,x[a[0]]),"$"==a[1]&&(b.interpolate=f(b,!0)),c.push(b),""});if(d)throw new Error("incorrect model path: "+a);return c}function e(a){if(h(a,i.OneOf(String,RegExp)),a instanceof RegExp||-1==a.indexOf("*"))return a;var b=k.parseAccessPath(a,w),c="^",d=!1;b.forEach(function(a){var b=a.property,e=y[b];e?(c+="("+e+"|)",d=!0):c+=b.replace(/(\.|\[|\])/g,"\\$1")}),c+="$";try{return new RegExp(c)}catch(e){throw new Error("can't construct regex for path pattern: "+a)}}function f(a,b){var c=a.property,d=b?2:1;return"array"==a.syntax?c.slice(d,c.length-1):c.slice(d)}function g(a){a=a||["on","off"];var b=j.mapToObject(a,function(a){var b=this[a];return function(a,c){var d=e(a);b.call(this,d,c)}},this);j.defineProperties(this,b)}var h=a("../util/check"),i=h.Match,j=a("mol-proto"),k={parseAccessPath:d,createRegexPath:e,getPathNodeKey:f,wrapMessengerMethods:g};b.exports=k;var l="\\.[A-Za-z_-][A-Za-z0-9_-]*",m="\\[[0-9]+\\]",n="\\$[1-9][0-9]*",o="\\."+n,p="\\["+n+"\\]",q="\\.\\*",r="\\[\\*\\]",s="\\*",t=[l,m,o,p].join("|"),u=new RegExp(t,"g"),v=[t,q,r,s].join("|"),w=new RegExp(v,"g"),x={".":{syntax:"object",empty:"{}"},"[":{syntax:"array",empty:"[]"},"*":{syntax:"match",empty:"{}"}},y={".*":l,"[*]":m};y["*"]=y[".*"]+"|"+y["[*]"]},{"../util/check":95,"mol-proto":101}],94:[function(require,module,exports){"use strict";function _synthesizePathMethods(a,b){var c=_.mapKeys(synthesizers,function(c){return _synthesize(c,a,b)});return c}function _synthesize(synthesizer,path,parsedPath){function addChangeMessage(a,b,c){a.push(c),b[c.path]=c}function addTreeChangesMessages(a,b,c,d,e){var f=valueIsTree(d),g=valueIsTree(e);g&&addMessages(a,b,c,e,"added","newValue"),f&&addMessages(a,b,c,d,"removed","oldValue")}function addMessages(a,b,c,d,e,f){function g(a,b){if(Array.isArray(b)){var c=a+"[$$]";b.forEach(function(a,b){h(a,b,c)})}else{var c=a+".$$";_.eachKey(b,function(a,b){h(a,b,c)})}}function h(c,d,h){var i=h.replace("$$",d),j=b[i];if(j)j.type==e?logger.error("setter error: same message type posted on the same path"):(j.type="changed",j[f]=c);else{var k={path:i,type:e};k[f]=c,addChangeMessage(a,b,k)}valueIsTree(c)&&g(i,c)}g(c,d)}function cloneTree(a){return valueIsNormalObject(a)?_.deepClone(a):a}function protectValue(a){return valueIsNormalObject(a)?Array.isArray(a)?a.slice():Object.create(a):a}function valueIsTree(a){return valueIsNormalObject(a)&&Object.keys(a).length}function valueIsNormalObject(a){return!(null==a||"object"!=typeof a||a instanceof Date||a instanceof RegExp)}function addBatchIdsToMessage(a,b,c){_.defineProperties(a,{__batch_id:b,__msg_id:c})}var method,methodCode=synthesizer({parsedPath:parsedPath,getPathNodeKey:pathUtils.getPathNodeKey});try{eval(methodCode)}catch(e){throw ModelError("ModelPath method compilation error; path: "+path+", code: "+methodCode)}return method}var pathUtils=require("../path_utils"),modelUtils=require("../model_utils"),logger=require("../../util/logger"),fs=require("fs"),doT=require("dot"),_=require("mol-proto"),changeDataHandler=require("../change_data"),getTransactionFlag=changeDataHandler.getTransactionFlag,postTransactionFinished=changeDataHandler.postTransactionFinished,templates={get:"'use strict';\n/* Only use this style of comments, not \"//\" */\n\nmethod = function get() {\n var m = {{# def.modelAccessPrefix }};\n return m {{~ it.parsedPath :pathNode }}\n {{? pathNode.interpolate}}\n && (m = m[this._args[ {{= pathNode.interpolate }} ]])\n {{??}}\n && (m = m{{= pathNode.property }})\n {{?}} {{~}};\n};\n",set:"'use strict';\n/* Only use this style of comments, not \"//\" */\n\n{{# def.include_defines }}\n{{# def.include_create_tree }}\n\n\n/**\n * Template that synthesizes setter for Model and for ModelPath\n */\nmethod = function set(value) {\n {{# def.initVars:'set' }}\n\n {{# def.createTree:'set' }}\n\n {{\n currNode = nextNode;\n currProp = currNode && currNode.property;\n }}\n\n {{ /* assign value to the last property */ }}\n {{? currProp }}\n wasDef = {{# def.wasDefined}};\n {{# def.changeAccessPath }}\n\n var old = m{{# def.currProp }};\n\n {{ /* clone value to prevent same reference in linked models */ }}\n m{{# def.currProp }} = cloneTree(value);\n {{?}}\n\n {{ /* add message related to the last property change */ }}\n if (this._options.reactive !== false) {\n if (! wasDef)\n {{# def.addMsg }} accessPath, type: 'added',\n newValue: value });\n else if (old != value)\n {{# def.addMsg }} accessPath, type: 'changed',\n oldValue: old, newValue: value });\n\n {{ /* add message related to changes in (sub)properties inside removed and assigned value */ }}\n if (! wasDef || old != value)\n addTreeChangesMessages(messages, messagesHash,\n accessPath, old, value); /* defined in the function that synthesizes ModelPath setter */\n\n {{ /* post all stored messages */ }}\n {{# def.postMessages }}\n }\n};\n",del:"'use strict';\n/* Only use this style of comments, not \"//\" */\n\n{{# def.include_defines }}\n{{# def.include_traverse_tree }}\n\nmethod = function del() {\n {{# def.initVars:'del' }}\n\n {{? it.parsedPath.length }}\n {{# def.traverseTree }}\n\n {{\n var currNode = it.parsedPath[count];\n var currProp = currNode.property; \n }}\n\n if (! treeDoesNotExist && m && m.hasOwnProperty && {{# def.wasDefined}}) {\n var old = m{{# def.currProp }};\n delete m{{# def.currProp }};\n {{# def.changeAccessPath }}\n var didDelete = true;\n }\n {{??}}\n if (typeof m != 'undefined') {\n var old = m;\n {{# def.modelAccessPrefix }} = undefined;\n var didDelete = true;\n }\n {{?}}\n\n if (didDelete && this._options.reactive !== false) {\n {{# def.addMsg }} accessPath, type: 'deleted', oldValue: old });\n\n addTreeChangesMessages(messages, messagesHash,\n accessPath, old, undefined); /* defined in the function that synthesizes ModelPath setter */\n\n {{ /* post all stored messages */ }}\n {{# def.postMessages }}\n }\n};\n",splice:"'use strict';\n/* Only use this style of comments, not \"//\" */\n\n{{# def.include_defines }}\n{{# def.include_create_tree }}\n{{# def.include_traverse_tree }}\n\nmethod = function splice(spliceIndex, spliceHowMany) { /* ,... - extra arguments to splice into array */\n {{# def.initVars:'splice' }}\n\n var argsLen = arguments.length;\n var addItems = argsLen > 2;\n\n if (addItems) {\n {{ /* only create model tree if items are inserted in array */ }}\n\n {{ /* if model is undefined it will be set to an empty array */ }} \n var value = [];\n {{# def.createTree:'splice' }}\n\n {{? nextNode }}\n {{\n var currNode = nextNode;\n var currProp = currNode.property;\n var emptyProp = '[]';\n }}\n\n {{# def.createTreeStep }}\n {{?}}\n\n } else if (spliceHowMany > 0) {\n {{ /* if items are not inserted, only traverse model tree if items are deleted from array */ }}\n {{? it.parsedPath.length }}\n {{# def.traverseTree }}\n\n {{\n var currNode = it.parsedPath[count];\n var currProp = currNode.property; \n }}\n\n {{ /* extra brace closes 'else' in def.traverseTreeStep */ }}\n {{# def.traverseTreeStep }} }\n {{?}}\n }\n\n {{ /* splice items */ }}\n if (addItems || (! treeDoesNotExist && m\n && m.length > spliceIndex ) ) {\n var oldLength = m.length = m.length || 0;\n\n arguments[0] = spliceIndex = normalizeSpliceIndex(spliceIndex, m.length);\n\n {{ /* clone added arguments to prevent same references in linked models */ }}\n if (addItems)\n for (var i = 2; i < argsLen; i++)\n arguments[i] = cloneTree(arguments[i]);\n\n {{ /* actual splice call */ }}\n var removed = Array.prototype.splice.apply(m, arguments);\n\n if (this._options.reactive !== false) {\n {{# def.addMsg }} accessPath, type: 'splice',\n index: spliceIndex, removed: removed, addedCount: addItems ? argsLen - 2 : 0,\n newValue: m });\n\n if (removed && removed.length)\n removed.forEach(function(item, index) {\n var itemPath = accessPath + '[' + (spliceIndex + index) + ']';\n {{# def.addMsg }} itemPath, type: 'removed', oldValue: item });\n\n if (valueIsTree(item))\n addMessages(messages, messagesHash, itemPath, item, 'removed', 'oldValue');\n });\n\n if (addItems)\n for (var i = 2; i < argsLen; i++) {\n var item = arguments[i];\n var itemPath = accessPath + '[' + (spliceIndex + i - 2) + ']';\n {{# def.addMsg }} itemPath, type: 'added', newValue: item });\n\n if (valueIsTree(item))\n addMessages(messages, messagesHash, itemPath, item, 'added', 'newValue');\n }\n\n {{ /* post all stored messages */ }}\n {{# def.postMessages }}\n }\n }\n\n return removed || [];\n}\n"},include_defines="'use strict';\n/* Only use this style of comments, not \"//\" */\n\n/**\n * Inserts initialization code\n */\n {{## def.initVars:method:\n var m = {{# def.modelAccessPrefix }};\n var messages = [], messagesHash = {};\n var accessPath = '';\n var treeDoesNotExist;\n /* hack to prevent sending finished events to allow for propagation of batches without splitting them */\n var inChangeTransaction = getTransactionFlag( {{= method }} );\n #}}\n\n/**\n * Inserts the beginning of function call to add message to list\n */\n{{## def.addMsg: addChangeMessage(messages, messagesHash, { path: #}}\n\n/**\n * Inserts current property/index for both normal and interpolated properties/indexes\n */\n{{## def.currProp:{{? currNode.interpolate }}[this._args[ {{= currNode.interpolate }} ]]{{??}}{{= currProp }}{{?}} #}}\n\n/**\n * Inserts condition to test whether normal/interpolated property/index exists\n */\n{{## def.wasDefined: m.hasOwnProperty(\n {{? currNode.interpolate }}\n this._args[ {{= currNode.interpolate }} ]\n {{??}}\n '{{= it.getPathNodeKey(currNode) }}'\n {{?}}\n) #}}\n\n\n/**\n * Inserts code to update access path for current property\n * Because of the possibility of interpolated properties, it can't be calculated in template, it can only be calculated during accessor call.\n */\n{{## def.changeAccessPath:\n accessPath += {{? currNode.interpolate }}\n {{? currNode.syntax == 'array' }}\n '[' + this._args[ {{= currNode.interpolate }} ] + ']';\n {{??}}\n '.' + this._args[ {{= currNode.interpolate }} ];\n {{?}}\n {{??}}\n '{{= currProp }}';\n {{?}}\n#}}\n\n\n/**\n * Inserts code to post stored messages\n */\n{{## def.postMessages:\n if (messages.length) {\n {{# def.modelPostBatchCode }}('datachanges', {\n changes: messages,\n transaction: inChangeTransaction\n });\n\n messages.forEach(function(msg) {\n {{# def.modelPostMessageCode }}(msg.path, msg);\n }, this);\n }\n#}}\n",include_create_tree="'use strict';\n/* Only use this style of comments, not \"//\" */\n\n/**\n * Inserts code to create model tree as neccessary for `set` and `splice` accessors and to add messages to send list if the tree changes.\n */\n{{## def.createTree:method:\n var wasDef = true;\n var old = m;\n\n {{ var emptyProp = it.parsedPath[0] && it.parsedPath[0].empty; }}\n {{? emptyProp }}\n {{ /* create top level model if it was not previously defined */ }}\n if (! m) {\n m = {{# def.modelAccessPrefix }} = {{= emptyProp }};\n wasDef = false;\n\n if (this._options.reactive !== false) {\n {{# def.addMsg }} '', type: 'added',\n newValue: m });\n }\n }\n {{??}}\n {{? method == 'splice' }}\n if (! m) {\n {{?}}\n m = {{# def.modelAccessPrefix }} = cloneTree(value);\n wasDef = typeof old != 'undefined';\n {{? method == 'splice' }}\n }\n {{?}} \n {{?}}\n\n\n {{ /* create model tree if it doesn't exist */ }}\n {{ var modelDataProperty = '';\n var nextNode = it.parsedPath[0];\n var count = it.parsedPath.length - 1;\n\n for (var i = 0; i < count; i++) {\n var currNode = nextNode;\n var currProp = currNode.property;\n nextNode = it.parsedPath[i + 1];\n var emptyProp = nextNode && nextNode.empty;\n }}\n\n {{# def.createTreeStep }}\n\n {{ } /* for loop */ }}\n#}}\n\n\n/**\n * Inserts code to create one step in the model tree\n */\n{{## def.createTreeStep:\n {{# def.changeAccessPath }}\n\n if (! {{# def.wasDefined }}) { \n {{ /* property does not exist */ }}\n m = m{{# def.currProp }} = {{= emptyProp }};\n\n if (this._options.reactive !== false) {\n {{# def.addMsg }} accessPath, type: 'added', \n newValue: m });\n }\n\n } else if (typeof m{{# def.currProp }} != 'object') {\n {{ /* property is not object */ }}\n var old = m{{# def.currProp }};\n m = m{{# def.currProp }} = {{= emptyProp }};\n\n if (this._options.reactive !== false) {\n {{# def.addMsg }} accessPath, type: 'changed', \n oldValue: old, newValue: m });\n }\n\n } else {\n {{ /* property exists, just traverse down the model tree */ }}\n m = m{{# def.currProp }};\n }\n#}}\n",include_traverse_tree="'use strict';\n/* Only use this style of comments, not \"//\" */\n\n/**\n * Inserts code to traverse model tree for `delete` and `splice` accessors.\n */\n{{## def.traverseTree:\n {{ \n var count = it.parsedPath.length-1;\n\n for (var i = 0; i < count; i++) { \n var currNode = it.parsedPath[i];\n var currProp = currNode.property;\n }}\n {{# def.traverseTreeStep }}\n\n {{ } /* for loop */\n\n var i = count;\n while (i--) { /* closing braces for else's above */\n }}\n }\n {{ } /* while loop */ }}\n#}}\n\n\n/**\n * Inserts code to traverse one step in the model tree\n */\n{{## def.traverseTreeStep:\n if (! (m && m.hasOwnProperty && {{# def.wasDefined}} ) )\n treeDoesNotExist = true;\n else {\n m = m{{# def.currProp }};\n {{# def.changeAccessPath }}\n {{ /* brace from else is not closed on purpose - all braces are closed in while loop */ }}\n#}}\n",dotDef={include_defines:include_defines,include_create_tree:include_create_tree,include_traverse_tree:include_traverse_tree,getPathNodeKey:pathUtils.getPathNodeKey,modelAccessPrefix:"this._model._data",modelPostMessageCode:"this._model._internalMessenger.postMessage",modelPostBatchCode:"this._model.postMessageSync",internalMessenger:"this._model._internalMessenger"},modelDotDef=_(dotDef).clone().extend({modelAccessPrefix:"this._data",modelPostMessageCode:"this._internalMessenger.postMessage",modelPostBatchCode:"this.postMessageSync",internalMessenger:"this._internalMessenger"})._(),dotSettings=_.clone(doT.templateSettings);dotSettings.strip=!1;var synthesizers=_.mapKeys(templates,function(a){return doT.template(a,dotSettings,dotDef)}),modelSynthesizers=_.mapToObject(["set","del","splice"],function(a){return doT.template(templates[a],dotSettings,modelDotDef)}),synthesizePathMethods=_.memoize(_synthesizePathMethods,void 0,1e3),normalizeSpliceIndex=modelUtils.normalizeSpliceIndex;module.exports=synthesizePathMethods;var modelMethods=_.mapKeys(modelSynthesizers,function(a){return _synthesize(a,"",[])});synthesizePathMethods.modelMethods=modelMethods},{"../../util/logger":97,"../change_data":86,"../model_utils":91,"../path_utils":93,dot:100,fs:75,"mol-proto":101}],95:[function(a,b,c){"use strict";function d(a){this.pattern=a}function e(a){if(0==a.length)throw new Error("Must provide at least one choice to Match.OneOf");this.choices=a}function f(a){this.condition=a}function g(a){this.pattern=a}function h(a){this.pattern=a}function i(a,b){this.Superclass=a,this.matchSuperclass=b}function j(a,b){if(b!==o.Any){for(var c=0;cthis.level)return this;var f=g.slice(arguments,1),h=this;if(c<=this.throwLevel)throw new Error(b());return c<=this.messageLevel&&this.postMessage("log",{level:c,type:a,str:b()}),console.log.apply(console,[this.logPrefixColor?" "+e(this.logPrefix,this.logPrefixColor):this.logPrefix,(this.colors?" "+e(d(a),k[c]):a)+":"].concat(f)),this},i.forEach(function(a){f.prototype[a]=function(){this.log.apply(this,[a].concat(g.toArray(arguments)))}}),b.exports=f},{"../messenger":79,"mol-proto":101}],99:[function(a,b,c){!function(){"use strict";function a(b,c,d){return("string"==typeof c?c:c.toString()).replace(b.define||g,function(a,c,e,f){return 0===c.indexOf("def.")&&(c=c.substring(4)),c in d||(":"===e?(b.defineParams&&f.replace(b.defineParams,function(a,b,e){d[c]={arg:b,text:e}}),c in d||(d[c]=f)):new Function("def","def['"+c+"']="+f)(d)),""}).replace(b.use||g,function(c,e){b.useParams&&(e=e.replace(b.useParams,function(a,b,c,e){if(d[c]&&d[c].arg&&e){var f=(c+":"+e).replace(/'|\\/g,"_");return d.__exp=d.__exp||{},d.__exp[f]=d[c].text.replace(new RegExp("(^|[^\\w$])"+d[c].arg+"([^\\w$])","g"),"$1"+e+"$2"),b+"def.__exp['"+f+"']"}}));var f=new Function("def","return "+e)(d);return f?a(b,f,d):f})}function c(a){return a.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}var d,e={version:"1.0.3",templateSettings:{evaluate:/\{\{([\s\S]+?(\}?)+)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,encode:/\{\{!([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,useParams:/(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,defineParams:/^\s*([\w$]+):([\s\S]+)/,conditional:/\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,varname:"it",strip:!0,append:!0,selfcontained:!1,doNotSkipEncoded:!1},template:void 0,compile:void 0};e.encodeHTMLSource=function(a){var b={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},c=a?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(a){return a?a.toString().replace(c,function(a){return b[a]||a}):""}},d=function(){return this||(0,eval)("this")}(),"undefined"!=typeof b&&b.exports?b.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):d.doT=e;var f={append:{start:"'+(",end:")+'",startencode:"'+encodeHTML("},split:{start:"';out+=(",end:");out+='",startencode:"';out+=encodeHTML("}},g=/$^/;e.template=function(b,h,i){h=h||e.templateSettings;var j,k,l=h.append?f.append:f.split,m=0,n=h.use||h.define?a(h,b,i||{}):b;n=("var out='"+(h.strip?n.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):n).replace(/'|\\/g,"\\$&").replace(h.interpolate||g,function(a,b){return l.start+c(b)+l.end}).replace(h.encode||g,function(a,b){return j=!0,l.startencode+c(b)+l.end}).replace(h.conditional||g,function(a,b,d){return b?d?"';}else if("+c(d)+"){out+='":"';}else{out+='":d?"';if("+c(d)+"){out+='":"';}out+='"}).replace(h.iterate||g,function(a,b,d,e){return b?(m+=1,k=e||"i"+m,b=c(b),"';var arr"+m+"="+b+";if(arr"+m+"){var "+d+","+k+"=-1,l"+m+"=arr"+m+".length-1;while("+k+"a;a++)c=e[a],/\.def(\.dot|\.jst)?$/.test(c)&&(console.log("Loaded def "+c),this.__includes[c.substring(0,c.indexOf("."))]=g(d+c));for(a=0,b=e.length;b>a;a++)c=e[a],/\.dot(\.def|\.jst)?$/.test(c)&&(console.log("Compiling "+c+" to function"),this.__rendermodule[c.substring(0,c.indexOf("."))]=this.compilePath(d+c)),/\.jst(\.dot|\.def)?$/.test(c)&&(console.log("Compiling "+c+" to file"),this.compileToFile(this.__destination+c.substring(0,c.indexOf("."))+".js",g(d+c)));return this.__rendermodule}},{"./doT":99,fs:75}],101:[function(a,b,c){"use strict";function d(a){var b=Object.create(d.prototype);return b.self=a,b}function e(){return this.self}var f=a("./utils"),g=a("./proto_prototype"),h=a("./proto_object"),i=a("./proto_array"),j=a("./proto_function"),k=a("./proto_string"),l=a("./proto_number"),m=a("./proto_util"),n={};h.extend.call(n,h),n.extend.call(n,g),n.extend.call(n,i),n.extend.call(n,k),n.extend.call(n,l),n.extend.call(n,j),n.extend.call(n,m),n.defineProperty(d,"__",n),n.extendProto.call(d,{_:e}),n.extend.call(d,h._constants);var o=n.mapKeys.call(n,f.makeProtoFunction,!0);n.extend.call(d,o);var p=n.mapKeys.call(n,f.makeProtoInstanceMethod,!0);n.extendProto.call(d,p),"object"==typeof window&&(window._&&(d.underscore=window._),window._=d),"object"==typeof b&&b.exports&&(b.exports=d)},{"./proto_array":102,"./proto_function":103,"./proto_number":104,"./proto_object":105,"./proto_prototype":106,"./proto_string":107,"./proto_util":108,"./utils":109}],102:[function(a,b,c){"use strict";function d(a){if(!a.length)return this;Array.isArray(a)||(a=g.call(a));var b=[this.length,0].concat(a);return n.splice.apply(this,b),this}function e(a){if(!a.length)return this;Array.isArray(a)||(a=g.call(a));var b=[0,0].concat(a);return n.splice.apply(this,b),this}function f(a){var b=this.indexOf(a);return b>=0&&this.splice(b,1),this}function g(){return n.slice.call(this)}function h(a){var b={},c=Array.isArray(a);return n.forEach.call(this,function(d,e){b[d]=c?a[e]:a}),b}function i(a,b){var c={};return Array.prototype.forEach.call(this,function(d,e){c[d]=a.call(b,d,e,this)},this),c}function j(a){function b(b){return n.findIndex.call(d,function(c){return a(b,c)})}function c(a){return d.indexOf(a)}var d=[];return a||(b=c),this.forEach(function(a){var c=b(a);-1==c&&d.push(a)}),d}function k(a,b){function c(){n.forEach.call(this,function(f){Array.isArray(f)?c.call(f):a.call(b,f,d++,e)})}var d=0,e=this;c.call(this)}var l=a("./proto_object"),m=a("./utils"),n=b.exports={appendArray:d,prependArray:e,toArray:g,object:h,mapToObject:i,unique:j,deepForEach:k,spliceItem:f},o=["join","pop","push","concat","reverse","shift","unshift","slice","splice","sort","filter","forEach","some","every","map","indexOf","lastIndexOf","reduce","reduceRight"],p=i.call(o,function(a){return Array.prototype[a]});l.extend.call(n,p),n.find=Array.prototype.find||m.makeFindMethod(n.some,"value"),n.findIndex=Array.prototype.findIndex||m.makeFindMethod(n.some,"index")},{"./proto_object":105,"./utils":109}],103:[function(require,module,exports){"use strict";function makeFunction(arg1,arg2,funcBody){for(var name=this,count=arguments.length-1,funcBody=arguments[count],func,code="",i=0;count>i;i++)code+=", "+arguments[i];return code=["func = function ",name,"(",code.slice(2),") {\n",funcBody,"\n}"].join(""),eval(code),func}function partial(){var a=this,b=slice.call(arguments);return function(){return a.apply(this,b.concat(slice.call(arguments)))}}function partialRight(){var a=this,b=slice.call(arguments);return function(){return a.apply(this,slice.call(arguments).concat(b))}}function memoize(a,b){var c=this,d={},e=[];return b=b||1e3,function(){var f=a?a.apply(this,arguments):arguments[0];if(d.hasOwnProperty(f))return d[f];var g=d[f]=c.apply(this,arguments);return e.push(f),e.length>b&&delete d[e.shift()],g}}function delay(a){var b=slice.call(arguments,1);return _delay(this,a,b)}function defer(){return _delay(this,1,arguments)}function _delay(a,b,c,d){return setTimeout(a.apply.bind(a,d||null,c),b)}function deferTicks(a){if(2>a)return defer.apply(this,arguments);var b=repeat.call(deferFunc,a-1);return b=b.concat(this,slice.call(arguments,1)),deferFunc.apply(null,b)}function delayMethod(a,b){var c=slice.call(arguments,2);return _delayMethod(this,a,b,c)}function deferMethod(a){var b=slice.call(arguments,1);return _delayMethod(this,a,1,b)}function _delayMethod(a,b,c,d){return setTimeout(function(){var c="string"==typeof b?a[b]:b;c.apply(a,d)},c)}function delayed(a){var b=this,c=slice.call(arguments,1);return function(){var d=c.concat(slice.call(arguments));return _delay(b,a,d,this)}}function deferred(){var a=this,b=slice.call(arguments); -return function(){var c=b.concat(slice.call(arguments));return _delay(a,1,c,this)}}function debounce(a,b){var c,d,e,f,g,h=this;return function(){function i(){var j=Date.now()-f;a>j?c=setTimeout(i,a-j):(c=null,b||(g=h.apply(e,d)))}e=this,d=arguments,f=Date.now();var j=b&&!c;return c||(c=setTimeout(i,a)),j&&(g=h.apply(e,d)),g}}function throttle(a,b){function c(){i=b.leading===!1?0:Date.now(),h=null,f=g.apply(d,e)}var d,e,f,g=this,h=null,i=0;return b||(b={}),function(){var j=Date.now();i||b.leading!==!1||(i=j);var k=a-(j-i);return d=this,e=arguments,0>=k?(clearTimeout(h),h=null,i=j,f=g.apply(d,e)):h||b.trailing===!1||(h=setTimeout(c,k)),f}}function once(){var a,b=this,c=!1;return function(){return c?a:(c=!0,a=b.apply(this,arguments),b=null,a)}}function waitFor(a,b,c,d){function e(){if(g())a();else{if(!(Date.now()-f>=b))return;c&&c()}clearInterval(h)}var f=Date.now(),g=this;d=d||50;var h=setInterval(e,d)}function not(){var a=this;return function(){return!a.apply(this,arguments)}}var makeProtoFunction=require("./utils").makeProtoFunction,repeat=require("./proto_util").repeat,functionMethods=module.exports={makeFunction:makeFunction,partial:partial,partialRight:partialRight,memoize:memoize,delay:delay,defer:defer,delayed:delayed,deferred:deferred,deferTicks:deferTicks,delayMethod:delayMethod,deferMethod:deferMethod,debounce:debounce,throttle:throttle,once:once,waitFor:waitFor,not:not},slice=Array.prototype.slice,deferFunc=makeProtoFunction(defer)},{"./proto_util":108,"./utils":109}],104:[function(a,b,c){"use strict";function d(){return!isNaN(parseFloat(this))&&isFinite(this)}b.exports={isNumeric:d}},{}],105:[function(a,b,c){"use strict";function d(a,b){var c={};return r.call(a,function(b,d){c[d]=Object.getOwnPropertyDescriptor(a,d)},this,b),Object.defineProperties(this,c),this}function e(){if(Array.isArray(this))return this.slice();if(this instanceof Date)return new Date(this);if(this instanceof RegExp)return new RegExp(this);var a=Object.create(this.constructor.prototype);return d.call(a,this),a}function f(a,b,c){return Object.defineProperty(this,a,g(b,c)),this}function g(a,b){var c={value:a};return b&&d.call(c,{enumerable:!!(b&D.ENUMERABLE),configurable:!!(b&D.CONFIGURABLE),writable:!!(b&D.WRITABLE)}),c}function h(a,b){var c=s.call(a,function(a){return g(a,b)},!0);return Object.defineProperties(this,c),this}function i(a,b,c){return j(this,a,b,c,[])}function j(a,b,c,d,e){if(!(e.indexOf(b)>=0)){e.push(b);var f=Array.isArray(b)?Array.prototype.forEach:r;return f.call(b,function(f,g){var h=a.hasOwnProperty(g),i=k(a[g]),l=k(f);if(d&&h&&i!=l)throw new Error("deepExtend");if(l)h&&i||(a[g]=Array.isArray(f)?[]:{}),j(a[g],f,c,d,e);else{var m=Object.getOwnPropertyDescriptor(b,g);Object.defineProperty(a,g,m)}},this,c),a}}function k(a){return!("object"!=typeof a||null==a||a instanceof RegExp||a instanceof Date)}function l(a){if(this instanceof Date)return new Date(this);if(this instanceof RegExp)return new RegExp(this);var b=Array.isArray(this)?[]:{};return i.call(b,this,a),b}function m(){return Object.keys(this)}function n(a){var b=a?Object.keys(this):o.call(this);return b.map(function(a){return this[a]},this)}function o(){return Object.getOwnPropertyNames(this)}function p(a,b){for(var c=b?Object.keys(this):o.call(this),d=0;dd;d++){var e=b.charCodeAt(d);a=(a<<5)+a+e}return a}function unPrefix(a){return 0==this.indexOf(a)?this.replace(a,""):void 0}function format(){var a=this,b=arguments;return a.replace(formatRegexp,function(a){return"$$"==a?"$":(a=a.slice(1),b[a-1])})}var __=require("./proto_object"),stringMethods=module.exports={firstUpperCase:firstUpperCase,firstLowerCase:firstLowerCase,toRegExp:toRegExp,toFunction:toFunction,toDate:toDate,toQueryString:toQueryString,fromQueryString:fromQueryString,jsonParse:jsonParse,hashCode:hashCode,unPrefix:unPrefix,format:format},regexpStringPattern=/^\/(.*)\/([gimy]*)$/,formatRegexp=/\$[0-9]+|\$\$/g},{"./proto_object":105}],108:[function(a,b,c){"use strict";function d(a,b){for(var c=Array(Math.max(0,this)),d=0;this>d;d++)c[d]=a.call(b,d);return c}function e(a){for(var b=Array(Math.max(0,a)),c=0;a>c;c++)b[c]=this;return b}function f(a){return a.call(this,this),this}function g(a){var b=Array.prototype.slice.call(arguments,1);return"function"==typeof this?this.apply(a,b):this}function h(){return this}function i(){var a=this;return function(b){return b[a]}}function j(){var a=this;return function(b,c){return b[a]c[a]?1:0}}function k(){}b.exports={times:d,repeat:e,tap:f,result:g,identity:h,property:i,compareProperty:j,noop:k}},{}],109:[function(a,b,c){"use strict";function d(a){return function(){return this.self=a.apply(this.self,arguments),this}}function e(a){return function(){return a.call.apply(a,arguments)}}function f(a,b){var c="value"==b?0:1;return function(b,d,e){function f(a,d,e){var f=b.call(this,a,d,e);return f?(g=arguments[c],f):void 0}var g,h=a.call(this,f,d,e);return h?g:c&&a==Array.prototype.some?-1:void 0}}b.exports={makeProtoInstanceMethod:d,makeProtoFunction:e,makeFindMethod:f},new Error},{}]},{},[44]); +!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":84}],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":57,"../c_facet":16,"../scope":41,"./cf_registry":31,"milo-core":84}],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":55,"milo-core":84}],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":84}],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&&(d.innerHTML=g?H.template(g)({content:f}):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":60,"../c_facet":16,"../msg_api/drop":38,"../msg_src/dom_events":39,"./cf_registry":31,"milo-core":84}],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":84}],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":46,"../c_facet":16,"../msg_src/frame":40,"./cf_registry":31,"milo-core":84}],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":48,"../c_facet":16,"./cf_registry":31,"milo-core":84}],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":42,"../../services/mail":48,"../../util/component_name":53,"../../util/dom":57,"../c_class":15,"../c_facet":16,"./cf_registry":31,"milo-core":84}],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":84}],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":84}],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":84}],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");this._defaultKey=c?a: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":84}],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":53,"./c_facets/cf_registry":31,"./c_registry":33,"./scope":41,"milo-core":84}],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":42,"milo-core":84}],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":84}],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":84}],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":84}],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":47,"../c_class":15,"milo-core":84}],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":84}],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":53,"milo-core":84}],42:[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":84}],43:[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":42,"./services/mail":48,"./util/dom":57,"./util/request":65,"milo-core":84}],44:[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("./components/classes/View"),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,"./components/classes/View":35,"./config":42,"./loader":43,"./registry":45,"./services/mail":48,"./services/window":51,"./use_facets":52,"./util":63,"./util/create_component_class":54,"./util/create_facet_class":55,"milo-core":84}],45:[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}],46:[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":84}],47:[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":46,"milo-core":84}],48:[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":49,"./mail_source":50,"milo-core":84}],49:[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":84}],50:[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":46,"milo-core":84}],51:[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":47,"milo-core":84}],52:[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}],53:[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":42,"./unique_id":70}],54:[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":84}],55:[function(a,b,c){"use strict";function d(a){g(a,{className:String,superClassName:h.Optional(String),require:h.Optional(Array),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),a.require&&(c.require=a.require),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":84}],56:[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":42,"milo-core":84}],57:[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":42,"milo-core":84}],58:[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":84}],59:[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":84}],60:[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":42,base32:74,"milo-core":84}],61:[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":84}],62:[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":57,"milo-core":84}],63:[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"),deprecate:f,doT:e.util.doT,destroy:d};b.exports=g},{"./component_name":53,"./deprecate":56,"./dom":57,"./dom_listeners":58,"./domready":59,"./dragdrop":60,"./error":61,"./fragment":62,"./json_parse":64,"./request":65,"./selection":66,"./storage":67,"./unique_id":70,"./websocket":71,"milo-core":84}],64:[function(a,b,c){"use strict";function d(a){try{return JSON.parse(a)}catch(b){}}b.exports=d},{}],65:[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":42,"./unique_id":70,"milo-core":84}],66:[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":57,"milo-core":84}],67:[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":42,"./model":68,"./msg_src":69,"milo-core":84}],68:[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":67,"milo-core":84}],69:[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":42,"../../util/unique_id":70,"milo-core":84}],70:[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},{}],71:[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":72,"./msg_src":73,"milo-core":84}],72:[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":84}],73:[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":42,"../../util/unique_id":70,"milo-core":84}],74:[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":76,"../util/check":95,"./m_source":82,"mol-proto":101}],80:[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(b){var c,d=this.translateToSourceMessage(b);if("undefined"!=typeof d)return this._internalMessages.hasOwnProperty(d)?(c=this._internalMessages[d],void(-1==c.indexOf(b)?c.push(b):a("../util/logger").warn("Duplicate addInternalMessage call for internal message "+b))):(c=this._internalMessages[d]=[],c.push(b),d)}function h(b){function c(){a("../util/logger").warn("notification received: un-subscribe from internal message "+b+" without previous subscription notification")}var d=this.translateToSourceMessage(b);if("undefined"!=typeof d){var e=this._internalMessages[d];if(e&&e.length){var f=e.indexOf(b);if(f>=0){if(e.splice(f,1),0==e.length)return delete this._internalMessages[d],d}else c()}else c()}}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");b.exports=d,m.extendProto(d,{init:e,destroy:f,addInternalMessage:g,removeInternalMessage:h,getInternalMessages:i,translateToSourceMessage:j,createInternalData:k,filterSourceMessage:l})},{"../util/logger":97,"mol-proto":101}],81:[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":80,"mol-proto":101}],82:[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("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":76,"../util/check":95,"./m_api":80,"mol-proto":101}],83:[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":95,"./m_source":82,"mol-proto":101}],84:[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":77,"./config":78,"./messenger":79,"./minder":85,"./model":88,"./util":96,"mol-proto":101}],85:[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":79,"./model/connector":87,"./util/logger":97,"mol-proto":101}],86:[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),a(this.ds2,"_link1",this.pathTranslation1),this.isOn=!1,this.postMessage("turnedoff")}function m(){this.turnOff(),this.postMessage("destroyed"),this._messenger.destroy(),delete this.ds1,delete this.ds2,this._destroyed=!0}var n=a("../messenger"),o=a("./path_utils"),p=a("mol-proto"),q=a("../util/logger");b.exports=d;var r=/^(\<*)\-+(\>*)$/;p.extendProto(d,{turnOn:k,turnOff:l,destroy:m,changeMode:f,deferChangeMode:g})},{"../messenger":79,"../util/logger":97,"./path_utils":93,"mol-proto":101}],88:[function(a,b,c){"use strict";function d(a,b,c){var e=function(a){return f.apply(e,arguments)};return e.__proto__=d.prototype,e._hostObject=b,e._options=c||{},e._options.reactive!==!1&&(e._prepareMessengers(),e.onSync("changedata",q)),a&&(e._data=a),e}function e(){return this._data}function f(a){return a?(v.splice(arguments,0,0,null,this),new(Function.prototype.bind.apply(m,arguments))):this}function g(a){a=a||this._hostObject,u.prototype._createProxyMethods.call(this[x],r.defaultMethods,a)}function h(a,b,c){c=c||y,u.useWith.call(d,a,b,c)}function i(a){a=a||this._hostObject,u.prototype._createProxyMethods.call(this,y,a)}function j(){var a=new r(this,void 0,void 0),b=new s(this,void 0,new t,a),c=new r(this,void 0,b);v.defineProperty(this,x,c),v.defineProperty(this,"_internalMessenger",a)}function k(){return this._hostObject}function l(){this[x].destroy(),this._internalMessenger.destroy(),this._destroyed=!0}{var m=a("./m_path"),n=a("./synthesize"),o=a("./path_utils"),p=a("./model_utils"),q=a("./change_data"),r=a("../messenger"),s=a("../messenger/msngr_source"),t=a("./m_msg_api"),u=a("../abstract/mixin"),v=a("mol-proto"),w=a("../util/check");w.Match,a("../util/logger")}b.exports=d,d.prototype.__proto__=d.__proto__,v.extendProto(d,{path:f,get:e,proxyMessenger:g,proxyMethods:i,_prepareMessengers:j,_getHostObject:k,destroy:l}),v.extendProto(d,n.modelMethods),v.extend(d,{Path:m,useWith:h,_utils:{path:o,model:p,changeDataHandler:q}});var x="_messenger";r.useWith(d,x,r.defaultMethods),["len","push","pop","unshift","shift"].forEach(function(a){var b=m.prototype[a];v.defineProperty(d.prototype,a,b)});var y=["path","get","set","del","splice","len","push","pop","unshift","shift"]},{"../abstract/mixin":76,"../messenger":79,"../messenger/msngr_source":83,"../util/check":95,"../util/logger":97,"./change_data":86,"./m_msg_api":89,"./m_path":90,"./model_utils":91,"./path_utils":93,"./synthesize":94,"mol-proto":101}],89:[function(a,b,c){"use strict";function d(a){return a instanceof RegExp?a:f.createRegexPath(a)}var e=a("../messenger/m_api_rx"),f=a("./path_utils"),g=a("mol-proto"),h=g.createSubclass(e,"ModelMsgAPI");b.exports=h,g.extendProto(h,{translateToSourceMessage:d})},{"../messenger/m_api_rx":81,"./path_utils":93,"mol-proto":101}],90:[function(a,b,c){"use strict";function d(a,b){w(b,String);var c=function(a){return f.apply(c,arguments)};c.__proto__=d.prototype,v.defineProperties(c,{_model:a,_path:b,_args:v.slice(arguments,1),_options:a._options});var g=q.parseAccessPath(b);v.defineProperty(c,"_accessPath",e(g,c._args)),c._options.reactive!==!1&&(c._prepareMessenger(),c.onSync("changedata",r));var h=p(b,g);return v.defineProperties(c,h),Object.freeze(c),c}function e(a,b){return a.reduce(function(a,c,d){var e=c.interpolate;return a+(e?"array"==c.syntax?"["+b[e]+"]":"."+b[e]:c.property)},"")}function f(a){if(!a)return this;var b=this._args.length-1;b>0&&(a=a.replace(/\$[1-9][0-9]*/g,function(a){return"$"+(+a.slice(1)+b)}));var c=this._path+a,e=[this._model,c].concat(this._args.slice(1)).concat(v.slice(arguments,1));return v.newApply(d,e)}function g(){return this.path(".length").get()||0}function h(){var a=this.len(),b=a+arguments.length;return v.splice(arguments,0,0,a,0),this.splice.apply(this,arguments),b}function i(){return this.splice(this.len()-1,1)[0]}function j(){var a=this.len();return a+=arguments.length,v.splice(arguments,0,0,0,0),this.splice.apply(this,arguments),a}function k(){return this.splice(0,1)[0]}function l(){var a=new t(this._accessPath),b=new u(this,void 0,a,this._model),c=new s(this,void 0,b);v.defineProperty(this,x,c)}function m(){return{model:this._model,path:this._path,args:this._args}}function n(a){w(a,{model:Function,path:String,args:Array});var b=a.model;return b.apply(b,a.args)}function o(){this[x].destroy()}{var p=a("./synthesize"),q=a("./path_utils"),r=a("./change_data"),s=a("../messenger"),t=a("./path_msg_api"),u=a("../messenger/msngr_source"),v=a("mol-proto"),w=a("../util/check");w.Match}b.exports=d,d.prototype.__proto__=d.__proto__,v.extendProto(d,{path:f,len:g,push:h,pop:i,unshift:j,shift:k,_prepareMessenger:l,_getDefinition:m,destroy:o}),v.extend(d,{_createFromDefinition:n});var x="_messenger";s.useWith(d,x,s.defaultMethods)},{"../messenger":79,"../messenger/msngr_source":83,"../util/check":95,"./change_data":86,"./path_msg_api":92,"./path_utils":93,"./synthesize":94,"mol-proto":101}],91:[function(a,b,c){"use strict";function d(a,b){return a>b?b:a>=0?a:a+b>0?a+b:0}var e={normalizeSpliceIndex:d};b.exports=e},{}],92:[function(a,b,c){"use strict";function d(a){h.prototype.init.apply(this,arguments),this.rootPath=a}function e(a){return a instanceof RegExp?a:"datachanges"==a?a:this.rootPath+a}function f(a,b,c){if("datachanges"==b){var d=c.changes.map(g,this).filter(function(a){return a}),e={changes:d,transaction:c.transaction};return e}var e=g.call(this,c);return e}function g(a){var b=a.path,c=i.unPrefix(b,this.rootPath);if("string"==typeof c){var a=i.clone(a);return a.fullPath=b,a.path=c,a}}var h=a("../messenger/m_api"),i=(a("./path_utils"), +a("../util/logger"),a("mol-proto")),j=i.createSubclass(h,"ModelPathMsgAPI");b.exports=j,i.extendProto(j,{init:d,translateToSourceMessage:e,createInternalData:f})},{"../messenger/m_api":80,"../util/logger":97,"./path_utils":93,"mol-proto":101}],93:[function(a,b,c){"use strict";function d(a,b){b=b||u;var c=[];if(!a)return c;var d=a.replace(b,function(a){var b={property:a};return j.extend(b,x[a[0]]),"$"==a[1]&&(b.interpolate=f(b,!0)),c.push(b),""});if(d)throw new Error("incorrect model path: "+a);return c}function e(a){if(h(a,i.OneOf(String,RegExp)),a instanceof RegExp||-1==a.indexOf("*"))return a;var b=k.parseAccessPath(a,w),c="^",d=!1;b.forEach(function(a){var b=a.property,e=y[b];e?(c+="("+e+"|)",d=!0):c+=b.replace(/(\.|\[|\])/g,"\\$1")}),c+="$";try{return new RegExp(c)}catch(e){throw new Error("can't construct regex for path pattern: "+a)}}function f(a,b){var c=a.property,d=b?2:1;return"array"==a.syntax?c.slice(d,c.length-1):c.slice(d)}function g(a){a=a||["on","off"];var b=j.mapToObject(a,function(a){var b=this[a];return function(a,c){var d=e(a);b.call(this,d,c)}},this);j.defineProperties(this,b)}var h=a("../util/check"),i=h.Match,j=a("mol-proto"),k={parseAccessPath:d,createRegexPath:e,getPathNodeKey:f,wrapMessengerMethods:g};b.exports=k;var l="\\.[A-Za-z_-][A-Za-z0-9_-]*",m="\\[[0-9]+\\]",n="\\$[1-9][0-9]*",o="\\."+n,p="\\["+n+"\\]",q="\\.\\*",r="\\[\\*\\]",s="\\*",t=[l,m,o,p].join("|"),u=new RegExp(t,"g"),v=[t,q,r,s].join("|"),w=new RegExp(v,"g"),x={".":{syntax:"object",empty:"{}"},"[":{syntax:"array",empty:"[]"},"*":{syntax:"match",empty:"{}"}},y={".*":l,"[*]":m};y["*"]=y[".*"]+"|"+y["[*]"]},{"../util/check":95,"mol-proto":101}],94:[function(require,module,exports){"use strict";function _synthesizePathMethods(a,b){var c=_.mapKeys(synthesizers,function(c){return _synthesize(c,a,b)});return c}function _synthesize(synthesizer,path,parsedPath){function addChangeMessage(a,b,c){a.push(c),b[c.path]=c}function addTreeChangesMessages(a,b,c,d,e){var f=valueIsTree(d),g=valueIsTree(e);g&&addMessages(a,b,c,e,"added","newValue"),f&&addMessages(a,b,c,d,"removed","oldValue")}function addMessages(a,b,c,d,e,f){function g(a,b){if(Array.isArray(b)){var c=a+"[$$]";b.forEach(function(a,b){h(a,b,c)})}else{var c=a+".$$";_.eachKey(b,function(a,b){h(a,b,c)})}}function h(c,d,h){var i=h.replace("$$",d),j=b[i];if(j)j.type==e?logger.error("setter error: same message type posted on the same path"):(j.type="changed",j[f]=c);else{var k={path:i,type:e};k[f]=c,addChangeMessage(a,b,k)}valueIsTree(c)&&g(i,c)}g(c,d)}function cloneTree(a){return valueIsNormalObject(a)?_.deepClone(a):a}function protectValue(a){return valueIsNormalObject(a)?Array.isArray(a)?a.slice():Object.create(a):a}function valueIsTree(a){return valueIsNormalObject(a)&&Object.keys(a).length}function valueIsNormalObject(a){return!(null==a||"object"!=typeof a||a instanceof Date||a instanceof RegExp)}function addBatchIdsToMessage(a,b,c){_.defineProperties(a,{__batch_id:b,__msg_id:c})}var method,methodCode=synthesizer({parsedPath:parsedPath,getPathNodeKey:pathUtils.getPathNodeKey});try{eval(methodCode)}catch(e){throw ModelError("ModelPath method compilation error; path: "+path+", code: "+methodCode)}return method}var pathUtils=require("../path_utils"),modelUtils=require("../model_utils"),logger=require("../../util/logger"),fs=require("fs"),doT=require("dot"),_=require("mol-proto"),changeDataHandler=require("../change_data"),getTransactionFlag=changeDataHandler.getTransactionFlag,postTransactionFinished=changeDataHandler.postTransactionFinished,templates={get:"'use strict';\n/* Only use this style of comments, not \"//\" */\n\nmethod = function get() {\n var m = {{# def.modelAccessPrefix }};\n return m {{~ it.parsedPath :pathNode }}\n {{? pathNode.interpolate}}\n && (m = m[this._args[ {{= pathNode.interpolate }} ]])\n {{??}}\n && (m = m{{= pathNode.property }})\n {{?}} {{~}};\n};\n",set:"'use strict';\n/* Only use this style of comments, not \"//\" */\n\n{{# def.include_defines }}\n{{# def.include_create_tree }}\n\n\n/**\n * Template that synthesizes setter for Model and for ModelPath\n */\nmethod = function set(value) {\n {{# def.initVars:'set' }}\n\n {{# def.createTree:'set' }}\n\n {{\n currNode = nextNode;\n currProp = currNode && currNode.property;\n }}\n\n {{ /* assign value to the last property */ }}\n {{? currProp }}\n wasDef = {{# def.wasDefined}};\n {{# def.changeAccessPath }}\n\n var old = m{{# def.currProp }};\n\n {{ /* clone value to prevent same reference in linked models */ }}\n m{{# def.currProp }} = cloneTree(value);\n {{?}}\n\n {{ /* add message related to the last property change */ }}\n if (this._options.reactive !== false) {\n if (! wasDef)\n {{# def.addMsg }} accessPath, type: 'added',\n newValue: value });\n else if (old != value)\n {{# def.addMsg }} accessPath, type: 'changed',\n oldValue: old, newValue: value });\n\n {{ /* add message related to changes in (sub)properties inside removed and assigned value */ }}\n if (! wasDef || old != value)\n addTreeChangesMessages(messages, messagesHash,\n accessPath, old, value); /* defined in the function that synthesizes ModelPath setter */\n\n {{ /* post all stored messages */ }}\n {{# def.postMessages }}\n }\n};\n",del:"'use strict';\n/* Only use this style of comments, not \"//\" */\n\n{{# def.include_defines }}\n{{# def.include_traverse_tree }}\n\nmethod = function del() {\n {{# def.initVars:'del' }}\n\n {{? it.parsedPath.length }}\n {{# def.traverseTree }}\n\n {{\n var currNode = it.parsedPath[count];\n var currProp = currNode.property; \n }}\n\n if (! treeDoesNotExist && m && m.hasOwnProperty && {{# def.wasDefined}}) {\n var old = m{{# def.currProp }};\n delete m{{# def.currProp }};\n {{# def.changeAccessPath }}\n var didDelete = true;\n }\n {{??}}\n if (typeof m != 'undefined') {\n var old = m;\n {{# def.modelAccessPrefix }} = undefined;\n var didDelete = true;\n }\n {{?}}\n\n if (didDelete && this._options.reactive !== false) {\n {{# def.addMsg }} accessPath, type: 'deleted', oldValue: old });\n\n addTreeChangesMessages(messages, messagesHash,\n accessPath, old, undefined); /* defined in the function that synthesizes ModelPath setter */\n\n {{ /* post all stored messages */ }}\n {{# def.postMessages }}\n }\n};\n",splice:"'use strict';\n/* Only use this style of comments, not \"//\" */\n\n{{# def.include_defines }}\n{{# def.include_create_tree }}\n{{# def.include_traverse_tree }}\n\nmethod = function splice(spliceIndex, spliceHowMany) { /* ,... - extra arguments to splice into array */\n {{# def.initVars:'splice' }}\n\n var argsLen = arguments.length;\n var addItems = argsLen > 2;\n\n if (addItems) {\n {{ /* only create model tree if items are inserted in array */ }}\n\n {{ /* if model is undefined it will be set to an empty array */ }} \n var value = [];\n {{# def.createTree:'splice' }}\n\n {{? nextNode }}\n {{\n var currNode = nextNode;\n var currProp = currNode.property;\n var emptyProp = '[]';\n }}\n\n {{# def.createTreeStep }}\n {{?}}\n\n } else if (spliceHowMany > 0) {\n {{ /* if items are not inserted, only traverse model tree if items are deleted from array */ }}\n {{? it.parsedPath.length }}\n {{# def.traverseTree }}\n\n {{\n var currNode = it.parsedPath[count];\n var currProp = currNode.property; \n }}\n\n {{ /* extra brace closes 'else' in def.traverseTreeStep */ }}\n {{# def.traverseTreeStep }} }\n {{?}}\n }\n\n {{ /* splice items */ }}\n if (addItems || (! treeDoesNotExist && m\n && m.length > spliceIndex ) ) {\n var oldLength = m.length = m.length || 0;\n\n arguments[0] = spliceIndex = normalizeSpliceIndex(spliceIndex, m.length);\n\n {{ /* clone added arguments to prevent same references in linked models */ }}\n if (addItems)\n for (var i = 2; i < argsLen; i++)\n arguments[i] = cloneTree(arguments[i]);\n\n {{ /* actual splice call */ }}\n var removed = Array.prototype.splice.apply(m, arguments);\n\n if (this._options.reactive !== false) {\n {{# def.addMsg }} accessPath, type: 'splice',\n index: spliceIndex, removed: removed, addedCount: addItems ? argsLen - 2 : 0,\n newValue: m });\n\n if (removed && removed.length)\n removed.forEach(function(item, index) {\n var itemPath = accessPath + '[' + (spliceIndex + index) + ']';\n {{# def.addMsg }} itemPath, type: 'removed', oldValue: item });\n\n if (valueIsTree(item))\n addMessages(messages, messagesHash, itemPath, item, 'removed', 'oldValue');\n });\n\n if (addItems)\n for (var i = 2; i < argsLen; i++) {\n var item = arguments[i];\n var itemPath = accessPath + '[' + (spliceIndex + i - 2) + ']';\n {{# def.addMsg }} itemPath, type: 'added', newValue: item });\n\n if (valueIsTree(item))\n addMessages(messages, messagesHash, itemPath, item, 'added', 'newValue');\n }\n\n {{ /* post all stored messages */ }}\n {{# def.postMessages }}\n }\n }\n\n return removed || [];\n}\n"},include_defines="'use strict';\n/* Only use this style of comments, not \"//\" */\n\n/**\n * Inserts initialization code\n */\n {{## def.initVars:method:\n var m = {{# def.modelAccessPrefix }};\n var messages = [], messagesHash = {};\n var accessPath = '';\n var treeDoesNotExist;\n /* hack to prevent sending finished events to allow for propagation of batches without splitting them */\n var inChangeTransaction = getTransactionFlag( {{= method }} );\n #}}\n\n/**\n * Inserts the beginning of function call to add message to list\n */\n{{## def.addMsg: addChangeMessage(messages, messagesHash, { path: #}}\n\n/**\n * Inserts current property/index for both normal and interpolated properties/indexes\n */\n{{## def.currProp:{{? currNode.interpolate }}[this._args[ {{= currNode.interpolate }} ]]{{??}}{{= currProp }}{{?}} #}}\n\n/**\n * Inserts condition to test whether normal/interpolated property/index exists\n */\n{{## def.wasDefined: m.hasOwnProperty(\n {{? currNode.interpolate }}\n this._args[ {{= currNode.interpolate }} ]\n {{??}}\n '{{= it.getPathNodeKey(currNode) }}'\n {{?}}\n) #}}\n\n\n/**\n * Inserts code to update access path for current property\n * Because of the possibility of interpolated properties, it can't be calculated in template, it can only be calculated during accessor call.\n */\n{{## def.changeAccessPath:\n accessPath += {{? currNode.interpolate }}\n {{? currNode.syntax == 'array' }}\n '[' + this._args[ {{= currNode.interpolate }} ] + ']';\n {{??}}\n '.' + this._args[ {{= currNode.interpolate }} ];\n {{?}}\n {{??}}\n '{{= currProp }}';\n {{?}}\n#}}\n\n\n/**\n * Inserts code to post stored messages\n */\n{{## def.postMessages:\n if (messages.length) {\n {{# def.modelPostBatchCode }}('datachanges', {\n changes: messages,\n transaction: inChangeTransaction\n });\n\n messages.forEach(function(msg) {\n {{# def.modelPostMessageCode }}(msg.path, msg);\n }, this);\n }\n#}}\n",include_create_tree="'use strict';\n/* Only use this style of comments, not \"//\" */\n\n/**\n * Inserts code to create model tree as neccessary for `set` and `splice` accessors and to add messages to send list if the tree changes.\n */\n{{## def.createTree:method:\n var wasDef = true;\n var old = m;\n\n {{ var emptyProp = it.parsedPath[0] && it.parsedPath[0].empty; }}\n {{? emptyProp }}\n {{ /* create top level model if it was not previously defined */ }}\n if (! m) {\n m = {{# def.modelAccessPrefix }} = {{= emptyProp }};\n wasDef = false;\n\n if (this._options.reactive !== false) {\n {{# def.addMsg }} '', type: 'added',\n newValue: m });\n }\n }\n {{??}}\n {{? method == 'splice' }}\n if (! m) {\n {{?}}\n m = {{# def.modelAccessPrefix }} = cloneTree(value);\n wasDef = typeof old != 'undefined';\n {{? method == 'splice' }}\n }\n {{?}} \n {{?}}\n\n\n {{ /* create model tree if it doesn't exist */ }}\n {{ var modelDataProperty = '';\n var nextNode = it.parsedPath[0];\n var count = it.parsedPath.length - 1;\n\n for (var i = 0; i < count; i++) {\n var currNode = nextNode;\n var currProp = currNode.property;\n nextNode = it.parsedPath[i + 1];\n var emptyProp = nextNode && nextNode.empty;\n }}\n\n {{# def.createTreeStep }}\n\n {{ } /* for loop */ }}\n#}}\n\n\n/**\n * Inserts code to create one step in the model tree\n */\n{{## def.createTreeStep:\n {{# def.changeAccessPath }}\n\n if (! {{# def.wasDefined }}) { \n {{ /* property does not exist */ }}\n m = m{{# def.currProp }} = {{= emptyProp }};\n\n if (this._options.reactive !== false) {\n {{# def.addMsg }} accessPath, type: 'added', \n newValue: m });\n }\n\n } else if (typeof m{{# def.currProp }} != 'object') {\n {{ /* property is not object */ }}\n var old = m{{# def.currProp }};\n m = m{{# def.currProp }} = {{= emptyProp }};\n\n if (this._options.reactive !== false) {\n {{# def.addMsg }} accessPath, type: 'changed', \n oldValue: old, newValue: m });\n }\n\n } else {\n {{ /* property exists, just traverse down the model tree */ }}\n m = m{{# def.currProp }};\n }\n#}}\n",include_traverse_tree="'use strict';\n/* Only use this style of comments, not \"//\" */\n\n/**\n * Inserts code to traverse model tree for `delete` and `splice` accessors.\n */\n{{## def.traverseTree:\n {{ \n var count = it.parsedPath.length-1;\n\n for (var i = 0; i < count; i++) { \n var currNode = it.parsedPath[i];\n var currProp = currNode.property;\n }}\n {{# def.traverseTreeStep }}\n\n {{ } /* for loop */\n\n var i = count;\n while (i--) { /* closing braces for else's above */\n }}\n }\n {{ } /* while loop */ }}\n#}}\n\n\n/**\n * Inserts code to traverse one step in the model tree\n */\n{{## def.traverseTreeStep:\n if (! (m && m.hasOwnProperty && {{# def.wasDefined}} ) )\n treeDoesNotExist = true;\n else {\n m = m{{# def.currProp }};\n {{# def.changeAccessPath }}\n {{ /* brace from else is not closed on purpose - all braces are closed in while loop */ }}\n#}}\n",dotDef={include_defines:include_defines,include_create_tree:include_create_tree,include_traverse_tree:include_traverse_tree,getPathNodeKey:pathUtils.getPathNodeKey,modelAccessPrefix:"this._model._data",modelPostMessageCode:"this._model._internalMessenger.postMessage",modelPostBatchCode:"this._model.postMessageSync",internalMessenger:"this._model._internalMessenger"},modelDotDef=_(dotDef).clone().extend({modelAccessPrefix:"this._data",modelPostMessageCode:"this._internalMessenger.postMessage",modelPostBatchCode:"this.postMessageSync",internalMessenger:"this._internalMessenger"})._(),dotSettings=_.clone(doT.templateSettings);dotSettings.strip=!1;var synthesizers=_.mapKeys(templates,function(a){return doT.template(a,dotSettings,dotDef)}),modelSynthesizers=_.mapToObject(["set","del","splice"],function(a){return doT.template(templates[a],dotSettings,modelDotDef)}),synthesizePathMethods=_.memoize(_synthesizePathMethods,void 0,1e3),normalizeSpliceIndex=modelUtils.normalizeSpliceIndex;module.exports=synthesizePathMethods;var modelMethods=_.mapKeys(modelSynthesizers,function(a){return _synthesize(a,"",[])});synthesizePathMethods.modelMethods=modelMethods},{"../../util/logger":97,"../change_data":86,"../model_utils":91,"../path_utils":93,dot:100,fs:75,"mol-proto":101}],95:[function(a,b,c){"use strict";function d(a){this.pattern=a}function e(a){if(0==a.length)throw new Error("Must provide at least one choice to Match.OneOf");this.choices=a}function f(a){this.condition=a}function g(a){this.pattern=a}function h(a){this.pattern=a}function i(a,b){this.Superclass=a,this.matchSuperclass=b}function j(a,b){if(b!==o.Any){for(var c=0;cthis.level)return this;var f=g.slice(arguments,1),h=this;if(c<=this.throwLevel)throw new Error(b());return c<=this.messageLevel&&this.postMessage("log",{level:c,type:a,str:b()}),console.log.apply(console,[this.logPrefixColor?" "+e(this.logPrefix,this.logPrefixColor):this.logPrefix,(this.colors?" "+e(d(a),k[c]):a)+":"].concat(f)),this},i.forEach(function(a){f.prototype[a]=function(){this.log.apply(this,[a].concat(g.toArray(arguments)))}}),b.exports=f},{"../messenger":79,"mol-proto":101}],99:[function(a,b,c){!function(){"use strict";function a(b,c,d){return("string"==typeof c?c:c.toString()).replace(b.define||g,function(a,c,e,f){return 0===c.indexOf("def.")&&(c=c.substring(4)),c in d||(":"===e?(b.defineParams&&f.replace(b.defineParams,function(a,b,e){d[c]={arg:b,text:e}}),c in d||(d[c]=f)):new Function("def","def['"+c+"']="+f)(d)),""}).replace(b.use||g,function(c,e){b.useParams&&(e=e.replace(b.useParams,function(a,b,c,e){if(d[c]&&d[c].arg&&e){var f=(c+":"+e).replace(/'|\\/g,"_");return d.__exp=d.__exp||{},d.__exp[f]=d[c].text.replace(new RegExp("(^|[^\\w$])"+d[c].arg+"([^\\w$])","g"),"$1"+e+"$2"),b+"def.__exp['"+f+"']"}}));var f=new Function("def","return "+e)(d);return f?a(b,f,d):f})}function c(a){return a.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}var d,e={version:"1.0.3",templateSettings:{evaluate:/\{\{([\s\S]+?(\}?)+)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,encode:/\{\{!([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,useParams:/(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,defineParams:/^\s*([\w$]+):([\s\S]+)/,conditional:/\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,varname:"it",strip:!0,append:!0,selfcontained:!1,doNotSkipEncoded:!1},template:void 0,compile:void 0};e.encodeHTMLSource=function(a){var b={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},c=a?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(a){return a?a.toString().replace(c,function(a){return b[a]||a}):""}},d=function(){return this||(0,eval)("this")}(),"undefined"!=typeof b&&b.exports?b.exports=e:"function"==typeof define&&define.amd?define(function(){return e}):d.doT=e;var f={append:{start:"'+(",end:")+'",startencode:"'+encodeHTML("},split:{start:"';out+=(",end:");out+='",startencode:"';out+=encodeHTML("}},g=/$^/;e.template=function(b,h,i){h=h||e.templateSettings;var j,k,l=h.append?f.append:f.split,m=0,n=h.use||h.define?a(h,b,i||{}):b;n=("var out='"+(h.strip?n.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):n).replace(/'|\\/g,"\\$&").replace(h.interpolate||g,function(a,b){return l.start+c(b)+l.end}).replace(h.encode||g,function(a,b){return j=!0,l.startencode+c(b)+l.end}).replace(h.conditional||g,function(a,b,d){return b?d?"';}else if("+c(d)+"){out+='":"';}else{out+='":d?"';if("+c(d)+"){out+='":"';}out+='"}).replace(h.iterate||g,function(a,b,d,e){return b?(m+=1,k=e||"i"+m,b=c(b),"';var arr"+m+"="+b+";if(arr"+m+"){var "+d+","+k+"=-1,l"+m+"=arr"+m+".length-1;while("+k+"a;a++)c=e[a],/\.def(\.dot|\.jst)?$/.test(c)&&(console.log("Loaded def "+c),this.__includes[c.substring(0,c.indexOf("."))]=g(d+c));for(a=0,b=e.length;b>a;a++)c=e[a],/\.dot(\.def|\.jst)?$/.test(c)&&(console.log("Compiling "+c+" to function"),this.__rendermodule[c.substring(0,c.indexOf("."))]=this.compilePath(d+c)),/\.jst(\.dot|\.def)?$/.test(c)&&(console.log("Compiling "+c+" to file"),this.compileToFile(this.__destination+c.substring(0,c.indexOf("."))+".js",g(d+c)));return this.__rendermodule}},{"./doT":99,fs:75}],101:[function(a,b,c){"use strict";function d(a){var b=Object.create(d.prototype);return b.self=a,b}function e(){return this.self}var f=a("./utils"),g=a("./proto_prototype"),h=a("./proto_object"),i=a("./proto_array"),j=a("./proto_function"),k=a("./proto_string"),l=a("./proto_number"),m=a("./proto_util"),n={};h.extend.call(n,h),n.extend.call(n,g),n.extend.call(n,i),n.extend.call(n,k),n.extend.call(n,l),n.extend.call(n,j),n.extend.call(n,m),n.defineProperty(d,"__",n),n.extendProto.call(d,{_:e}),n.extend.call(d,h._constants);var o=n.mapKeys.call(n,f.makeProtoFunction,!0);n.extend.call(d,o);var p=n.mapKeys.call(n,f.makeProtoInstanceMethod,!0);n.extendProto.call(d,p),"object"==typeof window&&(window._&&(d.underscore=window._),window._=d),"object"==typeof b&&b.exports&&(b.exports=d)},{"./proto_array":102,"./proto_function":103,"./proto_number":104,"./proto_object":105,"./proto_prototype":106,"./proto_string":107,"./proto_util":108,"./utils":109}],102:[function(a,b,c){"use strict";function d(a){if(!a.length)return this;Array.isArray(a)||(a=g.call(a));var b=[this.length,0].concat(a);return n.splice.apply(this,b),this}function e(a){if(!a.length)return this;Array.isArray(a)||(a=g.call(a));var b=[0,0].concat(a);return n.splice.apply(this,b),this}function f(a){var b=this.indexOf(a);return b>=0&&this.splice(b,1),this}function g(){return n.slice.call(this)}function h(a){var b={},c=Array.isArray(a);return n.forEach.call(this,function(d,e){b[d]=c?a[e]:a}),b}function i(a,b){var c={};return Array.prototype.forEach.call(this,function(d,e){c[d]=a.call(b,d,e,this)},this),c}function j(a){function b(b){return n.findIndex.call(d,function(c){return a(b,c)})}function c(a){return d.indexOf(a)}var d=[];return a||(b=c),this.forEach(function(a){var c=b(a);-1==c&&d.push(a)}),d}function k(a,b){function c(){n.forEach.call(this,function(f){Array.isArray(f)?c.call(f):a.call(b,f,d++,e)})}var d=0,e=this;c.call(this)}var l=a("./proto_object"),m=a("./utils"),n=b.exports={appendArray:d,prependArray:e,toArray:g,object:h,mapToObject:i,unique:j,deepForEach:k,spliceItem:f},o=["join","pop","push","concat","reverse","shift","unshift","slice","splice","sort","filter","forEach","some","every","map","indexOf","lastIndexOf","reduce","reduceRight"],p=i.call(o,function(a){return Array.prototype[a]});l.extend.call(n,p),n.find=Array.prototype.find||m.makeFindMethod(n.some,"value"),n.findIndex=Array.prototype.findIndex||m.makeFindMethod(n.some,"index")},{"./proto_object":105,"./utils":109}],103:[function(require,module,exports){"use strict";function makeFunction(arg1,arg2,funcBody){for(var name=this,count=arguments.length-1,funcBody=arguments[count],func,code="",i=0;count>i;i++)code+=", "+arguments[i];return code=["func = function ",name,"(",code.slice(2),") {\n",funcBody,"\n}"].join(""),eval(code),func}function partial(){var a=this,b=slice.call(arguments);return function(){return a.apply(this,b.concat(slice.call(arguments)))}}function partialRight(){var a=this,b=slice.call(arguments);return function(){return a.apply(this,slice.call(arguments).concat(b))}}function memoize(a,b){var c=this,d={},e=[];return b=b||1e3,function(){var f=a?a.apply(this,arguments):arguments[0];if(d.hasOwnProperty(f))return d[f];var g=d[f]=c.apply(this,arguments);return e.push(f),e.length>b&&delete d[e.shift()],g}}function delay(a){var b=slice.call(arguments,1);return _delay(this,a,b)}function defer(){return _delay(this,1,arguments)}function _delay(a,b,c,d){return setTimeout(a.apply.bind(a,d||null,c),b)}function deferTicks(a){if(2>a)return defer.apply(this,arguments);var b=repeat.call(deferFunc,a-1);return b=b.concat(this,slice.call(arguments,1)),deferFunc.apply(null,b)}function delayMethod(a,b){var c=slice.call(arguments,2);return _delayMethod(this,a,b,c)}function deferMethod(a){var b=slice.call(arguments,1);return _delayMethod(this,a,1,b)}function _delayMethod(a,b,c,d){return setTimeout(function(){var c="string"==typeof b?a[b]:b;c.apply(a,d)},c)}function delayed(a){var b=this,c=slice.call(arguments,1);return function(){var d=c.concat(slice.call(arguments)); + +return _delay(b,a,d,this)}}function deferred(){var a=this,b=slice.call(arguments);return function(){var c=b.concat(slice.call(arguments));return _delay(a,1,c,this)}}function debounce(a,b){var c,d,e,f,g,h=this;return function(){function i(){var j=Date.now()-f;a>j?c=setTimeout(i,a-j):(c=null,b||(g=h.apply(e,d)))}e=this,d=arguments,f=Date.now();var j=b&&!c;return c||(c=setTimeout(i,a)),j&&(g=h.apply(e,d)),g}}function throttle(a,b){function c(){i=b.leading===!1?0:Date.now(),h=null,f=g.apply(d,e)}var d,e,f,g=this,h=null,i=0;return b||(b={}),function(){var j=Date.now();i||b.leading!==!1||(i=j);var k=a-(j-i);return d=this,e=arguments,0>=k?(clearTimeout(h),h=null,i=j,f=g.apply(d,e)):h||b.trailing===!1||(h=setTimeout(c,k)),f}}function once(){var a,b=this,c=!1;return function(){return c?a:(c=!0,a=b.apply(this,arguments),b=null,a)}}function waitFor(a,b,c,d){function e(){if(g())a();else{if(!(Date.now()-f>=b))return;c&&c()}clearInterval(h)}var f=Date.now(),g=this;d=d||50;var h=setInterval(e,d)}function not(){var a=this;return function(){return!a.apply(this,arguments)}}var makeProtoFunction=require("./utils").makeProtoFunction,repeat=require("./proto_util").repeat,functionMethods=module.exports={makeFunction:makeFunction,partial:partial,partialRight:partialRight,memoize:memoize,delay:delay,defer:defer,delayed:delayed,deferred:deferred,deferTicks:deferTicks,delayMethod:delayMethod,deferMethod:deferMethod,debounce:debounce,throttle:throttle,once:once,waitFor:waitFor,not:not},slice=Array.prototype.slice,deferFunc=makeProtoFunction(defer)},{"./proto_util":108,"./utils":109}],104:[function(a,b,c){"use strict";function d(){return!isNaN(parseFloat(this))&&isFinite(this)}b.exports={isNumeric:d}},{}],105:[function(a,b,c){"use strict";function d(a,b){var c={};return r.call(a,function(b,d){c[d]=Object.getOwnPropertyDescriptor(a,d)},this,b),Object.defineProperties(this,c),this}function e(){if(Array.isArray(this))return this.slice();if(this instanceof Date)return new Date(this);if(this instanceof RegExp)return new RegExp(this);var a=Object.create(this.constructor.prototype);return d.call(a,this),a}function f(a,b,c){return Object.defineProperty(this,a,g(b,c)),this}function g(a,b){var c={value:a};return b&&d.call(c,{enumerable:!!(b&D.ENUMERABLE),configurable:!!(b&D.CONFIGURABLE),writable:!!(b&D.WRITABLE)}),c}function h(a,b){var c=s.call(a,function(a){return g(a,b)},!0);return Object.defineProperties(this,c),this}function i(a,b,c){return j(this,a,b,c,[])}function j(a,b,c,d,e){if(!(e.indexOf(b)>=0)){e.push(b);var f=Array.isArray(b)?Array.prototype.forEach:r;return f.call(b,function(f,g){var h=a.hasOwnProperty(g),i=k(a[g]),l=k(f);if(d&&h&&i!=l)throw new Error("deepExtend");if(l)h&&i||(a[g]=Array.isArray(f)?[]:{}),j(a[g],f,c,d,e);else{var m=Object.getOwnPropertyDescriptor(b,g);Object.defineProperty(a,g,m)}},this,c),a}}function k(a){return!("object"!=typeof a||null==a||a instanceof RegExp||a instanceof Date)}function l(a){if(this instanceof Date)return new Date(this);if(this instanceof RegExp)return new RegExp(this);var b=Array.isArray(this)?[]:{};return i.call(b,this,a),b}function m(){return Object.keys(this)}function n(a){var b=a?Object.keys(this):o.call(this);return b.map(function(a){return this[a]},this)}function o(){return Object.getOwnPropertyNames(this)}function p(a,b){for(var c=b?Object.keys(this):o.call(this),d=0;dd;d++){var e=b.charCodeAt(d);a=(a<<5)+a+e}return a}function unPrefix(a){return 0==this.indexOf(a)?this.replace(a,""):void 0}function format(){var a=this,b=arguments;return a.replace(formatRegexp,function(a){return"$$"==a?"$":(a=a.slice(1),b[a-1])})}var __=require("./proto_object"),stringMethods=module.exports={firstUpperCase:firstUpperCase,firstLowerCase:firstLowerCase,toRegExp:toRegExp,toFunction:toFunction,toDate:toDate,toQueryString:toQueryString,fromQueryString:fromQueryString,jsonParse:jsonParse,hashCode:hashCode,unPrefix:unPrefix,format:format},regexpStringPattern=/^\/(.*)\/([gimy]*)$/,formatRegexp=/\$[0-9]+|\$\$/g},{"./proto_object":105}],108:[function(a,b,c){"use strict";function d(a,b){for(var c=Array(Math.max(0,this)),d=0;this>d;d++)c[d]=a.call(b,d);return c}function e(a){for(var b=Array(Math.max(0,a)),c=0;a>c;c++)b[c]=this;return b}function f(a){return a.call(this,this),this}function g(a){var b=Array.prototype.slice.call(arguments,1);return"function"==typeof this?this.apply(a,b):this}function h(){return this}function i(){var a=this;return function(b){return b[a]}}function j(){var a=this;return function(b,c){return b[a]c[a]?1:0}}function k(){}b.exports={times:d,repeat:e,tap:f,result:g,identity:h,property:i,compareProperty:j,noop:k}},{}],109:[function(a,b,c){"use strict";function d(a){return function(){return this.self=a.apply(this.self,arguments),this}}function e(a){return function(){return a.call.apply(a,arguments)}}function f(a,b){var c="value"==b?0:1;return function(b,d,e){function f(a,d,e){var f=b.call(this,a,d,e);return f?(g=arguments[c],f):void 0}var g,h=a.call(this,f,d,e);return h?g:c&&a==Array.prototype.some?-1:void 0}}b.exports={makeProtoInstanceMethod:d,makeProtoFunction:e,makeFindMethod:f},new Error},{}]},{},[44]); //# sourceMappingURL=milo.min.js.map \ No newline at end of file diff --git a/dist/milo.min.js.map b/dist/milo.min.js.map index 074d78e..a718b9b 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,"componentPrefix","domStorage","typeSuffix","prefixSeparator","root","messageKey","messageTimestamp","quotaExceeded","throwError","componentMetaTemplate","componentMetaRegex","request","jsonpTimeout","jsonpCallbackPrefix","optionsKey","defaults","timeout","websocket","rpc","responsePrefix","deprecationWarning",43,"loader","_loader","miloMail","_loadViewsInElement","views","loadElements","totalCount","loadedCount","loadView","err","id","html","./attributes/a_load","./config","./util/request",44,"domReady","mail","minder","registry","./attributes","./binder","./classes","./command","./components/c_class","./components/c_facet","./components/classes/View","./loader","./registry","./services/window","./use_facets","./util","./util/create_component_class","./util/create_facet_class",45,"./command/cmd_registry",46,"eventTypes","ClipboardEvent","Event","FocusEvent","KeyboardEvent","MouseEvent","TouchEvent","global","eTypes","eventConstructorName","eventConstructor","makeFunction","domEventsConstructors",47,"eventEmitter","DOMEmitterSource$destroy","sourceSubscriberMethod","capture","useCapturePattern","isCapturePhase","eventPhase","CAPTURING_PHASE","useCapturePostfix","DOMEmitterSource$postMessage","EventConstructor","domEvent","notCancelled","dispatchEvent","../components/c_class","./de_constrs",48,"MailMsgAPI","MailMessageSource","mailMsgSource","./mail_api","./mail_source",49,"windowMessageRegExp","windowMessagePrefix",50,"isReadyStateChange","readystatechange","_windowSubscriberMethod","isWindowMessage","../de_constrs",51,"windowService_isTop","top","__karma__","windowService","domEmitterSource","isTop","./dom_source",52,"./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",53,"prefix","uniqueId","./unique_id",54,"superClassName","staticMethods","SuperClass","componentRegistry","../components/c_registry",55,"facetRegistry","FacetBaseClass","../components/c_facet","../components/c_facets/cf_registry",56,"deprecate","fn","deprecated","warned",57,"filterNodeListByType","Node","ELEMENT_NODE","nodeList","nodeType","filter","containingElement","selectElementContents","doc","ownerDocument","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","offsetTop","offsetLeft","offsetParent","getBorder","topOffset","leftOffset","side","styles","sideValue","parseInt","getPropertyValue","normalize","TEXT_NODE","lastChild","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","setTimeout",58,"DOMListeners","listeners","DOMListeners$add","DOMListeners$remove","listener","idx","isEqual","_removeListener","DOMListeners$removeAll","l","removeAll",59,"domReadySubscribed","onDomReady","domReadyFuncs",60,"DragDrop$$componentDataType","dragDropConfig","DragDrop$$getDropPositionY","dP","getDropPosition","isBelow","clientY","targetTop","targetHeight","clientRect","getBoundingClientRect","targetWidth","width","height","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","onDragDropCompleted","onCompleteDragDrop","dragDropService","getCurrentDragDrop","getCurrentDragSource","DragDrop_destroy","offAll","getDropPositionY","getComponentState","getDropEffect","isEffectAllowed","dragdropstarted","dragdropcompleted","completedragdrop",61,"error$createClass","errorClassName","ErrorClass","makeSubclass","error$toBeImplemented","AbstractClass","errorClassNames","createClass",62,"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",63,"util_destroy","domListeners","fragment","storage","./component_name","./deprecate","./dom_listeners","./domready","./dragdrop","./error","./fragment","./json_parse","./request","./selection","./storage","./websocket",64,65,"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","noop","then","promiseThen","promiseCatch","status","response","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","once","delay","post","json","jsonp",66,"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",67,"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","Date","valStr","boolean","number","Number","toFunction","RegExp","toRegExp","./model","./msg_src",68,"Model$$registerWithDOMStorage","Model_domStorageSerializer","Model_domStorageParser","registerWithDOMStorage",69,"StorageMessageSource$addSourceSubscriber","StorageMessageSource$removeSourceSubscriber","StorageMessageSource$postMessage","StorageMessageSource$trigger","storageArea","../../util/unique_id",70,"uniqueCount","newTimestamp","now","uniqueID","timestamp",71,"wsMessenger","wsMsgSource","WSMessageSource","connect","WSMsgAPI","./msg_api",72,"SOCKET_MESSAGES",73,"WSMessageSource$connect","_options","host","location","port","_ws","onopen","ws","onmessage","onclose","onerror","close","WebSocket","_wsSubscriberMethod","WSMessageSource$handleEvent","WSMessageSource$trigger","onTimeout","toggleRpcSubscription","callbackCorrId","onResponse","clearInterval","interval","onOff","corrId",74,"Encoder","skip","bits","output","readByte","byte","alphabet","finish","Decoder","readChar","char","fromCharCode","val","lookup","encoder","decoder","alias","table","flush",75,76,"_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",77,"MessengerRegexpAPI","./abstract/mixin","./messenger/m_api","./messenger/m_api_rx","./messenger/m_source","./messenger/msngr_source",78,"deepExtend","debug",79,"_initializeSubscribers","_messageSubscribers","_patternMessageSubscribers","CONF","Messenger$destroy","Messenger$on","_Messenger_onWithOptions","Messenger$once","dispatchTimes","Messenger$onceSync","sync","Messenger$onSync","Messenger$onAsync","Any","_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",80,"MessengerAPI$destroy","addInternalMessage","internalMsgs","_internalMessages","removeInternalMessage","unexpectedNotificationWarning","messageIndex","getInternalMessages","sourceData","../util/logger",81,"_patternInternalMessages","_catchAllSubscribed","noPatternInternalMessages","internalMessages","internalMessagesHash","patternMessages","sourcePattern","./m_api",82,"messengerAPI","_prepareMessengerAPI","MessageSource$destroy","setMessenger","newSourceMessage","removedSourceMessage","api","shouldDispatch",83,"sourceMessenger","MessengerMessageSource$postMessage",84,"./messenger","./minder",85,"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","destroyConnector","./model/connector","./util/logger",86,"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",87,"setupMode","_changesQueue1","_changesQueue2","pathTranslation","patternTranslation","getPatternTranslations","pathTranslation1","reverseTranslationRules","pathTranslation2","patternTranslation1","reversePatternTranslationRules","patternTranslation2","dataTranslation","dataTranslation1","dataTranslation2","dataValidation","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","deferChangeMode","../messenger",88,"Model$path","__proto__","reactive","_prepareMessengers","_data","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",89,"../messenger/m_api_rx",90,"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",91,92,"rootPath","internalChanges","truncateChangePath","fullPath","../messenger/m_api",93,"nodeParsePattern","pathParsePattern","unparsed","nodeStr","pathNodeTypes","patternPathParsePattern","regexStr","patternsStarted","regex","nodeRegex","interpolated","startIndex","methodsNames","wrappedMethods","mapToObject","origMethod","regexPath","propertyPathSyntax","arrayPathSyntax","interpolationSyntax","propertyInterpolateSyntax","arrayInterpolateSyntax","propertyStarSyntax","arrayStarSyntax","starSyntax","pathParseSyntax","patternPathParseSyntax",".","[","*",".*","[*]",94,"_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",95,"choices","Where","condition","Superclass","matchSuperclassToo","matchSuperclass","checkSubtree","typeofChecks","_jsKeywords","valueElement","_prependPath","unknownKeysAllowed","keyPattern","emptyHash","requiredPatterns","optionalPatterns","subPattern","subValue","base","TypeError",96,"./check","./logger",97,"Logger","level","./logger_class",98,"pad","maxLevelLength","colored","color","DEFAULT_OPTIONS","levels","Math","max","colors","throwLevel","enabled","logPrefix","log","logString","messageLevel","console","logPrefixColor",99,"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",100,"InstallDots","__path","__destination","destination","__global","__rendermodule","rendermodule","__settings","__includes","addexports","ret","to","readdata","readFileSync","process","compileAll","compileToFile","modulename","lastIndexOf","defs","settings","compileoptions","defaultcompiled","compiled","writeFileSync","compilePath","k","defFolder","sources","readdirSync","./doT",101,"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",102,"arrayToAppend","prependArray","arrayToPrepend","values","valuesIsArray","unique","itemIndex","filtered","it","itemIndexOf","_deepForEach","arr","nativeArrayMethodsNames","nativeArrayMethods","makeFindMethod",103,"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",104,"isNumeric","parseFloat","isFinite",105,"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",106,"propDescriptors","applyConstructor","thisClass","subclass","constructorCode",107,"toUpperCase","rx","regexpStringPattern","toDate","date","getTime","toQueryString","qs","encodeURIComponent","fromQueryString","pairs","results","decodeURIComponent","pair","splitPair","hashCode","hash","format","formatRegexp",108,"times","tap","identity","compareProperty","b",109,"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,E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9B,KAAK,SAAS5iF,EAAQQ,EAAOJ,GACnC,YASA,SAASs5E,GAAwBt+D,GAC7B,MAAO,YAEH,MADAxa,MAAK4kB,KAAOpK,EAAOla,MAAMN,KAAK4kB,KAAMrkB,WAC7BP,MAKf,QAAS44E,GAAkBp+D,GACvB,MAAO,YAGH,MAAOA,GAAO/a,KAAKa,MAAMka,EAAQja,YAczC,QAASg6E,GAAe0H,EAAYC,GAChC,GAAIC,GAAuB,SAAZD,EAAsB,EAAI,CAEzC,OAAO,UAA0BhlE,EAAU/O,EAASgvE,GAShD,QAASiF,GAAS/gF,EAAO+oB,EAAOxF,GAC5B,GAAIvL,GAAO6D,EAASzd,KAAKO,KAAMqB,EAAO+oB,EAAOxF,EAC7C,OAAIvL,IACAgpE,EAAoB9hF,UAAU4hF,GACvB9oE,GAFX,OAVJ,GAAIgpE,GACAhxD,EAAQ4wD,EAAWxiF,KAAKO,KAAMoiF,EAAUj0E,EAASgvE,EACrD,OAAI9rD,GACOgxD,EAEFF,GAAYF,GAAcrtE,MAAMxS,UAAU08D,KACxC,GADN,QA1CDl/D,EAAOJ,SACfs5E,wBAAyBA,EACzBF,kBAAmBA,EACnB2B,eAAgBA,GAqBP,GAAIj7E,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,"componentPrefix","domStorage","typeSuffix","prefixSeparator","root","messageKey","messageTimestamp","quotaExceeded","throwError","componentMetaTemplate","componentMetaRegex","request","jsonpTimeout","jsonpCallbackPrefix","optionsKey","defaults","timeout","websocket","rpc","responsePrefix","deprecationWarning",43,"loader","_loader","miloMail","_loadViewsInElement","views","loadElements","totalCount","loadedCount","loadView","err","id","html","./attributes/a_load","./config","./util/request",44,"domReady","mail","minder","registry","./attributes","./binder","./classes","./command","./components/c_class","./components/c_facet","./components/classes/View","./loader","./registry","./services/window","./use_facets","./util","./util/create_component_class","./util/create_facet_class",45,"./command/cmd_registry",46,"eventTypes","ClipboardEvent","Event","FocusEvent","KeyboardEvent","MouseEvent","TouchEvent","global","eTypes","eventConstructorName","eventConstructor","makeFunction","domEventsConstructors",47,"eventEmitter","DOMEmitterSource$destroy","sourceSubscriberMethod","capture","useCapturePattern","isCapturePhase","eventPhase","CAPTURING_PHASE","useCapturePostfix","DOMEmitterSource$postMessage","EventConstructor","domEvent","notCancelled","dispatchEvent","../components/c_class","./de_constrs",48,"MailMsgAPI","MailMessageSource","mailMsgSource","./mail_api","./mail_source",49,"windowMessageRegExp","windowMessagePrefix",50,"isReadyStateChange","readystatechange","_windowSubscriberMethod","isWindowMessage","../de_constrs",51,"windowService_isTop","top","__karma__","windowService","domEmitterSource","isTop","./dom_source",52,"./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",53,"prefix","uniqueId","./unique_id",54,"superClassName","staticMethods","SuperClass","componentRegistry","../components/c_registry",55,"facetRegistry","FacetBaseClass","../components/c_facet","../components/c_facets/cf_registry",56,"deprecate","fn","deprecated","warned",57,"filterNodeListByType","Node","ELEMENT_NODE","nodeList","nodeType","filter","containingElement","selectElementContents","doc","ownerDocument","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","offsetTop","offsetLeft","offsetParent","getBorder","topOffset","leftOffset","side","styles","sideValue","parseInt","getPropertyValue","normalize","TEXT_NODE","lastChild","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","setTimeout",58,"DOMListeners","listeners","DOMListeners$add","DOMListeners$remove","listener","idx","isEqual","_removeListener","DOMListeners$removeAll","l","removeAll",59,"domReadySubscribed","onDomReady","domReadyFuncs",60,"DragDrop$$componentDataType","dragDropConfig","DragDrop$$getDropPositionY","dP","getDropPosition","isBelow","clientY","targetTop","targetHeight","clientRect","getBoundingClientRect","targetWidth","width","height","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","onDragDropCompleted","onCompleteDragDrop","dragDropService","getCurrentDragDrop","getCurrentDragSource","DragDrop_destroy","offAll","getDropPositionY","getComponentState","getDropEffect","isEffectAllowed","dragdropstarted","dragdropcompleted","completedragdrop",61,"error$createClass","errorClassName","ErrorClass","makeSubclass","error$toBeImplemented","AbstractClass","errorClassNames","createClass",62,"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",63,"util_destroy","domListeners","fragment","storage","./component_name","./deprecate","./dom_listeners","./domready","./dragdrop","./error","./fragment","./json_parse","./request","./selection","./storage","./websocket",64,65,"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","noop","then","promiseThen","promiseCatch","status","response","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","once","delay","post","json","jsonp",66,"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",67,"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","Date","valStr","boolean","number","Number","toFunction","RegExp","toRegExp","./model","./msg_src",68,"Model$$registerWithDOMStorage","Model_domStorageSerializer","Model_domStorageParser","registerWithDOMStorage",69,"StorageMessageSource$addSourceSubscriber","StorageMessageSource$removeSourceSubscriber","StorageMessageSource$postMessage","StorageMessageSource$trigger","storageArea","../../util/unique_id",70,"uniqueCount","newTimestamp","now","uniqueID","timestamp",71,"wsMessenger","wsMsgSource","WSMessageSource","connect","WSMsgAPI","./msg_api",72,"SOCKET_MESSAGES",73,"WSMessageSource$connect","_options","host","location","port","_ws","onopen","ws","onmessage","onclose","onerror","close","WebSocket","_wsSubscriberMethod","WSMessageSource$handleEvent","WSMessageSource$trigger","onTimeout","toggleRpcSubscription","callbackCorrId","onResponse","clearInterval","interval","onOff","corrId",74,"Encoder","skip","bits","output","readByte","byte","alphabet","finish","Decoder","readChar","char","fromCharCode","val","lookup","encoder","decoder","alias","table","flush",75,76,"_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",77,"MessengerRegexpAPI","./abstract/mixin","./messenger/m_api","./messenger/m_api_rx","./messenger/m_source","./messenger/msngr_source",78,"deepExtend","debug",79,"_initializeSubscribers","_messageSubscribers","_patternMessageSubscribers","CONF","Messenger$destroy","Messenger$on","_Messenger_onWithOptions","Messenger$once","dispatchTimes","Messenger$onceSync","sync","Messenger$onSync","Messenger$onAsync","Any","_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",80,"MessengerAPI$destroy","addInternalMessage","internalMsgs","_internalMessages","removeInternalMessage","unexpectedNotificationWarning","messageIndex","getInternalMessages","sourceData","../util/logger",81,"_patternInternalMessages","_catchAllSubscribed","noPatternInternalMessages","internalMessages","internalMessagesHash","patternMessages","sourcePattern","./m_api",82,"messengerAPI","_prepareMessengerAPI","MessageSource$destroy","setMessenger","newSourceMessage","removedSourceMessage","api","shouldDispatch",83,"sourceMessenger","MessengerMessageSource$postMessage",84,"./messenger","./minder",85,"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","destroyConnector","./model/connector","./util/logger",86,"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",87,"setupMode","_changesQueue1","_changesQueue2","pathTranslation","patternTranslation","getPatternTranslations","pathTranslation1","reverseTranslationRules","pathTranslation2","patternTranslation1","reversePatternTranslationRules","patternTranslation2","dataTranslation","dataTranslation1","dataTranslation2","dataValidation","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","deferChangeMode","../messenger",88,"Model$path","__proto__","reactive","_prepareMessengers","_data","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",89,"../messenger/m_api_rx",90,"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",91,92,"rootPath","internalChanges","truncateChangePath","fullPath","../messenger/m_api",93,"nodeParsePattern","pathParsePattern","unparsed","nodeStr","pathNodeTypes","patternPathParsePattern","regexStr","patternsStarted","regex","nodeRegex","interpolated","startIndex","methodsNames","wrappedMethods","mapToObject","origMethod","regexPath","propertyPathSyntax","arrayPathSyntax","interpolationSyntax","propertyInterpolateSyntax","arrayInterpolateSyntax","propertyStarSyntax","arrayStarSyntax","starSyntax","pathParseSyntax","patternPathParseSyntax",".","[","*",".*","[*]",94,"_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",95,"choices","Where","condition","Superclass","matchSuperclassToo","matchSuperclass","checkSubtree","typeofChecks","_jsKeywords","valueElement","_prependPath","unknownKeysAllowed","keyPattern","emptyHash","requiredPatterns","optionalPatterns","subPattern","subValue","base","TypeError",96,"./check","./logger",97,"Logger","level","./logger_class",98,"pad","maxLevelLength","colored","color","DEFAULT_OPTIONS","levels","Math","max","colors","throwLevel","enabled","logPrefix","log","logString","messageLevel","console","logPrefixColor",99,"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",100,"InstallDots","__path","__destination","destination","__global","__rendermodule","rendermodule","__settings","__includes","addexports","ret","to","readdata","readFileSync","process","compileAll","compileToFile","modulename","lastIndexOf","defs","settings","compileoptions","defaultcompiled","compiled","writeFileSync","compilePath","k","defFolder","sources","readdirSync","./doT",101,"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",102,"arrayToAppend","prependArray","arrayToPrepend","values","valuesIsArray","unique","itemIndex","filtered","it","itemIndexOf","_deepForEach","arr","nativeArrayMethodsNames","nativeArrayMethods","makeFindMethod",103,"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",104,"isNumeric","parseFloat","isFinite",105,"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",106,"propDescriptors","applyConstructor","thisClass","subclass","constructorCode",107,"toUpperCase","rx","regexpStringPattern","toDate","date","getTime","toQueryString","qs","encodeURIComponent","fromQueryString","pairs","results","decodeURIComponent","pair","splitPair","hashCode","hash","format","formatRegexp",108,"times","tap","identity","compareProperty","b",109,"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,E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U/O,EAASgvE,GAShD,QAASiF,GAAS/gF,EAAO+oB,EAAOxF,GAC5B,GAAIvL,GAAO6D,EAASzd,KAAKO,KAAMqB,EAAO+oB,EAAOxF,EAC7C,OAAIvL,IACAgpE,EAAoB9hF,UAAU4hF,GACvB9oE,GAFX,OAVJ,GAAIgpE,GACAhxD,EAAQ4wD,EAAWxiF,KAAKO,KAAMoiF,EAAUj0E,EAASgvE,EACrD,OAAI9rD,GACOgxD,EAEFF,GAAYF,GAAcrtE,MAAMxS,UAAU08D,KACxC,GADN,QA1CDl/D,EAAOJ,SACfs5E,wBAAyBA,EACzBF,kBAAmBA,EACnB2B,eAAgBA,GAqBP,GAAIj7E,iBA+BN","sourceRoot":"/"} \ No newline at end of file diff --git a/lib/components/c_class.js b/lib/components/c_class.js index 720befc..10d3072 100644 --- a/lib/components/c_class.js +++ b/lib/components/c_class.js @@ -916,5 +916,5 @@ function Component$destroy(quiet) { * @return {Boolean} */ function Component$isDestroyed() { - return this._destroyed; + return !!this._destroyed; }