Advertisement
Guest User

Untitled

a guest
Jul 29th, 2011
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function FABridge(b, a) {
  2.     this.target = b;
  3.     this.remoteTypeCache = {};
  4.     this.remoteInstanceCache = {};
  5.     this.remoteFunctionCache = {};
  6.     this.localFunctionCache = {};
  7.     this.bridgeID = FABridge.nextBridgeID++;
  8.     this.name = a;
  9.     this.nextLocalFuncID = 0;
  10.     FABridge.instances[this.name] = this;
  11.     FABridge.idMap[this.bridgeID] = this;
  12.     return this
  13. }
  14. FABridge.TYPE_ASINSTANCE = 1;
  15. FABridge.TYPE_ASFUNCTION = 2;
  16. FABridge.TYPE_JSFUNCTION = 3;
  17. FABridge.TYPE_ANONYMOUS = 4;
  18. FABridge.initCallbacks = {};
  19. FABridge.userTypes = {};
  20. FABridge.addToUserTypes = function () {
  21.     for (var a = 0; a < arguments.length; a++) {
  22.         FABridge.userTypes[arguments[a]] = {
  23.             typeName: arguments[a],
  24.             enriched: false
  25.         }
  26.     }
  27. };
  28. FABridge.argsToArray = function (b) {
  29.     var a = [];
  30.     for (var c = 0; c < b.length; c++) {
  31.         a[c] = b[c]
  32.     }
  33.     return a
  34. };
  35.  
  36. function instanceFactory(a) {
  37.     this.fb_instance_id = a;
  38.     return this
  39. }
  40. function FABridge__invokeJSFunction(a) {
  41.     var c = a[0];
  42.     var b = a.concat();
  43.     b.shift();
  44.     var d = FABridge.extractBridgeFromID(c);
  45.     return d.invokeLocalFunction(c, b)
  46. }
  47. FABridge.addInitializationCallback = function (b, d) {
  48.     var c = FABridge.instances[b];
  49.     if (c != undefined) {
  50.         d.call(c);
  51.         return
  52.     }
  53.     var a = FABridge.initCallbacks[b];
  54.     if (a == null) {
  55.         FABridge.initCallbacks[b] = a = []
  56.     }
  57.     a.push(d)
  58. };
  59.  
  60. function FABridge__bridgeInitialized(d) {
  61.     var a = "bridgeName=" + d;
  62.     if (/Explorer/.test(navigator.appName) || /Opera/.test(navigator.appName) || /Netscape/.test(navigator.appName) || /Konqueror|Safari|KHTML/.test(navigator.appVersion)) {
  63.         var m = document.getElementsByTagName("object");
  64.         if (m.length == 1) {
  65.             FABridge.attachBridge(m[0], d)
  66.         } else {
  67.             for (var f = 0; f < m.length; f++) {
  68.                 var h = m[f];
  69.                 var c = h.childNodes;
  70.                 var g = false;
  71.                 for (var e = 0; e < c.length; e++) {
  72.                     var b = c[e];
  73.                     if (b.nodeType == 1 && b.tagName.toLowerCase() == "param") {
  74.                         if (b.name.toLowerCase() == "flashvars" && b.value.indexOf(a) >= 0) {
  75.                             FABridge.attachBridge(h, d);
  76.                             g = true;
  77.                             break
  78.                         }
  79.                     }
  80.                 }
  81.                 if (g) {
  82.                     break
  83.                 }
  84.             }
  85.         }
  86.     } else {
  87.         var m = document.getElementsByTagName("embed");
  88.         if (m.length == 1) {
  89.             FABridge.attachBridge(m[0], d)
  90.         } else {
  91.             for (var f = 0; f < m.length; f++) {
  92.                 var h = m[f];
  93.                 var l = h.attributes.getNamedItem("flashVars").nodeValue;
  94.                 if (l.indexOf(a) >= 0) {
  95.                     FABridge.attachBridge(h, d)
  96.                 }
  97.             }
  98.         }
  99.     }
  100.     return true
  101. }
  102. FABridge.nextBridgeID = 0;
  103. FABridge.instances = {};
  104. FABridge.idMap = {};
  105. FABridge.refCount = 0;
  106. FABridge.extractBridgeFromID = function (b) {
  107.     var a = (b >> 16);
  108.     return FABridge.idMap[a]
  109. };
  110. FABridge.attachBridge = function (a, c) {
  111.     var b = new FABridge(a, c);
  112.     FABridge[c] = b;
  113.     var e = FABridge.initCallbacks[c];
  114.     if (e == null) {
  115.         return
  116.     }
  117.     for (var d = 0; d < e.length; d++) {
  118.         e[d].call(b)
  119.     }
  120.     delete FABridge.initCallbacks[c]
  121. };
  122. FABridge.blockedMethods = {
  123.     toString: true,
  124.     get: true,
  125.     set: true,
  126.     call: true
  127. };
  128. FABridge.prototype = {
  129.     root: function () {
  130.         return this.deserialize(this.target.getRoot())
  131.     },
  132.     releaseASObjects: function () {
  133.         return this.target.releaseASObjects()
  134.     },
  135.     releaseNamedASObject: function (b) {
  136.         if (typeof (b) != "object") {
  137.             return false
  138.         } else {
  139.             var a = this.target.releaseNamedASObject(b.fb_instance_id);
  140.             return a
  141.         }
  142.     },
  143.     create: function (a) {
  144.         return this.deserialize(this.target.create(a))
  145.     },
  146.     makeID: function (a) {
  147.         return (this.bridgeID << 16) + a
  148.     },
  149.     getPropertyFromAS: function (b, a) {
  150.         if (FABridge.refCount > 0) {
  151.             throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.")
  152.         } else {
  153.             FABridge.refCount++;
  154.             retVal = this.target.getPropFromAS(b, a);
  155.             retVal = this.handleError(retVal);
  156.             FABridge.refCount--;
  157.             return retVal
  158.         }
  159.     },
  160.     setPropertyInAS: function (c, b, a) {
  161.         if (FABridge.refCount > 0) {
  162.             throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.")
  163.         } else {
  164.             FABridge.refCount++;
  165.             retVal = this.target.setPropInAS(c, b, this.serialize(a));
  166.             retVal = this.handleError(retVal);
  167.             FABridge.refCount--;
  168.             return retVal
  169.         }
  170.     },
  171.     callASFunction: function (b, a) {
  172.         if (FABridge.refCount > 0) {
  173.             throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.")
  174.         } else {
  175.             FABridge.refCount++;
  176.             retVal = this.target.invokeASFunction(b, this.serialize(a));
  177.             retVal = this.handleError(retVal);
  178.             FABridge.refCount--;
  179.             return retVal
  180.         }
  181.     },
  182.     callASMethod: function (b, c, a) {
  183.         if (FABridge.refCount > 0) {
  184.             throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.")
  185.         } else {
  186.             FABridge.refCount++;
  187.             a = this.serialize(a);
  188.             retVal = this.target.invokeASMethod(b, c, a);
  189.             retVal = this.handleError(retVal);
  190.             FABridge.refCount--;
  191.             return retVal
  192.         }
  193.     },
  194.     invokeLocalFunction: function (d, b) {
  195.         var a;
  196.         var c = this.localFunctionCache[d];
  197.         if (c != undefined) {
  198.             a = this.serialize(c.apply(null, this.deserialize(b)))
  199.         }
  200.         return a
  201.     },
  202.     getUserTypeDescriptor: function (b) {
  203.         var c = b.replace(/^([^:]*)\:\:([^:]*)$/, "$2");
  204.         var e = ((typeof window[c] == "function") && (typeof FABridge.userTypes[c] != "undefined"));
  205.         var d = false;
  206.         if (e) {
  207.             d = FABridge.userTypes[c].enriched
  208.         }
  209.         var a = {
  210.             simpleType: c,
  211.             isUserProto: e,
  212.             protoEnriched: d
  213.         };
  214.         return a
  215.     },
  216.     getTypeFromName: function (b) {
  217.         var c = this.getUserTypeDescriptor(b);
  218.         var a = this.remoteTypeCache[b];
  219.         if (c.isUserProto) {
  220.             if (!c.protoEnriched) {
  221.                 for (i in window[c.simpleType].prototype) {
  222.                     a[i] = window[c.simpleType].prototype[i]
  223.                 }
  224.                 window[c.simpleType].prototype = a;
  225.                 this.remoteTypeCache[b] = a;
  226.                 FABridge.userTypes[c.simpleType].enriched = true
  227.             }
  228.         }
  229.         return a
  230.     },
  231.     createProxy: function (c, b) {
  232.         var d = this.getUserTypeDescriptor(b);
  233.         var f = this.getTypeFromName(b);
  234.         if (d.isUserProto) {
  235.             var e = window[d.simpleType];
  236.             var a = new e(this.name, c);
  237.             a.fb_instance_id = c
  238.         } else {
  239.             instanceFactory.prototype = f;
  240.             var a = new instanceFactory(c)
  241.         }
  242.         this.remoteInstanceCache[c] = a;
  243.         return a
  244.     },
  245.     getProxy: function (a) {
  246.         return this.remoteInstanceCache[a]
  247.     },
  248.     addTypeDataToCache: function (d) {
  249.         newType = new ASProxy(this, d.name);
  250.         var b = d.accessors;
  251.         for (var c = 0; c < b.length; c++) {
  252.             this.addPropertyToType(newType, b[c])
  253.         }
  254.         var a = d.methods;
  255.         for (var c = 0; c < a.length; c++) {
  256.             if (FABridge.blockedMethods[a[c]] == undefined) {
  257.                 this.addMethodToType(newType, a[c])
  258.             }
  259.         }
  260.         this.remoteTypeCache[newType.typeName] = newType;
  261.         return newType
  262.     },
  263.     addPropertyToType: function (a, e) {
  264.         var f = e.charAt(0);
  265.         var b;
  266.         var d;
  267.         if (f >= "a" && f <= "z") {
  268.             d = "get" + f.toUpperCase() + e.substr(1);
  269.             b = "set" + f.toUpperCase() + e.substr(1)
  270.         } else {
  271.             d = "get" + e;
  272.             b = "set" + e
  273.         }
  274.         a[b] = function (c) {
  275.             this.bridge.setPropertyInAS(this.fb_instance_id, e, c)
  276.         };
  277.         a[d] = function () {
  278.             return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id, e))
  279.         }
  280.     },
  281.     addMethodToType: function (a, b) {
  282.         a[b] = function () {
  283.             return this.bridge.deserialize(this.bridge.callASMethod(this.fb_instance_id, b, FABridge.argsToArray(arguments)))
  284.         }
  285.     },
  286.     getFunctionProxy: function (a) {
  287.         var b = this;
  288.         if (this.remoteFunctionCache[a] == null) {
  289.             this.remoteFunctionCache[a] = function () {
  290.                 b.callASFunction(a, FABridge.argsToArray(arguments))
  291.             }
  292.         }
  293.         return this.remoteFunctionCache[a]
  294.     },
  295.     getFunctionID: function (a) {
  296.         if (a.__bridge_id__ == undefined) {
  297.             a.__bridge_id__ = this.makeID(this.nextLocalFuncID++);
  298.             this.localFunctionCache[a.__bridge_id__] = a
  299.         }
  300.         return a.__bridge_id__
  301.     },
  302.     serialize: function (d) {
  303.         var a = {};
  304.         var c = typeof (d);
  305.         if (c == "number" || c == "string" || c == "boolean" || c == null || c == undefined) {
  306.             a = d
  307.         } else {
  308.             if (d instanceof Array) {
  309.                 a = [];
  310.                 for (var b = 0; b < d.length; b++) {
  311.                     a[b] = this.serialize(d[b])
  312.                 }
  313.             } else {
  314.                 if (c == "function") {
  315.                     a.type = FABridge.TYPE_JSFUNCTION;
  316.                     a.value = this.getFunctionID(d)
  317.                 } else {
  318.                     if (d instanceof ASProxy) {
  319.                         a.type = FABridge.TYPE_ASINSTANCE;
  320.                         a.value = d.fb_instance_id
  321.                     } else {
  322.                         a.type = FABridge.TYPE_ANONYMOUS;
  323.                         a.value = d
  324.                     }
  325.                 }
  326.             }
  327.         }
  328.         return a
  329.     },
  330.     deserialize: function (e) {
  331.         var a;
  332.         var c = typeof (e);
  333.         if (c == "number" || c == "string" || c == "boolean" || e == null || e == undefined) {
  334.             a = this.handleError(e)
  335.         } else {
  336.             if (e instanceof Array) {
  337.                 a = [];
  338.                 for (var b = 0; b < e.length; b++) {
  339.                     a[b] = this.deserialize(e[b])
  340.                 }
  341.             } else {
  342.                 if (c == "object") {
  343.                     for (var b = 0; b < e.newTypes.length; b++) {
  344.                         this.addTypeDataToCache(e.newTypes[b])
  345.                     }
  346.                     for (var d in e.newRefs) {
  347.                         this.createProxy(d, e.newRefs[d])
  348.                     }
  349.                     if (e.type == FABridge.TYPE_PRIMITIVE) {
  350.                         a = e.value
  351.                     } else {
  352.                         if (e.type == FABridge.TYPE_ASFUNCTION) {
  353.                             a = this.getFunctionProxy(e.value)
  354.                         } else {
  355.                             if (e.type == FABridge.TYPE_ASINSTANCE) {
  356.                                 a = this.getProxy(e.value)
  357.                             } else {
  358.                                 if (e.type == FABridge.TYPE_ANONYMOUS) {
  359.                                     a = e.value
  360.                                 }
  361.                             }
  362.                         }
  363.                     }
  364.                 }
  365.             }
  366.         }
  367.         return a
  368.     },
  369.     addRef: function (a) {
  370.         this.target.incRef(a.fb_instance_id)
  371.     },
  372.     release: function (a) {
  373.         this.target.releaseRef(a.fb_instance_id)
  374.     },
  375.     handleError: function (b) {
  376.         if (typeof (b) == "string" && b.indexOf("__FLASHERROR") == 0) {
  377.             var a = b.split("||");
  378.             if (FABridge.refCount > 0) {
  379.                 FABridge.refCount--
  380.             }
  381.             throw new Error(a[1]);
  382.             return b
  383.         } else {
  384.             return b
  385.         }
  386.     }
  387. };
  388. ASProxy = function (b, a) {
  389.     this.bridge = b;
  390.     this.typeName = a;
  391.     return this
  392. };
  393. ASProxy.prototype = {
  394.     get: function (a) {
  395.         return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id, a))
  396.     },
  397.     set: function (b, a) {
  398.         this.bridge.setPropertyInAS(this.fb_instance_id, b, a)
  399.     },
  400.     call: function (b, a) {
  401.         this.bridge.callASMethod(this.fb_instance_id, b, a)
  402.     },
  403.     addRef: function () {
  404.         this.bridge.addRef(this)
  405.     },
  406.     release: function () {
  407.         this.bridge.release(this)
  408.     }
  409. };
  410. var flensed = {
  411.     base_path: "http://s.phono.com/deps/flensed/1.0/"
  412. };
  413.  
  414. function Phono(a) {
  415.     this.config = Phono.util.extend({
  416.         gateway: "gw.phono.com",
  417.         connectionUrl: "http://app.phono.com/http-bind"
  418.     }, a);
  419.     Phono.events.bind(this, a);
  420.     if (!a.apiKey) {
  421.         this.config.apiKey = prompt("Please enter your Phono API Key.\n\nTo get a new one sign up for a free account at: http://www.phono.com");
  422.         if (!this.config.apiKey) {
  423.             var b = "A Phono API Key is required. Please get one at http://www.phono.com";
  424.             Phono.events.trigger(this, "error", {
  425.                 reason: b
  426.             });
  427.             throw b
  428.         }
  429.     }
  430.     this.sessionId = null;
  431.     this.connection = new Strophe.Connection(this.config.connectionUrl);
  432.     this.connect()
  433. }(function () {
  434.     var d = (function () {
  435.         var n;
  436.  
  437.         function j() {
  438.             return function () {}
  439.         }
  440.         function h(s, r) {
  441.             for (var f in r) {
  442.                 s[f] = r[f]
  443.             }
  444.         }
  445.         var p = j();
  446.         var l = j();
  447.         h(l.prototype, {
  448.             addChild: p,
  449.             getEffectiveAppenders: p,
  450.             invalidateAppenderCache: p,
  451.             getAdditivity: p,
  452.             setAdditivity: p,
  453.             addAppender: p,
  454.             removeAppender: p,
  455.             removeAllAppenders: p,
  456.             log: p,
  457.             setLevel: p,
  458.             getLevel: p,
  459.             getEffectiveLevel: p,
  460.             trace: p,
  461.             debug: p,
  462.             info: p,
  463.             warn: p,
  464.             error: p,
  465.             fatal: p,
  466.             isEnabledFor: p,
  467.             isTraceEnabled: p,
  468.             isDebugEnabled: p,
  469.             isInfoEnabled: p,
  470.             isWarnEnabled: p,
  471.             isErrorEnabled: p,
  472.             isFatalEnabled: p,
  473.             callAppenders: p,
  474.             group: p,
  475.             groupEnd: p,
  476.             time: p,
  477.             timeEnd: p,
  478.             assert: p,
  479.             parent: new l()
  480.         });
  481.         var o = function () {
  482.                 return new l()
  483.             };
  484.  
  485.         function q() {}
  486.         h(q.prototype, {
  487.             setEventTypes: p,
  488.             addEventListener: p,
  489.             removeEventListener: p,
  490.             dispatchEvent: p,
  491.             eventTypes: [],
  492.             eventListeners: {}
  493.         });
  494.  
  495.         function m() {}
  496.         m.prototype = new q();
  497.         n = new m();
  498.         n = {
  499.             isStub: true,
  500.             version: "1.4.1",
  501.             edition: "log4javascript_production",
  502.             setEventTypes: p,
  503.             addEventListener: p,
  504.             removeEventListener: p,
  505.             dispatchEvent: p,
  506.             eventTypes: [],
  507.             eventListeners: {},
  508.             logLog: {
  509.                 setQuietMode: p,
  510.                 setAlertAllErrors: p,
  511.                 debug: p,
  512.                 displayDebug: p,
  513.                 warn: p,
  514.                 error: p
  515.             },
  516.             handleError: p,
  517.             setEnabled: p,
  518.             isEnabled: p,
  519.             setTimeStampsInMilliseconds: p,
  520.             isTimeStampsInMilliseconds: p,
  521.             evalInScope: p,
  522.             setShowStackTraces: p,
  523.             getLogger: o,
  524.             getDefaultLogger: o,
  525.             getNullLogger: o,
  526.             getRootLogger: o,
  527.             resetConfiguration: p,
  528.             Level: j(),
  529.             LoggingEvent: j(),
  530.             Layout: j(),
  531.             Appender: j()
  532.         };
  533.         n.LoggingEvent.prototype = {
  534.             getThrowableStrRep: p,
  535.             getCombinedMessages: p
  536.         };
  537.         n.Level.prototype = {
  538.             toString: p,
  539.             equals: p,
  540.             isGreaterOrEqual: p
  541.         };
  542.         var g = new n.Level();
  543.         h(n.Level, {
  544.             ALL: g,
  545.             TRACE: g,
  546.             DEBUG: g,
  547.             INFO: g,
  548.             WARN: g,
  549.             ERROR: g,
  550.             FATAL: g,
  551.             OFF: g
  552.         });
  553.         n.Layout.prototype = {
  554.             defaults: {},
  555.             format: p,
  556.             ignoresThrowable: p,
  557.             getContentType: p,
  558.             allowBatching: p,
  559.             getDataValues: p,
  560.             setKeys: p,
  561.             setCustomField: p,
  562.             hasCustomFields: p,
  563.             setTimeStampsInMilliseconds: p,
  564.             isTimeStampsInMilliseconds: p,
  565.             getTimeStampValue: p,
  566.             toString: p
  567.         };
  568.         n.SimpleDateFormat = j();
  569.         n.SimpleDateFormat.prototype = {
  570.             setMinimalDaysInFirstWeek: p,
  571.             getMinimalDaysInFirstWeek: p,
  572.             format: p
  573.         };
  574.         n.PatternLayout = j();
  575.         n.PatternLayout.prototype = new n.Layout();
  576.         n.Appender = j();
  577.         n.Appender.prototype = new q();
  578.         h(n.Appender.prototype, {
  579.             layout: new n.PatternLayout(),
  580.             threshold: n.Level.ALL,
  581.             loggers: [],
  582.             doAppend: p,
  583.             append: p,
  584.             setLayout: p,
  585.             getLayout: p,
  586.             setThreshold: p,
  587.             getThreshold: p,
  588.             setAddedToLogger: p,
  589.             setRemovedFromLogger: p,
  590.             group: p,
  591.             groupEnd: p,
  592.             toString: p
  593.         });
  594.         n.SimpleLayout = j();
  595.         n.SimpleLayout.prototype = new n.Layout();
  596.         n.NullLayout = j();
  597.         n.NullLayout.prototype = new n.Layout();
  598.         n.XmlLayout = j();
  599.         n.XmlLayout.prototype = new n.Layout();
  600.         h(n.XmlLayout.prototype, {
  601.             escapeCdata: p,
  602.             isCombinedMessages: p
  603.         });
  604.         n.JsonLayout = j();
  605.         n.JsonLayout.prototype = new n.Layout();
  606.         h(n.JsonLayout.prototype, {
  607.             isReadable: p,
  608.             isCombinedMessages: p
  609.         });
  610.         n.HttpPostDataLayout = j();
  611.         n.HttpPostDataLayout.prototype = new n.Layout();
  612.         n.PatternLayout = j();
  613.         n.PatternLayout.prototype = new n.Layout();
  614.         n.AjaxAppender = j();
  615.         n.AjaxAppender.prototype = new n.Appender();
  616.         h(n.AjaxAppender.prototype, {
  617.             getSessionId: p,
  618.             setSessionId: p,
  619.             isTimed: p,
  620.             setTimed: p,
  621.             getTimerInterval: p,
  622.             setTimerInterval: p,
  623.             isWaitForResponse: p,
  624.             setWaitForResponse: p,
  625.             getBatchSize: p,
  626.             setBatchSize: p,
  627.             isSendAllOnUnload: p,
  628.             setSendAllOnUnload: p,
  629.             setRequestSuccessCallback: p,
  630.             setFailCallback: p,
  631.             getPostVarName: p,
  632.             setPostVarName: p,
  633.             sendAll: p,
  634.             defaults: {
  635.                 requestSuccessCallback: null,
  636.                 failCallback: null
  637.             }
  638.         });
  639.         return n
  640.     })();
  641.     var c = d;
  642.     Phono.version = "0.2";
  643.     Phono.log = c.getDefaultLogger();
  644.     Phono.registerPlugin = function (g, f) {
  645.         if (!Phono.plugins) {
  646.             Phono.plugins = {}
  647.         }
  648.         Phono.plugins[g] = f
  649.     };
  650.     Phono.prototype.connect = function () {
  651.         if (this.connection.connected) {
  652.             return
  653.         }
  654.         var f = this;
  655.         this.connection.connect(f.config.gateway, null, function (g) {
  656.             if (g === Strophe.Status.CONNECTED) {
  657.                 f.connection.send($iq({
  658.                     type: "set"
  659.                 }).c("apikey", {
  660.                     xmlns: "http://phono.com/apikey"
  661.                 }).t(f.config.apiKey));
  662.                 f.handleConnect()
  663.             } else {
  664.                 if (g === Strophe.Status.DISCONNECTED) {
  665.                     f.handleDisconnect()
  666.                 } else {
  667.                     if (g === Strophe.Status.ERROR || g === Strophe.Status.CONNFAIL || g === Strophe.Status.CONNFAIL || g === Strophe.Status.AUTHFAIL) {
  668.                         f.handleError()
  669.                     }
  670.                 }
  671.             }
  672.         })
  673.     };
  674.     Phono.prototype.disconnect = function () {
  675.         this.connection.disconnect()
  676.     };
  677.     Phono.prototype.connected = function () {
  678.         return this.connection.connected
  679.     };
  680.     Phono.prototype.handleConnect = function () {
  681.         this.sessionId = Strophe.getBareJidFromJid(this.connection.jid);
  682.         new a(this, this.config, function (f) {
  683.             Phono.events.trigger(this, "ready")
  684.         }).init()
  685.     };
  686.     Phono.prototype.handleError = function () {
  687.         Phono.events.trigger(this, "error", {
  688.             reason: "Error connecting to XMPP server"
  689.         })
  690.     };
  691.     Phono.prototype.handleDisconnect = function () {
  692.         Phono.events.trigger(this, "unready")
  693.     };
  694.     (function (aE) {
  695.         var ab = aE,
  696.             az = aE.document,
  697.             ag = "undefined",
  698.             aG = true,
  699.             U = false,
  700.             aA = "",
  701.             ar = "object",
  702.             aw = "function",
  703.             S = "string",
  704.             av = "div",
  705.             aC = "onunload",
  706.             Y = null,
  707.             ah = null,
  708.             V = null,
  709.             ap = null,
  710.             ai = 0,
  711.             ay = [],
  712.             au = null,
  713.             ao = null,
  714.             Z = "flXHR.js",
  715.             at = "flensed.js",
  716.             Q = "flXHR.vbs",
  717.             ax = "checkplayer.js",
  718.             af = "flXHR.swf",
  719.             al = aE.parseInt,
  720.             aj = aE.setTimeout,
  721.             aB = aE.clearTimeout,
  722.             an = aE.setInterval,
  723.             ak = aE.clearInterval,
  724.             R = "instanceId",
  725.             W = "readyState",
  726.             ac = "onreadystatechange",
  727.             T = "ontimeout",
  728.             ad = "onerror",
  729.             aD = "binaryResponseBody",
  730.             aa = "xmlResponseText",
  731.             X = "loadPolicyURL",
  732.             aF = "noCacheHeader",
  733.             aq = "sendTimeout",
  734.             ae = "appendToId",
  735.             am = "swfIdPrefix";
  736.         if (typeof aE.flensed === ag) {
  737.             aE.flensed = {}
  738.         }
  739.         if (typeof aE.flensed.flXHR !== ag) {
  740.             return
  741.         }
  742.         ah = aE.flensed;
  743.         aj(function () {
  744.             var r = U,
  745.                 v = az.getElementsByTagName("script"),
  746.                 m = v.length;
  747.             try {
  748.                 ah.base_path.toLowerCase();
  749.                 r = aG
  750.             } catch (o) {
  751.                 ah.base_path = aA
  752.             }
  753.             function g(w, x, A) {
  754.                 for (var y = 0; y < m; y++) {
  755.                     if (typeof v[y].src !== ag) {
  756.                         if (v[y].src.indexOf(w) >= 0) {
  757.                             break
  758.                         }
  759.                     }
  760.                 }
  761.                 var z = az.createElement("script");
  762.                 z.setAttribute("src", ah.base_path + w);
  763.                 if (typeof x !== ag) {
  764.                     z.setAttribute("type", x)
  765.                 }
  766.                 if (typeof A !== ag) {
  767.                     z.setAttribute("language", A)
  768.                 }
  769.                 az.getElementsByTagName("head")[0].appendChild(z)
  770.             }
  771.             if ((typeof v !== ag) && (v !== null)) {
  772.                 if (!r) {
  773.                     var u = 0;
  774.                     for (var n = 0; n < m; n++) {
  775.                         if (typeof v[n].src !== ag) {
  776.                             if (((u = v[n].src.indexOf(at)) >= 0) || ((u = v[n].src.indexOf(Z)) >= 0)) {
  777.                                 ah.base_path = v[n].src.substr(0, u);
  778.                                 break
  779.                             }
  780.                         }
  781.                     }
  782.                 }
  783.             }
  784.             try {
  785.                 ah.checkplayer.module_ready()
  786.             } catch (f) {
  787.                 g(ax, "text/javascript")
  788.             }
  789.             var t = null;
  790.             (function s() {
  791.                 try {
  792.                     ah.ua.pv.join(".")
  793.                 } catch (w) {
  794.                     t = aj(arguments.callee, 25);
  795.                     return
  796.                 }
  797.                 if (ah.ua.win && ah.ua.ie) {
  798.                     g(Q, "text/vbscript", "vbscript")
  799.                 }
  800.                 ah.binaryToString = function (D, x) {
  801.                     x = (((ah.ua.win && ah.ua.ie) && typeof x !== ag) ? (!(!x)) : !(ah.ua.win && ah.ua.ie));
  802.                     if (!x) {
  803.                         try {
  804.                             return flXHR_vb_BinaryToString(D)
  805.                         } catch (B) {}
  806.                     }
  807.                     var A = aA,
  808.                         y = [];
  809.                     try {
  810.                         for (var C = 0; C < D.length; C++) {
  811.                             y[y.length] = String.fromCharCode(D[C])
  812.                         }
  813.                         A = y.join(aA)
  814.                     } catch (z) {}
  815.                     return A
  816.                 };
  817.                 ah.bindEvent(ab, aC, function () {
  818.                     try {
  819.                         aE.flensed.unbindEvent(ab, aC, arguments.callee);
  820.                         for (var x in ao) {
  821.                             if (ao[x] !== Object.prototype[x]) {
  822.                                 try {
  823.                                     ao[x] = null
  824.                                 } catch (y) {}
  825.                             }
  826.                         }
  827.                         ah.flXHR = null;
  828.                         ao = null;
  829.                         ah = null;
  830.                         ap = null;
  831.                         V = null
  832.                     } catch (z) {}
  833.                 })
  834.             })();
  835.  
  836.             function h() {
  837.                 aB(t);
  838.                 try {
  839.                     ab.detachEvent(aC, h)
  840.                 } catch (w) {}
  841.             }
  842.             if (t !== null) {
  843.                 try {
  844.                     ab.attachEvent(aC, h)
  845.                 } catch (j) {}
  846.             }
  847.             var p = null;
  848.  
  849.             function q() {
  850.                 aB(p);
  851.                 try {
  852.                     ab.detachEvent(aC, q)
  853.                 } catch (w) {}
  854.             }
  855.             try {
  856.                 ab.attachEvent(aC, q)
  857.             } catch (l) {}
  858.             p = aj(function () {
  859.                 q();
  860.                 try {
  861.                     ah.checkplayer.module_ready()
  862.                 } catch (w) {
  863.                     throw new aE.Error("flXHR dependencies failed to load.")
  864.                 }
  865.             }, 20000)
  866.         }, 0);
  867.         ah.flXHR = function (a8) {
  868.             var O = U;
  869.             if (a8 !== null && typeof a8 === ar) {
  870.                 if (typeof a8.instancePooling !== ag) {
  871.                     O = !(!a8.instancePooling);
  872.                     if (O) {
  873.                         var bj = function () {
  874.                                 for (var aI = 0; aI < ay.length; aI++) {
  875.                                     var aH = ay[aI];
  876.                                     if (aH[W] === 4) {
  877.                                         aH.Reset();
  878.                                         aH.Configure(a8);
  879.                                         return aH
  880.                                     }
  881.                                 }
  882.                                 return null
  883.                             }();
  884.                         if (bj !== null) {
  885.                             return bj
  886.                         }
  887.                     }
  888.                 }
  889.             }
  890.             var a3 = ++ai,
  891.                 H = [],
  892.                 K = null,
  893.                 I = null,
  894.                 l = null,
  895.                 h = null,
  896.                 bd = -1,
  897.                 bk = 0,
  898.                 P = null,
  899.                 N = null,
  900.                 B = null,
  901.                 bl = null,
  902.                 o = null,
  903.                 a4 = null,
  904.                 F = null,
  905.                 y = null,
  906.                 be = null,
  907.                 f = aG,
  908.                 bo = U,
  909.                 a1 = "flXHR_" + a3,
  910.                 s = aG,
  911.                 bn = U,
  912.                 bp = aG,
  913.                 bg = U,
  914.                 v = "flXHR_swf",
  915.                 L = "flXHRhideSwf",
  916.                 p = null,
  917.                 bi = -1,
  918.                 t = aA,
  919.                 bf = null,
  920.                 bm = null,
  921.                 bb = null;
  922.             var r = function () {
  923.                     if (typeof a8 === ar && a8 !== null) {
  924.                         if ((typeof a8[R] !== ag) && (a8[R] !== null) && (a8[R] !== aA)) {
  925.                             a1 = a8[R]
  926.                         }
  927.                         if ((typeof a8[am] !== ag) && (a8[am] !== null) && (a8[am] !== aA)) {
  928.                             v = a8[am]
  929.                         }
  930.                         if ((typeof a8[ae] !== ag) && (a8[ae] !== null) && (a8[ae] !== aA)) {
  931.                             p = a8[ae]
  932.                         }
  933.                         if ((typeof a8[X] !== ag) && (a8[X] !== null) && (a8[X] !== aA)) {
  934.                             t = a8[X]
  935.                         }
  936.                         if (typeof a8[aF] !== ag) {
  937.                             s = !(!a8[aF])
  938.                         }
  939.                         if (typeof a8[aD] !== ag) {
  940.                             bn = !(!a8[aD])
  941.                         }
  942.                         if (typeof a8[aa] !== ag) {
  943.                             bp = !(!a8[aa])
  944.                         }
  945.                         if (typeof a8.autoUpdatePlayer !== ag) {
  946.                             bg = !(!a8.autoUpdatePlayer)
  947.                         }
  948.                         if ((typeof a8[aq] !== ag) && ((Y = al(a8[aq], 10)) > 0)) {
  949.                             bi = Y
  950.                         }
  951.                         if ((typeof a8[ac] !== ag) && (a8[ac] !== null)) {
  952.                             bf = a8[ac]
  953.                         }
  954.                         if ((typeof a8[ad] !== ag) && (a8[ad] !== null)) {
  955.                             bm = a8[ad]
  956.                         }
  957.                         if ((typeof a8[T] !== ag) && (a8[T] !== null)) {
  958.                             bb = a8[T]
  959.                         }
  960.                     }
  961.                     h = v + "_" + a3;
  962.  
  963.                     function aJ() {
  964.                         aB(K);
  965.                         try {
  966.                             ab.detachEvent(aC, aJ)
  967.                         } catch (aK) {}
  968.                     }
  969.                     try {
  970.                         ab.attachEvent(aC, aJ)
  971.                     } catch (aI) {}(function aH() {
  972.                         try {
  973.                             ah.bindEvent(ab, aC, bh)
  974.                         } catch (aK) {
  975.                             K = aj(arguments.callee, 25);
  976.                             return
  977.                         }
  978.                         aJ();
  979.                         K = aj(a6, 1)
  980.                     })()
  981.                 }();
  982.  
  983.             function a6() {
  984.                 if (p === null) {
  985.                     y = az.getElementsByTagName("body")[0]
  986.                 } else {
  987.                     y = ah.getObjectById(p)
  988.                 }
  989.                 try {
  990.                     y.nodeName.toLowerCase();
  991.                     ah.checkplayer.module_ready();
  992.                     V = ah.checkplayer
  993.                 } catch (aH) {
  994.                     K = aj(a6, 25);
  995.                     return
  996.                 }
  997.                 if ((ap === null) && (typeof V._ins === ag)) {
  998.                     try {
  999.                         ap = new V(ao.MIN_PLAYER_VERSION, a5, U, z)
  1000.                     } catch (aI) {
  1001.                         ba(ao.DEPENDENCY_ERROR, "flXHR: checkplayer Init Failed", "The initialization of the 'checkplayer' library failed to complete.");
  1002.                         return
  1003.                     }
  1004.                 } else {
  1005.                     ap = V._ins;
  1006.                     J()
  1007.                 }
  1008.             }
  1009.             function J() {
  1010.                 if (ap === null || !ap.checkPassed) {
  1011.                     K = aj(J, 25);
  1012.                     return
  1013.                 }
  1014.                 if (au === null && p === null) {
  1015.                     ah.createCSS("." + L, "left:-1px;top:0px;width:1px;height:1px;position:absolute;");
  1016.                     au = aG
  1017.                 }
  1018.                 var aL = az.createElement(av);
  1019.                 aL.id = h;
  1020.                 aL.className = L;
  1021.                 y.appendChild(aL);
  1022.                 y = null;
  1023.                 var aI = {},
  1024.                     aK = {
  1025.                         allowScriptAccess: "always"
  1026.                     },
  1027.                     aH = {
  1028.                         id: h,
  1029.                         name: h,
  1030.                         styleclass: L
  1031.                     },
  1032.                     aM = {
  1033.                         swfCB: a7,
  1034.                         swfEICheck: "reset"
  1035.                     };
  1036.                 try {
  1037.                     ap.DoSWF(ah.base_path + af, h, "1", "1", aI, aK, aH, aM)
  1038.                 } catch (aJ) {
  1039.                     ba(ao.DEPENDENCY_ERROR, "flXHR: checkplayer Call Failed", "A call to the 'checkplayer' library failed to complete.");
  1040.                     return
  1041.                 }
  1042.             }
  1043.             function a7(aI) {
  1044.                 if (aI.status !== V.SWF_EI_READY) {
  1045.                     return
  1046.                 }
  1047.                 w();
  1048.                 a4 = ah.getObjectById(h);
  1049.                 a4.setId(h);
  1050.                 if (t !== aA) {
  1051.                     a4.loadPolicy(t)
  1052.                 }
  1053.                 a4.autoNoCacheHeader(s);
  1054.                 a4.returnBinaryResponseBody(bn);
  1055.                 a4.doOnReadyStateChange = E;
  1056.                 a4.doOnError = ba;
  1057.                 a4.sendProcessed = A;
  1058.                 a4.chunkResponse = j;
  1059.                 bd = 0;
  1060.                 m();
  1061.                 a2();
  1062.                 if (typeof bf === aw) {
  1063.                     try {
  1064.                         bf(F)
  1065.                     } catch (aH) {
  1066.                         ba(ao.HANDLER_ERROR, "flXHR::onreadystatechange(): Error", "An error occurred in the handler function. (" + aH.message + ")");
  1067.                         return
  1068.                     }
  1069.                 }
  1070.                 u()
  1071.             }
  1072.             function bh() {
  1073.                 try {
  1074.                     aE.flensed.unbindEvent(ab, aC, bh)
  1075.                 } catch (aH) {}
  1076.                 try {
  1077.                     for (var aS = 0; aS < ay.length; aS++) {
  1078.                         if (ay[aS] === F) {
  1079.                             ay[aS] = U
  1080.                         }
  1081.                     }
  1082.                 } catch (aL) {}
  1083.                 try {
  1084.                     for (var aQ in F) {
  1085.                         if (F[aQ] !== Object.prototype[aQ]) {
  1086.                             try {
  1087.                                 F[aQ] = null
  1088.                             } catch (aM) {}
  1089.                         }
  1090.                     }
  1091.                 } catch (aN) {}
  1092.                 F = null;
  1093.                 w();
  1094.                 if ((typeof a4 !== ag) && (a4 !== null)) {
  1095.                     try {
  1096.                         a4.abort()
  1097.                     } catch (aO) {}
  1098.                     try {
  1099.                         a4.doOnReadyStateChange = null;
  1100.                         E = null
  1101.                     } catch (aP) {}
  1102.                     try {
  1103.                         a4.doOnError = null;
  1104.                         doOnError = null
  1105.                     } catch (aR) {}
  1106.                     try {
  1107.                         a4.sendProcessed = null;
  1108.                         A = null
  1109.                     } catch (aI) {}
  1110.                     try {
  1111.                         a4.chunkResponse = null;
  1112.                         j = null
  1113.                     } catch (aJ) {}
  1114.                     a4 = null;
  1115.                     try {
  1116.                         aE.swfobject.removeSWF(h)
  1117.                     } catch (aK) {}
  1118.                 }
  1119.                 a9();
  1120.                 bf = null;
  1121.                 bm = null;
  1122.                 bb = null;
  1123.                 B = null;
  1124.                 P = null;
  1125.                 be = null;
  1126.                 y = null
  1127.             }
  1128.             function j() {
  1129.                 if (bn && typeof arguments[0] !== ag) {
  1130.                     be = ((be !== null) ? be : []);
  1131.                     be = be.concat(arguments[0])
  1132.                 } else {
  1133.                     if (typeof arguments[0] === S) {
  1134.                         be = ((be !== null) ? be : aA);
  1135.                         be += arguments[0]
  1136.                     }
  1137.                 }
  1138.             }
  1139.             function E() {
  1140.                 if (typeof arguments[0] !== ag) {
  1141.                     bd = arguments[0]
  1142.                 }
  1143.                 if (bd === 4) {
  1144.                     w();
  1145.                     if (bn && be !== null) {
  1146.                         try {
  1147.                             N = ah.binaryToString(be, aG);
  1148.                             try {
  1149.                                 P = flXHR_vb_StringToBinary(N)
  1150.                             } catch (aH) {
  1151.                                 P = be
  1152.                             }
  1153.                         } catch (aI) {}
  1154.                     } else {
  1155.                         N = be
  1156.                     }
  1157.                     be = null;
  1158.                     if (N !== aA) {
  1159.                         if (bp) {
  1160.                             try {
  1161.                                 B = ah.parseXMLString(N)
  1162.                             } catch (aJ) {
  1163.                                 B = {}
  1164.                             }
  1165.                         }
  1166.                     }
  1167.                 }
  1168.                 if (typeof arguments[1] !== ag) {
  1169.                     bl = arguments[1]
  1170.                 }
  1171.                 if (typeof arguments[2] !== ag) {
  1172.                     o = arguments[2]
  1173.                 }
  1174.                 M(bd)
  1175.             }
  1176.             function M(aI) {
  1177.                 bk = aI;
  1178.                 m();
  1179.                 a2();
  1180.                 F[W] = Math.max(0, aI);
  1181.                 if (typeof bf === aw) {
  1182.                     try {
  1183.                         bf(F)
  1184.                     } catch (aH) {
  1185.                         ba(ao.HANDLER_ERROR, "flXHR::onreadystatechange(): Error", "An error occurred in the handler function. (" + aH.message + ")");
  1186.                         return
  1187.                     }
  1188.                 }
  1189.             }
  1190.             function ba() {
  1191.                 w();
  1192.                 a9();
  1193.                 bo = aG;
  1194.                 var aN;
  1195.                 try {
  1196.                     aN = new ah.error(arguments[0], arguments[1], arguments[2], F)
  1197.                 } catch (aM) {
  1198.                     function aI() {
  1199.                         this.number = 0;
  1200.                         this.name = "flXHR Error: Unknown";
  1201.                         this.description = "Unknown error from 'flXHR' library.";
  1202.                         this.message = this.description;
  1203.                         this.srcElement = F;
  1204.                         var aP = this.number,
  1205.                             aQ = this.name,
  1206.                             aR = this.description;
  1207.  
  1208.                         function aO() {
  1209.                             return aP + ", " + aQ + ", " + aR
  1210.                         }
  1211.                         this.toString = aO
  1212.                     }
  1213.                     aN = new aI()
  1214.                 }
  1215.                 var aL = U;
  1216.                 try {
  1217.                     if (typeof bm === aw) {
  1218.                         bm(aN);
  1219.                         aL = aG
  1220.                     }
  1221.                 } catch (aJ) {
  1222.                     var aH = aN.toString();
  1223.  
  1224.                     function aK() {
  1225.                         this.number = ao.HANDLER_ERROR;
  1226.                         this.name = "flXHR::onerror(): Error";
  1227.                         this.description = "An error occured in the handler function. (" + aJ.message + ")\nPrevious:[" + aH + "]";
  1228.                         this.message = this.description;
  1229.                         this.srcElement = F;
  1230.                         var aP = this.number,
  1231.                             aQ = this.name,
  1232.                             aR = this.description;
  1233.  
  1234.                         function aO() {
  1235.                             return aP + ", " + aQ + ", " + aR
  1236.                         }
  1237.                         this.toString = aO
  1238.                     }
  1239.                     aN = new aK()
  1240.                 }
  1241.                 if (!aL) {
  1242.                     aj(function () {
  1243.                         ah.throwUnhandledError(aN.toString())
  1244.                     }, 1)
  1245.                 }
  1246.             }
  1247.             function n() {
  1248.                 D();
  1249.                 bo = aG;
  1250.                 if (typeof bb === aw) {
  1251.                     try {
  1252.                         bb(F)
  1253.                     } catch (aH) {
  1254.                         ba(ao.HANDLER_ERROR, "flXHR::ontimeout(): Error", "An error occurred in the handler function. (" + aH.message + ")");
  1255.                         return
  1256.                     }
  1257.                 } else {
  1258.                     ba(ao.TIMEOUT_ERROR, "flXHR: Operation Timed out", "The requested operation timed out.")
  1259.                 }
  1260.             }
  1261.             function w() {
  1262.                 aB(K);
  1263.                 K = null;
  1264.                 aB(l);
  1265.                 l = null;
  1266.                 aB(I);
  1267.                 I = null
  1268.             }
  1269.             function a0(aI, aH, aJ) {
  1270.                 H[H.length] = {
  1271.                     func: aI,
  1272.                     funcName: aH,
  1273.                     args: aJ
  1274.                 };
  1275.                 f = U
  1276.             }
  1277.             function a9() {
  1278.                 if (!f) {
  1279.                     f = aG;
  1280.                     var aI = H.length;
  1281.                     for (var aJ = 0; aJ < aI; aJ++) {
  1282.                         try {
  1283.                             H[aJ] = U
  1284.                         } catch (aH) {}
  1285.                     }
  1286.                     H = []
  1287.                 }
  1288.             }
  1289.             function u() {
  1290.                 if (bd < 0) {
  1291.                     I = aj(u, 25);
  1292.                     return
  1293.                 }
  1294.                 if (!f) {
  1295.                     for (var aI = 0; aI < H.length; aI++) {
  1296.                         try {
  1297.                             if (H[aI] !== U) {
  1298.                                 H[aI].func.apply(F, H[aI].args);
  1299.                                 H[aI] = U
  1300.                             }
  1301.                         } catch (aH) {
  1302.                             ba(ao.HANDLER_ERROR, "flXHR::" + H[aI].funcName + "(): Error", "An error occurred in the " + H[aI].funcName + "() function.");
  1303.                             return
  1304.                         }
  1305.                     }
  1306.                     f = aG
  1307.                 }
  1308.             }
  1309.             function a2() {
  1310.                 try {
  1311.                     F[R] = a1;
  1312.                     F[W] = bk;
  1313.                     F.status = bl;
  1314.                     F.statusText = o;
  1315.                     F.responseText = N;
  1316.                     F.responseXML = B;
  1317.                     F.responseBody = P;
  1318.                     F[ac] = bf;
  1319.                     F[ad] = bm;
  1320.                     F[T] = bb;
  1321.                     F[X] = t;
  1322.                     F[aF] = s;
  1323.                     F[aD] = bn;
  1324.                     F[aa] = bp
  1325.                 } catch (aH) {}
  1326.             }
  1327.             function m() {
  1328.                 try {
  1329.                     a1 = F[R];
  1330.                     if (F.timeout !== null && (Y = al(F.timeout, 10)) > 0) {
  1331.                         bi = Y
  1332.                     }
  1333.                     bf = F[ac];
  1334.                     bm = F[ad];
  1335.                     bb = F[T];
  1336.                     if (F[X] !== null) {
  1337.                         if ((F[X] !== t) && (bd >= 0)) {
  1338.                             a4.loadPolicy(F[X])
  1339.                         }
  1340.                         t = F[X]
  1341.                     }
  1342.                     if (F[aF] !== null) {
  1343.                         if ((F[aF] !== s) && (bd >= 0)) {
  1344.                             a4.autoNoCacheHeader(F[aF])
  1345.                         }
  1346.                         s = F[aF]
  1347.                     }
  1348.                     if (F[aD] !== null) {
  1349.                         if ((F[aD] !== bn) && (bd >= 0)) {
  1350.                             a4.returnBinaryResponseBody(F[aD])
  1351.                         }
  1352.                         bn = F[aD]
  1353.                     }
  1354.                     if (bp !== null) {
  1355.                         bp = !(!F[aa])
  1356.                     }
  1357.                 } catch (aH) {}
  1358.             }
  1359.             function bc() {
  1360.                 D();
  1361.                 try {
  1362.                     a4.reset()
  1363.                 } catch (aH) {}
  1364.                 bl = null;
  1365.                 o = null;
  1366.                 N = null;
  1367.                 B = null;
  1368.                 P = null;
  1369.                 be = null;
  1370.                 bo = U;
  1371.                 a2();
  1372.                 t = aA;
  1373.                 m()
  1374.             }
  1375.             function a5(aH) {
  1376.                 if (aH.checkPassed) {
  1377.                     J()
  1378.                 } else {
  1379.                     if (!bg) {
  1380.                         ba(ao.PLAYER_VERSION_ERROR, "flXHR: Insufficient Flash Player Version", "The Flash Player was either not detected, or the detected version (" + aH.playerVersionDetected + ") was not at least the minimum version (" + ao.MIN_PLAYER_VERSION + ") needed by the 'flXHR' library.")
  1381.                     } else {
  1382.                         ap.UpdatePlayer()
  1383.                     }
  1384.                 }
  1385.             }
  1386.             function z(aH) {
  1387.                 if (aH.updateStatus === V.UPDATE_CANCELED) {
  1388.                     ba(ao.PLAYER_VERSION_ERROR, "flXHR: Flash Player Update Canceled", "The Flash Player was not updated.")
  1389.                 } else {
  1390.                     if (aH.updateStatus === V.UPDATE_FAILED) {
  1391.                         ba(ao.PLAYER_VERSION_ERROR, "flXHR: Flash Player Update Failed", "The Flash Player was either not detected or could not be updated.")
  1392.                     }
  1393.                 }
  1394.             }
  1395.             function A() {
  1396.                 if (bi !== null && bi > 0) {
  1397.                     l = aj(n, bi)
  1398.                 }
  1399.             }
  1400.             function D() {
  1401.                 w();
  1402.                 a9();
  1403.                 m();
  1404.                 bd = 0;
  1405.                 bk = 0;
  1406.                 try {
  1407.                     a4.abort()
  1408.                 } catch (aH) {
  1409.                     ba(ao.CALL_ERROR, "flXHR::abort(): Failed", "The abort() call failed to complete.")
  1410.                 }
  1411.                 a2()
  1412.             }
  1413.             function q() {
  1414.                 m();
  1415.                 if (typeof arguments[0] === ag || typeof arguments[1] === ag) {
  1416.                     ba(ao.CALL_ERROR, "flXHR::open(): Failed", "The open() call requires 'method' and 'url' parameters.")
  1417.                 } else {
  1418.                     if (bd > 0 || bo) {
  1419.                         bc()
  1420.                     }
  1421.                     if (bk === 0) {
  1422.                         E(1)
  1423.                     } else {
  1424.                         bd = 1
  1425.                     }
  1426.                     var aJ = arguments[0],
  1427.                         aK = arguments[1],
  1428.                         aL = (typeof arguments[2] !== ag) ? arguments[2] : aG,
  1429.                         aM = (typeof arguments[3] !== ag) ? arguments[3] : aA,
  1430.                         aH = (typeof arguments[4] !== ag) ? arguments[4] : aA;
  1431.                     try {
  1432.                         a4.autoNoCacheHeader(s);
  1433.                         a4.open(aJ, aK, aL, aM, aH)
  1434.                     } catch (aI) {
  1435.                         ba(ao.CALL_ERROR, "flXHR::open(): Failed", "The open() call failed to complete.")
  1436.                     }
  1437.                 }
  1438.             }
  1439.             function g() {
  1440.                 m();
  1441.                 if (bd <= 1 && !bo) {
  1442.                     var aI = (typeof arguments[0] !== ag) ? arguments[0] : aA;
  1443.                     if (bk === 1) {
  1444.                         E(2)
  1445.                     } else {
  1446.                         bd = 2
  1447.                     }
  1448.                     try {
  1449.                         a4.autoNoCacheHeader(s);
  1450.                         a4.send(aI)
  1451.                     } catch (aH) {
  1452.                         ba(ao.CALL_ERROR, "flXHR::send(): Failed", "The send() call failed to complete.")
  1453.                     }
  1454.                 } else {
  1455.                     ba(ao.CALL_ERROR, "flXHR::send(): Failed", "The send() call cannot be made at this time.")
  1456.                 }
  1457.             }
  1458.             function G() {
  1459.                 m();
  1460.                 if (typeof arguments[0] === ag || typeof arguments[1] === ag) {
  1461.                     ba(ao.CALL_ERROR, "flXHR::setRequestHeader(): Failed", "The setRequestHeader() call requires 'name' and 'value' parameters.")
  1462.                 } else {
  1463.                     if (!bo) {
  1464.                         var aJ = (typeof arguments[0] !== ag) ? arguments[0] : aA,
  1465.                             aH = (typeof arguments[1] !== ag) ? arguments[1] : aA;
  1466.                         try {
  1467.                             a4.setRequestHeader(aJ, aH)
  1468.                         } catch (aI) {
  1469.                             ba(ao.CALL_ERROR, "flXHR::setRequestHeader(): Failed", "The setRequestHeader() call failed to complete.")
  1470.                         }
  1471.                     }
  1472.                 }
  1473.             }
  1474.             function C() {
  1475.                 m();
  1476.                 return aA
  1477.             }
  1478.             function x() {
  1479.                 m();
  1480.                 return []
  1481.             }
  1482.             F = {
  1483.                 readyState: bk,
  1484.                 responseBody: P,
  1485.                 responseText: N,
  1486.                 responseXML: B,
  1487.                 status: bl,
  1488.                 statusText: o,
  1489.                 timeout: bi,
  1490.                 open: function () {
  1491.                     m();
  1492.                     if (F[W] === 0) {
  1493.                         M(1)
  1494.                     }
  1495.                     if (!f || bd < 0) {
  1496.                         a0(q, "open", arguments);
  1497.                         return
  1498.                     }
  1499.                     q.apply({}, arguments)
  1500.                 },
  1501.                 send: function () {
  1502.                     m();
  1503.                     if (F[W] === 1) {
  1504.                         M(2)
  1505.                     }
  1506.                     if (!f || bd < 0) {
  1507.                         a0(g, "send", arguments);
  1508.                         return
  1509.                     }
  1510.                     g.apply({}, arguments)
  1511.                 },
  1512.                 abort: D,
  1513.                 setRequestHeader: function () {
  1514.                     m();
  1515.                     if (!f || bd < 0) {
  1516.                         a0(G, "setRequestHeader", arguments);
  1517.                         return
  1518.                     }
  1519.                     G.apply({}, arguments)
  1520.                 },
  1521.                 getResponseHeader: C,
  1522.                 getAllResponseHeaders: x,
  1523.                 onreadystatechange: bf,
  1524.                 ontimeout: bb,
  1525.                 instanceId: a1,
  1526.                 loadPolicyURL: t,
  1527.                 noCacheHeader: s,
  1528.                 binaryResponseBody: bn,
  1529.                 xmlResponseText: bp,
  1530.                 onerror: bm,
  1531.                 Configure: function (aH) {
  1532.                     if (typeof aH === ar && aH !== null) {
  1533.                         if ((typeof aH[R] !== ag) && (aH[R] !== null) && (aH[R] !== aA)) {
  1534.                             a1 = aH[R]
  1535.                         }
  1536.                         if (typeof aH[aF] !== ag) {
  1537.                             s = !(!aH[aF]);
  1538.                             if (bd >= 0) {
  1539.                                 a4.autoNoCacheHeader(s)
  1540.                             }
  1541.                         }
  1542.                         if (typeof aH[aD] !== ag) {
  1543.                             bn = !(!aH[aD]);
  1544.                             if (bd >= 0) {
  1545.                                 a4.returnBinaryResponseBody(bn)
  1546.                             }
  1547.                         }
  1548.                         if (typeof aH[aa] !== ag) {
  1549.                             bp = !(!aH[aa])
  1550.                         }
  1551.                         if ((typeof aH[ac] !== ag) && (aH[ac] !== null)) {
  1552.                             bf = aH[ac]
  1553.                         }
  1554.                         if ((typeof aH[ad] !== ag) && (aH[ad] !== null)) {
  1555.                             bm = aH[ad]
  1556.                         }
  1557.                         if ((typeof aH[T] !== ag) && (aH[T] !== null)) {
  1558.                             bb = aH[T]
  1559.                         }
  1560.                         if ((typeof aH[aq] !== ag) && ((Y = al(aH[aq], 10)) > 0)) {
  1561.                             bi = Y
  1562.                         }
  1563.                         if ((typeof aH[X] !== ag) && (aH[X] !== null) && (aH[X] !== aA) && (aH[X] !== t)) {
  1564.                             t = aH[X];
  1565.                             if (bd >= 0) {
  1566.                                 a4.loadPolicy(t)
  1567.                             }
  1568.                         }
  1569.                         a2()
  1570.                     }
  1571.                 },
  1572.                 Reset: bc,
  1573.                 Destroy: bh
  1574.             };
  1575.             if (O) {
  1576.                 ay[ay.length] = F
  1577.             }
  1578.             return F
  1579.         };
  1580.         ao = ah.flXHR;
  1581.         ao.HANDLER_ERROR = 10;
  1582.         ao.CALL_ERROR = 11;
  1583.         ao.TIMEOUT_ERROR = 12;
  1584.         ao.DEPENDENCY_ERROR = 13;
  1585.         ao.PLAYER_VERSION_ERROR = 14;
  1586.         ao.SECURITY_ERROR = 15;
  1587.         ao.COMMUNICATION_ERROR = 16;
  1588.         ao.MIN_PLAYER_VERSION = "9.0.124";
  1589.         ao.module_ready = function () {}
  1590.     })(window);
  1591.     var e = (function () {
  1592.         var f = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
  1593.         var g = {
  1594.             encode: function (l) {
  1595.                 var h = "";
  1596.                 var s, q, o;
  1597.                 var r, p, n, m;
  1598.                 var j = 0;
  1599.                 do {
  1600.                     s = l.charCodeAt(j++);
  1601.                     q = l.charCodeAt(j++);
  1602.                     o = l.charCodeAt(j++);
  1603.                     r = s >> 2;
  1604.                     p = ((s & 3) << 4) | (q >> 4);
  1605.                     n = ((q & 15) << 2) | (o >> 6);
  1606.                     m = o & 63;
  1607.                     if (isNaN(q)) {
  1608.                         n = m = 64
  1609.                     } else {
  1610.                         if (isNaN(o)) {
  1611.                             m = 64
  1612.                         }
  1613.                     }
  1614.                     h = h + f.charAt(r) + f.charAt(p) + f.charAt(n) + f.charAt(m)
  1615.                 } while (j < l.length);
  1616.                 return h
  1617.             },
  1618.             decode: function (l) {
  1619.                 var h = "";
  1620.                 var s, q, o;
  1621.                 var r, p, n, m;
  1622.                 var j = 0;
  1623.                 l = l.replace(/[^A-Za-z0-9\+\/\=]/g, "");
  1624.                 do {
  1625.                     r = f.indexOf(l.charAt(j++));
  1626.                     p = f.indexOf(l.charAt(j++));
  1627.                     n = f.indexOf(l.charAt(j++));
  1628.                     m = f.indexOf(l.charAt(j++));
  1629.                     s = (r << 2) | (p >> 4);
  1630.                     q = ((p & 15) << 4) | (n >> 2);
  1631.                     o = ((n & 3) << 6) | m;
  1632.                     h = h + String.fromCharCode(s);
  1633.                     if (n != 64) {
  1634.                         h = h + String.fromCharCode(q)
  1635.                     }
  1636.                     if (m != 64) {
  1637.                         h = h + String.fromCharCode(o)
  1638.                     }
  1639.                 } while (j < l.length);
  1640.                 return h
  1641.             }
  1642.         };
  1643.         return g
  1644.     })();
  1645.     var b = (function () {
  1646.         var v = 0;
  1647.         var f = "";
  1648.         var s = 8;
  1649.         var q = function (z, C) {
  1650.                 var B = (z & 65535) + (C & 65535);
  1651.                 var A = (z >> 16) + (C >> 16) + (B >> 16);
  1652.                 return (A << 16) | (B & 65535)
  1653.             };
  1654.         var u = function (y, z) {
  1655.                 return (y << z) | (y >>> (32 - z))
  1656.             };
  1657.         var g = function (B) {
  1658.                 var A = [];
  1659.                 var y = (1 << s) - 1;
  1660.                 for (var z = 0; z < B.length * s; z += s) {
  1661.                     A[z >> 5] |= (B.charCodeAt(z / s) & y) << (z % 32)
  1662.                 }
  1663.                 return A
  1664.             };
  1665.         var n = function (A) {
  1666.                 var B = "";
  1667.                 var y = (1 << s) - 1;
  1668.                 for (var z = 0; z < A.length * 32; z += s) {
  1669.                     B += String.fromCharCode((A[z >> 5] >>> (z % 32)) & y)
  1670.                 }
  1671.                 return B
  1672.             };
  1673.         var x = function (A) {
  1674.                 var z = v ? "0123456789ABCDEF" : "0123456789abcdef";
  1675.                 var B = "";
  1676.                 for (var y = 0; y < A.length * 4; y++) {
  1677.                     B += z.charAt((A[y >> 2] >> ((y % 4) * 8 + 4)) & 15) + z.charAt((A[y >> 2] >> ((y % 4) * 8)) & 15)
  1678.                 }
  1679.                 return B
  1680.             };
  1681.         var w = function (B) {
  1682.                 var A = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  1683.                 var D = "";
  1684.                 var C, y;
  1685.                 for (var z = 0; z < B.length * 4; z += 3) {
  1686.                     C = (((B[z >> 2] >> 8 * (z % 4)) & 255) << 16) | (((B[z + 1 >> 2] >> 8 * ((z + 1) % 4)) & 255) << 8) | ((B[z + 2 >> 2] >> 8 * ((z + 2) % 4)) & 255);
  1687.                     for (y = 0; y < 4; y++) {
  1688.                         if (z * 8 + y * 6 > B.length * 32) {
  1689.                             D += f
  1690.                         } else {
  1691.                             D += A.charAt((C >> 6 * (3 - y)) & 63)
  1692.                         }
  1693.                     }
  1694.                 }
  1695.                 return D
  1696.             };
  1697.         var j = function (D, A, z, y, C, B) {
  1698.                 return q(u(q(q(A, D), q(y, B)), C), z)
  1699.             };
  1700.         var r = function (A, z, E, D, y, C, B) {
  1701.                 return j((z & E) | ((~z) & D), A, z, y, C, B)
  1702.             };
  1703.         var h = function (A, z, E, D, y, C, B) {
  1704.                 return j((z & D) | (E & (~D)), A, z, y, C, B)
  1705.             };
  1706.         var t = function (A, z, E, D, y, C, B) {
  1707.                 return j(z ^ E ^ D, A, z, y, C, B)
  1708.             };
  1709.         var p = function (A, z, E, D, y, C, B) {
  1710.                 return j(E ^ (z | (~D)), A, z, y, C, B)
  1711.             };
  1712.         var m = function (I, D) {
  1713.                 I[D >> 5] |= 128 << ((D) % 32);
  1714.                 I[(((D + 64) >>> 9) << 4) + 14] = D;
  1715.                 var H = 1732584193;
  1716.                 var G = -271733879;
  1717.                 var F = -1732584194;
  1718.                 var E = 271733878;
  1719.                 var C, B, A, y;
  1720.                 for (var z = 0; z < I.length; z += 16) {
  1721.                     C = H;
  1722.                     B = G;
  1723.                     A = F;
  1724.                     y = E;
  1725.                     H = r(H, G, F, E, I[z + 0], 7, -680876936);
  1726.                     E = r(E, H, G, F, I[z + 1], 12, -389564586);
  1727.                     F = r(F, E, H, G, I[z + 2], 17, 606105819);
  1728.                     G = r(G, F, E, H, I[z + 3], 22, -1044525330);
  1729.                     H = r(H, G, F, E, I[z + 4], 7, -176418897);
  1730.                     E = r(E, H, G, F, I[z + 5], 12, 1200080426);
  1731.                     F = r(F, E, H, G, I[z + 6], 17, -1473231341);
  1732.                     G = r(G, F, E, H, I[z + 7], 22, -45705983);
  1733.                     H = r(H, G, F, E, I[z + 8], 7, 1770035416);
  1734.                     E = r(E, H, G, F, I[z + 9], 12, -1958414417);
  1735.                     F = r(F, E, H, G, I[z + 10], 17, -42063);
  1736.                     G = r(G, F, E, H, I[z + 11], 22, -1990404162);
  1737.                     H = r(H, G, F, E, I[z + 12], 7, 1804603682);
  1738.                     E = r(E, H, G, F, I[z + 13], 12, -40341101);
  1739.                     F = r(F, E, H, G, I[z + 14], 17, -1502002290);
  1740.                     G = r(G, F, E, H, I[z + 15], 22, 1236535329);
  1741.                     H = h(H, G, F, E, I[z + 1], 5, -165796510);
  1742.                     E = h(E, H, G, F, I[z + 6], 9, -1069501632);
  1743.                     F = h(F, E, H, G, I[z + 11], 14, 643717713);
  1744.                     G = h(G, F, E, H, I[z + 0], 20, -373897302);
  1745.                     H = h(H, G, F, E, I[z + 5], 5, -701558691);
  1746.                     E = h(E, H, G, F, I[z + 10], 9, 38016083);
  1747.                     F = h(F, E, H, G, I[z + 15], 14, -660478335);
  1748.                     G = h(G, F, E, H, I[z + 4], 20, -405537848);
  1749.                     H = h(H, G, F, E, I[z + 9], 5, 568446438);
  1750.                     E = h(E, H, G, F, I[z + 14], 9, -1019803690);
  1751.                     F = h(F, E, H, G, I[z + 3], 14, -187363961);
  1752.                     G = h(G, F, E, H, I[z + 8], 20, 1163531501);
  1753.                     H = h(H, G, F, E, I[z + 13], 5, -1444681467);
  1754.                     E = h(E, H, G, F, I[z + 2], 9, -51403784);
  1755.                     F = h(F, E, H, G, I[z + 7], 14, 1735328473);
  1756.                     G = h(G, F, E, H, I[z + 12], 20, -1926607734);
  1757.                     H = t(H, G, F, E, I[z + 5], 4, -378558);
  1758.                     E = t(E, H, G, F, I[z + 8], 11, -2022574463);
  1759.                     F = t(F, E, H, G, I[z + 11], 16, 1839030562);
  1760.                     G = t(G, F, E, H, I[z + 14], 23, -35309556);
  1761.                     H = t(H, G, F, E, I[z + 1], 4, -1530992060);
  1762.                     E = t(E, H, G, F, I[z + 4], 11, 1272893353);
  1763.                     F = t(F, E, H, G, I[z + 7], 16, -155497632);
  1764.                     G = t(G, F, E, H, I[z + 10], 23, -1094730640);
  1765.                     H = t(H, G, F, E, I[z + 13], 4, 681279174);
  1766.                     E = t(E, H, G, F, I[z + 0], 11, -358537222);
  1767.                     F = t(F, E, H, G, I[z + 3], 16, -722521979);
  1768.                     G = t(G, F, E, H, I[z + 6], 23, 76029189);
  1769.                     H = t(H, G, F, E, I[z + 9], 4, -640364487);
  1770.                     E = t(E, H, G, F, I[z + 12], 11, -421815835);
  1771.                     F = t(F, E, H, G, I[z + 15], 16, 530742520);
  1772.                     G = t(G, F, E, H, I[z + 2], 23, -995338651);
  1773.                     H = p(H, G, F, E, I[z + 0], 6, -198630844);
  1774.                     E = p(E, H, G, F, I[z + 7], 10, 1126891415);
  1775.                     F = p(F, E, H, G, I[z + 14], 15, -1416354905);
  1776.                     G = p(G, F, E, H, I[z + 5], 21, -57434055);
  1777.                     H = p(H, G, F, E, I[z + 12], 6, 1700485571);
  1778.                     E = p(E, H, G, F, I[z + 3], 10, -1894986606);
  1779.                     F = p(F, E, H, G, I[z + 10], 15, -1051523);
  1780.                     G = p(G, F, E, H, I[z + 1], 21, -2054922799);
  1781.                     H = p(H, G, F, E, I[z + 8], 6, 1873313359);
  1782.                     E = p(E, H, G, F, I[z + 15], 10, -30611744);
  1783.                     F = p(F, E, H, G, I[z + 6], 15, -1560198380);
  1784.                     G = p(G, F, E, H, I[z + 13], 21, 1309151649);
  1785.                     H = p(H, G, F, E, I[z + 4], 6, -145523070);
  1786.                     E = p(E, H, G, F, I[z + 11], 10, -1120210379);
  1787.                     F = p(F, E, H, G, I[z + 2], 15, 718787259);
  1788.                     G = p(G, F, E, H, I[z + 9], 21, -343485551);
  1789.                     H = q(H, C);
  1790.                     G = q(G, B);
  1791.                     F = q(F, A);
  1792.                     E = q(E, y)
  1793.                 }
  1794.                 return [H, G, F, E]
  1795.             };
  1796.         var l = function (A, D) {
  1797.                 var C = g(A);
  1798.                 if (C.length > 16) {
  1799.                     C = m(C, A.length * s)
  1800.                 }
  1801.                 var y = new Array(16),
  1802.                     B = new Array(16);
  1803.                 for (var z = 0; z < 16; z++) {
  1804.                     y[z] = C[z] ^ 909522486;
  1805.                     B[z] = C[z] ^ 1549556828
  1806.                 }
  1807.                 var E = m(y.concat(g(D)), 512 + D.length * s);
  1808.                 return m(B.concat(E), 512 + 128)
  1809.             };
  1810.         var o = {
  1811.             hexdigest: function (y) {
  1812.                 return x(m(g(y), y.length * s))
  1813.             },
  1814.             b64digest: function (y) {
  1815.                 return w(m(g(y), y.length * s))
  1816.             },
  1817.             hash: function (y) {
  1818.                 return n(m(g(y), y.length * s))
  1819.             },
  1820.             hmac_hexdigest: function (y, z) {
  1821.                 return x(l(y, z))
  1822.             },
  1823.             hmac_b64digest: function (y, z) {
  1824.                 return w(l(y, z))
  1825.             },
  1826.             hmac_hash: function (y, z) {
  1827.                 return n(l(y, z))
  1828.             },
  1829.             test: function () {
  1830.                 return b.hexdigest("abc") === "900150983cd24fb0d6963f7d28e17f72"
  1831.             }
  1832.         };
  1833.         return o
  1834.     })();
  1835.     if (!Function.prototype.bind) {
  1836.         Function.prototype.bind = function (g) {
  1837.             var f = this;
  1838.             return function () {
  1839.                 return f.apply(g, arguments)
  1840.             }
  1841.         }
  1842.     }
  1843.     if (!Function.prototype.prependArg) {
  1844.         Function.prototype.prependArg = function (f) {
  1845.             var g = this;
  1846.             return function () {
  1847.                 var j = [f];
  1848.                 for (var h = 0; h < arguments.length; h++) {
  1849.                     j.push(arguments[h])
  1850.                 }
  1851.                 return g.apply(this, j)
  1852.             }
  1853.         }
  1854.     }
  1855.     if (!Array.prototype.indexOf) {
  1856.         Array.prototype.indexOf = function (g) {
  1857.             var f = this.length;
  1858.             var h = Number(arguments[1]) || 0;
  1859.             h = (h < 0) ? Math.ceil(h) : Math.floor(h);
  1860.             if (h < 0) {
  1861.                 h += f
  1862.             }
  1863.             for (; h < f; h++) {
  1864.                 if (h in this && this[h] === g) {
  1865.                     return h
  1866.                 }
  1867.             }
  1868.             return -1
  1869.         }
  1870.     }(function (m) {
  1871.         var l;
  1872.  
  1873.         function h(o, n) {
  1874.             return new l.Builder(o, n)
  1875.         }
  1876.         function f(n) {
  1877.             return new l.Builder("message", n)
  1878.         }
  1879.         function j(n) {
  1880.             return new l.Builder("iq", n)
  1881.         }
  1882.         function g(n) {
  1883.             return new l.Builder("presence", n)
  1884.         }
  1885.         l = {
  1886.             VERSION: "1.0.1",
  1887.             NS: {
  1888.                 HTTPBIND: "http://jabber.org/protocol/httpbind",
  1889.                 BOSH: "urn:xmpp:xbosh",
  1890.                 CLIENT: "jabber:client",
  1891.                 AUTH: "jabber:iq:auth",
  1892.                 ROSTER: "jabber:iq:roster",
  1893.                 PROFILE: "jabber:iq:profile",
  1894.                 DISCO_INFO: "http://jabber.org/protocol/disco#info",
  1895.                 DISCO_ITEMS: "http://jabber.org/protocol/disco#items",
  1896.                 MUC: "http://jabber.org/protocol/muc",
  1897.                 SASL: "urn:ietf:params:xml:ns:xmpp-sasl",
  1898.                 STREAM: "http://etherx.jabber.org/streams",
  1899.                 BIND: "urn:ietf:params:xml:ns:xmpp-bind",
  1900.                 SESSION: "urn:ietf:params:xml:ns:xmpp-session",
  1901.                 VERSION: "jabber:iq:version",
  1902.                 STANZAS: "urn:ietf:params:xml:ns:xmpp-stanzas"
  1903.             },
  1904.             addNamespace: function (n, o) {
  1905.                 l.NS[n] = o
  1906.             },
  1907.             Status: {
  1908.                 ERROR: 0,
  1909.                 CONNECTING: 1,
  1910.                 CONNFAIL: 2,
  1911.                 AUTHENTICATING: 3,
  1912.                 AUTHFAIL: 4,
  1913.                 CONNECTED: 5,
  1914.                 DISCONNECTED: 6,
  1915.                 DISCONNECTING: 7,
  1916.                 ATTACHED: 8
  1917.             },
  1918.             LogLevel: {
  1919.                 DEBUG: 0,
  1920.                 INFO: 1,
  1921.                 WARN: 2,
  1922.                 ERROR: 3,
  1923.                 FATAL: 4
  1924.             },
  1925.             ElementType: {
  1926.                 NORMAL: 1,
  1927.                 TEXT: 3
  1928.             },
  1929.             TIMEOUT: 1.1,
  1930.             SECONDARY_TIMEOUT: 0.1,
  1931.             forEachChild: function (q, r, p) {
  1932.                 var o, n;
  1933.                 for (o = 0; o < q.childNodes.length; o++) {
  1934.                     n = q.childNodes[o];
  1935.                     if (n.nodeType == l.ElementType.NORMAL && (!r || this.isTagEqual(n, r))) {
  1936.                         p(n)
  1937.                     }
  1938.                 }
  1939.             },
  1940.             isTagEqual: function (o, n) {
  1941.                 return o.tagName.toLowerCase() == n.toLowerCase()
  1942.             },
  1943.             _xmlGenerator: null,
  1944.             _makeGenerator: function () {
  1945.                 var n;
  1946.                 if (window.ActiveXObject) {
  1947.                     n = new ActiveXObject("Microsoft.XMLDOM");
  1948.                     n.appendChild(n.createElement("strophe"))
  1949.                 } else {
  1950.                     n = document.implementation.createDocument("jabber:client", "strophe", null)
  1951.                 }
  1952.                 return n
  1953.             },
  1954.             xmlElement: function (p) {
  1955.                 if (!p) {
  1956.                     return null
  1957.                 }
  1958.                 var r = null;
  1959.                 if (!l._xmlGenerator) {
  1960.                     l._xmlGenerator = l._makeGenerator()
  1961.                 }
  1962.                 r = l._xmlGenerator.createElement(p);
  1963.                 var n, q, o;
  1964.                 for (n = 1; n < arguments.length; n++) {
  1965.                     if (!arguments[n]) {
  1966.                         continue
  1967.                     }
  1968.                     if (typeof (arguments[n]) == "string" || typeof (arguments[n]) == "number") {
  1969.                         r.appendChild(l.xmlTextNode(arguments[n]))
  1970.                     } else {
  1971.                         if (typeof (arguments[n]) == "object" && typeof (arguments[n].sort) == "function") {
  1972.                             for (q = 0; q < arguments[n].length; q++) {
  1973.                                 if (typeof (arguments[n][q]) == "object" && typeof (arguments[n][q].sort) == "function") {
  1974.                                     r.setAttribute(arguments[n][q][0], arguments[n][q][1])
  1975.                                 }
  1976.                             }
  1977.                         } else {
  1978.                             if (typeof (arguments[n]) == "object") {
  1979.                                 for (o in arguments[n]) {
  1980.                                     if (arguments[n].hasOwnProperty(o)) {
  1981.                                         r.setAttribute(o, arguments[n][o])
  1982.                                     }
  1983.                                 }
  1984.                             }
  1985.                         }
  1986.                     }
  1987.                 }
  1988.                 return r
  1989.             },
  1990.             xmlescape: function (n) {
  1991.                 n = n.replace(/\&/g, "&amp;");
  1992.                 n = n.replace(/</g, "&lt;");
  1993.                 n = n.replace(/>/g, "&gt;");
  1994.                 return n
  1995.             },
  1996.             xmlTextNode: function (n) {
  1997.                 n = l.xmlescape(n);
  1998.                 if (!l._xmlGenerator) {
  1999.                     l._xmlGenerator = l._makeGenerator()
  2000.                 }
  2001.                 return l._xmlGenerator.createTextNode(n)
  2002.             },
  2003.             getText: function (o) {
  2004.                 if (!o) {
  2005.                     return null
  2006.                 }
  2007.                 var p = "";
  2008.                 if (o.childNodes.length === 0 && o.nodeType == l.ElementType.TEXT) {
  2009.                     p += o.nodeValue
  2010.                 }
  2011.                 for (var n = 0; n < o.childNodes.length; n++) {
  2012.                     if (o.childNodes[n].nodeType == l.ElementType.TEXT) {
  2013.                         p += o.childNodes[n].nodeValue
  2014.                     }
  2015.                 }
  2016.                 return p
  2017.             },
  2018.             copyElement: function (p) {
  2019.                 var n, o;
  2020.                 if (p.nodeType == l.ElementType.NORMAL) {
  2021.                     o = l.xmlElement(p.tagName);
  2022.                     for (n = 0; n < p.attributes.length; n++) {
  2023.                         o.setAttribute(p.attributes[n].nodeName.toLowerCase(), p.attributes[n].value)
  2024.                     }
  2025.                     for (n = 0; n < p.childNodes.length; n++) {
  2026.                         o.appendChild(l.copyElement(p.childNodes[n]))
  2027.                     }
  2028.                 } else {
  2029.                     if (p.nodeType == l.ElementType.TEXT) {
  2030.                         o = l.xmlTextNode(p.nodeValue)
  2031.                     }
  2032.                 }
  2033.                 return o
  2034.             },
  2035.             escapeNode: function (n) {
  2036.                 return n.replace(/^\s+|\s+$/g, "").replace(/\\/g, "\\5c").replace(/ /g, "\\20").replace(/\"/g, "\\22").replace(/\&/g, "\\26").replace(/\'/g, "\\27").replace(/\//g, "\\2f").replace(/:/g, "\\3a").replace(/</g, "\\3c").replace(/>/g, "\\3e").replace(/@/g, "\\40")
  2037.             },
  2038.             unescapeNode: function (n) {
  2039.                 return n.replace(/\\20/g, " ").replace(/\\22/g, '"').replace(/\\26/g, "&").replace(/\\27/g, "'").replace(/\\2f/g, "/").replace(/\\3a/g, ":").replace(/\\3c/g, "<").replace(/\\3e/g, ">").replace(/\\40/g, "@").replace(/\\5c/g, "\\")
  2040.             },
  2041.             getNodeFromJid: function (n) {
  2042.                 if (n.indexOf("@") < 0) {
  2043.                     return null
  2044.                 }
  2045.                 return n.split("@")[0]
  2046.             },
  2047.             getDomainFromJid: function (n) {
  2048.                 var o = l.getBareJidFromJid(n);
  2049.                 if (o.indexOf("@") < 0) {
  2050.                     return o
  2051.                 } else {
  2052.                     var p = o.split("@");
  2053.                     p.splice(0, 1);
  2054.                     return p.join("@")
  2055.                 }
  2056.             },
  2057.             getResourceFromJid: function (n) {
  2058.                 var o = n.split("/");
  2059.                 if (o.length < 2) {
  2060.                     return null
  2061.                 }
  2062.                 o.splice(0, 1);
  2063.                 return o.join("/")
  2064.             },
  2065.             getBareJidFromJid: function (n) {
  2066.                 return n.split("/")[0]
  2067.             },
  2068.             log: function (o, n) {
  2069.                 return
  2070.             },
  2071.             debug: function (n) {
  2072.                 this.log(this.LogLevel.DEBUG, n)
  2073.             },
  2074.             info: function (n) {
  2075.                 this.log(this.LogLevel.INFO, n)
  2076.             },
  2077.             warn: function (n) {
  2078.                 this.log(this.LogLevel.WARN, n)
  2079.             },
  2080.             error: function (n) {
  2081.                 this.log(this.LogLevel.ERROR, n)
  2082.             },
  2083.             fatal: function (n) {
  2084.                 this.log(this.LogLevel.FATAL, n)
  2085.             },
  2086.             serialize: function (p) {
  2087.                 var n;
  2088.                 if (!p) {
  2089.                     return null
  2090.                 }
  2091.                 if (typeof (p.tree) === "function") {
  2092.                     p = p.tree()
  2093.                 }
  2094.                 var r = p.nodeName;
  2095.                 var o, q;
  2096.                 if (p.getAttribute("_realname")) {
  2097.                     r = p.getAttribute("_realname")
  2098.                 }
  2099.                 n = "<" + r;
  2100.                 for (o = 0; o < p.attributes.length; o++) {
  2101.                     if (p.attributes[o].nodeName != "_realname") {
  2102.                         n += " " + p.attributes[o].nodeName.toLowerCase() + "='" + p.attributes[o].value.replace("&", "&amp;").replace("'", "&apos;").replace("<", "&lt;") + "'"
  2103.                     }
  2104.                 }
  2105.                 if (p.childNodes.length > 0) {
  2106.                     n += ">";
  2107.                     for (o = 0; o < p.childNodes.length; o++) {
  2108.                         q = p.childNodes[o];
  2109.                         if (q.nodeType == l.ElementType.NORMAL) {
  2110.                             n += l.serialize(q)
  2111.                         } else {
  2112.                             if (q.nodeType == l.ElementType.TEXT) {
  2113.                                 n += q.nodeValue
  2114.                             }
  2115.                         }
  2116.                     }
  2117.                     n += "</" + r + ">"
  2118.                 } else {
  2119.                     n += "/>"
  2120.                 }
  2121.                 return n
  2122.             },
  2123.             _requestId: 0,
  2124.             _connectionPlugins: {},
  2125.             addConnectionPlugin: function (n, o) {
  2126.                 l._connectionPlugins[n] = o
  2127.             }
  2128.         };
  2129.         l.Builder = function (o, n) {
  2130.             if (o == "presence" || o == "message" || o == "iq") {
  2131.                 if (n && !n.xmlns) {
  2132.                     n.xmlns = l.NS.CLIENT
  2133.                 } else {
  2134.                     if (!n) {
  2135.                         n = {
  2136.                             xmlns: l.NS.CLIENT
  2137.                         }
  2138.                     }
  2139.                 }
  2140.             }
  2141.             this.nodeTree = l.xmlElement(o, n);
  2142.             this.node = this.nodeTree
  2143.         };
  2144.         l.Builder.prototype = {
  2145.             tree: function () {
  2146.                 return this.nodeTree
  2147.             },
  2148.             toString: function () {
  2149.                 return l.serialize(this.nodeTree)
  2150.             },
  2151.             up: function () {
  2152.                 this.node = this.node.parentNode;
  2153.                 return this
  2154.             },
  2155.             attrs: function (o) {
  2156.                 for (var n in o) {
  2157.                     if (o.hasOwnProperty(n)) {
  2158.                         this.node.setAttribute(n, o[n])
  2159.                     }
  2160.                 }
  2161.                 return this
  2162.             },
  2163.             c: function (o, n) {
  2164.                 var p = l.xmlElement(o, n);
  2165.                 this.node.appendChild(p);
  2166.                 this.node = p;
  2167.                 return this
  2168.             },
  2169.             cnode: function (n) {
  2170.                 this.node.appendChild(n);
  2171.                 this.node = n;
  2172.                 return this
  2173.             },
  2174.             t: function (n) {
  2175.                 var o = l.xmlTextNode(n);
  2176.                 this.node.appendChild(o);
  2177.                 return this
  2178.             }
  2179.         };
  2180.         l.Handler = function (r, q, o, p, t, s, n) {
  2181.             this.handler = r;
  2182.             this.ns = q;
  2183.             this.name = o;
  2184.             this.type = p;
  2185.             this.id = t;
  2186.             this.options = n || {
  2187.                 matchbare: false
  2188.             };
  2189.             if (!this.options.matchBare) {
  2190.                 this.options.matchBare = false
  2191.             }
  2192.             if (this.options.matchBare) {
  2193.                 this.from = l.getBareJidFromJid(s)
  2194.             } else {
  2195.                 this.from = s
  2196.             }
  2197.             this.user = true
  2198.         };
  2199.         l.Handler.prototype = {
  2200.             isMatch: function (o) {
  2201.                 var q;
  2202.                 var p = null;
  2203.                 if (this.options.matchBare) {
  2204.                     p = l.getBareJidFromJid(o.getAttribute("from"))
  2205.                 } else {
  2206.                     p = o.getAttribute("from")
  2207.                 }
  2208.                 q = false;
  2209.                 if (!this.ns) {
  2210.                     q = true
  2211.                 } else {
  2212.                     var n = this;
  2213.                     l.forEachChild(o, null, function (r) {
  2214.                         if (r.getAttribute("xmlns") == n.ns) {
  2215.                             q = true
  2216.                         }
  2217.                     });
  2218.                     q = q || o.getAttribute("xmlns") == this.ns
  2219.                 }
  2220.                 if (q && (!this.name || l.isTagEqual(o, this.name)) && (!this.type || o.getAttribute("type") === this.type) && (!this.id || o.getAttribute("id") === this.id) && (!this.from || p === this.from)) {
  2221.                     return true
  2222.                 }
  2223.                 return false
  2224.             },
  2225.             run: function (o) {
  2226.                 var n = null;
  2227.                 try {
  2228.                     n = this.handler(o)
  2229.                 } catch (p) {
  2230.                     if (p.sourceURL) {
  2231.                         l.fatal("error: " + this.handler + " " + p.sourceURL + ":" + p.line + " - " + p.name + ": " + p.message)
  2232.                     } else {
  2233.                         if (p.fileName) {
  2234.                             if (typeof (console) != "undefined") {
  2235.                                 console.trace();
  2236.                                 console.error(this.handler, " - error - ", p, p.message)
  2237.                             }
  2238.                             l.fatal("error: " + this.handler + " " + p.fileName + ":" + p.lineNumber + " - " + p.name + ": " + p.message)
  2239.                         } else {
  2240.                             l.fatal("error: " + this.handler)
  2241.                         }
  2242.                     }
  2243.                     throw p
  2244.                 }
  2245.                 return n
  2246.             },
  2247.             toString: function () {
  2248.                 return "{Handler: " + this.handler + "(" + this.name + "," + this.id + "," + this.ns + ")}"
  2249.             }
  2250.         };
  2251.         l.TimedHandler = function (o, n) {
  2252.             this.period = o;
  2253.             this.handler = n;
  2254.             this.lastCalled = new Date().getTime();
  2255.             this.user = true
  2256.         };
  2257.         l.TimedHandler.prototype = {
  2258.             run: function () {
  2259.                 this.lastCalled = new Date().getTime();
  2260.                 return this.handler()
  2261.             },
  2262.             reset: function () {
  2263.                 this.lastCalled = new Date().getTime()
  2264.             },
  2265.             toString: function () {
  2266.                 return "{TimedHandler: " + this.handler + "(" + this.period + ")}"
  2267.             }
  2268.         };
  2269.         l.Request = function (p, o, n, q) {
  2270.             this.id = ++l._requestId;
  2271.             this.xmlData = p;
  2272.             this.data = l.serialize(p);
  2273.             this.origFunc = o;
  2274.             this.func = o;
  2275.             this.rid = n;
  2276.             this.date = NaN;
  2277.             this.sends = q || 0;
  2278.             this.abort = false;
  2279.             this.dead = null;
  2280.             this.age = function () {
  2281.                 if (!this.date) {
  2282.                     return 0
  2283.                 }
  2284.                 var r = new Date();
  2285.                 return (r - this.date) / 1000
  2286.             };
  2287.             this.timeDead = function () {
  2288.                 if (!this.dead) {
  2289.                     return 0
  2290.                 }
  2291.                 var r = new Date();
  2292.                 return (r - this.dead) / 1000
  2293.             };
  2294.             this.xhr = this._newXHR()
  2295.         };
  2296.         l.Request.prototype = {
  2297.             getResponse: function () {
  2298.                 var n = null;
  2299.                 if (this.xhr.responseXML && this.xhr.responseXML.documentElement) {
  2300.                     n = this.xhr.responseXML.documentElement;
  2301.                     if (n.tagName == "parsererror") {
  2302.                         l.error("invalid response received");
  2303.                         l.error("responseText: " + this.xhr.responseText);
  2304.                         l.error("responseXML: " + l.serialize(this.xhr.responseXML));
  2305.                         throw "parsererror"
  2306.                     }
  2307.                 } else {
  2308.                     if (this.xhr.responseText) {
  2309.                         l.error("invalid response received");
  2310.                         l.error("responseText: " + this.xhr.responseText);
  2311.                         l.error("responseXML: " + l.serialize(this.xhr.responseXML))
  2312.                     }
  2313.                 }
  2314.                 return n
  2315.             },
  2316.             _newXHR: function () {
  2317.                 var n = null;
  2318.                 if (window.XMLHttpRequest) {
  2319.                     n = new XMLHttpRequest();
  2320.                     if (n.overrideMimeType) {
  2321.                         n.overrideMimeType("text/xml")
  2322.                     }
  2323.                 } else {
  2324.                     if (window.ActiveXObject) {
  2325.                         n = new ActiveXObject("Microsoft.XMLHTTP")
  2326.                     }
  2327.                 }
  2328.                 n.onreadystatechange = this.func.prependArg(this);
  2329.                 return n
  2330.             }
  2331.         };
  2332.         l.Connection = function (n) {
  2333.             this.service = n;
  2334.             this.jid = "";
  2335.             this.rid = Math.floor(Math.random() * 4294967295);
  2336.             this.sid = null;
  2337.             this.streamId = null;
  2338.             this.do_session = false;
  2339.             this.do_bind = false;
  2340.             this.timedHandlers = [];
  2341.             this.handlers = [];
  2342.             this.removeTimeds = [];
  2343.             this.removeHandlers = [];
  2344.             this.addTimeds = [];
  2345.             this.addHandlers = [];
  2346.             this._idleTimeout = null;
  2347.             this._disconnectTimeout = null;
  2348.             this.authenticated = false;
  2349.             this.disconnecting = false;
  2350.             this.connected = false;
  2351.             this.errors = 0;
  2352.             this.paused = false;
  2353.             this.hold = 1;
  2354.             this.wait = 60;
  2355.             this.window = 5;
  2356.             this._data = [];
  2357.             this._requests = [];
  2358.             this._uniqueId = Math.round(Math.random() * 10000);
  2359.             this._sasl_success_handler = null;
  2360.             this._sasl_failure_handler = null;
  2361.             this._sasl_challenge_handler = null;
  2362.             this._idleTimeout = setTimeout(this._onIdle.bind(this), 100);
  2363.             for (var o in l._connectionPlugins) {
  2364.                 if (l._connectionPlugins.hasOwnProperty(o)) {
  2365.                     var q = l._connectionPlugins[o];
  2366.                     var p = function () {};
  2367.                     p.prototype = q;
  2368.                     this[o] = new p();
  2369.                     this[o].init(this)
  2370.                 }
  2371.             }
  2372.         };
  2373.         l.Connection.prototype = {
  2374.             reset: function () {
  2375.                 this.rid = Math.floor(Math.random() * 4294967295);
  2376.                 this.sid = null;
  2377.                 this.streamId = null;
  2378.                 this.do_session = false;
  2379.                 this.do_bind = false;
  2380.                 this.timedHandlers = [];
  2381.                 this.handlers = [];
  2382.                 this.removeTimeds = [];
  2383.                 this.removeHandlers = [];
  2384.                 this.addTimeds = [];
  2385.                 this.addHandlers = [];
  2386.                 this.authenticated = false;
  2387.                 this.disconnecting = false;
  2388.                 this.connected = false;
  2389.                 this.errors = 0;
  2390.                 this._requests = [];
  2391.                 this._uniqueId = Math.round(Math.random() * 10000)
  2392.             },
  2393.             pause: function () {
  2394.                 this.paused = true
  2395.             },
  2396.             resume: function () {
  2397.                 this.paused = false
  2398.             },
  2399.             getUniqueId: function (n) {
  2400.                 if (typeof (n) == "string" || typeof (n) == "number") {
  2401.                     return ++this._uniqueId + ":" + n
  2402.                 } else {
  2403.                     return ++this._uniqueId + ""
  2404.                 }
  2405.             },
  2406.             connect: function (o, p, s, r, q) {
  2407.                 this.jid = o;
  2408.                 this.pass = p;
  2409.                 this.connect_callback = s;
  2410.                 this.disconnecting = false;
  2411.                 this.connected = false;
  2412.                 this.authenticated = false;
  2413.                 this.errors = 0;
  2414.                 this.wait = r || this.wait;
  2415.                 this.hold = q || this.hold;
  2416.                 this.domain = l.getDomainFromJid(this.jid);
  2417.                 var n = this._buildBody().attrs({
  2418.                     to: this.domain,
  2419.                     "xml:lang": "en",
  2420.                     wait: this.wait,
  2421.                     hold: this.hold,
  2422.                     content: "text/xml; charset=utf-8",
  2423.                     ver: "1.6",
  2424.                     "xmpp:version": "1.0",
  2425.                     "xmlns:xmpp": l.NS.BOSH
  2426.                 });
  2427.                 this._changeConnectStatus(l.Status.CONNECTING, null);
  2428.                 this._requests.push(new l.Request(n.tree(), this._onRequestStateChange.bind(this).prependArg(this._connect_cb.bind(this)), n.tree().getAttribute("rid")));
  2429.                 this._throttledRequestHandler()
  2430.             },
  2431.             attach: function (p, n, q, t, s, r, o) {
  2432.                 this.jid = p;
  2433.                 this.sid = n;
  2434.                 this.rid = q;
  2435.                 this.connect_callback = t;
  2436.                 this.domain = l.getDomainFromJid(this.jid);
  2437.                 this.authenticated = true;
  2438.                 this.connected = true;
  2439.                 this.wait = s || this.wait;
  2440.                 this.hold = r || this.hold;
  2441.                 this.window = o || this.window;
  2442.                 this._changeConnectStatus(l.Status.ATTACHED, null)
  2443.             },
  2444.             xmlInput: function (n) {
  2445.                 return
  2446.             },
  2447.             xmlOutput: function (n) {
  2448.                 return
  2449.             },
  2450.             rawInput: function (n) {
  2451.                 return
  2452.             },
  2453.             rawOutput: function (n) {
  2454.                 return
  2455.             },
  2456.             send: function (o) {
  2457.                 if (o === null) {
  2458.                     return
  2459.                 }
  2460.                 if (typeof (o.sort) === "function") {
  2461.                     for (var n = 0; n < o.length; n++) {
  2462.                         this._queueData(o[n])
  2463.                     }
  2464.                 } else {
  2465.                     if (typeof (o.tree) === "function") {
  2466.                         this._queueData(o.tree())
  2467.                     } else {
  2468.                         this._queueData(o)
  2469.                     }
  2470.                 }
  2471.                 this._throttledRequestHandler();
  2472.                 clearTimeout(this._idleTimeout);
  2473.                 this._idleTimeout = setTimeout(this._onIdle.bind(this), 100)
  2474.             },
  2475.             flush: function () {
  2476.                 clearTimeout(this._idleTimeout);
  2477.                 this._onIdle()
  2478.             },
  2479.             sendIQ: function (q, u, n, r) {
  2480.                 var s = null;
  2481.                 var p = this;
  2482.                 if (typeof (q.tree) === "function") {
  2483.                     q = q.tree()
  2484.                 }
  2485.                 var t = q.getAttribute("id");
  2486.                 if (!t) {
  2487.                     t = this.getUniqueId("sendIQ");
  2488.                     q.setAttribute("id", t)
  2489.                 }
  2490.                 var o = this.addHandler(function (w) {
  2491.                     if (s) {
  2492.                         p.deleteTimedHandler(s)
  2493.                     }
  2494.                     var v = w.getAttribute("type");
  2495.                     if (v === "result") {
  2496.                         if (u) {
  2497.                             u(w)
  2498.                         }
  2499.                     } else {
  2500.                         if (v === "error") {
  2501.                             if (n) {
  2502.                                 n(w)
  2503.                             }
  2504.                         } else {
  2505.                             throw {
  2506.                                 name: "StropheError",
  2507.                                 message: "Got bad IQ type of " + v
  2508.                             }
  2509.                         }
  2510.                     }
  2511.                 }, null, "iq", null, t);
  2512.                 if (r) {
  2513.                     s = this.addTimedHandler(r, function () {
  2514.                         p.deleteHandler(o);
  2515.                         if (n) {
  2516.                             n(null)
  2517.                         }
  2518.                         return false
  2519.                     })
  2520.                 }
  2521.                 this.send(q);
  2522.                 return t
  2523.             },
  2524.             _queueData: function (n) {
  2525.                 if (n === null || !n.tagName || !n.childNodes) {
  2526.                     throw {
  2527.                         name: "StropheError",
  2528.                         message: "Cannot queue non-DOMElement."
  2529.                     }
  2530.                 }
  2531.                 this._data.push(n)
  2532.             },
  2533.             _sendRestart: function () {
  2534.                 this._data.push("restart");
  2535.                 this._throttledRequestHandler();
  2536.                 clearTimeout(this._idleTimeout);
  2537.                 this._idleTimeout = setTimeout(this._onIdle.bind(this), 100)
  2538.             },
  2539.             addTimedHandler: function (p, o) {
  2540.                 var n = new l.TimedHandler(p, o);
  2541.                 this.addTimeds.push(n);
  2542.                 return n
  2543.             },
  2544.             deleteTimedHandler: function (n) {
  2545.                 this.removeTimeds.push(n)
  2546.             },
  2547.             addHandler: function (s, r, p, q, u, t, o) {
  2548.                 var n = new l.Handler(s, r, p, q, u, t, o);
  2549.                 this.addHandlers.push(n);
  2550.                 return n
  2551.             },
  2552.             deleteHandler: function (n) {
  2553.                 this.removeHandlers.push(n)
  2554.             },
  2555.             disconnect: function (n) {
  2556.                 this._changeConnectStatus(l.Status.DISCONNECTING, n);
  2557.                 l.info("Disconnect was called because: " + n);
  2558.                 if (this.connected) {
  2559.                     this._disconnectTimeout = this._addSysTimedHandler(30000, this._onDisconnectTimeout.bind(this));
  2560.                     this._sendTerminate()
  2561.                 }
  2562.             },
  2563.             _changeConnectStatus: function (n, s) {
  2564.                 for (var o in l._connectionPlugins) {
  2565.                     if (l._connectionPlugins.hasOwnProperty(o)) {
  2566.                         var q = this[o];
  2567.                         if (q.statusChanged) {
  2568.                             try {
  2569.                                 q.statusChanged(n, s)
  2570.                             } catch (p) {
  2571.                                 l.error("" + o + " plugin caused an exception changing status: " + p)
  2572.                             }
  2573.                         }
  2574.                     }
  2575.                 }
  2576.                 if (this.connect_callback) {
  2577.                     try {
  2578.                         this.connect_callback(n, s)
  2579.                     } catch (r) {
  2580.                         l.error("User connection callback caused an exception: " + r)
  2581.                     }
  2582.                 }
  2583.             },
  2584.             _buildBody: function () {
  2585.                 var n = h("body", {
  2586.                     rid: this.rid++,
  2587.                     xmlns: l.NS.HTTPBIND
  2588.                 });
  2589.                 if (this.sid !== null) {
  2590.                     n.attrs({
  2591.                         sid: this.sid
  2592.                     })
  2593.                 }
  2594.                 return n
  2595.             },
  2596.             _removeRequest: function (o) {
  2597.                 l.debug("removing request");
  2598.                 var n;
  2599.                 for (n = this._requests.length - 1; n >= 0; n--) {
  2600.                     if (o == this._requests[n]) {
  2601.                         this._requests.splice(n, 1)
  2602.                     }
  2603.                 }
  2604.                 o.xhr.onreadystatechange = function () {};
  2605.                 this._throttledRequestHandler()
  2606.             },
  2607.             _restartRequest: function (n) {
  2608.                 var o = this._requests[n];
  2609.                 if (o.dead === null) {
  2610.                     o.dead = new Date()
  2611.                 }
  2612.                 this._processRequest(n)
  2613.             },
  2614.             _processRequest: function (p) {
  2615.                 var u = this._requests[p];
  2616.                 var x = -1;
  2617.                 try {
  2618.                     if (u.xhr.readyState == 4) {
  2619.                         x = u.xhr.status
  2620.                     }
  2621.                 } catch (s) {
  2622.                     l.error("caught an error in _requests[" + p + "], reqStatus: " + x)
  2623.                 }
  2624.                 if (typeof (x) == "undefined") {
  2625.                     x = -1
  2626.                 }
  2627.                 var o = u.age();
  2628.                 var n = (!isNaN(o) && o > Math.floor(l.TIMEOUT * this.wait));
  2629.                 var q = (u.dead !== null && u.timeDead() > Math.floor(l.SECONDARY_TIMEOUT * this.wait));
  2630.                 var w = (u.xhr.readyState == 4 && (x < 1 || x >= 500));
  2631.                 if (n || q || w) {
  2632.                     if (q) {
  2633.                         l.error("Request " + this._requests[p].id + " timed out (secondary), restarting")
  2634.                     }
  2635.                     u.abort = true;
  2636.                     u.xhr.abort();
  2637.                     u.xhr.onreadystatechange = function () {};
  2638.                     this._requests[p] = new l.Request(u.xmlData, u.origFunc, u.rid, u.sends);
  2639.                     u = this._requests[p]
  2640.                 }
  2641.                 if (u.xhr.readyState === 0) {
  2642.                     l.debug("request id " + u.id + "." + u.sends + " posting");
  2643.                     u.date = new Date();
  2644.                     try {
  2645.                         u.xhr.open("POST", this.service, true)
  2646.                     } catch (t) {
  2647.                         l.error("XHR open failed.");
  2648.                         if (!this.connected) {
  2649.                             this._changeConnectStatus(l.Status.CONNFAIL, "bad-service")
  2650.                         }
  2651.                         this.disconnect();
  2652.                         return
  2653.                     }
  2654.                     var v = function () {
  2655.                             u.xhr.send(u.data)
  2656.                         };
  2657.                     if (u.sends > 1) {
  2658.                         var r = Math.pow(u.sends, 3) * 1000;
  2659.                         setTimeout(v, r)
  2660.                     } else {
  2661.                         v()
  2662.                     }
  2663.                     u.sends++;
  2664.                     this.xmlOutput(u.xmlData);
  2665.                     this.rawOutput(u.data)
  2666.                 } else {
  2667.                     l.debug("_processRequest: " + (p === 0 ? "first" : "second") + " request has readyState of " + u.xhr.readyState)
  2668.                 }
  2669.             },
  2670.             _throttledRequestHandler: function () {
  2671.                 if (!this._requests) {
  2672.                     l.debug("_throttledRequestHandler called with undefined requests")
  2673.                 } else {
  2674.                     l.debug("_throttledRequestHandler called with " + this._requests.length + " requests")
  2675.                 }
  2676.                 if (!this._requests || this._requests.length === 0) {
  2677.                     return
  2678.                 }
  2679.                 if (this._requests.length > 0) {
  2680.                     this._processRequest(0)
  2681.                 }
  2682.                 if (this._requests.length > 1 && Math.abs(this._requests[0].rid - this._requests[1].rid) < this.window - 1) {
  2683.                     this._processRequest(1)
  2684.                 }
  2685.             },
  2686.             _onRequestStateChange: function (q, p) {
  2687.                 l.debug("request id " + p.id + "." + p.sends + " state changed to " + p.xhr.readyState);
  2688.                 if (p.abort) {
  2689.                     p.abort = false;
  2690.                     return
  2691.                 }
  2692.                 var o;
  2693.                 if (p.xhr.readyState == 4) {
  2694.                     o = 0;
  2695.                     try {
  2696.                         o = p.xhr.status
  2697.                     } catch (r) {}
  2698.                     if (typeof (o) == "undefined") {
  2699.                         o = 0
  2700.                     }
  2701.                     if (this.disconnecting) {
  2702.                         if (o >= 400) {
  2703.                             this._hitError(o);
  2704.                             return
  2705.                         }
  2706.                     }
  2707.                     var n = (this._requests[0] == p);
  2708.                     var s = (this._requests[1] == p);
  2709.                     if ((o > 0 && o < 500) || p.sends > 5) {
  2710.                         this._removeRequest(p);
  2711.                         l.debug("request id " + p.id + " should now be removed")
  2712.                     }
  2713.                     if (o == 200) {
  2714.                         if (s || (n && this._requests.length > 0 && this._requests[0].age() > Math.floor(l.SECONDARY_TIMEOUT * this.wait))) {
  2715.                             this._restartRequest(0)
  2716.                         }
  2717.                         l.debug("request id " + p.id + "." + p.sends + " got 200");
  2718.                         q(p);
  2719.                         this.errors = 0
  2720.                     } else {
  2721.                         l.error("request id " + p.id + "." + p.sends + " error " + o + " happened");
  2722.                         if (o === 0 || (o >= 400 && o < 600) || o >= 12000) {
  2723.                             this._hitError(o);
  2724.                             if (o >= 400 && o < 500) {
  2725.                                 this._changeConnectStatus(l.Status.DISCONNECTING, null);
  2726.                                 this._doDisconnect()
  2727.                             }
  2728.                         }
  2729.                     }
  2730.                     if (!((o > 0 && o < 10000) || p.sends > 5)) {
  2731.                         this._throttledRequestHandler()
  2732.                     }
  2733.                 }
  2734.             },
  2735.             _hitError: function (n) {
  2736.                 this.errors++;
  2737.                 l.warn("request errored, status: " + n + ", number of errors: " + this.errors);
  2738.                 if (this.errors > 4) {
  2739.                     this._onDisconnectTimeout()
  2740.                 }
  2741.             },
  2742.             _doDisconnect: function () {
  2743.                 l.info("_doDisconnect was called");
  2744.                 this.authenticated = false;
  2745.                 this.disconnecting = false;
  2746.                 this.sid = null;
  2747.                 this.streamId = null;
  2748.                 this.rid = Math.floor(Math.random() * 4294967295);
  2749.                 if (this.connected) {
  2750.                     this._changeConnectStatus(l.Status.DISCONNECTED, null);
  2751.                     this.connected = false
  2752.                 }
  2753.                 this.handlers = [];
  2754.                 this.timedHandlers = [];
  2755.                 this.removeTimeds = [];
  2756.                 this.removeHandlers = [];
  2757.                 this.addTimeds = [];
  2758.                 this.addHandlers = []
  2759.             },
  2760.             _dataRecv: function (v) {
  2761.                 try {
  2762.                     var n = v.getResponse()
  2763.                 } catch (t) {
  2764.                     if (t != "parsererror") {
  2765.                         throw t
  2766.                     }
  2767.                     this.disconnect("strophe-parsererror")
  2768.                 }
  2769.                 if (n === null) {
  2770.                     return
  2771.                 }
  2772.                 this.xmlInput(n);
  2773.                 this.rawInput(l.serialize(n));
  2774.                 var r, p;
  2775.                 while (this.removeHandlers.length > 0) {
  2776.                     p = this.removeHandlers.pop();
  2777.                     r = this.handlers.indexOf(p);
  2778.                     if (r >= 0) {
  2779.                         this.handlers.splice(r, 1)
  2780.                     }
  2781.                 }
  2782.                 while (this.addHandlers.length > 0) {
  2783.                     this.handlers.push(this.addHandlers.pop())
  2784.                 }
  2785.                 if (this.disconnecting && this._requests.length === 0) {
  2786.                     this.deleteTimedHandler(this._disconnectTimeout);
  2787.                     this._disconnectTimeout = null;
  2788.                     this._doDisconnect();
  2789.                     return
  2790.                 }
  2791.                 var o = n.getAttribute("type");
  2792.                 var u, q;
  2793.                 if (o !== null && o == "terminate") {
  2794.                     u = n.getAttribute("condition");
  2795.                     q = n.getElementsByTagName("conflict");
  2796.                     if (u !== null) {
  2797.                         if (u == "remote-stream-error" && q.length > 0) {
  2798.                             u = "conflict"
  2799.                         }
  2800.                         this._changeConnectStatus(l.Status.CONNFAIL, u)
  2801.                     } else {
  2802.                         this._changeConnectStatus(l.Status.CONNFAIL, "unknown")
  2803.                     }
  2804.                     this.disconnect();
  2805.                     return
  2806.                 }
  2807.                 var s = this;
  2808.                 l.forEachChild(n, null, function (z) {
  2809.                     var x, y;
  2810.                     y = s.handlers;
  2811.                     s.handlers = [];
  2812.                     for (x = 0; x < y.length; x++) {
  2813.                         var w = y[x];
  2814.                         if (w.isMatch(z) && (s.authenticated || !w.user)) {
  2815.                             if (w.run(z)) {
  2816.                                 s.handlers.push(w)
  2817.                             }
  2818.                         } else {
  2819.                             s.handlers.push(w)
  2820.                         }
  2821.                     }
  2822.                 })
  2823.             },
  2824.             _sendTerminate: function () {
  2825.                 l.info("_sendTerminate was called");
  2826.                 var n = this._buildBody().attrs({
  2827.                     type: "terminate"
  2828.                 });
  2829.                 if (this.authenticated) {
  2830.                     n.c("presence", {
  2831.                         xmlns: l.NS.CLIENT,
  2832.                         type: "unavailable"
  2833.                     })
  2834.                 }
  2835.                 this.disconnecting = true;
  2836.                 var o = new l.Request(n.tree(), this._onRequestStateChange.bind(this).prependArg(this._dataRecv.bind(this)), n.tree().getAttribute("rid"));
  2837.                 this._requests.push(o);
  2838.                 this._throttledRequestHandler()
  2839.             },
  2840.             _connect_cb: function (B) {
  2841.                 l.info("_connect_cb was called");
  2842.                 this.connected = true;
  2843.                 var o = B.getResponse();
  2844.                 if (!o) {
  2845.                     return
  2846.                 }
  2847.                 this.xmlInput(o);
  2848.                 this.rawInput(l.serialize(o));
  2849.                 var s = o.getAttribute("type");
  2850.                 var A, u;
  2851.                 if (s !== null && s == "terminate") {
  2852.                     A = o.getAttribute("condition");
  2853.                     u = o.getElementsByTagName("conflict");
  2854.                     if (A !== null) {
  2855.                         if (A == "remote-stream-error" && u.length > 0) {
  2856.                             A = "conflict"
  2857.                         }
  2858.                         this._changeConnectStatus(l.Status.CONNFAIL, A)
  2859.                     } else {
  2860.                         this._changeConnectStatus(l.Status.CONNFAIL, "unknown")
  2861.                     }
  2862.                     return
  2863.                 }
  2864.                 if (!this.sid) {
  2865.                     this.sid = o.getAttribute("sid")
  2866.                 }
  2867.                 if (!this.stream_id) {
  2868.                     this.stream_id = o.getAttribute("authid")
  2869.                 }
  2870.                 var p = o.getAttribute("requests");
  2871.                 if (p) {
  2872.                     this.window = parseInt(p, 10)
  2873.                 }
  2874.                 var n = o.getAttribute("hold");
  2875.                 if (n) {
  2876.                     this.hold = parseInt(n, 10)
  2877.                 }
  2878.                 var w = o.getAttribute("wait");
  2879.                 if (w) {
  2880.                     this.wait = parseInt(w, 10)
  2881.                 }
  2882.                 var C = false;
  2883.                 var r = false;
  2884.                 var z = false;
  2885.                 var D = o.getElementsByTagName("mechanism");
  2886.                 var t, y, v, q;
  2887.                 if (D.length > 0) {
  2888.                     for (t = 0; t < D.length; t++) {
  2889.                         y = l.getText(D[t]);
  2890.                         if (y == "DIGEST-MD5") {
  2891.                             r = true
  2892.                         } else {
  2893.                             if (y == "PLAIN") {
  2894.                                 C = true
  2895.                             } else {
  2896.                                 if (y == "ANONYMOUS") {
  2897.                                     z = true
  2898.                                 }
  2899.                             }
  2900.                         }
  2901.                     }
  2902.                 } else {
  2903.                     var x = this._buildBody();
  2904.                     this._requests.push(new l.Request(x.tree(), this._onRequestStateChange.bind(this).prependArg(this._connect_cb.bind(this)), x.tree().getAttribute("rid")));
  2905.                     this._throttledRequestHandler();
  2906.                     return
  2907.                 }
  2908.                 if (l.getNodeFromJid(this.jid) === null && z) {
  2909.                     this._changeConnectStatus(l.Status.AUTHENTICATING, null);
  2910.                     this._sasl_success_handler = this._addSysHandler(this._sasl_success_cb.bind(this), null, "success", null, null);
  2911.                     this._sasl_failure_handler = this._addSysHandler(this._sasl_failure_cb.bind(this), null, "failure", null, null);
  2912.                     this.send(h("auth", {
  2913.                         xmlns: l.NS.SASL,
  2914.                         mechanism: "ANONYMOUS"
  2915.                     }).tree())
  2916.                 } else {
  2917.                     if (l.getNodeFromJid(this.jid) === null) {
  2918.                         this._changeConnectStatus(l.Status.CONNFAIL, "x-strophe-bad-non-anon-jid");
  2919.                         this.disconnect()
  2920.                     } else {
  2921.                         if (r) {
  2922.                             this._changeConnectStatus(l.Status.AUTHENTICATING, null);
  2923.                             this._sasl_challenge_handler = this._addSysHandler(this._sasl_challenge1_cb.bind(this), null, "challenge", null, null);
  2924.                             this._sasl_failure_handler = this._addSysHandler(this._sasl_failure_cb.bind(this), null, "failure", null, null);
  2925.                             this.send(h("auth", {
  2926.                                 xmlns: l.NS.SASL,
  2927.                                 mechanism: "DIGEST-MD5"
  2928.                             }).tree())
  2929.                         } else {
  2930.                             if (C) {
  2931.                                 v = l.getBareJidFromJid(this.jid);
  2932.                                 v = v + "\u0000";
  2933.                                 v = v + l.getNodeFromJid(this.jid);
  2934.                                 v = v + "\u0000";
  2935.                                 v = v + this.pass;
  2936.                                 this._changeConnectStatus(l.Status.AUTHENTICATING, null);
  2937.                                 this._sasl_success_handler = this._addSysHandler(this._sasl_success_cb.bind(this), null, "success", null, null);
  2938.                                 this._sasl_failure_handler = this._addSysHandler(this._sasl_failure_cb.bind(this), null, "failure", null, null);
  2939.                                 q = e.encode(v);
  2940.                                 this.send(h("auth", {
  2941.                                     xmlns: l.NS.SASL,
  2942.                                     mechanism: "PLAIN"
  2943.                                 }).t(q).tree())
  2944.                             } else {
  2945.                                 this._changeConnectStatus(l.Status.AUTHENTICATING, null);
  2946.                                 this._addSysHandler(this._auth1_cb.bind(this), null, null, null, "_auth_1");
  2947.                                 this.send(j({
  2948.                                     type: "get",
  2949.                                     to: this.domain,
  2950.                                     id: "_auth_1"
  2951.                                 }).c("query", {
  2952.                                     xmlns: l.NS.AUTH
  2953.                                 }).c("username", {}).t(l.getNodeFromJid(this.jid)).tree())
  2954.                             }
  2955.                         }
  2956.                     }
  2957.                 }
  2958.             },
  2959.             _sasl_challenge1_cb: function (r) {
  2960.                 var o = /([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/;
  2961.                 var x = e.decode(l.getText(r));
  2962.                 var y = b.hexdigest(Math.random() * 1234567890);
  2963.                 var u = "";
  2964.                 var z = null;
  2965.                 var v = "";
  2966.                 var n = "";
  2967.                 var t;
  2968.                 this.deleteHandler(this._sasl_failure_handler);
  2969.                 while (x.match(o)) {
  2970.                     t = x.match(o);
  2971.                     x = x.replace(t[0], "");
  2972.                     t[2] = t[2].replace(/^"(.+)"$/, "$1");
  2973.                     switch (t[1]) {
  2974.                     case "realm":
  2975.                         u = t[2];
  2976.                         break;
  2977.                     case "nonce":
  2978.                         v = t[2];
  2979.                         break;
  2980.                     case "qop":
  2981.                         n = t[2];
  2982.                         break;
  2983.                     case "host":
  2984.                         z = t[2];
  2985.                         break
  2986.                     }
  2987.                 }
  2988.                 var s = "xmpp/" + this.domain;
  2989.                 if (z !== null) {
  2990.                     s = s + "/" + z
  2991.                 }
  2992.                 var q = b.hash(l.getNodeFromJid(this.jid) + ":" + u + ":" + this.pass) + ":" + v + ":" + y;
  2993.                 var p = "AUTHENTICATE:" + s;
  2994.                 var w = "";
  2995.                 w += "username=" + this._quote(l.getNodeFromJid(this.jid)) + ",";
  2996.                 w += "realm=" + this._quote(u) + ",";
  2997.                 w += "nonce=" + this._quote(v) + ",";
  2998.                 w += "cnonce=" + this._quote(y) + ",";
  2999.                 w += 'nc="00000001",';
  3000.                 w += 'qop="auth",';
  3001.                 w += "digest-uri=" + this._quote(s) + ",";
  3002.                 w += "response=" + this._quote(b.hexdigest(b.hexdigest(q) + ":" + v + ":00000001:" + y + ":auth:" + b.hexdigest(p))) + ",";
  3003.                 w += 'charset="utf-8"';
  3004.                 this._sasl_challenge_handler = this._addSysHandler(this._sasl_challenge2_cb.bind(this), null, "challenge", null, null);
  3005.                 this._sasl_success_handler = this._addSysHandler(this._sasl_success_cb.bind(this), null, "success", null, null);
  3006.                 this._sasl_failure_handler = this._addSysHandler(this._sasl_failure_cb.bind(this), null, "failure", null, null);
  3007.                 this.send(h("response", {
  3008.                     xmlns: l.NS.SASL
  3009.                 }).t(e.encode(w)).tree());
  3010.                 return false
  3011.             },
  3012.             _quote: function (n) {
  3013.                 return '"' + n.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"'
  3014.             },
  3015.             _sasl_challenge2_cb: function (n) {
  3016.                 this.deleteHandler(this._sasl_success_handler);
  3017.                 this.deleteHandler(this._sasl_failure_handler);
  3018.                 this._sasl_success_handler = this._addSysHandler(this._sasl_success_cb.bind(this), null, "success", null, null);
  3019.                 this._sasl_failure_handler = this._addSysHandler(this._sasl_failure_cb.bind(this), null, "failure", null, null);
  3020.                 this.send(h("response", {
  3021.                     xmlns: l.NS.SASL
  3022.                 }).tree());
  3023.                 return false
  3024.             },
  3025.             _auth1_cb: function (n) {
  3026.                 var o = j({
  3027.                     type: "set",
  3028.                     id: "_auth_2"
  3029.                 }).c("query", {
  3030.                     xmlns: l.NS.AUTH
  3031.                 }).c("username", {}).t(l.getNodeFromJid(this.jid)).up().c("password").t(this.pass);
  3032.                 if (!l.getResourceFromJid(this.jid)) {
  3033.                     this.jid = l.getBareJidFromJid(this.jid) + "/strophe"
  3034.                 }
  3035.                 o.up().c("resource", {}).t(l.getResourceFromJid(this.jid));
  3036.                 this._addSysHandler(this._auth2_cb.bind(this), null, null, null, "_auth_2");
  3037.                 this.send(o.tree());
  3038.                 return false
  3039.             },
  3040.             _sasl_success_cb: function (n) {
  3041.                 l.info("SASL authentication succeeded.");
  3042.                 this.deleteHandler(this._sasl_failure_handler);
  3043.                 this._sasl_failure_handler = null;
  3044.                 if (this._sasl_challenge_handler) {
  3045.                     this.deleteHandler(this._sasl_challenge_handler);
  3046.                     this._sasl_challenge_handler = null
  3047.                 }
  3048.                 this._addSysHandler(this._sasl_auth1_cb.bind(this), null, "stream:features", null, null);
  3049.                 this._sendRestart();
  3050.                 return false
  3051.             },
  3052.             _sasl_auth1_cb: function (o) {
  3053.                 var n, q;
  3054.                 for (n = 0; n < o.childNodes.length; n++) {
  3055.                     q = o.childNodes[n];
  3056.                     if (q.nodeName == "bind") {
  3057.                         this.do_bind = true
  3058.                     }
  3059.                     if (q.nodeName == "session") {
  3060.                         this.do_session = true
  3061.                     }
  3062.                 }
  3063.                 if (!this.do_bind) {
  3064.                     this._changeConnectStatus(l.Status.AUTHFAIL, null);
  3065.                     return false
  3066.                 } else {
  3067.                     this._addSysHandler(this._sasl_bind_cb.bind(this), null, null, null, "_bind_auth_2");
  3068.                     var p = l.getResourceFromJid(this.jid);
  3069.                     if (p) {
  3070.                         this.send(j({
  3071.                             type: "set",
  3072.                             id: "_bind_auth_2"
  3073.                         }).c("bind", {
  3074.                             xmlns: l.NS.BIND
  3075.                         }).c("resource", {}).t(p).tree())
  3076.                     } else {
  3077.                         this.send(j({
  3078.                             type: "set",
  3079.                             id: "_bind_auth_2"
  3080.                         }).c("bind", {
  3081.                             xmlns: l.NS.BIND
  3082.                         }).tree())
  3083.                     }
  3084.                 }
  3085.                 return false
  3086.             },
  3087.             _sasl_bind_cb: function (n) {
  3088.                 if (n.getAttribute("type") == "error") {
  3089.                     l.info("SASL binding failed.");
  3090.                     this._changeConnectStatus(l.Status.AUTHFAIL, null);
  3091.                     return false
  3092.                 }
  3093.                 var p = n.getElementsByTagName("bind");
  3094.                 var o;
  3095.                 if (p.length > 0) {
  3096.                     o = p[0].getElementsByTagName("jid");
  3097.                     if (o.length > 0) {
  3098.                         this.jid = l.getText(o[0]);
  3099.                         if (this.do_session) {
  3100.                             this._addSysHandler(this._sasl_session_cb.bind(this), null, null, null, "_session_auth_2");
  3101.                             this.send(j({
  3102.                                 type: "set",
  3103.                                 id: "_session_auth_2"
  3104.                             }).c("session", {
  3105.                                 xmlns: l.NS.SESSION
  3106.                             }).tree())
  3107.                         } else {
  3108.                             this.authenticated = true;
  3109.                             this._changeConnectStatus(l.Status.CONNECTED, null)
  3110.                         }
  3111.                     }
  3112.                 } else {
  3113.                     l.info("SASL binding failed.");
  3114.                     this._changeConnectStatus(l.Status.AUTHFAIL, null);
  3115.                     return false
  3116.                 }
  3117.             },
  3118.             _sasl_session_cb: function (n) {
  3119.                 if (n.getAttribute("type") == "result") {
  3120.                     this.authenticated = true;
  3121.                     this._changeConnectStatus(l.Status.CONNECTED, null)
  3122.                 } else {
  3123.                     if (n.getAttribute("type") == "error") {
  3124.                         l.info("Session creation failed.");
  3125.                         this._changeConnectStatus(l.Status.AUTHFAIL, null);
  3126.                         return false
  3127.                     }
  3128.                 }
  3129.                 return false
  3130.             },
  3131.             _sasl_failure_cb: function (n) {
  3132.                 if (this._sasl_success_handler) {
  3133.                     this.deleteHandler(this._sasl_success_handler);
  3134.                     this._sasl_success_handler = null
  3135.                 }
  3136.                 if (this._sasl_challenge_handler) {
  3137.                     this.deleteHandler(this._sasl_challenge_handler);
  3138.                     this._sasl_challenge_handler = null
  3139.                 }
  3140.                 this._changeConnectStatus(l.Status.AUTHFAIL, null);
  3141.                 return false
  3142.             },
  3143.             _auth2_cb: function (n) {
  3144.                 if (n.getAttribute("type") == "result") {
  3145.                     this.authenticated = true;
  3146.                     this._changeConnectStatus(l.Status.CONNECTED, null)
  3147.                 } else {
  3148.                     if (n.getAttribute("type") == "error") {
  3149.                         this._changeConnectStatus(l.Status.AUTHFAIL, null);
  3150.                         this.disconnect()
  3151.                     }
  3152.                 }
  3153.                 return false
  3154.             },
  3155.             _addSysTimedHandler: function (p, o) {
  3156.                 var n = new l.TimedHandler(p, o);
  3157.                 n.user = false;
  3158.                 this.addTimeds.push(n);
  3159.                 return n
  3160.             },
  3161.             _addSysHandler: function (r, q, o, p, s) {
  3162.                 var n = new l.Handler(r, q, o, p, s);
  3163.                 n.user = false;
  3164.                 this.addHandlers.push(n);
  3165.                 return n
  3166.             },
  3167.             _onDisconnectTimeout: function () {
  3168.                 l.info("_onDisconnectTimeout was called");
  3169.                 var n;
  3170.                 while (this._requests.length > 0) {
  3171.                     n = this._requests.pop();
  3172.                     n.abort = true;
  3173.                     n.xhr.abort();
  3174.                     n.xhr.onreadystatechange = function () {}
  3175.                 }
  3176.                 this._doDisconnect();
  3177.                 return false
  3178.             },
  3179.             _onIdle: function () {
  3180.                 var p, r, t, q;
  3181.                 while (this.removeTimeds.length > 0) {
  3182.                     r = this.removeTimeds.pop();
  3183.                     p = this.timedHandlers.indexOf(r);
  3184.                     if (p >= 0) {
  3185.                         this.timedHandlers.splice(p, 1)
  3186.                     }
  3187.                 }
  3188.                 while (this.addTimeds.length > 0) {
  3189.                     this.timedHandlers.push(this.addTimeds.pop())
  3190.                 }
  3191.                 var o = new Date().getTime();
  3192.                 q = [];
  3193.                 for (p = 0; p < this.timedHandlers.length; p++) {
  3194.                     r = this.timedHandlers[p];
  3195.                     if (this.authenticated || !r.user) {
  3196.                         t = r.lastCalled + r.period;
  3197.                         if (t - o <= 0) {
  3198.                             if (r.run()) {
  3199.                                 q.push(r)
  3200.                             }
  3201.                         } else {
  3202.                             q.push(r)
  3203.                         }
  3204.                     }
  3205.                 }
  3206.                 this.timedHandlers = q;
  3207.                 var n, s;
  3208.                 if (this.authenticated && this._requests.length === 0 && this._data.length === 0 && !this.disconnecting) {
  3209.                     l.info("no requests during idle cycle, sending blank request");
  3210.                     this._data.push(null)
  3211.                 }
  3212.                 if (this._requests.length < 2 && this._data.length > 0 && !this.paused) {
  3213.                     n = this._buildBody();
  3214.                     for (p = 0; p < this._data.length; p++) {
  3215.                         if (this._data[p] !== null) {
  3216.                             if (this._data[p] === "restart") {
  3217.                                 n.attrs({
  3218.                                     to: this.domain,
  3219.                                     "xml:lang": "en",
  3220.                                     "xmpp:restart": "true",
  3221.                                     "xmlns:xmpp": l.NS.BOSH
  3222.                                 })
  3223.                             } else {
  3224.                                 n.cnode(this._data[p]).up()
  3225.                             }
  3226.                         }
  3227.                     }
  3228.                     delete this._data;
  3229.                     this._data = [];
  3230.                     this._requests.push(new l.Request(n.tree(), this._onRequestStateChange.bind(this).prependArg(this._dataRecv.bind(this)), n.tree().getAttribute("rid")));
  3231.                     this._processRequest(this._requests.length - 1)
  3232.                 }
  3233.                 if (this._requests.length > 0) {
  3234.                     s = this._requests[0].age();
  3235.                     if (this._requests[0].dead !== null) {
  3236.                         if (this._requests[0].timeDead() > Math.floor(l.SECONDARY_TIMEOUT * this.wait)) {
  3237.                             this._throttledRequestHandler()
  3238.                         }
  3239.                     }
  3240.                     if (s > Math.floor(l.TIMEOUT * this.wait)) {
  3241.                         l.warn("Request " + this._requests[0].id + " timed out, over " + Math.floor(l.TIMEOUT * this.wait) + " seconds since last activity");
  3242.                         this._throttledRequestHandler()
  3243.                     }
  3244.                 }
  3245.                 clearTimeout(this._idleTimeout);
  3246.                 this._idleTimeout = setTimeout(this._onIdle.bind(this), 100)
  3247.             }
  3248.         };
  3249.         if (m) {
  3250.             m(l, h, f, j, g)
  3251.         }
  3252.     })(function () {
  3253.         window.Strophe = arguments[0];
  3254.         window.$build = arguments[1];
  3255.         window.$msg = arguments[2];
  3256.         window.$iq = arguments[3];
  3257.         window.$pres = arguments[4]
  3258.     });
  3259.     Strophe.addConnectionPlugin("cors", {
  3260.         init: function () {
  3261.             if (window.XDomainRequest) {
  3262.                 Strophe.debug("CORS with IE");
  3263.                 Strophe.Request.prototype._newXHR = function () {
  3264.                     var g = function (n, m) {
  3265.                             n.status = m;
  3266.                             n.readyState = 4;
  3267.                             try {
  3268.                                 n.onreadystatechange()
  3269.                             } catch (l) {}
  3270.                             n.readyState = 0;
  3271.                             try {
  3272.                                 n.onreadystatechange()
  3273.                             } catch (l) {}
  3274.                         };
  3275.                     var j = new XDomainRequest();
  3276.                     j.readyState = 0;
  3277.                     j.onreadystatechange = this.func.prependArg(this);
  3278.                     j.onload = function () {
  3279.                         xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
  3280.                         xmlDoc.async = "false";
  3281.                         xmlDoc.loadXML(j.responseText);
  3282.                         j.responseXML = xmlDoc;
  3283.                         g(j, 200)
  3284.                     };
  3285.                     j.onerror = function () {
  3286.                         g(j, 500)
  3287.                     };
  3288.                     j.ontimeout = function () {
  3289.                         g(j, 500)
  3290.                     };
  3291.                     var h = j.send;
  3292.                     j.send = function (l) {
  3293.                         j.readyState = 2;
  3294.                         return h(l)
  3295.                     };
  3296.                     return j
  3297.                 }
  3298.             } else {
  3299.                 if ((window.XMLHttpRequest || window.XMLHttpRequest !== undefined) && (new XMLHttpRequest().withCredentials !== undefined)) {
  3300.                     Strophe.debug("CORS with Firefox/Safari/Chome")
  3301.                 } else {
  3302.                     if (flensed && flensed.flXHR) {
  3303.                         Strophe.debug("CORS not supported, using flXHR");
  3304.                         var f = true;
  3305.                         if (navigator.userAgent.indexOf("MSIE") != -1) {
  3306.                             f = false
  3307.                         }
  3308.                         Strophe.Request.prototype._newXHR = function () {
  3309.                             var g = new flensed.flXHR({
  3310.                                 autoUpdatePlayer: true,
  3311.                                 instancePooling: f,
  3312.                                 noCacheHeader: false
  3313.                             });
  3314.                             g.onreadystatechange = this.func.prependArg(this);
  3315.                             return g
  3316.                         }
  3317.                     } else {
  3318.                         Strophe.error("No CORS and no flXHR. You may experience cross domain turbulence.")
  3319.                     }
  3320.                 }
  3321.             }
  3322.         }
  3323.     });
  3324.     Phono.util = {
  3325.         guid: function () {
  3326.             return b.hexdigest(new String((new Date()).getTime()))
  3327.         },
  3328.         escapeXmppNode: function (f) {
  3329.             var g = f;
  3330.             g = g.replace(/\\/g, "\\5c");
  3331.             g = g.replace(/ /g, "\\20");
  3332.             g = g.replace(/\"/, "\\22");
  3333.             g = g.replace(/&/g, "\\26");
  3334.             g = g.replace(/\'/, "\\27");
  3335.             g = g.replace(/\//g, "\\2f");
  3336.             g = g.replace(/:/g, "\\3a");
  3337.             g = g.replace(/</g, "\\3c");
  3338.             g = g.replace(/>/g, "\\3e");
  3339.             g = g.replace(/@/g, "\\40");
  3340.             return g
  3341.         },
  3342.         each: function (j, o, h) {
  3343.             var g, l = 0,
  3344.                 m = j.length,
  3345.                 f = m === undefined || jQuery.isFunction(j);
  3346.             if (h) {
  3347.                 if (f) {
  3348.                     for (g in j) {
  3349.                         if (o.apply(j[g], h) === false) {
  3350.                             break
  3351.                         }
  3352.                     }
  3353.                 } else {
  3354.                     for (; l < m;) {
  3355.                         if (o.apply(j[l++], h) === false) {
  3356.                             break
  3357.                         }
  3358.                     }
  3359.                 }
  3360.             } else {
  3361.                 if (f) {
  3362.                     for (g in j) {
  3363.                         if (o.call(j[g], g, j[g]) === false) {
  3364.                             break
  3365.                         }
  3366.                     }
  3367.                 } else {
  3368.                     for (var n = j[0]; l < m && o.call(n, l, n) !== false; n = j[++l]) {}
  3369.                 }
  3370.             }
  3371.             return j
  3372.         },
  3373.         isFunction: function (f) {
  3374.             return toString.call(f) === "[object Function]"
  3375.         },
  3376.         isArray: function (f) {
  3377.             return toString.call(f) === "[object Array]"
  3378.         },
  3379.         isPlainObject: function (g) {
  3380.             if (!g || toString.call(g) !== "[object Object]" || g.nodeType || g.setInterval) {
  3381.                 return false
  3382.             }
  3383.             if (g.constructor && !hasOwnProperty.call(g, "constructor") && !hasOwnProperty.call(g.constructor.prototype, "isPrototypeOf")) {
  3384.                 return false
  3385.             }
  3386.             var f;
  3387.             for (f in g) {}
  3388.             return f === undefined || hasOwnProperty.call(g, f)
  3389.         },
  3390.         extend: function () {
  3391.             var m = arguments[0] || {},
  3392.                 l = 1,
  3393.                 j = arguments.length,
  3394.                 o = false,
  3395.                 p, h, f, g;
  3396.             if (typeof m === "boolean") {
  3397.                 o = m;
  3398.                 m = arguments[1] || {};
  3399.                 l = 2
  3400.             }
  3401.             if (typeof m !== "object" && !jQuery.isFunction(m)) {
  3402.                 m = {}
  3403.             }
  3404.             if (j === l) {
  3405.                 m = this;
  3406.                 --l
  3407.             }
  3408.             for (; l < j; l++) {
  3409.                 if ((p = arguments[l]) != null) {
  3410.                     for (h in p) {
  3411.                         f = m[h];
  3412.                         g = p[h];
  3413.                         if (m === g) {
  3414.                             continue
  3415.                         }
  3416.                         if (o && g && (jQuery.isPlainObject(g) || jQuery.isArray(g))) {
  3417.                             var n = f && (jQuery.isPlainObject(f) || jQuery.isArray(f)) ? f : jQuery.isArray(g) ? [] : {};
  3418.                             m[h] = jQuery.extend(o, n, g)
  3419.                         } else {
  3420.                             if (g !== undefined) {
  3421.                                 m[h] = g
  3422.                             }
  3423.                         }
  3424.                     }
  3425.                 }
  3426.             }
  3427.             return m
  3428.         },
  3429.         eventCounter: 1,
  3430.         addEvent: function (j, h, g) {
  3431.             if (!g.$$guid) {
  3432.                 g.$$guid = this.eventCounter++
  3433.             }
  3434.             if (!j.events) {
  3435.                 j.events = {}
  3436.             }
  3437.             var f = j.events[h];
  3438.             if (!f) {
  3439.                 f = j.events[h] = {};
  3440.                 if (j["on" + h]) {
  3441.                     f[0] = j["on" + h]
  3442.                 }
  3443.             }
  3444.             f[g.$$guid] = g;
  3445.             j["on" + h] = handleEvent
  3446.         },
  3447.         removeEvent: function (h, g, f) {
  3448.             if (h.events && h.events[g]) {
  3449.                 delete h.events[g][f.$$guid]
  3450.             }
  3451.         },
  3452.         handleEvent: function (j) {
  3453.             var h = true;
  3454.             var f = this.events[j.type];
  3455.             for (var g in f) {
  3456.                 this.$$handleEvent = f[g];
  3457.                 if (this.$$handleEvent(j) === false) {
  3458.                     h = false
  3459.                 }
  3460.             }
  3461.             return h
  3462.         }
  3463.     };
  3464.     Phono.events = {
  3465.         handlerCount: 1,
  3466.         add: function (j, h, g) {
  3467.             h = h.toLowerCase();
  3468.             if (!g.$$guid) {
  3469.                 g.$$guid = this.handlerCount++
  3470.             }
  3471.             if (!j.events) {
  3472.                 j.events = {}
  3473.             }
  3474.             var f = j.events[h];
  3475.             if (!f) {
  3476.                 f = j.events[h] = {};
  3477.                 if (j["on" + h]) {
  3478.                     f[0] = j["on" + h]
  3479.                 }
  3480.             }
  3481.             f[g.$$guid] = g;
  3482.             j["on" + h] = this.handle
  3483.         },
  3484.         bind: function (h, g) {
  3485.             var f;
  3486.             for (k in g) {
  3487.                 if (k.match("^on")) {
  3488.                     this.add(h, k.substr(2).toLowerCase(), g[k])
  3489.                 }
  3490.             }
  3491.         },
  3492.         remove: function (h, g, f) {
  3493.             g = g.toLowerCase();
  3494.             if (h.events && h.events[g]) {
  3495.                 delete h.events[g][f.$$guid]
  3496.             }
  3497.         },
  3498.         trigger: function (l, g, h, j) {
  3499.             h = h || {};
  3500.             h.type = g;
  3501.             var f = l["on" + g.toLowerCase()];
  3502.             if (f) {
  3503.                 f.call(l, h, j)
  3504.             }
  3505.         },
  3506.         handle: function (j, l) {
  3507.             var f = this.events[j.type.toLowerCase()];
  3508.             j.source = this;
  3509.             var g = new Array();
  3510.             g.push(j);
  3511.             if (l) {
  3512.                 var h;
  3513.                 for (h = 0; h < l.length; h++) {
  3514.                     g.push(l[h])
  3515.                 }
  3516.             }
  3517.             var m = this;
  3518.             Phono.util.each(f, function () {
  3519.                 this.apply(m, g)
  3520.             })
  3521.         }
  3522.     };
  3523.     (function () {
  3524.         function w(g, f) {
  3525.             if (f) {
  3526.                 for (key in f) {
  3527.                     if (f.hasOwnProperty(key)) {
  3528.                         g[key] = f[key]
  3529.                     }
  3530.                 }
  3531.             }
  3532.             return g
  3533.         }
  3534.         function r(g, f) {
  3535.             var l = [];
  3536.             for (var h in g) {
  3537.                 if (g.hasOwnProperty(h)) {
  3538.                     l[h] = f(g[h])
  3539.                 }
  3540.             }
  3541.             return l
  3542.         }
  3543.         function q(g, f, l) {
  3544.             if (x.isSupported(f.version)) {
  3545.                 g.innerHTML = x.getHTML(f, l)
  3546.             } else {
  3547.                 if (f.expressInstall && x.isSupported([6, 65])) {
  3548.                     g.innerHTML = x.getHTML(w(f, {
  3549.                         src: f.expressInstall
  3550.                     }), {
  3551.                         MMredirectURL: location.href,
  3552.                         MMplayerType: "PlugIn",
  3553.                         MMdoctitle: document.title
  3554.                     })
  3555.                 } else {
  3556.                     if (!g.innerHTML.replace(/\s/g, "")) {
  3557.                         g.innerHTML = "<h2>Flash version " + f.version + " or greater is required</h2><h3>" + (v[0] > 0 ? "Your version is " + v : "You have no flash plugin installed") + "</h3>" + (g.tagName == "A" ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='" + s + "'>here</a></p>");
  3558.                         if (g.tagName == "A") {
  3559.                             g.onclick = function () {
  3560.                                 location.href = s
  3561.                             }
  3562.                         }
  3563.                     }
  3564.                     if (f.onFail) {
  3565.                         var h = f.onFail.call(this);
  3566.                         if (typeof h == "string") {
  3567.                             g.innerHTML = h
  3568.                         }
  3569.                     }
  3570.                 }
  3571.             }
  3572.             if (u) {
  3573.                 window[f.id] = document.getElementById(f.id)
  3574.             }
  3575.             w(this, {
  3576.                 getRoot: function () {
  3577.                     return g
  3578.                 },
  3579.                 getOptions: function () {
  3580.                     return f
  3581.                 },
  3582.                 getConf: function () {
  3583.                     return l
  3584.                 },
  3585.                 getApi: function () {
  3586.                     return g.firstChild
  3587.                 }
  3588.             })
  3589.         }
  3590.         var u = document.all,
  3591.             s = "http://www.adobe.com/go/getflashplayer",
  3592.             p = typeof jQuery == "function",
  3593.             j = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/,
  3594.             t = {
  3595.                 width: "100%",
  3596.                 height: "100%",
  3597.                 id: "_" + ("" + Math.random()).slice(9),
  3598.                 allowfullscreen: true,
  3599.                 allowscriptaccess: "always",
  3600.                 quality: "high",
  3601.                 version: [3, 0],
  3602.                 onFail: null,
  3603.                 expressInstall: null,
  3604.                 w3c: false,
  3605.                 cachebusting: false
  3606.             };
  3607.         window.attachEvent && window.attachEvent("onbeforeunload", function () {
  3608.             __flash_unloadHandler = function () {};
  3609.             __flash_savedUnloadHandler = function () {}
  3610.         });
  3611.         window.flashembed = function (g, f, h) {
  3612.             if (typeof g == "string") {
  3613.                 g = document.getElementById(g.replace("#", ""))
  3614.             }
  3615.             if (g) {
  3616.                 if (typeof f == "string") {
  3617.                     f = {
  3618.                         src: f
  3619.                     }
  3620.                 }
  3621.                 return new q(g, w(w({}, t), f), h)
  3622.             }
  3623.         };
  3624.         var x = w(window.flashembed, {
  3625.             conf: t,
  3626.             getVersion: function () {
  3627.                 var g;
  3628.                 try {
  3629.                     g = navigator.plugins["Shockwave Flash"].description.slice(16)
  3630.                 } catch (f) {
  3631.                     try {
  3632.                         var l = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
  3633.                         g = l && l.GetVariable("$version")
  3634.                     } catch (h) {}
  3635.                 }
  3636.                 return (g = j.exec(g)) ? [g[1], g[3]] : [0, 0]
  3637.             },
  3638.             asString: function (g) {
  3639.                 if (g === null || g === undefined) {
  3640.                     return null
  3641.                 }
  3642.                 var f = typeof g;
  3643.                 if (f == "object" && g.push) {
  3644.                     f = "array"
  3645.                 }
  3646.                 switch (f) {
  3647.                 case "string":
  3648.                     g = g.replace(new RegExp('(["\\\\])', "g"), "\\$1");
  3649.                     g = g.replace(/^\s?(\d+\.?\d+)%/, "$1pct");
  3650.                     return '"' + g + '"';
  3651.                 case "array":
  3652.                     return "[" + r(g, function (l) {
  3653.                         return x.asString(l)
  3654.                     }).join(",") + "]";
  3655.                 case "function":
  3656.                     return '"function()"';
  3657.                 case "object":
  3658.                     f = [];
  3659.                     for (var h in g) {
  3660.                         g.hasOwnProperty(h) && f.push('"' + h + '":' + x.asString(g[h]))
  3661.                     }
  3662.                     return "{" + f.join(",") + "}"
  3663.                 }
  3664.                 return String(g).replace(/\s/g, " ").replace(/\'/g, '"')
  3665.             },
  3666.             getHTML: function (g, f) {
  3667.                 g = w({}, g);
  3668.                 var m = '<object width="' + g.width + '" height="' + g.height + '" id="' + g.id + '" name="' + g.id + '"';
  3669.                 if (g.cachebusting) {
  3670.                     g.src += (g.src.indexOf("?") != -1 ? "&" : "?") + Math.random()
  3671.                 }
  3672.                 m += g.w3c || !u ? ' data="' + g.src + '" type="application/x-shockwave-flash"' : ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
  3673.                 m += ">";
  3674.                 if (g.w3c || u) {
  3675.                     m += '<param name="movie" value="' + g.src + '" />'
  3676.                 }
  3677.                 g.width = g.height = g.id = g.w3c = g.src = null;
  3678.                 g.onFail = g.version = g.expressInstall = null;
  3679.                 for (var l in g) {
  3680.                     if (g[l]) {
  3681.                         m += '<param name="' + l + '" value="' + g[l] + '" />'
  3682.                     }
  3683.                 }
  3684.                 g = "";
  3685.                 if (f) {
  3686.                     for (var h in f) {
  3687.                         if (f[h]) {
  3688.                             l = f[h];
  3689.                             g += h + "=" + (/function|object/.test(typeof l) ? x.asString(l) : l) + "&"
  3690.                         }
  3691.                     }
  3692.                     g = g.slice(0, -1);
  3693.                     m += '<param name="flashvars" value=\'' + g + "' />"
  3694.                 }
  3695.                 m += "</object>";
  3696.                 return m
  3697.             },
  3698.             isSupported: function (f) {
  3699.                 return v[0] > f[0] || v[0] == f[0] && v[1] >= f[1]
  3700.             }
  3701.         }),
  3702.             v = x.getVersion();
  3703.         if (p) {
  3704.             jQuery.tools = jQuery.tools || {
  3705.                 version: "1.2.2"
  3706.             };
  3707.             jQuery.tools.flashembed = {
  3708.                 conf: t
  3709.             };
  3710.             jQuery.fn.flashembed = function (g, f) {
  3711.                 return this.each(function () {
  3712.                     $(this).data("flashembed", flashembed(this, g, f))
  3713.                 })
  3714.             }
  3715.         }
  3716.     })();
  3717.     (function () {
  3718.         function f(h, j, m) {
  3719.             this.config = Phono.util.extend({
  3720.                 swf: "http://s.phono.com/releases/" + Phono.version + "/plugins/audio/phono.audio.swf"
  3721.             }, j);
  3722.             Phono.events.bind(this, j);
  3723.             var g = this.config.containerId;
  3724.             if (!g) {
  3725.                 this.config.containerId = g = this.createContainer()
  3726.             }
  3727.             Phono.events.bind(this, {
  3728.                 onPermissionBoxShow: function () {
  3729.                     var n = $("#" + g).position();
  3730.                     $("#" + g).css("left", parseInt(n.left));
  3731.                     $("#" + g).css("top", parseInt(n.top))
  3732.                 }
  3733.             });
  3734.             var l = this;
  3735.             FABridge.addInitializationCallback(g, function () {
  3736.                 Phono.log.info("FlashAudio Ready");
  3737.                 l.$flash = this.create("Wrapper").getAudio();
  3738.                 l.$flash.addEventListener(null, function (o) {
  3739.                     var n = (o.getType() + "");
  3740.                     Phono.events.trigger(l, n)
  3741.                 });
  3742.                 m(l)
  3743.             });
  3744.             wmodeSetting = "opaque";
  3745.             if ((navigator.appVersion.indexOf("X11") != -1) || (navigator.appVersion.indexOf("Linux") != -1) || (jQuery.browser.opera)) {
  3746.                 wmodeSetting = "window"
  3747.             }
  3748.             flashembed(g, {
  3749.                 id: g + "id",
  3750.                 src: this.config.swf,
  3751.                 wmode: wmodeSetting
  3752.             }, {
  3753.                 bridgeName: g
  3754.             })
  3755.         }
  3756.         f.count = 0;
  3757.         f.prototype.showPermissionBox = function () {
  3758.             this.$flash.showPermissionBox()
  3759.         };
  3760.         f.prototype.permission = function () {
  3761.             return this.$flash.getHasPermission()
  3762.         };
  3763.         f.prototype.play = function (g, j) {
  3764.             var h = this.$flash.play(g, j);
  3765.             return {
  3766.                 url: function () {
  3767.                     return h.getUrl()
  3768.                 },
  3769.                 start: function () {
  3770.                     h.start()
  3771.                 },
  3772.                 stop: function () {
  3773.                     h.stop()
  3774.                 },
  3775.                 volume: function (l) {
  3776.                     if (arguments.length === 0) {
  3777.                         return h.getVolume()
  3778.                     } else {
  3779.                         h.setVolume(l)
  3780.                     }
  3781.                 }
  3782.             }
  3783.         };
  3784.         f.prototype.share = function (g, h, l) {
  3785.             var j = this.$flash.share(g, h, l.id, l.name, l.rate);
  3786.             return {
  3787.                 url: function () {
  3788.                     return j.getUrl()
  3789.                 },
  3790.                 codec: function () {
  3791.                     var m = j.getCodec();
  3792.                     return {
  3793.                         id: m.getId(),
  3794.                         name: m.getName(),
  3795.                         rate: m.getRate()
  3796.                     }
  3797.                 },
  3798.                 start: function () {
  3799.                     j.start()
  3800.                 },
  3801.                 stop: function () {
  3802.                     j.stop()
  3803.                 },
  3804.                 digit: function (n, o, m) {
  3805.                     j.digit(n, o, m)
  3806.                 },
  3807.                 gain: function (m) {
  3808.                     if (arguments.length === 0) {
  3809.                         return j.getGain()
  3810.                     } else {
  3811.                         j.setGain(m)
  3812.                     }
  3813.                 },
  3814.                 mute: function (m) {
  3815.                     if (arguments.length === 0) {
  3816.                         return j.getMute()
  3817.                     } else {
  3818.                         j.setMute(m)
  3819.                     }
  3820.                 },
  3821.                 suppress: function (m) {
  3822.                     if (arguments.length === 0) {
  3823.                         return j.getSuppress()
  3824.                     } else {
  3825.                         j.setSuppress(m)
  3826.                     }
  3827.                 }
  3828.             }
  3829.         };
  3830.         f.prototype.transport = function () {
  3831.             return {
  3832.                 name: this.$flash.getTransport(),
  3833.                 description: this.$flash.getDescription()
  3834.             }
  3835.         };
  3836.         f.prototype.codecs = function () {
  3837.             var g = new Array();
  3838.             var h = this.$flash.getCodecs();
  3839.             Phono.util.each(h, function () {
  3840.                 g.push({
  3841.                     id: this.getId(),
  3842.                     name: this.getName(),
  3843.                     rate: this.getRate()
  3844.                 })
  3845.             });
  3846.             return g
  3847.         };
  3848.         f.prototype.createContainer = function () {
  3849.             var h = $("<div>").attr("id", "_phono-audio-flash" + (f.count++)).addClass("phono_FlashHolder").appendTo("body");
  3850.             h.css({
  3851.                 width: "1px",
  3852.                 height: "1px",
  3853.                 position: "absolute",
  3854.                 top: "50%",
  3855.                 left: "50%",
  3856.                 "margin-top": "-69px",
  3857.                 "margin-left": "-107px",
  3858.                 "z-index": "10001",
  3859.                 visibility: "visible"
  3860.             });
  3861.             var g = $(h).attr("id");
  3862.             Phono.events.bind(this, {
  3863.                 onPermissionBoxShow: function () {
  3864.                     $("#" + g).css({
  3865.                         width: "215px",
  3866.                         height: "138px"
  3867.                     })
  3868.                 },
  3869.                 onPermissionBoxHide: function () {
  3870.                     $("#" + g).css({
  3871.                         width: "1px",
  3872.                         height: "1px"
  3873.                     })
  3874.                 }
  3875.             });
  3876.             return g
  3877.         };
  3878.         Phono.registerPlugin("audio", {
  3879.             create: function (g, h, j) {
  3880.                 return new f(g, h, j)
  3881.             }
  3882.         })
  3883.     })();
  3884.     (function () {
  3885.         function g(h) {
  3886.             this.from = null;
  3887.             this.body = null;
  3888.             this.connection = h
  3889.         }
  3890.         g.prototype.reply = function (h) {
  3891.             this.connection.send($msg({
  3892.                 to: this.from,
  3893.                 type: "chat"
  3894.             }).c("body").t(h))
  3895.         };
  3896.  
  3897.         function f(h, j, l) {
  3898.             this.connection = h.connection;
  3899.             this.connection.addHandler(this.handleMessage.bind(this), null, "message", "chat");
  3900.             Phono.events.bind(this, j);
  3901.             l(this)
  3902.         }
  3903.         f.prototype.send = function (j, h) {
  3904.             this.connection.send($msg({
  3905.                 to: j,
  3906.                 type: "chat"
  3907.             }).c("body").t(h))
  3908.         };
  3909.         f.prototype.handleMessage = function (j) {
  3910.             var h = new g(this.connection);
  3911.             h.from = Strophe.getBareJidFromJid($(j).attr("from"));
  3912.             h.body = $(j).find("body").text();
  3913.             Phono.events.trigger(this, "message", {
  3914.                 message: h
  3915.             }, [h]);
  3916.             return true
  3917.         };
  3918.         Phono.registerPlugin("messaging", {
  3919.             create: function (h, j, l) {
  3920.                 return new f(h, j, l)
  3921.             }
  3922.         })
  3923.     })();
  3924.     (function () {
  3925.         Strophe.addNamespace("JINGLE", "urn:xmpp:jingle:1");
  3926.         Strophe.addNamespace("JINGLE_SESSION_INFO", "urn:xmpp:jingle:apps:rtp:1:info");
  3927.         var j = {
  3928.             CONNECTED: 0,
  3929.             RINGING: 1,
  3930.             DISCONNECTED: 2,
  3931.             PROGRESS: 3,
  3932.             INITIAL: 4
  3933.         };
  3934.         var h = {
  3935.             OUTBOUND: 0,
  3936.             INBOUND: 1
  3937.         };
  3938.  
  3939.         function f(l, p, o, m) {
  3940.             var n = this;
  3941.             this.phone = l;
  3942.             this.phono = l.phono;
  3943.             this.audioLayer = this.phono.audio;
  3944.             this.connection = this.phono.connection;
  3945.             this.config = Phono.util.extend({
  3946.                 pushToTalk: false,
  3947.                 mute: false,
  3948.                 talking: false,
  3949.                 hold: false,
  3950.                 volume: 50,
  3951.                 gain: 50,
  3952.                 tones: false
  3953.             }, m);
  3954.             Phono.util.each(this.config, function (r, q) {
  3955.                 if (typeof n[r] == "function") {
  3956.                     n[r](q)
  3957.                 }
  3958.             });
  3959.             this.id = p;
  3960.             this.direction = o;
  3961.             this.state = j.INITIAL;
  3962.             this.remoteJid = null;
  3963.             this.initiator = null;
  3964.             this.headers = [];
  3965.             if (this.config.headers) {
  3966.                 this.headers = this.config.headers
  3967.             }
  3968.             Phono.events.bind(this, m);
  3969.             this.ringer = this.audioLayer.play(l.ringTone());
  3970.             this.ringback = this.audioLayer.play(l.ringbackTone())
  3971.         }
  3972.         f.prototype.startAudio = function (l) {
  3973.             if (this.input) {
  3974.                 this.input.start()
  3975.             }
  3976.             if (this.output) {
  3977.                 if (!this.audioLayer.permission()) {
  3978.                     Phono.events.trigger(this.audioLayer, "permissionBoxShow")
  3979.                 }
  3980.                 this.output.start()
  3981.             }
  3982.         };
  3983.         f.prototype.stopAudio = function (l) {
  3984.             if (this.input) {
  3985.                 this.input.stop()
  3986.             }
  3987.             if (this.output) {
  3988.                 this.output.stop()
  3989.             }
  3990.         };
  3991.         f.prototype.start = function () {
  3992.             var m = this;
  3993.             if (m.state != j.INITIAL) {
  3994.                 return
  3995.             }
  3996.             var l = $iq({
  3997.                 type: "set",
  3998.                 to: m.remoteJid
  3999.             });
  4000.             var o = l.c("jingle", {
  4001.                 xmlns: Strophe.NS.JINGLE,
  4002.                 action: "session-initiate",
  4003.                 initiator: m.initiator,
  4004.                 sid: m.id
  4005.             });
  4006.             $(m.headers).each(function () {
  4007.                 o.c("custom-header", {
  4008.                     name: this.name,
  4009.                     data: this.value
  4010.                 }).up()
  4011.             });
  4012.             var n = this.audioLayer.codecs()[0];
  4013.             o.c("content", {
  4014.                 creator: "initiator"
  4015.             }).c("description", {
  4016.                 xmlns: this.audioLayer.transport().description
  4017.             }).c("payload-type", {
  4018.                 id: n.id,
  4019.                 name: n.name,
  4020.                 clockrate: n.rate
  4021.             }).up().up().c("transport", {
  4022.                 xmlns: this.audioLayer.transport().description
  4023.             });
  4024.             this.connection.sendIQ(l, function (p) {
  4025.                 m.state = j.PROGRESS
  4026.             })
  4027.         };
  4028.         f.prototype.accept = function () {
  4029.             var m = this;
  4030.             if (m.state != j.PROGRESS) {
  4031.                 return
  4032.             }
  4033.             var l = $iq({
  4034.                 type: "set",
  4035.                 to: m.remoteJid
  4036.             }).c("jingle", {
  4037.                 xmlns: Strophe.NS.JINGLE,
  4038.                 action: "session-info",
  4039.                 initiator: m.initiator,
  4040.                 sid: m.id
  4041.             }).c("ringing", {
  4042.                 xmlns: Strophe.NS.JINGLE_SESSION_INFO
  4043.             });
  4044.             this.connection.sendIQ(l, function (n) {
  4045.                 m.state = j.RINGING;
  4046.                 Phono.events.trigger(m, "ring")
  4047.             })
  4048.         };
  4049.         f.prototype.answer = function () {
  4050.             var m = this;
  4051.             if (m.state != j.RINGING && m.state != j.PROGRESS) {
  4052.                 return
  4053.             }
  4054.             var l = $iq({
  4055.                 type: "set",
  4056.                 to: m.remoteJid
  4057.             }).c("jingle", {
  4058.                 xmlns: Strophe.NS.JINGLE,
  4059.                 action: "session-accept",
  4060.                 initiator: m.initiator,
  4061.                 sid: m.id
  4062.             });
  4063.             this.connection.sendIQ(l, function (n) {
  4064.                 m.state = j.CONNECTED;
  4065.                 Phono.events.trigger(m, "answer");
  4066.                 if (m.ringer != null) {
  4067.                     m.ringer.stop()
  4068.                 }
  4069.                 m.startAudio()
  4070.             })
  4071.         };
  4072.         f.prototype.bindAudio = function (l) {
  4073.             this.input = l.input;
  4074.             this.output = l.output;
  4075.             this.volume(this.volume());
  4076.             this.gain(this.gain());
  4077.             this.mute(this.mute());
  4078.             this.hold(this.hold());
  4079.             this.headset(this.headset());
  4080.             this.pushToTalkStateChanged()
  4081.         };
  4082.         f.prototype.hangup = function () {
  4083.             var m = this;
  4084.             if (m.state != j.CONNECTED && m.state != j.RINGING && m.state != j.PROGRESS) {
  4085.                 return
  4086.             }
  4087.             var l = $iq({
  4088.                 type: "set",
  4089.                 to: m.remoteJid
  4090.             }).c("jingle", {
  4091.                 xmlns: Strophe.NS.JINGLE,
  4092.                 action: "session-terminate",
  4093.                 initiator: m.initiator,
  4094.                 sid: m.id
  4095.             });
  4096.             this.connection.sendIQ(l, function (n) {
  4097.                 m.state = j.DISCONNECTED;
  4098.                 Phono.events.trigger(m, "hangup");
  4099.                 m.stopAudio();
  4100.                 if (m.ringer != null) {
  4101.                     m.ringer.stop()
  4102.                 }
  4103.                 if (m.ringback != null) {
  4104.                     m.ringback.stop()
  4105.                 }
  4106.             })
  4107.         };
  4108.         f.prototype.digit = function (l, m) {
  4109.             if (!m) {
  4110.                 m = 250
  4111.             }
  4112.             this.output.digit(l, m, this._tones)
  4113.         };
  4114.         f.prototype.pushToTalk = function (l) {
  4115.             if (arguments.length === 0) {
  4116.                 return this._pushToTalk
  4117.             }
  4118.             this._pushToTalk = l;
  4119.             this.pushToTalkStateChanged()
  4120.         };
  4121.         f.prototype.talking = function (l) {
  4122.             if (arguments.length === 0) {
  4123.                 return this._talking
  4124.             }
  4125.             this._talking = l;
  4126.             this.pushToTalkStateChanged()
  4127.         };
  4128.         f.prototype.mute = function (l) {
  4129.             if (arguments.length === 0) {
  4130.                 return this._mute
  4131.             }
  4132.             this._mute = l;
  4133.             if (this.output) {
  4134.                 this.output.mute(l)
  4135.             }
  4136.         };
  4137.         f.prototype.hold = function (l) {};
  4138.         f.prototype.volume = function (l) {
  4139.             if (arguments.length === 0) {
  4140.                 return this._volume
  4141.             }
  4142.             this._volume = l;
  4143.             if (this.input) {
  4144.                 this.input.volume(l)
  4145.             }
  4146.         };
  4147.         f.prototype.tones = function (l) {
  4148.             if (arguments.length === 0) {
  4149.                 return this._tones
  4150.             }
  4151.             this._tones = l
  4152.         };
  4153.         f.prototype.gain = function (l) {
  4154.             if (arguments.length === 0) {
  4155.                 return this._gain
  4156.             }
  4157.             this._gain = l;
  4158.             if (this.output) {
  4159.                 this.output.gain(l)
  4160.             }
  4161.         };
  4162.         f.prototype.headset = function (l) {
  4163.             if (arguments.length === 0) {
  4164.                 return this._headset
  4165.             }
  4166.             this._headset = l;
  4167.             if (this.output) {
  4168.                 this.output.suppress(!l)
  4169.             }
  4170.         };
  4171.         f.prototype.pushToTalkStateChanged = function () {
  4172.             if (this.input && this.output) {
  4173.                 if (this._pushToTalk) {
  4174.                     if (this._talking) {
  4175.                         this.input.volume(20);
  4176.                         this.output.mute(false)
  4177.                     } else {
  4178.                         this.input.volume(this._volume);
  4179.                         this.output.mute(true)
  4180.                     }
  4181.                 } else {
  4182.                     this.input.volume(this._volume);
  4183.                     this.output.mute(false)
  4184.                 }
  4185.             }
  4186.         };
  4187.         f.prototype.negotiate = function (p) {
  4188.             var m = this;
  4189.             var n = $(p).find("description");
  4190.             var o = null;
  4191.             n.find("payload-type").each(function () {
  4192.                 var r = $(this).attr("name");
  4193.                 var s = $(this).attr("clockrate");
  4194.                 $.each(m.audioLayer.codecs(), function () {
  4195.                     if (this.name == r && this.rate == s) {
  4196.                         o = this;
  4197.                         return false
  4198.                     }
  4199.                 })
  4200.             });
  4201.             if (!o) {
  4202.                 return false
  4203.             }
  4204.             var q = $(p).find("transport");
  4205.             var l = false;
  4206.             if (this.audioLayer.transport().name == q.attr("xmlns")) {
  4207.                 q.find("candidate").each(function () {
  4208.                     var r = $(this).attr("rtmpUri") + "/" + $(this).attr("playName");
  4209.                     m.bindAudio({
  4210.                         input: m.audioLayer.play(r, false),
  4211.                         output: m.audioLayer.share(r, false, o)
  4212.                     });
  4213.                     l = true;
  4214.                     return false
  4215.                 })
  4216.             }
  4217.             if (!l) {
  4218.                 return false
  4219.             }
  4220.             return true
  4221.         };
  4222.  
  4223.         function g(m, n, o) {
  4224.             var l = this;
  4225.             this.phono = m;
  4226.             this.connection = m.connection;
  4227.             this.calls = {};
  4228.             this.config = Phono.util.extend({
  4229.                 ringTone: "http://s.phono.com/ringtones/Diggztone_Marimba.mp3",
  4230.                 ringbackTone: "http://s.phono.com/ringtones/ringback-us.mp3",
  4231.                 headset: false
  4232.             }, n);
  4233.             Phono.util.each(this.config, function (q, p) {
  4234.                 if (typeof l[q] == "function") {
  4235.                     l[q](p)
  4236.                 }
  4237.             });
  4238.             Phono.events.bind(this, n);
  4239.             this.connection.addHandler(this.doJingle.bind(this), Strophe.NS.JINGLE, "iq", "set");
  4240.             o(this)
  4241.         }
  4242.         g.prototype.doJingle = function (q) {
  4243.             var l = this;
  4244.             var n = this.phono.audio;
  4245.             var p = $(q).find("jingle");
  4246.             var o = p.attr("action") || "";
  4247.             var r = p.attr("sid") || "";
  4248.             var m = this.calls[r] || null;
  4249.             switch (o) {
  4250.             case "session-initiate":
  4251.                 m = new f(l, r, h.INBOUND);
  4252.                 m.phone = l;
  4253.                 m.remoteJid = $(q).attr("from");
  4254.                 m.initiator = p.attr("initiator");
  4255.                 l.calls[m.id] = m;
  4256.                 if (!m.negotiate(q)) {
  4257.                     Phono.log.warn("Failed to negotiate incoming call", q);
  4258.                     return true
  4259.                 }
  4260.                 m.headers = new Array();
  4261.                 p.find("custom-header").each(function () {
  4262.                     m.headers.push({
  4263.                         name: $(this).attr("name"),
  4264.                         value: $(this).attr("data")
  4265.                     })
  4266.                 });
  4267.                 if (m.ringer != null) {
  4268.                     m.ringer.start()
  4269.                 }
  4270.                 m.state = j.PROGRESS;
  4271.                 m.accept();
  4272.                 Phono.events.trigger(this, "incomingCall", {
  4273.                     call: m
  4274.                 });
  4275.                 break;
  4276.             case "session-accept":
  4277.                 if (!m.negotiate(q)) {
  4278.                     Phono.log.warn("Failed to negotiate outbound call", q);
  4279.                     return true
  4280.                 }
  4281.                 m.state = j.CONNECTED;
  4282.                 if (m.ringback != null) {
  4283.                     m.ringback.stop()
  4284.                 }
  4285.                 m.startAudio();
  4286.                 Phono.events.trigger(m, "answer");
  4287.                 break;
  4288.             case "session-terminate":
  4289.                 m.state = j.DISCONNECTED;
  4290.                 m.stopAudio();
  4291.                 if (m.ringer != null) {
  4292.                     m.ringer.stop()
  4293.                 }
  4294.                 if (m.ringback != null) {
  4295.                     m.ringback.stop()
  4296.                 }
  4297.                 Phono.events.trigger(m, "hangup");
  4298.                 break;
  4299.             case "session-info":
  4300.                 if ($(q).find("ringing")) {
  4301.                     m.state = j.RINGING;
  4302.                     if (m.ringback != null) {
  4303.                         m.ringback.start()
  4304.                     }
  4305.                     Phono.events.trigger(m, "ring")
  4306.                 }
  4307.                 break
  4308.             }
  4309.             this.connection.send($iq({
  4310.                 type: "result",
  4311.                 id: $(q).attr("id")
  4312.             }));
  4313.             return true
  4314.         };
  4315.         g.prototype.dial = function (o, l) {
  4316.             var n = Phono.util.guid();
  4317.             l = Phono.util.extend({
  4318.                 headset: this.headset()
  4319.             }, (l || {}));
  4320.             var m = new f(this, n, h.OUTBOUND, l);
  4321.             m.phone = this;
  4322.             m.remoteJid = o;
  4323.             m.initiator = this.connection.jid;
  4324.             this.beforeDial(m);
  4325.             this.calls[m.id] = m;
  4326.             m.start();
  4327.             return m
  4328.         };
  4329.         g.prototype.beforeDial = function (l) {
  4330.             var n = l.remoteJid;
  4331.             if (n.match("^sip:") || n.match("^sips:")) {
  4332.                 l.remoteJid = Phono.util.escapeXmppNode(n.substr(4)) + "@sip"
  4333.             } else {
  4334.                 if (n.match("^app:")) {
  4335.                     l.remoteJid = Phono.util.escapeXmppNode(n.substr(4)) + "@app"
  4336.                 } else {
  4337.                     if (n.match("^tel:")) {
  4338.                         l.remoteJid = "9991475834@app";
  4339.                         l.headers.push({
  4340.                             name: "x-numbertodial",
  4341.                             value: n.substr(4)
  4342.                         })
  4343.                     } else {
  4344.                         var m = n.replace(/[\(\)\-\.\ ]/g, "");
  4345.                         if (m.match(/^\+?\d+$/)) {
  4346.                             l.remoteJid = "9991475834@app";
  4347.                             l.headers.push({
  4348.                                 name: "x-numbertodial",
  4349.                                 value: m
  4350.                             })
  4351.                         } else {
  4352.                             if (n.indexOf("@") > 0) {
  4353.                                 l.remoteJid = Phono.util.escapeXmppNode(n) + "@sip"
  4354.                             }
  4355.                         }
  4356.                     }
  4357.                 }
  4358.             }
  4359.         };
  4360.         g.prototype.ringTone = function (l) {
  4361.             if (arguments.length == 0) {
  4362.                 return this._ringTone
  4363.             }
  4364.             this._ringTone = l
  4365.         };
  4366.         g.prototype.ringbackTone = function (l) {
  4367.             if (arguments.length == 0) {
  4368.                 return this._ringbackTone
  4369.             }
  4370.             this._ringbackTone = l
  4371.         };
  4372.         g.prototype.headset = function (l) {
  4373.             if (arguments.length == 0) {
  4374.                 return this._headset
  4375.             }
  4376.             this._headset = l;
  4377.             Phono.util.each(this.calls, function () {
  4378.                 this.headset(l)
  4379.             })
  4380.         };
  4381.         Phono.registerPlugin("phone", {
  4382.             create: function (l, m, n) {
  4383.                 return new g(l, m, n)
  4384.             }
  4385.         })
  4386.     })();
  4387.  
  4388.     function a(f, h, g) {
  4389.         this.index = 0;
  4390.         this.readyHandler = g;
  4391.         this.config = h;
  4392.         this.phono = f;
  4393.         this.pluginNames = new Array();
  4394.         for (pluginName in Phono.plugins) {
  4395.             this.pluginNames.push(pluginName)
  4396.         }
  4397.     }
  4398.     a.prototype.init = function (f, h, g) {
  4399.         this.chain()
  4400.     };
  4401.     a.prototype.chain = function () {
  4402.         var f = this;
  4403.         var g = f.pluginNames[this.index];
  4404.         Phono.plugins[g].create(f.phono, f.config[g], function (h) {
  4405.             f.phono[g] = h;
  4406.             f.index++;
  4407.             if (f.index === f.pluginNames.length) {
  4408.                 f.readyHandler.apply(f.phono)
  4409.             } else {
  4410.                 f.chain()
  4411.             }
  4412.         })
  4413.     }
  4414. })();
  4415. (function (a) {
  4416.     a.phono = function (b) {
  4417.         return new Phono(b)
  4418.     }
  4419. })(jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement