Advertisement
pastepin57

core-rpc-shindig.random-shindig.sha1.js

May 14th, 2015
789
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window['___jsl'] = window['___jsl'] || {};(window['___jsl']['ci'] = (window['___jsl']['ci'] || [])).push({"rpc":{"commSwf":"//xpc.googleusercontent.com/gadgets/xpc.swf","passReferrer":"p2c:query","parentRelayUrl":"/rpc_relay.html"},"core.io":{"jsonProxyUrl":"//%host%/gadgets/makeRequest","proxyUrl":"//www.gmodules.com/gadgets/proxy/refresh=%refresh%&container=%container%%rewriteMime%&gadget=%gadget%/%rawurl%"}});window['___jsl']=window['___jsl']||{};(window['___jsl']['ci'] = (window['___jsl']['ci'] || [])).push({"rpc":{"commSwf":"//xpc.googleusercontent.com/gadgets/xpc.swf","passReferrer":"p2c:query","parentRelayUrl":"/rpc_relay.html"},"core.io":{"jsonProxyUrl":"//%host%/gadgets/makeRequest","proxyUrl":"//www.gmodules.com/gadgets/proxy/refresh=%refresh%&container=%container%%rewriteMime%&gadget=%gadget%/%rawurl%"}});
  2. /* [start] feature=taming */
  3. var safeJSON=window.safeJSON;
  4. var tamings___=window.tamings___||[];
  5. var bridge___;
  6. var caja___=window.caja___;
  7. var ___=window.___;;
  8.  
  9. /* [end] feature=taming */
  10.  
  11. /* [start] feature=gapi-globals */
  12. var gapi=window.gapi||{};gapi.client=window.gapi&&window.gapi.client||{};
  13. ;
  14. ;
  15.  
  16. /* [end] feature=gapi-globals */
  17.  
  18. /* [start] feature=globals */
  19. var gadgets=window.gadgets||{},shindig=window.shindig||{},osapi=window.osapi=window.osapi||{},google=window.google||{};
  20. ;
  21. ;
  22.  
  23. /* [end] feature=globals */
  24.  
  25. /* [start] feature=core.config.base */
  26. window['___cfg'] = window['___cfg'] || window['___gcfg'];;
  27. if(!window.gadgets["config"]){gadgets.config=function(){var f;
  28. var h={};
  29. var b={};
  30. function c(j,l){for(var k in l){if(!l.hasOwnProperty(k)){continue
  31. }if(typeof j[k]==="object"&&typeof l[k]==="object"){c(j[k],l[k])
  32. }else{j[k]=l[k]
  33. }}}function i(){var j=document.scripts||document.getElementsByTagName("script");
  34. if(!j||j.length==0){return null
  35. }var m;
  36. if(f.u){for(var k=0;
  37. !m&&k<j.length;
  38. ++k){var l=j[k];
  39. if(l.src&&l.src.indexOf(f.u)==0){m=l
  40. }}}if(!m){m=j[j.length-1]
  41. }if(!m.src){return null
  42. }return m
  43. }function a(j){var k="";
  44. if(j.nodeType==3||j.nodeType==4){k=j.nodeValue
  45. }else{if(j.innerText){k=j.innerText
  46. }else{if(j.innerHTML){k=j.innerHTML
  47. }else{if(j.firstChild){var l=[];
  48. for(var m=j.firstChild;
  49. m;
  50. m=m.nextSibling){l.push(a(m))
  51. }k=l.join("")
  52. }}}}return k
  53. }function e(k){if(!k){return{}
  54. }var j;
  55. while(k.charCodeAt(k.length-1)==0){k=k.substring(0,k.length-1)
  56. }try{j=(new Function("return ("+k+"\n)"))()
  57. }catch(l){}if(typeof j==="object"){return j
  58. }try{j=(new Function("return ({"+k+"\n})"))()
  59. }catch(l){}return typeof j==="object"?j:{}
  60. }function g(n){var p=window.___cfg;
  61. if(p){c(n,p)
  62. }var o=i();
  63. if(!o){return
  64. }var k=a(o);
  65. var j=e(k);
  66. if(f.f&&f.f.length==1){var m=f.f[0];
  67. if(!j[m]){var l={};
  68. l[f.f[0]]=j;
  69. j=l
  70. }}c(n,j)
  71. }function d(o){for(var l in h){if(h.hasOwnProperty(l)){var n=h[l];
  72. for(var m=0,k=n.length;
  73. m<k;
  74. ++m){o(l,n[m])
  75. }}}}return{register:function(l,k,j,m){var n=h[l];
  76. if(!n){n=[];
  77. h[l]=n
  78. }n.push({validators:k||{},callback:j,callOnUpdate:m})
  79. },get:function(j){if(j){return b[j]||{}
  80. }return b
  81. },init:function(k,j){f=window.___jsl||{};
  82. c(b,k);
  83. g(b);
  84. var l=window.___config||{};
  85. c(b,l);
  86. d(function(q,p){var o=b[q];
  87. if(o&&!j){var m=p.validators;
  88. for(var n in m){if(m.hasOwnProperty(n)){if(!m[n](o[n])){throw new Error('Invalid config value "'+o[n]+'" for parameter "'+n+'" in component "'+q+'"')
  89. }}}}if(p.callback){p.callback(b)
  90. }})
  91. },update:function(k,p){var o=(window.gapi&&window.gapi["config"]&&window.gapi["config"]["update"]);
  92. if(!p&&o){o(k)
  93. }var n=[];
  94. d(function(q,j){if(k.hasOwnProperty(q)||(p&&b&&b[q])){if(j.callback&&j.callOnUpdate){n.push(j.callback)
  95. }}});
  96. b=p?{}:b||{};
  97. c(b,k);
  98. for(var m=0,l=n.length;
  99. m<l;
  100. ++m){n[m](b)
  101. }}}
  102. }()
  103. }else{gadgets.config=window.gadgets["config"];
  104. gadgets.config.register=gadgets.config.register;
  105. gadgets.config.get=gadgets.config.get;
  106. gadgets.config.init=gadgets.config.init;
  107. gadgets.config.update=gadgets.config.update
  108. };;
  109.  
  110. /* [end] feature=core.config.base */
  111.  
  112. /* [start] feature=core.log */
  113. gadgets.log=(function(){var e=1;
  114. var a=2;
  115. var f=3;
  116. var c=4;
  117. var d=function(i){b(e,i)
  118. };
  119. gadgets.warn=function(i){b(a,i)
  120. };
  121. gadgets.error=function(i){b(f,i)
  122. };
  123. gadgets.debug=function(i){};
  124. gadgets.setLogLevel=function(i){h=i
  125. };
  126. function b(k,i){if(k<h||!g){return
  127. }if(k===a&&g.warn){g.warn(i)
  128. }else{if(k===f&&g.error){try{g.error(i)
  129. }catch(j){}}else{if(g.log){g.log(i)
  130. }}}}d.INFO=e;
  131. d.WARNING=a;
  132. d.NONE=c;
  133. var h=e;
  134. var g=window.console?window.console:window.opera?window.opera.postError:undefined;
  135. return d
  136. })();;
  137. ;
  138.  
  139. /* [end] feature=core.log */
  140.  
  141. /* [start] feature=core.config */
  142. (function(){gadgets.config.EnumValidator=function(d){var c=[];
  143. if(arguments.length>1){for(var b=0,a;
  144. (a=arguments[b]);
  145. ++b){c.push(a)
  146. }}else{c=d
  147. }return function(f){for(var e=0,g;
  148. (g=c[e]);
  149. ++e){if(f===c[e]){return true
  150. }}return false
  151. }
  152. };
  153. gadgets.config.RegExValidator=function(a){return function(b){return a.test(b)
  154. }
  155. };
  156. gadgets.config.ExistsValidator=function(a){return typeof a!=="undefined"
  157. };
  158. gadgets.config.NonEmptyStringValidator=function(a){return typeof a==="string"&&a.length>0
  159. };
  160. gadgets.config.BooleanValidator=function(a){return typeof a==="boolean"
  161. };
  162. gadgets.config.LikeValidator=function(a){return function(c){for(var d in a){if(a.hasOwnProperty(d)){var b=a[d];
  163. if(!b(c[d])){return false
  164. }}}return true
  165. }
  166. }
  167. })();;
  168.  
  169. /* [end] feature=core.config */
  170.  
  171. /* [start] feature=core.util.base */
  172. gadgets.util=gadgets.util||{};
  173. (function(){gadgets.util.makeClosure=function(d,f,e){var c=[];
  174. for(var b=2,a=arguments.length;
  175. b<a;
  176. ++b){c.push(arguments[b])
  177. }return function(){var g=c.slice();
  178. for(var k=0,h=arguments.length;
  179. k<h;
  180. ++k){g.push(arguments[k])
  181. }return f.apply(d,g)
  182. }
  183. };
  184. gadgets.util.makeEnum=function(b){var c,a,d={};
  185. for(c=0;
  186. (a=b[c]);
  187. ++c){d[a]=a
  188. }return d
  189. }
  190. })();;
  191.  
  192. /* [end] feature=core.util.base */
  193.  
  194. /* [start] feature=core.util.dom */
  195. gadgets.util=gadgets.util||{};
  196. (function(){var c="http://www.w3.org/1999/xhtml";
  197. function b(f,e){var h=e||{};
  198. for(var g in h){if(h.hasOwnProperty(g)){f[g]=h[g]
  199. }}}function d(g,f){var e=["<",g];
  200. var i=f||{};
  201. for(var h in i){if(i.hasOwnProperty(h)){e.push(" ");
  202. e.push(h);
  203. e.push('="');
  204. e.push(gadgets.util.escapeString(i[h]));
  205. e.push('"')
  206. }}e.push("></");
  207. e.push(g);
  208. e.push(">");
  209. return e.join("")
  210. }function a(f){var g="";
  211. if(f.nodeType==3||f.nodeType==4){g=f.nodeValue
  212. }else{if(f.innerText){g=f.innerText
  213. }else{if(f.innerHTML){g=f.innerHTML
  214. }else{if(f.firstChild){var e=[];
  215. for(var h=f.firstChild;
  216. h;
  217. h=h.nextSibling){e.push(a(h))
  218. }g=e.join("")
  219. }}}}return g
  220. }gadgets.util.createElement=function(f){var e;
  221. if((!document.body)||document.body.namespaceURI){try{e=document.createElementNS(c,f)
  222. }catch(g){}}return e||document.createElement(f)
  223. };
  224. gadgets.util.createIframeElement=function(g){var i=gadgets.util.createElement("iframe");
  225. try{var e=d("iframe",g);
  226. var f=gadgets.util.createElement(e);
  227. if(f&&((!i)||((f.tagName==i.tagName)&&(f.namespaceURI==i.namespaceURI)))){i=f
  228. }}catch(h){}b(i,g);
  229. return i
  230. };
  231. gadgets.util.getBodyElement=function(){if(document.body){return document.body
  232. }try{var f=document.getElementsByTagNameNS(c,"body");
  233. if(f&&(f.length==1)){return f[0]
  234. }}catch(e){}return document.documentElement||document
  235. };
  236. gadgets.util.getInnerText=function(e){return a(e)
  237. }
  238. })();;
  239.  
  240. /* [end] feature=core.util.dom */
  241.  
  242. /* [start] feature=core.util.event */
  243. gadgets.util=gadgets.util||{};
  244. (function(){gadgets.util.attachBrowserEvent=function(c,b,d,a){if(typeof c.addEventListener!="undefined"){c.addEventListener(b,d,a)
  245. }else{if(typeof c.attachEvent!="undefined"){c.attachEvent("on"+b,d)
  246. }else{gadgets.warn("cannot attachBrowserEvent: "+b)
  247. }}};
  248. gadgets.util.removeBrowserEvent=function(c,b,d,a){if(c.removeEventListener){c.removeEventListener(b,d,a)
  249. }else{if(c.detachEvent){c.detachEvent("on"+b,d)
  250. }else{gadgets.warn("cannot removeBrowserEvent: "+b)
  251. }}}
  252. })();;
  253.  
  254. /* [end] feature=core.util.event */
  255.  
  256. /* [start] feature=core.util.onload */
  257. gadgets.util=gadgets.util||{};
  258. (function(){var a=[];
  259. gadgets.util.registerOnLoadHandler=function(b){a.push(b)
  260. };
  261. gadgets.util.runOnLoadHandlers=function(){for(var c=0,b=a.length;
  262. c<b;
  263. ++c){a[c]()
  264. }}
  265. })();;
  266.  
  267. /* [end] feature=core.util.onload */
  268.  
  269. /* [start] feature=core.util.string */
  270. gadgets.util=gadgets.util||{};
  271. (function(){var a={0:false,10:true,13:true,34:true,39:true,60:true,62:true,92:true,8232:true,8233:true,65282:true,65287:true,65308:true,65310:true,65340:true};
  272. function b(c,d){return String.fromCharCode(d)
  273. }gadgets.util.escape=function(c,g){if(!c){return c
  274. }else{if(typeof c==="string"){return gadgets.util.escapeString(c)
  275. }else{if(typeof c==="Array"){for(var f=0,d=c.length;
  276. f<d;
  277. ++f){c[f]=gadgets.util.escape(c[f])
  278. }}else{if(typeof c==="object"&&g){var e={};
  279. for(var h in c){if(c.hasOwnProperty(h)){e[gadgets.util.escapeString(h)]=gadgets.util.escape(c[h],true)
  280. }}return e
  281. }}}}return c
  282. };
  283. gadgets.util.escapeString=function(g){if(!g){return g
  284. }var d=[],f,h;
  285. for(var e=0,c=g.length;
  286. e<c;
  287. ++e){f=g.charCodeAt(e);
  288. h=a[f];
  289. if(h===true){d.push("&#",f,";")
  290. }else{if(h!==false){d.push(g.charAt(e))
  291. }}}return d.join("")
  292. };
  293. gadgets.util.unescapeString=function(c){if(!c){return c
  294. }return c.replace(/&#([0-9]+);/g,b)
  295. }
  296. })();;
  297.  
  298. /* [end] feature=core.util.string */
  299.  
  300. /* [start] feature=core.util.urlparams */
  301. gadgets.util=gadgets.util||{};
  302. (function(){var a=null;
  303. function b(e){var f;
  304. var c=e.indexOf("?");
  305. var d=e.indexOf("#");
  306. if(d===-1){f=e.substr(c+1)
  307. }else{f=[e.substr(c+1,d-c-1),"&",e.substr(d+1)].join("")
  308. }return f.split("&")
  309. }gadgets.util.getUrlParameters=function(p){var d=typeof p==="undefined";
  310. if(a!==null&&d){return a
  311. }var l={};
  312. var f=b(p||window.location.href);
  313. var n=window.decodeURIComponent?decodeURIComponent:unescape;
  314. for(var h=0,g=f.length;
  315. h<g;
  316. ++h){var m=f[h].indexOf("=");
  317. if(m===-1){continue
  318. }var c=f[h].substring(0,m);
  319. var o=f[h].substring(m+1);
  320. o=o.replace(/\+/g," ");
  321. try{l[c]=n(o)
  322. }catch(k){}}if(d){a=l
  323. }return l
  324. };
  325. gadgets.util.getUrlParameters()
  326. })();;
  327.  
  328. /* [end] feature=core.util.urlparams */
  329.  
  330. /* [start] feature=core.util */
  331. gadgets.util=gadgets.util||{};
  332. (function(){var b={};
  333. var a={};
  334. function c(d){b=d["core.util"]||{}
  335. }if(gadgets.config){gadgets.config.register("core.util",null,c)
  336. }gadgets.util.getFeatureParameters=function(d){return typeof b[d]==="undefined"?null:b[d]
  337. };
  338. gadgets.util.hasFeature=function(d){return typeof b[d]!=="undefined"
  339. };
  340. gadgets.util.getServices=function(){return a
  341. }
  342. })();;
  343.  
  344. /* [end] feature=core.util */
  345.  
  346. /* [start] feature=shindig.auth */
  347. shindig.Auth=function(){var authToken=null;
  348. var trusted=null;
  349. function addParamsToToken(urlParams){var args=authToken.split("&");
  350. for(var i=0;
  351. i<args.length;
  352. i++){var nameAndValue=args[i].split("=");
  353. if(nameAndValue.length===2){var name=nameAndValue[0];
  354. var value=nameAndValue[1];
  355. if(value==="$"){value=encodeURIComponent(urlParams[name]);
  356. args[i]=name+"="+value
  357. }}}authToken=args.join("&")
  358. }function init(configuration){var urlParams=gadgets.util.getUrlParameters();
  359. var config=configuration["shindig.auth"]||{};
  360. if(config.authToken){authToken=config.authToken
  361. }else{if(urlParams.st){authToken=urlParams.st
  362. }}if(authToken!==null){addParamsToToken(urlParams)
  363. }if(config.trustedJson){trusted=(eval("("+config.trustedJson+")"))
  364. }}gadgets.config.register("shindig.auth",null,init);
  365. return{getSecurityToken:function(){return authToken
  366. },updateSecurityToken:function(newToken){authToken=newToken
  367. },getTrustedData:function(){return trusted
  368. }}
  369. };;
  370. shindig.auth=new shindig.Auth();;
  371.  
  372. /* [end] feature=shindig.auth */
  373.  
  374. /* [start] feature=core.json */
  375. if(window.JSON&&window.JSON.parse&&window.JSON.stringify){gadgets.json=(function(){var a=/___$/;
  376. function b(d,e){var c=this[d];
  377. return c
  378. }return{parse:function(d){try{return window.JSON.parse(d)
  379. }catch(c){return false
  380. }},stringify:function(d){var h=window.JSON.stringify;
  381. function f(e){return h.call(this,e,b)
  382. }var g=(Array.prototype.toJSON&&h([{x:1}])==='"[{\\"x\\": 1}]"')?f:h;
  383. try{return g(d,function(i,e){return !a.test(i)?e:void 0
  384. })
  385. }catch(c){return null
  386. }}}
  387. })()
  388. };;
  389. ;
  390. if(!(window.JSON&&window.JSON.parse&&window.JSON.stringify)){gadgets.json=function(){function f(n){return n<10?"0"+n:n
  391. }Date.prototype.toJSON=function(){return[this.getUTCFullYear(),"-",f(this.getUTCMonth()+1),"-",f(this.getUTCDate()),"T",f(this.getUTCHours()),":",f(this.getUTCMinutes()),":",f(this.getUTCSeconds()),"Z"].join("")
  392. };
  393. var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
  394. function stringify(value){var a,i,k,l,r=/[\"\\\x00-\x1f\x7f-\x9f]/g,v;
  395. switch(typeof value){case"string":return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];
  396. if(c){return c
  397. }c=a.charCodeAt();
  398. return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)
  399. })+'"':'"'+value+'"';
  400. case"number":return isFinite(value)?String(value):"null";
  401. case"boolean":case"null":return String(value);
  402. case"object":if(!value){return"null"
  403. }a=[];
  404. if(typeof value.length==="number"&&!value.propertyIsEnumerable("length")){l=value.length;
  405. for(i=0;
  406. i<l;
  407. i+=1){a.push(stringify(value[i])||"null")
  408. }return"["+a.join(",")+"]"
  409. }for(k in value){if(/___$/.test(k)){continue
  410. }if(value.hasOwnProperty(k)){if(typeof k==="string"){v=stringify(value[k]);
  411. if(v){a.push(stringify(k)+":"+v)
  412. }}}}return"{"+a.join(",")+"}"
  413. }return""
  414. }return{stringify:stringify,parse:function(text){if(/^[\],:{}\s]*$/.test(text.replace(/\\["\\\/b-u]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return eval("("+text+")")
  415. }return false
  416. }}
  417. }()
  418. };;
  419. gadgets.json.flatten=function(c){var d={};
  420. if(c===null||c===undefined){return d
  421. }for(var a in c){if(c.hasOwnProperty(a)){var b=c[a];
  422. if(null===b||undefined===b){continue
  423. }d[a]=(typeof b==="string")?b:gadgets.json.stringify(b)
  424. }}return d
  425. };;
  426.  
  427. /* [end] feature=core.json */
  428.  
  429. /* [start] feature=core.io */
  430. gadgets.io=function(){var config={};
  431. var oauthState;
  432. function makeXhr(){var x;
  433. var wrapperXhr=window.shindig&&window.shindig["xhrwrapper"]&&window.shindig["xhrwrapper"]["createXHR"];
  434. if(wrapperXhr){return wrapperXhr()
  435. }else{if(typeof ActiveXObject!="undefined"){x=new ActiveXObject("Msxml2.XMLHTTP");
  436. if(!x){x=new ActiveXObject("Microsoft.XMLHTTP")
  437. }return x
  438. }else{if(typeof XMLHttpRequest!="undefined"||window.XMLHttpRequest){return new window.XMLHttpRequest()
  439. }else{throw ("no xhr available")
  440. }}}}function hadError(xobj,callback){if(xobj.readyState!==4){return true
  441. }try{if(xobj.status!==200){var error=(""+xobj.status);
  442. if(xobj.responseText){error=error+" "+xobj.responseText
  443. }callback({errors:[error],rc:xobj.status,text:xobj.responseText});
  444. return true
  445. }}catch(e){callback({errors:[e.number+" Error not specified"],rc:e.number,text:e.description});
  446. return true
  447. }return false
  448. }function processNonProxiedResponse(url,callback,params,xobj){if(hadError(xobj,callback)){return
  449. }var data={body:xobj.responseText};
  450. callback(transformResponseData(params,data))
  451. }var UNPARSEABLE_CRUFT="throw 1; < don't be evil' >";
  452. function processResponse(url,callback,params,xobj){if(hadError(xobj,callback)){return
  453. }var txt=xobj.responseText;
  454. var offset=txt.indexOf(UNPARSEABLE_CRUFT)+UNPARSEABLE_CRUFT.length;
  455. if(offset<UNPARSEABLE_CRUFT.length){return
  456. }txt=txt.substr(offset);
  457. var data=eval("("+txt+")");
  458. data=data[url];
  459. if(data.oauthState){oauthState=data.oauthState
  460. }if(data.st){shindig.auth.updateSecurityToken(data.st)
  461. }callback(transformResponseData(params,data))
  462. }function transformResponseData(params,data){var resp={text:data.body,rc:data.rc||200,headers:data.headers,oauthApprovalUrl:data.oauthApprovalUrl,oauthError:data.oauthError,oauthErrorText:data.oauthErrorText,errors:[]};
  463. if(resp.rc<200||resp.rc>=400){resp.errors=[resp.rc+" Error"]
  464. }else{if(resp.text){if(resp.rc>=300&&resp.rc<400){params.CONTENT_TYPE="TEXT"
  465. }switch(params.CONTENT_TYPE){case"JSON":case"FEED":resp.data=gadgets.json.parse(resp.text);
  466. if(!resp.data){resp.errors.push("500 Failed to parse JSON");
  467. resp.rc=500;
  468. resp.data=null
  469. }break;
  470. case"DOM":var dom;
  471. if(typeof ActiveXObject!="undefined"){dom=new ActiveXObject("Microsoft.XMLDOM");
  472. dom.async=false;
  473. dom.validateOnParse=false;
  474. dom.resolveExternals=false;
  475. if(!dom.loadXML(resp.text)){resp.errors.push("500 Failed to parse XML");
  476. resp.rc=500
  477. }else{resp.data=dom
  478. }}else{var parser=new DOMParser();
  479. dom=parser.parseFromString(resp.text,"text/xml");
  480. if("parsererror"===dom.documentElement.nodeName){resp.errors.push("500 Failed to parse XML");
  481. resp.rc=500
  482. }else{resp.data=dom
  483. }}break;
  484. default:resp.data=resp.text;
  485. break
  486. }}}return resp
  487. }function makeXhrRequest(realUrl,proxyUrl,callback,paramData,method,params,processResponseFunction,opt_headers){var xhr=makeXhr();
  488. if(proxyUrl.indexOf("//")==0){proxyUrl=document.location.protocol+proxyUrl
  489. }xhr.open(method,proxyUrl,true);
  490. if(callback){xhr.onreadystatechange=gadgets.util.makeClosure(null,processResponseFunction,realUrl,callback,params,xhr)
  491. }if(paramData!==null){var contentTypeHeader="Content-Type";
  492. var contentType="application/x-www-form-urlencoded";
  493. if(typeof opt_headers==="string"){contentType=opt_headers;
  494. opt_headers={}
  495. }var headers=opt_headers||{};
  496. if(!headers[contentTypeHeader]){headers[contentTypeHeader]=contentType
  497. }for(var headerName in headers){xhr.setRequestHeader(headerName,headers[headerName])
  498. }}xhr.send(paramData)
  499. }function respondWithPreload(postData,params,callback){if(gadgets.io.preloaded_&&postData.httpMethod==="GET"){for(var i=0;
  500. i<gadgets.io.preloaded_.length;
  501. i++){var preload=gadgets.io.preloaded_[i];
  502. if(preload&&(preload.id===postData.url)){delete gadgets.io.preloaded_[i];
  503. if(preload.rc!==200){callback({rc:preload.rc,errors:[preload.rc+" Error"]})
  504. }else{if(preload.oauthState){oauthState=preload.oauthState
  505. }var resp={body:preload.body,rc:preload.rc,headers:preload.headers,oauthApprovalUrl:preload.oauthApprovalUrl,oauthError:preload.oauthError,oauthErrorText:preload.oauthErrorText,errors:[]};
  506. callback(transformResponseData(params,resp))
  507. }return true
  508. }}}return false
  509. }function init(configuration){config=configuration["core.io"]||{}
  510. }gadgets.config.register("core.io",null,init);
  511. return{makeRequest:function(url,callback,opt_params){var params=opt_params||{};
  512. var httpMethod=params.METHOD||"GET";
  513. var refreshInterval=params.REFRESH_INTERVAL;
  514. var auth,st;
  515. if(params.AUTHORIZATION&&params.AUTHORIZATION!=="NONE"){auth=params.AUTHORIZATION.toLowerCase();
  516. st=shindig.auth.getSecurityToken()
  517. }else{if(httpMethod==="GET"&&refreshInterval===undefined){refreshInterval=3600
  518. }}var signOwner=true;
  519. if(typeof params.OWNER_SIGNED!=="undefined"){signOwner=params.OWNER_SIGNED
  520. }var signViewer=true;
  521. if(typeof params.VIEWER_SIGNED!=="undefined"){signViewer=params.VIEWER_SIGNED
  522. }var headers=params.HEADERS||{};
  523. if(httpMethod==="POST"&&!headers["Content-Type"]){headers["Content-Type"]="application/x-www-form-urlencoded"
  524. }var urlParams=gadgets.util.getUrlParameters();
  525. var paramData={url:url,httpMethod:httpMethod,headers:gadgets.io.encodeValues(headers,false),postData:params.POST_DATA||"",authz:auth||"",st:st||"",contentType:params.CONTENT_TYPE||"TEXT",numEntries:params.NUM_ENTRIES||"3",getSummaries:!!params.GET_SUMMARIES,signOwner:signOwner,signViewer:signViewer,gadget:urlParams.url,container:urlParams.container||urlParams.synd||"default",bypassSpecCache:gadgets.util.getUrlParameters()["nocache"]||"",getFullHeaders:!!params.GET_FULL_HEADERS};
  526. if(auth==="oauth"||auth==="signed"){if(gadgets.io.oauthReceivedCallbackUrl_){paramData.OAUTH_RECEIVED_CALLBACK=gadgets.io.oauthReceivedCallbackUrl_;
  527. gadgets.io.oauthReceivedCallbackUrl_=null
  528. }paramData.oauthState=oauthState||"";
  529. for(var opt in params){if(params.hasOwnProperty(opt)){if(opt.indexOf("OAUTH_")===0){paramData[opt]=params[opt]
  530. }}}}var proxyUrl=config.jsonProxyUrl.replace("%host%",document.location.host);
  531. if(!respondWithPreload(paramData,params,callback)){if(httpMethod==="GET"&&refreshInterval>0){var extraparams="?refresh="+refreshInterval+"&"+gadgets.io.encodeValues(paramData);
  532. makeXhrRequest(url,proxyUrl+extraparams,callback,null,"GET",params,processResponse)
  533. }else{makeXhrRequest(url,proxyUrl,callback,gadgets.io.encodeValues(paramData),"POST",params,processResponse)
  534. }}},makeNonProxiedRequest:function(relativeUrl,callback,opt_params,opt_headers){var params=opt_params||{};
  535. makeXhrRequest(relativeUrl,relativeUrl,callback,params.POST_DATA,params.METHOD,params,processNonProxiedResponse,opt_headers)
  536. },clearOAuthState:function(){oauthState=undefined
  537. },encodeValues:function(fields,opt_noEscaping){var escape=!opt_noEscaping;
  538. var buf=[];
  539. var first=false;
  540. for(var i in fields){if(fields.hasOwnProperty(i)&&!/___$/.test(i)){if(!first){first=true
  541. }else{buf.push("&")
  542. }buf.push(escape?encodeURIComponent(String(i)):i);
  543. buf.push("=");
  544. buf.push(escape?encodeURIComponent(String(fields[i])):fields[i])
  545. }}return buf.join("")
  546. },getProxyUrl:function(url,opt_params){var params=opt_params||{};
  547. var refresh=params.REFRESH_INTERVAL;
  548. if(refresh===undefined){refresh="3600"
  549. }var urlParams=gadgets.util.getUrlParameters();
  550. var rewriteMimeParam=params.rewriteMime?"&rewriteMime="+encodeURIComponent(String(params.rewriteMime)):"";
  551. var ret=config.proxyUrl.replace("%url%",encodeURIComponent(url)).replace("%host%",document.location.host).replace("%rawurl%",url).replace("%refresh%",encodeURIComponent(String(refresh))).replace("%gadget%",encodeURIComponent(urlParams.url)).replace("%container%",encodeURIComponent(urlParams.container||urlParams.synd||"default")).replace("%rewriteMime%",rewriteMimeParam);
  552. if(ret.indexOf("//")==0){ret=window.location.protocol+ret
  553. }return ret
  554. }}
  555. }();
  556. gadgets.io.RequestParameters=gadgets.util.makeEnum(["METHOD","CONTENT_TYPE","POST_DATA","HEADERS","AUTHORIZATION","NUM_ENTRIES","GET_SUMMARIES","GET_FULL_HEADERS","REFRESH_INTERVAL","OAUTH_SERVICE_NAME","OAUTH_USE_TOKEN","OAUTH_TOKEN_NAME","OAUTH_REQUEST_TOKEN","OAUTH_REQUEST_TOKEN_SECRET","OAUTH_RECEIVED_CALLBACK"]);
  557. gadgets.io.MethodType=gadgets.util.makeEnum(["GET","POST","PUT","DELETE","HEAD"]);
  558. gadgets.io.ContentType=gadgets.util.makeEnum(["TEXT","DOM","JSON","FEED"]);
  559. gadgets.io.AuthorizationType=gadgets.util.makeEnum(["NONE","SIGNED","OAUTH"]);;
  560.  
  561. /* [end] feature=core.io */
  562.  
  563. /* [start] feature=core.prefs */
  564. (function(){var i=null;
  565. var j={};
  566. var f=gadgets.util.escapeString;
  567. var d={};
  568. var h={};
  569. var e="en";
  570. var b="US";
  571. var a=0;
  572. function c(){var l=gadgets.util.getUrlParameters();
  573. for(var k in l){if(l.hasOwnProperty(k)){if(k.indexOf("up_")===0&&k.length>3){j[k.substr(3)]=String(l[k])
  574. }else{if(k==="country"){b=l[k]
  575. }else{if(k==="lang"){e=l[k]
  576. }else{if(k==="mid"){a=l[k]
  577. }}}}}}}function g(){for(var k in h){if(typeof j[k]==="undefined"){j[k]=h[k]
  578. }}}gadgets.Prefs=function(){if(!i){c();
  579. g();
  580. i=this
  581. }return i
  582. };
  583. gadgets.Prefs.setInternal_=function(n,p){var o=false;
  584. if(typeof n==="string"){if(!j.hasOwnProperty(n)||j[n]!==p){o=true
  585. }j[n]=p
  586. }else{for(var m in n){if(n.hasOwnProperty(m)){var l=n[m];
  587. if(!j.hasOwnProperty(m)||j[m]!==l){o=true
  588. }j[m]=l
  589. }}}return o
  590. };
  591. gadgets.Prefs.setMessages_=function(k){d=k
  592. };
  593. gadgets.Prefs.setDefaultPrefs_=function(k){h=k
  594. };
  595. gadgets.Prefs.prototype.getString=function(k){if(k===".lang"){k="lang"
  596. }return j[k]?f(j[k]):""
  597. };
  598. gadgets.Prefs.prototype.setDontEscape_=function(){f=function(l){return l
  599. }
  600. };
  601. gadgets.Prefs.prototype.getInt=function(k){var l=parseInt(j[k],10);
  602. return isNaN(l)?0:l
  603. };
  604. gadgets.Prefs.prototype.getFloat=function(k){var l=parseFloat(j[k]);
  605. return isNaN(l)?0:l
  606. };
  607. gadgets.Prefs.prototype.getBool=function(k){var l=j[k];
  608. if(l){return l==="true"||l===true||!!parseInt(l,10)
  609. }return false
  610. };
  611. gadgets.Prefs.prototype.set=function(k,l){throw new Error("setprefs feature required to make this call.")
  612. };
  613. gadgets.Prefs.prototype.getArray=function(n){var o=j[n];
  614. if(o){var k=o.split("|");
  615. for(var m=0,l=k.length;
  616. m<l;
  617. ++m){k[m]=f(k[m].replace(/%7C/g,"|"))
  618. }return k
  619. }return[]
  620. };
  621. gadgets.Prefs.prototype.setArray=function(k,l){throw new Error("setprefs feature required to make this call.")
  622. };
  623. gadgets.Prefs.prototype.getMsg=function(k){return d[k]||""
  624. };
  625. gadgets.Prefs.prototype.getCountry=function(){return b
  626. };
  627. gadgets.Prefs.prototype.getLang=function(){return e
  628. };
  629. gadgets.Prefs.prototype.getModuleId=function(){return a
  630. }
  631. })();;
  632.  
  633. /* [end] feature=core.prefs */
  634.  
  635. /* [start] feature=core.legacy */
  636. var JSON=window.JSON||gadgets.json;
  637. var _IG_Prefs=(function(){var a=null;
  638. var b=function(){if(!a){a=new gadgets.Prefs();
  639. a.setDontEscape_()
  640. }return a
  641. };
  642. b._parseURL=gadgets.Prefs.parseUrl;
  643. return b
  644. })();
  645. function _IG_Fetch_wrapper(b,a){b(a.data?a.data:"")
  646. }function _IG_FetchContent(b,g,c){var f=c||{};
  647. if(f.refreshInterval){f.REFRESH_INTERVAL=f.refreshInterval
  648. }else{f.REFRESH_INTERVAL=3600
  649. }for(var e in f){var d=f[e];
  650. delete f[e];
  651. f[e.toUpperCase()]=d
  652. }var a=gadgets.util.makeClosure(null,_IG_Fetch_wrapper,g);
  653. gadgets.io.makeRequest(b,a,f)
  654. }function _IG_FetchXmlContent(b,e,c){var d=c||{};
  655. if(d.refreshInterval){d.REFRESH_INTERVAL=d.refreshInterval
  656. }else{d.REFRESH_INTERVAL=3600
  657. }d.CONTENT_TYPE="DOM";
  658. var a=gadgets.util.makeClosure(null,_IG_Fetch_wrapper,e);
  659. gadgets.io.makeRequest(b,a,d)
  660. }function _IG_FetchFeedAsJSON(b,f,c,a,d){var e=d||{};
  661. e.CONTENT_TYPE="FEED";
  662. e.NUM_ENTRIES=c;
  663. e.GET_SUMMARIES=a;
  664. gadgets.io.makeRequest(b,function(j){j.data=j.data||{};
  665. if(j.errors&&j.errors.length>0){j.data.ErrorMsg=j.errors[0]
  666. }if(j.data.link){j.data.URL=b
  667. }if(j.data.title){j.data.Title=j.data.title
  668. }if(j.data.description){j.data.Description=j.data.description
  669. }if(j.data.link){j.data.Link=j.data.link
  670. }if(j.data.items&&j.data.items.length>0){j.data.Entry=j.data.items;
  671. for(var h=0;
  672. h<j.data.Entry.length;
  673. ++h){var i=j.data.Entry[h];
  674. i.Title=i.title;
  675. i.Link=i.link;
  676. i.Summary=i.summary||i.description;
  677. i.Date=i.pubDate
  678. }}for(var g=0;
  679. g<j.data.Entry.length;
  680. ++g){var i=j.data.Entry[g];
  681. i.Date=(i.Date/1000)
  682. }f(j.data)
  683. },e)
  684. }function _IG_GetCachedUrl(a,b){var c=b||{};
  685. c.REFRESH_INTERVAL=3600;
  686. if(c.refreshInterval){c.REFRESH_INTERVAL=c.refreshInterval
  687. }return gadgets.io.getProxyUrl(a,c)
  688. }function _IG_GetImageUrl(a,b){return _IG_GetCachedUrl(a,b)
  689. }function _IG_GetImage(b){var a=document.createElement("img");
  690. a.src=_IG_GetCachedUrl(b);
  691. return a
  692. }function _IG_RegisterOnloadHandler(a){gadgets.util.registerOnLoadHandler(a)
  693. }function _IG_Callback(b,c){var a=arguments;
  694. return function(){var d=Array.prototype.slice.call(arguments);
  695. b.apply(null,d.concat(Array.prototype.slice.call(a,1)))
  696. }
  697. }var _args=gadgets.util.getUrlParameters;
  698. function _gel(a){return document.getElementById?document.getElementById(a):null
  699. }function _gelstn(a){if(a==="*"&&document.all){return document.all
  700. }return document.getElementsByTagName?document.getElementsByTagName(a):[]
  701. }function _gelsbyregex(d,f){var c=_gelstn(d);
  702. var e=[];
  703. for(var b=0,a=c.length;
  704. b<a;
  705. ++b){if(f.test(c[b].id)){e.push(c[b])
  706. }}return e
  707. }function _esc(a){return window.encodeURIComponent?encodeURIComponent(a):escape(a)
  708. }function _unesc(a){return window.decodeURIComponent?decodeURIComponent(a):unescape(a)
  709. }function _hesc(a){return gadgets.util.escapeString(a)
  710. }function _striptags(a){return a.replace(/<\/?[^>]+>/g,"")
  711. }function _trim(a){return a.replace(/^\s+|\s+$/g,"")
  712. }function _toggle(a){a=(typeof a==="string")?_gel(a):a;
  713. if(a!==null){if(a.style.display.length===0||a.style.display==="block"){a.style.display="none"
  714. }else{if(a.style.display==="none"){a.style.display="block"
  715. }}}}var _uid=(function(){var a=0;
  716. return function(){return a++
  717. }
  718. })();
  719. function _min(d,c){return(d<c?d:c)
  720. }function _max(d,c){return(d>c?d:c)
  721. }function _exportSymbols(a,c){var m=window;
  722. var f=a.split(".");
  723. for(var h=0,g=f.length;
  724. h<g;
  725. h++){var b=f[h];
  726. m[b]=m[b]||{};
  727. m=m[b]
  728. }for(var e=0,d=c.length;
  729. e<d;
  730. e+=2){m[c[e]]=c[e+1]
  731. }}function _IG_AddDOMEventHandler(c,b,a){gadgets.warn("_IG_AddDOMEventHandler not implemented - see SHINDIG-198")
  732. };;
  733.  
  734. /* [end] feature=core.legacy */
  735.  
  736. /* [start] feature=core.tracking */
  737. (function(){function e(b,c,a){b={msg:b||"",line:a||0,jsUrl:0==window.location.href.indexOf(c)?"-top-":c,fullUrl:window.location};try{if(++window._varz_numerrors,gadgets&&!(3<f)){c={};c[gadgets.io.RequestParameters.METHOD]=gadgets.io.MethodType.GET;a=encodeURIComponent||escape;var d=gadgets.util.getUrlParameters(),e=d.container||d.synd,g=d.gadget||d.url,k=["/gadgets/evthdlr?t=err&gadget=",a(g),"&container=",a(e),"&jsurl=",a(b.jsUrl),"&line=",a(b.line),"&session=",h,"&count=",f,"&msg=",a(b.msg)];gadgets.io.makeNonProxiedRequest(k.join(""),
  738. null,c);f++}}catch(l){}}window._varz_numerrors=0;var h=(new Date).getTime(),f=0;-1==window.location.href.indexOf("&debug=1")&&-1==window.location.href.indexOf("?debug=1")&&(window.onerror=e)})();
  739. ;
  740.  
  741. /* [end] feature=core.tracking */
  742.  
  743. /* [start] feature=core */
  744. (function(){var l=null,p=function(){function e(a){a=(""+a).match(E);return!a?l:new b(q(a[1]),q(a[2]),q(a[3]),q(a[4]),q(a[5]),q(a[6]),q(a[7]))}function z(a,e){return"string"==typeof a?encodeURI(a).replace(e,B):l}function B(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function y(a){if(a===l)return l;for(var a=a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/"),e=m,b;(b=a.replace(e,"$1"))!=a;a=b);return a}function A(a,e){var b=a.R(),g=e.K();g?b.fa(e.j):
  745. g=e.V();g?b.ca(e.m):g=e.W();g?b.da(e.k):g=e.Y();var m=e.g,k=y(m);if(g)b.ba(e.T()),k=k&&k.replace(x,"");else if(g=!!m){if(47!==k.charCodeAt(0))var k=y(b.g||"").replace(x,""),s=k.lastIndexOf("/")+1,k=y((s?k.substring(0,s):"")+y(m)).replace(x,"")}else k=k&&k.replace(x,""),k!==m&&b.G(k);g?b.G(k):g=e.Z();g?b.M(e.l):g=e.X();g&&b.ea(e.n);return b}function b(a,e,b,g,m,k,s){this.j=a;this.m=e;this.k=b;this.h=g;this.g=m;this.l=k;this.n=s}function q(a){return"string"==typeof a&&0<a.length?a:l}var m=RegExp(/(\/|^)(?:[^./][^/]*|\.{2,}(?:[^./][^/]*)|\.{3,}[^/]*)\/\.\.(?:\/|$)/),
  746. x=/^(?:\.\.\/)*(?:\.\.$)?/;b.prototype.toString=function(){var a=[];l!==this.j&&a.push(this.j,":");l!==this.k&&(a.push("//"),l!==this.m&&a.push(this.m,"@"),a.push(this.k),l!==this.h&&a.push(":",this.h.toString()));l!==this.g&&a.push(this.g);l!==this.l&&a.push("?",this.l);l!==this.n&&a.push("#",this.n);return a.join("")};b.prototype.R=function(){return new b(this.j,this.m,this.k,this.h,this.g,this.l,this.n)};b.prototype.U=function(){return this.j&&decodeURIComponent(this.j).toLowerCase()};b.prototype.fa=
  747. function(a){this.j=a?a:l};b.prototype.K=function(){return l!==this.j};b.prototype.ca=function(a){this.m=a?a:l};b.prototype.V=function(){return l!==this.m};b.prototype.da=function(a){this.k=a?a:l;this.G(this.g)};b.prototype.W=function(){return l!==this.k};b.prototype.T=function(){return this.h&&decodeURIComponent(this.h)};b.prototype.ba=function(a){if(a){a=Number(a);if(a!==(a&65535))throw Error("Bad port number "+a);this.h=""+a}else this.h=l};b.prototype.Y=function(){return l!==this.h};b.prototype.S=
  748. function(){return this.g&&decodeURIComponent(this.g)};b.prototype.G=function(a){a?(a=""+a,this.g=!this.k||/^\//.test(a)?a:"/"+a):this.g=l};b.prototype.M=function(a){this.l=a?a:l};b.prototype.Z=function(){return l!==this.l};b.prototype.aa=function(a){if("object"===typeof a&&!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var e=[],b=-1,g;for(g in a){var m=a[g];"string"===typeof m&&(e[++b]=g,e[++b]=m)}a=e}for(var e=[],b="",k=0;k<a.length;)g=a[k++],
  749. m=a[k++],e.push(b,encodeURIComponent(g.toString())),b="&",m&&e.push("=",encodeURIComponent(m.toString()));this.l=e.join("")};b.prototype.ea=function(a){this.n=a?a:l};b.prototype.X=function(){return l!==this.n};var E=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,D=/[#\/\?@]/g,F=/[\#\?]/g;b.parse=e;b.create=function(a,e,m,g,q,k,s){a=new b(z(a,D),z(e,D),"string"==typeof m?encodeURIComponent(m):l,0<g?g.toString():l,z(q,F),l,"string"==typeof s?encodeURIComponent(s):
  750. l);k&&("string"===typeof k?a.M(k.replace(/[^?&=0-9A-Za-z_\-~.%]/g,B)):a.aa(k));return a};b.$=A;b.ja=y;b.ua={oa:function(a){return/\.html$/.test(e(a).S())?"text/html":"application/javascript"},$:function(a,b){return a?A(e(a),e(b)).toString():""+b}};return b}();"undefined"!==typeof window&&(window.URI=p);var L={e:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13}};L.atype=L.e;
  751. L.w={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onerror":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::onreset":2,"*::onscroll":2,"*::onselect":2,"*::onsubmit":2,"*::ontouchcancel":2,"*::ontouchend":2,"*::ontouchenter":2,
  752. "*::ontouchleave":2,"*::ontouchmove":2,"*::ontouchstart":2,"*::onunload":2,"*::spellcheck":0,"*::style":3,"*::title":0,"*::translate":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"audio::controls":0,"audio::loop":0,"audio::mediagroup":5,
  753. "audio::muted":0,"audio::preload":0,"audio::src":1,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,
  754. "colgroup::width":0,"command::checked":0,"command::command":5,"command::disabled":0,"command::icon":1,"command::label":0,"command::radiogroup":0,"command::type":0,"data::value":0,"del::cite":1,"del::datetime":0,"details::open":0,"dir::compact":0,"div::align":0,"dl::compact":0,"fieldset::disabled":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::novalidate":0,"form::onreset":2,"form::onsubmit":2,
  755. "form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,
  756. "input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::inputmode":0,"input::ismap":0,"input::list":5,"input::max":0,"input::maxlength":0,"input::min":0,"input::multiple":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::placeholder":0,"input::readonly":0,"input::required":0,"input::size":0,"input::src":1,"input::step":0,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,
  757. "label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"menu::label":0,"menu::type":0,"meter::high":0,"meter::low":0,"meter::max":0,"meter::min":0,"meter::value":0,"ol::compact":0,"ol::reversed":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"output::for":6,"output::name":8,"p::align":0,
  758. "pre::width":0,"progress::max":0,"progress::min":0,"progress::value":0,"q::cite":1,"select::autocomplete":0,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::required":0,"select::size":0,"select::tabindex":0,"source::type":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,
  759. "tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::autocomplete":0,"textarea::cols":0,"textarea::disabled":0,"textarea::inputmode":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::placeholder":0,"textarea::readonly":0,
  760. "textarea::required":0,"textarea::rows":0,"textarea::tabindex":0,"textarea::wrap":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,
  761. "track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::src":1,"video::width":0};L.ATTRIBS=L.w;L.c={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256};L.eflags=L.c;
  762. L.f={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:4,img:2,input:2,ins:0,isindex:274,
  763. kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,"var":0,video:0,wbr:2};L.ELEMENTS=L.f;
  764. L.O={a:"HTMLAnchorElement",abbr:"HTMLElement",acronym:"HTMLElement",address:"HTMLElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLBaseFontElement",bdi:"HTMLElement",bdo:"HTMLElement",big:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",center:"HTMLElement",
  765. cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",command:"HTMLCommandElement",data:"HTMLElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",
  766. form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLKeygenElement",
  767. label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",
  768. progress:"HTMLProgressElement",q:"HTMLQuoteElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",
  769. th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};L.ELEMENT_DOM_INTERFACES=L.O;L.N={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};L.ueffects=L.N;
  770. L.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};L.URIEFFECTS=L.J;L.L={UNSANDBOXED:2,SANDBOXED:1,DATA:0};L.ltypes=L.L;L.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};L.LOADERTYPES=L.I;
  771. "undefined"!==typeof window&&(window.html4=L);var Q=function(e){function z(f){if(G.hasOwnProperty(f))return G[f];var a=f.match(R);return a?String.fromCharCode(parseInt(a[1],10)):(a=f.match(S))?String.fromCharCode(parseInt(a[1],16)):H&&T.test(f)?(H.innerHTML="&"+f+";",a=H.textContent,G[f]=a):"&"+f+";"}function B(f,a){return z(a)}function y(f){return f.replace(U,B)}function A(f){return(""+f).replace(V,"&amp;").replace(M,"&lt;").replace(N,"&gt;").replace(W,"&#34;")}function b(f){return f.replace(X,"&amp;$1").replace(M,"&lt;").replace(N,"&gt;")}
  772. function q(f){var a={z:f.z||f.cdata,A:f.A||f.comment,B:f.B||f.endDoc,r:f.r||f.endTag,d:f.d||f.pcdata,F:f.F||f.rcdata,H:f.H||f.startDoc,v:f.v||f.startTag};return function(f,e){var c;var b=/(<\/|<\!--|<[!?]|[&<>])/g;c=f+"";if(Y)c=c.split(b);else{for(var i=[],h=0,n;(n=b.exec(c))!==l;)i.push(c.substring(h,n.index)),i.push(n[0]),h=n.index+n[0].length;i.push(c.substring(h));c=i}x(a,c,0,{o:!1,C:!1},e)}}function m(f,a,d,e,c){return function(){x(f,a,d,e,c)}}function x(f,a,d,j,c){try{f.H&&0==d&&f.H(c);for(var b,
  773. i,h,n=a.length;d<n;){var r=a[d++],k=a[d];switch(r){case "&":Z.test(k)?(f.d&&f.d("&"+k,c,t,m(f,a,d,j,c)),d++):f.d&&f.d("&amp;",c,t,m(f,a,d,j,c));break;case "</":if(b=/^([-\w:]+)[^\'\"]*/.exec(k))if(b[0].length===k.length&&">"===a[d+1])d+=2,h=b[1].toLowerCase(),f.r&&f.r(h,c,t,m(f,a,d,j,c));else{var g=a,o=d,q=f,s=c,v=t,y=j,x=D(g,o);x?(q.r&&q.r(x.name,s,v,m(q,g,o,y,s)),d=x.next):d=g.length}else f.d&&f.d("&lt;/",c,t,m(f,a,d,j,c));break;case "<":if(b=/^([-\w:]+)\s*\/?/.exec(k))if(b[0].length===k.length&&
  774. ">"===a[d+1]){d+=2;h=b[1].toLowerCase();f.v&&f.v(h,[],c,t,m(f,a,d,j,c));var z=e.f[h];z&O&&(d=E(a,{name:h,next:d,c:z},f,c,t,j))}else{var g=a,o=f,q=c,s=t,v=j,C=D(g,d);C?(o.v&&o.v(C.name,C.P,q,s,m(o,g,C.next,v,q)),d=C.c&O?E(g,C,o,q,s,v):C.next):d=g.length}else f.d&&f.d("&lt;",c,t,m(f,a,d,j,c));break;case "<\!--":if(!j.C){for(i=d+1;i<n&&!(">"===a[i]&&/--$/.test(a[i-1]));i++);if(i<n){if(f.A){var A=a.slice(d,i).join("");f.A(A.substr(0,A.length-2),c,t,m(f,a,i+1,j,c))}d=i+1}else j.C=!0}j.C&&f.d&&f.d("&lt;!--",
  775. c,t,m(f,a,d,j,c));break;case "<!":if(/^\w/.test(k)){if(!j.o){for(i=d+1;i<n&&">"!==a[i];i++);i<n?d=i+1:j.o=!0}j.o&&f.d&&f.d("&lt;!",c,t,m(f,a,d,j,c))}else f.d&&f.d("&lt;!",c,t,m(f,a,d,j,c));break;case "<?":if(!j.o){for(i=d+1;i<n&&">"!==a[i];i++);i<n?d=i+1:j.o=!0}j.o&&f.d&&f.d("&lt;?",c,t,m(f,a,d,j,c));break;case ">":f.d&&f.d("&gt;",c,t,m(f,a,d,j,c));break;case "":break;default:f.d&&f.d(r,c,t,m(f,a,d,j,c))}}f.B&&f.B(c)}catch(B){if(B!==t)throw B;}}function E(a,w,d,j,c,u){var i=a.length;I.hasOwnProperty(w.name)||
  776. (I[w.name]=RegExp("^"+w.name+"(?:[\\s\\/]|$)","i"));for(var h=I[w.name],n=w.next,r=w.next+1;r<i&&!("</"===a[r-1]&&h.test(a[r]));r++);r<i&&(r-=1);i=a.slice(n,r).join("");if(w.c&e.c.CDATA)d.z&&d.z(i,j,c,m(d,a,r,u,j));else if(w.c&e.c.RCDATA)d.F&&d.F(b(i),j,c,m(d,a,r,u,j));else throw Error("bug");return r}function D(a,b){var d=/^([-\w:]+)/.exec(a[b]),j={};j.name=d[1].toLowerCase();j.c=e.f[j.name];for(var c=a[b].substr(d[0].length),u=b+1,i=a.length;u<i&&">"!==a[u];u++)c+=a[u];if(!(i<=u)){for(var h=[];""!==
  777. c;)if(d=$.exec(c))if(d[4]&&!d[5]||d[6]&&!d[7]){for(var d=d[4]||d[6],n=!1,c=[c,a[u++]];u<i;u++){if(n){if(">"===a[u])break}else 0<=a[u].indexOf(d)&&(n=!0);c.push(a[u])}if(i<=u)break;c=c.join("")}else{var n=d[1].toLowerCase(),r;if(d[2]){r=d[3];var g=r.charCodeAt(0);if(34===g||39===g)r=r.substr(1,r.length-2);r=y(r.replace(aa,""))}else r="";h.push(n,r);c=c.substr(d[0].length)}else c=c.replace(/^[\s\S][^a-z\s]*/,"");j.P=h;j.next=u+1;return j}}function F(a){function b(a,f){j||f.push(a)}var d,j;return q({startDoc:function(){d=
  778. [];j=!1},startTag:function(c,b,i){if(!j&&e.f.hasOwnProperty(c)){var h=e.f[c];if(!(h&e.c.FOLDABLE)){var n=a(c,b);if(n){if("object"!==typeof n)throw Error("tagPolicy did not return object (old API?)");if("attribs"in n)b=n.attribs;else throw Error("tagPolicy gave no attribs");var g;"tagName"in n?(g=n.tagName,n=e.f[g]):(g=c,n=h);if(h&e.c.OPTIONAL_ENDTAG){var k=d[d.length-1];k&&k.D===c&&(k.t!==g||c!==g)&&i.push("</",k.t,">")}h&e.c.EMPTY||d.push({D:c,t:g});i.push("<",g);c=0;for(k=b.length;c<k;c+=2){var m=
  779. b[c],w=b[c+1];w!==l&&void 0!==w&&i.push(" ",m,'="',A(w),'"')}i.push(">");h&e.c.EMPTY&&!(n&e.c.EMPTY)&&i.push("</",g,">")}else j=!(h&e.c.EMPTY)}}},endTag:function(a,f){if(j)j=!1;else if(e.f.hasOwnProperty(a)){var b=e.f[a];if(!(b&(e.c.EMPTY|e.c.FOLDABLE))){if(b&e.c.OPTIONAL_ENDTAG)for(b=d.length;0<=--b;){var h=d[b].D;if(h===a)break;if(!(e.f[h]&e.c.OPTIONAL_ENDTAG))return}else for(b=d.length;0<=--b&&d[b].D!==a;);if(!(0>b)){for(h=d.length;--h>b;){var g=d[h].t;e.f[g]&e.c.OPTIONAL_ENDTAG||f.push("</",g,
  780. ">")}b<d.length&&(a=d[b].t);d.length=b;f.push("</",a,">")}}}},pcdata:b,rcdata:b,cdata:b,endDoc:function(a){for(;d.length;d.length--)a.push("</",d[d.length-1].t,">")}})}function a(a,b,d,e,c){if(!c)return l;try{var g=p.parse(""+a);if(g&&(!g.K()||ba.test(g.U()))){var i=c(g,b,d,e);return i?i.toString():l}}catch(h){}return l}function v(a,b,d,e,c){d||a(b+" removed",{Q:"removed",tagName:b});if(e!==c){var g="changed";e&&!c?g="removed":!e&&c&&(g="added");a(b+"."+d+" "+g,{Q:g,tagName:b,ia:d,oldValue:e,newValue:c})}}
  781. function J(a,b,d){b=b+"::"+d;if(a.hasOwnProperty(b))return a[b];b="*::"+d;if(a.hasOwnProperty(b))return a[b]}function g(b,g,d,j,c){for(var k=0;k<g.length;k+=2){var i=g[k],h=g[k+1],n=h,m=l,o;if((o=b+"::"+i,e.w.hasOwnProperty(o))||(o="*::"+i,e.w.hasOwnProperty(o)))m=e.w[o];if(m!==l)switch(m){case e.e.NONE:break;case e.e.SCRIPT:h=l;c&&v(c,b,i,n,h);break;case e.e.STYLE:if("undefined"===typeof s){h=l;c&&v(c,b,i,n,h);break}var q=[];s(h,{declaration:function(b,c){var f=b.toLowerCase();P(f,c,d?function(b){return a(b,
  782. e.N.ga,e.L.ha,{TYPE:"CSS",CSS_PROP:f},d)}:l);c.length&&q.push(f+": "+c.join(" "))}});h=0<q.length?q.join(" ; "):l;c&&v(c,b,i,n,h);break;case e.e.ID:case e.e.IDREF:case e.e.IDREFS:case e.e.GLOBAL_NAME:case e.e.LOCAL_NAME:case e.e.CLASSES:h=j?j(h):h;c&&v(c,b,i,n,h);break;case e.e.URI:h=a(h,J(e.J,b,i),J(e.I,b,i),{TYPE:"MARKUP",XML_ATTR:i,XML_TAG:b},d);c&&v(c,b,i,n,h);break;case e.e.URI_FRAGMENT:h&&"#"===h.charAt(0)?(h=h.substring(1),h=j?j(h):h,h!==l&&void 0!==h&&(h="#"+h)):h=l;c&&v(c,b,i,n,h);break;
  783. default:h=l,c&&v(c,b,i,n,h)}else h=l,c&&v(c,b,i,n,h);g[k+1]=h}return g}function K(a,b,d){return function(j,c){if(e.f[j]&e.c.UNSAFE)d&&v(d,j,void 0,void 0,void 0);else return{attribs:g(j,c,a,b,d)}}}function k(a,b){var d=[];F(b)(a,d);return d.join("")}var s,P;"undefined"!==typeof window&&(s=window.parseCssDeclarations,P=window.sanitizeCssProperty);var G={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:"\u00a0"},R=/^#(\d+)$/,S=/^#x([0-9A-Fa-f]+)$/,T=/^[A-Za-z][A-za-z0-9]+$/,H="undefined"!==
  784. typeof window&&window.document?window.document.createElement("textarea"):l,aa=/\0/g,U=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,Z=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,V=/&/g,X=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,M=/[<]/g,N=/>/g,W=/\"/g,$=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,Y=3==="a,b".split(/(,)/).length,O=e.c.CDATA|e.c.RCDATA,t={},I={},ba=/^(?:https?|mailto)$/i,o={};o.ka=o.escapeAttrib=A;o.la=o.makeHtmlSanitizer=F;o.ma=o.makeSaxParser=
  785. q;o.na=o.makeTagPolicy=K;o.pa=o.normalizeRCData=b;o.qa=o.sanitize=function(a,b,d,e){return k(a,K(b,d,e))};o.ra=o.sanitizeAttribs=g;o.sa=o.sanitizeWithPolicy=k;o.ta=o.unescapeEntities=y;return o}(L),ca=Q.sanitize;"undefined"!==typeof window&&(window.html=Q,window.html_sanitize=ca);})();
  786. ;
  787.  
  788. /* [end] feature=core */
  789.  
  790. /* [start] feature=gapi.util-globals */
  791. gapi.util=window.gapi&&window.gapi.util||{};
  792. ;
  793.  
  794. /* [end] feature=gapi.util-globals */
  795.  
  796. /* [start] feature=gapi.util.getOrigin */
  797. gapi.util.getOrigin=function(a){if(!a)return"";a=a.split("#")[0].split("?")[0];a=a.toLowerCase();0==a.indexOf("//")&&(a=window.location.protocol+a);/^[\w\-]*:\/\//.test(a)||(a=window.location.href);var b=a.substring(a.indexOf("://")+3),c=b.indexOf("/");-1!=c&&(b=b.substring(0,c));a=a.substring(0,a.indexOf("://"));if("http"!==a&&"https"!==a&&"chrome-extension"!==a&&"file"!==a)throw Error("Invalid URI scheme in origin");var c="",d=b.indexOf(":");if(-1!=d){var e=b.substring(d+1),b=b.substring(0,d);if("http"===
  798. a&&"80"!==e||"https"===a&&"443"!==e)c=":"+e}return a+"://"+b+c};
  799. ;
  800.  
  801. /* [end] feature=gapi.util.getOrigin */
  802.  
  803. /* [start] feature=rpc */
  804. gadgets.rpctx=gadgets.rpctx||{};
  805. if(!gadgets.rpctx.wpm){gadgets.rpctx.wpm=function(){var e,d;
  806. var c=true;
  807. function b(h,j,g){if(typeof window.addEventListener!="undefined"){window.addEventListener(h,j,g)
  808. }else{if(typeof window.attachEvent!="undefined"){window.attachEvent("on"+h,j)
  809. }}if(h==="message"){window.___jsl=window.___jsl||{};
  810. var i=window.___jsl;
  811. i.RPMQ=i.RPMQ||[];
  812. i.RPMQ.push(j)
  813. }}function a(h,i,g){if(window.removeEventListener){window.removeEventListener(h,i,g)
  814. }else{if(window.detachEvent){window.detachEvent("on"+h,i)
  815. }}}function f(h){var i=gadgets.json.parse(h.data);
  816. if(!i||!i.f){return
  817. }gadgets.debug("gadgets.rpc.receive("+window.name+"): "+h.data);
  818. var g=gadgets.rpc.getTargetOrigin(i.f);
  819. if(c&&(typeof h.origin!=="undefined"?h.origin!==g:h.domain!==/^.+:\/\/([^:]+).*/.exec(g)[1])){gadgets.error("Invalid rpc message origin. "+g+" vs "+(h.origin||""));
  820. return
  821. }e(i,h.origin)
  822. }return{getCode:function(){return"wpm"
  823. },isParentVerifiable:function(){return true
  824. },init:function(h,i){function g(k){var j=k&&k.rpc||{};
  825. if(String(j.disableForceSecure)==="true"){c=false
  826. }}gadgets.config.register("rpc",null,g);
  827. e=h;
  828. d=i;
  829. b("message",f,false);
  830. d("..",true);
  831. return true
  832. },setup:function(h,g){d(h,true);
  833. return true
  834. },call:function(h,k,j){var g=gadgets.rpc.getTargetOrigin(h);
  835. var i=gadgets.rpc._getTargetWin(h);
  836. if(g){window.setTimeout(function(){var l=gadgets.json.stringify(j);
  837. gadgets.debug("gadgets.rpc.send("+window.name+"): "+l);
  838. i.postMessage(l,g)
  839. },0)
  840. }else{if(h!=".."){gadgets.error("No relay set (used as window.postMessage targetOrigin), cannot send cross-domain message")
  841. }}return true
  842. }}
  843. }()
  844. };;
  845.  
  846.        gadgets.rpctx.ifpc = gadgets.rpctx.wpm;
  847.     ;
  848. if(!window.gadgets||!window.gadgets["rpc"]){gadgets.rpc=function(){var M="__cb";
  849. var S="";
  850. var T="__ack";
  851. var f=500;
  852. var G=10;
  853. var b="|";
  854. var u="callback";
  855. var g="origin";
  856. var r="referer";
  857. var s="legacy__";
  858. var q={};
  859. var W={};
  860. var D={};
  861. var B={};
  862. var z=0;
  863. var l={};
  864. var m={};
  865. var d={};
  866. var n={};
  867. var E={};
  868. var e=null;
  869. var p=null;
  870. var A=(window.top!==window.self);
  871. var v=window.name;
  872. var J=function(){};
  873. var P=0;
  874. var Y=1;
  875. var a=2;
  876. var x=window.console;
  877. var V=x&&x.log&&function(ae){x.log(ae)
  878. }||function(){};
  879. var R=(function(){function ae(af){return function(){V(af+": call ignored")
  880. }
  881. }return{getCode:function(){return"noop"
  882. },isParentVerifiable:function(){return true
  883. },init:ae("init"),setup:ae("setup"),call:ae("call")}
  884. })();
  885. if(gadgets.util){d=gadgets.util.getUrlParameters()
  886. }function K(){if(d.rpctx=="flash"){return gadgets.rpctx.flash
  887. }if(d.rpctx=="rmr"){return gadgets.rpctx.rmr
  888. }var ae=typeof window.postMessage==="function"?gadgets.rpctx.wpm:typeof window.postMessage==="object"?gadgets.rpctx.wpm:window.ActiveXObject?(gadgets.rpctx.flash?gadgets.rpctx.flash:(gadgets.rpctx.nix?gadgets.rpctx.nix:gadgets.rpctx.ifpc)):navigator.userAgent.indexOf("WebKit")>0?gadgets.rpctx.rmr:navigator.product==="Gecko"?gadgets.rpctx.frameElement:gadgets.rpctx.ifpc;
  889. if(!ae){ae=R
  890. }return ae
  891. }function k(aj,ah){if(n[aj]){return
  892. }var af=H;
  893. if(!ah){af=R
  894. }n[aj]=af;
  895. var ae=E[aj]||[];
  896. for(var ag=0;
  897. ag<ae.length;
  898. ++ag){var ai=ae[ag];
  899. ai.t=F(aj);
  900. af.call(aj,ai.f,ai)
  901. }E[aj]=[]
  902. }var I=false,U=false;
  903. function N(){if(U){return
  904. }function ae(){I=true
  905. }if(typeof window.addEventListener!="undefined"){window.addEventListener("unload",ae,false)
  906. }else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onunload",ae)
  907. }}U=true
  908. }function j(ae,ai,af,ah,ag){if(!B[ai]||B[ai]!==af){gadgets.error("Invalid gadgets.rpc token. "+B[ai]+" vs "+af);
  909. J(ai,a)
  910. }ag.onunload=function(){if(m[ai]&&!I){J(ai,Y);
  911. gadgets.rpc.removeReceiver(ai)
  912. }};
  913. N();
  914. ah=gadgets.json.parse(decodeURIComponent(ah))
  915. }function Z(ak,af){if(ak&&typeof ak.s==="string"&&typeof ak.f==="string"&&ak.a instanceof Array){if(B[ak.f]){if(B[ak.f]!==ak.t){gadgets.error("Invalid gadgets.rpc token. "+B[ak.f]+" vs "+ak.t);
  916. J(ak.f,a)
  917. }}if(ak.s===T){window.setTimeout(function(){k(ak.f,true)
  918. },0);
  919. return
  920. }if(ak.c){ak[u]=function(al){var am=ak.g?s:"";
  921. gadgets.rpc.call(ak.f,am+M,null,ak.c,al)
  922. }
  923. }if(af){var ag=t(af);
  924. ak[g]=af;
  925. var ah=ak.r,aj;
  926. try{aj=t(ah)
  927. }catch(ai){}if(!ah||aj!=ag){ah=af
  928. }ak[r]=ah
  929. }var ae=(q[ak.s]||q[S]).apply(ak,ak.a);
  930. if(ak.c&&typeof ae!=="undefined"){gadgets.rpc.call(ak.f,M,null,ak.c,ae)
  931. }}}function t(ag){if(!ag){return""
  932. }ag=((ag.split("#"))[0].split("?"))[0];
  933. ag=ag.toLowerCase();
  934. if(ag.indexOf("//")==0){ag=window.location.protocol+ag
  935. }if(ag.indexOf("://")==-1){ag=window.location.protocol+"//"+ag
  936. }var ah=ag.substring(ag.indexOf("://")+3);
  937. var ae=ah.indexOf("/");
  938. if(ae!=-1){ah=ah.substring(0,ae)
  939. }var aj=ag.substring(0,ag.indexOf("://"));
  940. if(aj!=="http"&&aj!=="https"&&aj!=="chrome-extension"&&aj!=="file"){throw Error("Invalid URI scheme in origin")
  941. }var ai="";
  942. var ak=ah.indexOf(":");
  943. if(ak!=-1){var af=ah.substring(ak+1);
  944. ah=ah.substring(0,ak);
  945. if((aj==="http"&&af!=="80")||(aj==="https"&&af!=="443")){ai=":"+af
  946. }}return aj+"://"+ah+ai
  947. }function C(af,ae){return"/"+af+(ae?b+ae:"")
  948. }function y(ah){if(ah.charAt(0)=="/"){var af=ah.indexOf(b);
  949. var ag=af>0?ah.substring(1,af):ah.substring(1);
  950. var ae=af>0?ah.substring(af+1):null;
  951. return{id:ag,origin:ae}
  952. }else{return null
  953. }}function ad(ag){if(typeof ag==="undefined"||ag===".."){return window.parent
  954. }var af=y(ag);
  955. if(af){return window.top.frames[af.id]
  956. }ag=String(ag);
  957. var ae=window.frames[ag];
  958. if(ae){return ae
  959. }ae=document.getElementById(ag);
  960. if(ae&&ae.contentWindow){return ae.contentWindow
  961. }return null
  962. }function L(ah){var ag=null;
  963. var ae=O(ah);
  964. if(ae){ag=ae
  965. }else{var af=y(ah);
  966. if(af){ag=af.origin
  967. }else{if(ah==".."){ag=d.parent
  968. }else{ag=document.getElementById(ah).src
  969. }}}return t(ag)
  970. }var H=K();
  971. q[S]=function(){V("Unknown RPC service: "+this["s"])
  972. };
  973. q[M]=function(af,ae){var ag=l[af];
  974. if(ag){delete l[af];
  975. ag.call(this,ae)
  976. }};
  977. function X(ag,ae){if(m[ag]===true){return
  978. }if(typeof m[ag]==="undefined"){m[ag]=0
  979. }var af=ad(ag);
  980. if(ag===".."||af!=null){if(H.setup(ag,ae)===true){m[ag]=true;
  981. return
  982. }}if(m[ag]!==true&&m[ag]++<G){window.setTimeout(function(){X(ag,ae)
  983. },f)
  984. }else{n[ag]=R;
  985. m[ag]=true
  986. }}function O(af){var ae=W[af];
  987. if(ae&&ae.substring(0,1)==="/"){if(ae.substring(1,2)==="/"){ae=document.location.protocol+ae
  988. }else{ae=document.location.protocol+"//"+document.location.host+ae
  989. }}return ae
  990. }function ac(af,ae,ag){if(ae&&!/http(s)?:\/\/.+/.test(ae)){if(ae.indexOf("//")==0){ae=window.location.protocol+ae
  991. }else{if(ae.charAt(0)=="/"){ae=window.location.protocol+"//"+window.location.host+ae
  992. }else{if(ae.indexOf("://")==-1){ae=window.location.protocol+"//"+ae
  993. }}}}W[af]=ae;
  994. if(typeof ag!=="undefined"){D[af]=!!ag
  995. }}function F(ae){return B[ae]
  996. }function c(ae,af){af=af||"";
  997. B[ae]=String(af);
  998. X(ae,af)
  999. }function ab(af){var ae=af.passReferrer||"";
  1000. var ag=ae.split(":",2);
  1001. e=ag[0]||"none";
  1002. p=ag[1]||"origin"
  1003. }function aa(ae){if(Q(ae)){H=gadgets.rpctx.ifpc||R;
  1004. H.init(Z,k)
  1005. }}function Q(ae){return String(ae.useLegacyProtocol)==="true"
  1006. }function h(af,ae){function ag(aj){var ai=aj&&aj.rpc||{};
  1007. ab(ai);
  1008. var ah=ai.parentRelayUrl||"";
  1009. ah=t(d.parent||ae)+ah;
  1010. ac("..",ah,Q(ai));
  1011. aa(ai);
  1012. c("..",af)
  1013. }if(!d.parent&&ae){ag({});
  1014. return
  1015. }gadgets.config.register("rpc",null,ag)
  1016. }function o(af,aj,al){var ai=null;
  1017. if(af.charAt(0)!="/"){if(!gadgets.util){return
  1018. }ai=document.getElementById(af);
  1019. if(!ai){throw new Error("Cannot set up gadgets.rpc receiver with ID: "+af+", element not found.")
  1020. }}var ae=ai&&ai.src;
  1021. var ag=aj||gadgets.rpc.getOrigin(ae);
  1022. ac(af,ag);
  1023. var ak=gadgets.util.getUrlParameters(ae);
  1024. var ah=al||ak.rpctoken;
  1025. c(af,ah)
  1026. }function i(ae,ag,ah){if(ae===".."){var af=ah||d.rpctoken||d.ifpctok||"";
  1027. h(af,ag)
  1028. }else{o(ae,ag,ah)
  1029. }}function w(ag){if(e==="bidir"||(e==="c2p"&&ag==="..")||(e==="p2c"&&ag!=="..")){var af=window.location.href;
  1030. var ah="?";
  1031. if(p==="query"){ah="#"
  1032. }else{if(p==="hash"){return af
  1033. }}var ae=af.lastIndexOf(ah);
  1034. ae=ae===-1?af.length:ae;
  1035. return af.substring(0,ae)
  1036. }return null
  1037. }return{config:function(ae){if(typeof ae.securityCallback==="function"){J=ae.securityCallback
  1038. }},register:function(af,ae){if(af===M||af===T){throw new Error("Cannot overwrite callback/ack service")
  1039. }if(af===S){throw new Error("Cannot overwrite default service: use registerDefault")
  1040. }q[af]=ae
  1041. },unregister:function(ae){if(ae===M||ae===T){throw new Error("Cannot delete callback/ack service")
  1042. }if(ae===S){throw new Error("Cannot delete default service: use unregisterDefault")
  1043. }delete q[ae]
  1044. },registerDefault:function(ae){q[S]=ae
  1045. },unregisterDefault:function(){delete q[S]
  1046. },forceParentVerifiable:function(){if(!H.isParentVerifiable()){H=gadgets.rpctx.ifpc
  1047. }},call:function(ae,ag,al,aj){ae=ae||"..";
  1048. var ak="..";
  1049. if(ae===".."){ak=v
  1050. }else{if(ae.charAt(0)=="/"){ak=C(v,gadgets.rpc.getOrigin(window.location.href))
  1051. }}++z;
  1052. if(al){l[z]=al
  1053. }var ai={s:ag,f:ak,c:al?z:0,a:Array.prototype.slice.call(arguments,3),t:B[ae],l:!!D[ae]};
  1054. var af=w(ae);
  1055. if(af){ai.r=af
  1056. }if(ae!==".."&&y(ae)==null&&!document.getElementById(ae)){return
  1057. }var ah=n[ae];
  1058. if(!ah&&y(ae)!==null){ah=H
  1059. }if(ag.indexOf(s)===0){ah=H;
  1060. ai.s=ag.substring(s.length);
  1061. ai.c=ai.c?ai.c:z
  1062. }ai.g=true;
  1063. ai.r=ak;
  1064. if(!ah){if(!E[ae]){E[ae]=[ai]
  1065. }else{E[ae].push(ai)
  1066. }return
  1067. }if(D[ae]){ah=gadgets.rpctx.ifpc
  1068. }if(ah.call(ae,ak,ai)===false){n[ae]=R;
  1069. H.call(ae,ak,ai)
  1070. }},getRelayUrl:O,setRelayUrl:ac,setAuthToken:c,setupReceiver:i,getAuthToken:F,removeReceiver:function(ae){delete W[ae];
  1071. delete D[ae];
  1072. delete B[ae];
  1073. delete m[ae];
  1074. delete n[ae]
  1075. },getRelayChannel:function(){return H.getCode()
  1076. },receive:function(af,ae){if(af.length>4){H._receiveMessage(af,Z)
  1077. }else{j.apply(null,af.concat(ae))
  1078. }},receiveSameDomain:function(ae){ae.a=Array.prototype.slice.call(ae.a);
  1079. window.setTimeout(function(){Z(ae)
  1080. },0)
  1081. },getOrigin:t,getTargetOrigin:L,init:function(){if(H.init(Z,k)===false){H=R
  1082. }if(A){i("..")
  1083. }else{gadgets.config.register("rpc",null,function(af){var ae=af.rpc||{};
  1084. ab(ae);
  1085. aa(ae)
  1086. })
  1087. }},_getTargetWin:ad,_parseSiblingId:y,ACK:T,RPC_ID:v||"..",SEC_ERROR_LOAD_TIMEOUT:P,SEC_ERROR_FRAME_PHISH:Y,SEC_ERROR_FORGED_MSG:a}
  1088. }();
  1089. gadgets.rpc.init()
  1090. }else{if(typeof gadgets.rpc=="undefined"||!gadgets.rpc){gadgets.rpc=window.gadgets["rpc"];
  1091. gadgets.rpc.config=gadgets.rpc.config;
  1092. gadgets.rpc.register=gadgets.rpc.register;
  1093. gadgets.rpc.unregister=gadgets.rpc.unregister;
  1094. gadgets.rpc.registerDefault=gadgets.rpc.registerDefault;
  1095. gadgets.rpc.unregisterDefault=gadgets.rpc.unregisterDefault;
  1096. gadgets.rpc.forceParentVerifiable=gadgets.rpc.forceParentVerifiable;
  1097. gadgets.rpc.call=gadgets.rpc.call;
  1098. gadgets.rpc.getRelayUrl=gadgets.rpc.getRelayUrl;
  1099. gadgets.rpc.setRelayUrl=gadgets.rpc.setRelayUrl;
  1100. gadgets.rpc.setAuthToken=gadgets.rpc.setAuthToken;
  1101. gadgets.rpc.setupReceiver=gadgets.rpc.setupReceiver;
  1102. gadgets.rpc.getAuthToken=gadgets.rpc.getAuthToken;
  1103. gadgets.rpc.removeReceiver=gadgets.rpc.removeReceiver;
  1104. gadgets.rpc.getRelayChannel=gadgets.rpc.getRelayChannel;
  1105. gadgets.rpc.receive=gadgets.rpc.receive;
  1106. gadgets.rpc.receiveSameDomain=gadgets.rpc.receiveSameDomain;
  1107. gadgets.rpc.getOrigin=gadgets.rpc.getOrigin;
  1108. gadgets.rpc.getTargetOrigin=gadgets.rpc.getTargetOrigin;
  1109. gadgets.rpc._getTargetWin=gadgets.rpc._getTargetWin;
  1110. gadgets.rpc._parseSiblingId=gadgets.rpc._parseSiblingId
  1111. }};;
  1112.  
  1113. /* [end] feature=rpc */
  1114.  
  1115. /* [start] feature=config.min */
  1116. gapi.config={};gapi.config.GLOBAL_CFG_KEY="___gcfg";gapi.config.GLOBAL_CFG_USED="___gu";gapi.config.JSL_KEY="___jsl";gapi.config.DEFAULT_CFG_KEY="cd";gapi.config.USER_CFG_KEY="cu";gapi.config.INJECTED_CFG_KEY="ci";gapi.config.SAVED_CFG_KEY="cfg";gapi.config.ALL_SOURCES_KEY="us";gapi.config.ATTR_PROCESSED_CONFIG="gapi_processed";gapi.config.jsl=function(){return window[gapi.config.JSL_KEY]=window[gapi.config.JSL_KEY]||{}};gapi.config.jslComponent=function(a){var b=gapi.config.jsl();b[a]=b[a]||[];return b[a]};
  1117. gapi.config.cfg=function(a){var b=gapi.config.jsl();b[gapi.config.SAVED_CFG_KEY]=!a&&b[gapi.config.SAVED_CFG_KEY]||{};return b[gapi.config.SAVED_CFG_KEY]};gapi.config.isArray=function(a){return"object"===typeof a&&/\[native code\]/.test(a.push)};
  1118. gapi.config.foldConfig=function(a,b){if(b)for(var c in b)b.hasOwnProperty(c)&&(a[c]&&b[c]&&"object"===typeof a[c]&&"object"===typeof b[c]&&!gapi.config.isArray(a[c])&&!gapi.config.isArray(b[c])?gapi.config.foldConfig(a[c],b[c]):b[c]&&"object"===typeof b[c]?(a[c]=gapi.config.isArray(b[c])?[]:{},gapi.config.foldConfig(a[c],b[c])):a[c]=b[c])};
  1119. gapi.config.getSelfScriptTags=function(){var a=document.scripts||document.getElementsByTagName("script")||[],b=[],c=[];c.push.apply(c,gapi.config.getAllSourceUrls());for(var d=0;d<a.length;++d)for(var e=a[d],f=0;f<c.length;++f)e.src&&0==e.src.indexOf(c[f])&&b.push(e);0==b.length&&0<a.length&&a[a.length-1].src&&b.push(a[a.length-1]);return b};
  1120. gapi.config.appendInlineConfig=function(){for(var a=gapi.config.jslComponent(gapi.config.USER_CFG_KEY),b=gapi.config.getSelfScriptTags(),c=0;c<b.length;++c)if(!b[c].getAttribute(gapi.config.ATTR_PROCESSED_CONFIG)){b[c].setAttribute(gapi.config.ATTR_PROCESSED_CONFIG,!0);var d=gapi.config.getInnerText(b[c]);(d=gapi.config.parseConfig(d))&&a.push(d)}};gapi.config.getAllSourceUrls=function(){return gapi.config.jslComponent(gapi.config.ALL_SOURCES_KEY)};
  1121. gapi.config.getInnerText=function(a){if(a){var b=a.nodeType;return 3==b||4==b?a.nodeValue:a.textContent||a.innerText||a.innerHTML||""}};
  1122. gapi.config.parseConfig=function(a){if(a&&!/^\s+$/.test(a)){for(;0==a.charCodeAt(a.length-1);)a=a.substring(0,a.length-1);var b;try{b=window.JSON.parse(a)}catch(c){}if("object"===typeof b)return b;try{b=(new Function("return ("+a+"\n)"))()}catch(d){}if("object"===typeof b)return b;try{b=(new Function("return ({"+a+"\n})"))()}catch(e){}return"object"===typeof b?b:{}}};
  1123. gapi.config.mergeConfig=function(a){gapi.config.cfg(!0);var b=window[gapi.config.GLOBAL_CFG_KEY],c=gapi.config.jslComponent(gapi.config.USER_CFG_KEY);if(b&&b!==window[gapi.config.GLOBAL_CFG_USED]){var d={};gapi.config.foldConfig(d,b);c.push(d);window[gapi.config.GLOBAL_CFG_USED]=b}gapi.config.appendInlineConfig();a&&(d={},gapi.config.foldConfig(d,a),c.push(d));d=gapi.config.jslComponent(gapi.config.DEFAULT_CFG_KEY);a=0;for(b=d.length;a<b;++a)gapi.config.foldConfig(gapi.config.cfg(),d[a]);d=gapi.config.jslComponent(gapi.config.INJECTED_CFG_KEY);
  1124. a=0;for(b=d.length;a<b;++a)gapi.config.foldConfig(gapi.config.cfg(),d[a]);a=0;for(b=c.length;a<b;++a)gapi.config.foldConfig(gapi.config.cfg(),c[a])};gapi.config.get=function(a,b){if(!a)return gapi.config.cfg();for(var c=a.split("/"),d=gapi.config.cfg(),e=0,f=c.length;d&&"object"===typeof d&&e<f;++e)d=d[c[e]];return e===c.length&&void 0!==d?d:b};gapi.config.update=function(a,b){var c=a;if("string"===typeof a){for(var d=c={},e=a.split("/"),f=0,g=e.length;f<g-1;++f)var h={},d=d[e[f]]=h;d[e[f]]=b}gapi.config.mergeConfig(c)};
  1125. gapi.config.prefixGet=function(a){return function(b){return b?gapi.config.get(a+"/"+b):gapi.config.get(a)}};gapi.config.init_=gapi.config.mergeConfig;gapi.config.legacyInit&&gapi.config.legacyInit();gapi.config.init_();
  1126. ;
  1127.  
  1128. /* [end] feature=config.min */
  1129.  
  1130. /* [start] feature=shindig.sha1 */
  1131. shindig.sha1=(function(){var d="0123456789ABCDEF";
  1132. var h=[];
  1133. var e=[];
  1134. var l=[];
  1135. var o=[];
  1136. o[0]=128;
  1137. for(var g=1;
  1138. g<64;
  1139. ++g){o[g]=0
  1140. }var n;
  1141. var b;
  1142. function j(){h[0]=1732584193;
  1143. h[1]=4023233417;
  1144. h[2]=2562383102;
  1145. h[3]=271733878;
  1146. h[4]=3285377520;
  1147. n=0;
  1148. b=0
  1149. }function m(i,p){return((i<<p)|(i>>>(32-p)))&4294967295
  1150. }function a(p){var q=l;
  1151. for(var s=0;
  1152. s<64;
  1153. s+=4){var B=(p[s]<<24)|(p[s+1]<<16)|(p[s+2]<<8)|(p[s+3]);
  1154. q[s/4]=B
  1155. }for(var s=16;
  1156. s<80;
  1157. s++){q[s]=m(q[s-3]^q[s-8]^q[s-14]^q[s-16],1)
  1158. }var A=h[0];
  1159. var z=h[1];
  1160. var y=h[2];
  1161. var x=h[3];
  1162. var v=h[4];
  1163. var u,r;
  1164. for(var s=0;
  1165. s<80;
  1166. s++){if(s<40){if(s<20){u=x^(z&(y^x));
  1167. r=1518500249
  1168. }else{u=z^y^x;
  1169. r=1859775393
  1170. }}else{if(s<60){u=(z&y)|(x&(z|y));
  1171. r=2400959708
  1172. }else{u=z^y^x;
  1173. r=3395469782
  1174. }}var C=(m(A,5)+u+v+r+q[s])&4294967295;
  1175. v=x;
  1176. x=y;
  1177. y=m(z,30);
  1178. z=A;
  1179. A=C
  1180. }h[0]=(h[0]+A)&4294967295;
  1181. h[1]=(h[1]+z)&4294967295;
  1182. h[2]=(h[2]+y)&4294967295;
  1183. h[3]=(h[3]+x)&4294967295;
  1184. h[4]=(h[4]+v)&4294967295
  1185. }function f(q,s){if(typeof(q)==="string"){q=unescape(encodeURIComponent(q));
  1186. var p=[];
  1187. for(var t=0,r=q.length;
  1188. t<r;
  1189. ++t){p.push(q.charCodeAt(t))
  1190. }q=p
  1191. }if(!s){s=q.length
  1192. }var u=0;
  1193. if(n==0){while(u+64<s){a(q.slice(u,u+64));
  1194. u+=64;
  1195. b+=64
  1196. }}while(u<s){e[n++]=q[u++];
  1197. b++;
  1198. if(n==64){n=0;
  1199. a(e);
  1200. while(u+64<s){a(q.slice(u,u+64));
  1201. u+=64;
  1202. b+=64
  1203. }}}}function k(){var s=[];
  1204. var r=b*8;
  1205. if(n<56){f(o,56-n)
  1206. }else{f(o,64-(n-56))
  1207. }for(var q=63;
  1208. q>=56;
  1209. q--){e[q]=r&255;
  1210. r>>>=8
  1211. }a(e);
  1212. var t=0;
  1213. for(var q=0;
  1214. q<5;
  1215. q++){for(var p=24;
  1216. p>=0;
  1217. p-=8){s[t++]=(h[q]>>p)&255
  1218. }}return s
  1219. }function c(){var p=k();
  1220. var r="";
  1221. for(var q=0;
  1222. q<p.length;
  1223. q++){r+=d.charAt(Math.floor(p[q]/16))+d.charAt(p[q]%16)
  1224. }return r
  1225. }j();
  1226. return{reset:j,update:f,digest:k,digestString:c}
  1227. });;
  1228.  
  1229. /* [end] feature=shindig.sha1 */
  1230.  
  1231. /* [start] feature=shindig.random */
  1232. shindig.random=(function(){var a=window.crypto;
  1233. if(a&&typeof a.getRandomValues=="function"){return function(){var k=new window.Uint32Array(1);
  1234. a.getRandomValues(k);
  1235. return Number("0."+k[0])
  1236. }
  1237. }var d=gapi.config.get("random/maxObserveMousemove");
  1238. if(d==null){d=-1
  1239. }var j=0;
  1240. var f=Math.random();
  1241. var e="0123456789ABCDEF";
  1242. var c=1;
  1243. var g=((screen.width*screen.width)+screen.height)*1000000;
  1244. var b=function(l){l=l||window.event;
  1245. var k=(l.screenX+l.clientX)<<16;
  1246. k+=(l.screenY+l.clientY);
  1247. k*=new Date().getTime()%1000000;
  1248. c=(c*k)%g;
  1249. if(d>0&&++j==d){gadgets.util.removeBrowserEvent(window,"mousemove",b,false)
  1250. }};
  1251. if(d!=0){gadgets.util.attachBrowserEvent(window,"mousemove",b,false)
  1252. }function i(k){var l=shindig.sha1();
  1253. l.update(k);
  1254. return l.digestString()
  1255. }var h=i(document.cookie+"|"+document.location+"|"+(new Date()).getTime()+"|"+f);
  1256. return function(){var k=c;
  1257. k+=parseInt(h.substr(0,20),16);
  1258. h=i(h);
  1259. return k/(g+Math.pow(16,20))
  1260. }
  1261. })();;
  1262.  
  1263. /* [end] feature=shindig.random */
  1264. gadgets.config.init({"rpc":{"commSwf":"//xpc.googleusercontent.com/gadgets/xpc.swf","passReferrer":"p2c:query","parentRelayUrl":"/rpc_relay.html"},"core.io":{"jsonProxyUrl":"//%host%/gadgets/makeRequest","proxyUrl":"//www.gmodules.com/gadgets/proxy/refresh=%refresh%&container=%container%%rewriteMime%&gadget=%gadget%/%rawurl%"}});
  1265. (function(){var j=window['___jsl']=window['___jsl']||{};j['l']=(j['l']||[]).concat(['core','rpc','shindig.random','shindig.sha1']);})();(function(){var j=window['___jsl']=window['___jsl']||{};if(j['c']){j['c']();delete j['c'];}})();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement