/** * DEVELOPED BY * GIL LOPES BUENO * gilbueno.mail@gmail.com * * WORKS WITH: * IE8*, IE 9+, FF 4+, SF 5+, WebKit, CH 7+, OP 12+, BESEN, Rhino 1.7+ * For IE8 (and other legacy browsers) WatchJS will use dirty checking * * FORK: * https://github.com/melanke/Watch.JS * * LICENSE: MIT */ "use strict";!function(t){"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(t):(window.WatchJS=t(),window.watch=window.WatchJS.watch,window.unwatch=window.WatchJS.unwatch,window.callWatchers=window.WatchJS.callWatchers)}(function(){var t={noMore:!1,useDirtyCheck:!1},e=[],n=[],r=[],o=!1;try{o=Object.defineProperty&&Object.defineProperty({},"x",{})}catch(t){}var a=function(t){return t&&"[object Function]"=={}.toString.call(t)},c=function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=function(t){return"[object Object]"==={}.toString.apply(t)},l=function(t,e){var n=[],r=[];if("string"!=typeof t&&"string"!=typeof e){if(c(t)&&e)for(var o=0;o0)for(var a=0;a0)&&u(t[e],n,void 0!==r?r-1:r),m(t,e,n,r),o&&(void 0===r||r>0)&&F(t,e,n,r)))},v=function(t,e){if(!(t instanceof String)&&(t instanceof Object||c(t)))if(c(t)){for(var n=["__watchall__"],r=0;r0?arguments[0]:void 0;return i=e.apply(t,arguments),"slice"!==n&&("pop"===n?(c=i,l=t.length):"push"===n?l=t.length-1:"shift"===n?c=i:"unshift"!==n&&void 0===a&&(a=i),r.call(t,l,n,a,c)),i})},k=function(t,e){if(a(e)&&t&&!(t instanceof String)&&c(t))for(var n,r=W.length;r--;)$(t,t[n=W[r]],n,e)},C=function(t,e,n){if(e){if(t.watchers[e])if(void 0===n)delete t.watchers[e];else for(var r=0;r0)for(t=0;t