summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-01-23 11:35:59 +0200
committerArtur Signell <artur@vaadin.com>2015-01-23 11:35:59 +0200
commit7c857fad5bcc3018ae1203550ea969ef8ac8aced (patch)
tree9bb596d5d0acd40c19dfc96bb25aba863028a8f6
parent1756fe6badb72851ac81ed333d8100ee6d54a2b0 (diff)
downloadvaadin-core-7c857fad5bcc3018ae1203550ea969ef8ac8aced.tar.gz
vaadin-core-7c857fad5bcc3018ae1203550ea969ef8ac8aced.zip
Upgrading version 0.1.0
-rw-r--r--Object.observe.poly.js371
-rw-r--r--vaadin-components.html12
2 files changed, 377 insertions, 6 deletions
diff --git a/Object.observe.poly.js b/Object.observe.poly.js
new file mode 100644
index 0000000..aeb7d8c
--- /dev/null
+++ b/Object.observe.poly.js
@@ -0,0 +1,371 @@
+/*
+ Tested against Chromium build with Object.observe and acts EXACTLY the same,
+ though Chromium build is MUCH faster
+
+ Trying to stay as close to the spec as possible,
+ this is a work in progress, feel free to comment/update
+
+ Specification:
+ http://wiki.ecmascript.org/doku.php?id=harmony:observe
+
+ Built using parts of:
+ https://github.com/tvcutsem/harmony-reflect/blob/master/examples/observer.js
+
+ Limits so far;
+ Built using polling... Will update again with polling/getter&setters to make things better at some point
+
+TODO:
+ Add support for Object.prototype.watch -> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch
+*/
+if(!Object.observe){
+ (function(extend, global){
+ "use strict";
+ var isCallable = (function(toString){
+ var s = toString.call(toString),
+ u = typeof u;
+ return typeof global.alert === "object" ?
+ function isCallable(f){
+ return s === toString.call(f) || (!!f && typeof f.toString == u && typeof f.valueOf == u && /^\s*\bfunction\b/.test("" + f));
+ }:
+ function isCallable(f){
+ return s === toString.call(f);
+ }
+ ;
+ })(extend.prototype.toString);
+ // isNode & isElement from http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
+ //Returns true if it is a DOM node
+ var isNode = function isNode(o){
+ return (
+ typeof Node === "object" ? o instanceof Node :
+ o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName==="string"
+ );
+ }
+ //Returns true if it is a DOM element
+ var isElement = function isElement(o){
+ return (
+ typeof HTMLElement === "object" ? o instanceof HTMLElement : //DOM2
+ o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName==="string"
+ );
+ }
+ var _isImmediateSupported = (function(){
+ return !!global.setImmediate;
+ })();
+ var _doCheckCallback = (function(){
+ if(_isImmediateSupported){
+ return function _doCheckCallback(f){
+ return setImmediate(f);
+ };
+ }else{
+ return function _doCheckCallback(f){
+ return setTimeout(f, 10);
+ };
+ }
+ })();
+ var _clearCheckCallback = (function(){
+ if(_isImmediateSupported){
+ return function _clearCheckCallback(id){
+ clearImmediate(id);
+ };
+ }else{
+ return function _clearCheckCallback(id){
+ clearTimeout(id);
+ };
+ }
+ })();
+ var isNumeric=function isNumeric(n){
+ return !isNaN(parseFloat(n)) && isFinite(n);
+ };
+ var sameValue = function sameValue(x, y){
+ if(x===y){
+ return x !== 0 || 1 / x === 1 / y;
+ }
+ return x !== x && y !== y;
+ };
+ var isAccessorDescriptor = function isAccessorDescriptor(desc){
+ if (typeof(desc) === 'undefined'){
+ return false;
+ }
+ return ('get' in desc || 'set' in desc);
+ };
+ var isDataDescriptor = function isDataDescriptor(desc){
+ if (typeof(desc) === 'undefined'){
+ return false;
+ }
+ return ('value' in desc || 'writable' in desc);
+ };
+
+ var validateArguments = function validateArguments(O, callback, accept){
+ if(typeof(O)!=='object'){
+ // Throw Error
+ throw new TypeError("Object.observeObject called on non-object");
+ }
+ if(isCallable(callback)===false){
+ // Throw Error
+ throw new TypeError("Object.observeObject: Expecting function");
+ }
+ if(Object.isFrozen(callback)===true){
+ // Throw Error
+ throw new TypeError("Object.observeObject: Expecting unfrozen function");
+ }
+ if (accept !== undefined) {
+ if (!Array.isArray(accept)) {
+ throw new TypeError("Object.observeObject: Expecting acceptList in the form of an array");
+ }
+ }
+ };
+
+ var Observer = (function Observer(){
+ var wraped = [];
+ var Observer = function Observer(O, callback, accept){
+ validateArguments(O, callback, accept);
+ if (!accept) {
+ accept = ["add", "update", "delete", "reconfigure", "setPrototype", "preventExtensions"];
+ }
+ Object.getNotifier(O).addListener(callback, accept);
+ if(wraped.indexOf(O)===-1){
+ wraped.push(O);
+ }else{
+ Object.getNotifier(O)._checkPropertyListing();
+ }
+ };
+
+ Observer.prototype.deliverChangeRecords = function Observer_deliverChangeRecords(O){
+ Object.getNotifier(O).deliverChangeRecords();
+ };
+
+ wraped.lastScanned = 0;
+ var f = (function f(wrapped){
+ return function _f(){
+ var i = 0, l = wrapped.length, startTime = new Date(), takingTooLong=false;
+ for(i=wrapped.lastScanned; (i<l)&&(!takingTooLong); i++){
+ if(_indexes.indexOf(wrapped[i]) > -1){
+ Object.getNotifier(wrapped[i])._checkPropertyListing();
+ takingTooLong=((new Date())-startTime)>100; // make sure we don't take more than 100 milliseconds to scan all objects
+ }else{
+ wrapped.splice(i, 1);
+ i--;
+ l--;
+ }
+ }
+ wrapped.lastScanned=i<l?i:0; // reset wrapped so we can make sure that we pick things back up
+ _doCheckCallback(_f);
+ };
+ })(wraped);
+ _doCheckCallback(f);
+ return Observer;
+ })();
+
+ var Notifier = function Notifier(watching){
+ var _listeners = [], _acceptLists = [], _updates = [], _updater = false, properties = [], values = [];
+ var self = this;
+ Object.defineProperty(self, '_watching', {
+ enumerable: true,
+ get: (function(watched){
+ return function(){
+ return watched;
+ };
+ })(watching)
+ });
+ var wrapProperty = function wrapProperty(object, prop){
+ var propType = typeof(object[prop]), descriptor = Object.getOwnPropertyDescriptor(object, prop);
+ if((prop==='getNotifier')||isAccessorDescriptor(descriptor)||(!descriptor.enumerable)){
+ return false;
+ }
+ if((object instanceof Array)&&isNumeric(prop)){
+ var idx = properties.length;
+ properties[idx] = prop;
+ values[idx] = object[prop];
+ return true;
+ }
+ (function(idx, prop){
+ properties[idx] = prop;
+ values[idx] = object[prop];
+ function getter(){
+ return values[getter.info.idx];
+ }
+ function setter(value){
+ if(!sameValue(values[setter.info.idx], value)){
+ Object.getNotifier(object).queueUpdate(object, prop, 'update', values[setter.info.idx]);
+ values[setter.info.idx] = value;
+ }
+ }
+ getter.info = setter.info = {
+ idx: idx
+ };
+ Object.defineProperty(object, prop, {
+ get: getter,
+ set: setter
+ });
+ })(properties.length, prop);
+ return true;
+ };
+ self._checkPropertyListing = function _checkPropertyListing(dontQueueUpdates){
+ var object = self._watching, keys = Object.keys(object), i=0, l=keys.length;
+ var newKeys = [], oldKeys = properties.slice(0), updates = [];
+ var prop, queueUpdates = !dontQueueUpdates, propType, value, idx, aLength;
+
+ if(object instanceof Array){
+ aLength = self._oldLength;//object.length;
+ //aLength = object.length;
+ }
+
+ for(i=0; i<l; i++){
+ prop = keys[i];
+ value = object[prop];
+ propType = typeof(value);
+ if((idx = properties.indexOf(prop))===-1){
+ if(wrapProperty(object, prop)&&queueUpdates){
+ self.queueUpdate(object, prop, 'add', null, object[prop]);
+ }
+ }else{
+ if(!(object instanceof Array)||(isNumeric(prop))){
+ if(values[idx] !== value){
+ if(queueUpdates){
+ self.queueUpdate(object, prop, 'update', values[idx], value);
+ }
+ values[idx] = value;
+ }
+ }
+ oldKeys.splice(oldKeys.indexOf(prop), 1);
+ }
+ }
+
+ if(object instanceof Array && object.length !== aLength){
+ if(queueUpdates){
+ self.queueUpdate(object, 'length', 'update', aLength, object);
+ }
+ self._oldLength = object.length;
+ }
+
+ if(queueUpdates){
+ l = oldKeys.length;
+ for(i=0; i<l; i++){
+ idx = properties.indexOf(oldKeys[i]);
+ self.queueUpdate(object, oldKeys[i], 'delete', values[idx]);
+ properties.splice(idx,1);
+ values.splice(idx,1);
+ for(var i=idx;i<properties.length;i++){
+ if(!(properties[i] in object))
+ continue;
+ var getter = Object.getOwnPropertyDescriptor(object,properties[i]).get;
+ if(!getter)
+ continue;
+ var info = getter.info;
+ info.idx = i;
+ }
+ };
+ }
+ };
+ self.addListener = function Notifier_addListener(callback, accept){
+ var idx = _listeners.indexOf(callback);
+ if(idx===-1){
+ _listeners.push(callback);
+ _acceptLists.push(accept);
+ }
+ else {
+ _acceptLists[idx] = accept;
+ }
+ };
+ self.removeListener = function Notifier_removeListener(callback){
+ var idx = _listeners.indexOf(callback);
+ if(idx>-1){
+ _listeners.splice(idx, 1);
+ _acceptLists.splice(idx, 1);
+ }
+ };
+ self.listeners = function Notifier_listeners(){
+ return _listeners;
+ };
+ self.queueUpdate = function Notifier_queueUpdate(what, prop, type, was){
+ this.queueUpdates([{
+ type: type,
+ object: what,
+ name: prop,
+ oldValue: was
+ }]);
+ };
+ self.queueUpdates = function Notifier_queueUpdates(updates){
+ var self = this, i = 0, l = updates.length||0, update;
+ for(i=0; i<l; i++){
+ update = updates[i];
+ _updates.push(update);
+ }
+ if(_updater){
+ _clearCheckCallback(_updater);
+ }
+ _updater = _doCheckCallback(function(){
+ _updater = false;
+ self.deliverChangeRecords();
+ });
+ };
+ self.deliverChangeRecords = function Notifier_deliverChangeRecords(){
+ var i = 0, l = _listeners.length,
+ //keepRunning = true, removed as it seems the actual implementation doesn't do this
+ // In response to BUG #5
+ retval;
+ for(i=0; i<l; i++){
+ if(_listeners[i]){
+ var currentUpdates;
+ if (_acceptLists[i]) {
+ currentUpdates = [];
+ for (var j = 0, updatesLength = _updates.length; j < updatesLength; j++) {
+ if (_acceptLists[i].indexOf(_updates[j].type) !== -1) {
+ currentUpdates.push(_updates[j]);
+ }
+ }
+ }
+ else {
+ currentUpdates = _updates;
+ }
+ if (currentUpdates.length) {
+ if(_listeners[i]===console.log){
+ console.log(currentUpdates);
+ }else{
+ _listeners[i](currentUpdates);
+ }
+ }
+ }
+ }
+ _updates=[];
+ };
+ self.notify = function Notifier_notify(changeRecord) {
+ if (typeof changeRecord !== "object" || typeof changeRecord.type !== "string") {
+ throw new TypeError("Invalid changeRecord with non-string 'type' property");
+ }
+ changeRecord.object = watching;
+ self.queueUpdates([changeRecord]);
+ };
+ self._checkPropertyListing(true);
+ };
+
+ var _notifiers=[], _indexes=[];
+ extend.getNotifier = function Object_getNotifier(O){
+ var idx = _indexes.indexOf(O), notifier = idx>-1?_notifiers[idx]:false;
+ if(!notifier){
+ idx = _indexes.length;
+ _indexes[idx] = O;
+ notifier = _notifiers[idx] = new Notifier(O);
+ }
+ return notifier;
+ };
+ extend.observe = function Object_observe(O, callback, accept){
+ // For Bug 4, can't observe DOM elements tested against canry implementation and matches
+ if(!isElement(O)){
+ return new Observer(O, callback, accept);
+ }
+ };
+ extend.unobserve = function Object_unobserve(O, callback){
+ validateArguments(O, callback);
+ var idx = _indexes.indexOf(O),
+ notifier = idx>-1?_notifiers[idx]:false;
+ if (!notifier){
+ return;
+ }
+ notifier.removeListener(callback);
+ if (notifier.listeners().length === 0){
+ _indexes.splice(idx, 1);
+ _notifiers.splice(idx, 1);
+ }
+ };
+ })(Object, this);
+}
diff --git a/vaadin-components.html b/vaadin-components.html
index e1ac4be..41b306b 100644
--- a/vaadin-components.html
+++ b/vaadin-components.html
@@ -2,7 +2,7 @@
<html>
<head>
<script>
-$wnd = window; $doc = document;function VaadinComponents(){var N='bootstrap',O='begin',P='gwt.codesvr.VaadinComponents=',Q='gwt.codesvr=',R='VaadinComponents',S='startup',T='DUMMY',U=0,V=1,W='iframe',X='javascript:""',Y='position:absolute; width:0; height:0; border:none; left: -1000px;',Z=' top: -1000px;',$='CSS1Compat',_='<!doctype html>',ab='',bb='<html><head><\/head><body><\/body><\/html>',cb='_',db='$1',eb='script',fb='javascript',gb='meta',hb='name',ib='VaadinComponents::',jb='::',kb='gwt:property',lb='content',mb='=',nb='gwt:onPropertyErrorFn',ob='Bad handler "',pb='" for "gwt:onPropertyErrorFn"',qb='gwt:onLoadErrorFn',rb='" for "gwt:onLoadErrorFn"',sb='#',tb='?',ub='/',vb='img',wb='clear.cache.gif',xb='baseUrl',yb='VaadinComponents.nocache.js',zb='base',Ab='//',Bb='modernie',Cb='MSIE',Db='Trident',Eb='yes',Fb='none',Gb='selectorCapability',Hb='function',Ib='native',Jb='js',Kb='user.agent',Lb='webkit',Mb='safari',Nb='msie',Ob=10,Pb=11,Qb='ie10',Rb=9,Sb='ie9',Tb=8,Ub='ie8',Vb='gecko',Wb='gecko1_8',Xb=2,Yb=3,Zb=4,$b='selectingPermutation',_b='VaadinComponents.devmode.js',ac='DF366C94317FC564C4A099F33FA8A245',bc=':1',cc=':2',dc=':3',ec=':4',fc=':',gc='.cache.js',hc='loadExternalRefs',ic='end',jc='http:',kc='file:',lc='_gwt_dummy_',mc='__gwtDevModeHook:VaadinComponents',nc='Ignoring non-whitelisted Dev Mode URL: ',oc=':moduleBase',pc='head';var n=window;var o=document;q(N,O);function p(){var a=n.location.search;return a.indexOf(P)!=-1||a.indexOf(Q)!=-1}
+$wnd = window; $doc = document;function VaadinComponents(){var N='bootstrap',O='begin',P='gwt.codesvr.VaadinComponents=',Q='gwt.codesvr=',R='VaadinComponents',S='startup',T='DUMMY',U=0,V=1,W='iframe',X='javascript:""',Y='position:absolute; width:0; height:0; border:none; left: -1000px;',Z=' top: -1000px;',$='CSS1Compat',_='<!doctype html>',ab='',bb='<html><head><\/head><body><\/body><\/html>',cb='_',db='$1',eb='script',fb='javascript',gb='meta',hb='name',ib='VaadinComponents::',jb='::',kb='gwt:property',lb='content',mb='=',nb='gwt:onPropertyErrorFn',ob='Bad handler "',pb='" for "gwt:onPropertyErrorFn"',qb='gwt:onLoadErrorFn',rb='" for "gwt:onLoadErrorFn"',sb='#',tb='?',ub='/',vb='img',wb='clear.cache.gif',xb='baseUrl',yb='VaadinComponents.nocache.js',zb='base',Ab='//',Bb='modernie',Cb='MSIE',Db='Trident',Eb='yes',Fb='none',Gb='selectorCapability',Hb='function',Ib='native',Jb='js',Kb='user.agent',Lb='webkit',Mb='safari',Nb='msie',Ob=10,Pb=11,Qb='ie10',Rb=9,Sb='ie9',Tb=8,Ub='ie8',Vb='gecko',Wb='gecko1_8',Xb=2,Yb=3,Zb=4,$b='selectingPermutation',_b='VaadinComponents.devmode.js',ac='22194BF6C0B99CDDF2D95E02972EDB13',bc=':1',cc=':2',dc=':3',ec=':4',fc=':',gc='.cache.js',hc='loadExternalRefs',ic='end',jc='http:',kc='file:',lc='_gwt_dummy_',mc='__gwtDevModeHook:VaadinComponents',nc='Ignoring non-whitelisted Dev Mode URL: ',oc=':moduleBase',pc='head';var n=window;var o=document;q(N,O);function p(){var a=n.location.search;return a.indexOf(P)!=-1||a.indexOf(Q)!=-1}
function q(a,b){if(n.__gwtStatsEvent){n.__gwtStatsEvent({moduleName:R,sessionId:n.__gwtStatsSessionId,subSystem:S,evtGroup:a,millis:(new Date).getTime(),type:b})}}
VaadinComponents.__sendStats=q;VaadinComponents.__moduleName=R;VaadinComponents.__errFn=null;VaadinComponents.__moduleBase=T;VaadinComponents.__softPermutationId=U;VaadinComponents.__computePropValue=null;VaadinComponents.__getPropMap=null;VaadinComponents.__installRunAsyncCode=function(){};VaadinComponents.__gwtStartLoadingFragment=function(){return null};VaadinComponents.__gwt_isKnownPropertyValue=function(){return false};VaadinComponents.__gwt_getMetaProperty=function(){return null};var r=null;var s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[R]={moduleName:R};VaadinComponents.__moduleStartupDone=function(e){var f=s[R].bindings;s[R].bindings=function(){var a=f?f():{};var b=e[VaadinComponents.__softPermutationId];for(var c=U;c<b.length;c++){var d=b[c];a[d[U]]=d[V]}return a}};var t;function u(){v();return t}
function v(){if(t){return}var a=o.createElement(W);a.src=X;a.id=R;a.style.cssText=Y+Z;a.tabIndex=-1;o.body.appendChild(a);t=a.contentDocument;if(!t){t=a.contentWindow.document}t.open();var b=document.compatMode==$?_:ab;t.write(b+bb);t.close()}
@@ -23,8 +23,8 @@ function F(){if(!n.__gwt_stylesLoaded){n.__gwt_stylesLoaded={}}q(hc,O);q(hc,ic)}
A();VaadinComponents.__moduleBase=B();s[R].moduleBase=VaadinComponents.__moduleBase;var G=D();if(n){var H=!!(n.location.protocol==jc||n.location.protocol==kc);n.__gwt_activeModules[R].canRedirect=H;function I(){var b=lc;try{n.sessionStorage.setItem(b,b);n.sessionStorage.removeItem(b);return true}catch(a){return false}}
if(H&&I()){var J=mc;var K=n.sessionStorage[J];if(!/^http:\/\/(localhost|127\.0\.0\.1)(:\d+)?\/.*$/.test(K)){if(K&&(window.console&&console.log)){console.log(nc+K)}K=ab}if(K&&!n[J]){n[J]=true;n[J+oc]=B();var L=o.createElement(eb);L.src=K;var M=o.getElementsByTagName(pc)[U];M.insertBefore(L,M.firstElementChild||M.children[U]);return false}}}F();q(N,ic);w(G);return true}
VaadinComponents.succeeded=VaadinComponents();
-function _DF366C94317FC564C4A099F33FA8A245(){
-var $wnd = $wnd || window.parent;var __gwtModuleFunction = $wnd.VaadinComponents;var $sendStats = __gwtModuleFunction.__sendStats;$sendStats('moduleStartup', 'moduleEvalStart');var $gwt_version = "2.8.0-SNAPSHOT";var $strongName = 'DF366C94317FC564C4A099F33FA8A245';var $gwt = {};var $doc = $wnd.document;var $moduleName, $moduleBase;function __gwtStartLoadingFragment(frag) {var fragFile = 'deferredjs/' + $strongName + '/' + frag + '.cache.js';return __gwtModuleFunction.__startLoadingFragment(fragFile);}function __gwtInstallCode(code) {return __gwtModuleFunction.__installRunAsyncCode(code);}function __gwt_isKnownPropertyValue(propName, propValue) {return __gwtModuleFunction.__gwt_isKnownPropertyValue(propName, propValue);}function __gwt_getMetaProperty(name) {return __gwtModuleFunction.__gwt_getMetaProperty(name);}var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent && $wnd.__gwtStatsEvent(a);} : null;var $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null;var aa=3.141592653589793,h={3:1},ba={3:1,13:1},ca={3:1,12:1,13:1},da={3:1,12:1,10:1,13:1},ea={40:1,9:1,3:1,5:1,4:1},fa={14:1,9:1,3:1,5:1,4:1},ga={9:1,48:1,3:1,5:1,4:1},ha={9:1,49:1,3:1,5:1,4:1},ia={9:1,50:1,3:1,5:1,4:1},ja={27:1,3:1,5:1,4:1},ka={9:1,70:1,3:1,5:1,4:1},la={9:1,41:1,3:1,5:1,4:1},ma={71:1,3:1,12:1,10:1,13:1},na=4194303,oa=1048575,pa=524288,qa=4194304,ra=17592186044416,sa=-9223372036854775E3,ta={6:1},ua={44:1,45:1},va={83:1},wa={26:1,21:1,19:1,24:1,22:1,20:1,17:1},ya={26:1,21:1,19:1,24:1,
+function _22194BF6C0B99CDDF2D95E02972EDB13(){
+var $wnd = $wnd || window.parent;var __gwtModuleFunction = $wnd.VaadinComponents;var $sendStats = __gwtModuleFunction.__sendStats;$sendStats('moduleStartup', 'moduleEvalStart');var $gwt_version = "2.8.0-SNAPSHOT";var $strongName = '22194BF6C0B99CDDF2D95E02972EDB13';var $gwt = {};var $doc = $wnd.document;var $moduleName, $moduleBase;function __gwtStartLoadingFragment(frag) {var fragFile = 'deferredjs/' + $strongName + '/' + frag + '.cache.js';return __gwtModuleFunction.__startLoadingFragment(fragFile);}function __gwtInstallCode(code) {return __gwtModuleFunction.__installRunAsyncCode(code);}function __gwt_isKnownPropertyValue(propName, propValue) {return __gwtModuleFunction.__gwt_isKnownPropertyValue(propName, propValue);}function __gwt_getMetaProperty(name) {return __gwtModuleFunction.__gwt_getMetaProperty(name);}var $stats = $wnd.__gwtStatsEvent ? function(a) {return $wnd.__gwtStatsEvent && $wnd.__gwtStatsEvent(a);} : null;var $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null;var aa=3.141592653589793,h={3:1},ba={3:1,13:1},ca={3:1,12:1,13:1},da={3:1,12:1,10:1,13:1},ea={40:1,9:1,3:1,5:1,4:1},fa={14:1,9:1,3:1,5:1,4:1},ga={9:1,48:1,3:1,5:1,4:1},ha={9:1,49:1,3:1,5:1,4:1},ia={9:1,50:1,3:1,5:1,4:1},ja={27:1,3:1,5:1,4:1},ka={9:1,70:1,3:1,5:1,4:1},la={9:1,41:1,3:1,5:1,4:1},ma={71:1,3:1,12:1,10:1,13:1},na=4194303,oa=1048575,pa=524288,qa=4194304,ra=17592186044416,sa=-9223372036854775E3,ta={6:1},ua={44:1,45:1},va={83:1},wa={26:1,21:1,19:1,24:1,22:1,20:1,17:1},ya={26:1,21:1,19:1,24:1,
38:1,22:1,36:1,20:1,17:1},Aa={26:1,21:1,19:1,72:1,24:1,38:1,22:1,36:1,20:1,17:1},Ba=65536,Ca=131072,Da=1048576,Ea=2097152,Fa=8388608,Ga=16777216,Ha=33554432,Ia=67108864,Ja={26:1,21:1,19:1,84:1,24:1,38:1,22:1,36:1,20:1,17:1},Ka={42:1},La={57:1,3:1,5:1,4:1},Ma={61:1},Na={65:1},Oa={55:1},Pa={3:1,42:1,85:1},Qa={3:1,65:1},_,Ra,Sa={},Ta=-1;function Ua(){}
function Va(a){var b=this;if("$wnd"==a)return $wnd;if(""===a)return b;"$wnd."==a.substring(0,5)&&(b=$wnd,a=a.substring(5));a=a.split(".");a[0]in b||!b.execScript||b.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)b[d]?b=b[d]:b=b[d]={};return b}function Wa(a){function b(){}b.prototype=a||{};return new b}function Xa(a){var b=[!1];return function(){for(var d=[],e=0;e<arguments.length;e++){var f;f=arguments[e];f=b[e]?"number"==typeof f?Ya(f):f:f;d.push(f)}return a.apply(this,d)}}
function m(){}function s(a,b,d){var e=Sa[a],f=e instanceof Array?e[0]:null;e&&!f?_=e:(_=Sa[a]=b?Wa(Sa[b]):{},_.cM=d,_.constructor=_,!b&&(_.tM=Ua));for(e=3;e<arguments.length;++e)arguments[e].prototype=_;f&&(_.cZ=f)}function Za(a){return $a(ab(a))+"@"+(bb(a)>>>0).toString(16)}function cb(){}function db(a,b){return eb(a)?a===b:fb(a)?a.eQ(b):(gb(a),a===b)}function ab(a){return eb(a)?hb:fb(a)?a.cZ:gb(a)?a.cZ:ib}function bb(a){return eb(a)?jb(a):fb(a)?a.hC():(gb(a),kb(a))}s(1,null,{},cb);_.eQ=lb;
@@ -413,9 +413,9 @@ _.Sb=function(a){a=nj((G(),new V(a)),"src");return Wi(a.substr(a.length-20,20),"
function ry(a,b){var d,e;e=(Ao(),$wnd.location.search);if(!So||Ro!==e){var f,g,l,n,p,q,r,u;r=new Gg;if(null!=e&&1<e.length)for(g=e.substr(1,e.length-1),g=rl(g,"\x26",0),p=0,q=g.length;p<q;++p)if(l=g[p],n=rl(l,"\x3d",2),l=n[0],l.length){n=1<n.length?n[1]:"";try{if(null==n)throw new sg("encodedURLComponent cannot be null");n=(f=/\+/g,decodeURIComponent(n.replace(f,"%20")))}catch(B){if(B=H(B),!t(B,59))throw I(B);}u=r.Qe(l);u||(u=new C,r.Re(l,u));u.Cd(n)}for(g=r.Pe().vc();g.Gc();)f=g.Hc(),f.af(rx(f._e()));
So=r=(R(),new Zy(r));Ro=e}null!=(d=So.Qe("resize"),d?d.Ed(d.Yc()-1):null)&&0<b&&(a.r=b,d=(xu(),yu),Ou(a.e.o,d),Nu(a.e.o,10>b?b:10))}function $y(a){a.e||(a.a=!0,az(a));return a.e}
function az(a){var b,d,e,f,g,l,n,p,q,r,u;if(a.a){a.a=!1;g=a.e.j;for(t(a.e.G,103)&&Wi(nj(Qi(a),"selectionMode"),"multi")?Nw(a.e,(hx(),Ux)):t(a.e.G,104)&&!Wi(nj(Qi(a),"selectionMode"),"multi")&&Nw(a.e,(hx(),ix));0<a.f.b.length;){b=a.e;if((e=a.f.Xe(0))&&e==b.F)throw new D("The selection column may not be removed manually.");Gw(b,e)}if(a.b){n=0;for(q=a.b.Yc();n<q;n++){b=a.b.Ed(n);e=(u=RegExp("\\{\\{data\\}\\}","ig"),new bz(new cz(b,u),b,n));p=d=a.e;l=e;d=d.f.b.length;if(l==p.F)throw new D("The selection column many not be added manually");
-if(p.F&&0==d)throw new X("A column cannot be inserted before the selection column");tw(p,l,d);Ob(a.f,e);for(p=0;p<dz(b).a.length;p++){a.e.r.d.b.length<dz(b).a.length&&ex(a.e.r);l=ez(dz(b),p);for(d=f=0;d<=p+f;d++)r=px(a.e.r,d),1!=Rw(r,Aw(a.e,n)).a&&++f;f=d=Rw(px(a.e.r,p+f),e);r=v(bk(l.a,"colSpan"));if(1>r)throw new D("Colspan cannot be less than 1");f.a=r;Uw(f.c);f=$i(l.a,"content");l=W(l.a,"format");fz();switch(Hd((gz(),hz),l).b){case 1:d.b=f;d.d=(Sw(),ay);Uw(d.c);break;case 2:l=d;l.b=f;l.d=(Sw(),
-Tw);Uw(l.c);break;case 0:l=d,l.b=f,l.d=(Sw(),Gx),Uw(l.c)}}}u=px(a.e.r,a.g);fx(a.e.r,u)}a.ue();a.t&&!a.t.Fd()&&(g=new Ys(a.t));g&&Kw(a.e,g);g=ij(a.e);a=new iz(a);dy();u=g.style;u=(K(),u).position;Wi(u,(Ne(),Oe))&&(g.style.position="relative");b=ey.Qe(g);b||(b=new yg,ey.Re(g,b));fy.Qe(g)||(u=(T(),M()),Yc(u,"v-resize-helper"),e=M(),Yc(e,"v-resize-helper-expand"),n=M(),e.appendChild(n),u.appendChild(e),e=M(),Yc(e,"v-resize-helper-contract"),u.appendChild(e),fy.Re(g,u),g.appendChild(u),Pb(new sy(g),1));
-b.Cd(a)}}function jz(){this.le()}s(179,524,{556:1},jz);_.le=Pn;_.me=function(){Yy(this)};_.ne=function(a){ry(this,a)};_.attachedCallback=function(){this.re();this.we()};_.attributeChangedCallback=function(){this.n||this.we()};
+if(p.F&&0==d)throw new X("A column cannot be inserted before the selection column");tw(p,l,d);Ob(a.f,e);for(p=0;p<dz(b).a.length;p++){a.e.r.d.b.length<dz(b).a.length&&ex(a.e.r);l=ez(dz(b),p);for(d=f=0;d<=p+f;d++)r=px(a.e.r,d),0!=n&&1!=Rw(r,Aw(a.e,n-1)).a&&++f;f=d=Rw(px(a.e.r,p+f),e);r=v(bk(l.a,"colSpan"));if(1>r)throw new D("Colspan cannot be less than 1");f.a=r;Uw(f.c);f=$i(l.a,"content");l=W(l.a,"format");fz();switch(Hd((gz(),hz),l).b){case 1:d.b=f;d.d=(Sw(),ay);Uw(d.c);break;case 2:l=d;l.b=f;l.d=
+(Sw(),Tw);Uw(l.c);break;case 0:l=d,l.b=f,l.d=(Sw(),Gx),Uw(l.c)}}}u=px(a.e.r,a.g);fx(a.e.r,u)}a.ue();a.t&&!a.t.Fd()&&(g=new Ys(a.t));g&&Kw(a.e,g);g=ij(a.e);a=new iz(a);dy();u=g.style;u=(K(),u).position;Wi(u,(Ne(),Oe))&&(g.style.position="relative");b=ey.Qe(g);b||(b=new yg,ey.Re(g,b));fy.Qe(g)||(u=(T(),M()),Yc(u,"v-resize-helper"),e=M(),Yc(e,"v-resize-helper-expand"),n=M(),e.appendChild(n),u.appendChild(e),e=M(),Yc(e,"v-resize-helper-contract"),u.appendChild(e),fy.Re(g,u),g.appendChild(u),Pb(new sy(g),
+1));b.Cd(a)}}function jz(){this.le()}s(179,524,{556:1},jz);_.le=Pn;_.me=function(){Yy(this)};_.ne=function(a){ry(this,a)};_.attachedCallback=function(){this.re();this.we()};_.attributeChangedCallback=function(){this.n||this.we()};
_.createdCallback=function(){this.s=(ty(),vy.createElement("style"));this.s.setAttribute("language","text/css");this.o=vy.createEvent("HTMLEvents");this.o.initEvent("select",!1,!1);this.o.srcElement=this;this.d=vy.createElement("div");this.b=new C;this.t=new C;this.f=new C;this.e=new Ww;Dn(this.e,this,(Xt(),Xt(),Yt))};_.oe=kz;
_.getColumns=function(){var a,b;if(this.c)for(a=0,b=this.c.length;a<b;a++)Qy(this.c[a]);a=(!U&&(U=new ri),si(rk));hk(a,"columns",this.b.Kd(F(zk,h,509,0,0)));this.c=$i(a.a,"columns");a=0;for(b=this.c.length;a<b;a++)Py(this.c[a],new lz(this));return this.c};_.getDataSource=function(){return ob()};_.pe=function(){return $y(this)};_.getHeightMode=function(){var a=this.e.o.q;return null!=a.a?a.a:""+a.b};_.getRowCount=Wq;
_.getSelectedRow=function(){return this.e&&this.e.G&&t(this.e.G,123)&&null!=Dw(this.e)?this.e.j.Vc(Dw(this.e)):-1};_.getSelectedRows=function(){var a;if(!this.q){!this.p&&(this.p=[]);this.p.length=0;a=this.e.G.Qd();for(a=a.vc();a.Gc();){var b=this.p,d=this.e.j.Vc(a.Hc());b[b.length]=d}Qy(this.p);Py(this.p,new mz(this))}return this.p};_.getTheme=nz;_.qe=function(){az(this)};