var nsILastPassExternal=Components.interfaces.nsILastPassExternal,nsISupports=Components.interfaces.nsISupports,CLASS_ID_EXTERNAL=Components.ID("{27befaa9-ce4f-406c-9f3d-b794519d5a03}"),CLASS_NAME_EXTERNAL="LastPass External Javascript XPCOM Component",CONTRACT_ID_EXTERNAL="@lastpass.com/external/lastpass;1",LPExternal=null,LastPassExternalFactory={createInstance:function(a,b){if(a!=null)throw Components.results.NS_ERROR_NO_AGGREGATION;if(null==LPExternal){LPExternal=new LastPassExternalContainer;
Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService).logStringMessage("created LPExternal")}return LPExternal.QueryInterface(b)}},LastPassExternalModule={registerSelf:function(a,b,c,d){a=a.QueryInterface(Components.interfaces.nsIComponentRegistrar);a.registerFactoryLocation(CLASS_ID_EXTERNAL,CLASS_NAME_EXTERNAL,CONTRACT_ID_EXTERNAL,b,c,d);Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService).logStringMessage("LastPassExternalModule registered")},
unregisterSelf:function(a,b){a=a.QueryInterface(Components.interfaces.nsIComponentRegistrar);a.unregisterFactoryLocation(CLASS_ID_EXTERNAL,b)},getClassObject:function(a,b,c){if(!c.equals(Components.interfaces.nsIFactory))throw Components.results.NS_ERROR_NOT_IMPLEMENTED;if(b.equals(CLASS_ID_EXTERNAL))return LastPassExternalFactory;throw Components.results.NS_ERROR_NO_INTERFACE;},canUnload:function(){return true}};function NSGetModule(){return LastPassExternalModule}
function NSGetFactory(){return LastPassExternalFactory}
function LastPassExternalContainer(){this.QueryInterface=function(a){if(XPCOMUtils.generateNSGetFactory)return XPCOMUtils.generateQI([nsILastPassExternal]);Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService).logStringMessage("LastPassExternal: typeof: "+typeof nsILastPassExternal);if(!a.equals(nsILastPassExternal)&&!a.equals(nsISupports))throw Components.results.NS_ERROR_NO_INTERFACE;return this};this.logoff=function(){var a=Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
try{var b=Components.classes["@lastpass.com/lastpass;1"].getService().wrappedJSObject;if(b&&typeof b.logoff=="function"){b.logoff();a.logStringMessage("Called LP.logoff()")}else a.logStringMessage("logoff NO LP object or logoff not a function")}catch(c){a.logStringMessage("LastPass: err:"+c+" ln:"+c.lineNumber)}};this.loginCheck=function(){try{var a=Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);Components.classes["@lastpass.com/lastpass;1"].getService()}catch(b){a.logStringMessage("LastPass: err:"+
b+" ln:"+b.lineNumber)}};this.refresh=function(){Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService).logStringMessage("LastPass: refresh called")}};
