text: ﻿/*!
   * easyXDM
   * http://easyxdm.net/
   * Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.
   *
   * Permission is hereby granted, free of charge, to any person obtaining a copy
   * of this software and associated documentation files (the "Software"), to deal
   * in the Software without restriction, including without limitation the rights
   * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   * copies of the Software, and to permit persons to whom the Software is
   * furnished to do so, subject to the following conditions:
   *
   * The above copyright notice and this permission notice shall be included in
   * all copies or substantial portions of the Software.
   *
   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   * THE SOFTWARE.
   */
  (function(n,t,i,r,u,f){function k(n,t){var i=typeof n[t];return i=="function"||!!(i=="object"&&n[t])||i=="unknown"}function gt(n,t){return!!(typeof n[t]=="object"&&n[t])}function ni(n){return Object.prototype.toString.call(n)==="[object Array]"}function yt(){var i="Shockwave Flash",r="application/x-shockwave-flash",n,t,u,f;if(a(navigator.plugins)||typeof navigator.plugins[i]!="object"||(n=navigator.plugins[i].description,n&&!a(navigator.mimeTypes)&&navigator.mimeTypes[r]&&navigator.mimeTypes[r].enabledPlugin&&(p=n.match(/\d+/g))),!p)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");p=Array.prototype.slice.call(t.GetVariable("$version").match(/(\d+),(\d+),(\d+),(\d+)/),1);t=null}catch(e){}return p?(u=parseInt(p[0],10),f=parseInt(p[1],10),ht=u>9&&f>0,!0):!1}function ft(){if(!v){v=!0;for(var n=0;n<nt.length;n++)nt[n]();nt.length=0}}function w(n,t){if(v){n.call(t);return}nt.push(function(){n.call(t)})}function ti(){var t=parent,n,i;if(b!=="")for(n=0,i=b.split(".");n<i.length;n++)t=t[i[n]];return t.easyXDM}function ii(t){return n.easyXDM=dt,b=t,b&&(c="easyXDM_"+b.replace(".","_")+"_"),e}function pt(n){return n.match(st)[3]}function ri(n){return n.match(st)[4]||""}function o(n){var i=n.toLowerCase().match(st),r=i[2],u=i[3],t=i[4]||"";return(r=="http:"&&t==":80"||r=="https:"&&t==":443")&&(t=""),r+"//"+u+t}function tt(n){if(n=n.replace(kt,"$1/"),!n.match(/^(http||https):\/\//)){var t=n.substring(0,1)==="/"?"":i.pathname;t.substring(t.length-1)!=="/"&&(t=t.substring(0,t.lastIndexOf("/")+1));n=i.protocol+"//"+i.host+t+n}while(at.test(n))n=n.replace(at,"");return n}function g(n,t){var e="",r=n.indexOf("#"),u,i;r!==-1&&(e=n.substring(r),n=n.substring(0,r));u=[];for(i in t)t.hasOwnProperty(i)&&u.push(i+"="+f(t[i]));return n+(vt?"#":n.indexOf("?")==-1?"?":"&")+u.join("&")+e}function a(n){return typeof n=="undefined"}function s(n,t,i){var u;for(var r in t)t.hasOwnProperty(r)&&(r in n?(u=t[r],typeof u=="object"?s(n[r],u,i):i||(n[r]=t[r])):n[r]=t[r]);return n}function ui(){var n=t.body.appendChild(t.createElement("form")),i=n.appendChild(t.createElement("input"));i.name=c+"TEST"+lt;rt=i!==n.elements[i.name];t.body.removeChild(n)}function y(n){var i,e,r,u,f;if(a(rt)&&ui(),rt?i=t.createElement('<iframe name="'+n.props.name+'"/>'):(i=t.createElement("IFRAME"),i.name=n.props.name),i.id=i.name=n.props.name,delete n.props.name,typeof n.container=="string"&&(n.container=t.getElementById(n.container)),n.container||(s(i.style,{position:"absolute",top:"-2000px",left:"0px"}),n.container=t.body),e=n.props.src,n.props.src="javascript:false",s(i,n.props),i.border=i.frameBorder=0,i.allowTransparency=!0,n.container.appendChild(i),n.onLoad&&l(i,"load",n.onLoad),n.usePost){if(r=n.container.appendChild(t.createElement("form")),r.target=i.name,r.action=e,r.method="POST",typeof n.usePost=="object")for(f in n.usePost)n.usePost.hasOwnProperty(f)&&(rt?u=t.createElement('<input name="'+f+'"/>'):(u=t.createElement("INPUT"),u.name=f),u.value=n.usePost[f],r.appendChild(u));r.submit();r.parentNode.removeChild(r)}else i.src=e;return n.props.src=e,i}function fi(n,t){typeof n=="string"&&(n=[n]);for(var i,r=n.length;r--;)if(i=n[r],i=new RegExp(i.substr(0,1)=="^"?i:"^"+i.replace(/(\*)/g,".$1").replace(/\?/g,".")+"$"),i.test(t))return!0;return!1}function wt(r){var c=r.protocol,u,f;if(r.isHost=r.isHost||a(h.xdm_p),vt=r.hash||!1,r.props||(r.props={}),r.isHost)r.remote=tt(r.remote),r.channel=r.channel||"default"+lt++,r.secret=Math.random().toString(16).substring(2),a(c)&&(c=o(i.href)==o(r.remote)?"4":k(n,"postMessage")||k(t,"postMessage")?"1":r.swf&&k(n,"ActiveXObject")&&yt()?"6":navigator.product==="Gecko"&&"frameElement"in n&&navigator.userAgent.indexOf("WebKit")==-1?"5":r.remoteHelper?"2":"0");else if(r.channel=h.xdm_c.replace(/["'<>\\]/g,""),r.secret=h.xdm_s,r.remote=h.xdm_e.replace(/["'<>\\]/g,""),c=h.xdm_p,r.acl&&!fi(r.acl,r.remote))throw new Error("Access denied for "+r.remote);r.protocol=c;switch(c){case"0":if(s(r,{interval:100,delay:2e3,useResize:!0,useParent:!1,usePolling:!1},!0),r.isHost){if(!r.local){for(var v=i.protocol+"//"+i.host,y=t.body.getElementsByTagName("img"),l,w=y.length;w--;)if(l=y[w],l.src.substring(0,v.length)===v){r.local=l.src;break}r.local||(r.local=n)}f={xdm_c:r.channel,xdm_p:0};r.local===n?(r.usePolling=!0,r.useParent=!0,r.local=i.protocol+"//"+i.host+i.pathname+i.search,f.xdm_e=r.local,f.xdm_pa=1):f.xdm_e=tt(r.local);r.container&&(r.useResize=!1,f.xdm_po=1);r.remote=g(r.remote,f)}else s(r,{channel:h.xdm_c,remote:h.xdm_e,useParent:!a(h.xdm_pa),usePolling:!a(h.xdm_po),useResize:r.useParent?!1:r.useResize});u=[new e.stack.HashTransport(r),new e.stack.ReliableBehavior({}),new e.stack.QueueBehavior({encode:!0,maxLength:4e3-r.remote.length}),new e.stack.VerifyBehavior({initiate:r.isHost})];break;case"1":u=[new e.stack.PostMessageTransport(r)];break;case"2":r.isHost&&(r.remoteHelper=tt(r.remoteHelper));u=[new e.stack.NameTransport(r),new e.stack.QueueBehavior,new e.stack.VerifyBehavior({initiate:r.isHost})];break;case"3":u=[new e.stack.NixTransport(r)];break;case"4":u=[new e.stack.SameOriginTransport(r)];break;case"5":u=[new e.stack.FrameElementTransport(r)];break;case"6":p||yt();u=[new e.stack.FlashTransport(r)]}return u.push(new e.stack.QueueBehavior({lazy:r.lazy,remove:!0})),u}function bt(n){for(var i,u={incoming:function(n,t){this.up.incoming(n,t)},outgoing:function(n,t){this.down.outgoing(n,t)},callback:function(n){this.up.callback(n)},init:function(){this.down.init()},destroy:function(){this.down.destroy()}},t=0,r=n.length;t<r;t++)i=n[t],s(i,u,!0),t!==0&&(i.down=n[t-1]),t!==r-1&&(i.up=n[t+1]);return i}function ei(n){n.up.down=n.down;n.down.up=n.up;n.up=n.down=null}var it=this,lt=Math.floor(Math.random()*1e4),ot=Function.prototype,st=/^((http.?:)\/\/([^:\/\s]+)(:\d+)*)/,at=/[\-\w]+\/\.\.\//,kt=/([^:])\/\//g,b="",e={},dt=n.easyXDM,c="easyXDM_",rt,vt=!1,p,ht,l,d,v,nt,ut,ct,h,et;if(k(n,"addEventListener"))l=function(n,t,i){n.addEventListener(t,i,!1)},d=function(n,t,i){n.removeEventListener(t,i,!1)};else if(k(n,"attachEvent"))l=function(n,t,i){n.attachEvent("on"+t,i)},d=function(n,t,i){n.detachEvent("on"+t,i)};else throw new Error("Browser not supported");v=!1;nt=[];"readyState"in t?(ut=t.readyState,v=ut=="complete"||~navigator.userAgent.indexOf("AppleWebKit/")&&(ut=="loaded"||ut=="interactive")):v=!!t.body;v||(k(n,"addEventListener")?l(t,"DOMContentLoaded",ft):(l(t,"readystatechange",function(){t.readyState=="complete"&&ft()}),t.documentElement.doScroll&&n===top&&(ct=function(){if(!v){try{t.documentElement.doScroll("left")}catch(n){r(ct,1);return}ft()}},ct())),l(n,"load",ft));h=function(n){n=n.substring(1).split("&");for(var i={},t,r=n.length;r--;)t=n[r].split("="),i[t[0]]=u(t[1]);return i}(/xdm_e=/.test(i.search)?i.search:i.hash);et=function(){var n={},t={a:[1,2,3]},i='{"a":[1,2,3]}';return typeof JSON!="undefined"&&typeof JSON.stringify=="function"&&JSON.stringify(t).replace(/\s/g,"")===i?JSON:(Object.toJSON&&Object.toJSON(t).replace(/\s/g,"")===i&&(n.stringify=Object.toJSON),typeof String.prototype.evalJSON=="function"&&(t=i.evalJSON(),t.a&&t.a.length===3&&t.a[2]===3&&(n.parse=function(n){return n.evalJSON()})),n.stringify&&n.parse)?(et=function(){return n},n):null};s(e,{version:"2.4.19.3",query:h,stack:{},apply:s,getJSONObject:et,whenReady:w,noConflict:ii});e.DomHelper={on:l,un:d,requiresJSON:function(i){gt(n,"JSON")||t.write('<script type="text/javascript" src="'+i+'"><\/script>')}},function(){var n={};e.Fn={set:function(t,i){n[t]=i},get:function(t,i){if(n.hasOwnProperty(t)){var r=n[t];return i&&delete n[t],r}}}}();e.Socket=function(n){var t=bt(wt(n).concat([{incoming:function(t,i){n.onMessage(t,i)},callback:function(t){if(n.onReady)n.onReady(t)}}])),i=o(n.remote);this.origin=o(n.remote);this.destroy=function(){t.destroy()};this.postMessage=function(n){t.outgoing(n,i)};t.init()};e.Rpc=function(n,t){var i,r,u;if(t.local)for(i in t.local)t.local.hasOwnProperty(i)&&(r=t.local[i],typeof r=="function"&&(t.local[i]={method:r}));u=bt(wt(n).concat([new e.stack.RpcBehavior(this,t),{callback:function(t){if(n.onReady)n.onReady(t)}}]));this.origin=o(n.remote);this.destroy=function(){u.destroy()};u.init()};e.stack.SameOriginTransport=function(n){var t,u,f,h;return t={outgoing:function(n,t,i){f(n);i&&i()},destroy:function(){u&&(u.parentNode.removeChild(u),u=null)},onDOMReady:function(){h=o(n.remote);n.isHost?(s(n.props,{src:g(n.remote,{xdm_e:i.protocol+"//"+i.host+i.pathname,xdm_c:n.channel,xdm_p:4}),name:c+n.channel+"_provider"}),u=y(n),e.Fn.set(n.channel,function(n){return f=n,r(function(){t.up.callback(!0)},0),function(n){t.up.incoming(n,h)}})):(f=ti().Fn.get(n.channel,!0)(function(n){t.up.incoming(n,h)}),r(function(){t.up.callback(!0)},0))},init:function(){w(t.onDOMReady,t)}}};e.stack.FlashTransport=function(n){function p(n){r(function(){l.up.incoming(n,v)},0)}function k(i){var r=n.swf+"?host="+n.isHost,c="easyXDM_swf_"+Math.floor(Math.random()*1e4),o;e.Fn.set("flash_loaded"+i.replace(/[\-.]/g,"_"),function(){var n,t;for(e.stack.FlashTransport[i].swf=u=h.firstChild,n=e.stack.FlashTransport[i].queue,t=0;t<n.length;t++)n[t]();n.length=0});n.swfContainer?h=typeof n.swfContainer=="string"?t.getElementById(n.swfContainer):n.swfContainer:(h=t.createElement("div"),s(h.style,ht&&n.swfNoThrottle?{height:"20px",width:"20px",position:"fixed",right:0,top:0}:{height:"1px",width:"1px",position:"absolute",overflow:"hidden",right:0,top:0}),t.body.appendChild(h));o="callback=flash_loaded"+f(i.replace(/[\-.]/g,"_"))+"&proto="+it.location.protocol+"&domain="+f(pt(it.location.href))+"&port="+f(ri(it.location.href))+"&ns="+f(b);h.innerHTML="<object height='20' width='20' type='application/x-shockwave-flash' id='"+c+"' data='"+r+"'><param name='allowScriptAccess' value='always'><\/param><param name='wmode' value='transparent'><param name='movie' value='"+r+"'><\/param><param name='flashvars' value='"+o+"'><\/param><embed type='application/x-shockwave-flash' FlashVars='"+o+"' allowScriptAccess='always' wmode='transparent' src='"+r+"' height='1' width='1'><\/embed><\/object>"}var l,a,v,u,h;return l={outgoing:function(t,i,r){u.postMessage(n.channel,t.toString());r&&r()},destroy:function(){try{u.destroyChannel(n.channel)}catch(t){}u=null;a&&(a.parentNode.removeChild(a),a=null)},onDOMReady:function(){v=n.remote;e.Fn.set("flash_"+n.channel+"_init",function(){r(function(){l.up.callback(!0)})});e.Fn.set("flash_"+n.channel+"_onMessage",p);n.swf=tt(n.swf);var t=pt(n.swf),f=function(){e.stack.FlashTransport[t].init=!0;u=e.stack.FlashTransport[t].swf;u.createChannel(n.channel,n.secret,o(n.remote),n.isHost);n.isHost&&(ht&&n.swfNoThrottle&&s(n.props,{position:"fixed",right:0,top:0,height:"20px",width:"20px"}),s(n.props,{src:g(n.remote,{xdm_e:o(i.href),xdm_c:n.channel,xdm_p:6,xdm_s:n.secret}),name:c+n.channel+"_provider"}),a=y(n))};e.stack.FlashTransport[t]&&e.stack.FlashTransport[t].init?f():e.stack.FlashTransport[t]?e.stack.FlashTransport[t].queue.push(f):(e.stack.FlashTransport[t]={queue:[f]},k(t))},init:function(){w(l.onDOMReady,l)}}};e.stack.PostMessageTransport=function(t){function v(n){if(n.origin)return o(n.origin);if(n.uri)return o(n.uri);if(n.domain)return i.protocol+"//"+n.domain;throw"Unable to retrieve the origin of the event";}function a(n){var i=v(n);i==h&&n.data.substring(0,t.channel.length+1)==t.channel+" "&&f.up.incoming(n.data.substring(t.channel.length+1),i)}var f,u,e,h;return f={outgoing:function(n,i,r){e.postMessage(t.channel+" "+n,i||h);r&&r()},destroy:function(){d(n,"message",a);u&&(e=null,u.parentNode.removeChild(u),u=null)},onDOMReady:function(){if(h=o(t.remote),t.isHost){var v=function(i){i.data==t.channel+"-ready"&&(e="postMessage"in u.contentWindow?u.contentWindow:u.contentWindow.document,d(n,"message",v),l(n,"message",a),r(function(){f.up.callback(!0)},0))};l(n,"message",v);s(t.props,{src:g(t.remote,{xdm_e:o(i.href),xdm_c:t.channel,xdm_p:1}),name:c+t.channel+"_provider"});u=y(t)}else l(n,"message",a),e="postMessage"in n.parent?n.parent:n.parent.document,e.postMessage(t.channel+"-ready",h),r(function(){f.up.callback(!0)},0)},init:function(){w(f.onDOMReady,f)}}};e.stack.FrameElementTransport=function(u){var f,e,l,a;return f={outgoing:function(n,t,i){l.call(this,n);i&&i()},destroy:function(){e&&(e.parentNode.removeChild(e),e=null)},onDOMReady:function(){a=o(u.remote);u.isHost?(s(u.props,{src:g(u.remote,{xdm_e:o(i.href),xdm_c:u.channel,xdm_p:5}),name:c+u.channel+"_provider"}),e=y(u),e.fn=function(n){return delete e.fn,l=n,r(function(){f.up.callback(!0)},0),function(n){f.up.incoming(n,a)}}):(t.referrer&&o(t.referrer)!=h.xdm_e&&(n.top.location=h.xdm_e),l=n.frameElement.fn(function(n){f.up.incoming(n,a)}),f.up.callback(!0))},init:function(){w(f.onDOMReady,f)}}};e.stack.NameTransport=function(n){function p(i){var r=n.remoteHelper+(t?"#_3":"#_2")+n.channel;u.contentWindow.sendMessage(i,r)}function b(){t?++l!=2&&t||i.up.callback(!0):(p("ready"),i.up.callback(!0))}function k(n){i.up.incoming(n,a)}function nt(){h&&r(function(){h(!0)},0)}var i,t,u,f,l,h,a,v;return i={outgoing:function(n,t,i){h=i;p(n)},destroy:function(){u.parentNode.removeChild(u);u=null;t&&(f.parentNode.removeChild(f),f=null)},onDOMReady:function(){t=n.isHost;l=0;a=o(n.remote);n.local=tt(n.local);t?(e.Fn.set(n.channel,function(i){t&&i==="ready"&&(e.Fn.set(n.channel,k),b())}),v=g(n.remote,{xdm_e:n.local,xdm_c:n.channel,xdm_p:2}),s(n.props,{src:v+"#"+n.channel,name:c+n.channel+"_provider"}),f=y(n)):(n.remoteHelper=n.remote,e.Fn.set(n.channel,k));var i=function(){var t=u||this;d(t,"load",i);e.Fn.set(n.channel+"_load",nt),function f(){typeof t.contentWindow.sendMessage=="function"?b():r(f,50)}()};u=y({props:{src:n.local+"#_4"+n.channel},onLoad:i})},init:function(){w(i.onDOMReady,i)}}};e.stack.HashTransport=function(t){function d(n){if(i){var r=t.remote+"#"+b+++"_"+n;(l||!h?i.contentWindow:i).location=r}}function g(n){e=n;u.up.incoming(e.substring(e.indexOf("_")+1),k)}function nt(){if(f){var t=f.location.href,n="",i=t.indexOf("#");i!=-1&&(n=t.substring(i));n&&n!=e&&g(n)}}function a(){v=setInterval(nt,p)}var u,tt=this,l,v,p,e,b,f,i,h,k;return u={outgoing:function(n){d(n)},destroy:function(){n.clearInterval(v);(l||!h)&&i.parentNode.removeChild(i);i=null},onDOMReady:function(){if(l=t.isHost,p=t.interval,e="#"+t.channel,b=0,h=t.useParent,k=o(t.remote),l){if(s(t.props,{src:t.remote,name:c+t.channel+"_provider"}),h)t.onLoad=function(){f=n;a();u.up.callback(!0)};else{var v=0,w=t.delay/50;(function d(){if(++v>w)throw new Error("Unable to reference listenerwindow");try{f=i.contentWindow.frames[c+t.channel+"_consumer"]}catch(n){}f?(a(),u.up.callback(!0)):r(d,50)})()}i=y(t)}else f=n,a(),h?(i=parent,u.up.callback(!0)):(s(t,{props:{src:t.remote+"#"+t.channel+new Date,name:c+t.channel+"_consumer"},onLoad:function(){u.up.callback(!0)}}),i=y(t))},init:function(){w(u.onDOMReady,u)}}};e.stack.ReliableBehavior=function(){var n,t,i=0,r=0,u="";return n={incoming:function(f,e){var s=f.indexOf("_"),o=f.substring(0,s).split(",");f=f.substring(s+1);o[0]==i&&(u="",t&&t(!0));f.length>0&&(n.down.outgoing(o[1]+","+i+"_"+u,e),r!=o[1]&&(r=o[1],n.up.incoming(f,e)))},outgoing:function(f,e,o){u=f;t=o;n.down.outgoing(r+","+ ++i+"_"+f,e)}}};e.stack.QueueBehavior=function(n){function h(){if(n.remove&&i.length===0){ei(t);return}if(!o&&i.length!==0&&!c){o=!0;var u=i.shift();t.down.outgoing(u.data,u.origin,function(n){o=!1;u.callback&&r(function(){u.callback(n)},0);h()})}}var t,i=[],o=!0,e="",c,l=0,v=!1,s=!1;return t={init:function(){a(n)&&(n={});n.maxLength&&(l=n.maxLength,s=!0);n.lazy?v=!0:t.down.init()},callback:function(n){o=!1;var i=t.up;h();i.callback(n)},incoming:function(i,r){if(s){var f=i.indexOf("_"),o=parseInt(i.substring(0,f),10);e+=i.substring(f+1);o===0&&(n.encode&&(e=u(e)),t.up.incoming(e,r),e="")}else t.up.incoming(i,r)},outgoing:function(r,u,e){n.encode&&(r=f(r));var c=[],o;if(s){while(r.length!==0)o=r.substring(0,l),r=r.substring(o.length),c.push(o);while(o=c.shift())i.push({data:c.length+"_"+o,origin:u,callback:c.length===0?e:null})}else i.push({data:r,origin:u,callback:e});v?t.down.init():h()},destroy:function(){c=!0;t.down.destroy()}}};e.stack.VerifyBehavior=function(n){function u(){i=Math.random().toString(16).substring(2);t.down.outgoing(i)}var t,i,r;return t={incoming:function(f,e){var o=f.indexOf("_");o===-1?f===i?t.up.callback(!0):r||(r=f,n.initiate||u(),t.down.outgoing(f)):f.substring(0,o)===r&&t.up.incoming(f.substring(o+1),e)},outgoing:function(n,r,u){t.down.outgoing(i+"_"+n,r,u)},callback:function(){n.initiate&&u()}}};e.stack.RpcBehavior=function(n,t){function i(n){n.jsonrpc="2.0";r.down.outgoing(f.stringify(n))}function o(n,t){var r=Array.prototype.slice;return function(){var f=arguments.length,s,o={method:t};f>0&&typeof arguments[f-1]=="function"?(f>1&&typeof arguments[f-2]=="function"?(s={success:arguments[f-2],error:arguments[f-1]},o.params=r.call(arguments,0,f-2)):(s={success:arguments[f-1]},o.params=r.call(arguments,0,f-1)),u[""+ ++e]=s,o.id=e):o.params=r.call(arguments,0);n.namedParams&&o.params.length===1&&(o.params=o.params[0]);i(o)}}function s(n,t,r,u){var f,e,o;if(!r){t&&i({id:t,error:{code:-32601,message:"Procedure not found."}});return}t?(f=function(n){f=ot;i({id:t,result:n})},e=function(n,r){e=ot;var u={id:t,error:{code:-32099,message:n}};r&&(u.error.data=r);i(u)}):f=e=ot;ni(u)||(u=[u]);try{o=r.method.apply(r.scope,u.concat([f,e]));a(o)||f(o)}catch(s){e(s.message)}}var r,f=t.serializer||et(),e=0,u={};return r={incoming:function(n){var r=f.parse(n),e;r.method?t.handle?t.handle(r,i):s(r.method,r.id,t.local[r.method],r.params):(e=u[r.id],r.error?e.error&&e.error(r.error):e.success&&e.success(r.result),delete u[r.id])},init:function(){if(t.remote)for(var i in t.remote)t.remote.hasOwnProperty(i)&&(n[i]=o(t.remote[i],i));r.down.init()},destroy:function(){for(var i in t.remote)t.remote.hasOwnProperty(i)&&n.hasOwnProperty(i)&&delete n[i];r.down.destroy()}}};it.easyXDM=e})(window,document,location,window.setTimeout,decodeURIComponent,encodeURIComponent);
  /*
  //# sourceMappingURL=easyXDM.min.js.map
  */